CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
Herwig6Hadronizer Class Reference
Inheritance diagram for Herwig6Hadronizer:
gen::BaseHadronizer gen::Herwig6Instance gen::FortranInstance

Public Member Functions

const char * classname () const
 
bool decay ()
 
bool declareSpecialSettings (const std::vector< std::string > &)
 
bool declareStableParticles (const std::vector< int > &pdgIds)
 
void finalizeEvent ()
 
bool generatePartonsAndHadronize ()
 
bool hadronize ()
 
 Herwig6Hadronizer (const edm::ParameterSet &params)
 
bool initialize (const lhef::HEPRUP *heprup)
 
bool initializeForExternalPartons ()
 
bool initializeForInternalPartons ()
 
bool readSettings (int)
 
bool residualDecay ()
 
void setSLHAFromHeader (const std::vector< std::string > &lines)
 
void statistics ()
 
 ~Herwig6Hadronizer () override
 
- Public Member Functions inherited from gen::BaseHadronizer
 BaseHadronizer (edm::ParameterSet const &ps)
 
void cleanLHE ()
 
void generateLHE (edm::LuminosityBlock const &lumi, CLHEP::HepRandomEngine *rengine, unsigned int ncpu)
 
edm::EventgetEDMEvent () const
 
std::unique_ptr< HepMC::GenEventgetGenEvent ()
 
std::unique_ptr< GenEventInfoProductgetGenEventInfo ()
 
virtual std::unique_ptr< GenLumiInfoHeadergetGenLumiInfoHeader () const
 
GenRunInfoProductgetGenRunInfo ()
 
std::unique_ptr< lhef::LHEEventgetLHEEvent ()
 
const std::shared_ptr< lhef::LHERunInfo > & getLHERunInfo () const
 
const std::string & gridpackPath () const
 
int randomIndex () const
 
const std::string & randomInitConfigDescription () const
 
void randomizeIndex (edm::LuminosityBlock const &lumi, CLHEP::HepRandomEngine *rengine)
 
void resetEvent (std::unique_ptr< HepMC::GenEvent > event)
 
void resetEventInfo (std::unique_ptr< GenEventInfoProduct > eventInfo)
 
virtual bool select (HepMC::GenEvent *) const
 
void setEDMEvent (edm::Event &event)
 
void setLHEEvent (std::unique_ptr< lhef::LHEEvent > event)
 
void setLHERunInfo (std::unique_ptr< lhef::LHERunInfo > runInfo)
 
void setRandomEngine (CLHEP::HepRandomEngine *v)
 
std::vector< std::string > const & sharedResources () const
 
virtual ~BaseHadronizer () noexcept(false)
 
- Public Member Functions inherited from gen::Herwig6Instance
bool callWithTimeout (unsigned int secs, void(*fn)())
 
bool give (const std::string &line)
 
 Herwig6Instance ()
 
void openParticleSpecFile (const std::string fileName)
 
void setHerwigRandomEngine (CLHEP::HepRandomEngine *v)
 
 ~Herwig6Instance () override
 
- Public Member Functions inherited from gen::FortranInstance
template<typename T >
T call (T(&fn)())
 
template<typename T , typename A >
T call (T(&fn)(A), A a)
 
template<typename T , typename A1 , typename A2 >
T call (T(&fn)(A1, A2), A1 a1, A2 a2)
 
void call (void(&fn)())
 
template<typename A >
void call (void(&fn)(A), A a)
 
template<typename A1 , typename A2 >
void call (void(&fn)(A1, A2), A1 a1, A2 a2)
 
virtual void enter ()
 
 FortranInstance ()
 
virtual void leave ()
 
virtual bool upVeto ()
 
virtual ~FortranInstance () noexcept(false)
 

Private Member Functions

void clear ()
 
void doSetRandomEngine (CLHEP::HepRandomEngine *v) override
 
const std::vector< std::string > & doSharedResources () const override
 
int pythiaStatusCode (const HepMC::GenParticle *p) const
 
void pythiaStatusCodes ()
 
void upEvnt () override
 
void upInit () override
 

Private Attributes

double comEnergy
 
HepMC::IO_HERWIG conv
 
bool doMatching
 
bool doMPInteraction
 
bool emulatePythiaStatusCodes
 
bool externalPartons
 
bool fConvertToPDG
 
int hepmcVerbosity
 
int herwigVerbosity
 
bool inclusiveMatching
 
double matchingScale
 
int maxEventsToPrint
 
bool needClear
 
int nMatch
 
int numTrials
 
gen::ParameterCollector parameters
 
