CMS 3D CMS Logo

Pythia8Hadronizer.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <memory>
3 
4 #include <cstdint>
5 #include <memory>
6 #include <sstream>
7 #include <string>
8 #include <vector>
9 
10 #include "HepMC/GenEvent.h"
11 #include "HepMC/GenParticle.h"
12 
13 #include "Pythia8/Pythia.h"
14 #include "Pythia8Plugins/HepMC2.h"
15 
16 using namespace Pythia8;
17 
19 
20 #include "ReweightUserHooks.h"
22 #include "TopRecoilHook.h"
23 
24 // PS matchning prototype
25 //
27 #include "Pythia8Plugins/JetMatching.h"
28 #include "Pythia8Plugins/aMCatNLOHooks.h"
29 
30 // Emission Veto Hooks
31 //
32 #include "Pythia8Plugins/PowhegHooks.h"
34 
35 // Resonance scale hook
38 
39 //biased tau decayer
41 
42 //decay filter hook
44 
45 //decay filter hook
47 
48 // EvtGen plugin
49 //
50 #include "Pythia8Plugins/EvtGen.h"
51 
57 
60 
65 
67 
68 #include "HepPID/ParticleIDTranslations.hh"
69 
72 
73 namespace CLHEP {
74  class HepRandomEngine;
75 }
76 
77 using namespace gen;
78 
79 //Insert class for use w/ PDFPtr for proton-photon flux
80 //parameters hardcoded according to main70.cc in PYTHIA8 v3.10
81 class Nucleus2gamma2 : public Pythia8::PDF {
82 public:
83  // Constructor.
84  Nucleus2gamma2(int idBeamIn) : Pythia8::PDF(idBeamIn) {}
85 
86  // Update the photon flux.
87  void xfUpdate(int, double x, double) override {
88  // lead
89  double radius = 0; // radius in [fm]
90  double z = 0;
91  if (idBeam == 1000822080) {
92  radius = 6.636;
93  z = 82;
94  }
95  // oxygen
96  else if (idBeam == 80160) {
97  radius = 3.02;
98  z = 8;
99  }
100 
101  // Minimum impact parameter (~2*radius) [fm].
102  double bmin = 2 * radius;
103 
104  // Per-nucleon mass for lead.
105  double m2 = pow2(0.9314);
106  double alphaEM = 0.007297353080;
107  double hbarc = 0.197;
108  double xi = x * sqrt(m2) * bmin / hbarc;
109  double bK0 = besselK0(xi);
110  double bK1 = besselK1(xi);
111  double intB = xi * bK1 * bK0 - 0.5 * pow2(xi) * (pow2(bK1) - pow2(bK0));
112  xgamma = 2. * alphaEM * pow2(z) / M_PI * intB;
113  }
114 };
115 
117 public:
119  ~Pythia8Hadronizer() override;
120 
121  bool initializeForInternalPartons() override;
122  bool initializeForExternalPartons();
123 
124  bool generatePartonsAndHadronize() override;
125  bool hadronize();
126 
127  virtual bool residualDecay();
128 
129  void finalizeEvent() override;
130 
131  void statistics() override;
132 
133  const char *classname() const override { return "Pythia8Hadronizer"; }
134 
135  std::unique_ptr<GenLumiInfoHeader> getGenLumiInfoHeader() const override;
136 
137 private:
138  void doSetRandomEngine(CLHEP::HepRandomEngine *v) override { p8SetRandomEngine(v); }
139  std::vector<std::string> const &doSharedResources() const override { return p8SharedResources; }
140 
142  double comEnergy;
143 
145  std::shared_ptr<LHAupLesHouches> lhaUP;
146 
147  enum { PP, PPbar, ElectronPositron };
148  int fInitialState; // pp, ppbar, or e-e+
149 
150  double fBeam1PZ;
151  double fBeam2PZ;
152 
153  //PDFPtr for the photonFlux
154  //Following main70.cc example in PYTHIA8 v3.10
155  bool doProtonPhotonFlux = false;
156  Pythia8::PDFPtr photonFlux = nullptr;
157 
158  //helper class to allow multiple user hooks simultaneously
159  std::shared_ptr<UserHooksVector> fUserHooksVector;
161 
162  // Reweight user hooks
163  //
164  std::shared_ptr<UserHooks> fReweightUserHook;
165  std::shared_ptr<UserHooks> fReweightEmpUserHook;
166  std::shared_ptr<UserHooks> fReweightRapUserHook;
167  std::shared_ptr<UserHooks> fReweightPtHatRapUserHook;
168 
169  // PS matching prototype
170  //
171  std::shared_ptr<JetMatchingHook> fJetMatchingHook;
172  std::shared_ptr<Pythia8::JetMatchingMadgraph> fJetMatchingPy8InternalHook;
173  std::shared_ptr<Pythia8::amcnlo_unitarised_interface> fMergingHook;
174 
175  // Emission Veto Hooks
176  //
177  std::shared_ptr<PowhegHooks> fEmissionVetoHook;
178  std::shared_ptr<EmissionVetoHook1> fEmissionVetoHook1;
179 
180  // Resonance scale hook
181  std::shared_ptr<PowhegResHook> fPowhegResHook;
182  std::shared_ptr<PowhegHooksBB4L> fPowhegHooksBB4L;
183 
184  // biased tau decayer
185  std::shared_ptr<BiasedTauDecayer> fBiasedTauDecayer;
186 
187  //resonance decay filter hook
188  std::shared_ptr<ResonanceDecayFilterHook> fResonanceDecayFilterHook;
189 
190  //PT filter hook
191  std::shared_ptr<PTFilterHook> fPTFilterHook;
192 
193  //Generic customized hooks vector
194  std::shared_ptr<UserHooksVector> fCustomHooksVector;
195 
196  //RecoilToTop userhook
197  std::shared_ptr<TopRecoilHook> fTopRecoilHook;
198 
209 
210  static const std::vector<std::string> p8SharedResources;
211 
212  vector<float> DJR;
213  int nME;
215 
216  int nISRveto;
217  int nFSRveto;
218 };
219 
221 
224  comEnergy(params.getParameter<double>("comEnergy")),
225  LHEInputFileName(params.getUntrackedParameter<std::string>("LHEInputFileName", "")),
226  fInitialState(PP),
227  doProtonPhotonFlux(params.getUntrackedParameter<bool>("doProtonPhotonFlux", false)),
228  UserHooksSet(false),
229  nME(-1),
230  nMEFiltered(-1),
231  nISRveto(0),
232  nFSRveto(0) {
233  ivhepmc = 2;
234  // J.Y.: the following 3 parameters are hacked "for a reason"
235  //
236  if (params.exists("PPbarInitialState")) {
237  if (fInitialState == PP) {
239  edm::LogImportant("GeneratorInterface|Pythia8Interface")
240  << "Pythia8 will be initialized for PROTON-ANTIPROTON INITIAL STATE. "
241  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state.";
242  } else {
243  // probably need to throw on attempt to override ?
244  }
245  } else if (params.exists("ElectronPositronInitialState")) {
246  if (fInitialState == PP) {
248  edm::LogInfo("GeneratorInterface|Pythia8Interface")
249  << "Pythia8 will be initialized for ELECTRON-POSITRON INITIAL STATE. "
250  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state.";
251  } else {
252  // probably need to throw on attempt to override ?
253  }
254  } else if (params.exists("ElectronProtonInitialState") || params.exists("PositronProtonInitialState")) {
255  // throw on unknown initial state !
256  throw edm::Exception(edm::errors::Configuration, "Pythia8Interface")
257  << " UNKNOWN INITIAL STATE. \n The allowed initial states are: PP, PPbar, ElectronPositron \n";
258  }
259 
260  // avoid filling weights twice (from v8.30x)
261  toHepMC.set_store_weights(false);
262 
263  // Reweight user hook
264  //
265  if (params.exists("reweightGen")) {
266  edm::LogInfo("Pythia8Interface") << "Start setup for reweightGen";
267  edm::ParameterSet rgParams = params.getParameter<edm::ParameterSet>("reweightGen");
268  fReweightUserHook.reset(
269  new PtHatReweightUserHook(rgParams.getParameter<double>("pTRef"), rgParams.getParameter<double>("power")));
270  edm::LogInfo("Pythia8Interface") << "End setup for reweightGen";
271  }
272  if (params.exists("reweightGenEmp")) {
273  edm::LogInfo("Pythia8Interface") << "Start setup for reweightGenEmp";
274  edm::ParameterSet rgeParams = params.getParameter<edm::ParameterSet>("reweightGenEmp");
275 
276  std::string tuneName = "";
277  if (rgeParams.exists("tune"))
278  tuneName = rgeParams.getParameter<std::string>("tune");
279  fReweightEmpUserHook.reset(new PtHatEmpReweightUserHook(tuneName));
280  edm::LogInfo("Pythia8Interface") << "End setup for reweightGenEmp";
281  }
282  if (params.exists("reweightGenRap")) {
283  edm::LogInfo("Pythia8Interface") << "Start setup for reweightGenRap";
284  edm::ParameterSet rgrParams = params.getParameter<edm::ParameterSet>("reweightGenRap");
285  fReweightRapUserHook.reset(new RapReweightUserHook(rgrParams.getParameter<std::string>("yLabSigmaFunc"),
286  rgrParams.getParameter<double>("yLabPower"),
287  rgrParams.getParameter<std::string>("yCMSigmaFunc"),
288  rgrParams.getParameter<double>("yCMPower"),
289  rgrParams.getParameter<double>("pTHatMin"),
290  rgrParams.getParameter<double>("pTHatMax")));
291  edm::LogInfo("Pythia8Interface") << "End setup for reweightGenRap";
292  }
293  if (params.exists("reweightGenPtHatRap")) {
294  edm::LogInfo("Pythia8Interface") << "Start setup for reweightGenPtHatRap";
295  edm::ParameterSet rgrParams = params.getParameter<edm::ParameterSet>("reweightGenPtHatRap");
296  fReweightPtHatRapUserHook.reset(new PtHatRapReweightUserHook(rgrParams.getParameter<std::string>("yLabSigmaFunc"),
297  rgrParams.getParameter<double>("yLabPower"),
298  rgrParams.getParameter<std::string>("yCMSigmaFunc"),
299  rgrParams.getParameter<double>("yCMPower"),
300  rgrParams.getParameter<double>("pTHatMin"),
301  rgrParams.getParameter<double>("pTHatMax")));
302  edm::LogInfo("Pythia8Interface") << "End setup for reweightGenPtHatRap";
303  }
304 
305  if (params.exists("useUserHook"))
306  throw edm::Exception(edm::errors::Configuration, "Pythia8Interface")
307  << " Obsolete parameter: useUserHook \n Please use the actual one instead \n";
308 
309  // PS matching prototype
310  //
311  if (params.exists("jetMatching")) {
312  edm::ParameterSet jmParams = params.getUntrackedParameter<edm::ParameterSet>("jetMatching");
313  std::string scheme = jmParams.getParameter<std::string>("scheme");
314  if (scheme == "Madgraph" || scheme == "MadgraphFastJet") {
315  fJetMatchingHook.reset(new JetMatchingHook(jmParams, &fMasterGen->info));
316  }
317  }
318 
319  // Pythia8Interface emission veto
320  //
321  if (params.exists("emissionVeto1")) {
322  EV1_nFinal = -1;
323  if (params.exists("EV1_nFinal"))
324  EV1_nFinal = params.getParameter<int>("EV1_nFinal");
325  EV1_vetoOn = true;
326  if (params.exists("EV1_vetoOn"))
327  EV1_vetoOn = params.getParameter<bool>("EV1_vetoOn");
328  EV1_maxVetoCount = 10;
329  if (params.exists("EV1_maxVetoCount"))
330  EV1_maxVetoCount = params.getParameter<int>("EV1_maxVetoCount");
331  EV1_pThardMode = 1;
332  if (params.exists("EV1_pThardMode"))
333  EV1_pThardMode = params.getParameter<int>("EV1_pThardMode");
334  EV1_pTempMode = 0;
335  if (params.exists("EV1_pTempMode"))
336  EV1_pTempMode = params.getParameter<int>("EV1_pTempMode");
337  if (EV1_pTempMode > 2 || EV1_pTempMode < 0)
338  throw edm::Exception(edm::errors::Configuration, "Pythia8Interface") << " Wrong value for EV1_pTempMode code\n";
339  EV1_emittedMode = 0;
340  if (params.exists("EV1_emittedMode"))
341  EV1_emittedMode = params.getParameter<int>("EV1_emittedMode");
342  EV1_pTdefMode = 1;
343  if (params.exists("EV1_pTdefMode"))
344  EV1_pTdefMode = params.getParameter<int>("EV1_pTdefMode");
345  EV1_MPIvetoOn = false;
346  if (params.exists("EV1_MPIvetoOn"))
347  EV1_MPIvetoOn = params.getParameter<bool>("EV1_MPIvetoOn");
348  EV1_QEDvetoMode = 0;
349  if (params.exists("EV1_QEDvetoMode"))
350  EV1_QEDvetoMode = params.getParameter<int>("EV1_QEDvetoMode");
351  EV1_nFinalMode = 0;
352  if (params.exists("EV1_nFinalMode"))
353  EV1_nFinalMode = params.getParameter<int>("EV1_nFinalMode");
355  EV1_vetoOn,
364  0));
365  }
366 
367  if (params.exists("UserCustomization")) {
368  fCustomHooksVector = std::make_shared<UserHooksVector>();
369  const std::vector<edm::ParameterSet> userParams =
370  params.getParameter<std::vector<edm::ParameterSet>>("UserCustomization");
371  for (const auto &pluginParams : userParams) {
372  (fCustomHooksVector->hooks)
373  .push_back(
374  CustomHookFactory::get()->create(pluginParams.getParameter<std::string>("pluginName"), pluginParams));
375  }
376  }
377 
378  if (params.exists("VinciaPlugin")) {
379  throw edm::Exception(edm::errors::Configuration, "Pythia8Interface")
380  << " Obsolete parameter: VinciaPlugin \n Please use the parameter PartonShowers:model instead \n";
381  }
382  if (params.exists("DirePlugin")) {
383  throw edm::Exception(edm::errors::Configuration, "Pythia8Interface")
384  << " Obsolete parameter: DirePlugin \n Please use the parameter PartonShowers:model instead \n";
385  }
386 }
387 
389 
391  bool status = false, status1 = false;
392 
393  if (lheFile_.empty()) {
394  if (fInitialState == PP) // default
395  {
396  fMasterGen->settings.mode("Beams:idA", 2212);
397  fMasterGen->settings.mode("Beams:idB", 2212);
398  } else if (fInitialState == PPbar) {
399  fMasterGen->settings.mode("Beams:idA", 2212);
400  fMasterGen->settings.mode("Beams:idB", -2212);
401  } else if (fInitialState == ElectronPositron) {
402  fMasterGen->settings.mode("Beams:idA", 11);
403  fMasterGen->settings.mode("Beams:idB", -11);
404  } else {
405  // throw on unknown initial state !
406  throw edm::Exception(edm::errors::Configuration, "Pythia8Interface")
407  << " UNKNOWN INITIAL STATE. \n The allowed initial states are: PP, PPbar, ElectronPositron \n";
408  }
409  fMasterGen->settings.parm("Beams:eCM", comEnergy);
410  } else {
411  fMasterGen->settings.mode("Beams:frameType", 4);
412  fMasterGen->settings.word("Beams:LHEF", lheFile_);
413  }
414 
415  if (doProtonPhotonFlux) {
416  photonFlux = make_shared<Nucleus2gamma2>(1000822080);
417  fMasterGen->setPhotonFluxPtr(photonFlux, nullptr);
418  }
419 
420  if (!fUserHooksVector.get())
421  fUserHooksVector.reset(new UserHooksVector);
422  (fUserHooksVector->hooks).clear();
423 
424  if (fReweightUserHook.get())
425  (fUserHooksVector->hooks).push_back(fReweightUserHook);
426  if (fReweightEmpUserHook.get())
427  (fUserHooksVector->hooks).push_back(fReweightEmpUserHook);
428  if (fReweightRapUserHook.get())
429  (fUserHooksVector->hooks).push_back(fReweightRapUserHook);
430  if (fReweightPtHatRapUserHook.get())
431  (fUserHooksVector->hooks).push_back(fReweightPtHatRapUserHook);
432  if (fJetMatchingHook.get())
433  (fUserHooksVector->hooks).push_back(fJetMatchingHook);
434  if (fEmissionVetoHook1.get()) {
435  edm::LogInfo("Pythia8Interface") << "Turning on Emission Veto Hook 1 from CMSSW Pythia8Interface";
437  }
438 
439  if (fMasterGen->settings.mode("POWHEG:veto") > 0 || fMasterGen->settings.mode("POWHEG:MPIveto") > 0) {
440  if (fJetMatchingHook.get() || fEmissionVetoHook1.get())
441  throw edm::Exception(edm::errors::Configuration, "Pythia8Interface")
442  << " Attempt to turn on PowhegHooks by pythia8 settings but there are incompatible hooks on \n Incompatible "
443  "are : jetMatching, emissionVeto1 \n";
444 
445  if (!fEmissionVetoHook.get())
446  fEmissionVetoHook.reset(new PowhegHooks());
447 
448  edm::LogInfo("Pythia8Interface") << "Turning on Emission Veto Hook from pythia8 code";
450  }
451 
452  bool PowhegRes = fMasterGen->settings.flag("POWHEGres:calcScales");
453  if (PowhegRes) {
454  edm::LogInfo("Pythia8Interface") << "Turning on resonance scale setting from CMSSW Pythia8Interface";
455  if (!fPowhegResHook.get())
456  fPowhegResHook.reset(new PowhegResHook());
458  }
459 
460  bool PowhegBB4L = fMasterGen->settings.flag("POWHEG:bb4l");
461  if (PowhegBB4L) {
462  edm::LogInfo("Pythia8Interface") << "Turning on BB4l hook from CMSSW Pythia8Interface";
463  if (!fPowhegHooksBB4L.get())
464  fPowhegHooksBB4L.reset(new PowhegHooksBB4L());
466  }
467 
468  bool TopRecoilHook1 = fMasterGen->settings.flag("TopRecoilHook:doTopRecoilIn");
469  if (TopRecoilHook1) {
470  edm::LogInfo("Pythia8Interface") << "Turning on RecoilToTop hook from Pythia8Interface";
471  if (!fTopRecoilHook.get())
472  fTopRecoilHook.reset(new TopRecoilHook());
474  }
475 
476  //adapted from main89.cc in pythia8 examples
477  bool internalMatching = fMasterGen->settings.flag("JetMatching:merge");
478  bool internalMerging = !(fMasterGen->settings.word("Merging:Process") == "void");
479 
480  if (internalMatching && internalMerging) {
481  throw edm::Exception(edm::errors::Configuration, "Pythia8Interface")
482  << " Only one jet matching/merging scheme can be used at a time. \n";
483  }
484 
485  if (internalMatching) {
486  if (!fJetMatchingPy8InternalHook.get())
487  fJetMatchingPy8InternalHook.reset(new Pythia8::JetMatchingMadgraph);
489  }
490 
491  if (internalMerging) {
492  int scheme = (fMasterGen->settings.flag("Merging:doUMEPSTree") || fMasterGen->settings.flag("Merging:doUMEPSSubt"))
493  ? 1
494  : ((fMasterGen->settings.flag("Merging:doUNLOPSTree") ||
495  fMasterGen->settings.flag("Merging:doUNLOPSSubt") ||
496  fMasterGen->settings.flag("Merging:doUNLOPSLoop") ||
497  fMasterGen->settings.flag("Merging:doUNLOPSSubtNLO"))
498  ? 2
499  : 0);
500  if (!fMergingHook.get())
501  fMergingHook.reset(new Pythia8::amcnlo_unitarised_interface(scheme));
503  }
504 
505  bool biasedTauDecayer = fMasterGen->settings.flag("BiasedTauDecayer:filter");
506  if (biasedTauDecayer) {
507  if (!fBiasedTauDecayer.get()) {
508  Pythia8::Info localInfo = fMasterGen->info;
509  fBiasedTauDecayer.reset(new BiasedTauDecayer(&localInfo, &(fMasterGen->settings)));
510  }
511  std::vector<int> handledParticles;
512  handledParticles.push_back(15);
513  fMasterGen->setDecayPtr(fBiasedTauDecayer, handledParticles);
514  }
515 
516  bool resonanceDecayFilter = fMasterGen->settings.flag("ResonanceDecayFilter:filter");
517  if (resonanceDecayFilter) {
520  }
521 
522  bool PTFilter = fMasterGen->settings.flag("PTFilter:filter");
523  if (PTFilter) {
524  fPTFilterHook.reset(new PTFilterHook);
526  }
527 
528  if (!(fUserHooksVector->hooks).empty() && !UserHooksSet) {
529  for (auto &fUserHook : fUserHooksVector->hooks) {
530  fMasterGen->addUserHooksPtr(fUserHook);
531  }
532  UserHooksSet = true;
533  }
534 
535  if (fCustomHooksVector.get()) {
536  edm::LogInfo("Pythia8Interface") << "Adding customized user hooks";
537  for (const auto &fUserHook : fCustomHooksVector->hooks) {
538  fMasterGen->addUserHooksPtr(fUserHook);
539  }
540  }
541 
542  edm::LogInfo("Pythia8Interface") << "Initializing MasterGen";
543  status = fMasterGen->init();
544 
545  //clean up temp file
546  if (!slhafile_.empty()) {
547  std::remove(slhafile_.c_str());
548  }
549 
550  if (pythiaPylistVerbosity > 10) {
551  if (pythiaPylistVerbosity == 11 || pythiaPylistVerbosity == 13)
552  fMasterGen->settings.listAll();
553  if (pythiaPylistVerbosity == 12 || pythiaPylistVerbosity == 13)
554  fMasterGen->particleData.listAll();
555  }
556 
557  // init decayer
558  fDecayer->settings.flag("ProcessLevel:all", false); // trick
559  fDecayer->settings.flag("ProcessLevel:resonanceDecays", true);
560  edm::LogInfo("Pythia8Interface") << "Initializing Decayer";
561  status1 = fDecayer->init();
562 
563  if (useEvtGen) {
564  edm::LogInfo("Pythia8Hadronizer") << "Creating and initializing pythia8 EvtGen plugin";
565  if (!evtgenDecays.get()) {
566  evtgenDecays.reset(new EvtGenDecays(fMasterGen.get(), evtgenDecFile, evtgenPdlFile));
567  for (unsigned int i = 0; i < evtgenUserFiles.size(); i++)
568  evtgenDecays->readDecayFile(evtgenUserFiles.at(i));
569  }
570  }
571 
572  return (status && status1);
573 }
574 
576  edm::LogInfo("Pythia8Interface") << "Initializing for external partons";
577 
578  bool status = false, status1 = false;
579 
580  if (!fUserHooksVector.get())
581  fUserHooksVector.reset(new UserHooksVector);
582  (fUserHooksVector->hooks).clear();
583 
584  if (fReweightUserHook.get())
585  (fUserHooksVector->hooks).push_back(fReweightUserHook);
586  if (fReweightEmpUserHook.get())
587  (fUserHooksVector->hooks).push_back(fReweightEmpUserHook);
588  if (fReweightRapUserHook.get())
589  (fUserHooksVector->hooks).push_back(fReweightRapUserHook);
590  if (fReweightPtHatRapUserHook.get())
591  (fUserHooksVector->hooks).push_back(fReweightPtHatRapUserHook);
592  if (fJetMatchingHook.get())
593  (fUserHooksVector->hooks).push_back(fJetMatchingHook);
594  if (fEmissionVetoHook1.get()) {
595  edm::LogInfo("Pythia8Interface") << "Turning on Emission Veto Hook 1 from CMSSW Pythia8Interface";
597  }
598 
599  if (fCustomHooksVector.get()) {
600  edm::LogInfo("Pythia8Interface") << "Adding customized user hook";
601  for (const auto &fUserHook : fCustomHooksVector->hooks) {
602  (fUserHooksVector->hooks).push_back(fUserHook);
603  }
604  }
605 
606  if (fMasterGen->settings.mode("POWHEG:veto") > 0 || fMasterGen->settings.mode("POWHEG:MPIveto") > 0) {
607  if (fJetMatchingHook.get() || fEmissionVetoHook1.get())
608  throw edm::Exception(edm::errors::Configuration, "Pythia8Interface")
609  << " Attempt to turn on PowhegHooks by pythia8 settings but there are incompatible hooks on \n Incompatible "
610  "are : jetMatching, emissionVeto1 \n";
611 
612  if (!fEmissionVetoHook.get())
613  fEmissionVetoHook.reset(new PowhegHooks());
614 
615  edm::LogInfo("Pythia8Interface") << "Turning on Emission Veto Hook from pythia8 code";
617  }
618 
619  bool PowhegRes = fMasterGen->settings.flag("POWHEGres:calcScales");
620  if (PowhegRes) {
621  edm::LogInfo("Pythia8Interface") << "Turning on resonance scale setting from CMSSW Pythia8Interface";
622  if (!fPowhegResHook.get())
623  fPowhegResHook.reset(new PowhegResHook());
625  }
626 
627  bool PowhegBB4L = fMasterGen->settings.flag("POWHEG:bb4l");
628  if (PowhegBB4L) {
629  edm::LogInfo("Pythia8Interface") << "Turning on BB4l hook from CMSSW Pythia8Interface";
630  if (!fPowhegHooksBB4L.get())
631  fPowhegHooksBB4L.reset(new PowhegHooksBB4L());
633  }
634 
635  bool TopRecoilHook1 = fMasterGen->settings.flag("TopRecoilHook:doTopRecoilIn");
636  if (TopRecoilHook1) {
637  edm::LogInfo("Pythia8Interface") << "Turning on RecoilToTop hook from Pythia8Interface";
638  if (!fTopRecoilHook.get())
639  fTopRecoilHook.reset(new TopRecoilHook());
641  }
642 
643  //adapted from main89.cc in pythia8 examples
644  bool internalMatching = fMasterGen->settings.flag("JetMatching:merge");
645  bool internalMerging = !(fMasterGen->settings.word("Merging:Process") == "void");
646 
647  if (internalMatching && internalMerging) {
648  throw edm::Exception(edm::errors::Configuration, "Pythia8Interface")
649  << " Only one jet matching/merging scheme can be used at a time. \n";
650  }
651 
652  if (internalMatching) {
653  if (!fJetMatchingPy8InternalHook.get())
654  fJetMatchingPy8InternalHook.reset(new Pythia8::JetMatchingMadgraph);
656  }
657 
658  if (internalMerging) {
659  int scheme = (fMasterGen->settings.flag("Merging:doUMEPSTree") || fMasterGen->settings.flag("Merging:doUMEPSSubt"))
660  ? 1
661  : ((fMasterGen->settings.flag("Merging:doUNLOPSTree") ||
662  fMasterGen->settings.flag("Merging:doUNLOPSSubt") ||
663  fMasterGen->settings.flag("Merging:doUNLOPSLoop") ||
664  fMasterGen->settings.flag("Merging:doUNLOPSSubtNLO"))
665  ? 2
666  : 0);
667  if (!fMergingHook.get())
668  fMergingHook.reset(new Pythia8::amcnlo_unitarised_interface(scheme));
670  }
671 
672  bool biasedTauDecayer = fMasterGen->settings.flag("BiasedTauDecayer:filter");
673  if (biasedTauDecayer) {
674  if (!fBiasedTauDecayer.get()) {
675  Pythia8::Info localInfo = fMasterGen->info;
676  fBiasedTauDecayer.reset(new BiasedTauDecayer(&localInfo, &(fMasterGen->settings)));
677  }
678  std::vector<int> handledParticles;
679  handledParticles.push_back(15);
680  fMasterGen->setDecayPtr(fBiasedTauDecayer, handledParticles);
681  }
682 
683  bool resonanceDecayFilter = fMasterGen->settings.flag("ResonanceDecayFilter:filter");
684  if (resonanceDecayFilter) {
687  }
688 
689  bool PTFilter = fMasterGen->settings.flag("PTFilter:filter");
690  if (PTFilter) {
691  fPTFilterHook.reset(new PTFilterHook);
693  }
694 
695  if (!(fUserHooksVector->hooks).empty() && !UserHooksSet) {
696  for (auto &fUserHook : fUserHooksVector->hooks) {
697  fMasterGen->addUserHooksPtr(fUserHook);
698  }
699  UserHooksSet = true;
700  }
701 
702  if (!LHEInputFileName.empty()) {
703  edm::LogInfo("Pythia8Interface") << "Initialize direct pythia8 reading from LHE file " << LHEInputFileName;
704  edm::LogInfo("Pythia8Interface") << "Some LHE information can be not stored";
705  fMasterGen->settings.mode("Beams:frameType", 4);
706  fMasterGen->settings.word("Beams:LHEF", LHEInputFileName);
707  status = fMasterGen->init();
708 
709  } else {
710  lhaUP.reset(new LHAupLesHouches());
711  lhaUP->setScalesFromLHEF(fMasterGen->settings.flag("Beams:setProductionScalesFromLHEF"));
712  lhaUP->loadRunInfo(lheRunInfo());
713 
714  if (fJetMatchingHook.get()) {
715  fJetMatchingHook->init(lheRunInfo());
716  }
717 
718  fMasterGen->settings.mode("Beams:frameType", 5);
719  fMasterGen->setLHAupPtr(lhaUP);
720  edm::LogInfo("Pythia8Interface") << "Initializing MasterGen";
721  status = fMasterGen->init();
722  }
723 
724  //clean up temp file
725  if (!slhafile_.empty()) {
726  std::remove(slhafile_.c_str());
727  }
728 
729  if (pythiaPylistVerbosity > 10) {
730  if (pythiaPylistVerbosity == 11 || pythiaPylistVerbosity == 13)
731  fMasterGen->settings.listAll();
732  if (pythiaPylistVerbosity == 12 || pythiaPylistVerbosity == 13)
733  fMasterGen->particleData.listAll();
734  }
735 
736  // init decayer
737  fDecayer->settings.flag("ProcessLevel:all", false); // trick
738  fDecayer->settings.flag("ProcessLevel:resonanceDecays", true);
739  edm::LogInfo("Pythia8Interface") << "Initializing Decayer";
740  status1 = fDecayer->init();
741 
742  if (useEvtGen) {
743  edm::LogInfo("Pythia8Hadronizer") << "Creating and initializing pythia8 EvtGen plugin";
744  if (!evtgenDecays.get()) {
745  evtgenDecays.reset(new EvtGenDecays(fMasterGen.get(), evtgenDecFile, evtgenPdlFile));
746  for (unsigned int i = 0; i < evtgenUserFiles.size(); i++)
747  evtgenDecays->readDecayFile(evtgenUserFiles.at(i));
748  }
749  }
750 
751  return (status && status1);
752 }
753 
755  fMasterGen->stat();
756 
757  if (fEmissionVetoHook.get()) {
758  edm::LogPrint("Pythia8Interface") << "\n"
759  << "Number of ISR vetoed = " << nISRveto;
760  edm::LogPrint("Pythia8Interface") << "Number of FSR vetoed = " << nFSRveto;
761  }
762 
763  double xsec = fMasterGen->info.sigmaGen(); // cross section in mb
764  xsec *= 1.0e9; // translate to pb (CMS/Gen "convention" as of May 2009)
765  double err = fMasterGen->info.sigmaErr(); // cross section err in mb
766  err *= 1.0e9; // translate to pb (CMS/Gen "convention" as of May 2009)
768 }
769 
771  DJR.resize(0);
772  nME = -1;
773  nMEFiltered = -1;
774 
775  if (fJetMatchingHook.get()) {
776  fJetMatchingHook->resetMatchingStatus();
777  fJetMatchingHook->beforeHadronization(lheEvent());
778  }
779 
780  if (!fMasterGen->next())
781  return false;
782 
783  double mergeweight = fMasterGen.get()->info.mergingWeightNLO();
784  if (fMergingHook.get()) {
785  mergeweight *= fMergingHook->getNormFactor();
786  }
787 
788  //protect against 0-weight from ckkw or similar
789  if (std::abs(mergeweight) == 0.) {
790  event().reset();
791  return false;
792  }
793 
794  if (fJetMatchingPy8InternalHook.get()) {
795  const std::vector<double> djrmatch = fJetMatchingPy8InternalHook->getDJR();
796  //cap size of djr vector to save storage space (keep only up to first 6 elements)
797  unsigned int ndjr = std::min(djrmatch.size(), std::vector<double>::size_type(6));
798  for (unsigned int idjr = 0; idjr < ndjr; ++idjr) {
799  DJR.push_back(djrmatch[idjr]);
800  }
801 
802  nME = fJetMatchingPy8InternalHook->nMEpartons().first;
803  nMEFiltered = fJetMatchingPy8InternalHook->nMEpartons().second;
804  }
805 
806  if (evtgenDecays.get())
807  evtgenDecays->decay();
808 
809  event() = std::make_unique<HepMC::GenEvent>();
810  bool py8hepmc = toHepMC.fill_next_event(*(fMasterGen.get()), event().get());
811 
812  if (!py8hepmc) {
813  return false;
814  }
815 
816  // 0th weight is not filled anymore since v8.30x, pushback manually
817  event()->weights().push_back(fMasterGen->info.weight());
818 
819  //add ckkw/umeps/unlops merging weight
820  if (mergeweight != 1.) {
821  event()->weights()[0] *= mergeweight;
822  }
823 
824  if (fEmissionVetoHook.get()) {
825  nISRveto += fEmissionVetoHook->getNISRveto();
826  nFSRveto += fEmissionVetoHook->getNFSRveto();
827  }
828 
829  //fill additional weights for systematic uncertainties
830  if (fMasterGen->info.getWeightsDetailedSize() > 0) {
831  for (const string &key : fMasterGen->info.initrwgt->weightsKeys) {
832  double wgt = (*fMasterGen->info.weights_detailed)[key];
833  event()->weights().push_back(wgt);
834  }
835  } else if (fMasterGen->info.getWeightsCompressedSize() > 0) {
836  for (unsigned int i = 0; i < fMasterGen->info.getWeightsCompressedSize(); i++) {
837  double wgt = fMasterGen->info.getWeightsCompressedValue(i);
838  event()->weights().push_back(wgt);
839  }
840  }
841 
842  // fill shower weights
843  // http://home.thep.lu.se/~torbjorn/pythia82html/Variations.html
844  if (fMasterGen->info.nWeights() > 1) {
845  for (int i = 0; i < fMasterGen->info.nWeights(); ++i) {
846  double wgt = fMasterGen->info.weight(i);
847  event()->weights().push_back(wgt);
848  }
849  }
850 
851 #if 0
852  // VINCIA shower weights
853  // http://vincia.hepforge.org/current/share/Vincia/htmldoc/VinciaUncertainties.html
854  if (fvincia.get()) {
855  event()->weights()[0] *= fvincia->weight(0);
856  for (int iVar = 1; iVar < fvincia->nWeights(); iVar++) {
857  event()->weights().push_back(fvincia->weight(iVar));
858  }
859  }
860 
861  // Retrieve Dire shower weights
862  if (fDire.get()) {
863  fDire->weightsPtr->calcWeight(0.);
864  fDire->weightsPtr->reset();
865 
866  //Make sure the base weight comes first
867  event()->weights()[0] *= fDire->weightsPtr->getShowerWeight("base");
868 
869  unordered_map<string, double>::iterator it;
870  for (it = fDire->weightsPtr->getShowerWeights()->begin(); it != fDire->weightsPtr->getShowerWeights()->end();
871  it++) {
872  if (it->first == "base")
873  continue;
874  event()->weights().push_back(it->second);
875  }
876  }
877 #endif
878 
879  return true;
880 }
881 
883  DJR.resize(0);
884  nME = -1;
885  nMEFiltered = -1;
886  if (LHEInputFileName.empty())
887  lhaUP->loadEvent(lheEvent());
888 
889  if (fJetMatchingHook.get()) {
890  fJetMatchingHook->resetMatchingStatus();
891  fJetMatchingHook->beforeHadronization(lheEvent());
892  }
893 
894  bool py8next = fMasterGen->next();
895 
896  double mergeweight = fMasterGen.get()->info.mergingWeightNLO();
897  if (fMergingHook.get()) {
898  mergeweight *= fMergingHook->getNormFactor();
899  }
900 
901  //protect against 0-weight from ckkw or similar
902  if (!py8next || std::abs(mergeweight) == 0.) {
903  lheEvent()->count(lhef::LHERunInfo::kSelected, 1.0, mergeweight);
904  event().reset();
905  return false;
906  }
907 
908  if (fJetMatchingPy8InternalHook.get()) {
909  const std::vector<double> djrmatch = fJetMatchingPy8InternalHook->getDJR();
910  //cap size of djr vector to save storage space (keep only up to first 6 elements)
911  unsigned int ndjr = std::min(djrmatch.size(), std::vector<double>::size_type(6));
912  for (unsigned int idjr = 0; idjr < ndjr; ++idjr) {
913  DJR.push_back(djrmatch[idjr]);
914  }
915 
916  nME = fJetMatchingPy8InternalHook->nMEpartons().first;
917  nMEFiltered = fJetMatchingPy8InternalHook->nMEpartons().second;
918  }
919 
920  // update LHE matching statistics
921  //
922  lheEvent()->count(lhef::LHERunInfo::kAccepted, 1.0, mergeweight);
923 
924  if (evtgenDecays.get())
925  evtgenDecays->decay();
926 
927  event() = std::make_unique<HepMC::GenEvent>();
928 
929  bool py8hepmc = toHepMC.fill_next_event(*(fMasterGen.get()), event().get());
930 
931  if (!py8hepmc) {
932  return false;
933  }
934 
935  // 0th weight is not filled anymore since v8.30x, pushback manually
936  event()->weights().push_back(fMasterGen->info.weight());
937 
938  //add ckkw/umeps/unlops merging weight
939  if (mergeweight != 1.) {
940  event()->weights()[0] *= mergeweight;
941  }
942 
943  if (fEmissionVetoHook.get()) {
944  nISRveto += fEmissionVetoHook->getNISRveto();
945  nFSRveto += fEmissionVetoHook->getNFSRveto();
946  }
947 
948  // fill shower weights
949  // http://home.thep.lu.se/~torbjorn/pythia82html/Variations.html
950  if (fMasterGen->info.nWeights() > 1) {
951  for (int i = 0; i < fMasterGen->info.nWeights(); ++i) {
952  double wgt = fMasterGen->info.weight(i);
953  event()->weights().push_back(wgt);
954  }
955  }
956 
957  return true;
958 }
959 
961  Event *pythiaEvent = &(fMasterGen->event);
962 
963  int NPartsBeforeDecays = pythiaEvent->size();
964  int NPartsAfterDecays = event().get()->particles_size();
965 
966  if (NPartsAfterDecays == NPartsBeforeDecays)
967  return true;
968 
969  bool result = true;
970 
971  for (int ipart = NPartsAfterDecays; ipart > NPartsBeforeDecays; ipart--) {
972  HepMC::GenParticle *part = event().get()->barcode_to_particle(ipart);
973 
974  if (part->status() == 1 && (fDecayer->particleData).canDecay(part->pdg_id())) {
975  fDecayer->event.reset();
976  Particle py8part(part->pdg_id(),
977  93,
978  0,
979  0,
980  0,
981  0,
982  0,
983  0,
984  part->momentum().x(),
985  part->momentum().y(),
986  part->momentum().z(),
987  part->momentum().t(),
988  part->generated_mass());
989  HepMC::GenVertex *ProdVtx = part->production_vertex();
990  py8part.vProd(ProdVtx->position().x(), ProdVtx->position().y(), ProdVtx->position().z(), ProdVtx->position().t());
991  py8part.tau((fDecayer->particleData).tau0(part->pdg_id()));
992  fDecayer->event.append(py8part);
993  int nentries = fDecayer->event.size();
994  if (!fDecayer->event[nentries - 1].mayDecay())
995  continue;
996  fDecayer->next();
997  int nentries1 = fDecayer->event.size();
998  if (nentries1 <= nentries)
999  continue; //same number of particles, no decays...
1000 
1001  part->set_status(2);
1002 
1003  result = toHepMC.fill_next_event(*(fDecayer.get()), event().get(), -1, true, part);
1004  }
1005  }
1006 
1007  return result;
1008 }
1009 
1011  bool lhe = lheEvent() != nullptr;
1012 
1013  // protection against empty weight container
1014  if ((event()->weights()).empty())
1015  (event()->weights()).push_back(1.);
1016 
1017  // now create the GenEventInfo product from the GenEvent and fill
1018  // the missing pieces
1019  eventInfo() = std::make_unique<GenEventInfoProduct>(event().get());
1020 
1021  // in pythia pthat is used to subdivide samples into different bins
1022  // in LHE mode the binning is done by the external ME generator
1023  // which is likely not pthat, so only filling it for Py6 internal mode
1024  if (!lhe) {
1025  eventInfo()->setBinningValues(std::vector<double>(1, fMasterGen->info.pTHat()));
1026  }
1027 
1028  eventInfo()->setDJR(DJR);
1029  eventInfo()->setNMEPartons(nME);
1030  eventInfo()->setNMEPartonsFiltered(nMEFiltered);
1031 
1032  //******** Verbosity ********
1033 
1035  maxEventsToPrint--;
1036  if (pythiaPylistVerbosity) {
1037  fMasterGen->info.list();
1038  fMasterGen->event.list();
1039  }
1040 
1041  if (pythiaHepMCVerbosity) {
1042  std::cout << "Event process = " << fMasterGen->info.code() << "\n"
1043  << "----------------------" << std::endl;
1044  event()->print();
1045  }
1047  std::cout << "Event process = " << fMasterGen->info.code() << "\n"
1048  << "----------------------" << std::endl;
1049  ascii_io->write_event(event().get());
1050  }
1051  }
1052 }
1053 
1054 std::unique_ptr<GenLumiInfoHeader> Pythia8Hadronizer::getGenLumiInfoHeader() const {
1055  auto genLumiInfoHeader = BaseHadronizer::getGenLumiInfoHeader();
1056 
1057  //fill lhe headers
1058  //*FIXME* initrwgt header is corrupt due to pythia bug
1059  for (const std::string &key : fMasterGen->info.headerKeys()) {
1060  genLumiInfoHeader->lheHeaders().emplace_back(key, fMasterGen->info.header(key));
1061  }
1062 
1063  //check, if it is not only nominal weight
1064  int weights_number = fMasterGen->info.nWeights();
1065  if (fMasterGen->info.initrwgt)
1066  weights_number += fMasterGen->info.initrwgt->weightsKeys.size();
1067  if (weights_number > 1) {
1068  genLumiInfoHeader->weightNames().reserve(weights_number + 1);
1069  genLumiInfoHeader->weightNames().push_back("nominal");
1070  }
1071 
1072  //fill weight names
1073  if (fMasterGen->info.initrwgt) {
1074  for (const std::string &key : fMasterGen->info.initrwgt->weightsKeys) {
1075  std::string weightgroupname;
1076  for (const auto &wgtgrp : fMasterGen->info.initrwgt->weightgroups) {
1077  const auto &wgtgrpwgt = wgtgrp.second.weights.find(key);
1078  if (wgtgrpwgt != wgtgrp.second.weights.end()) {
1079  weightgroupname = wgtgrp.first;
1080  }
1081  }
1082 
1083  std::ostringstream weightname;
1084  weightname << "LHE, id = " << key << ", ";
1085  if (!weightgroupname.empty()) {
1086  weightname << "group = " << weightgroupname << ", ";
1087  }
1088  weightname << fMasterGen->info.initrwgt->weights[key].contents;
1089  genLumiInfoHeader->weightNames().push_back(weightname.str());
1090  }
1091  }
1092 
1093  //fill shower labels
1094  // http://home.thep.lu.se/~torbjorn/pythia82html/Variations.html
1095  // http://home.thep.lu.se/~torbjorn/doxygen/classPythia8_1_1Info.html
1096  if (fMasterGen->info.nWeights() > 1) {
1097  for (int i = 0; i < fMasterGen->info.nWeights(); ++i) {
1098  genLumiInfoHeader->weightNames().push_back(fMasterGen->info.weightLabel(i));
1099  }
1100  }
1101 
1102 #if 0
1103  // VINCIA shower weights
1104  // http://vincia.hepforge.org/current/share/Vincia/htmldoc/VinciaUncertainties.html
1105  if (fvincia.get()) {
1106  for (int iVar = 0; iVar < fvincia->nWeights(); iVar++) {
1107  genLumiInfoHeader->weightNames().push_back(fvincia->weightLabel(iVar));
1108  }
1109  }
1110 
1111  if (fDire.get()) {
1112  //Make sure the base weight comes first
1113  genLumiInfoHeader->weightNames().push_back("base");
1114 
1115  unordered_map<string, double>::iterator it;
1116  for (it = fDire->weightsPtr->getShowerWeights()->begin(); it != fDire->weightsPtr->getShowerWeights()->end();
1117  it++) {
1118  if (it->first == "base")
1119  continue;
1120  genLumiInfoHeader->weightNames().push_back(it->first);
1121  }
1122  }
1123 #endif
1124 
1125  return genLumiInfoHeader;
1126 }
1127 
1130 
1133 
1137 
edm::ConcurrentGeneratorFilter< Pythia8Hadronizer, ConcurrentExternalDecayDriver > Pythia8ConcurrentGeneratorFilter
std::shared_ptr< PowhegHooksBB4L > fPowhegHooksBB4L
virtual bool residualDecay()
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
double comEnergy
Center-of-Mass energy.
std::shared_ptr< PowhegHooks > fEmissionVetoHook
std::shared_ptr< EmissionVetoHook1 > fEmissionVetoHook1
std::shared_ptr< BiasedTauDecayer > fBiasedTauDecayer
std::shared_ptr< Pythia8::EvtGenDecays > evtgenDecays
std::unique_ptr< Pythia8::Pythia > fDecayer
edm::GeneratorFilter< Pythia8Hadronizer, ExternalDecayDriver > Pythia8GeneratorFilter
bool initializeForInternalPartons() override
std::shared_ptr< TopRecoilHook > fTopRecoilHook
HepMC::IO_AsciiParticles * ascii_io
void statistics() override
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::string LHEInputFileName
void count(LHERunInfo::CountMode count, double weight=1.0, double matchWeight=1.0)
Definition: LHEEvent.cc:187
std::shared_ptr< UserHooks > fReweightRapUserHook
Pythia8::PDFPtr photonFlux
void setInternalXSec(const XSec &xsec)
uint16_t size_type
constexpr int pow2(int x)
Definition: TauNNIdHW.h:51
std::shared_ptr< LHAupLesHouches > lhaUP
std::vector< std::string > evtgenUserFiles
edm::ConcurrentHadronizerFilter< Pythia8Hadronizer, ConcurrentExternalDecayDriver > Pythia8ConcurrentHadronizerFilter
GenRunInfoProduct & runInfo()
lhef::LHEEvent * lheEvent()
unsigned int ivhepmc
void xfUpdate(int, double x, double) override
T sqrt(T t)
Definition: SSEVec.h:19
static const std::vector< std::string > p8SharedResources
std::shared_ptr< UserHooksVector > fCustomHooksVector
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Log< level::Error, true > LogImportant
std::shared_ptr< ResonanceDecayFilterHook > fResonanceDecayFilterHook
key
prepare the HTCondor submission files and eventually submit them
std::shared_ptr< UserHooksVector > fUserHooksVector
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
unsigned int pythiaPylistVerbosity
const char * classname() const override
std::shared_ptr< PTFilterHook > fPTFilterHook
std::shared_ptr< Pythia8::JetMatchingMadgraph > fJetMatchingPy8InternalHook
std::unique_ptr< HepMC::GenEvent > & event()
Log< level::Warning, true > LogPrint
#define M_PI
lhef::LHERunInfo * lheRunInfo()
std::shared_ptr< JetMatchingHook > fJetMatchingHook
bool generatePartonsAndHadronize() override
Log< level::Info, false > LogInfo
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
std::shared_ptr< UserHooks > fReweightUserHook
std::shared_ptr< Pythia8::amcnlo_unitarised_interface > fMergingHook
part
Definition: HCALResponse.h:20
std::unique_ptr< GenEventInfoProduct > & eventInfo()
unsigned int maxEventsToPrint
def remove(d, key, TELL=False)
Definition: MatrixUtil.py:223
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
std::shared_ptr< UserHooks > fReweightEmpUserHook
Pythia8Hadronizer(const edm::ParameterSet &params)
vector< float > DJR
std::shared_ptr< PowhegResHook > fPowhegResHook
Nucleus2gamma2(int idBeamIn)
float x
HepMC::Pythia8ToHepMC toHepMC
std::unique_ptr< GenLumiInfoHeader > getGenLumiInfoHeader() const override
std::shared_ptr< UserHooks > fReweightPtHatRapUserHook
std::unique_ptr< Pythia8::Pythia > fMasterGen
std::vector< std::string > const & doSharedResources() const override
#define get
static const std::string kPythia8
void clear(EGIsoObj &c)
Definition: egamma.h:82
void finalizeEvent() override
edm::HadronizerFilter< Pythia8Hadronizer, ExternalDecayDriver > Pythia8HadronizerFilter
~Pythia8Hadronizer() override