CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Pythia8Hadronizer.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <sstream>
3 #include <string>
4 #include <memory>
5 #include <stdint.h>
6 #include <vector>
7 
8 #include "HepMC/GenEvent.h"
9 #include "HepMC/GenParticle.h"
10 
11 #include "Pythia8/Pythia.h"
12 #include "Pythia8Plugins/HepMC2.h"
14 
16 
18 
19 // PS matchning prototype
20 //
22 #include "Pythia8Plugins/JetMatching.h"
23 #include "Pythia8Plugins/aMCatNLOHooks.h"
24 
25 // Emission Veto Hooks
26 //
27 #include "Pythia8Plugins/PowhegHooks.h"
29 
35 
38 
42 
44 
45 #include "HepPID/ParticleIDTranslations.hh"
46 
48 
49 namespace CLHEP {
50  class HepRandomEngine;
51 }
52 
53 using namespace gen;
54 using namespace Pythia8;
55 
57 
58  public:
59 
60  Pythia8Hadronizer(const edm::ParameterSet &params);
62 
63  bool initializeForInternalPartons() override;
64  bool initializeForExternalPartons();
65 
66  bool generatePartonsAndHadronize() override;
67  bool hadronize();
68 
69  virtual bool residualDecay();
70 
71  void finalizeEvent() override;
72 
73  void statistics() override;
74 
75  const char *classname() const override { return "Pythia8Hadronizer"; }
76 
77  private:
78 
79  virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override { p8SetRandomEngine(v); }
80  virtual std::vector<std::string> const& doSharedResources() const override { return p8SharedResources; }
81 
83  double comEnergy;
84 
86  std::auto_ptr<LHAupLesHouches> lhaUP;
87 
88  enum { PP, PPbar, ElectronPositron };
89  int fInitialState ; // pp, ppbar, or e-e+
90 
91  double fBeam1PZ;
92  double fBeam2PZ;
93 
94  // Reweight user hooks
95  //
96  UserHooks* fReweightUserHook;
97  UserHooks* fReweightRapUserHook;
99 
100  // PS matching prototype
101  //
103  Pythia8::JetMatchingMadgraph *fJetMatchingPy8InternalHook;
104  Pythia8::amcnlo_unitarised_interface *fMergingHook;
105 
106  // Emission Veto Hooks
107  //
108  PowhegHooks* fEmissionVetoHook;
110 
119 
120  static const std::vector<std::string> p8SharedResources;
121 
123 
124  vector<float> DJR;
125  int nME;
127 
128  int nISRveto;
129  int nFSRveto;
130 
131  int NHooks;
132 
133 };
134 
136 
138  BaseHadronizer(params), Py8InterfaceBase(params),
139  comEnergy(params.getParameter<double>("comEnergy")),
140  LHEInputFileName(params.getUntrackedParameter<string>("LHEInputFileName","")),
141  fInitialState(PP),
142  fReweightUserHook(0),fReweightRapUserHook(0),fReweightPtHatRapUserHook(0),
143  fJetMatchingHook(0),fJetMatchingPy8InternalHook(0), fMergingHook(0),
144  fEmissionVetoHook(0), fEmissionVetoHook1(0), nME(-1), nMEFiltered(-1), nISRveto(0), nFSRveto(0),
145  NHooks(0)
146 {
147 
148  // J.Y.: the following 3 parameters are hacked "for a reason"
149  //
150  if ( params.exists( "PPbarInitialState" ) )
151  {
152  if ( fInitialState == PP )
153  {
155  edm::LogImportant("GeneratorInterface|Pythia8Interface")
156  << "Pythia8 will be initialized for PROTON-ANTIPROTON INITIAL STATE. "
157  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state.";
158  }
159  else
160  {
161  // probably need to throw on attempt to override ?
162  }
163  }
164  else if ( params.exists( "ElectronPositronInitialState" ) )
165  {
166  if ( fInitialState == PP )
167  {
169  edm::LogInfo("GeneratorInterface|Pythia8Interface")
170  << "Pythia8 will be initialized for ELECTRON-POSITRON INITIAL STATE. "
171  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state.";
172  }
173  else
174  {
175  // probably need to throw on attempt to override ?
176  }
177  }
178  else if ( params.exists( "ElectronProtonInitialState" ) || params.exists( "PositronProtonInitialState" ) )
179  {
180  // throw on unknown initial state !
181  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
182  <<" UNKNOWN INITIAL STATE. \n The allowed initial states are: PP, PPbar, ElectronPositron \n";
183  }
184 
185  if( params.exists( "SLHAFileForPythia8" ) ) {
186  std::string slhafilenameshort = params.getParameter<string>("SLHAFileForPythia8");
187  edm::FileInPath f1( slhafilenameshort );
188 
189  fMasterGen->settings.mode("SLHA:readFrom", 2);
190  fMasterGen->settings.word("SLHA:file", f1.fullPath());
191 
193  line != fParameters.end(); ++line ) {
194  if (line->find("SLHA:file") != std::string::npos)
195  throw cms::Exception("PythiaError") << "Attempted to set SLHA file name twice, "
196  << "using Pythia8 card SLHA:file and Pythia8Interface card SLHAFileForPythia8"
197  << std::endl;
198  }
199  }
200  else if( params.exists( "SLHATableForPythia8" ) ) {
201  std::string slhatable = params.getParameter<string>("SLHATableForPythia8");
202 
203  char tempslhaname[] = "pythia8SLHAtableXXXXXX";
204  int fd = mkstemp(tempslhaname);
205  write(fd,slhatable.c_str(),slhatable.size());
206  close(fd);
207 
208  slhafile_ = tempslhaname;
209 
210  fMasterGen->settings.mode("SLHA:readFrom", 2);
211  fMasterGen->settings.word("SLHA:file", slhafile_);
212 
214  line != fParameters.end(); ++line ) {
215  if (line->find("SLHA:file") != std::string::npos)
216  throw cms::Exception("PythiaError") << "Attempted to set SLHA file name twice, "
217  << "using Pythia8 card SLHA:file and Pythia8Interface card SLHATableForPythia8"
218  << std::endl;
219  }
220  }
221 
222  // Reweight user hook
223  //
224  if( params.exists( "reweightGen" ) )
226  if( params.exists( "reweightGenRap" ) )
227  {
228  edm::LogInfo("Pythia8Interface") << "Start setup for reweightGenRap";
229  edm::ParameterSet rgrParams =
230  params.getParameter<edm::ParameterSet>("reweightGenRap");
232  new RapReweightUserHook(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  edm::LogInfo("Pythia8Interface") << "End setup for reweightGenRap";
239  }
240  if( params.exists( "reweightGenPtHatRap" ) )
241  {
242  edm::LogInfo("Pythia8Interface") << "Start setup for reweightGenPtHatRap";
243  edm::ParameterSet rgrParams =
244  params.getParameter<edm::ParameterSet>("reweightGenPtHatRap");
246  new PtHatRapReweightUserHook(rgrParams.getParameter<std::string>("yLabSigmaFunc"),
247  rgrParams.getParameter<double>("yLabPower"),
248  rgrParams.getParameter<std::string>("yCMSigmaFunc"),
249  rgrParams.getParameter<double>("yCMPower"),
250  rgrParams.getParameter<double>("pTHatMin"),
251  rgrParams.getParameter<double>("pTHatMax"));
252  edm::LogInfo("Pythia8Interface") << "End setup for reweightGenPtHatRap";
253  }
254 
255  if( params.exists( "useUserHook" ) )
256  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
257  <<" Obsolete parameter: useUserHook \n Please use the actual one instead \n";
258 
259  // PS matching prototype
260  //
261  if ( params.exists("jetMatching") )
262  {
263  edm::ParameterSet jmParams =
264  params.getUntrackedParameter<edm::ParameterSet>("jetMatching");
265  std::string scheme = jmParams.getParameter<std::string>("scheme");
266  if ( scheme == "Madgraph" || scheme == "MadgraphFastJet" )
267  {
268  fJetMatchingHook = new JetMatchingHook( jmParams, &fMasterGen->info );
269  }
270  }
271 
272  // Pythia8Interface emission veto
273  //
274  if ( params.exists("emissionVeto1") )
275  {
276  EV1_nFinal = -1;
277  if(params.exists("EV1_nFinal")) EV1_nFinal = params.getParameter<int>("EV1_nFinal");
278  EV1_vetoOn = true;
279  if(params.exists("EV1_vetoOn")) EV1_vetoOn = params.getParameter<bool>("EV1_vetoOn");
280  EV1_maxVetoCount = 10;
281  if(params.exists("EV1_maxVetoCount")) EV1_maxVetoCount = params.getParameter<int>("EV1_maxVetoCount");
282  EV1_pThardMode = 1;
283  if(params.exists("EV1_pThardMode")) EV1_pThardMode = params.getParameter<int>("EV1_pThardMode");
284  EV1_pTempMode = 0;
285  if(params.exists("EV1_pTempMode")) EV1_pTempMode = params.getParameter<int>("EV1_pTempMode");
286  if(EV1_pTempMode > 2 || EV1_pTempMode < 0)
287  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
288  <<" Wrong value for EV1_pTempMode code\n";
289  EV1_emittedMode = 0;
290  if(params.exists("EV1_emittedMode")) EV1_emittedMode = params.getParameter<int>("EV1_emittedMode");
291  EV1_pTdefMode = 1;
292  if(params.exists("EV1_pTdefMode")) EV1_pTdefMode = params.getParameter<int>("EV1_pTdefMode");
293  EV1_MPIvetoOn = false;
294  if(params.exists("EV1_MPIvetoOn")) EV1_MPIvetoOn = params.getParameter<bool>("EV1_MPIvetoOn");
298  }
299 
303  if(fJetMatchingHook) NHooks++;
305  if(NHooks > 1)
306  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
307  <<" Too many User Hooks. \n Please choose one from: reweightGen, reweightGenRap, reweightGenPtHatRap, jetMatching, emissionVeto1 \n";
308  if(fReweightUserHook) fMasterGen->setUserHooksPtr(fReweightUserHook);
311  if(fJetMatchingHook) fMasterGen->setUserHooksPtr(fJetMatchingHook);
312  if(fEmissionVetoHook1) {
313  edm::LogInfo("Pythia8Interface") << "Turning on Emission Veto Hook 1 from CMSSW Pythia8Interface";
314  fMasterGen->setUserHooksPtr(fEmissionVetoHook1);
315  }
316 
317 }
318 
319 
321 {
322 // do we need to delete UserHooks/JetMatchingHook here ???
325 
326  //clean up temp file
327  if (!slhafile_.empty()) {
328  std::remove(slhafile_.c_str());
329  }
330 
331 }
332 
334 {
335 
336  bool status = false, status1 = false;
337 
338  if ( fInitialState == PP ) // default
339  {
340  fMasterGen->settings.mode("Beams:idA", 2212);
341  fMasterGen->settings.mode("Beams:idB", 2212);
342  }
343  else if ( fInitialState == PPbar )
344  {
345  fMasterGen->settings.mode("Beams:idA", 2212);
346  fMasterGen->settings.mode("Beams:idB", -2212);
347  }
348  else if ( fInitialState == ElectronPositron )
349  {
350  fMasterGen->settings.mode("Beams:idA", 11);
351  fMasterGen->settings.mode("Beams:idB", -11);
352  }
353  else
354  {
355  // throw on unknown initial state !
356  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
357  <<" UNKNOWN INITIAL STATE. \n The allowed initial states are: PP, PPbar, ElectronPositron \n";
358  }
359 
360  fMasterGen->settings.parm("Beams:eCM", comEnergy);
361  edm::LogInfo("Pythia8Interface") << "Initializing MasterGen";
362  status = fMasterGen->init();
363 
364  if ( pythiaPylistVerbosity > 10 )
365  {
366  if ( pythiaPylistVerbosity == 11 || pythiaPylistVerbosity == 13 )
367  fMasterGen->settings.listAll();
368  if ( pythiaPylistVerbosity == 12 || pythiaPylistVerbosity == 13 )
369  fMasterGen->particleData.listAll();
370  }
371 
372  // init decayer
373  fDecayer->settings.flag("ProcessLevel:all", false ); // trick
374  fDecayer->settings.flag("ProcessLevel:resonanceDecays", true );
375  edm::LogInfo("Pythia8Interface") << "Initializing Decayer";
376  status1 = fDecayer->init();
377 
378  return (status&&status1);
379 }
380 
381 
383 {
384 
385  edm::LogInfo("Pythia8Interface") << "Initializing for external partons";
386 
387  bool status = false, status1 = false;
388 
389  if((fMasterGen->settings.mode("POWHEG:veto") > 0 || fMasterGen->settings.mode("POWHEG:MPIveto") > 0) && !fEmissionVetoHook) {
390 
392  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
393  <<" Attempt to turn on PowhegHooks by pythia8 settings but there are incompatible hooks on \n Incompatible are : jetMatching, emissionVeto1 \n";
394 
395  fEmissionVetoHook = new PowhegHooks();
396 
397  edm::LogInfo("Pythia8Interface") << "Turning on Emission Veto Hook from pythia8 code";
398  fMasterGen->setUserHooksPtr(fEmissionVetoHook);
399 
400  }
401 
402  //adapted from main89.cc in pythia8 examples
403  bool internalMatching = fMasterGen->settings.flag("JetMatching:merge");
404  bool internalMerging = !(fMasterGen->settings.word("Merging:Process").compare("void")==0);
405 
406  if (internalMatching && internalMerging) {
407  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
408  <<" Only one jet matching/merging scheme can be used at a time. \n";
409  }
410 
411  if (internalMatching && !fJetMatchingPy8InternalHook) {
412  fJetMatchingPy8InternalHook = new Pythia8::JetMatchingMadgraph;
413  fMasterGen->setUserHooksPtr(fJetMatchingPy8InternalHook);
414  }
415 
416  if (internalMerging && !fMergingHook) {
417  int scheme = ( fMasterGen->settings.flag("Merging:doUMEPSTree")
418  || fMasterGen->settings.flag("Merging:doUMEPSSubt")) ?
419  1 :
420  ( ( fMasterGen->settings.flag("Merging:doUNLOPSTree")
421  || fMasterGen->settings.flag("Merging:doUNLOPSSubt")
422  || fMasterGen->settings.flag("Merging:doUNLOPSLoop")
423  || fMasterGen->settings.flag("Merging:doUNLOPSSubtNLO")) ?
424  2 :
425  0 );
426  fMergingHook = new Pythia8::amcnlo_unitarised_interface(scheme);
427  fMasterGen->setUserHooksPtr(fMergingHook);
428  }
429 
430 
431  if(LHEInputFileName != string()) {
432 
433  edm::LogInfo("Pythia8Interface") << "Initialize direct pythia8 reading from LHE file "
434  << LHEInputFileName;
435  edm::LogInfo("Pythia8Interface") << "Some LHE information can be not stored";
436  fMasterGen->settings.mode("Beams:frameType", 4);
437  fMasterGen->settings.word("Beams:LHEF", LHEInputFileName);
438  status = fMasterGen->init();
439 
440  } else {
441 
442  lhaUP.reset(new LHAupLesHouches());
443  lhaUP->setScalesFromLHEF(fMasterGen->settings.flag("Beams:setProductionScalesFromLHEF"));
444  lhaUP->loadRunInfo(lheRunInfo());
445 
446  if ( fJetMatchingHook )
447  {
449  }
450 
451  fMasterGen->settings.mode("Beams:frameType", 5);
452  fMasterGen->setLHAupPtr(lhaUP.get());
453  edm::LogInfo("Pythia8Interface") << "Initializing MasterGen";
454  status = fMasterGen->init();
455  }
456 
457  if ( pythiaPylistVerbosity > 10 )
458  {
459  if ( pythiaPylistVerbosity == 11 || pythiaPylistVerbosity == 13 )
460  fMasterGen->settings.listAll();
461  if ( pythiaPylistVerbosity == 12 || pythiaPylistVerbosity == 13 )
462  fMasterGen->particleData.listAll();
463  }
464 
465  // init decayer
466  fDecayer->settings.flag("ProcessLevel:all", false ); // trick
467  fDecayer->settings.flag("ProcessLevel:resonanceDecays", true );
468  edm::LogInfo("Pythia8Interface") << "Initializing Decayer";
469  status1 = fDecayer->init();
470 
471  return (status&&status1);
472 }
473 
474 
476 {
477  fMasterGen->stat();
478 
479  if(fEmissionVetoHook) {
480  edm::LogPrint("Pythia8Interface") << "\n"
481  << "Number of ISR vetoed = " << nISRveto;
482  edm::LogPrint("Pythia8Interface")
483  << "Number of FSR vetoed = " << nFSRveto;
484  }
485 
486  double xsec = fMasterGen->info.sigmaGen(); // cross section in mb
487  xsec *= 1.0e9; // translate to pb (CMS/Gen "convention" as of May 2009)
488  double err = fMasterGen->info.sigmaErr(); // cross section err in mb
489  err *= 1.0e9; // translate to pb (CMS/Gen "convention" as of May 2009)
491 }
492 
493 
495 {
496 
497  if (!fMasterGen->next()) return false;
498 
499  event().reset(new HepMC::GenEvent);
500  return toHepMC.fill_next_event( *(fMasterGen.get()), event().get());
501 
502 }
503 
504 
506 {
507  DJR.resize(0);
508  nME = -1;
509  nMEFiltered = -1;
510  if(LHEInputFileName == string()) lhaUP->loadEvent(lheEvent());
511 
512  if ( fJetMatchingHook )
513  {
516  }
517 
518  bool py8next = fMasterGen->next();
519 
520  double mergeweight = fMasterGen.get()->info.mergingWeightNLO();
521  if (fMergingHook) {
522  mergeweight *= fMergingHook->getNormFactor();
523  }
524 
525 
526  //protect against 0-weight from ckkw or similar
527  if (!py8next || std::abs(mergeweight)==0.)
528  {
529  lheEvent()->count( lhef::LHERunInfo::kSelected, 1.0, mergeweight );
530  event().reset();
531  return false;
532  }
533 
535  const std::vector<double> djrmatch = fJetMatchingPy8InternalHook->GetDJR();
536  //cap size of djr vector to save storage space (keep only up to first 6 elements)
537  unsigned int ndjr = std::min(djrmatch.size(), std::vector<double>::size_type(6));
538  for (unsigned int idjr=0; idjr<ndjr; ++idjr) {
539  DJR.push_back(djrmatch[idjr]);
540  }
541 
542  nME=fJetMatchingPy8InternalHook->nMEpartons().first;
543  nMEFiltered=fJetMatchingPy8InternalHook->nMEpartons().second;
544  }
545 
546  // update LHE matching statistics
547  //
548  lheEvent()->count( lhef::LHERunInfo::kAccepted, 1.0, mergeweight );
549 
550  event().reset(new HepMC::GenEvent);
551  bool py8hepmc = toHepMC.fill_next_event( *(fMasterGen.get()), event().get());
552  if (!py8hepmc) {
553  return false;
554  }
555 
556  //add ckkw/umeps/unlops merging weight
557  if (mergeweight!=1.) {
558  event()->weights()[0] *= mergeweight;
559  }
560 
561  if (fEmissionVetoHook) {
562  nISRveto += fEmissionVetoHook->getNISRveto();
563  nFSRveto += fEmissionVetoHook->getNFSRveto();
564  }
565 
566  return true;
567 
568 
569 }
570 
571 
573 {
574 
575  Event* pythiaEvent = &(fMasterGen->event);
576 
577  int NPartsBeforeDecays = pythiaEvent->size();
578  int NPartsAfterDecays = event().get()->particles_size();
579 
580  if(NPartsAfterDecays == NPartsBeforeDecays) return true;
581 
582  HepMC::Pythia8ToHepMCA toHepMCA;
583  bool result = true;
584 
585  for ( int ipart=NPartsAfterDecays; ipart>NPartsBeforeDecays; ipart-- )
586  {
587 
588  HepMC::GenParticle* part = event().get()->barcode_to_particle( ipart );
589 
590  if ( part->status() == 1 && (fDecayer->particleData).canDecay(part->pdg_id()) )
591  {
592  fDecayer->event.reset();
593  Particle py8part( part->pdg_id(), 93, 0, 0, 0, 0, 0, 0,
594  part->momentum().x(),
595  part->momentum().y(),
596  part->momentum().z(),
597  part->momentum().t(),
598  part->generated_mass() );
599  HepMC::GenVertex* ProdVtx = part->production_vertex();
600  py8part.vProd( ProdVtx->position().x(), ProdVtx->position().y(),
601  ProdVtx->position().z(), ProdVtx->position().t() );
602  py8part.tau( (fDecayer->particleData).tau0( part->pdg_id() ) );
603  fDecayer->event.append( py8part );
604  int nentries = fDecayer->event.size();
605  if ( !fDecayer->event[nentries-1].mayDecay() ) continue;
606  fDecayer->next();
607  int nentries1 = fDecayer->event.size();
608  if ( nentries1 <= nentries ) continue; //same number of particles, no decays...
609 
610  part->set_status(2);
611 
612  result = toHepMCA.append_event( fDecayer->event, event().get(), part);
613 
614  }
615  }
616 
617  return result;
618 
619 }
620 
621 
623 {
624  bool lhe = lheEvent() != 0;
625 
626  // now create the GenEventInfo product from the GenEvent and fill
627  // the missing pieces
628  eventInfo().reset( new GenEventInfoProduct( event().get() ) );
629 
630  // in pythia pthat is used to subdivide samples into different bins
631  // in LHE mode the binning is done by the external ME generator
632  // which is likely not pthat, so only filling it for Py6 internal mode
633  if (!lhe) {
634  eventInfo()->setBinningValues(std::vector<double>(1, fMasterGen->info.pTHat()));
635  }
636 
637  eventInfo()->setDJR(DJR);
638  eventInfo()->setNMEPartons(nME);
639  eventInfo()->setNMEPartonsFiltered(nMEFiltered);
640 
641  //******** Verbosity ********
642 
643  if (maxEventsToPrint > 0 &&
647  if (pythiaPylistVerbosity) {
648  fMasterGen->info.list(std::cout);
649  fMasterGen->event.list(std::cout);
650  }
651 
652  if (pythiaHepMCVerbosity) {
653  std::cout << "Event process = "
654  << fMasterGen->info.code() << "\n"
655  << "----------------------" << std::endl;
656  event()->print();
657  }
659  std::cout << "Event process = "
660  << fMasterGen->info.code() << "\n"
661  << "----------------------" << std::endl;
662  ascii_io->write_event(event().get());
663  }
664  }
665 }
666 
669 
670 
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual bool residualDecay()
ParameterCollector fParameters
double comEnergy
Center-of-Mass energy.
std::auto_ptr< Pythia8::Pythia > fMasterGen
EmissionVetoHook1 * fEmissionVetoHook1
edm::GeneratorFilter< Pythia8Hadronizer, ExternalDecayDriver > Pythia8GeneratorFilter
bool initializeForInternalPartons() override
UserHooks * fReweightUserHook
HepMC::IO_AsciiParticles * ascii_io
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
void statistics() override
bool exists(std::string const &parameterName) const
checks if a parameter exists
Pythia8::JetMatchingMadgraph * fJetMatchingPy8InternalHook
void count(LHERunInfo::CountMode count, double weight=1.0, double matchWeight=1.0)
Definition: LHEEvent.cc:207
void setInternalXSec(const XSec &xsec)
uint16_t size_type
PowhegHooks * fEmissionVetoHook
virtual void beforeHadronization(lhef::LHEEvent *lhee)
double v[5][pyjets_maxn]
std::auto_ptr< HepMC::GenEvent > & event()
virtual std::vector< std::string > const & doSharedResources() const override
GenRunInfoProduct & runInfo()
std::auto_ptr< LHAupLesHouches > lhaUP
lhef::LHEEvent * lheEvent()
UserHooks * fReweightPtHatRapUserHook
tuple result
Definition: query.py:137
static const std::vector< std::string > p8SharedResources
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
unsigned int pythiaPylistVerbosity
const char * classname() const override
T min(T a, T b)
Definition: MathUtil.h:58
UserHooks * fReweightRapUserHook
std::auto_ptr< GenEventInfoProduct > & eventInfo()
lhef::LHERunInfo * lheRunInfo()
bool generatePartonsAndHadronize() override
virtual void init(lhef::LHERunInfo *runInfo)
Pythia8::amcnlo_unitarised_interface * fMergingHook
JetMatchingHook * fJetMatchingHook
part
Definition: HCALResponse.h:20
unsigned int maxEventsToPrint
std::auto_ptr< Pythia8::Pythia > fDecayer
Pythia8Hadronizer(const edm::ParameterSet &params)
vector< float > DJR
void resetMatchingStatus()
const_iterator end() const
const_iterator begin() const
HepMC::Pythia8ToHepMC toHepMC
tuple cout
Definition: gather_cfg.py:121
static const std::string kPythia8
void finalizeEvent() override
tuple status
Definition: ntuplemaker.py:245
virtual void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
bool append_event(Pythia8::Event &pyev, GenEvent *evt, GenParticle *rootpart, int ibarcode=-1, Pythia8::Info *pyinfo=0, Pythia8::Settings *pyset=0)
Definition: HepMCA2.h:74
edm::HadronizerFilter< Pythia8Hadronizer, ExternalDecayDriver > Pythia8HadronizerFilter