diff --git a/Generators/Pythia8B_i/Pythia8B_i/Pythia8B_i.h b/Generators/Pythia8B_i/Pythia8B_i/Pythia8B_i.h index 0549227f205dd94be3ad8a34c8b01f61a9e67475..a986729347298104d6eb09832fd2e2e38572edb4 100644 --- a/Generators/Pythia8B_i/Pythia8B_i/Pythia8B_i.h +++ b/Generators/Pythia8B_i/Pythia8B_i/Pythia8B_i.h @@ -41,7 +41,6 @@ public: private: - bool m_useRndmGenSvc; unsigned int m_had, m_dec; int m_trigCode; unsigned int m_nSignalRequired; diff --git a/Generators/Pythia8B_i/Pythia8B_i/UserSelections.h b/Generators/Pythia8B_i/Pythia8B_i/UserSelections.h index efdba48abbb03e461a021df9fa0eca615576c612..0774ae030af9aeb2cb4a8c939f6bdc1a103fd0b8 100644 --- a/Generators/Pythia8B_i/Pythia8B_i/UserSelections.h +++ b/Generators/Pythia8B_i/Pythia8B_i/UserSelections.h @@ -482,7 +482,7 @@ bool Pythia8B_i::userSelection(Pythia8::Event &event, std::string userString, CLHEP::HepRandomEngine* Rdmengine = Pythia8B_i::p_AtRndmGenSvc->GetEngine(Pythia8_i::pythia_stream); - const double gentau = Pythia8_i::m_pythia.particleData.tau0(531); + const double gentau = Pythia8_i::m_pythia->particleData.tau0(531); const double correctionfactor = 0.299792458; const double gentauCorrect = gentau / correctionfactor; if (debug) { @@ -667,7 +667,7 @@ bool Pythia8B_i::userSelection(Pythia8::Event &event, std::string userString, CLHEP::HepRandomEngine* Rdmengine = Pythia8B_i::p_AtRndmGenSvc->GetEngine(Pythia8_i::pythia_stream); - const double gentau = Pythia8_i::m_pythia.particleData.tau0(511); + const double gentau = Pythia8_i::m_pythia->particleData.tau0(511); const double correctionfactor = 0.299792458; const double gentauCorrect = gentau / correctionfactor; if (debug) { diff --git a/Generators/Pythia8B_i/src/Pythia8B_i.cxx b/Generators/Pythia8B_i/src/Pythia8B_i.cxx index 836909bcddfa867a95e19c5c85d0b329bbe6dee3..2c39742627bab52b2cb33f9d9f7e4d6327ed02ff 100644 --- a/Generators/Pythia8B_i/src/Pythia8B_i.cxx +++ b/Generators/Pythia8B_i/src/Pythia8B_i.cxx @@ -25,7 +25,6 @@ IAtRndmGenSvc* Pythia8B_i::p_AtRndmGenSvc = 0; // User properties not defined by Pythia8_i Pythia8B_i::Pythia8B_i (const std::string &name, ISvcLocator *pSvcLocator): Pythia8_i(name,pSvcLocator) { - declareProperty("useRndmGenSvc", m_useRndmGenSvc = true); declareProperty("NHadronizationLoops", m_had=1); declareProperty("NDecayLoops", m_dec=1); declareProperty("SelectBQuarks",m_selectBQuarks=true); @@ -105,7 +104,7 @@ StatusCode Pythia8B_i::genInitialize() { ATH_MSG_INFO("genInitialize() from Pythia8B_i"); if (m_doSuppressSmallPT) { m_SuppressSmallPT = new Pythia8::SuppressSmallPT(m_pt0timesMPI,m_numberAlphaS,m_sameAlphaSAsMPI); - Pythia8_i::m_pythia.setUserHooksPtr(m_SuppressSmallPT); + Pythia8_i::m_pythia->setUserHooksPtr(m_SuppressSmallPT); } // Call the base class genInitialize() @@ -153,7 +152,7 @@ StatusCode Pythia8B_i::callGenerator(){ return StatusCode::SUCCESS; } - if(m_useRndmGenSvc && Pythia8B_i::p_AtRndmGenSvc){ + if(useRndmGenSvc() && Pythia8B_i::p_AtRndmGenSvc){ // Save the random number seeds in the event CLHEP::HepRandomEngine* engine = Pythia8B_i::p_AtRndmGenSvc->GetEngine(Pythia8_i::pythia_stream); const long* s = engine->getSeeds(); @@ -163,7 +162,7 @@ StatusCode Pythia8B_i::callGenerator(){ } // Generator. Shorthand for event. - Pythia8::Event& event = Pythia8_i::m_pythia.event; + Pythia8::Event& event = Pythia8_i::m_pythia->event; // Begin event loop. int iEvent(0); @@ -171,7 +170,7 @@ StatusCode Pythia8B_i::callGenerator(){ ++m_totalPythiaCalls; ATH_MSG_DEBUG("Throwing the dice...."); - if (!Pythia8_i::m_pythia.next()) continue; + if (!Pythia8_i::m_pythia->next()) continue; // Find b(c)/antib(c) quarks and enforce cuts as required int nbBeforeSelection(0); @@ -260,7 +259,7 @@ StatusCode Pythia8B_i::callGenerator(){ // Switch off decays of species of interest if requested (only for repeated decays) bool doRepeatedDecays(false); if (m_dec>1) doRepeatedDecays=true; if (doRepeatedDecays) { - for (unsigned int iC = 0; iC < m_bcodes.size(); ++iC) Pythia8_i::m_pythia.particleData.mayDecay( m_bcodes[iC], false); + for (unsigned int iC = 0; iC < m_bcodes.size(); ++iC) Pythia8_i::m_pythia->particleData.mayDecay( m_bcodes[iC], false); } // REPEATED HADRONIZATION LOOP @@ -275,7 +274,7 @@ StatusCode Pythia8B_i::callGenerator(){ // Repeated hadronization: restore saved event record. if (iRepeat > 0) event = eventCopy; // Repeated hadronization: do HadronLevel (repeatedly). - if (!Pythia8_i::m_pythia.forceHadronLevel()) continue; + if (!Pythia8_i::m_pythia->forceHadronLevel()) continue; repeatHadronizedEvents.push_back(event); // save the events for selections } @@ -283,12 +282,12 @@ StatusCode Pythia8B_i::callGenerator(){ std::vector<Pythia8::Event> savedEvents; if (doRepeatedDecays) { // switch decays back on - for (unsigned int iC = 0; iC < m_bcodes.size(); ++iC) Pythia8_i::m_pythia.particleData.mayDecay( m_bcodes[iC], true); + for (unsigned int iC = 0; iC < m_bcodes.size(); ++iC) Pythia8_i::m_pythia->particleData.mayDecay( m_bcodes[iC], true); // Loop over repeatedly hadronized events for (eventItr=repeatHadronizedEvents.begin(); eventItr!=repeatHadronizedEvents.end(); ++eventItr) { for (unsigned int iRepeat = 0; iRepeat < m_dec; ++iRepeat) { event = (*eventItr); - if (!Pythia8_i::m_pythia.moreDecays()) break; + if (!Pythia8_i::m_pythia->moreDecays()) break; savedEvents.push_back(event); } } @@ -363,11 +362,11 @@ StatusCode Pythia8B_i::fillEvt(HepMC::GenEvent *evt){ //m_pythiaToHepMC.put_pdf_info(evt, m_pythia, false); // set the randomseeds - if(m_useRndmGenSvc && Pythia8B_i::p_AtRndmGenSvc) + if(useRndmGenSvc() && Pythia8B_i::p_AtRndmGenSvc) evt->set_random_states(m_seeds); // set the event weight - evt->weights().push_back(m_pythia.info.weight()); + evt->weights().push_back(m_pythia->info.weight()); // Units correction #ifdef HEPMC_HAS_UNITS @@ -397,9 +396,9 @@ StatusCode Pythia8B_i::genFinalize(){ ATH_MSG_INFO(">>> Pythia8B_i from genFinalize"); - Pythia8_i::m_pythia.stat(); + Pythia8_i::m_pythia->stat(); - Pythia8::Info info = Pythia8_i::m_pythia.info; + Pythia8::Info info = Pythia8_i::m_pythia->info; double xs = info.sigmaGen();// in mb xs *= 1000. * 1000.;//convert to nb