test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
Pythia8Hadronizer Class Reference
Inheritance diagram for Pythia8Hadronizer:
gen::Py8InterfaceBase gen::BaseHadronizer

Public Member Functions

const char * classname () const override
 
void finalizeEvent () override
 
bool generatePartonsAndHadronize () override
 
GenLumiInfoHeadergetGenLumiInfoHeader () const override
 
bool hadronize ()
 
bool initializeForExternalPartons ()
 
bool initializeForInternalPartons () override
 
 Pythia8Hadronizer (const edm::ParameterSet &params)
 
virtual bool residualDecay ()
 
void statistics () override
 
 ~Pythia8Hadronizer ()
 
- Public Member Functions inherited from gen::Py8InterfaceBase
bool decay ()
 
bool declareSpecialSettings (const std::vector< std::string > &)
 
bool declareStableParticles (const std::vector< int > &)
 
void p8SetRandomEngine (CLHEP::HepRandomEngine *v)
 
 Py8InterfaceBase (edm::ParameterSet const &ps)
 
P8RndmEnginerandomEngine ()
 
bool readSettings (int)
 
 ~Py8InterfaceBase ()
 
- Public Member Functions inherited from gen::BaseHadronizer
 BaseHadronizer (edm::ParameterSet const &ps)
 
void cleanLHE ()
 
void generateLHE (edm::LuminosityBlock const &lumi, CLHEP::HepRandomEngine *rengine)
 
edm::EventgetEDMEvent () const
 
HepMC::GenEvent * getGenEvent ()
 
GenEventInfoProductgetGenEventInfo ()
 
GenRunInfoProductgetGenRunInfo ()
 
const boost::shared_ptr
< lhef::LHERunInfo > & 
getLHERunInfo () const
 
const std::string & gridpackPath () const
 
int randomIndex () const
 
const std::string & randomInitConfigDescription () const
 
void randomizeIndex (edm::LuminosityBlock const &lumi, CLHEP::HepRandomEngine *rengine)
 
void resetEvent (HepMC::GenEvent *event)
 
void resetEventInfo (GenEventInfoProduct *eventInfo)
 
virtual bool select (HepMC::GenEvent *) const
 
void setEDMEvent (edm::Event &event)
 
void setLHEEvent (lhef::LHEEvent *event)
 
void setLHERunInfo (lhef::LHERunInfo *runInfo)
 
void setRandomEngine (CLHEP::HepRandomEngine *v)
 
std::vector< std::string > const & sharedResources () const
 
 ~BaseHadronizer ()
 

Private Types

enum  { PP, PPbar, ElectronPositron }
 

Private Member Functions

virtual void doSetRandomEngine (CLHEP::HepRandomEngine *v) override
 
virtual std::vector
< std::string > const & 
doSharedResources () const override
 

Private Attributes

double comEnergy
 Center-of-Mass energy. More...
 
vector< float > DJR
 
int EV1_emittedMode
 
int EV1_maxVetoCount
 
bool EV1_MPIvetoOn
 
int EV1_nFinal
 
int EV1_pTdefMode
 
int EV1_pTempMode
 
int EV1_pThardMode
 
bool EV1_vetoOn
 
double fBeam1PZ
 
double fBeam2PZ
 
std::auto_ptr< PowhegHooks > fEmissionVetoHook
 
std::auto_ptr< EmissionVetoHook1fEmissionVetoHook1
 
int fInitialState
 
std::auto_ptr< JetMatchingHookfJetMatchingHook
 
std::auto_ptr
< Pythia8::JetMatchingMadgraph > 
fJetMatchingPy8InternalHook
 
std::auto_ptr
< Pythia8::amcnlo_unitarised_interface > 
fMergingHook
 
std::auto_ptr< MultiUserHookfMultiUserHook
 
std::auto_ptr< PowhegResHookfPowhegResHook
 
std::auto_ptr< PTFilterHookfPTFilterHook
 
std::auto_ptr
< ResonanceDecayFilterHook
fResonanceDecayFilterHook
 
std::auto_ptr< UserHooks > fReweightPtHatRapUserHook
 
std::auto_ptr< UserHooks > fReweightRapUserHook
 
std::auto_ptr< UserHooks > fReweightUserHook
 
std::auto_ptr< LHAupLesHoucheslhaUP
 
std::string LHEInputFileName
 
int nFSRveto
 
int nISRveto
 
int nME
 
int nMEFiltered
 

Static Private Attributes

static const std::vector
< std::string > 
p8SharedResources = { edm::SharedResourceNames::kPythia8 }
 

Additional Inherited Members

- Protected Member Functions inherited from gen::BaseHadronizer
std::auto_ptr< HepMC::GenEvent > & event ()
 
std::auto_ptr
< GenEventInfoProduct > & 
eventInfo ()
 
lhef::LHEEventlheEvent ()
 
lhef::LHERunInfolheRunInfo ()
 
GenRunInfoProductrunInfo ()
 
- Protected Attributes inherited from gen::Py8InterfaceBase
HepMC::IO_AsciiParticles * ascii_io
 
std::auto_ptr< EvtGenDecays > evtgenDecays
 
std::string evtgenDecFile
 
std::string evtgenPdlFile
 
std::vector< std::string > evtgenUserFiles
 
std::auto_ptr< Pythia8::Pythia > fDecayer
 
std::auto_ptr< Pythia8::Pythia > fMasterGen
 
edm::ParameterSet fParameters
 
unsigned int maxEventsToPrint
 
bool pythiaHepMCVerbosity
 
bool pythiaHepMCVerbosityParticles
 
unsigned int pythiaPylistVerbosity
 
std::string slhafile_
 
HepMC::Pythia8ToHepMC toHepMC
 
bool useEvtGen
 
- Protected Attributes inherited from gen::BaseHadronizer
std::string lheFile_
 
int randomIndex_
 

Detailed Description

Definition at line 71 of file Pythia8Hadronizer.cc.

Member Enumeration Documentation

anonymous enum
private

Constructor & Destructor Documentation

Pythia8Hadronizer::Pythia8Hadronizer ( const edm::ParameterSet params)

Definition at line 162 of file Pythia8Hadronizer.cc.

References edm::errors::Configuration, ElectronPositron, EV1_emittedMode, EV1_maxVetoCount, EV1_MPIvetoOn, EV1_nFinal, EV1_pTdefMode, EV1_pTempMode, EV1_pThardMode, EV1_vetoOn, Exception, edm::ParameterSet::exists(), fEmissionVetoHook1, fInitialState, fJetMatchingHook, gen::Py8InterfaceBase::fMasterGen, fReweightPtHatRapUserHook, fReweightRapUserHook, fReweightUserHook, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), PP, PPbar, and AlCaHLTBitMon_QueryRunRegistry::string.

