diff --git a/Simulation/FastSimulation/FastChainPileup/FastChainPileup/MultiPy8Pileup.h b/Simulation/FastSimulation/FastChainPileup/FastChainPileup/MultiPy8Pileup.h index 8eb6a17f78de89aac153f51ff315a4b1ba9c8208..b1f674c029bc7a32d3ecd253453484f535b60749 100644 --- a/Simulation/FastSimulation/FastChainPileup/FastChainPileup/MultiPy8Pileup.h +++ b/Simulation/FastSimulation/FastChainPileup/FastChainPileup/MultiPy8Pileup.h @@ -18,7 +18,9 @@ #include "Pythia8_i/Pythia8_i.h" -class GenEvent; +namespace HepMC { + class GenEvent; +} class MultiPy8Pileup : public Pythia8_i { @@ -30,21 +32,21 @@ class MultiPy8Pileup : public Pythia8_i { virtual StatusCode genFinalize(); virtual StatusCode callGenerator(); - virtual StatusCode fillEvt( GenEvent *event ); + virtual StatusCode fillEvt( HepMC::GenEvent *event ); private: int nPileupEvents(); // decide how much pileup events will be generated // parameters int m_ncollevent; // fixed number of collisions per event - std::vector<int> m_pileupProfile; // pileup mu-profile - std::vector<float> m_multbcid; // mu multipliers per BCID + std::vector< int > m_pileupProfile; // pileup mu-profile + std::vector< float > m_multbcid; // mu multipliers per BCID std::string m_filename; // filename for histogram output int m_ngen; // total number of events generated int m_nbad; // total number of failed events - int m_evnumber; // event sequence number + // int m_evnumber; // event sequence number - std::vector<GenEvent*> m_evts; // vector of generated minbias events + std::vector< HepMC::GenEvent * > m_evts; // vector of generated minbias events CLHEP::HepRandomEngine *m_randomEngine; diff --git a/Simulation/FastSimulation/FastChainPileup/src/MultiPy8Pileup.cxx b/Simulation/FastSimulation/FastChainPileup/src/MultiPy8Pileup.cxx index 551d0c8f4ff2690ac95cff447a83c44b9d075bc2..1185a9964542e4e75e19da863c2d35a651c5d2ea 100644 --- a/Simulation/FastSimulation/FastChainPileup/src/MultiPy8Pileup.cxx +++ b/Simulation/FastSimulation/FastChainPileup/src/MultiPy8Pileup.cxx @@ -17,8 +17,12 @@ MultiPy8Pileup::MultiPy8Pileup(const std::string& name, ISvcLocator* pSvcLocator Pythia8_i::Pythia8_i( name, pSvcLocator ), m_ngen(0), m_nbad(0), - m_evnumber(1), - m_randomEngine(NULL),m_file(NULL) + // m_evnumber(1), + m_randomEngine(NULL), + m_file(NULL), + m_htgPileupProfile(NULL), + m_htgPileupMu(NULL), + m_htgPileupEvents(NULL) { declareProperty("NCollPerEvent",m_ncollevent=20,"Collisons per event (-1 to use profile)"); declareProperty("PileupProfile",m_pileupProfile,"Pileup profile array"); @@ -98,12 +102,12 @@ StatusCode MultiPy8Pileup::callGenerator() { << " for BCID " << bcid); StatusCode sc=Pythia8_i::callGenerator(); if (sc==StatusCode::SUCCESS) { - GenEvent* evt=new GenEvent(); + HepMC::GenEvent* evt=new HepMC::GenEvent(); if (Pythia8_i::fillEvt(evt)==StatusCode::SUCCESS) { // change the process ID to incorporate the BCID * 10000 int pid=evt->signal_process_id(); evt->set_signal_process_id(pid+10000*bcid); - ATH_MSG_DEBUG("Signal process ID " << pid << " set to " << + ATH_MSG_DEBUG("Signal process ID " << pid << " set to " << evt->signal_process_id() << " for BCID " << bcid); m_evts.push_back(evt); ++m_ngen; @@ -117,12 +121,12 @@ StatusCode MultiPy8Pileup::callGenerator() { } } } - ATH_MSG_DEBUG("callGenerator finished with " << m_evts.size() << + ATH_MSG_DEBUG("callGenerator finished with " << m_evts.size() << " pileup events in buffer"); return StatusCode::SUCCESS; } -StatusCode MultiPy8Pileup::fillEvt(GenEvent* evt) { +StatusCode MultiPy8Pileup::fillEvt(HepMC::GenEvent* evt) { int nbuf=m_evts.size(); if (nbuf>1) { // send extra events into McEventCollection via backdoor