std::string particleSpecFileName
 
bool printCards
 
bool readMCatNLOfile
 
bool readParticleSpecFile
 
bool useJimmy
 

Static Private Attributes

static const std::vector< std::string > theSharedResources
 

Additional Inherited Members

- Static Public Member Functions inherited from gen::FortranInstance
template<typename T >
static TgetInstance ()
 
- Static Public Attributes inherited from gen::FortranInstance
static const std::string kFortranInstance = "FortranInstance"
 
- Protected Member Functions inherited from gen::BaseHadronizer
std::unique_ptr< HepMC::GenEvent > & event ()
 
std::unique_ptr< GenEventInfoProduct > & eventInfo ()
 
lhef::LHEEventlheEvent ()
 
lhef::LHERunInfolheRunInfo ()
 
GenRunInfoProductrunInfo ()
 
- Protected Member Functions inherited from gen::Herwig6Instance
virtual bool hwwarn (const std::string &fn, int code)
 
- Protected Attributes inherited from gen::BaseHadronizer
std::string lheFile_
 
int randomIndex_
 

Detailed Description

Definition at line 81 of file Herwig6Hadronizer.cc.

Constructor & Destructor Documentation

◆ Herwig6Hadronizer()

Herwig6Hadronizer::Herwig6Hadronizer ( const edm::ParameterSet params)

Definition at line 161 of file Herwig6Hadronizer.cc.

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 }

References fConvertToPDG, and CalibrationSummaryClient_cfi::params.

◆ ~Herwig6Hadronizer()

Herwig6Hadronizer::~Herwig6Hadronizer ( )
override

Definition at line 190 of file Herwig6Hadronizer.cc.

190 { clear(); }

References clear().

Member Function Documentation

◆ classname()

const char* Herwig6Hadronizer::classname ( ) const
inline

Definition at line 108 of file Herwig6Hadronizer.cc.

108 { return "Herwig6Hadronizer"; }

◆ clear()

void Herwig6Hadronizer::clear ( void  )
private

Definition at line 194 of file Herwig6Hadronizer.cc.

194  {
195  if (!needClear)
196  return;
197 
198  // teminate elementary process
199  call(hwefin);
200  if (useJimmy)
201  call(jmefin);
202 
203  needClear = false;
204 }

References gen::FortranInstance::call(), jmefin, needClear, and useJimmy.

Referenced by initialize(), readSettings(), and ~Herwig6Hadronizer().

◆ decay()

bool Herwig6Hadronizer::decay ( )

Definition at line 822 of file Herwig6Hadronizer.cc.

822  {
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 }

◆ declareSpecialSettings()

bool Herwig6Hadronizer::declareSpecialSettings ( const std::vector< std::string > &  )

Definition at line 610 of file Herwig6Hadronizer.cc.

610 { return true; }

◆ declareStableParticles()

bool Herwig6Hadronizer::declareStableParticles ( const std::vector< int > &  pdgIds)

Definition at line 582 of file Herwig6Hadronizer.cc.

582  {
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 }

References CosmicGenFilterHelix_cfi::pdgIds.

◆ doSetRandomEngine()

void Herwig6Hadronizer::doSetRandomEngine ( CLHEP::HepRandomEngine *  v)
overrideprivatevirtual

◆ doSharedResources()

const std::vector<std::string>& Herwig6Hadronizer::doSharedResources ( ) const
inlineoverrideprivatevirtual

Reimplemented from gen::BaseHadronizer.

Definition at line 112 of file Herwig6Hadronizer.cc.

112 { return theSharedResources; }

References theSharedResources.

◆ finalizeEvent()

void Herwig6Hadronizer::finalizeEvent ( )

Definition at line 708 of file Herwig6Hadronizer.cc.

708  {
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 }

References funct::abs(), SiPixelPhase1Clusters_cfi::e3, emulatePythiaStatusCodes, gen::BaseHadronizer::event(), gen::BaseHadronizer::eventInfo(), externalPartons, lhef::LHEEvent::fillEventInfo(), lhef::LHEEvent::fillPdfInfo(), lhef::LHEEvent::fixHepMCEventTimeOrdering(), GenParticle::GenParticle, get, hwuaem_(), hwualf_(), gen::BaseHadronizer::lheEvent(), gen::BaseHadronizer::lheRunInfo(), pythiaStatusCodes(), testProducerWithPsetDescEmpty_cfi::x1, and testProducerWithPsetDescEmpty_cfi::x2.

◆ generatePartonsAndHadronize()

bool Herwig6Hadronizer::generatePartonsAndHadronize ( )
inline