162  :
163  Py8InterfaceBase(params),
164  comEnergy(params.getParameter<double>("comEnergy")),
165  LHEInputFileName(params.getUntrackedParameter<std::string>("LHEInputFileName","")),
166  fInitialState(PP),
167  nME(-1), nMEFiltered(-1), nISRveto(0), nFSRveto(0)
168 {
169 
170  // J.Y.: the following 3 parameters are hacked "for a reason"
171  //
172  if ( params.exists( "PPbarInitialState" ) )
173  {
174  if ( fInitialState == PP )
175  {
177  edm::LogImportant("GeneratorInterface|Pythia8Interface")
178  << "Pythia8 will be initialized for PROTON-ANTIPROTON INITIAL STATE. "
179  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state.";
180  }
181  else
182  {
183  // probably need to throw on attempt to override ?
184  }
185  }
186  else if ( params.exists( "ElectronPositronInitialState" ) )
187  {
188  if ( fInitialState == PP )
189  {
191  edm::LogInfo("GeneratorInterface|Pythia8Interface")
192  << "Pythia8 will be initialized for ELECTRON-POSITRON INITIAL STATE. "
193  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state.";
194  }
195  else
196  {
197  // probably need to throw on attempt to override ?
198  }
199  }
200  else if ( params.exists( "ElectronProtonInitialState" ) || params.exists( "PositronProtonInitialState" ) )
201  {
202  // throw on unknown initial state !
203  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
204  <<" UNKNOWN INITIAL STATE. \n The allowed initial states are: PP, PPbar, ElectronPositron \n";
205  }
206 
207  // Reweight user hook
208  //
209  if( params.exists( "reweightGen" ) )
211  if( params.exists( "reweightGenRap" ) )
212  {
213  edm::LogInfo("Pythia8Interface") << "Start setup for reweightGenRap";
214  edm::ParameterSet rgrParams =
215  params.getParameter<edm::ParameterSet>("reweightGenRap");
216  fReweightRapUserHook.reset(
217  new RapReweightUserHook(rgrParams.getParameter<std::string>("yLabSigmaFunc"),
218  rgrParams.getParameter<double>("yLabPower"),
219  rgrParams.getParameter<std::string>("yCMSigmaFunc"),
220  rgrParams.getParameter<double>("yCMPower"),
221  rgrParams.getParameter<double>("pTHatMin"),
222  rgrParams.getParameter<double>("pTHatMax"))
223  );
224  edm::LogInfo("Pythia8Interface") << "End setup for reweightGenRap";
225  }
226  if( params.exists( "reweightGenPtHatRap" ) )
227  {
228  edm::LogInfo("Pythia8Interface") << "Start setup for reweightGenPtHatRap";
229  edm::ParameterSet rgrParams =
230  params.getParameter<edm::ParameterSet>("reweightGenPtHatRap");
232  new PtHatRapReweightUserHook(rgrParams.getParameter<std::string>("yLabSigmaFunc"),
233  rgrParams.getParameter<double>("yLabPower"),
234  rgrParams.getParameter<std::string>("yCMSigmaFunc"),
235  rgrParams.getParameter<double>("yCMPower"),
236  rgrParams.getParameter<double>("pTHatMin"),
237  rgrParams.getParameter<double>("pTHatMax"))
238  );
239  edm::LogInfo("Pythia8Interface") << "End setup for reweightGenPtHatRap";
240  }
241 
242  if( params.exists( "useUserHook" ) )
243  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
244  <<" Obsolete parameter: useUserHook \n Please use the actual one instead \n";
245 
246  // PS matching prototype
247  //
248  if ( params.exists("jetMatching") )
249  {
250  edm::ParameterSet jmParams =
251  params.getUntrackedParameter<edm::ParameterSet>("jetMatching");
252  std::string scheme = jmParams.getParameter<std::string>("scheme");
253  if ( scheme == "Madgraph" || scheme == "MadgraphFastJet" )
254  {
255  fJetMatchingHook.reset(new JetMatchingHook( jmParams, &fMasterGen->info ));
256  }
257  }
258 
259  // Pythia8Interface emission veto
260  //
261  if ( params.exists("emissionVeto1") )
262  {
263  EV1_nFinal = -1;
264  if(params.exists("EV1_nFinal")) EV1_nFinal = params.getParameter<int>("EV1_nFinal");
265  EV1_vetoOn = true;
266  if(params.exists("EV1_vetoOn")) EV1_vetoOn = params.getParameter<bool>("EV1_vetoOn");
267  EV1_maxVetoCount = 10;
268  if(params.exists("EV1_maxVetoCount")) EV1_maxVetoCount = params.getParameter<int>("EV1_maxVetoCount");
269  EV1_pThardMode = 1;
270  if(params.exists("EV1_pThardMode")) EV1_pThardMode = params.getParameter<int>("EV1_pThardMode");
271  EV1_pTempMode = 0;
272  if(params.exists("EV1_pTempMode")) EV1_pTempMode = params.getParameter<int>("EV1_pTempMode");
273  if(EV1_pTempMode > 2 || EV1_pTempMode < 0)
274  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
275  <<" Wrong value for EV1_pTempMode code\n";
276  EV1_emittedMode = 0;
277  if(params.exists("EV1_emittedMode")) EV1_emittedMode = params.getParameter<int>("EV1_emittedMode");
278  EV1_pTdefMode = 1;
279  if(params.exists("EV1_pTdefMode")) EV1_pTdefMode = params.getParameter<int>("EV1_pTdefMode");
280  EV1_MPIvetoOn = false;
281  if(params.exists("EV1_MPIvetoOn")) EV1_MPIvetoOn = params.getParameter<bool>("EV1_MPIvetoOn");
285  }
286 
287 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
double comEnergy
Center-of-Mass energy.
std::auto_ptr< Pythia8::Pythia > fMasterGen
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::string LHEInputFileName
Py8InterfaceBase(edm::ParameterSet const &ps)
std::auto_ptr< JetMatchingHook > fJetMatchingHook
std::auto_ptr< UserHooks > fReweightPtHatRapUserHook
std::auto_ptr< UserHooks > fReweightUserHook
std::auto_ptr< UserHooks > fReweightRapUserHook
std::auto_ptr< EmissionVetoHook1 > fEmissionVetoHook1
Pythia8Hadronizer::~Pythia8Hadronizer ( )

Definition at line 290 of file Pythia8Hadronizer.cc.

291 {
292 
293 }

Member Function Documentation

const char* Pythia8Hadronizer::classname ( ) const
inlineoverridevirtual

Implements gen::Py8InterfaceBase.

Definition at line 90 of file Pythia8Hadronizer.cc.

90 { return "Pythia8Hadronizer"; }
virtual void Pythia8Hadronizer::doSetRandomEngine ( CLHEP::HepRandomEngine *  v)
inlineoverrideprivatevirtual

Reimplemented from gen::BaseHadronizer.

Definition at line 96 of file Pythia8Hadronizer.cc.

