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"
13 
15 
17 
18 // PS matchning prototype
19 //
21 #include "Pythia8Plugins/JetMatching.h"
22 #include "Pythia8Plugins/aMCatNLOHooks.h"
23 
24 // Emission Veto Hooks
25 //
26 #include "Pythia8Plugins/PowhegHooks.h"
28 
34 
37 
41 
43 
44 #include "HepPID/ParticleIDTranslations.hh"
45 
47 
48 namespace CLHEP {
49  class HepRandomEngine;
50 }
51 
52 using namespace gen;
53 using namespace Pythia8;
54 
56 
57  public:
58 
59  Pythia8Hadronizer(const edm::ParameterSet &params);
61 
62  bool initializeForInternalPartons() override;
63  bool initializeForExternalPartons();
64 
65  bool generatePartonsAndHadronize() override;
66  bool hadronize();
67 
68  virtual bool residualDecay();
69 
70  void finalizeEvent() override;
71 
72  void statistics() override;
73 
74  const char *classname() const override { return "Pythia8Hadronizer"; }
75 
76  private:
77 
78  virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override { p8SetRandomEngine(v); }
79  virtual std::vector<std::string> const& doSharedResources() const override { return p8SharedResources; }
80 
82  double comEnergy;
83 
85  std::auto_ptr<LHAupLesHouches> lhaUP;
86 
87  enum { PP, PPbar, ElectronPositron };
88  int fInitialState ; // pp, ppbar, or e-e+
89 
90  double fBeam1PZ;
91  double fBeam2PZ;
92 
93  // Reweight user hooks
94  //
95  UserHooks* fReweightUserHook;
96  UserHooks* fReweightRapUserHook;
98 
99  // PS matching prototype
100  //
102  Pythia8::JetMatchingMadgraph *fJetMatchingPy8InternalHook;
103  Pythia8::amcnlo_unitarised_interface *fMergingHook;
104 
105  // Emission Veto Hooks
106  //
107  PowhegHooks* fEmissionVetoHook;
109 
118 
119  static const std::vector<std::string> p8SharedResources;
120 
122 
123  vector<float> DJR;
124  int nME;
126 
127  int nISRveto;
128  int nFSRveto;
129 
130  int NHooks;
131 };
132 
134 
136  BaseHadronizer(params), Py8InterfaceBase(params),
137  comEnergy(params.getParameter<double>("comEnergy")),
138  LHEInputFileName(params.getUntrackedParameter<string>("LHEInputFileName","")),
139  fInitialState(PP),
140  fReweightUserHook(0),fReweightRapUserHook(0),fReweightPtHatRapUserHook(0),
141  fJetMatchingHook(0),fJetMatchingPy8InternalHook(0), fMergingHook(0),
142  fEmissionVetoHook(0), fEmissionVetoHook1(0), nME(-1), nMEFiltered(-1), nISRveto(0), nFSRveto(0),
143  NHooks(0)
144 {
145 
146  // J.Y.: the following 3 parameters are hacked "for a reason"
147  //
148  if ( params.exists( "PPbarInitialState" ) )
149  {
150  if ( fInitialState == PP )
151  {
153  edm::LogImportant("GeneratorInterface|Pythia8Interface")
154  << "Pythia8 will be initialized for PROTON-ANTIPROTON INITIAL STATE. "
155  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state.";
156  }
157  else
158  {
159  // probably need to throw on attempt to override ?
160  }
161  }
162  else if ( params.exists( "ElectronPositronInitialState" ) )
163  {
164  if ( fInitialState == PP )
165  {
167  edm::LogInfo("GeneratorInterface|Pythia8Interface")
168  << "Pythia8 will be initialized for ELECTRON-POSITRON INITIAL STATE. "
169  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state.";
170  }
171  else
172  {
173  // probably need to throw on attempt to override ?
174  }
175  }
176  else if ( params.exists( "ElectronProtonInitialState" ) || params.exists( "PositronProtonInitialState" ) )
177  {
178  // throw on unknown initial state !
179  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
180  <<" UNKNOWN INITIAL STATE. \n The allowed initial states are: PP, PPbar, ElectronPositron \n";
181  }
182 
183  if( params.exists( "SLHAFileForPythia8" ) ) {
184  std::string slhafilenameshort = params.getParameter<string>("SLHAFileForPythia8");
185  edm::FileInPath f1( slhafilenameshort );
186  slhafile_ = f1.fullPath();
187 
188  fMasterGen->settings.mode("SLHA:readFrom", 2);
189  fMasterGen->settings.word("SLHA:file", slhafile_);
190 
192  line != fParameters.end(); ++line ) {
193  if (line->find("SLHA:file") != std::string::npos)
194  throw cms::Exception("PythiaError") << "Attempted to set SLHA file name twice, "
195  << "using Pythia8 card SLHA:file and Pythia8Interface card SLHAFileForPythia8"
196  << std::endl;
197  }
198  }
199 
200  // Reweight user hook
201  //
202  if( params.exists( "reweightGen" ) )
204  if( params.exists( "reweightGenRap" ) )
205  {
206  edm::LogInfo("Pythia8Interface") << "Start setup for reweightGenRap";
207  edm::ParameterSet rgrParams =
208  params.getParameter<edm::ParameterSet>("reweightGenRap");
210  new RapReweightUserHook(rgrParams.getParameter<std::string>("yLabSigmaFunc"),
211  rgrParams.getParameter<double>("yLabPower"),
212  rgrParams.getParameter<std::string>("yCMSigmaFunc"),
213  rgrParams.getParameter<double>("yCMPower"),
214  rgrParams.getParameter<double>("pTHatMin"),
215  rgrParams.getParameter<double>("pTHatMax"));
216  edm::LogInfo("Pythia8Interface") << "End setup for reweightGenRap";
217  }
218  if( params.exists( "reweightGenPtHatRap" ) )
219  {
220  edm::LogInfo("Pythia8Interface") << "Start setup for reweightGenPtHatRap";
221  edm::ParameterSet rgrParams =
222  params.getParameter<edm::ParameterSet>("reweightGenPtHatRap");
224  new PtHatRapReweightUserHook(rgrParams.getParameter<std::string>("yLabSigmaFunc"),
225  rgrParams.getParameter<double>("yLabPower"),
226  rgrParams.getParameter<std::string>("yCMSigmaFunc"),
227  rgrParams.getParameter<double>("yCMPower"),
228  rgrParams.getParameter<double>("pTHatMin"),
229  rgrParams.getParameter<double>("pTHatMax"));
230  edm::LogInfo("Pythia8Interface") << "End setup for reweightGenPtHatRap";
231  }
232 
233  if( params.exists( "useUserHook" ) )
234  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
235  <<" Obsolete parameter: useUserHook \n Please use the actual one instead \n";
236 
237  // PS matching prototype
238  //
239  if ( params.exists("jetMatching") )
240  {
241  edm::ParameterSet jmParams =
242  params.getUntrackedParameter<edm::ParameterSet>("jetMatching");
243  std::string scheme = jmParams.getParameter<std::string>("scheme");
244  if ( scheme == "Madgraph" || scheme == "MadgraphFastJet" )
245  {
246  fJetMatchingHook = new JetMatchingHook( jmParams, &fMasterGen->info );
247  }
248  }
249 
250  // Pythia8Interface emission veto
251  //
252  if ( params.exists("emissionVeto1") )
253  {
254  EV1_nFinal = -1;
255  if(params.exists("EV1_nFinal")) EV1_nFinal = params.getParameter<int>("EV1_nFinal");
256  EV1_vetoOn = true;
257  if(params.exists("EV1_vetoOn")) EV1_vetoOn = params.getParameter<bool>("EV1_vetoOn");
258  EV1_maxVetoCount = 10;
259  if(params.exists("EV1_maxVetoCount")) EV1_maxVetoCount = params.getParameter<int>("EV1_maxVetoCount");
260  EV1_pThardMode = 1;
261  if(params.exists("EV1_pThardMode")) EV1_pThardMode = params.getParameter<int>("EV1_pThardMode");
262  EV1_pTempMode = 0;
263  if(params.exists("EV1_pTempMode")) EV1_pTempMode = params.getParameter<int>("EV1_pTempMode");
264  if(EV1_pTempMode > 2 || EV1_pTempMode < 0)
265  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
266  <<" Wrong value for EV1_pTempMode code\n";
267  EV1_emittedMode = 0;
268  if(params.exists("EV1_emittedMode")) EV1_emittedMode = params.getParameter<int>("EV1_emittedMode");
269  EV1_pTdefMode = 1;
270  if(params.exists("EV1_pTdefMode")) EV1_pTdefMode = params.getParameter<int>("EV1_pTdefMode");
271  EV1_MPIvetoOn = false;
272  if(params.exists("EV1_MPIvetoOn")) EV1_MPIvetoOn = params.getParameter<bool>("EV1_MPIvetoOn");
276  }
277 
281  if(fJetMatchingHook) NHooks++;
283  if(NHooks > 1)
284  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
285  <<" Too many User Hooks. \n Please choose one from: reweightGen, reweightGenRap, reweightGenPtHatRap, jetMatching, emissionVeto1 \n";
286  if(fReweightUserHook) fMasterGen->setUserHooksPtr(fReweightUserHook);
289  if(fJetMatchingHook) fMasterGen->setUserHooksPtr(fJetMatchingHook);
290  if(fEmissionVetoHook1) {
291  edm::LogInfo("Pythia8Interface") << "Turning on Emission Veto Hook 1 from CMSSW Pythia8Interface";
292  fMasterGen->setUserHooksPtr(fEmissionVetoHook1);
293  }
294 
295 }
296 
297 
299 {
300 // do we need to delete UserHooks/JetMatchingHook here ???
303 }
304 
306 {
307 
308  bool status = true;
309 
310  if ( fInitialState == PP ) // default
311  {
312  //fMasterGen->init(2212, 2212, comEnergy);
313  fMasterGen->settings.mode("Beams:idA", 2212);
314  fMasterGen->settings.mode("Beams:idB", 2212);
315  fMasterGen->settings.parm("Beams:eCM", comEnergy);
316  status &= fMasterGen->init();
317  }
318  else if ( fInitialState == PPbar )
319  {
320  //fMasterGen->init(2212, -2212, comEnergy);
321  fMasterGen->settings.mode("Beams:idA", 2212);
322  fMasterGen->settings.mode("Beams:idB", -2212);
323  fMasterGen->settings.parm("Beams:eCM", comEnergy);
324  status &= fMasterGen->init();
325  }
326  else if ( fInitialState == ElectronPositron )
327  {
328  //fMasterGen->init(11, -11, comEnergy);
329  fMasterGen->settings.mode("Beams:idA", 11);
330  fMasterGen->settings.mode("Beams:idB", -11);
331  fMasterGen->settings.parm("Beams:eCM", comEnergy);
332  status &= fMasterGen->init();
333  }
334  else
335  {
336  // throw on unknown initial state !
337  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
338  <<" UNKNOWN INITIAL STATE. \n The allowed initial states are: PP, PPbar, ElectronPositron \n";
339  }
340 
341  fMasterGen->settings.listChanged();
342 
343  if ( pythiaPylistVerbosity > 10 )
344  {
345  if ( pythiaPylistVerbosity == 11 || pythiaPylistVerbosity == 13 )
346  fMasterGen->settings.listAll();
347  if ( pythiaPylistVerbosity == 12 || pythiaPylistVerbosity == 13 )
348  fMasterGen->particleData.listAll();
349  }
350 
351  // init decayer
352  //fDecayer->readString("ProcessLevel:all = off"); // trick
353  //fDecayer->readString("ProcessLevel::resonanceDecays=on");
354  fDecayer->settings.flag("ProcessLevel:all", false ); // trick
355  fDecayer->settings.flag("ProcessLevel:resonanceDecays", true );
356  status &= fDecayer->init();
357 
358  return status;
359 }
360 
361 
363 {
364 
365  edm::LogInfo("Pythia8Interface") << "Initializing for external partons";
366 
367  bool status = true;
368 
369  if((fMasterGen->settings.mode("POWHEG:veto") > 0 || fMasterGen->settings.mode("POWHEG:MPIveto") > 0) && !fEmissionVetoHook) {
370 
372  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
373  <<" Attempt to turn on PowhegHooks by pythia8 settings but there are incompatible hooks on \n Incompatible are : jetMatching, emissionVeto1 \n";
374 
375  fEmissionVetoHook = new PowhegHooks();
376 
377  edm::LogInfo("Pythia8Interface") << "Turning on Emission Veto Hook from pythia8 code";
378  fMasterGen->setUserHooksPtr(fEmissionVetoHook);
379 
380  }
381 
382  //adapted from main89.cc in pythia8 examples
383  bool internalMatching = fMasterGen->settings.flag("JetMatching:merge");
384  bool internalMerging = !(fMasterGen->settings.word("Merging:Process").compare("void")==0);
385 
386  if (internalMatching && internalMerging) {
387  throw edm::Exception(edm::errors::Configuration,"Pythia8Interface")
388  <<" Only one jet matching/merging scheme can be used at a time. \n";
389  }
390 
391  if (internalMatching && !fJetMatchingPy8InternalHook) {
392  fJetMatchingPy8InternalHook = new Pythia8::JetMatchingMadgraph;
393  fMasterGen->setUserHooksPtr(fJetMatchingPy8InternalHook);
394  }
395 
396  if (internalMerging && !fMergingHook) {
397  int scheme = ( fMasterGen->settings.flag("Merging:doUMEPSTree")
398  || fMasterGen->settings.flag("Merging:doUMEPSSubt")) ?
399  1 :
400  ( ( fMasterGen->settings.flag("Merging:doUNLOPSTree")
401  || fMasterGen->settings.flag("Merging:doUNLOPSSubt")
402  || fMasterGen->settings.flag("Merging:doUNLOPSLoop")
403  || fMasterGen->settings.flag("Merging:doUNLOPSSubtNLO")) ?
404  2 :
405  0 );
406  fMergingHook = new Pythia8::amcnlo_unitarised_interface(scheme);
407  fMasterGen->setUserHooksPtr(fMergingHook);
408  }
409 
410 
411  if(LHEInputFileName != string()) {
412 
413  edm::LogInfo("Pythia8Interface") << "Initialize direct pythia8 reading from LHE file "
414  << LHEInputFileName;
415  edm::LogInfo("Pythia8Interface") << "Some LHE information can be not stored";
416  //fMasterGen->init(LHEInputFileName);
417  fMasterGen->settings.mode("Beams:frameType", 4);
418  fMasterGen->settings.word("Beams:LHEF", LHEInputFileName);
419  status &= fMasterGen->init();
420 
421  } else {
422 
423  lhaUP.reset(new LHAupLesHouches());
424  lhaUP->loadRunInfo(lheRunInfo());
425 
426  if ( fJetMatchingHook )
427  {
429  }
430 
431  //fMasterGen->init(lhaUP.get());
432  fMasterGen->settings.mode("Beams:frameType", 5);
433  fMasterGen->setLHAupPtr(lhaUP.get());
434  status &= fMasterGen->init();
435  }
436 
437  if ( pythiaPylistVerbosity > 10 )
438  {
439  if ( pythiaPylistVerbosity == 11 || pythiaPylistVerbosity == 13 )
440  fMasterGen->settings.listAll();
441  if ( pythiaPylistVerbosity == 12 || pythiaPylistVerbosity == 13 )
442  fMasterGen->particleData.listAll();
443  }
444 
445  // init decayer
446  //fDecayer->readString("ProcessLevel:all = off"); // trick
447  //fDecayer->readString("ProcessLevel::resonanceDecays=on");
448  fDecayer->settings.flag("ProcessLevel:all", false ); // trick
449  fDecayer->settings.flag("ProcessLevel:resonanceDecays", true );
450  status &= fDecayer->init();
451 
452  return status;
453 }
454 
455 
457 {
458  fMasterGen->stat();
459 
460  if(fEmissionVetoHook) {
461  edm::LogPrint("Pythia8Interface") << "\n"
462  << "Number of ISR vetoed = " << nISRveto;
463  edm::LogPrint("Pythia8Interface")
464  << "Number of FSR vetoed = " << nFSRveto;
465  }
466 
467  double xsec = fMasterGen->info.sigmaGen(); // cross section in mb
468  xsec *= 1.0e9; // translate to pb (CMS/Gen "convention" as of May 2009)
469  double err = fMasterGen->info.sigmaErr(); // cross section err in mb
470  err *= 1.0e9; // translate to pb (CMS/Gen "convention" as of May 2009)
472 }
473 
474 
476 {
477 
478  if (!fMasterGen->next()) return false;
479 
480  event().reset(new HepMC::GenEvent);
481  return toHepMC.fill_next_event( *(fMasterGen.get()), event().get());
482 
483 }
484 
485 
487 {
488  DJR.resize(0);
489  nME = -1;
490  nMEFiltered = -1;
491  if(LHEInputFileName == string()) lhaUP->loadEvent(lheEvent());
492 
493  if ( fJetMatchingHook )
494  {
497  }
498 
499  bool py8next = fMasterGen->next();
500 
501  double mergeweight = fMasterGen.get()->info.mergingWeight();
502 
503  //protect against 0-weight from ckkw or similar
504  if (!py8next || std::abs(mergeweight)==0.)
505  {
506  lheEvent()->count( lhef::LHERunInfo::kSelected, 1.0, mergeweight );
507  event().reset();
508  return false;
509  }
510 
512  const std::vector<double> djrmatch = fJetMatchingPy8InternalHook->GetDJR();
513  //cap size of djr vector to save storage space (keep only up to first 6 elements)
514  unsigned int ndjr = std::min(djrmatch.size(), std::vector<double>::size_type(6));
515  for (unsigned int idjr=0; idjr<ndjr; ++idjr) {
516  DJR.push_back(djrmatch[idjr]);
517  }
518 
519  nME=fJetMatchingPy8InternalHook->nMEpartons().first;
520  nMEFiltered=fJetMatchingPy8InternalHook->nMEpartons().second;
521  }
522 
523  // update LHE matching statistics
524  //
525  lheEvent()->count( lhef::LHERunInfo::kAccepted, 1.0, mergeweight );
526 
527  event().reset(new HepMC::GenEvent);
528  bool py8hepmc = toHepMC.fill_next_event( *(fMasterGen.get()), event().get());
529  if (!py8hepmc) {
530  return false;
531  }
532 
533  //add ckkw merging weight
534  if (mergeweight!=1.) {
535  event()->weights().push_back(mergeweight);
536  }
537 
538  if (fEmissionVetoHook) {
539  nISRveto += fEmissionVetoHook->getNISRveto();
540  nFSRveto += fEmissionVetoHook->getNFSRveto();
541  }
542 
543  return true;
544 
545 
546 }
547 
548 
550 {
551 
552  Event* pythiaEvent = &(fMasterGen->event);
553 
554  int NPartsBeforeDecays = pythiaEvent->size();
555  int NPartsAfterDecays = event().get()->particles_size();
556  int NewBarcode = NPartsAfterDecays;
557 
558  for ( int ipart=NPartsAfterDecays; ipart>NPartsBeforeDecays; ipart-- )
559  {
560 
561  HepMC::GenParticle* part = event().get()->barcode_to_particle( ipart );
562 
563  if ( part->status() == 1 )
564  {
565  fDecayer->event.reset();
566  Particle py8part( part->pdg_id(), 93, 0, 0, 0, 0, 0, 0,
567  part->momentum().x(),
568  part->momentum().y(),
569  part->momentum().z(),
570  part->momentum().t(),
571  part->generated_mass() );
572  HepMC::GenVertex* ProdVtx = part->production_vertex();
573  py8part.vProd( ProdVtx->position().x(), ProdVtx->position().y(),
574  ProdVtx->position().z(), ProdVtx->position().t() );
575  py8part.tau( (fDecayer->particleData).tau0( part->pdg_id() ) );
576  fDecayer->event.append( py8part );
577  int nentries = fDecayer->event.size();
578  if ( !fDecayer->event[nentries-1].mayDecay() ) continue;
579  fDecayer->next();
580  int nentries1 = fDecayer->event.size();
581  if ( nentries1 <= nentries ) continue; //same number of particles, no decays...
582 
583  part->set_status(2);
584 
585  Particle& py8daughter = fDecayer->event[nentries]; // the 1st daughter
586  HepMC::GenVertex* DecVtx = new HepMC::GenVertex( HepMC::FourVector(py8daughter.xProd(),
587  py8daughter.yProd(),
588  py8daughter.zProd(),
589  py8daughter.tProd()) );
590 
591  DecVtx->add_particle_in( part ); // this will cleanup end_vertex if exists, replace with the new one
592  // I presume (vtx) barcode will be given automatically
593 
594  HepMC::FourVector pmom( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
595 
596  HepMC::GenParticle* daughter =
597  new HepMC::GenParticle( pmom, py8daughter.id(), 1 );
598 
599  NewBarcode++;
600  daughter->suggest_barcode( NewBarcode );
601  DecVtx->add_particle_out( daughter );
602 
603  for ( int ipart1=nentries+1; ipart1<nentries1; ipart1++ )
604  {
605  py8daughter = fDecayer->event[ipart1];
606  HepMC::FourVector pmomN( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
607  HepMC::GenParticle* daughterN =
608  new HepMC::GenParticle( pmomN, py8daughter.id(), 1 );
609  NewBarcode++;
610  daughterN->suggest_barcode( NewBarcode );
611  DecVtx->add_particle_out( daughterN );
612  }
613 
614  event().get()->add_vertex( DecVtx );
615 
616  }
617  }
618  return true;
619 
620 }
621 
622 
624 {
625  bool lhe = lheEvent() != 0;
626 
627  // now create the GenEventInfo product from the GenEvent and fill
628  // the missing pieces
629  eventInfo().reset( new GenEventInfoProduct( event().get() ) );
630 
631  // in pythia pthat is used to subdivide samples into different bins
632  // in LHE mode the binning is done by the external ME generator
633  // which is likely not pthat, so only filling it for Py6 internal mode
634  if (!lhe) {
635  eventInfo()->setBinningValues(std::vector<double>(1, fMasterGen->info.pTHat()));
636  }
637 
638  eventInfo()->setDJR(DJR);
639  eventInfo()->setNMEPartons(nME);
640  eventInfo()->setNMEPartonsFiltered(nMEFiltered);
641 
642  //******** Verbosity ********
643 
644  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  }
658  }
659 }
660 
663 
664 
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
#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
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
edm::HadronizerFilter< Pythia8Hadronizer, ExternalDecayDriver > Pythia8HadronizerFilter