#include <ExhumeHadronizer.h>
Public Member Functions | |
const char * | classname () const |
bool | decay () |
bool | declareSpecialSettings (const std::vector< std::string >) |
bool | declareStableParticles (const std::vector< int >) |
ExhumeHadronizer (edm::ParameterSet const &ps) | |
void | finalizeEvent () |
bool | generatePartonsAndHadronize () |
bool | hadronize () |
bool | initializeForExternalPartons () |
bool | initializeForInternalPartons () |
bool | residualDecay () |
void | statistics () |
~ExhumeHadronizer () | |
Private Attributes | |
double | comEnergy_ |
bool | convertToPDG_ |
Exhume::Event * | exhumeEvent_ |
Exhume::CrossSection * | exhumeProcess_ |
bool | hepMCVerbosity_ |
unsigned int | maxEventsToPrint_ |
edm::ParameterSet | myPSet_ |
Pythia6Service * | pythia6Service_ |
unsigned int | pythiaListVerbosity_ |
CLHEP::HepRandomEngine * | randomEngine_ |
Definition at line 40 of file ExhumeHadronizer.h.
gen::ExhumeHadronizer::ExhumeHadronizer | ( | edm::ParameterSet const & | ps | ) |
Definition at line 75 of file ExhumeHadronizer.cc.
References convertToPDG_, edm::ParameterSet::exists(), and edm::ParameterSet::getParameter().
: BaseHadronizer(pset), pythia6Service_(new Pythia6Service(pset)), randomEngine_(&getEngineReference()), comEnergy_(pset.getParameter<double>("comEnergy")), myPSet_(pset), hepMCVerbosity_(pset.getUntrackedParameter<bool>("pythiaHepMCVerbosity",false)), maxEventsToPrint_(pset.getUntrackedParameter<int>("maxEventsToPrint", 0)), pythiaListVerbosity_(pset.getUntrackedParameter<int>("pythiaPylistVerbosity", 0)) { convertToPDG_ = false; if ( pset.exists( "doPDGConvert" ) ) { convertToPDG_ = pset.getParameter<bool>("doPDGConvert"); } //pythia6Hadronizer_ = new Pythia6Hadronizer(pset); }
gen::ExhumeHadronizer::~ExhumeHadronizer | ( | ) |
Definition at line 95 of file ExhumeHadronizer.cc.
References exhumeEvent_, exhumeProcess_, and pythia6Service_.
{ //delete pythia6Hadronizer_; delete pythia6Service_; delete exhumeEvent_; delete exhumeProcess_; }
const char * gen::ExhumeHadronizer::classname | ( | ) | const |
Definition at line 277 of file ExhumeHadronizer.cc.
{ return "gen::ExhumeHadronizer"; }
bool gen::ExhumeHadronizer::decay | ( | ) |
Definition at line 168 of file ExhumeHadronizer.cc.
{ return true; }
bool gen::ExhumeHadronizer::declareSpecialSettings | ( | const std::vector< std::string > | ) |
Definition at line 249 of file ExhumeHadronizer.cc.
{ return true; }
bool gen::ExhumeHadronizer::declareStableParticles | ( | const std::vector< int > | pdg | ) |
Definition at line 232 of file ExhumeHadronizer.cc.
References gen::call_pygive(), gather_cfg::cout, i, and pycomp.
void gen::ExhumeHadronizer::finalizeEvent | ( | ) |
Definition at line 102 of file ExhumeHadronizer.cc.
References gen::call_pylist(), convertToPDG_, gather_cfg::cout, gen::BaseHadronizer::event(), hepMCVerbosity_, maxEventsToPrint_, pyint1, pypars, and pythiaListVerbosity_.
{ //pythia6Hadronizer_->finalizeEvent(); event()->set_signal_process_id( pypars.msti[0] ); event()->set_event_scale( pypars.pari[16] ); HepMC::PdfInfo pdf; pdf.set_id1( pyint1.mint[14] == 21 ? 0 : pyint1.mint[14] ); pdf.set_id2( pyint1.mint[15] == 21 ? 0 : pyint1.mint[15] ); pdf.set_x1( pyint1.vint[40] ); pdf.set_x2( pyint1.vint[41] ); pdf.set_pdf1( pyint1.vint[38] / pyint1.vint[40] ); pdf.set_pdf2( pyint1.vint[39] / pyint1.vint[41] ); pdf.set_scalePDF( pyint1.vint[50] ); event()->set_pdf_info( pdf ) ; event()->weights().push_back( pyint1.vint[96] ); // convert particle IDs Py6->PDG, if requested if(convertToPDG_) { for ( HepMC::GenEvent::particle_iterator part = event()->particles_begin(); part != event()->particles_end(); ++part) { (*part)->set_pdg_id(HepPID::translatePythiatoPDT((*part)->pdg_id())); } } // service printouts, if requested // if (maxEventsToPrint_ > 0) { --maxEventsToPrint_; if (pythiaListVerbosity_) call_pylist(pythiaListVerbosity_); if (hepMCVerbosity_) { std::cout << "Event process = " << pypars.msti[0] << std::endl << "----------------------" << std::endl; event()->print(); } } return; }
bool gen::ExhumeHadronizer::generatePartonsAndHadronize | ( | ) |
Definition at line 147 of file ExhumeHadronizer.cc.
References conv, gen::BaseHadronizer::event(), exhumeEvent_, exhumeProcess_, Exhume::Event::Generate(), gen::FortranCallback::getInstance(), Exhume::CrossSection::Hadronise(), pythia6Service_, and gen::FortranCallback::resetIterationsPerEvent().
{ Pythia6Service::InstanceWrapper guard(pythia6Service_); FortranCallback::getInstance()->resetIterationsPerEvent(); // generate event exhumeEvent_->Generate(); exhumeProcess_->Hadronise(); event().reset( conv.read_next_event() ); return true; }
bool gen::ExhumeHadronizer::hadronize | ( | ) |
Definition at line 163 of file ExhumeHadronizer.cc.
{ return false; }
bool gen::ExhumeHadronizer::initializeForExternalPartons | ( | ) |
Definition at line 178 of file ExhumeHadronizer.cc.
{ return false; }
bool gen::ExhumeHadronizer::initializeForInternalPartons | ( | ) |
Definition at line 183 of file ExhumeHadronizer.cc.
References edm::errors::Configuration, Exception, exhumeEvent_, exhumeProcess_, edm::ParameterSet::getParameter(), myPSet_, pypars, pythia6Service_, randomEngine_, gen::Pythia6Service::setGeneralParams(), Exhume::Event::SetMassRange(), and Exhume::Event::SetParameterSpace().
{ Pythia6Service::InstanceWrapper guard(pythia6Service_); pythia6Service_->setGeneralParams(); //Exhume Initialization edm::ParameterSet processPSet = myPSet_.getParameter<edm::ParameterSet>("ExhumeProcess"); std::string processType = processPSet.getParameter<std::string>("ProcessType"); int sigID = -1; if(processType == "Higgs"){ exhumeProcess_ = new Exhume::Higgs(myPSet_); int higgsDecay = processPSet.getParameter<int>("HiggsDecay"); (static_cast<Exhume::Higgs*>(exhumeProcess_))->SetHiggsDecay(higgsDecay); sigID = 100 + higgsDecay; } else if(processType == "QQ"){ exhumeProcess_ = new Exhume::QQ(myPSet_); int quarkType = processPSet.getParameter<int>("QuarkType"); double thetaMin = processPSet.getParameter<double>("ThetaMin"); ((Exhume::QQ*)exhumeProcess_)->SetQuarkType(quarkType); (static_cast<Exhume::QQ*>(exhumeProcess_))->SetThetaMin(thetaMin); sigID = 200 + quarkType; } else if(processType == "GG"){ exhumeProcess_ = new Exhume::GG(myPSet_); double thetaMin = processPSet.getParameter<double>("ThetaMin"); (static_cast<Exhume::GG*>(exhumeProcess_))->SetThetaMin(thetaMin); sigID = 300; } else if(processType == "DiPhoton"){ exhumeProcess_ = new Exhume::DiPhoton(myPSet_); double thetaMin = processPSet.getParameter<double>("ThetaMin"); (static_cast<Exhume::DiPhoton*>(exhumeProcess_))->SetThetaMin(thetaMin); sigID = 400; } else{ sigID = -1; throw edm::Exception(edm::errors::Configuration,"ExhumeError") <<" No valid Exhume Process"; } pypars.msti[0] = sigID; //exhumeEvent_ = new Exhume::Event(*exhumeProcess_,&getEngineReference()); exhumeEvent_ = new Exhume::Event(*exhumeProcess_,randomEngine_); double massRangeLow = processPSet.getParameter<double>("MassRangeLow"); double massRangeHigh = processPSet.getParameter<double>("MassRangeHigh"); exhumeEvent_->SetMassRange(massRangeLow,massRangeHigh); exhumeEvent_->SetParameterSpace(); return true; }
bool gen::ExhumeHadronizer::residualDecay | ( | ) |
Definition at line 173 of file ExhumeHadronizer.cc.
{ return true; }
void gen::ExhumeHadronizer::statistics | ( | ) |
Definition at line 254 of file ExhumeHadronizer.cc.
References Exhume::Event::CrossSectionCalculation(), exhumeEvent_, exhumeProcess_, Exhume::Event::GetEfficiency(), Exhume::CrossSection::GetName(), mergeVDriftHistosByStation::name, gen::BaseHadronizer::runInfo(), and GenRunInfoProduct::setInternalXSec().
{ std::ostringstream footer_str; double cs = exhumeEvent_->CrossSectionCalculation(); double eff = exhumeEvent_->GetEfficiency(); std::string name = exhumeProcess_->GetName(); footer_str << "\n" <<" You have just been ExHuMEd." << "\n" << "\n"; footer_str << " The cross section for process " << name << " is " << cs << " fb" << "\n" << "\n"; footer_str << " The efficiency of event generation was " << eff << "%" << "\n" << "\n"; edm::LogInfo("") << footer_str.str(); if ( !runInfo().internalXSec() ) { runInfo().setInternalXSec( cs ); } return; }
double gen::ExhumeHadronizer::comEnergy_ [private] |
Definition at line 68 of file ExhumeHadronizer.h.
bool gen::ExhumeHadronizer::convertToPDG_ [private] |
Definition at line 78 of file ExhumeHadronizer.h.
Referenced by ExhumeHadronizer(), and finalizeEvent().
Exhume::Event* gen::ExhumeHadronizer::exhumeEvent_ [private] |
Definition at line 81 of file ExhumeHadronizer.h.
Referenced by generatePartonsAndHadronize(), initializeForInternalPartons(), statistics(), and ~ExhumeHadronizer().
Definition at line 82 of file ExhumeHadronizer.h.
Referenced by generatePartonsAndHadronize(), initializeForInternalPartons(), statistics(), and ~ExhumeHadronizer().
bool gen::ExhumeHadronizer::hepMCVerbosity_ [private] |
Definition at line 74 of file ExhumeHadronizer.h.
Referenced by finalizeEvent().
unsigned int gen::ExhumeHadronizer::maxEventsToPrint_ [private] |
Definition at line 75 of file ExhumeHadronizer.h.
Referenced by finalizeEvent().
Definition at line 72 of file ExhumeHadronizer.h.
Referenced by initializeForInternalPartons().
Definition at line 64 of file ExhumeHadronizer.h.
Referenced by generatePartonsAndHadronize(), initializeForInternalPartons(), and ~ExhumeHadronizer().
unsigned int gen::ExhumeHadronizer::pythiaListVerbosity_ [private] |
Definition at line 76 of file ExhumeHadronizer.h.
Referenced by finalizeEvent().
CLHEP::HepRandomEngine* gen::ExhumeHadronizer::randomEngine_ [private] |
Definition at line 66 of file ExhumeHadronizer.h.
Referenced by initializeForInternalPartons().