96 { p8SetRandomEngine(v); }
void p8SetRandomEngine(CLHEP::HepRandomEngine *v)
virtual std::vector<std::string> const& Pythia8Hadronizer::doSharedResources ( ) const
inlineoverrideprivatevirtual

Reimplemented from gen::BaseHadronizer.

Definition at line 97 of file Pythia8Hadronizer.cc.

97 { return p8SharedResources; }
static const std::vector< std::string > p8SharedResources
void Pythia8Hadronizer::finalizeEvent ( )
overridevirtual

Implements gen::Py8InterfaceBase.

Definition at line 800 of file Pythia8Hadronizer.cc.

References gen::Py8InterfaceBase::ascii_io, gather_cfg::cout, DJR, gen::BaseHadronizer::event(), gen::BaseHadronizer::eventInfo(), gen::Py8InterfaceBase::fMasterGen, gen::BaseHadronizer::lheEvent(), gen::Py8InterfaceBase::maxEventsToPrint, nME, nMEFiltered, gen::Py8InterfaceBase::pythiaHepMCVerbosity, gen::Py8InterfaceBase::pythiaHepMCVerbosityParticles, and gen::Py8InterfaceBase::pythiaPylistVerbosity.

801 {
802  bool lhe = lheEvent() != 0;
803 
804  // now create the GenEventInfo product from the GenEvent and fill
805  // the missing pieces
806  eventInfo().reset( new GenEventInfoProduct( event().get() ) );
807 
808  // in pythia pthat is used to subdivide samples into different bins
809  // in LHE mode the binning is done by the external ME generator
810  // which is likely not pthat, so only filling it for Py6 internal mode
811  if (!lhe) {
812  eventInfo()->setBinningValues(std::vector<double>(1, fMasterGen->info.pTHat()));
813  }
814 
815  eventInfo()->setDJR(DJR);
816  eventInfo()->setNMEPartons(nME);
817  eventInfo()->setNMEPartonsFiltered(nMEFiltered);
818 
819  //******** Verbosity ********
820 
821  if (maxEventsToPrint > 0 &&
825  if (pythiaPylistVerbosity) {
826  fMasterGen->info.list();
827  fMasterGen->event.list();
828  }
829 
830  if (pythiaHepMCVerbosity) {
831  std::cout << "Event process = "
832  << fMasterGen->info.code() << "\n"
833  << "----------------------" << std::endl;
834  event()->print();
835  }
837  std::cout << "Event process = "
838  << fMasterGen->info.code() << "\n"
839  << "----------------------" << std::endl;
840  ascii_io->write_event(event().get());
841  }
842  }
843 }
std::auto_ptr< Pythia8::Pythia > fMasterGen
HepMC::IO_AsciiParticles * ascii_io
std::auto_ptr< HepMC::GenEvent > & event()
lhef::LHEEvent * lheEvent()
unsigned int pythiaPylistVerbosity
std::auto_ptr< GenEventInfoProduct > & eventInfo()
unsigned int maxEventsToPrint
vector< float > DJR
tuple cout
Definition: gather_cfg.py:145
bool Pythia8Hadronizer::generatePartonsAndHadronize ( )
overridevirtual

Implements gen::Py8InterfaceBase.

Definition at line 603 of file Pythia8Hadronizer.cc.

References funct::abs(), DJR, gen::BaseHadronizer::event(), gen::Py8InterfaceBase::evtgenDecays, fEmissionVetoHook, fJetMatchingHook, fJetMatchingPy8InternalHook, gen::Py8InterfaceBase::fMasterGen, fMergingHook, i, relval_steps::key, gen::BaseHadronizer::lheEvent(), min(), nFSRveto, nISRveto, nME, nMEFiltered, and gen::Py8InterfaceBase::toHepMC.

604 {
605 
606  DJR.resize(0);
607  nME = -1;
608  nMEFiltered = -1;
609 
610  if ( fJetMatchingHook.get() )
611  {
612  fJetMatchingHook->resetMatchingStatus();
613  fJetMatchingHook->beforeHadronization( lheEvent() );
614  }
615 
616  if (!fMasterGen->next()) return false;
617 
618  double mergeweight = fMasterGen.get()->info.mergingWeightNLO();
619  if (fMergingHook.get()) {
620  mergeweight *= fMergingHook->getNormFactor();
621  }
622 
623  //protect against 0-weight from ckkw or similar
624  if (std::abs(mergeweight)==0.)
625  {
626  event().reset();
627  return false;
628  }
629 
630  if (fJetMatchingPy8InternalHook.get()) {
631  const std::vector<double> djrmatch = fJetMatchingPy8InternalHook->getDJR();
632  //cap size of djr vector to save storage space (keep only up to first 6 elements)
633  unsigned int ndjr = std::min(djrmatch.size(), std::vector<double>::size_type(6));
634  for (unsigned int idjr=0; idjr<ndjr; ++idjr) {
635  DJR.push_back(djrmatch[idjr]);
636  }
637 
638  nME=fJetMatchingPy8InternalHook->nMEpartons().first;
639  nMEFiltered=fJetMatchingPy8InternalHook->nMEpartons().second;
640  }
641 
642  if (evtgenDecays.get()) evtgenDecays->decay();
643 
644  event().reset(new HepMC::GenEvent);
645  bool py8hepmc = toHepMC.fill_next_event( *(fMasterGen.get()), event().get());
646 
647  if (!py8hepmc) {
648  return false;
649  }
650 
651  //add ckkw/umeps/unlops merging weight
652  if (mergeweight!=1.) {
653  event()->weights()[0] *= mergeweight;
654  }
655 
656  if (fEmissionVetoHook.get()) {
657  nISRveto += fEmissionVetoHook->getNISRveto();
658  nFSRveto += fEmissionVetoHook->getNFSRveto();
659  }
660 
661  //fill additional weights for systematic uncertainties
662  if (fMasterGen->info.initrwgt) {
663  for (const string &key : fMasterGen->info.initrwgt->weightsKeys) {
664  double wgt = (*fMasterGen->info.weights_detailed)[key];
665  event()->weights().push_back(wgt);
666  }
667  }
668 
669  // fill shower weights
670  // http://home.thep.lu.se/~torbjorn/pythia82html/Variations.html
671  if( fMasterGen->info.nWeights() > 1 ){
672  for(int i = 0; i < fMasterGen->info.nWeights(); ++i) {
673  double wgt = fMasterGen->info.weight(i);
674  event()->weights().push_back(wgt);
675  }
676  }
677 
678  return true;
679 
680 }
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< PowhegHooks > fEmissionVetoHook
std::auto_ptr< Pythia8::Pythia > fMasterGen
std::auto_ptr< EvtGenDecays > evtgenDecays
std::auto_ptr< JetMatchingHook > fJetMatchingHook
uint16_t size_type
std::auto_ptr< HepMC::GenEvent > & event()
lhef::LHEEvent * lheEvent()
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T min(T a, T b)
Definition: MathUtil.h:58
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
vector< float > DJR
HepMC::Pythia8ToHepMC toHepMC
std::auto_ptr< Pythia8::JetMatchingMadgraph > fJetMatchingPy8InternalHook
std::auto_ptr< Pythia8::amcnlo_unitarised_interface > fMergingHook
GenLumiInfoHeader * Pythia8Hadronizer::getGenLumiInfoHeader ( ) const
overridevirtual