Definition at line 102 of file Herwig6Hadronizer.cc.

102 { return hadronize(); }

References hadronize().

◆ hadronize()

bool Herwig6Hadronizer::hadronize ( )

Definition at line 627 of file Herwig6Hadronizer.cc.

627  {
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 }

References gen::Herwig6Instance::callWithTimeout(), conv, lhef::LHEEvent::count(), doMatching, doMPInteraction, relativeConstraints::error, gen::BaseHadronizer::event(), fConvertToPDG, get, hwwarn_(), lhef::LHERunInfo::kAccepted, lhef::LHERunInfo::kKilled, lhef::LHERunInfo::kSelected, gen::BaseHadronizer::lheEvent(), useJimmy, and wrapper.

Referenced by generatePartonsAndHadronize().

◆ initialize()

bool Herwig6Hadronizer::initialize ( const lhef::HEPRUP heprup)

Definition at line 411 of file Herwig6Hadronizer.cc.

411  {
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 }

References gen::FortranInstance::call(), clear(), comEnergy, edm::errors::Configuration, doMPInteraction, MillePedeFileConverter_cfg::e, lhef::HEPRUP::EBMUP, Exception, externalPartons, lhef::LHERunInfo::findHeader(), gen::Herwig6Instance::give(), hepmcVerbosity, herwigVerbosity, hwdspn, hwprch, mps_fire::i, lhef::HEPRUP::IDBMUP, info(), jimmin, jminit, jmparm, gen::BaseHadronizer::lheRunInfo(), mps_splice::line, maxEventsToPrint, needClear, gen::Herwig6Instance::openParticleSpecFile(), particleSpecFileName, lhef::LHERunInfo::pdfSetTranslation(), printCards, readParticleSpecFile, setSLHAFromHeader(), and useJimmy.

◆ initializeForExternalPartons()

bool Herwig6Hadronizer::initializeForExternalPartons ( )
inline

Definition at line 95 of file Herwig6Hadronizer.cc.

95 { return initializeForInternalPartons(); }

References initializeForInternalPartons().

◆ initializeForInternalPartons()

bool Herwig6Hadronizer::initializeForInternalPartons ( )

Definition at line 395 of file Herwig6Hadronizer.cc.

395  {
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 }

References gen::FortranInstance::call(), jimmin, jminit, and useJimmy.

Referenced by initializeForExternalPartons().

◆ pythiaStatusCode()

int Herwig6Hadronizer::pythiaStatusCode ( const HepMC::GenParticle *  p) const
private

Definition at line 909 of file Herwig6Hadronizer.cc.

909  {
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 }

References externalPartons, GenParticle::GenParticle, AlCaHLTBitMon_ParallelJobs::p, data-class-funcs::q, mps_update::status, and badGlobalMuonTaggersAOD_cff::vtx.

Referenced by pythiaStatusCodes().

◆ pythiaStatusCodes()

void Herwig6Hadronizer::pythiaStatusCodes ( )
private

Definition at line 987 of file Herwig6Hadronizer.cc.

987  {
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 }

References gen::BaseHadronizer::event(), and pythiaStatusCode().

Referenced by finalizeEvent().

◆ readSettings()

bool Herwig6Hadronizer::readSettings ( int  key)

Definition at line 244 of file Herwig6Hadronizer.cc.

244  {
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 }

References gen::FortranInstance::call(), clear(), comEnergy, edm::errors::Configuration, doMatching, doMPInteraction, MillePedeFileConverter_cfg::e, lhef::HEPRUP::EBMUP, Exception, externalPartons, lhef::LHERunInfo::findHeader(), lhef::LHERunInfo::getHEPRUP(), gen::Herwig6Instance::give(), hepmcVerbosity, herwigVerbosity, hwdspn, hwmatchpram, hwprch, mps_fire::i, lhef::HEPRUP::IDBMUP, inclusiveMatching, info(), jmparm, crabWrapper::key, gen::BaseHadronizer::lheRunInfo(), mps_splice::line, matchingScale, maxEventsToPrint, needClear, nMatch, gen::Herwig6Instance::openParticleSpecFile(), particleSpecFileName, lhef::LHERunInfo::pdfSetTranslation(), printCards, readParticleSpecFile, setSLHAFromHeader(), and useJimmy.

◆ residualDecay()

bool Herwig6Hadronizer::residualDecay ( )

Definition at line 868 of file Herwig6Hadronizer.cc.

868 { return true; }

◆ setSLHAFromHeader()

void Herwig6Hadronizer::setSLHAFromHeader ( const std::vector< std::string > &  lines)

