CMS 3D CMS Logo

Pythia6Hadronizer.cc
Go to the documentation of this file.
1 
2 // -*- C++ -*-
3 
4 #include "Pythia6Hadronizer.h"
5 
6 #include "HepMC/GenEvent.h"
7 #include "HepMC/PdfInfo.h"
8 #include "HepMC/PythiaWrapper6_4.h"
9 #include "HepMC/HEPEVT_Wrapper.h"
10 #include "HepMC/IO_HEPEVT.h"
11 
14 
17 
19 
21 
23 
24 HepMC::IO_HEPEVT conv;
25 
26 #include "HepPID/ParticleIDTranslations.hh"
27 
28 // NOTE: here a number of Pythia6 routines are declared,
29 // plus some functionalities to pass around Pythia6 params
30 //
33 
34 #include <iomanip>
35 
36 namespace gen {
37 
38  extern "C" {
39 
40  //
41  // these two are NOT part of Pythi6 core code but are "custom" add-ons
42  // we keep them interfaced here, rather than in GenExtensions, because
43  // they tweak not at the ME level, but a step further, at the framgmentation
44  //
45  // stop-hadrons
46  //
47  void pystrhad_(); // init stop-hadrons (id's, names, charges...)
48  void pystfr_(int&); // tweaks fragmentation, fragments the string near to a stop,
49  // to form stop-hadron by producing a new q-qbar pair
50  // gluino/r-hadrons
51  void pyglrhad_();
52  void pyglfr_(); // tweaks fragmentation, fragment the string near to a gluino,
53  // to form gluino-hadron, either by producing a new g-g pair,
54  // or two new q-qbar ones
55 
56  } // extern "C"
57 
58  class Pythia6ServiceWithCallback : public Pythia6Service {
59  public:
61 
62  private:
64 
65  void upEvnt() override {
69  }
70 
71  bool upVeto() override {
73  return false;
74 
76  return true;
77 
78  bool retValue = Pythia6Hadronizer::getJetMatching()->match(nullptr, nullptr);
79  // below is old code and a note of it
80  // NOTE: I'm passing NULL pointers, instead of HepMC::GenEvent, etc.
81  //retValur = Pythia6Hadronizer::getJetMatching()->match(0, 0, true);
82  return retValue;
83  }
84  };
85 
86  static struct {
87  int n, npad, k[5][pyjets_maxn];
88  double p[5][pyjets_maxn], v[5][pyjets_maxn];
89  } pyjets_local;
90 
91  JetMatching* Pythia6Hadronizer::fJetMatching = nullptr;
92 
95 
97  : BaseHadronizer(ps),
98  fPy6Service(new Pythia6ServiceWithCallback(ps)), // this will store py6 params for further settings
99  fInitialState(PP),
100  fCOMEnergy(ps.getParameter<double>("comEnergy")),
101  fHepMCVerbosity(ps.getUntrackedParameter<bool>("pythiaHepMCVerbosity", false)),
102  fMaxEventsToPrint(ps.getUntrackedParameter<int>("maxEventsToPrint", 0)),
103  fPythiaListVerbosity(ps.getUntrackedParameter<int>("pythiaPylistVerbosity", 0)),
104  fDisplayPythiaBanner(ps.getUntrackedParameter<bool>("displayPythiaBanner", false)),
105  fDisplayPythiaCards(ps.getUntrackedParameter<bool>("displayPythiaCards", false)) {
106  // J.Y.: the following 3 parameters are hacked "for a reason"
107  //
108  if (ps.exists("PPbarInitialState")) {
109  if (fInitialState == PP) {
111  edm::LogInfo("GeneratorInterface|Pythia6Interface")
112  << "Pythia6 will be initialized for PROTON-ANTIPROTON INITIAL STATE. "
113  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
114  std::cout << "Pythia6 will be initialized for PROTON-ANTIPROTON INITIAL STATE." << std::endl;
115  std::cout << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
116  } else {
117  // probably need to throw on attempt to override ?
118  }
119  } else if (ps.exists("ElectronPositronInitialState")) {
120  if (fInitialState == PP) {
122  edm::LogInfo("GeneratorInterface|Pythia6Interface")
123  << "Pythia6 will be initialized for ELECTRON-POSITRON INITIAL STATE. "
124  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
125  std::cout << "Pythia6 will be initialized for ELECTRON-POSITRON INITIAL STATE." << std::endl;
126  std::cout << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
127  } else {
128  // probably need to throw on attempt to override ?
129  }
130  } else if (ps.exists("ElectronProtonInitialState")) {
131  if (fInitialState == PP) {
133  fBeam1PZ =
134  (ps.getParameter<edm::ParameterSet>("ElectronProtonInitialState")).getParameter<double>("electronMomentum");
135  fBeam2PZ =
136  (ps.getParameter<edm::ParameterSet>("ElectronProtonInitialState")).getParameter<double>("protonMomentum");
137  edm::LogInfo("GeneratorInterface|Pythia6Interface")
138  << "Pythia6 will be initialized for ELECTRON-PROTON INITIAL STATE. "
139  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
140  std::cout << "Pythia6 will be initialized for ELECTRON-PROTON INITIAL STATE." << std::endl;
141  std::cout << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
142  } else {
143  // probably need to throw on attempt to override ?
144  }
145  } else if (ps.exists("PositronProtonInitialState")) {
146  if (fInitialState == PP) {
148  fBeam1PZ =
149  (ps.getParameter<edm::ParameterSet>("ElectronProtonInitialState")).getParameter<double>("positronMomentum");
150  fBeam2PZ =
151  (ps.getParameter<edm::ParameterSet>("ElectronProtonInitialState")).getParameter<double>("protonMomentum");
152  edm::LogInfo("GeneratorInterface|Pythia6Interface")
153  << "Pythia6 will be initialized for POSITRON-PROTON INITIAL STATE. "
154  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
155  std::cout << "Pythia6 will be initialized for POSITRON-PROTON INITIAL STATE." << std::endl;
156  std::cout << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
157  } else {
158  // throw on unknown initial state !
159  throw edm::Exception(edm::errors::Configuration, "Pythia6Interface")
160  << " UNKNOWN INITIAL STATE. \n The allowed initial states are: PP, PPbar, ElectronPositron, "
161  "ElectronProton, and PositronProton \n";
162  }
163  }
164 
165  // J.Y.: the following 4 params are "hacked", in the sense
166  // that they're tracked but get in optionally;
167  // this will be fixed once we update all applications
168  //
169 
170  fStopHadronsEnabled = false;
171  if (ps.exists("stopHadrons"))
172  fStopHadronsEnabled = ps.getParameter<bool>("stopHadrons");
173 
174  fGluinoHadronsEnabled = false;
175  if (ps.exists("gluinoHadrons"))
176  fGluinoHadronsEnabled = ps.getParameter<bool>("gluinoHadrons");
177 
178  fImposeProperTime = false;
179  if (ps.exists("imposeProperTime")) {
180  fImposeProperTime = ps.getParameter<bool>("imposeProperTime");
181  }
182 
183  fConvertToPDG = false;
184  if (ps.exists("doPDGConvert"))
185  fConvertToPDG = ps.getParameter<bool>("doPDGConvert");
186 
187  if (ps.exists("jetMatching")) {
188  edm::ParameterSet jmParams = ps.getUntrackedParameter<edm::ParameterSet>("jetMatching");
189 
190  fJetMatching = JetMatching::create(jmParams).release();
191  }
192 
193  // first of all, silence Pythia6 banner printout, unless display requested
194  //
195  if (!fDisplayPythiaBanner) {
196  if (!call_pygive("MSTU(12)=12345")) {
197  throw edm::Exception(edm::errors::Configuration, "PythiaError") << " Pythia did not accept MSTU(12)=12345";
198  }
199  }
200 
201  // silence printouts from PYGIVE, unless display requested
202  //
203  if (!fDisplayPythiaCards) {
204  if (!call_pygive("MSTU(13)=0")) {
205  throw edm::Exception(edm::errors::Configuration, "PythiaError") << " Pythia did not accept MSTU(13)=0";
206  }
207  }
208 
209  // tmp stuff to deal with EvtGen corrupting pyjets
210  // NPartsBeforeDecays = 0;
211  flushTmpStorage();
212  }
213 
215  if (fPy6Service != nullptr)
216  delete fPy6Service;
217  if (fJetMatching != nullptr)
218  delete fJetMatching;
219  }
220 
222 
224  pyjets_local.n = 0;
225  pyjets_local.npad = 0;
226  for (int ip = 0; ip < pyjets_maxn; ip++) {
227  for (int i = 0; i < 5; i++) {
228  pyjets_local.k[i][ip] = 0;
229  pyjets_local.p[i][ip] = 0.;
230  pyjets_local.v[i][ip] = 0.;
231  }
232  }
233  return;
234  }
235 
237  pyjets_local.n = pyjets.n;
238  pyjets_local.npad = pyjets.npad;
239  for (int ip = 0; ip < pyjets_maxn; ip++) {
240  for (int i = 0; i < 5; i++) {
241  pyjets_local.k[i][ip] = pyjets.k[i][ip];
242  pyjets_local.p[i][ip] = pyjets.p[i][ip];
243  pyjets_local.v[i][ip] = pyjets.v[i][ip];
244  }
245  }
246 
247  return;
248  }
249 
251  bool lhe = lheEvent() != nullptr;
252 
253  HepMC::PdfInfo pdf;
254 
255  // if we are in hadronizer mode, we can pass on information from
256  // the LHE input
257  if (lhe) {
259  lheEvent()->fillPdfInfo(&pdf);
260  } else {
261  // filling in factorization "Q scale" now! pthat moved to binningValues()
262  //
263 
264  if (event()->signal_process_id() <= 0)
265  event()->set_signal_process_id(pypars.msti[0]);
266  if (event()->event_scale() <= 0)
267  event()->set_event_scale(pypars.pari[22]);
268  if (event()->alphaQED() <= 0)
269  event()->set_alphaQED(pyint1.vint[56]);
270  if (event()->alphaQCD() <= 0)
271  event()->set_alphaQCD(pyint1.vint[57]);
272 
273  // get pdf info directly from Pythia6 and set it up into HepMC::GenEvent
274  // S. Mrenna: Prefer vint block
275  //
276  if (pdf.id1() <= 0)
277  pdf.set_id1(pyint1.mint[14] == 21 ? 0 : pyint1.mint[14]);
278  if (pdf.id2() <= 0)
279  pdf.set_id2(pyint1.mint[15] == 21 ? 0 : pyint1.mint[15]);
280  if (pdf.x1() <= 0)
281  pdf.set_x1(pyint1.vint[40]);
282  if (pdf.x2() <= 0)
283  pdf.set_x2(pyint1.vint[41]);
284  if (pdf.pdf1() <= 0)
285  pdf.set_pdf1(pyint1.vint[38] / pyint1.vint[40]);
286  if (pdf.pdf2() <= 0)
287  pdf.set_pdf2(pyint1.vint[39] / pyint1.vint[41]);
288  if (pdf.scalePDF() <= 0)
289  pdf.set_scalePDF(pyint1.vint[50]);
290  }
291 
292  /* 9/9/2010 - JVY: This is the old piece of code - I can't remember why we implemented it this way.
293  However, it's causing problems with pdf1 & pdf2 when processing LHE samples,
294  specifically, because both are set to -1, it tries to fill with Py6 numbers that
295  are NOT valid/right at this point !
296  In general, for LHE/ME event processing we should implement the correct calculation
297  of the pdf's, rather than using py6 ones.
298 
299  // filling in factorization "Q scale" now! pthat moved to binningValues()
300 
301  if (!lhe || event()->signal_process_id() < 0) event()->set_signal_process_id( pypars.msti[0] );
302  if (!lhe || event()->event_scale() < 0) event()->set_event_scale( pypars.pari[22] );
303  if (!lhe || event()->alphaQED() < 0) event()->set_alphaQED( pyint1.vint[56] );
304  if (!lhe || event()->alphaQCD() < 0) event()->set_alphaQCD( pyint1.vint[57] );
305 
306  // get pdf info directly from Pythia6 and set it up into HepMC::GenEvent
307  // S. Mrenna: Prefer vint block
308  //
309  if (!lhe || pdf.id1() < 0) pdf.set_id1( pyint1.mint[14] == 21 ? 0 : pyint1.mint[14] );
310  if (!lhe || pdf.id2() < 0) pdf.set_id2( pyint1.mint[15] == 21 ? 0 : pyint1.mint[15] );
311  if (!lhe || pdf.x1() < 0) pdf.set_x1( pyint1.vint[40] );
312  if (!lhe || pdf.x2() < 0) pdf.set_x2( pyint1.vint[41] );
313  if (!lhe || pdf.pdf1() < 0) pdf.set_pdf1( pyint1.vint[38] / pyint1.vint[40] );
314  if (!lhe || pdf.pdf2() < 0) pdf.set_pdf2( pyint1.vint[39] / pyint1.vint[41] );
315  if (!lhe || pdf.scalePDF() < 0) pdf.set_scalePDF( pyint1.vint[50] );
316 */
317 
318  event()->set_pdf_info(pdf);
319 
320  HepMC::GenCrossSection xsec;
321  double cs = pypars.pari[0]; // cross section in mb
322  cs *= 1.0e9; // translate to pb
323  double cserr = cs / sqrt(pypars.msti[4]);
324  xsec.set_cross_section(cs, cserr);
325  event()->set_cross_section(xsec);
326 
327  // this is "standard" Py6 event weight (corresponds to PYINT1/VINT(97)
328  //
329  if (lhe && std::abs(lheRunInfo()->getHEPRUP()->IDWTUP) == 4)
330  // translate mb to pb (CMS/Gen "convention" as of May 2009)
331  event()->weights().push_back(pyint1.vint[96] * 1.0e9);
332  else
333  event()->weights().push_back(pyint1.vint[96]);
334  //
335  // this is event weight as 1./VINT(99) (PYINT1/VINT(99) is returned by the PYEVWT)
336  //
337  event()->weights().push_back(1. / (pyint1.vint[98]));
338 
339  // now create the GenEventInfo product from the GenEvent and fill
340  // the missing pieces
341 
342  eventInfo().reset(new GenEventInfoProduct(event().get()));
343 
344  // in Pythia6 pthat is used to subdivide samples into different bins
345  // in LHE mode the binning is done by the external ME generator
346  // which is likely not pthat, so only filling it for Py6 internal mode
347  if (!lhe) {
348  eventInfo()->setBinningValues(std::vector<double>(1, pypars.pari[16]));
349  }
350 
351  // here we treat long-lived particles
352  //
353  if (fImposeProperTime || pydat1.mstj[21] == 3 || pydat1.mstj[21] == 4)
355 
356  // convert particle IDs Py6->PDG, if requested
357  if (fConvertToPDG) {
358  for (HepMC::GenEvent::particle_iterator part = event()->particles_begin(); part != event()->particles_end();
359  ++part) {
360  (*part)->set_pdg_id(HepPID::translatePythiatoPDT((*part)->pdg_id()));
361  }
362  }
363 
364  // service printouts, if requested
365  //
366  if (fMaxEventsToPrint > 0) {
370  if (fHepMCVerbosity) {
371  std::cout << "Event process = " << pypars.msti[0] << std::endl << "----------------------" << std::endl;
372  event()->print();
373  }
374  }
375 
376  // dump of all settings after all initializations
377  if (fDisplayPythiaCards) {
378  fDisplayPythiaCards = false;
379  call_pylist(12);
380  call_pylist(13);
381  std::cout << "\n PYPARS \n" << std::endl;
382  std::cout << std::setw(5) << std::fixed << "I" << std::setw(10) << std::fixed << "MSTP(I)" << std::setw(16)
383  << std::fixed << "PARP(I)" << std::setw(10) << std::fixed << "MSTI(I)" << std::setw(16) << std::fixed
384  << "PARI(I)" << std::endl;
385  for (unsigned int ind = 0; ind < 200; ind++) {
386  std::cout << std::setw(5) << std::fixed << ind + 1 << std::setw(10) << std::fixed << pypars.mstp[ind]
387  << std::setw(16) << std::fixed << pypars.parp[ind] << std::setw(10) << std::fixed << pypars.msti[ind]
388  << std::setw(16) << std::fixed << pypars.pari[ind] << std::endl;
389  }
390  }
391 
392  return;
393  }
394 
396  Pythia6Service::InstanceWrapper guard(fPy6Service); // grab Py6 instance
397 
399 
400  // generate event with Pythia6
401  //
402 
404  // call_pygive("MSTJ(1)=-1");
405  call_pygive("MSTJ(14)=-1");
406  }
407 
408  call_pyevnt();
409 
411  // call_pygive("MSTJ(1)=1");
412  call_pygive("MSTJ(14)=1");
413  int ierr = 0;
414  if (fStopHadronsEnabled) {
415  pystfr_(ierr);
416  if (ierr != 0) // skip failed events
417  {
418  event().reset();
419  return false;
420  }
421  }
423  pyglfr_();
424  }
425 
426  if (pyint1.mint[50] != 0) // skip event if py6 considers it bad
427  {
428  event().reset();
429  return false;
430  }
431 
432  call_pyhepc(1);
433  event().reset(conv.read_next_event());
434 
435  // this is to deal with post-gen tools & residualDecay() that may reuse PYJETS
436  //
437  flushTmpStorage();
438  fillTmpStorage();
439 
440  return true;
441  }
442 
444  Pythia6Service::InstanceWrapper guard(fPy6Service); // grab Py6 instance
445 
448  if (fJetMatching) {
451  }
452 
453  // generate event with Pythia6
454  //
456  call_pygive("MSTJ(1)=-1");
457  call_pygive("MSTJ(14)=-1");
458  }
459 
460  call_pyevnt();
461 
462  if (FortranCallback::getInstance()->getIterationsPerEvent() > 1 || hepeup_.nup <= 0 || pypars.msti[0] == 1) {
463  // update LHE matching statistics
465 
466  event().reset();
467  return false;
468  }
469 
470  // update LHE matching statistics
471  //
473 
475  call_pygive("MSTJ(1)=1");
476  call_pygive("MSTJ(14)=1");
477  int ierr = 0;
478  if (fStopHadronsEnabled) {
479  pystfr_(ierr);
480  if (ierr != 0) // skip failed events
481  {
482  event().reset();
483  return false;
484  }
485  }
486 
488  pyglfr_();
489  }
490 
491  if (pyint1.mint[50] != 0) // skip event if py6 considers it bad
492  {
493  event().reset();
494  return false;
495  }
496 
497  call_pyhepc(1);
498  event().reset(conv.read_next_event());
499 
500  // this is to deal with post-gen tools and/or residualDecay(), that may reuse PYJETS
501  //
502  flushTmpStorage();
503  fillTmpStorage();
504 
505  return true;
506  }
507 
508  bool Pythia6Hadronizer::decay() { return true; }
509 
511  // event().get()->print();
512 
513  Pythia6Service::InstanceWrapper guard(fPy6Service); // grab Py6 instance
514 
515  // int nDocLines = pypars.msti[3];
516 
517  int NPartsBeforeDecays = pyjets_local.n;
518  int NPartsAfterDecays = event().get()->particles_size();
519  int barcode = NPartsAfterDecays;
520 
521  // JVY: well, in principle, it's not a 100% fair to go up to NPartsBeforeDecays,
522  // because Photos will attach gamma's to existing vertexes, i.e. in the middle
523  // of the event rather than at the end; but this will only shift poiters down,
524  // so we'll be going again over a few "original" particle...
525  // in the alternative, we may go all the way up to the beginning of the event
526  // and re-check if anything remains to decay, that's fine even if it'll take
527  // some extra CPU...
528 
529  for (int ipart = NPartsAfterDecays; ipart > NPartsBeforeDecays; ipart--) {
530  HepMC::GenParticle* part = event().get()->barcode_to_particle(ipart);
531  int status = part->status();
532  if (status != 1)
533  continue; // check only "stable" particles,
534  // as some undecayed may still be marked as such
535  int pdgid = part->pdg_id();
536  int py6ptr = pycomp_(pdgid);
537  if (pydat3.mdcy[0][py6ptr - 1] != 1)
538  continue; // particle is not expected to decay
539  int py6id = HepPID::translatePDTtoPythia(pdgid);
540  //
541  // first, will need to zero out, then fill up PYJETS
542  // I better do it directly (by hands) rather than via py1ent
543  // - to avoid (additional) mass smearing
544  //
545  if (part->momentum().t() <= part->generated_mass()) {
546  continue; // e==m --> 0-momentum, nothing to decay...
547  } else {
548  pyjets.n = 0;
549  for (int i = 0; i < 5; i++) {
550  pyjets.k[i][0] = 0;
551  pyjets.p[i][0] = 0.;
552  pyjets.v[i][0] = 0.;
553  }
554  pyjets.k[0][0] = 1;
555  pyjets.k[1][0] = py6id;
556  pyjets.p[4][0] = part->generated_mass();
557  pyjets.p[3][0] = part->momentum().t();
558  pyjets.p[0][0] = part->momentum().x();
559  pyjets.p[1][0] = part->momentum().y();
560  pyjets.p[2][0] = part->momentum().z();
561  HepMC::GenVertex* prod_vtx = part->production_vertex();
562  if (!prod_vtx)
563  continue; // in principle, should never happen but...
564  pyjets.v[0][0] = prod_vtx->position().x();
565  pyjets.v[1][0] = prod_vtx->position().y();
566  pyjets.v[2][0] = prod_vtx->position().z();
567  pyjets.v[3][0] = prod_vtx->position().t();
568  pyjets.v[4][0] = 0.;
569  pyjets.n = 1;
570  pyjets.npad = pyjets_local.npad;
571  }
572 
573  // now call Py6 decay routine
574  //
575  int parent = 1; // since we always pass to Py6 a single particle
576  pydecy_(parent);
577 
578  // now attach decay products to mother
579  //
580  for (int iprt1 = 1; iprt1 < pyjets.n; iprt1++) {
581  part->set_status(2);
582 
583  HepMC::GenVertex* DecVtx = new HepMC::GenVertex(
584  HepMC::FourVector(pyjets.v[0][iprt1], pyjets.v[1][iprt1], pyjets.v[2][iprt1], pyjets.v[3][iprt1]));
585  DecVtx->add_particle_in(part); // this will cleanup end_vertex if exists, replace with the new one
586  // I presume (vtx) barcode will be given automatically
587 
588  HepMC::FourVector pmom(pyjets.p[0][iprt1], pyjets.p[1][iprt1], pyjets.p[2][iprt1], pyjets.p[3][iprt1]);
589 
590  int dstatus = 0;
591  if (pyjets.k[0][iprt1] >= 1 && pyjets.k[0][iprt1] <= 10) {
592  dstatus = 1;
593  } else if (pyjets.k[0][iprt1] >= 11 && pyjets.k[0][iprt1] <= 20) {
594  dstatus = 2;
595  } else if (pyjets.k[0][iprt1] >= 21 && pyjets.k[0][iprt1] <= 30) {
596  dstatus = 3;
597  } else if (pyjets.k[0][iprt1] >= 31 && pyjets.k[0][iprt1] <= 100) {
598  dstatus = pyjets.k[0][iprt1];
599  }
600  HepMC::GenParticle* daughter =
601  new HepMC::GenParticle(pmom, HepPID::translatePythiatoPDT(pyjets.k[1][iprt1]), dstatus);
602  barcode++;
603  daughter->suggest_barcode(barcode);
604  DecVtx->add_particle_out(daughter);
605 
606  int iprt2;
607  for (iprt2 = iprt1 + 1; iprt2 < pyjets.n; iprt2++) // the pointer is shifted by -1, c++ style
608  {
609  if (pyjets.k[2][iprt2] != parent) {
610  parent = pyjets.k[2][iprt2];
611  break; // another parent particle; reset & break the loop
612  }
613 
614  HepMC::FourVector pmomN(pyjets.p[0][iprt2], pyjets.p[1][iprt2], pyjets.p[2][iprt2], pyjets.p[3][iprt2]);
615 
616  dstatus = 0;
617  if (pyjets.k[0][iprt2] >= 1 && pyjets.k[0][iprt2] <= 10) {
618  dstatus = 1;
619  } else if (pyjets.k[0][iprt2] >= 11 && pyjets.k[0][iprt2] <= 20) {
620  dstatus = 2;
621  } else if (pyjets.k[0][iprt2] >= 21 && pyjets.k[0][iprt2] <= 30) {
622  dstatus = 3;
623  } else if (pyjets.k[0][iprt2] >= 31 && pyjets.k[0][iprt2] <= 100) {
624  dstatus = pyjets.k[0][iprt2];
625  }
626  HepMC::GenParticle* daughterN =
627  new HepMC::GenParticle(pmomN, HepPID::translatePythiatoPDT(pyjets.k[1][iprt2]), dstatus);
628  barcode++;
629  daughterN->suggest_barcode(barcode);
630  DecVtx->add_particle_out(daughterN);
631  }
632 
633  iprt1 = iprt2 - 1; // reset counter such that it doesn't go over the same child more than once
634  // don't forget to offset back into c++ counting, as it's already +1 forward
635 
636  event().get()->add_vertex(DecVtx);
637  }
638  }
639 
640  // now restore the very original Py6 event record
641  //
642  if (pyjets_local.n != pyjets.n) {
643  // restore pyjets to its state as it was before external decays -
644  // might have been jammed by action above or by py1ent calls in EvtGen
645  pyjets.n = pyjets_local.n;
646  pyjets.npad = pyjets_local.npad;
647  for (int ip = 0; ip < pyjets_local.n; ip++) {
648  for (int i = 0; i < 5; i++) {
649  pyjets.k[i][ip] = pyjets_local.k[i][ip];
650  pyjets.p[i][ip] = pyjets_local.p[i][ip];
651  pyjets.v[i][ip] = pyjets_local.v[i][ip];
652  }
653  }
654  }
655 
656  return true;
657  }
658 
660  Pythia6Service::InstanceWrapper guard(fPy6Service); // grab Py6 instance
661 
663  if (key == 0)
666 
667  return true;
668  }
669 
671  Pythia6Service::InstanceWrapper guard(fPy6Service); // grab Py6 instance
672 
673  // note: CSA mode is NOT supposed to work with external partons !!!
674 
675  // fPy6Service->setGeneralParams();
676 
678 
680 
681  if (fStopHadronsEnabled) {
682  // overwrite mstp(111), no matter what
683  call_pygive("MSTP(111)=0");
684  pystrhad_();
685  call_pygive("MWID(302)=0"); // I don't know if this is specific to processing ME/LHE only,
686  call_pygive("MDCY(302,1)=0"); // or this should also be the case for full event...
687  // anyway, this comes from experience of processing MG events
688  }
689 
690  if (fGluinoHadronsEnabled) {
691  // overwrite mstp(111), no matter what
692  call_pygive("MSTP(111)=0");
693  pyglrhad_();
694  //call_pygive("MWID(309)=0");
695  //call_pygive("MDCY(309,1)=0");
696  }
697 
698  call_pyinit("USER", "", "", 0.0);
699 
701 
702  std::vector<std::string> slha = lheRunInfo()->findHeader("slha");
703  if (!slha.empty()) {
704  edm::LogInfo("Generator|LHEInterface") << "Pythia6 hadronisation found an SLHA header, "
705  << "will be passed on to Pythia." << std::endl;
708  }
709 
710  if (fJetMatching) {
712  // FIXME: the jet matching routine might not be interested in PS callback
713  call_pygive("MSTP(143)=1");
714  }
715 
716  return true;
717  }
718 
720  Pythia6Service::InstanceWrapper guard(fPy6Service); // grab Py6 instance
721 
723 
724  if (fStopHadronsEnabled) {
725  // overwrite mstp(111), no matter what
726  call_pygive("MSTP(111)=0");
727  pystrhad_();
728  }
729 
730  if (fGluinoHadronsEnabled) {
731  // overwrite mstp(111), no matter what
732  call_pygive("MSTP(111)=0");
733  pyglrhad_();
734  }
735 
736  if (fInitialState == PP) // default
737  {
738  call_pyinit("CMS", "p", "p", fCOMEnergy);
739  } else if (fInitialState == PPbar) {
740  call_pyinit("CMS", "p", "pbar", fCOMEnergy);
741  } else if (fInitialState == ElectronPositron) {
742  call_pyinit("CMS", "e+", "e-", fCOMEnergy);
743  } else if (fInitialState == ElectronProton) {
744  // set p(1,i) & p(2,i) for the beams in pyjets !
745  pyjets.p[0][0] = 0.;
746  pyjets.p[1][0] = 0.;
747  pyjets.p[2][0] = fBeam1PZ;
748  pyjets.p[0][1] = 0.;
749  pyjets.p[1][1] = 0.;
750  pyjets.p[2][1] = fBeam2PZ;
751  // call "3mon" frame & 0.0 win
752  call_pyinit("3mom", "e-", "p", 0.0);
753  } else if (fInitialState == PositronProton) {
754  // set p(1,i) & p(2,i) for the beams in pyjets !
755  pyjets.p[0][0] = 0.;
756  pyjets.p[1][0] = 0.;
757  pyjets.p[2][0] = fBeam1PZ;
758  pyjets.p[0][1] = 0.;
759  pyjets.p[1][1] = 0.;
760  pyjets.p[2][1] = fBeam2PZ;
761  // call "3mon" frame & 0.0 win
762  call_pyinit("3mom", "e+", "p", 0.0);
763  } else {
764  // throw on unknown initial state !
765  throw edm::Exception(edm::errors::Configuration, "Pythia6Interface")
766  << " UNKNOWN INITIAL STATE. \n The allowed initial states are: PP, PPbar, ElectronPositron, ElectronProton, "
767  "and PositronProton \n";
768  }
769 
771 
773 
774  return true;
775  }
776 
777  bool Pythia6Hadronizer::declareStableParticles(const std::vector<int>& pdg) {
778  for (unsigned int i = 0; i < pdg.size(); i++) {
779  int PyID = HepPID::translatePDTtoPythia(pdg[i]);
780  // int PyID = pdg[i];
781  int pyCode = pycomp_(PyID);
782  if (pyCode > 0) {
783  std::ostringstream pyCard;
784  pyCard << "MDCY(" << pyCode << ",1)=0";
785  /* this is a test printout...
786  std::cout << "pdg= " << pdg[i] << " " << pyCard.str() << std::endl;
787 */
788  call_pygive(pyCard.str());
789  }
790  }
791 
792  return true;
793  }
794 
795  bool Pythia6Hadronizer::declareSpecialSettings(const std::vector<std::string>& settings) {
796  for (unsigned int iss = 0; iss < settings.size(); iss++) {
797  if (settings[iss].find("QED-brem-off") == std::string::npos)
798  continue;
799  size_t fnd1 = settings[iss].find(":");
800  if (fnd1 == std::string::npos)
801  continue;
802 
803  std::string value = settings[iss].substr(fnd1 + 1);
804 
805  if (value == "all") {
806  call_pygive("MSTJ(41)=3");
807  } else {
808  int number = atoi(value.c_str());
809  int PyID = HepPID::translatePDTtoPythia(number);
810  int pyCode = pycomp_(PyID);
811  if (pyCode > 0) {
812  // first of all, check if mstj(39) is 0 or if we're trying to override user's setting
813  // if so, throw an exception and stop, because otherwise the user will get behaviour
814  // that's different from what she/he expects !
815  if (pydat1_.mstj[38] > 0 && pydat1_.mstj[38] != pyCode) {
816  throw edm::Exception(edm::errors::Configuration, "Pythia6Interface")
817  << " Fatal conflict: \n mandatory internal directive to set MSTJ(39)=" << pyCode
818  << " overrides user setting MSTJ(39)=" << pydat1_.mstj[38]
819  << " - user will not get expected behaviour \n";
820  }
821  std::ostringstream pyCard;
822  pyCard << "MSTJ(39)=" << pyCode;
823  call_pygive(pyCard.str());
824  }
825  }
826  }
827 
828  return true;
829  }
830 
832  // this is practically a copy/paste of the original code by J.Alcaraz,
833  // taken directly from PythiaSource
834 
835  int dumm = 0;
836  HepMC::GenEvent::vertex_const_iterator vbegin = event()->vertices_begin();
837  HepMC::GenEvent::vertex_const_iterator vend = event()->vertices_end();
838  HepMC::GenEvent::vertex_const_iterator vitr = vbegin;
839  for (; vitr != vend; ++vitr) {
840  HepMC::GenVertex::particle_iterator pbegin = (*vitr)->particles_begin(HepMC::children);
841  HepMC::GenVertex::particle_iterator pend = (*vitr)->particles_end(HepMC::children);
842  HepMC::GenVertex::particle_iterator pitr = pbegin;
843  for (; pitr != pend; ++pitr) {
844  if ((*pitr)->end_vertex())
845  continue;
846  if ((*pitr)->status() != 1)
847  continue;
848 
849  int pdgcode = abs((*pitr)->pdg_id());
850  // Do nothing if the particle is not expected to decay
851  if (pydat3.mdcy[0][pycomp_(pdgcode) - 1] != 1)
852  continue;
853 
854  double ctau = pydat2.pmas[3][pycomp_(pdgcode) - 1];
855  HepMC::FourVector mom = (*pitr)->momentum();
856  HepMC::FourVector vin = (*vitr)->position();
857  double x = 0.;
858  double y = 0.;
859  double z = 0.;
860  double t = 0.;
861  bool decayInRange = false;
862  while (!decayInRange) {
863  double unif_rand = fPy6Service->call(pyr_, &dumm);
864  // Value of 0 is excluded, so following line is OK
865  double proper_length = -ctau * log(unif_rand);
866  double factor = proper_length / mom.m();
867  x = vin.x() + factor * mom.px();
868  y = vin.y() + factor * mom.py();
869  z = vin.z() + factor * mom.pz();
870  t = vin.t() + factor * mom.e();
871  // Decay must be happen outside a cylindrical region
872  if (pydat1.mstj[21] == 4) {
873  if (std::sqrt(x * x + y * y) > pydat1.parj[72] || fabs(z) > pydat1.parj[73])
874  decayInRange = true;
875  // Decay must be happen outside a given sphere
876  } else if (pydat1.mstj[21] == 3) {
877  if (std::sqrt(x * x + y * y + z * z) > pydat1.parj[71])
878  decayInRange = true;
879  }
880  // Decay is always OK otherwise
881  else {
882  decayInRange = true;
883  }
884  }
885 
886  HepMC::GenVertex* vdec = new HepMC::GenVertex(HepMC::FourVector(x, y, z, t));
887  event()->add_vertex(vdec);
888  vdec->add_particle_in((*pitr));
889  }
890  }
891 
892  return;
893  }
894 
896  if (!runInfo().internalXSec()) {
897  // set xsec if not already done (e.g. from LHE cross section collector)
898  double cs = pypars.pari[0]; // cross section in mb
899  cs *= 1.0e9; // translate to pb (CMS/Gen "convention" as of May 2009)
901  // FIXME: can we get the xsec statistical error somewhere?
902  }
903 
904  call_pystat(1);
905 
906  return;
907  }
908 
909  const char* Pythia6Hadronizer::classname() const { return "gen::Pythia6Hadronizer"; }
910 
911 } // namespace gen
lhef::LHERunInfo::kAccepted
Definition: LHERunInfo.h:64
GenEventInfoProduct
Definition: GenEventInfoProduct.h:17
vend
#define vend()
Definition: vmac.h:43
gen::Pythia6Hadronizer::PositronProton
Definition: Pythia6Hadronizer.h:82
gen::BaseHadronizer::lheRunInfo
lhef::LHERunInfo * lheRunInfo()
Definition: BaseHadronizer.h:90
gen::BaseHadronizer::lheEvent
lhef::LHEEvent * lheEvent()
Definition: BaseHadronizer.h:89
JetMatching.h
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
gen::Pythia6Hadronizer::initializeForExternalPartons
bool initializeForExternalPartons()
Definition: Pythia6Hadronizer.cc:670
electrons_cff.bool
bool
Definition: electrons_cff.py:372
mps_fire.i
i
Definition: mps_fire.py:355
gen::Pythia6Hadronizer::readSettings
bool readSettings(int)
Definition: Pythia6Hadronizer.cc:659
gen::Pythia6Hadronizer::getJetMatching
static JetMatching * getJetMatching()
Definition: Pythia6Hadronizer.h:53
MessageLogger.h
funct::false
false
Definition: Factorize.h:34
lhef::LHEEvent::fillEventInfo
void fillEventInfo(HepMC::GenEvent *hepmc) const
Definition: LHEEvent.cc:218
gen::pycomp_
int pycomp_(int &)
fwrapper::cs
unique_ptr< ClusterSequence > cs
Definition: fastjetfortran_madfks.cc:45
mps_update.status
status
Definition: mps_update.py:69
pyint1
#define pyint1
Definition: ExhumeHadronizer.cc:51
gen::Pythia6ServiceWithCallback::upInit
void upInit() override
Definition: Pythia6Hadronizer.cc:63
class-composition.children
children
Definition: class-composition.py:88
gen::Pythia6Hadronizer::fJetMatching
static JetMatching * fJetMatching
Definition: Pythia6Hadronizer.h:90
gen::pyr_
double pyr_(int *idummy)
Definition: Pythia6Service.cc:60
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::LogInfo
Definition: MessageLogger.h:254
pypars
#define pypars
Definition: ExhumeHadronizer.cc:45
gen::FortranInstance::kFortranInstance
static const std::string kFortranInstance
Definition: FortranInstance.h:88
gen::Pythia6Hadronizer::ElectronProton
Definition: Pythia6Hadronizer.h:82
Pythia6Declarations.h
gen::k
int k[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:73
gen::Pythia6Hadronizer::PP
Definition: Pythia6Hadronizer.h:82
gen::Pythia6Service::setPYUPDAParams
void setPYUPDAParams(bool afterPyinit)
Definition: Pythia6Service.cc:276
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
GenRunInfoProduct::setInternalXSec
void setInternalXSec(const XSec &xsec)
Definition: GenRunInfoProduct.h:26
gen::Pythia6Service::setRandomEngine
void setRandomEngine(CLHEP::HepRandomEngine *v)
Definition: Pythia6Service.h:46
vbegin
#define vbegin()
Definition: vmac.h:36
gen::pyglfr_
void pyglfr_()
lhef::LHEEvent::fillPdfInfo
void fillPdfInfo(HepMC::PdfInfo *info) const
Definition: LHEEvent.cc:191
gen::Pythia6Hadronizer::fInitialState
int fInitialState
Definition: Pythia6Hadronizer.h:84
gen::Pythia6Service::setSLHAParams
void setSLHAParams()
Definition: Pythia6Service.cc:239
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
gen::Pythia6Hadronizer::fGluinoHadronsEnabled
bool fGluinoHadronsEnabled
Definition: Pythia6Hadronizer.h:106
gen::pydat1_
struct gen::@693 pydat1_
gen::Pythia6Hadronizer::fPy6Service
Pythia6Service * fPy6Service
Definition: Pythia6Hadronizer.h:76
gen::BaseHadronizer
Definition: BaseHadronizer.h:46
gen::Pythia6ServiceWithCallback
Definition: Cascade2Hadronizer.cc:55
gen::Pythia6Hadronizer::theSharedResources
static const std::vector< std::string > theSharedResources
Definition: Pythia6Hadronizer.h:117
gen::Pythia6Service::setGeneralParams
void setGeneralParams()
Definition: Pythia6Service.cc:157
gen::FortranCallback::getInstance
static FortranCallback * getInstance()
Definition: FortranCallback.h:52
gen::Pythia6Hadronizer::decay
bool decay()
Definition: Pythia6Hadronizer.cc:508
gen::pyglrhad_
void pyglrhad_()
lhef::LHERunInfo::kSelected
Definition: LHERunInfo.h:64
gen::FortranCallback::fillHeader
void fillHeader()
Definition: FortranCallback.h:58
gen::Pythia6Service::closeSLHA
void closeSLHA()
Definition: Pythia6Service.cc:227
gen::Pythia6Hadronizer::residualDecay
bool residualDecay()
Definition: Pythia6Hadronizer.cc:510
gen::Pythia6Hadronizer::flushTmpStorage
void flushTmpStorage()
Definition: Pythia6Hadronizer.cc:223
part
part
Definition: HCALResponse.h:20
gen::Pythia6ServiceWithCallback::upVeto
bool upVeto() override
Definition: Pythia6Hadronizer.cc:71
gen::Pythia6Service::setCSAParams
void setCSAParams()
Definition: Pythia6Service.cc:168
contentValuesFiles.number
number
Definition: contentValuesFiles.py:53
gen::Pythia6Hadronizer::fStopHadronsEnabled
bool fStopHadronsEnabled
Definition: Pythia6Hadronizer.h:105
hepeup_
struct HEPEUP_ hepeup_
conv
HepMC::IO_HEPEVT conv
Definition: Pythia6Hadronizer.cc:24
gen::p
double p[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:74
gen::FortranCallback::setLHEEvent
void setLHEEvent(lhef::LHEEvent *lhee)
Definition: FortranCallback.h:21
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
gen::Pythia6Hadronizer::fHepMCVerbosity
bool fHepMCVerbosity
Definition: Pythia6Hadronizer.h:92
gen::Pythia6Hadronizer::fCOMEnergy
double fCOMEnergy
Definition: Pythia6Hadronizer.h:85
gen::Pythia6Hadronizer::fBeam1PZ
double fBeam1PZ
Definition: Pythia6Hadronizer.h:87
gen::FortranInstance::InstanceWrapper
Definition: FortranInstance.h:54
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
gen::BaseHadronizer::eventInfo
std::unique_ptr< GenEventInfoProduct > & eventInfo()
Definition: BaseHadronizer.h:87
SharedResourceNames.h
gen
Definition: PythiaDecays.h:13
OrderedSet.t
t
Definition: OrderedSet.py:90
Pythia6Hadronizer.h
gen::JetMatching::isMatchingDone
bool isMatchingDone()
Definition: JetMatching.h:74
FortranInstance.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:674
gen::FortranCallback::resetIterationsPerEvent
void resetIterationsPerEvent()
Definition: FortranCallback.h:23
gen::FortranInstance::call
void call(void(&fn)())
Definition: FortranInstance.h:20
gen::JetMatching::match
virtual int match(const lhef::LHEEvent *partonLevel, const std::vector< fastjet::PseudoJet > *jetInput)=0
gen::Pythia6Hadronizer::fDisplayPythiaCards
bool fDisplayPythiaCards
Definition: Pythia6Hadronizer.h:99
edm::ParameterSet
Definition: ParameterSet.h:36
gen::pystfr_
void pystfr_(int &)
gen::Pythia6Hadronizer::hadronize
bool hadronize()
Definition: Pythia6Hadronizer.cc:443
gen::Pythia6Hadronizer::~Pythia6Hadronizer
~Pythia6Hadronizer() override
Definition: Pythia6Hadronizer.cc:214
gen::JetMatching::resetMatchingStatus
void resetMatchingStatus()
Definition: JetMatching.h:73
gen::pyjets_local
static struct gen::@662 pyjets_local
LHERunInfo.h
gen::Pythia6Hadronizer::doSetRandomEngine
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
Definition: Pythia6Hadronizer.cc:221
gen::Pythia6Hadronizer::classname
const char * classname() const
Definition: Pythia6Hadronizer.cc:909
gen::FortranCallback::setLHERunInfo
void setLHERunInfo(lhef::LHERunInfo *lheri)
Definition: FortranCallback.h:20
gen::v
double v[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:74
gen::Pythia6Hadronizer::fImposeProperTime
bool fImposeProperTime
Definition: Pythia6Hadronizer.h:109
gen::pydecy_
void pydecy_(int &ip)
createfilelist.int
int
Definition: createfilelist.py:10
gen::call_pylist
void call_pylist(int mode)
Definition: ExhumeHadronizer.cc:63
gen::Pythia6Hadronizer::fMaxEventsToPrint
unsigned int fMaxEventsToPrint
Definition: Pythia6Hadronizer.h:93
gen::pystrhad_
void pystrhad_()
value
Definition: value.py:1
gen::Pythia6Hadronizer::ElectronPositron
Definition: Pythia6Hadronizer.h:82
gen::JetMatching::create
static std::unique_ptr< JetMatching > create(const edm::ParameterSet &params)
Definition: JetMatching.cc:32
gen::Pythia6Hadronizer::fPythiaListVerbosity
unsigned int fPythiaListVerbosity
Definition: Pythia6Hadronizer.h:97
gen::Pythia6Hadronizer::Pythia6Hadronizer
Pythia6Hadronizer(edm::ParameterSet const &ps)
Definition: Pythia6Hadronizer.cc:96
get
#define get
gen::Pythia6Hadronizer::imposeProperTime
void imposeProperTime()
Definition: Pythia6Hadronizer.cc:831
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
LHEEventProduct.h
gen::JetMatching::beforeHadronisationExec
virtual void beforeHadronisationExec()
Definition: JetMatching.cc:23
gen::Pythia6Hadronizer::fBeam2PZ
double fBeam2PZ
Definition: Pythia6Hadronizer.h:88
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
gen::BaseHadronizer::event
std::unique_ptr< HepMC::GenEvent > & event()
Definition: BaseHadronizer.h:86
gen::Pythia6Hadronizer::fConvertToPDG
bool fConvertToPDG
Definition: Pythia6Hadronizer.h:112
edm::SharedResourceNames::kPythia6
static const std::string kPythia6
Definition: SharedResourceNames.h:26
Exception
Definition: hltDiff.cc:246
gen::Pythia6ServiceWithCallback::upEvnt
void upEvnt() override
Definition: Pythia6Hadronizer.cc:65
gen::JetMatching::beforeHadronisation
virtual void beforeHadronisation(const lhef::LHEEvent *event)
Definition: JetMatching.cc:21
HEPEUP_::nup
int nup
Definition: LHECommonBlocks.h:21
Pythia6Service.h
gen::Pythia6Service::setSLHAFromHeader
void setSLHAFromHeader(const std::vector< std::string > &lines)
Definition: Pythia6Service.cc:324
pdg
Definition: pdg_functions.h:28
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
gen::Pythia6Hadronizer::PPbar
Definition: Pythia6Hadronizer.h:82
lhef::LHEEvent::count
void count(LHERunInfo::CountMode count, double weight=1.0, double matchWeight=1.0)
Definition: LHEEvent.cc:182
gen::Pythia6Hadronizer::generatePartonsAndHadronize
bool generatePartonsAndHadronize()
Definition: Pythia6Hadronizer.cc:395
gen::npad
int npad
Definition: Cascade2Hadronizer.cc:73
gen::Pythia6Hadronizer::initializeForInternalPartons
bool initializeForInternalPartons()
Definition: Pythia6Hadronizer.cc:719
gen::Pythia6Hadronizer::declareStableParticles
bool declareStableParticles(const std::vector< int > &)
Definition: Pythia6Hadronizer.cc:777
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
gen::Pythia6Service
Definition: Pythia6Service.h:24
FortranCallback.h
gen::Pythia6Hadronizer::fillTmpStorage
void fillTmpStorage()
Definition: Pythia6Hadronizer.cc:236
gen::Pythia6ServiceWithCallback::Pythia6ServiceWithCallback
Pythia6ServiceWithCallback(const edm::ParameterSet &ps)
Definition: Pythia6Hadronizer.cc:60
gen::FortranCallback::fillEvent
void fillEvent()
Definition: FortranCallback.h:70
gen::Pythia6Hadronizer::statistics
void statistics()
Definition: Pythia6Hadronizer.cc:895
EgammaValidation_cff.pdgid
pdgid
Definition: EgammaValidation_cff.py:30
lhef::LHERunInfo::findHeader
std::vector< std::string > findHeader(const std::string &tag) const
Definition: LHERunInfo.cc:436
gen::JetMatching::init
virtual void init(const lhef::LHERunInfo *runInfo)
Definition: JetMatching.cc:19
crabWrapper.key
key
Definition: crabWrapper.py:19
gen::BaseHadronizer::runInfo
GenRunInfoProduct & runInfo()
Definition: BaseHadronizer.h:85
gen::n
int n
Definition: Cascade2Hadronizer.cc:73
gen::call_pygive
bool call_pygive(const std::string &line)
Definition: ExhumeHadronizer.cc:64
edm::errors::Configuration
Definition: EDMException.h:36
class-composition.parent
parent
Definition: class-composition.py:88
pydat1
#define pydat1
Definition: ExhumeHadronizer.cc:37
gen::Pythia6Hadronizer::fDisplayPythiaBanner
bool fDisplayPythiaBanner
Definition: Pythia6Hadronizer.h:98
gen::Pythia6Hadronizer::declareSpecialSettings
bool declareSpecialSettings(const std::vector< std::string > &)
Definition: Pythia6Hadronizer.cc:795
gen::Pythia6Hadronizer::finalizeEvent
void finalizeEvent()
Definition: Pythia6Hadronizer.cc:250