Reimplemented from gen::BaseHadronizer.

Definition at line 845 of file Pythia8Hadronizer.cc.

References gen::Py8InterfaceBase::fMasterGen, i, relval_steps::key, GenLumiInfoHeader::lheHeaders(), AlCaHLTBitMon_QueryRunRegistry::string, and GenLumiInfoHeader::weightNames().

845  {
846  GenLumiInfoHeader *genLumiInfoHeader = BaseHadronizer::getGenLumiInfoHeader();
847 
848  //fill lhe headers
849  //*FIXME* initrwgt header is corrupt due to pythia bug
850  for (const std::string &key : fMasterGen->info.headerKeys()) {
851  genLumiInfoHeader->lheHeaders().emplace_back(key,fMasterGen->info.header(key));
852  }
853 
854  //check, if it is not only nominal weight
855  int weights_number = fMasterGen->info.nWeights();
856  if (fMasterGen->info.initrwgt) weights_number += fMasterGen->info.initrwgt->weightsKeys.size();
857  if(weights_number > 1){
858  genLumiInfoHeader->weightNames().reserve(weights_number + 1);
859  genLumiInfoHeader->weightNames().push_back("nominal");
860  }
861 
862  //fill weight names
863  if (fMasterGen->info.initrwgt) {
864  for (const std::string &key : fMasterGen->info.initrwgt->weightsKeys) {
865  std::string weightgroupname;
866  for (const auto &wgtgrp : fMasterGen->info.initrwgt->weightgroups) {
867  const auto &wgtgrpwgt = wgtgrp.second.weights.find(key);
868  if (wgtgrpwgt != wgtgrp.second.weights.end()) {
869  weightgroupname = wgtgrp.first;
870  }
871  }
872 
873  std::ostringstream weightname;
874  weightname << "LHE, id = " << key << ", ";
875  if (!weightgroupname.empty()) {
876  weightname << "group = " << weightgroupname << ", ";
877  }
878  weightname<< fMasterGen->info.initrwgt->weights[key].contents;
879  genLumiInfoHeader->weightNames().push_back(weightname.str());
880  }
881  }
882 
883  //fill shower labels
884  // http://home.thep.lu.se/~torbjorn/pythia82html/Variations.html
885  // http://home.thep.lu.se/~torbjorn/doxygen/classPythia8_1_1Info.html
886  if( fMasterGen->info.nWeights() > 1 ){
887  for(int i = 0; i < fMasterGen->info.nWeights(); ++i) {
888  genLumiInfoHeader->weightNames().push_back( fMasterGen->info.weightLabel(i) );
889  }
890  }
891 
892  return genLumiInfoHeader;
893 }
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< Pythia8::Pythia > fMasterGen
const std::vector< std::string > & weightNames() const
const std::vector< std::pair< std::string, std::string > > & lheHeaders() const
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
bool Pythia8Hadronizer::hadronize ( )

Definition at line 683 of file Pythia8Hadronizer.cc.

References funct::abs(), lhef::LHEEvent::count(), DJR, gen::BaseHadronizer::event(), gen::Py8InterfaceBase::evtgenDecays, fEmissionVetoHook, fJetMatchingHook, fJetMatchingPy8InternalHook, gen::Py8InterfaceBase::fMasterGen, fMergingHook, lhef::LHERunInfo::kAccepted, lhef::LHERunInfo::kSelected, lhaUP, gen::BaseHadronizer::lheEvent(), LHEInputFileName, min(), nFSRveto, nISRveto, nME, nMEFiltered, AlCaHLTBitMon_QueryRunRegistry::string, and gen::Py8InterfaceBase::toHepMC.

684 {
685  DJR.resize(0);
686  nME = -1;
687  nMEFiltered = -1;
688  if(LHEInputFileName == std::string()) lhaUP->loadEvent(lheEvent());
689 
690  if ( fJetMatchingHook.get() )
691  {
692  fJetMatchingHook->resetMatchingStatus();
693  fJetMatchingHook->beforeHadronization( lheEvent() );
694  }
695 
696  bool py8next = fMasterGen->next();
697 
698  double mergeweight = fMasterGen.get()->info.mergingWeightNLO();
699  if (fMergingHook.get()) {
700  mergeweight *= fMergingHook->getNormFactor();
701  }
702 
703 
704  //protect against 0-weight from ckkw or similar
705  if (!py8next || std::abs(mergeweight)==0.)
706  {
707  lheEvent()->count( lhef::LHERunInfo::kSelected, 1.0, mergeweight );
708  event().reset();
709  return false;
710  }
711 
712  if (fJetMatchingPy8InternalHook.get()) {
713  const std::vector<double> djrmatch = fJetMatchingPy8InternalHook->getDJR();
714  //cap size of djr vector to save storage space (keep only up to first 6 elements)
715  unsigned int ndjr = std::min(djrmatch.size(), std::vector<double>::size_type(6));
716  for (unsigned int idjr=0; idjr<ndjr; ++idjr) {
717  DJR.push_back(djrmatch[idjr]);
718  }
719 
720  nME=fJetMatchingPy8InternalHook->nMEpartons().first;
721  nMEFiltered=fJetMatchingPy8InternalHook->nMEpartons().second;
722  }
723 
724  // update LHE matching statistics
725  //
726  lheEvent()->count( lhef::LHERunInfo::kAccepted, 1.0, mergeweight );
727 
728  if (evtgenDecays.get()) evtgenDecays->decay();
729 
730  event().reset(new HepMC::GenEvent);
731  bool py8hepmc = toHepMC.fill_next_event( *(fMasterGen.get()), event().get());
732  if (!py8hepmc) {
733  return false;
734  }
735 
736  //add ckkw/umeps/unlops merging weight
737  if (mergeweight!=1.) {
738  event()->weights()[0] *= mergeweight;
739  }
740 
741  if (fEmissionVetoHook.get()) {
742  nISRveto += fEmissionVetoHook->getNISRveto();
743  nFSRveto += fEmissionVetoHook->getNFSRveto();
744  }
745 
746  return true;
747 
748 }
std::auto_ptr< PowhegHooks > fEmissionVetoHook
std::auto_ptr< Pythia8::Pythia > fMasterGen
std::auto_ptr< EvtGenDecays > evtgenDecays
std::string LHEInputFileName
void count(LHERunInfo::CountMode count, double weight=1.0, double matchWeight=1.0)
Definition: LHEEvent.cc:207
std::auto_ptr< JetMatchingHook > fJetMatchingHook
uint16_t size_type
std::auto_ptr< HepMC::GenEvent > & event()
std::auto_ptr< LHAupLesHouches > lhaUP
lhef::LHEEvent * lheEvent()
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T min(T a, T b)
Definition: MathUtil.h:58
vector< float > DJR
HepMC::Pythia8ToHepMC toHepMC
std::auto_ptr< Pythia8::JetMatchingMadgraph > fJetMatchingPy8InternalHook
std::auto_ptr< Pythia8::amcnlo_unitarised_interface > fMergingHook
bool Pythia8Hadronizer::initializeForExternalPartons ( )