Definition at line 206 of file Herwig6Hadronizer.cc.

206  {
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 }

References groupFilesInBlocks::block, gather_cfg::blocks, createfilelist::int, mps_splice::line, groupFilesInBlocks::lines, cms::dd::split(), AlCaHLTBitMon_QueryRunRegistry::string, and HcalDetIdTransform::transform().

Referenced by initialize(), and readSettings().

◆ statistics()

void Herwig6Hadronizer::statistics ( )

Definition at line 612 of file Herwig6Hadronizer.cc.

612  {
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 }

References gen::BaseHadronizer::runInfo(), and GenRunInfoProduct::setInternalXSec().

◆ upEvnt()

void Herwig6Hadronizer::upEvnt ( )
overrideprivatevirtual

Reimplemented from gen::FortranInstance.

Definition at line 893 of file Herwig6Hadronizer.cc.

893  {
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 }

References begin, edm::errors::Configuration, lhef::CommonBlocks::fillHEPEUP(), lhef::LHEEvent::getComments(), gen::Herwig6Instance::give(), gen::BaseHadronizer::lheEvent(), readMCatNLOfile, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ upInit()

void Herwig6Hadronizer::upInit ( )
overrideprivatevirtual

Reimplemented from gen::FortranInstance.

Definition at line 870 of file Herwig6Hadronizer.cc.

870  {
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 }

References edm::errors::Configuration, lhef::CommonBlocks::fillHEPRUP(), lhef::LHERunInfo::getHeaders(), gen::Herwig6Instance::give(), getRunAppsInfo::headers, heprup_, gen::BaseHadronizer::lheRunInfo(), HEPRUP_::pdfgup, HEPRUP_::pdfsup, readMCatNLOfile, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ comEnergy

double Herwig6Hadronizer::comEnergy
private

Definition at line 134 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ conv

HepMC::IO_HERWIG Herwig6Hadronizer::conv
private

Definition at line 124 of file Herwig6Hadronizer.cc.

Referenced by hadronize().

◆ doMatching

bool Herwig6Hadronizer::doMatching
private

Definition at line 139 of file Herwig6Hadronizer.cc.

Referenced by hadronize(), and readSettings().

◆ doMPInteraction

bool Herwig6Hadronizer::doMPInteraction
private

Definition at line 136 of file Herwig6Hadronizer.cc.

Referenced by hadronize(), initialize(), and readSettings().

◆ emulatePythiaStatusCodes

bool Herwig6Hadronizer::emulatePythiaStatusCodes
private

Definition at line 133 of file Herwig6Hadronizer.cc.

Referenced by finalizeEvent().

◆ externalPartons

bool Herwig6Hadronizer::externalPartons
private

Definition at line 126 of file Herwig6Hadronizer.cc.

Referenced by finalizeEvent(), initialize(), pythiaStatusCode(), and readSettings().

◆ fConvertToPDG

bool Herwig6Hadronizer::fConvertToPDG
private

Definition at line 138 of file Herwig6Hadronizer.cc.

Referenced by hadronize(), and Herwig6Hadronizer().

◆ hepmcVerbosity

int Herwig6Hadronizer::hepmcVerbosity
private

Definition at line 130 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ herwigVerbosity

int Herwig6Hadronizer::herwigVerbosity
private

Definition at line 129 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ inclusiveMatching

bool Herwig6Hadronizer::inclusiveMatching
private

Definition at line 140 of file Herwig6Hadronizer.cc.

Referenced by readSettings().

◆ matchingScale

double Herwig6Hadronizer::matchingScale
private

Definition at line 142 of file Herwig6Hadronizer.cc.

Referenced by readSettings().

◆ maxEventsToPrint

int Herwig6Hadronizer::maxEventsToPrint
private

Definition at line 131 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ needClear

bool Herwig6Hadronizer::needClear
private

Definition at line 125 of file Herwig6Hadronizer.cc.

Referenced by clear(), initialize(), and readSettings().

◆ nMatch

int Herwig6Hadronizer::nMatch
private

Definition at line 141 of file Herwig6Hadronizer.cc.

Referenced by readSettings().

◆ numTrials

int Herwig6Hadronizer::numTrials
private

Definition at line 137 of file Herwig6Hadronizer.cc.

◆ parameters

gen::ParameterCollector Herwig6Hadronizer::parameters
private

Definition at line 128 of file Herwig6Hadronizer.cc.

◆ particleSpecFileName

std::string Herwig6Hadronizer::particleSpecFileName
private

Definition at line 147 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ printCards

