#include <Py8InterfaceBase.h>
Public Member Functions | |
virtual const char * | classname () const =0 |
bool | decay () |
bool | declareSpecialSettings (const std::vector< std::string > &) |
bool | declareStableParticles (const std::vector< int > &) |
virtual void | finalizeEvent ()=0 |
virtual bool | generatePartonsAndHadronize ()=0 |
virtual bool | initializeForInternalPartons ()=0 |
Py8InterfaceBase (edm::ParameterSet const &ps) | |
bool | readSettings (int) |
virtual void | statistics () |
~Py8InterfaceBase () | |
Protected Attributes | |
std::auto_ptr< Pythia8::Pythia > | fDecayer |
std::auto_ptr< Pythia8::Pythia > | fMasterGen |
ParameterCollector | fParameters |
unsigned int | maxEventsToPrint |
bool | pythiaHepMCVerbosity |
unsigned int | pythiaPylistVerbosity |
HepMC::I_Pythia8 | toHepMC |
Definition at line 14 of file Py8InterfaceBase.h.
gen::Py8InterfaceBase::Py8InterfaceBase | ( | edm::ParameterSet const & | ps | ) |
Definition at line 11 of file Py8InterfaceBase.cc.
References gen::getEngineReference(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), step1_ZMM_7Tev::maxEventsToPrint, step1_ZMM_7Tev::pythiaHepMCVerbosity, step1_ZMM_7Tev::pythiaPylistVerbosity, and randomEngine.
{ randomEngine = &getEngineReference(); fMasterGen.reset(new Pythia); fDecayer.reset(new Pythia); fMasterGen->readString("Next:numberShowEvent = 0"); fDecayer->readString("Next:numberShowEvent = 0"); // RandomP8* RP8 = new RandomP8(); fMasterGen->setRndmEnginePtr( new RandomP8() ); fDecayer->setRndmEnginePtr( new RandomP8() ); fParameters = ps.getParameter<edm::ParameterSet>("PythiaParameters"); pythiaPylistVerbosity = ps.getUntrackedParameter<int>("pythiaPylistVerbosity", 0); pythiaHepMCVerbosity = ps.getUntrackedParameter<bool>("pythiaHepMCVerbosity", false); maxEventsToPrint = ps.getUntrackedParameter<int>("maxEventsToPrint", 0); }
gen::Py8InterfaceBase::~Py8InterfaceBase | ( | ) | [inline] |
Definition at line 19 of file Py8InterfaceBase.h.
{}
virtual const char* gen::Py8InterfaceBase::classname | ( | ) | const [pure virtual] |
Implemented in gen::Py8EGun, gen::Py8JetGun, gen::Py8PtGun, and Pythia8Hadronizer.
bool gen::Py8InterfaceBase::decay | ( | ) | [inline] |
Definition at line 22 of file Py8InterfaceBase.h.
{ return true; } // NOT used - let's call it "design imperfection"
bool gen::Py8InterfaceBase::declareSpecialSettings | ( | const std::vector< std::string > & | settings | ) |
Definition at line 79 of file Py8InterfaceBase.cc.
References spr::find().
{ for ( unsigned int iss=0; iss<settings.size(); iss++ ) { if ( settings[iss].find("QED-brem-off") == std::string::npos ) continue; fMasterGen->readString( "TimeShower:QEDshowerByL=off" ); } return true; }
bool gen::Py8InterfaceBase::declareStableParticles | ( | const std::vector< int > & | pdgIds | ) |
Definition at line 54 of file Py8InterfaceBase.cc.
References i.
{ for ( size_t i=0; i<pdgIds.size(); i++ ) { // FIXME: need to double check if PID's are the same in Py6 & Py8, // because the HepPDT translation tool is actually for **Py6** // // well, actually it looks like Py8 operates in PDT id's rather than Py6's // // int PyID = HepPID::translatePDTtoPythia( pdgIds[i] ); int PyID = pdgIds[i]; std::ostringstream pyCard ; pyCard << PyID <<":mayDecay=false"; fMasterGen->readString( pyCard.str() ); // alternative: // set the 2nd input argument warn=false // - this way Py8 will NOT print warnings about unknown particle code(s) // fMasterPtr->readString( pyCard.str(), false ) } return true; }
virtual void gen::Py8InterfaceBase::finalizeEvent | ( | ) | [pure virtual] |
Implemented in gen::Py8GunBase, and Pythia8Hadronizer.
virtual bool gen::Py8InterfaceBase::generatePartonsAndHadronize | ( | ) | [pure virtual] |
Implemented in gen::Py8EGun, gen::Py8JetGun, gen::Py8PtGun, and Pythia8Hadronizer.
virtual bool gen::Py8InterfaceBase::initializeForInternalPartons | ( | ) | [pure virtual] |
Implemented in gen::Py8GunBase, and Pythia8Hadronizer.
bool gen::Py8InterfaceBase::readSettings | ( | int | ) |
Definition at line 34 of file Py8InterfaceBase.cc.
References geometryCSVtoXML::line.
{ for ( ParameterCollector::const_iterator line = fParameters.begin(); line != fParameters.end(); ++line ) { if (line->find("Random:") != std::string::npos) throw cms::Exception("PythiaError") << "Attempted to set random number " "using Pythia commands. Please use " "the RandomNumberGeneratorService." << std::endl; if (!fMasterGen->readString(*line)) throw cms::Exception("PythiaError") << "Pythia 8 did not accept \"" << *line << "\"." << std::endl; } return true; }
void gen::Py8InterfaceBase::statistics | ( | ) | [virtual] |
Reimplemented in gen::Py8GunBase, and Pythia8Hadronizer.
Definition at line 91 of file Py8InterfaceBase.cc.
{ fMasterGen->statistics(); return; }
std::auto_ptr<Pythia8::Pythia> gen::Py8InterfaceBase::fDecayer [protected] |
std::auto_ptr<Pythia8::Pythia> gen::Py8InterfaceBase::fMasterGen [protected] |
Definition at line 33 of file Py8InterfaceBase.h.
Referenced by Pythia8Hadronizer::finalizeEvent(), gen::Py8GunBase::finalizeEvent(), gen::Py8JetGun::generatePartonsAndHadronize(), Pythia8Hadronizer::generatePartonsAndHadronize(), gen::Py8EGun::generatePartonsAndHadronize(), gen::Py8PtGun::generatePartonsAndHadronize(), Pythia8Hadronizer::hadronize(), Pythia8Hadronizer::initializeForExternalPartons(), Pythia8Hadronizer::initializeForInternalPartons(), gen::Py8GunBase::initializeForInternalPartons(), Pythia8Hadronizer::Pythia8Hadronizer(), gen::Py8GunBase::residualDecay(), Pythia8Hadronizer::residualDecay(), Pythia8Hadronizer::statistics(), and gen::Py8GunBase::statistics().
ParameterCollector gen::Py8InterfaceBase::fParameters [protected] |
Definition at line 36 of file Py8InterfaceBase.h.
Referenced by Pythia8Hadronizer::Pythia8Hadronizer().
unsigned int gen::Py8InterfaceBase::maxEventsToPrint [protected] |
Definition at line 40 of file Py8InterfaceBase.h.
Referenced by Pythia8Hadronizer::finalizeEvent(), and gen::Py8GunBase::finalizeEvent().
bool gen::Py8InterfaceBase::pythiaHepMCVerbosity [protected] |
Definition at line 39 of file Py8InterfaceBase.h.
Referenced by Pythia8Hadronizer::finalizeEvent(), and gen::Py8GunBase::finalizeEvent().
unsigned int gen::Py8InterfaceBase::pythiaPylistVerbosity [protected] |
Definition at line 38 of file Py8InterfaceBase.h.
Referenced by Pythia8Hadronizer::finalizeEvent(), gen::Py8GunBase::finalizeEvent(), Pythia8Hadronizer::initializeForExternalPartons(), and Pythia8Hadronizer::initializeForInternalPartons().
HepMC::I_Pythia8 gen::Py8InterfaceBase::toHepMC [protected] |