Definition at line 441 of file Pythia8Hadronizer.cc.

References edm::errors::Configuration, gen::Py8InterfaceBase::evtgenDecays, gen::Py8InterfaceBase::evtgenDecFile, gen::Py8InterfaceBase::evtgenPdlFile, gen::Py8InterfaceBase::evtgenUserFiles, Exception, gen::Py8InterfaceBase::fDecayer, fEmissionVetoHook, fEmissionVetoHook1, fJetMatchingHook, fJetMatchingPy8InternalHook, gen::Py8InterfaceBase::fMasterGen, fMergingHook, fMultiUserHook, fPowhegResHook, fPTFilterHook, fResonanceDecayFilterHook, fReweightPtHatRapUserHook, fReweightRapUserHook, fReweightUserHook, i, lhaUP, LHEInputFileName, gen::BaseHadronizer::lheRunInfo(), gen::Py8InterfaceBase::pythiaPylistVerbosity, MatrixUtil::remove(), gen::Py8InterfaceBase::slhafile_, mps_update::status, AlCaHLTBitMon_QueryRunRegistry::string, and gen::Py8InterfaceBase::useEvtGen.

442 {
443 
444  edm::LogInfo("Pythia8Interface") << "Initializing for external partons";
445 
446  bool status = false, status1 = false;
447 
448  fMultiUserHook.reset(new MultiUserHook);
449 
450  if(fReweightUserHook.get()) fMultiUserHook->addHook(fReweightUserHook.get());
451  if(fReweightRapUserHook.get()) fMultiUserHook->addHook(fReweightRapUserHook.get());
453  if(fJetMatchingHook.get()) fMultiUserHook->addHook(fJetMatchingHook.get());
454  if(fEmissionVetoHook1.get()) {
455  edm::LogInfo("Pythia8Interface") << "Turning on Emission Veto Hook 1 from CMSSW Pythia8Interface";
456  fMultiUserHook->addHook(fEmissionVetoHook1.get());
457  }
458 
459  if (fMasterGen->settings.mode("POWHEG:veto") > 0 || fMasterGen->settings.mode("POWHEG:MPIveto") > 0) {
460 
461  if(fJetMatchingHook.get() || fEmissionVetoHook1.get())
462  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
463  <<" Attempt to turn on PowhegHooks by pythia8 settings but there are incompatible hooks on \n Incompatible are : jetMatching, emissionVeto1 \n";
464 
465  fEmissionVetoHook.reset(new PowhegHooks());
466 
467  edm::LogInfo("Pythia8Interface") << "Turning on Emission Veto Hook from pythia8 code";
468  fMultiUserHook->addHook(fEmissionVetoHook.get());
469  }
470 
471  bool PowhegRes = fMasterGen->settings.flag("POWHEGres:calcScales");
472  if (PowhegRes) {
473  edm::LogInfo("Pythia8Interface") << "Turning on resonance scale setting from CMSSW Pythia8Interface";
474  fPowhegResHook.reset(new PowhegResHook());
475  fMultiUserHook->addHook(fPowhegResHook.get());
476  }
477 
478  //adapted from main89.cc in pythia8 examples
479  bool internalMatching = fMasterGen->settings.flag("JetMatching:merge");
480  bool internalMerging = !(fMasterGen->settings.word("Merging:Process").compare("void")==0);
481 
482  if (internalMatching && internalMerging) {
483  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
484  <<" Only one jet matching/merging scheme can be used at a time. \n";
485  }
486 
487  if (internalMatching) {
488  fJetMatchingPy8InternalHook.reset(new Pythia8::JetMatchingMadgraph);
490  }
491 
492  if (internalMerging) {
493  int scheme = ( fMasterGen->settings.flag("Merging:doUMEPSTree")
494  || fMasterGen->settings.flag("Merging:doUMEPSSubt")) ?
495  1 :
496  ( ( fMasterGen->settings.flag("Merging:doUNLOPSTree")
497  || fMasterGen->settings.flag("Merging:doUNLOPSSubt")
498  || fMasterGen->settings.flag("Merging:doUNLOPSLoop")
499  || fMasterGen->settings.flag("Merging:doUNLOPSSubtNLO")) ?
500  2 :
501  0 );
502  fMergingHook.reset(new Pythia8::amcnlo_unitarised_interface(scheme));
503  fMultiUserHook->addHook(fMergingHook.get());
504  }
505 
506  bool resonanceDecayFilter = fMasterGen->settings.flag("ResonanceDecayFilter:filter");
507  if (resonanceDecayFilter) {
510  }
511 
512  bool PTFilter = fMasterGen->settings.flag("PTFilter:filter");
513  if (PTFilter) {
514  fPTFilterHook.reset(new PTFilterHook);
515  fMultiUserHook->addHook(fPTFilterHook.get());
516  }
517 
518  if (fMultiUserHook->nHooks()>0) {
519  fMasterGen->setUserHooksPtr(fMultiUserHook.get());
520  }
521 
522  if(LHEInputFileName != std::string()) {
523 
524  edm::LogInfo("Pythia8Interface") << "Initialize direct pythia8 reading from LHE file "
525  << LHEInputFileName;
526  edm::LogInfo("Pythia8Interface") << "Some LHE information can be not stored";
527  fMasterGen->settings.mode("Beams:frameType", 4);
528  fMasterGen->settings.word("Beams:LHEF", LHEInputFileName);
529  status = fMasterGen->init();
530 
531  } else {
532 
533  lhaUP.reset(new LHAupLesHouches());
534  lhaUP->setScalesFromLHEF(fMasterGen->settings.flag("Beams:setProductionScalesFromLHEF"));
535  lhaUP->loadRunInfo(lheRunInfo());
536 
537  if ( fJetMatchingHook.get() )
538  {
539  fJetMatchingHook->init ( lheRunInfo() );
540  }
541 
542  fMasterGen->settings.mode("Beams:frameType", 5);
543  fMasterGen->setLHAupPtr(lhaUP.get());
544  edm::LogInfo("Pythia8Interface") << "Initializing MasterGen";
545  status = fMasterGen->init();
546  }
547 
548  //clean up temp file
549  if (!slhafile_.empty()) {
550  std::remove(slhafile_.c_str());
551  }
552 
553  if ( pythiaPylistVerbosity > 10 )
554  {
555  if ( pythiaPylistVerbosity == 11 || pythiaPylistVerbosity == 13 )
556  fMasterGen->settings.listAll();
557  if ( pythiaPylistVerbosity == 12 || pythiaPylistVerbosity == 13 )
558  fMasterGen->particleData.listAll();
559  }
560 
561  // init decayer
562  fDecayer->settings.flag("ProcessLevel:all", false ); // trick
563  fDecayer->settings.flag("ProcessLevel:resonanceDecays", true );
564  edm::LogInfo("Pythia8Interface") << "Initializing Decayer";
565  status1 = fDecayer->init();
566 
567  if (useEvtGen) {
568  edm::LogInfo("Pythia8Interface") << "Creating and initializing pythia8 EvtGen plugin";
569 
570  std::string evtgenpath(getenv("EVTGENDATA"));
571  evtgenDecays.reset(new EvtGenDecays(fMasterGen.get(), evtgenDecFile.c_str(), evtgenPdlFile.c_str()));
572 
573  for (unsigned int i=0; i<evtgenUserFiles.size(); i++) {
574  edm::FileInPath evtgenUserFile(evtgenUserFiles.at(i));
575  evtgenDecays->readDecayFile(evtgenUserFile.fullPath().c_str());
576  }
577 
578  }
579 
580  return (status&&status1);
581 }
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< PowhegHooks > fEmissionVetoHook
std::auto_ptr< Pythia8::Pythia > fMasterGen
std::auto_ptr< ResonanceDecayFilterHook > fResonanceDecayFilterHook
std::auto_ptr< EvtGenDecays > evtgenDecays
std::auto_ptr< PTFilterHook > fPTFilterHook
std::string LHEInputFileName
std::auto_ptr< JetMatchingHook > fJetMatchingHook
std::vector< std::string > evtgenUserFiles
std::auto_ptr< LHAupLesHouches > lhaUP
std::auto_ptr< MultiUserHook > fMultiUserHook
std::auto_ptr< UserHooks > fReweightPtHatRapUserHook
std::auto_ptr< PowhegResHook > fPowhegResHook
unsigned int pythiaPylistVerbosity
lhef::LHERunInfo * lheRunInfo()
std::auto_ptr< UserHooks > fReweightUserHook
std::auto_ptr< UserHooks > fReweightRapUserHook
std::auto_ptr< Pythia8::Pythia > fDecayer
std::auto_ptr< Pythia8::JetMatchingMadgraph > fJetMatchingPy8InternalHook
std::auto_ptr< EmissionVetoHook1 > fEmissionVetoHook1
std::auto_ptr< Pythia8::amcnlo_unitarised_interface > fMergingHook
tuple status
Definition: mps_update.py:57
bool Pythia8Hadronizer::initializeForInternalPartons ( )
overridevirtual