bool Herwig6Hadronizer::printCards
private

Definition at line 132 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ readMCatNLOfile

bool Herwig6Hadronizer::readMCatNLOfile
private

Definition at line 144 of file Herwig6Hadronizer.cc.

Referenced by upEvnt(), and upInit().

◆ readParticleSpecFile

bool Herwig6Hadronizer::readParticleSpecFile
private

Definition at line 148 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ theSharedResources

const std::vector< std::string > Herwig6Hadronizer::theSharedResources
staticprivate

◆ useJimmy

bool Herwig6Hadronizer::useJimmy
private
lhef::LHERunInfo::kAccepted
Definition: LHERunInfo.h:64
GenEventInfoProduct
Definition: GenEventInfoProduct.h:17
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
mps_fire.i
i
Definition: mps_fire.py:355
edm::SharedResourceNames::kHerwig6
static const std::string kHerwig6
Definition: SharedResourceNames.h:31
lhef::LHEEvent::fillEventInfo
void fillEventInfo(HepMC::GenEvent *hepmc) const
Definition: LHEEvent.cc:218
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
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
Herwig6Hadronizer::readParticleSpecFile
bool readParticleSpecFile
Definition: Herwig6Hadronizer.cc:148
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
jimmin
#define jimmin
Definition: herwig.h:315
Herwig6Hadronizer::doMPInteraction
bool doMPInteraction
Definition: Herwig6Hadronizer.cc:136
pos
Definition: PixelAliasList.h:18
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
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
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
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
lhef::LHERunInfo::getHeaders
const std::vector< Header > & getHeaders() const
Definition: LHERunInfo.h:56
Herwig6Hadronizer::conv
HepMC::IO_HERWIG conv
Definition: Herwig6Hadronizer.cc:124
Herwig6Hadronizer::doMatching
bool doMatching
Definition: Herwig6Hadronizer.cc:139
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
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition: badGlobalMuonTaggersAOD_cff.py:5
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
Herwig6Hadronizer::numTrials
int numTrials
Definition: Herwig6Hadronizer.cc:137
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
Herwig6Hadronizer::herwigVerbosity
int herwigVerbosity
Definition: Herwig6Hadronizer.cc:129
HEPRUP_::pdfgup
int pdfgup[2]
Definition: LHECommonBlocks.h:10
CosmicGenFilterHelix_cfi.pdgIds
pdgIds
Definition: CosmicGenFilterHelix_cfi.py:5
lhef::CommonBlocks::fillHEPRUP
static void fillHEPRUP(const HEPRUP *heprup)
Definition: LHECommonBlocks.h:41
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
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
lhef::LHERunInfo::kKilled
Definition: LHERunInfo.h:64
SiPixelPhase1Clusters_cfi.e3
e3
Definition: SiPixelPhase1Clusters_cfi.py:9
Herwig6Hadronizer::externalPartons
bool externalPartons
Definition: Herwig6Hadronizer.cc:126
Herwig6Hadronizer::parameters
gen::ParameterCollector parameters
Definition: Herwig6Hadronizer.cc:128
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
gen::BaseHadronizer::event
std::unique_ptr< HepMC::GenEvent > & event()
Definition: BaseHadronizer.h:86
gen::BaseHadronizer::BaseHadronizer
BaseHadronizer(edm::ParameterSet const &ps)
Definition: BaseHadronizer.cc:12
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
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::matchingScale
double matchingScale
Definition: Herwig6Hadronizer.cc:142
Herwig6Hadronizer::pythiaStatusCodes
void pythiaStatusCodes()
Definition: Herwig6Hadronizer.cc:987
lhef::LHEEvent::count
void count(LHERunInfo::CountMode count, double weight=1.0, double matchWeight=1.0)
Definition: LHEEvent.cc:182
Herwig6Hadronizer::comEnergy
double comEnergy
Definition: Herwig6Hadronizer.cc:134
Herwig6Hadronizer::maxEventsToPrint
int maxEventsToPrint
Definition: Herwig6Hadronizer.cc:131
Herwig6Hadronizer::fConvertToPDG
bool fConvertToPDG
Definition: Herwig6Hadronizer.cc:138
cms::Exception
Definition: Exception.h:70
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Herwig6Hadronizer::readMCatNLOfile
bool readMCatNLOfile
Definition: Herwig6Hadronizer.cc:144
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
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
gen::Herwig6Instance::give
bool give(const std::string &line)
Definition: Herwig6Instance.cc:173
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
lhef::HEPRUP::IDBMUP
std::pair< int, int > IDBMUP
Definition: LesHouches.h:77