CMS 3D CMS Logo

Herwig6Hadronizer.cc
Go to the documentation of this file.
1 #include <cstring>
2 #include <sstream>
3 #include <string>
4 #include <vector>
5 #include <memory>
6 #include <map>
7 #include <set>
8 
9 #include <boost/algorithm/string/classification.hpp>
10 #include <boost/algorithm/string/split.hpp>
11 #include <HepMC/GenEvent.h>
12 #include <HepMC/GenParticle.h>
13 #include <HepMC/GenVertex.h>
14 #include <HepMC/PdfInfo.h>
15 #include <HepMC/HerwigWrapper.h>
16 #include <HepMC/HEPEVT_Wrapper.h>
17 #include <HepMC/IO_HERWIG.h>
18 #include "HepPID/ParticleIDTranslations.hh"
19 
22 
25 
28 
34 
36 
39 
41 
42 namespace CLHEP {
43  class HepRandomEngine;
44 }
45 
46 extern "C" {
47 void hwuidt_(int *iopt, int *ipdg, int *iwig, char nwig[8]);
48 double hwualf_(int *mode, double *scale);
49 double hwuaem_(double *scale);
50 }
51 
52 // helpers
53 namespace {
54  inline bool call_hwmatch() {
55  int result;
56  hwmatch(&result);
57  return result;
58  }
59  inline bool call_hwmsct() {
60  int result;
61  hwmsct(&result);
62  return result;
63  }
64 
65  int pdgToHerwig(int ipdg, char *nwig) {
66  int iopt = 1;
67  int iwig = 0;
68  hwuidt_(&iopt, &ipdg, &iwig, nwig);
69  return ipdg ? iwig : 0;
70  }
71 
72  bool markStable(int pdgId) {
73  char nwig[9] = " ";
74  if (!pdgToHerwig(pdgId, nwig))
75  return false;
76  hwusta(nwig, 1);
77  return true;
78  }
79 } // namespace
80 
82 public:
84  ~Herwig6Hadronizer() override;
85 
86  void setSLHAFromHeader(const std::vector<std::string> &lines);
87  bool initialize(const lhef::HEPRUP *heprup);
88 
89  bool readSettings(int);
90 
91  // bool initializeForInternalPartons() { return initialize(0); }
92  // bool initializeForExternalPartons() { return initialize(lheRunInfo()->getHEPRUP()); }
93 
96 
97  bool declareStableParticles(const std::vector<int> &pdgIds);
98  bool declareSpecialSettings(const std::vector<std::string> &);
99 
100  void statistics();
101 
103  bool hadronize();
104  bool decay();
105  bool residualDecay();
106  void finalizeEvent();
107 
108  const char *classname() const { return "Herwig6Hadronizer"; }
109 
110 private:
111  void doSetRandomEngine(CLHEP::HepRandomEngine *v) override;
112  std::vector<std::string> const &doSharedResources() const override { return theSharedResources; }
113 
114  void clear();
115 
116  int pythiaStatusCode(const HepMC::GenParticle *p) const;
117  void pythiaStatusCodes();
118 
119  void upInit() override;
120  void upEvnt() override;
121 
122  static const std::vector<std::string> theSharedResources;
123 
124  HepMC::IO_HERWIG conv;
125  bool needClear;
127 
134  double comEnergy;
135  bool useJimmy;
138  bool fConvertToPDG; // convert PIDs
141  int nMatch;
143 
145 
146  // -------------------------------------------------------------------------------
147  std::string particleSpecFileName; //Lars 20/Jul/2011
149  // -------------------------------------------------------------------------------
150 };
151 
152 extern "C" {
153 void hwwarn_(const char *method, int *id);
154 void setherwpdf_(void);
155 void mysetpdfpath_(const char *path);
156 } // extern "C"
157 
160 
162  : BaseHadronizer(params),
163  needClear(false),
164  parameters(params.getParameter<edm::ParameterSet>("HerwigParameters")),
165  herwigVerbosity(params.getUntrackedParameter<int>("herwigVerbosity", 0)),
166  hepmcVerbosity(params.getUntrackedParameter<int>("hepmcVerbosity", 0)),
167  maxEventsToPrint(params.getUntrackedParameter<int>("maxEventsToPrint", 0)),
168  printCards(params.getUntrackedParameter<bool>("printCards", false)),
169  emulatePythiaStatusCodes(params.getUntrackedParameter<bool>("emulatePythiaStatusCodes", false)),
170  comEnergy(params.getParameter<double>("comEnergy")),
171  useJimmy(params.getParameter<bool>("useJimmy")),
172  doMPInteraction(params.getParameter<bool>("doMPInteraction")),
173  numTrials(params.getUntrackedParameter<int>("numTrialsMPI", 100)),
174  doMatching(params.getUntrackedParameter<bool>("doMatching", false)),
175  inclusiveMatching(params.getUntrackedParameter<bool>("inclusiveMatching", true)),
176  nMatch(params.getUntrackedParameter<int>("nMatch", 0)),
177  matchingScale(params.getUntrackedParameter<double>("matchingScale", 0.0)),
178  readMCatNLOfile(false),
179 
180  // added to be able to read external particle spectrum file
181  particleSpecFileName(params.getUntrackedParameter<std::string>("ParticleSpectrumFileName", "")),
182  readParticleSpecFile(params.getUntrackedParameter<bool>("readParticleSpecFile", false))
183 
184 {
185  fConvertToPDG = false;
186  if (params.exists("doPDGConvert"))
187  fConvertToPDG = params.getParameter<bool>("doPDGConvert");
188 }
189 
191 
193 
195  if (!needClear)
196  return;
197 
198  // teminate elementary process
199  call(hwefin);
200  if (useJimmy)
201  call(jmefin);
202 
203  needClear = false;
204 }
205 
206 void Herwig6Hadronizer::setSLHAFromHeader(const std::vector<std::string> &lines) {
207  std::set<std::string> blocks;
209  for (std::vector<std::string>::const_iterator iter = lines.begin(); iter != lines.end(); ++iter) {
210  std::string line = *iter;
211  std::transform(line.begin(), line.end(), line.begin(), (int (*)(int))std::toupper);
212  std::string::size_type pos = line.find('#');
213  if (pos != std::string::npos)
214  line.resize(pos);
215 
216  if (line.empty())
217  continue;
218 
219  if (!boost::algorithm::is_space()(line[0])) {
220  std::vector<std::string> tokens;
221  boost::split(tokens, line, boost::algorithm::is_space(), boost::token_compress_on);
222  if (tokens.empty())
223  continue;
224  block.clear();
225  if (tokens.size() < 2)
226  continue;
227  if (tokens[0] == "BLOCK")
228  block = tokens[1];
229  else if (tokens[0] == "DECAY")
230  block = "DECAY";
231 
232  if (block.empty())
233  continue;
234 
235  if (!blocks.count(block)) {
236  blocks.insert(block);
237  edm::LogWarning("Generator|Herwig6Hadronzier")
238  << "Unsupported SLHA block \"" << block << "\". It will be ignored." << std::endl;
239  }
240  }
241  }
242 }
243 
245  clear();
246  const lhef::HEPRUP *heprup = lheRunInfo()->getHEPRUP();
247  externalPartons = (heprup != nullptr);
248 
249  if (key == 0 && externalPartons)
250  return false;
251  if (key > 0 && !externalPartons)
252  return false;
253 
254  std::ostringstream info;
255  info << "---------------------------------------------------\n";
256  info << "Taking in settinsg for Herwig6Hadronizer for " << (externalPartons ? "external" : "internal")
257  << " partons\n";
258  info << "---------------------------------------------------\n";
259 
260  info << " Herwig verbosity level = " << herwigVerbosity << "\n";
261  info << " HepMC verbosity = " << hepmcVerbosity << "\n";
262  info << " Number of events to be printed = " << maxEventsToPrint << "\n";
263 
264  // Call hwudat to set up HERWIG block data
265  hwudat();
266 
267  // Setting basic parameters
268  if (externalPartons) {
269  hwproc.PBEAM1 = heprup->EBMUP.first;
270  hwproc.PBEAM2 = heprup->EBMUP.second;
271  pdgToHerwig(heprup->IDBMUP.first, hwbmch.PART1);
272  pdgToHerwig(heprup->IDBMUP.second, hwbmch.PART2);
273  } else {
274  hwproc.PBEAM1 = 0.5 * comEnergy;
275  hwproc.PBEAM2 = 0.5 * comEnergy;
276  pdgToHerwig(2212, hwbmch.PART1);
277  pdgToHerwig(2212, hwbmch.PART2);
278  }
279 
280  if (doMatching) {
281  hwmatchpram.n_match = nMatch;
282  hwmatchpram.matching_scale = matchingScale;
283 
284  if (inclusiveMatching)
285  hwmatchpram.max_multiplicity_flag = 1;
286  else
287  hwmatchpram.max_multiplicity_flag = 0;
288  }
289 
290  if (useJimmy) {
291  info << " HERWIG will be using JIMMY for UE/MI.\n";
292  jmparm.MSFLAG = 1;
293  if (doMPInteraction)
294  info << " JIMMY trying to generate multiple interactions.\n";
295  }
296 
297  // set the IPROC already here... needed for VB pairs
298 
299  bool iprocFound = false;
300 
302  if (!strcmp((line->substr(0, 5)).c_str(), "IPROC")) {
303  if (!give(*line))
305  << "Herwig 6 did not accept the following: \"" << *line << "\"." << std::endl;
306  else
307  iprocFound = true;
308  }
309  }
310 
311  if (!iprocFound && !externalPartons)
312  throw edm::Exception(edm::errors::Configuration) << "You have to define the process with IPROC." << std::endl;
313 
314  // initialize other common blocks ...
315  call(hwigin); // default init
316 
317  hwevnt.MAXER = 100000000; // O(inf)
318  hwpram.LWSUD = 0; // don't write Sudakov form factors
319  hwdspn.LWDEC = 0; // don't write three/four body decays
320  // (no fort.77 and fort.88 ...)
321  // init LHAPDF glue
322  std::memset(hwprch.AUTPDF, ' ', sizeof hwprch.AUTPDF);
323  for (unsigned int i = 0; i < 2; i++) {
324  hwpram.MODPDF[i] = -111;
325  std::memcpy(hwprch.AUTPDF[i], "HWLHAPDF", 8);
326  }
327 
328  hwevnt.MAXPR = maxEventsToPrint;
329  hwpram.IPRINT = herwigVerbosity;
330  // hwprop.RMASS[6] = 175.0; //FIXME
331 
332  if (printCards) {
333  info << "\n";
334  info << "------------------------------------\n";
335  info << "Reading HERWIG parameters\n";
336  info << "------------------------------------\n";
337  }
339  if (printCards)
340  info << " " << *line << "\n";
341  if (!give(*line))
343  << "Herwig 6 did not accept the following: \"" << *line << "\"." << std::endl;
344  }
345 
346  if (printCards)
347  info << "\n";
348 
349  if (externalPartons) {
350  std::vector<std::string> slha = lheRunInfo()->findHeader("slha");
351  if (!slha.empty())
352  setSLHAFromHeader(slha);
353  }
354 
355  needClear = true;
356 
357  std::pair<int, int> pdfs(-1, -1);
358  if (externalPartons)
359  pdfs = lheRunInfo()->pdfSetTranslation();
360 
361  if (hwpram.MODPDF[0] != -111 || hwpram.MODPDF[1] != -111) {
362  for (unsigned int i = 0; i < 2; i++)
363  if (hwpram.MODPDF[i] == -111)
364  hwpram.MODPDF[i] = -1;
365 
366  if (pdfs.first != -1 || pdfs.second != -1)
367  edm::LogError("Generator|Herwig6Hadronzier") << "Both external Les Houches event and "
368  "config file specify a PDF set. "
369  "User PDF will override external one."
370  << std::endl;
371 
372  pdfs.first = hwpram.MODPDF[0] != -111 ? hwpram.MODPDF[0] : -1;
373  pdfs.second = hwpram.MODPDF[1] != -111 ? hwpram.MODPDF[1] : -1;
374  }
375 
376  printf("pdfs.first = %i, pdfs.second = %i\n", pdfs.first, pdfs.second);
377 
378  hwpram.MODPDF[0] = pdfs.first;
379  hwpram.MODPDF[1] = pdfs.second;
380 
381  if (externalPartons && hwproc.IPROC >= 0)
382  hwproc.IPROC = -1;
383 
384  //Lars: lower EFFMIN threshold, to continue execution of IPROC=4000, lambda'_211=0.01 at LM7,10
385  if (readParticleSpecFile) {
387  hwpram.EFFMIN = 1e-5;
388  }
389 
390  edm::LogInfo(info.str());
391 
392  return true;
393 }
394 
396  if (useJimmy)
397  call(jimmin);
398 
399  call(hwuinc);
400 
401  // initialize HERWIG event generation
402  call(hweini);
403 
404  if (useJimmy) {
405  call(jminit);
406  }
407 
408  return true;
409 }
410 
412  clear();
413 
414  externalPartons = (heprup != nullptr);
415 
416  std::ostringstream info;
417  info << "---------------------------------------------------\n";
418  info << "Initializing Herwig6Hadronizer for " << (externalPartons ? "external" : "internal") << " partons\n";
419  info << "---------------------------------------------------\n";
420 
421  info << " Herwig verbosity level = " << herwigVerbosity << "\n";
422  info << " HepMC verbosity = " << hepmcVerbosity << "\n";
423  info << " Number of events to be printed = " << maxEventsToPrint << "\n";
424 
425  // Call hwudat to set up HERWIG block data
426  hwudat();
427 
428  // Setting basic parameters
429  if (externalPartons) {
430  hwproc.PBEAM1 = heprup->EBMUP.first;
431  hwproc.PBEAM2 = heprup->EBMUP.second;
432  pdgToHerwig(heprup->IDBMUP.first, hwbmch.PART1);
433  pdgToHerwig(heprup->IDBMUP.second, hwbmch.PART2);
434  } else {
435  hwproc.PBEAM1 = 0.5 * comEnergy;
436  hwproc.PBEAM2 = 0.5 * comEnergy;
437  pdgToHerwig(2212, hwbmch.PART1);
438  pdgToHerwig(2212, hwbmch.PART2);
439  }
440 
441  if (useJimmy) {
442  info << " HERWIG will be using JIMMY for UE/MI.\n";
443  jmparm.MSFLAG = 1;
444  if (doMPInteraction)
445  info << " JIMMY trying to generate multiple interactions.\n";
446  }
447 
448  // set the IPROC already here... needed for VB pairs
449 
450  bool iprocFound = false;
451 
453  if (!strcmp((line->substr(0, 5)).c_str(), "IPROC")) {
454  if (!give(*line))
456  << "Herwig 6 did not accept the following: \"" << *line << "\"." << std::endl;
457  else
458  iprocFound = true;
459  }
460  }
461 
462  if (!iprocFound && !externalPartons)
463  throw edm::Exception(edm::errors::Configuration) << "You have to define the process with IPROC." << std::endl;
464 
465  // initialize other common blocks ...
466  call(hwigin);
467  hwevnt.MAXER = 100000000; // O(inf)
468  hwpram.LWSUD = 0; // don't write Sudakov form factors
469  hwdspn.LWDEC = 0; // don't write three/four body decays
470  // (no fort.77 and fort.88 ...)
471 
472  // init LHAPDF glue
473 
474  std::memset(hwprch.AUTPDF, ' ', sizeof hwprch.AUTPDF);
475  for (unsigned int i = 0; i < 2; i++) {
476  hwpram.MODPDF[i] = -111;
477  std::memcpy(hwprch.AUTPDF[i], "HWLHAPDF", 8);
478  }
479 
480  if (useJimmy)
481  call(jimmin);
482 
483  hwevnt.MAXPR = maxEventsToPrint;
484  hwpram.IPRINT = herwigVerbosity;
485  // hwprop.RMASS[6] = 175.0; //FIXME
486 
487  if (printCards) {
488  info << "\n";
489  info << "------------------------------------\n";
490  info << "Reading HERWIG parameters\n";
491  info << "------------------------------------\n";
492  }
494  if (printCards)
495  info << " " << *line << "\n";
496  if (!give(*line))
498  << "Herwig 6 did not accept the following: \"" << *line << "\"." << std::endl;
499  }
500 
501  if (printCards)
502  info << "\n";
503 
504  if (externalPartons) {
505  std::vector<std::string> slha = lheRunInfo()->findHeader("slha");
506  if (!slha.empty())
507  setSLHAFromHeader(slha);
508  }
509 
510  needClear = true;
511 
512  std::pair<int, int> pdfs(-1, -1);
513  if (externalPartons)
514  pdfs = lheRunInfo()->pdfSetTranslation();
515 
516  if (hwpram.MODPDF[0] != -111 || hwpram.MODPDF[1] != -111) {
517  for (unsigned int i = 0; i < 2; i++)
518  if (hwpram.MODPDF[i] == -111)
519  hwpram.MODPDF[i] = -1;
520 
521  if (pdfs.first != -1 || pdfs.second != -1)
522  edm::LogError("Generator|Herwig6Hadronzier") << "Both external Les Houches event and "
523  "config file specify a PDF set. "
524  "User PDF will override external one."
525  << std::endl;
526 
527  pdfs.first = hwpram.MODPDF[0] != -111 ? hwpram.MODPDF[0] : -1;
528  pdfs.second = hwpram.MODPDF[1] != -111 ? hwpram.MODPDF[1] : -1;
529  }
530 
531  printf("pdfs.first = %i, pdfs.second = %i\n", pdfs.first, pdfs.second);
532 
533  hwpram.MODPDF[0] = pdfs.first;
534  hwpram.MODPDF[1] = pdfs.second;
535 
536  if (externalPartons)
537  hwproc.IPROC = -1;
538 
539  //Lars: lower EFFMIN threshold, to continue execution of IPROC=4000, lambda'_211=0.01 at LM7,10
540  if (readParticleSpecFile) {
542  hwpram.EFFMIN = 1e-5;
543  }
544 
545  // HERWIG preparations ...
546  call(hwuinc);
547  markStable(13); // MU+
548  markStable(-13); // MU-
549  markStable(3112); // SIGMA+
550  markStable(-3112); // SIGMABAR+
551  markStable(3222); // SIGMA-
552  markStable(-3222); // SIGMABAR-
553  markStable(3122); // LAMBDA0
554  markStable(-3122); // LAMBDABAR0
555  markStable(3312); // XI-
556  markStable(-3312); // XIBAR+
557  markStable(3322); // XI0
558  markStable(-3322); // XI0BAR
559  markStable(3334); // OMEGA-
560  markStable(-3334); // OMEGABAR+
561  markStable(211); // PI+
562  markStable(-211); // PI-
563  markStable(321); // K+
564  markStable(-321); // K-
565  markStable(310); // K_S0
566  markStable(130); // K_L0
567 
568  // better: merge with declareStableParticles
569  // and get the list from configuration / Geant4 / Core somewhere
570 
571  // initialize HERWIG event generation
572  call(hweini);
573 
574  if (useJimmy)
575  call(jminit);
576 
577  edm::LogInfo(info.str());
578 
579  return true;
580 }
581 
582 bool Herwig6Hadronizer::declareStableParticles(const std::vector<int> &pdgIds) {
583  markStable(13); // MU+
584  markStable(-13); // MU-
585  markStable(3112); // SIGMA+
586  markStable(-3112); // SIGMABAR+
587  markStable(3222); // SIGMA-
588  markStable(-3222); // SIGMABAR-
589  markStable(3122); // LAMBDA0
590  markStable(-3122); // LAMBDABAR0
591  markStable(3312); // XI-
592  markStable(-3312); // XIBAR+
593  markStable(3322); // XI0
594  markStable(-3322); // XI0BAR
595  markStable(3334); // OMEGA-
596  markStable(-3334); // OMEGABAR+
597  markStable(211); // PI+
598  markStable(-211); // PI-
599  markStable(321); // K+
600  markStable(-321); // K-
601  markStable(310); // K_S0
602  markStable(130); // K_L0
603 
604  for (std::vector<int>::const_iterator iter = pdgIds.begin(); iter != pdgIds.end(); ++iter)
605  if (!markStable(*iter))
606  return false;
607  return true;
608 }
609 
610 bool Herwig6Hadronizer::declareSpecialSettings(const std::vector<std::string> &) { return true; }
611 
613  if (!runInfo().internalXSec()) {
614  // not set via LHE, so get it from HERWIG
615  // the reason is that HERWIG doesn't compute the xsec
616  // in all LHE modes
617 
618  double RNWGT = 1. / hwevnt.NWGTS;
619  double AVWGT = hwevnt.WGTSUM * RNWGT;
620 
621  double xsec = 1.0e3 * AVWGT;
622 
623  runInfo().setInternalXSec(xsec);
624  }
625 }
626 
628  // hard process generation, parton shower, hadron formation
629 
630  InstanceWrapper wrapper(this); // safe guard
631 
632  event().reset();
633 
634  // call herwig routines to create HEPEVT
635 
636  hwuine(); // initialize event
637 
638  if (callWithTimeout(10, hwepro)) { // process event and PS
639  // We hung for more than 10 seconds
640  int error = 199;
641  hwwarn_("HWHGUP", &error);
642  }
643 
644  hwbgen(); // parton cascades
645 
646  // call jimmy ... only if event is not killed yet by HERWIG
647  if (useJimmy && doMPInteraction && !hwevnt.IERROR && call_hwmsct()) {
648  if (lheEvent())
650  return false;
651  }
652 
653  hwdhob(); // heavy quark decays
654  hwcfor(); // cluster formation
655  hwcdec(); // cluster decays
656 
657  // // if event *not* killed by HERWIG, return true
658  // if (hwevnt.IERROR) {
659  // hwufne(); // finalize event, to keep system clean
660  // if (lheEvent()) lheEvent()->count(lhef::LHERunInfo::kKilled);
661  // return false;
662  // }
663 
664  //if (lheEvent()) lheEvent()->count(lhef::LHERunInfo::kAccepted);
665 
666  hwdhad(); // unstable particle decays
667  hwdhvy(); // heavy flavour decays
668  hwmevt(); // soft underlying event
669 
670  hwufne(); // finalize event
671 
672  // if event *not* killed by HERWIG, return true
673  if (hwevnt.IERROR) {
674  if (lheEvent())
676  return false;
677  }
678 
679  if (doMatching) {
680  bool pass = call_hwmatch();
681  if (!pass) {
682  printf("Event failed MLM matching\n");
683  if (lheEvent())
685  return false;
686  }
687  }
688 
689  if (lheEvent())
691 
692  event().reset(new HepMC::GenEvent);
693  if (!conv.fill_next_event(event().get()))
694  throw cms::Exception("Herwig6Error") << "HepMC Conversion problems in event." << std::endl;
695 
696  // do particle ID conversion Herwig->PDG, if requested
697  if (fConvertToPDG) {
698  for (HepMC::GenEvent::particle_iterator part = event()->particles_begin(); part != event()->particles_end();
699  ++part) {
700  if ((*part)->pdg_id() != HepPID::translateHerwigtoPDT((*part)->pdg_id()))
701  (*part)->set_pdg_id(HepPID::translateHerwigtoPDT((*part)->pdg_id()));
702  }
703  }
704 
705  return true;
706 }
707 
710 
711  HepMC::PdfInfo pdfInfo;
712  if (externalPartons) {
714  lheEvent()->fillPdfInfo(&pdfInfo);
715 
716  // for MC@NLO: IDWRUP is not filled...
717  if (event()->signal_process_id() == 0)
718  event()->set_signal_process_id(abs(hwproc.IPROC));
719  }
720 
721  HepMC::GenParticle *incomingParton = nullptr;
722  HepMC::GenParticle *targetParton = nullptr;
723 
724  HepMC::GenParticle *incomingProton = nullptr;
725  HepMC::GenParticle *targetProton = nullptr;
726 
727  // find incoming parton (first entry with IST=121)
728  for (HepMC::GenEvent::particle_const_iterator it = event()->particles_begin();
729  (it != event()->particles_end() && incomingParton == nullptr);
730  it++)
731  if ((*it)->status() == 121)
732  incomingParton = (*it);
733 
734  // find target parton (first entry with IST=122)
735  for (HepMC::GenEvent::particle_const_iterator it = event()->particles_begin();
736  (it != event()->particles_end() && targetParton == nullptr);
737  it++)
738  if ((*it)->status() == 122)
739  targetParton = (*it);
740 
741  // find incoming Proton (first entry ID=2212, IST=101)
742  for (HepMC::GenEvent::particle_const_iterator it = event()->particles_begin();
743  (it != event()->particles_end() && incomingProton == nullptr);
744  it++)
745  if ((*it)->status() == 101 && (*it)->pdg_id() == 2212)
746  incomingProton = (*it);
747 
748  // find target Proton (first entry ID=2212, IST=102)
749  for (HepMC::GenEvent::particle_const_iterator it = event()->particles_begin();
750  (it != event()->particles_end() && targetProton == nullptr);
751  it++)
752  if ((*it)->status() == 102 && (*it)->pdg_id() == 2212)
753  targetProton = (*it);
754 
755  // find hard scale Q (computed from colliding partons)
756  if (incomingParton && targetParton) {
757  math::XYZTLorentzVector totMomentum(0, 0, 0, 0);
758  totMomentum += incomingParton->momentum();
759  totMomentum += targetParton->momentum();
760  double evScale = totMomentum.mass();
761  double evScale2 = evScale * evScale;
762 
763  // find alpha_QED & alpha_QCD
764  int one = 1;
765  double alphaQCD = hwualf_(&one, &evScale);
766  double alphaQED = hwuaem_(&evScale2);
767 
768  if (!externalPartons || event()->event_scale() < 0)
769  event()->set_event_scale(evScale);
770  if (!externalPartons || event()->alphaQCD() < 0)
771  event()->set_alphaQCD(alphaQCD);
772  if (!externalPartons || event()->alphaQED() < 0)
773  event()->set_alphaQED(alphaQED);
774 
775  if (!externalPartons || pdfInfo.x1() < 0) {
776  // get the PDF information
777  pdfInfo.set_id1(incomingParton->pdg_id() == 21 ? 0 : incomingParton->pdg_id());
778  pdfInfo.set_id2(targetParton->pdg_id() == 21 ? 0 : targetParton->pdg_id());
779  if (incomingProton && targetProton) {
780  double x1 = incomingParton->momentum().pz() / incomingProton->momentum().pz();
781  double x2 = targetParton->momentum().pz() / targetProton->momentum().pz();
782  pdfInfo.set_x1(x1);
783  pdfInfo.set_x2(x2);
784  }
785  // we do not fill pdf1 & pdf2, since they are not easily available (what are they needed for anyways???)
786  pdfInfo.set_scalePDF(evScale); // the same as Q above... does this make sense?
787  }
788 
789  if (!externalPartons || event()->signal_process_id() < 0)
790  event()->set_signal_process_id(abs(hwproc.IPROC));
791  event()->set_pdf_info(pdfInfo);
792  }
793 
794  // add event weight & PDF information
795  if (lheRunInfo() != nullptr && std::abs(lheRunInfo()->getHEPRUP()->IDWTUP) == 4)
796  // in LHE weighting mode 4 the weight is an xsec, so convert form HERWIG
797  // to standard CMS unit "picobarn"
798  event()->weights().push_back(1.0e3 * hwevnt.EVWGT);
799  else
800  event()->weights().push_back(hwevnt.EVWGT);
801 
802  // find final parton (first entry with IST=123)
803  HepMC::GenParticle *finalParton = nullptr;
804  for (HepMC::GenEvent::particle_const_iterator it = event()->particles_begin();
805  (it != event()->particles_end() && finalParton == nullptr);
806  it++)
807  if ((*it)->status() == 123)
808  finalParton = (*it);
809 
810  // add GenEventInfo & binning Values
811  eventInfo().reset(new GenEventInfoProduct(event().get()));
812  if (finalParton) {
813  double thisPt = finalParton->momentum().perp();
814  eventInfo()->setBinningValues(std::vector<double>(1, thisPt));
815  }
816 
817  // emulate PY6 status codes, if switched on...
820 }
821 
823  // hadron decays
824 
825  // InstanceWrapper wrapper(this); // safe guard
826  //
827  // //int iproc = hwproc.IPROC;
828  // //hwproc.IPROC = 312;
829  // hwdhad(); // unstable particle decays
830  // //hwproc.IPROC = iproc;
831  //
832  // hwdhvy(); // heavy flavour decays
833  // hwmevt(); // soft underlying event
834  //
835  // if (doMatching) {
836  // bool pass = call_hwmatch();
837  // if (!pass) {
838  // printf("Event failed MLM matching\n");
839  // hwufne();
840  // if (lheEvent()) lheEvent()->count(lhef::LHERunInfo::kKilled);
841  // return false;
842  // }
843  // }
844  //
845  // hwufne(); // finalize event
846  //
847  // if (hwevnt.IERROR)
848  // return false;
849  //
850  // if (lheEvent()) lheEvent()->count(lhef::LHERunInfo::kAccepted);
851  //
852  // event().reset(new HepMC::GenEvent);
853  // if (!conv.fill_next_event(event().get()))
854  // throw cms::Exception("Herwig6Error")
855  // << "HepMC Conversion problems in event." << std::endl;
856  //
857  // // do particle ID conversion Herwig->PDG, if requested
858  // if ( fConvertToPDG ) {
859  // for ( HepMC::GenEvent::particle_iterator part = event()->particles_begin(); part != event()->particles_end(); ++part) {
860  // if ((*part)->pdg_id() != HepPID::translateHerwigtoPDT((*part)->pdg_id()))
861  // (*part)->set_pdg_id(HepPID::translateHerwigtoPDT((*part)->pdg_id()));
862  // }
863  // }
864 
865  return true;
866 }
867 
868 bool Herwig6Hadronizer::residualDecay() { return true; }
869 
872  heprup_.pdfgup[0] = heprup_.pdfgup[1] = -1;
873  heprup_.pdfsup[0] = heprup_.pdfsup[1] = -1;
874  // we set up the PDFs ourselves
875 
876  // pass HERWIG paramaters fomr header (if present)
877  std::string mcnloHeader = "herwig6header";
878  std::vector<lhef::LHERunInfo::Header> headers = lheRunInfo()->getHeaders();
879  for (std::vector<lhef::LHERunInfo::Header>::const_iterator hIter = headers.begin(); hIter != headers.end(); ++hIter) {
880  if (hIter->tag() == mcnloHeader) {
881  readMCatNLOfile = true;
882  for (lhef::LHERunInfo::Header::const_iterator lIter = hIter->begin(); lIter != hIter->end(); ++lIter) {
883  if ((lIter->c_str())[0] != '#' && (lIter->c_str())[0] != '\n') { // it's not a comment)
884  if (!give(*lIter))
886  << "Herwig 6 did not accept the following: \"" << *lIter << "\"." << std::endl;
887  }
888  }
889  }
890  }
891 }
892 
895 
896  // if MCatNLO external file is read, read comment & pass IHPRO to HERWIG
897  if (readMCatNLOfile) {
898  for (std::vector<std::string>::const_iterator iter = lheEvent()->getComments().begin();
899  iter != lheEvent()->getComments().end();
900  ++iter) {
901  std::string toParse(iter->substr(1));
902  if (!give(toParse))
904  << "Herwig 6 did not accept the following: \"" << toParse << "\"." << std::endl;
905  }
906  }
907 }
908 
910  int status = p->status();
911 
912  // weird 9922212 particles...
913  if (status == 3 && !p->end_vertex())
914  return 2;
915 
916  if (status >= 1 && status <= 3)
917  return status;
918 
919  if (!p->end_vertex())
920  return 1;
921 
922  // let's prevent particles having status 3, if the identical
923  // particle downstream is a better status 3 candidate
924  int currentId = p->pdg_id();
925  int orig = status;
926  if (status == 123 || status == 124 || status == 155 || status == 156 || status == 160 ||
927  (status >= 195 && status <= 197)) {
928  for (const HepMC::GenParticle *q = p;;) {
929  const HepMC::GenVertex *vtx = q->end_vertex();
930  if (!vtx)
931  break;
932 
933  HepMC::GenVertex::particles_out_const_iterator iter;
934  for (iter = vtx->particles_out_const_begin(); iter != vtx->particles_out_const_end(); ++iter)
935  if ((*iter)->pdg_id() == currentId)
936  break;
937 
938  if (iter == vtx->particles_out_const_end())
939  break;
940 
941  q = *iter;
942  if (q->status() == 3 || ((status == 120 || status == 123 || status == 124) && orig > 124))
943  return 4;
944  }
945  }
946 
947  int nesting = 0;
948  for (;;) {
949  if ((status >= 120 && status <= 122) || status == 3) {
950  // avoid flagging status 3 if there is a
951  // better status 3 candidate upstream
952  if (externalPartons)
953  return ((orig >= 121 && orig <= 124) || orig == 3) ? 3 : 4;
954  else
955  return (nesting || (status != 3 && orig <= 124)) ? 3 : 4;
956  }
957 
958  // check whether we are leaving the hard process
959  // including heavy resonance decays
960  if (!(status == 4 || status == 123 || status == 124 || status == 155 || status == 156 || status == 160 ||
961  (status >= 195 && status <= 197)))
962  break;
963 
964  const HepMC::GenVertex *vtx = p->production_vertex();
965  if (!vtx || !vtx->particles_in_size())
966  break;
967 
968  p = *vtx->particles_in_const_begin();
969  status = p->status();
970 
971  int newId = p->pdg_id();
972 
973  if (!newId)
974  break;
975 
976  // nesting increases if we move to the next-best mother
977  if (newId != currentId) {
978  if (++nesting > 1 && externalPartons)
979  break;
980  currentId = newId;
981  }
982  }
983 
984  return 2;
985 }
986 
988  for (HepMC::GenEvent::particle_iterator iter = event()->particles_begin(); iter != event()->particles_end(); iter++)
989  (*iter)->set_status(pythiaStatusCode(*iter));
990 
991  for (HepMC::GenEvent::particle_iterator iter = event()->particles_begin(); iter != event()->particles_end(); iter++)
992  if ((*iter)->status() == 4)
993  (*iter)->set_status(2);
994 }
995 
997 
1000 
GenEventInfoProduct
Definition: GenEventInfoProduct.h:17
lhef::LHERunInfo::kAccepted
Definition: LHERunInfo.h:64
Herwig6Hadronizer::readSettings
bool readSettings(int)
Definition: Herwig6Hadronizer.cc:244
gen::BaseHadronizer::lheRunInfo
lhef::LHERunInfo * lheRunInfo()
Definition: BaseHadronizer.h:90
heprup_
struct HEPRUP_ heprup_
Herwig6Hadronizer::printCards
bool printCards
Definition: Herwig6Hadronizer.cc:132
gen::BaseHadronizer::lheEvent
lhef::LHEEvent * lheEvent()
Definition: BaseHadronizer.h:89
electrons_cff.bool
bool
Definition: electrons_cff.py:372
mps_fire.i
i
Definition: mps_fire.py:355
MessageLogger.h
edm::SharedResourceNames::kHerwig6
static const std::string kHerwig6
Definition: SharedResourceNames.h:31
herwig.h
Herwig6Hadronizer::residualDecay
bool residualDecay()
Definition: Herwig6Hadronizer.cc:868
funct::false
false
Definition: Factorize.h:34
lhef::LHEEvent::fillEventInfo
void fillEventInfo(HepMC::GenEvent *hepmc) const
Definition: LHEEvent.cc:218
Herwig6Hadronizer::decay
bool decay()
Definition: Herwig6Hadronizer.cc:822
Herwig6Hadronizer::initializeForExternalPartons
bool initializeForExternalPartons()
Definition: Herwig6Hadronizer.cc:95
gen::Herwig6Instance::setHerwigRandomEngine
void setHerwigRandomEngine(CLHEP::HepRandomEngine *v)
Definition: Herwig6Instance.h:38
LHERunInfoProduct::Header::const_iterator
std::vector< std::string >::const_iterator const_iterator
Definition: LHERunInfoProduct.h:18
hwmatchpram
#define hwmatchpram
Definition: herwig.h:329
Herwig6Hadronizer::clear
void clear()
Definition: Herwig6Hadronizer.cc:194
mps_update.status
status
Definition: mps_update.py:69
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
generator_cfi.maxEventsToPrint
maxEventsToPrint
Definition: generator_cfi.py:7
edm
HLT enums.
Definition: AlignableModifier.h:19
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
Herwig6Hadronizer::readParticleSpecFile
bool readParticleSpecFile
Definition: Herwig6Hadronizer.cc:148
BaseHadronizer.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
Herwig6Hadronizer::declareStableParticles
bool declareStableParticles(const std::vector< int > &pdgIds)
Definition: Herwig6Hadronizer.cc:582
jimmin
#define jimmin
Definition: herwig.h:315
ExternalDecayDriver.h
Herwig6Hadronizer::doMPInteraction
bool doMPInteraction
Definition: Herwig6Hadronizer.cc:136
AlcaSiPixelAliHarvester0T_cff.method
method
Definition: AlcaSiPixelAliHarvester0T_cff.py:41
pos
Definition: PixelAliasList.h:18
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
edm::LogInfo
Definition: MessageLogger.h:254
gen::FortranInstance::kFortranInstance
static const std::string kFortranInstance
Definition: FortranInstance.h:88
data-class-funcs.q
q
Definition: data-class-funcs.py:169
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
gen::ParameterCollector::const_iterator
Definition: ParameterCollector.h:35
HEPRUP_::pdfsup
int pdfsup[2]
Definition: LHECommonBlocks.h:11
hwprch
#define hwprch
Definition: herwig.h:60
Herwig6Hadronizer::setSLHAFromHeader
void setSLHAFromHeader(const std::vector< std::string > &lines)
Definition: Herwig6Hadronizer.cc:206
wrapper
static HepMC::HEPEVT_Wrapper wrapper
Definition: BeamHaloProducer.cc:47
GenRunInfoProduct::setInternalXSec
void setInternalXSec(const XSec &xsec)
Definition: GenRunInfoProduct.h:26
cms::dd::split
std::vector< std::string_view > split(std::string_view, const char *)
lhef::LHEEvent::fillPdfInfo
void fillPdfInfo(HepMC::PdfInfo *info) const
Definition: LHEEvent.cc:191
findQualityFiles.v
v
Definition: findQualityFiles.py:179
jminit
#define jminit
Definition: herwig.h:316
relativeConstraints.error
error
Definition: relativeConstraints.py:53
gen::BaseHadronizer
Definition: BaseHadronizer.h:46
GenRunInfoProduct.h
getRunAppsInfo.headers
headers
Definition: getRunAppsInfo.py:65
Herwig6Hadronizer::nMatch
int nMatch
Definition: Herwig6Hadronizer.cc:141
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
jmefin
#define jmefin
Definition: herwig.h:318
gen::ParameterCollector
Definition: ParameterCollector.h:26
parameters
parameters
Definition: BeamSpot_PayloadInspector.cc:14
edm::Exception
Definition: EDMException.h:77
Herwig6Hadronizer::hadronize
bool hadronize()
Definition: Herwig6Hadronizer.cc:627
lhef::LHERunInfo::kSelected
Definition: LHERunInfo.h:64
lhef::HEPRUP::EBMUP
std::pair< double, double > EBMUP
Definition: LesHouches.h:82
Herwig6Hadronizer::~Herwig6Hadronizer
~Herwig6Hadronizer() override
Definition: Herwig6Hadronizer.cc:190
Herwig6Hadronizer::initialize
bool initialize(const lhef::HEPRUP *heprup)
Definition: Herwig6Hadronizer.cc:411
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
lhef::CommonBlocks::fillHEPEUP
static void fillHEPEUP(const HEPEUP *hepeup)
Definition: LHECommonBlocks.h:60
part
part
Definition: HCALResponse.h:20
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
lhef::LHERunInfo::getHeaders
const std::vector< Header > & getHeaders() const
Definition: LHERunInfo.h:56
setherwpdf_
void setherwpdf_(void)
Herwig6Hadronizer::conv
HepMC::IO_HERWIG conv
Definition: Herwig6Hadronizer.cc:124
edm::GeneratorFilter
Definition: GeneratorFilter.h:40
Herwig6Hadronizer::doMatching
bool doMatching
Definition: Herwig6Hadronizer.cc:139
POMWIG_DPEDijets_10TeV_Pt_30_cff.useJimmy
useJimmy
Definition: POMWIG_DPEDijets_10TeV_Pt_30_cff.py:5
Herwig6Hadronizer::generatePartonsAndHadronize
bool generatePartonsAndHadronize()
Definition: Herwig6Hadronizer.cc:102
Herwig6Hadronizer
Definition: Herwig6Hadronizer.cc:81
ParameterCollector.h
gen::FortranInstance::InstanceWrapper
Definition: FortranInstance.h:54
gen::BaseHadronizer::eventInfo
std::unique_ptr< GenEventInfoProduct > & eventInfo()
Definition: BaseHadronizer.h:87
Herwig6Hadronizer::hepmcVerbosity
int hepmcVerbosity
Definition: Herwig6Hadronizer.cc:130
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
Herwig6Hadronizer::inclusiveMatching
bool inclusiveMatching
Definition: Herwig6Hadronizer.cc:140
SharedResourceNames.h
Herwig6Hadronizer::finalizeEvent
void finalizeEvent()
Definition: Herwig6Hadronizer.cc:708
FortranInstance.h
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition: badGlobalMuonTaggersAOD_cff.py:5
CLHEP
Definition: CocoaGlobals.h:27
generator_cfi.comEnergy
comEnergy
Definition: generator_cfi.py:9
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
Herwig6Hadronizer::numTrials
int numTrials
Definition: Herwig6Hadronizer.cc:137
funct::true
true
Definition: Factorize.h:173
Scenarios_cff.scale
scale
Definition: Scenarios_cff.py:2186
gen::FortranInstance::call
void call(void(&fn)())
Definition: FortranInstance.h:20
Herwig6Hadronizer::theSharedResources
static const std::vector< std::string > theSharedResources
Definition: Herwig6Hadronizer.cc:122
Herwig6Hadronizer::initializeForInternalPartons
bool initializeForInternalPartons()
Definition: Herwig6Hadronizer.cc:395
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
groupFilesInBlocks.lines
lines
Definition: groupFilesInBlocks.py:95
Herwig6Hadronizer::pythiaStatusCode
int pythiaStatusCode(const HepMC::GenParticle *p) const
Definition: Herwig6Hadronizer.cc:909
ParameterSet
Definition: Functions.h:16
GeneratorFilter.h
Herwig6Hadronizer::herwigVerbosity
int herwigVerbosity
Definition: Herwig6Hadronizer.cc:129
Herwig6Hadronizer::doSharedResources
const std::vector< std::string > & doSharedResources() const override
Definition: Herwig6Hadronizer.cc:112
gen::Herwig6Instance
Definition: Herwig6Instance.h:22
Herwig6Hadronizer::declareSpecialSettings
bool declareSpecialSettings(const std::vector< std::string > &)
Definition: Herwig6Hadronizer.cc:610
HEPRUP_::pdfgup
int pdfgup[2]
Definition: LHECommonBlocks.h:10
LorentzVector.h
CosmicGenFilterHelix_cfi.pdgIds
pdgIds
Definition: CosmicGenFilterHelix_cfi.py:5
lhef::CommonBlocks::fillHEPRUP
static void fillHEPRUP(const HEPRUP *heprup)
Definition: LHECommonBlocks.h:41
Herwig6Hadronizer::upEvnt
void upEvnt() override
Definition: Herwig6Hadronizer.cc:893
createfilelist.int
int
Definition: createfilelist.py:10
Herwig6Hadronizer::needClear
bool needClear
Definition: Herwig6Hadronizer.cc:125
lhef::HEPRUP
Definition: LesHouches.h:22
Herwig6Hadronizer::particleSpecFileName
std::string particleSpecFileName
Definition: Herwig6Hadronizer.cc:147
EgammaValidation_cff.pdgId
pdgId
Definition: EgammaValidation_cff.py:118
groupFilesInBlocks.block
block
Definition: groupFilesInBlocks.py:150
lhef::LHEEvent::getComments
const std::vector< std::string > & getComments() const
Definition: LHEEvent.h:41
lhef::LHEEvent::fixHepMCEventTimeOrdering
static void fixHepMCEventTimeOrdering(HepMC::GenEvent *event)
Definition: LHEEvent.cc:451
get
#define get
lhef::LHERunInfo::getHEPRUP
const HEPRUP * getHEPRUP() const
Definition: LHERunInfo.h:51
Herwig6Hadronizer::Herwig6Hadronizer
Herwig6Hadronizer(const edm::ParameterSet &params)
Definition: Herwig6Hadronizer.cc:161
lhef::LHERunInfo::kKilled
Definition: LHERunInfo.h:64
LesHouches.h
Herwig6GeneratorFilter
edm::GeneratorFilter< Herwig6Hadronizer, gen::ExternalDecayDriver > Herwig6GeneratorFilter
Definition: Herwig6Hadronizer.cc:998
SiPixelPhase1Clusters_cfi.e3
e3
Definition: SiPixelPhase1Clusters_cfi.py:9
HadronizerFilter.h
Herwig6Hadronizer::externalPartons
bool externalPartons
Definition: Herwig6Hadronizer.cc:126
POMWIG_DPEDijets_10TeV_Pt_30_cff.herwigVerbosity
herwigVerbosity
Definition: POMWIG_DPEDijets_10TeV_Pt_30_cff.py:9
Herwig6Hadronizer::parameters
gen::ParameterCollector parameters
Definition: Herwig6Hadronizer.cc:128
POMWIG_DPEDijets_10TeV_Pt_30_cff.doMPInteraction
doMPInteraction
Definition: POMWIG_DPEDijets_10TeV_Pt_30_cff.py:6
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
std
Definition: JetResolutionObject.h:76
hwmsct
#define hwmsct
Definition: herwig.h:317
gen::BaseHadronizer::event
std::unique_ptr< HepMC::GenEvent > & event()
Definition: BaseHadronizer.h:86
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
Herwig6HadronizerFilter
edm::HadronizerFilter< Herwig6Hadronizer, gen::ExternalDecayDriver > Herwig6HadronizerFilter
Definition: Herwig6Hadronizer.cc:1001
gen::Herwig6Instance::callWithTimeout
bool callWithTimeout(unsigned int secs, void(*fn)())
Definition: Herwig6Instance.h:30
jmparm
#define jmparm
Definition: herwig.h:297
Exception
Definition: hltDiff.cc:246
hwualf_
double hwualf_(int *mode, double *scale)
Herwig6Hadronizer::classname
const char * classname() const
Definition: Herwig6Hadronizer.cc:108
Herwig6Hadronizer::matchingScale
double matchingScale
Definition: Herwig6Hadronizer.cc:142
hwmatch
#define hwmatch
Definition: herwig.h:335
Herwig6Hadronizer::pythiaStatusCodes
void pythiaStatusCodes()
Definition: Herwig6Hadronizer.cc:987
Herwig6Hadronizer::doSetRandomEngine
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
Definition: Herwig6Hadronizer.cc:192
Herwig6Hadronizer::statistics
void statistics()
Definition: Herwig6Hadronizer.cc:612
edm::HadronizerFilter
Definition: HadronizerFilter.h:53
LHEEvent.h
lhef::LHEEvent::count
void count(LHERunInfo::CountMode count, double weight=1.0, double matchWeight=1.0)
Definition: LHEEvent.cc:182
POMWIG_DPEDijets_10TeV_Pt_30_cff.printCards
printCards
Definition: POMWIG_DPEDijets_10TeV_Pt_30_cff.py:10
Herwig6Hadronizer::comEnergy
double comEnergy
Definition: Herwig6Hadronizer.cc:134
mps_fire.result
result
Definition: mps_fire.py:303
Herwig6Hadronizer::maxEventsToPrint
int maxEventsToPrint
Definition: Herwig6Hadronizer.cc:131
Herwig6Hadronizer::fConvertToPDG
bool fConvertToPDG
Definition: Herwig6Hadronizer.cc:138
cms::Exception
Definition: Exception.h:70
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
DQMOfflineHeavyIons_cff.doMatching
doMatching
Definition: DQMOfflineHeavyIons_cff.py:109
Herwig6Hadronizer::readMCatNLOfile
bool readMCatNLOfile
Definition: Herwig6Hadronizer.cc:144
Herwig6Hadronizer::upInit
void upInit() override
Definition: Herwig6Hadronizer.cc:870
HepMCProduct.h
Herwig6Hadronizer::useJimmy
bool useJimmy
Definition: Herwig6Hadronizer.cc:135
Herwig6Hadronizer::emulatePythiaStatusCodes
bool emulatePythiaStatusCodes
Definition: Herwig6Hadronizer.cc:133
event
Definition: event.py:1
hwuaem_
double hwuaem_(double *scale)
hwwarn_
void hwwarn_(const char *method, int *id)
mps_splice.line
line
Definition: mps_splice.py:76
lhef::LHERunInfo::findHeader
std::vector< std::string > findHeader(const std::string &tag) const
Definition: LHERunInfo.cc:436
crabWrapper.key
key
Definition: crabWrapper.py:19
gen::BaseHadronizer::runInfo
GenRunInfoProduct & runInfo()
Definition: BaseHadronizer.h:85
hwuidt_
void hwuidt_(int *iopt, int *ipdg, int *iwig, char nwig[8])
edm::errors::Configuration
Definition: EDMException.h:36
gather_cfg.blocks
blocks
Definition: gather_cfg.py:90
begin
#define begin
Definition: vmac.h:32
lhef::LHERunInfo::pdfSetTranslation
std::pair< int, int > pdfSetTranslation() const
Definition: LHERunInfo.cc:529
gen::Herwig6Instance::openParticleSpecFile
void openParticleSpecFile(const std::string fileName)
Definition: Herwig6Instance.cc:284
hwdspn
#define hwdspn
Definition: herwig.h:220
Herwig6Instance.h
gen::Herwig6Instance::give
bool give(const std::string &line)
Definition: Herwig6Instance.cc:173
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
LHECommonBlocks.h
lhef::HEPRUP::IDBMUP
std::pair< int, int > IDBMUP
Definition: LesHouches.h:77
mysetpdfpath_
void mysetpdfpath_(const char *path)