Implements gen::Py8InterfaceBase.

Definition at line 295 of file Pythia8Hadronizer.cc.

References comEnergy, edm::errors::Configuration, ElectronPositron, gen::Py8InterfaceBase::evtgenDecays, gen::Py8InterfaceBase::evtgenDecFile, gen::Py8InterfaceBase::evtgenPdlFile, gen::Py8InterfaceBase::evtgenUserFiles, Exception, gen::Py8InterfaceBase::fDecayer, fEmissionVetoHook, fEmissionVetoHook1, fInitialState, fJetMatchingHook, fJetMatchingPy8InternalHook, gen::Py8InterfaceBase::fMasterGen, fMergingHook, fMultiUserHook, fPowhegResHook, fPTFilterHook, fResonanceDecayFilterHook, fReweightPtHatRapUserHook, fReweightRapUserHook, fReweightUserHook, i, gen::BaseHadronizer::lheFile_, PP, PPbar, gen::Py8InterfaceBase::pythiaPylistVerbosity, MatrixUtil::remove(), gen::Py8InterfaceBase::slhafile_, mps_update::status, and gen::Py8InterfaceBase::useEvtGen.

296 {
297 
298  bool status = false, status1 = false;
299 
300  if (lheFile_.empty()) {
301  if ( fInitialState == PP ) // default
302  {
303  fMasterGen->settings.mode("Beams:idA", 2212);
304  fMasterGen->settings.mode("Beams:idB", 2212);
305  }
306  else if ( fInitialState == PPbar )
307  {
308  fMasterGen->settings.mode("Beams:idA", 2212);
309  fMasterGen->settings.mode("Beams:idB", -2212);
310  }
311  else if ( fInitialState == ElectronPositron )
312  {
313  fMasterGen->settings.mode("Beams:idA", 11);
314  fMasterGen->settings.mode("Beams:idB", -11);
315  }
316  else
317  {
318  // throw on unknown initial state !
319  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
320  <<" UNKNOWN INITIAL STATE. \n The allowed initial states are: PP, PPbar, ElectronPositron \n";
321  }
322  fMasterGen->settings.parm("Beams:eCM", comEnergy);
323  }
324  else {
325  fMasterGen->settings.mode("Beams:frameType", 4);
326  fMasterGen->settings.word("Beams:LHEF", lheFile_);
327  }
328 
329  fMultiUserHook.reset(new MultiUserHook);
330 
331  if(fReweightUserHook.get()) fMultiUserHook->addHook(fReweightUserHook.get());
332  if(fReweightRapUserHook.get()) fMultiUserHook->addHook(fReweightRapUserHook.get());
334  if(fJetMatchingHook.get()) fMultiUserHook->addHook(fJetMatchingHook.get());
335  if(fEmissionVetoHook1.get()) {
336  edm::LogInfo("Pythia8Interface") << "Turning on Emission Veto Hook 1 from CMSSW Pythia8Interface";
337  fMultiUserHook->addHook(fEmissionVetoHook1.get());
338  }
339 
340  if (fMasterGen->settings.mode("POWHEG:veto") > 0 || fMasterGen->settings.mode("POWHEG:MPIveto") > 0) {
341 
342  if(fJetMatchingHook.get() || fEmissionVetoHook1.get())
343  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
344  <<" Attempt to turn on PowhegHooks by pythia8 settings but there are incompatible hooks on \n Incompatible are : jetMatching, emissionVeto1 \n";
345 
346  fEmissionVetoHook.reset(new PowhegHooks());
347 
348  edm::LogInfo("Pythia8Interface") << "Turning on Emission Veto Hook from pythia8 code";
349  fMultiUserHook->addHook(fEmissionVetoHook.get());
350  }
351 
352  bool PowhegRes = fMasterGen->settings.flag("POWHEGres:calcScales");
353  if (PowhegRes) {
354  edm::LogInfo("Pythia8Interface") << "Turning on resonance scale setting from CMSSW Pythia8Interface";
355  fPowhegResHook.reset(new PowhegResHook());
356  fMultiUserHook->addHook(fPowhegResHook.get());
357  }
358 
359  //adapted from main89.cc in pythia8 examples
360  bool internalMatching = fMasterGen->settings.flag("JetMatching:merge");
361  bool internalMerging = !(fMasterGen->settings.word("Merging:Process").compare("void")==0);
362 
363  if (internalMatching && internalMerging) {
364  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
365  <<" Only one jet matching/merging scheme can be used at a time. \n";
366  }
367 
368  if (internalMatching) {
369  fJetMatchingPy8InternalHook.reset(new Pythia8::JetMatchingMadgraph);
371  }
372 
373  if (internalMerging) {
374  int scheme = ( fMasterGen->settings.flag("Merging:doUMEPSTree")
375  || fMasterGen->settings.flag("Merging:doUMEPSSubt")) ?
376  1 :
377  ( ( fMasterGen->settings.flag("Merging:doUNLOPSTree")
378  || fMasterGen->settings.flag("Merging:doUNLOPSSubt")
379  || fMasterGen->settings.flag("Merging:doUNLOPSLoop")
380  || fMasterGen->settings.flag("Merging:doUNLOPSSubtNLO")) ?
381  2 :
382  0 );
383  fMergingHook.reset(new Pythia8::amcnlo_unitarised_interface(scheme));
384  fMultiUserHook->addHook(fMergingHook.get());
385  }
386 
387  bool resonanceDecayFilter = fMasterGen->settings.flag("ResonanceDecayFilter:filter");
388  if (resonanceDecayFilter) {
391  }
392 
393  bool PTFilter = fMasterGen->settings.flag("PTFilter:filter");
394  if (PTFilter) {
395  fPTFilterHook.reset(new PTFilterHook);
396  fMultiUserHook->addHook(fPTFilterHook.get());
397  }
398 
399  if (fMultiUserHook->nHooks()>0) {
400  fMasterGen->setUserHooksPtr(fMultiUserHook.get());
401  }
402 
403  edm::LogInfo("Pythia8Interface") << "Initializing MasterGen";
404  status = fMasterGen->init();
405 
406  //clean up temp file
407  if (!slhafile_.empty()) {
408  std::remove(slhafile_.c_str());
409  }
410 
411  if ( pythiaPylistVerbosity > 10 )
412  {
413  if ( pythiaPylistVerbosity == 11 || pythiaPylistVerbosity == 13 )
414  fMasterGen->settings.listAll();
415  if ( pythiaPylistVerbosity == 12 || pythiaPylistVerbosity == 13 )
416  fMasterGen->particleData.listAll();
417  }
418 
419  // init decayer
420  fDecayer->settings.flag("ProcessLevel:all", false ); // trick
421  fDecayer->settings.flag("ProcessLevel:resonanceDecays", true );
422  edm::LogInfo("Pythia8Interface") << "Initializing Decayer";
423  status1 = fDecayer->init();
424 
425  if (useEvtGen) {
426  edm::LogInfo("Pythia8Interface") << "Creating and initializing pythia8 EvtGen plugin";
427 
428  evtgenDecays.reset(new EvtGenDecays(fMasterGen.get(), evtgenDecFile.c_str(), evtgenPdlFile.c_str()));
429 
430  for (unsigned int i=0; i<evtgenUserFiles.size(); i++) {
431  edm::FileInPath evtgenUserFile(evtgenUserFiles.at(i));
432  evtgenDecays->readDecayFile(evtgenUserFile.fullPath().c_str());
433  }
434 
435  }
436 
437  return (status&&status1);
438 }
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< PowhegHooks > fEmissionVetoHook
double comEnergy
Center-of-Mass energy.
std::auto_ptr< Pythia8::Pythia > fMasterGen
std::auto_ptr< ResonanceDecayFilterHook > fResonanceDecayFilterHook
std::auto_ptr< EvtGenDecays > evtgenDecays
std::auto_ptr< PTFilterHook > fPTFilterHook
std::auto_ptr< JetMatchingHook > fJetMatchingHook
std::string lheFile_
std::vector< std::string > evtgenUserFiles
std::auto_ptr< MultiUserHook > fMultiUserHook
std::auto_ptr< UserHooks > fReweightPtHatRapUserHook
std::auto_ptr< PowhegResHook > fPowhegResHook
unsigned int pythiaPylistVerbosity
std::auto_ptr< UserHooks > fReweightUserHook
std::auto_ptr< UserHooks > fReweightRapUserHook
std::auto_ptr< Pythia8::Pythia > fDecayer
std::auto_ptr< Pythia8::JetMatchingMadgraph > fJetMatchingPy8InternalHook
std::auto_ptr< EmissionVetoHook1 > fEmissionVetoHook1
std::auto_ptr< Pythia8::amcnlo_unitarised_interface > fMergingHook
tuple status
Definition: mps_update.py:57
bool Pythia8Hadronizer::residualDecay ( )
virtual

Definition at line 751 of file Pythia8Hadronizer.cc.

References gen::BaseHadronizer::event(), gen::Py8InterfaceBase::fDecayer, gen::Py8InterfaceBase::fMasterGen, GenParticle::GenParticle, mps_fire::result, and gen::Py8InterfaceBase::toHepMC.

752 {
753 
754  Event* pythiaEvent = &(fMasterGen->event);
755 
756  int NPartsBeforeDecays = pythiaEvent->size();
757  int NPartsAfterDecays = event().get()->particles_size();
758 
759  if(NPartsAfterDecays == NPartsBeforeDecays) return true;
760 
761  bool result = true;
762 
763  for ( int ipart=NPartsAfterDecays; ipart>NPartsBeforeDecays; ipart-- )
764  {
765 
766  HepMC::GenParticle* part = event().get()->barcode_to_particle( ipart );
767 
768  if ( part->status() == 1 && (fDecayer->particleData).canDecay(part->pdg_id()) )
769  {
770  fDecayer->event.reset();
771  Particle py8part( part->pdg_id(), 93, 0, 0, 0, 0, 0, 0,
772  part->momentum().x(),
773  part->momentum().y(),
774  part->momentum().z(),
775  part->momentum().t(),
776  part->generated_mass() );
777  HepMC::GenVertex* ProdVtx = part->production_vertex();
778  py8part.vProd( ProdVtx->position().x(), ProdVtx->position().y(),
779  ProdVtx->position().z(), ProdVtx->position().t() );
780  py8part.tau( (fDecayer->particleData).tau0( part->pdg_id() ) );
781  fDecayer->event.append( py8part );
782  int nentries = fDecayer->event.size();
783  if ( !fDecayer->event[nentries-1].mayDecay() ) continue;
784  fDecayer->next();
785  int nentries1 = fDecayer->event.size();
786  if ( nentries1 <= nentries ) continue; //same number of particles, no decays...
787 
788  part->set_status(2);
789 
790  result = toHepMC.fill_next_event( *(fDecayer.get()), event().get(), -1, true, part);
791 
792  }
793  }
794 
795  return result;
796 
797 }
std::auto_ptr< Pythia8::Pythia > fMasterGen
std::auto_ptr< HepMC::GenEvent > & event()
tuple result
Definition: mps_fire.py:84
part
Definition: HCALResponse.h:20
std::auto_ptr< Pythia8::Pythia > fDecayer
HepMC::Pythia8ToHepMC toHepMC
void Pythia8Hadronizer::statistics ( )
overridevirtual

Reimplemented from gen::Py8InterfaceBase.

Definition at line 584 of file Pythia8Hadronizer.cc.

References fEmissionVetoHook, gen::Py8InterfaceBase::fMasterGen, nFSRveto, nISRveto, gen::BaseHadronizer::runInfo(), and GenRunInfoProduct::setInternalXSec().

585 {
586  fMasterGen->stat();
587 
588  if(fEmissionVetoHook.get()) {
589  edm::LogPrint("Pythia8Interface") << "\n"
590  << "Number of ISR vetoed = " << nISRveto;
591  edm::LogPrint("Pythia8Interface")
592  << "Number of FSR vetoed = " << nFSRveto;
593  }
594 
595  double xsec = fMasterGen->info.sigmaGen(); // cross section in mb
596  xsec *= 1.0e9; // translate to pb (CMS/Gen "convention" as of May 2009)
597  double err = fMasterGen->info.sigmaErr(); // cross section err in mb
598  err *= 1.0e9; // translate to pb (CMS/Gen "convention" as of May 2009)
600 }
std::auto_ptr< PowhegHooks > fEmissionVetoHook
std::auto_ptr< Pythia8::Pythia > fMasterGen
void setInternalXSec(const XSec &xsec)
GenRunInfoProduct & runInfo()

Member Data Documentation

double Pythia8Hadronizer::comEnergy
private

Center-of-Mass energy.

Definition at line 100 of file Pythia8Hadronizer.cc.

Referenced by initializeForInternalPartons().

vector<float> Pythia8Hadronizer::DJR
private

Definition at line 151 of file Pythia8Hadronizer.cc.

Referenced by finalizeEvent(), generatePartonsAndHadronize(), and hadronize().

int Pythia8Hadronizer::EV1_emittedMode
private

Definition at line 145 of file Pythia8Hadronizer.cc.

Referenced by Pythia8Hadronizer().

int Pythia8Hadronizer::EV1_maxVetoCount
private

Definition at line 142 of file Pythia8Hadronizer.cc.

Referenced by Pythia8Hadronizer().

bool Pythia8Hadronizer::EV1_MPIvetoOn
private

Definition at line 147 of file Pythia8Hadronizer.cc.

Referenced by Pythia8Hadronizer().

int Pythia8Hadronizer::EV1_nFinal
private

Definition at line 140 of file Pythia8Hadronizer.cc.

Referenced by Pythia8Hadronizer().

int Pythia8Hadronizer::EV1_pTdefMode
private

Definition at line 146 of file Pythia8Hadronizer.cc.

Referenced by Pythia8Hadronizer().

int Pythia8Hadronizer::EV1_pTempMode
private

Definition at line 144 of file Pythia8Hadronizer.cc.

Referenced by Pythia8Hadronizer().

int Pythia8Hadronizer::EV1_pThardMode
private

Definition at line 143 of file Pythia8Hadronizer.cc.

Referenced by Pythia8Hadronizer().

bool Pythia8Hadronizer::EV1_vetoOn
private

Definition at line 141 of file Pythia8Hadronizer.cc.

Referenced by Pythia8Hadronizer().

double Pythia8Hadronizer::fBeam1PZ
private

Definition at line 108 of file Pythia8Hadronizer.cc.

double Pythia8Hadronizer::fBeam2PZ
private

Definition at line 109 of file Pythia8Hadronizer.cc.

std::auto_ptr<PowhegHooks> Pythia8Hadronizer::fEmissionVetoHook
private
std::auto_ptr<EmissionVetoHook1> Pythia8Hadronizer::fEmissionVetoHook1
private
int Pythia8Hadronizer::fInitialState
private

Definition at line 106 of file Pythia8Hadronizer.cc.

Referenced by initializeForInternalPartons(), and Pythia8Hadronizer().

std::auto_ptr<JetMatchingHook> Pythia8Hadronizer::fJetMatchingHook
private
std::auto_ptr<Pythia8::JetMatchingMadgraph> Pythia8Hadronizer::fJetMatchingPy8InternalHook
private
std::auto_ptr<Pythia8::amcnlo_unitarised_interface> Pythia8Hadronizer::fMergingHook
private
std::auto_ptr<MultiUserHook> Pythia8Hadronizer::fMultiUserHook
private
std::auto_ptr<PowhegResHook> Pythia8Hadronizer::fPowhegResHook
private
std::auto_ptr<PTFilterHook> Pythia8Hadronizer::fPTFilterHook
private
std::auto_ptr<ResonanceDecayFilterHook> Pythia8Hadronizer::fResonanceDecayFilterHook
private
std::auto_ptr<UserHooks> Pythia8Hadronizer::fReweightPtHatRapUserHook
private
std::auto_ptr<UserHooks> Pythia8Hadronizer::fReweightRapUserHook
private
std::auto_ptr<UserHooks> Pythia8Hadronizer::fReweightUserHook
private
std::auto_ptr<LHAupLesHouches> Pythia8Hadronizer::lhaUP
private

Definition at line 103 of file Pythia8Hadronizer.cc.

Referenced by hadronize(), and initializeForExternalPartons().

std::string Pythia8Hadronizer::LHEInputFileName
private

Definition at line 102 of file Pythia8Hadronizer.cc.

Referenced by hadronize(), and initializeForExternalPartons().

int Pythia8Hadronizer::nFSRveto
private

Definition at line 156 of file Pythia8Hadronizer.cc.

Referenced by generatePartonsAndHadronize(), hadronize(), and statistics().

int Pythia8Hadronizer::nISRveto
private

Definition at line 155 of file Pythia8Hadronizer.cc.

Referenced by generatePartonsAndHadronize(), hadronize(), and statistics().

int Pythia8Hadronizer::nME
private

Definition at line 152 of file Pythia8Hadronizer.cc.

Referenced by finalizeEvent(), generatePartonsAndHadronize(), and hadronize().

int Pythia8Hadronizer::nMEFiltered
private

Definition at line 153 of file Pythia8Hadronizer.cc.

Referenced by finalizeEvent(), generatePartonsAndHadronize(), and hadronize().

const std::vector< std::string > Pythia8Hadronizer::p8SharedResources = { edm::SharedResourceNames::kPythia8 }
staticprivate

Definition at line 149 of file Pythia8Hadronizer.cc.