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 83 of file Herwig6Hadronizer.cc.

Constructor & Destructor Documentation

◆ Herwig6Hadronizer()

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

Definition at line 163 of file Herwig6Hadronizer.cc.

165  needClear(false),
166  parameters(params.getParameter<edm::ParameterSet>("HerwigParameters")),
167  herwigVerbosity(params.getUntrackedParameter<int>("herwigVerbosity", 0)),
168  hepmcVerbosity(params.getUntrackedParameter<int>("hepmcVerbosity", 0)),
169  maxEventsToPrint(params.getUntrackedParameter<int>("maxEventsToPrint", 0)),
170  printCards(params.getUntrackedParameter<bool>("printCards", false)),
171  emulatePythiaStatusCodes(params.getUntrackedParameter<bool>("emulatePythiaStatusCodes", false)),
172  comEnergy(params.getParameter<double>("comEnergy")),
173  useJimmy(params.getParameter<bool>("useJimmy")),
174  doMPInteraction(params.getParameter<bool>("doMPInteraction")),
175  numTrials(params.getUntrackedParameter<int>("numTrialsMPI", 100)),
176  doMatching(params.getUntrackedParameter<bool>("doMatching", false)),
177  inclusiveMatching(params.getUntrackedParameter<bool>("inclusiveMatching", true)),
178  nMatch(params.getUntrackedParameter<int>("nMatch", 0)),
179  matchingScale(params.getUntrackedParameter<double>("matchingScale", 0.0)),
180  readMCatNLOfile(false),
181 
182  // added to be able to read external particle spectrum file
183  particleSpecFileName(params.getUntrackedParameter<std::string>("ParticleSpectrumFileName", "")),
184  readParticleSpecFile(params.getUntrackedParameter<bool>("readParticleSpecFile", false))
185 
186 {
187  fConvertToPDG = false;
188  if (params.exists("doPDGConvert"))
189  fConvertToPDG = params.getParameter<bool>("doPDGConvert");
190 }

References fConvertToPDG, and CalibrationSummaryClient_cfi::params.

◆ ~Herwig6Hadronizer()

Herwig6Hadronizer::~Herwig6Hadronizer ( )
override

Definition at line 192 of file Herwig6Hadronizer.cc.

192 { clear(); }

References clear().

Member Function Documentation

◆ classname()

const char* Herwig6Hadronizer::classname ( ) const
inline

Definition at line 110 of file Herwig6Hadronizer.cc.

110 { return "Herwig6Hadronizer"; }

◆ clear()

void Herwig6Hadronizer::clear ( void  )
private

Definition at line 196 of file Herwig6Hadronizer.cc.

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

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

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

◆ decay()

bool Herwig6Hadronizer::decay ( )

Definition at line 824 of file Herwig6Hadronizer.cc.

824  {
825  // hadron decays
826 
827  // InstanceWrapper wrapper(this); // safe guard
828  //
829  // //int iproc = hwproc.IPROC;
830  // //hwproc.IPROC = 312;
831  // hwdhad(); // unstable particle decays
832  // //hwproc.IPROC = iproc;
833  //
834  // hwdhvy(); // heavy flavour decays
835  // hwmevt(); // soft underlying event
836  //
837  // if (doMatching) {
838  // bool pass = call_hwmatch();
839  // if (!pass) {
840  // printf("Event failed MLM matching\n");
841  // hwufne();
842  // if (lheEvent()) lheEvent()->count(lhef::LHERunInfo::kKilled);
843  // return false;
844  // }
845  // }
846  //
847  // hwufne(); // finalize event
848  //
849  // if (hwevnt.IERROR)
850  // return false;
851  //
852  // if (lheEvent()) lheEvent()->count(lhef::LHERunInfo::kAccepted);
853  //
854  // event().reset(new HepMC::GenEvent);
855  // if (!conv.fill_next_event(event().get()))
856  // throw cms::Exception("Herwig6Error")
857  // << "HepMC Conversion problems in event." << std::endl;
858  //
859  // // do particle ID conversion Herwig->PDG, if requested
860  // if ( fConvertToPDG ) {
861  // for ( HepMC::GenEvent::particle_iterator part = event()->particles_begin(); part != event()->particles_end(); ++part) {
862  // if ((*part)->pdg_id() != HepPID::translateHerwigtoPDT((*part)->pdg_id()))
863  // (*part)->set_pdg_id(HepPID::translateHerwigtoPDT((*part)->pdg_id()));
864  // }
865  // }
866 
867  return true;
868 }

◆ declareSpecialSettings()

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

Definition at line 612 of file Herwig6Hadronizer.cc.

612 { return true; }

◆ declareStableParticles()

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

Definition at line 584 of file Herwig6Hadronizer.cc.

584  {
585  markStable(13); // MU+
586  markStable(-13); // MU-
587  markStable(3112); // SIGMA+
588  markStable(-3112); // SIGMABAR+
589  markStable(3222); // SIGMA-
590  markStable(-3222); // SIGMABAR-
591  markStable(3122); // LAMBDA0
592  markStable(-3122); // LAMBDABAR0
593  markStable(3312); // XI-
594  markStable(-3312); // XIBAR+
595  markStable(3322); // XI0
596  markStable(-3322); // XI0BAR
597  markStable(3334); // OMEGA-
598  markStable(-3334); // OMEGABAR+
599  markStable(211); // PI+
600  markStable(-211); // PI-
601  markStable(321); // K+
602  markStable(-321); // K-
603  markStable(310); // K_S0
604  markStable(130); // K_L0
605 
606  for (std::vector<int>::const_iterator iter = pdgIds.begin(); iter != pdgIds.end(); ++iter)
607  if (!markStable(*iter))
608  return false;
609  return true;
610 }

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 114 of file Herwig6Hadronizer.cc.

114 { return theSharedResources; }

References theSharedResources.

◆ finalizeEvent()

void Herwig6Hadronizer::finalizeEvent ( )

Definition at line 710 of file Herwig6Hadronizer.cc.

710  {
712 
713  HepMC::PdfInfo pdfInfo;
714  if (externalPartons) {
716  lheEvent()->fillPdfInfo(&pdfInfo);
717 
718  // for MC@NLO: IDWRUP is not filled...
719  if (event()->signal_process_id() == 0)
720  event()->set_signal_process_id(abs(hwproc.IPROC));
721  }
722 
723  HepMC::GenParticle *incomingParton = nullptr;
724  HepMC::GenParticle *targetParton = nullptr;
725 
726  HepMC::GenParticle *incomingProton = nullptr;
727  HepMC::GenParticle *targetProton = nullptr;
728 
729  // find incoming parton (first entry with IST=121)
730  for (HepMC::GenEvent::particle_const_iterator it = event()->particles_begin();
731  (it != event()->particles_end() && incomingParton == nullptr);
732  it++)
733  if ((*it)->status() == 121)
734  incomingParton = (*it);
735 
736  // find target parton (first entry with IST=122)
737  for (HepMC::GenEvent::particle_const_iterator it = event()->particles_begin();
738  (it != event()->particles_end() && targetParton == nullptr);
739  it++)
740  if ((*it)->status() == 122)
741  targetParton = (*it);
742 
743  // find incoming Proton (first entry ID=2212, IST=101)
744  for (HepMC::GenEvent::particle_const_iterator it = event()->particles_begin();
745  (it != event()->particles_end() && incomingProton == nullptr);
746  it++)
747  if ((*it)->status() == 101 && (*it)->pdg_id() == 2212)
748  incomingProton = (*it);
749 
750  // find target Proton (first entry ID=2212, IST=102)
751  for (HepMC::GenEvent::particle_const_iterator it = event()->particles_begin();
752  (it != event()->particles_end() && targetProton == nullptr);
753  it++)
754  if ((*it)->status() == 102 && (*it)->pdg_id() == 2212)
755  targetProton = (*it);
756 
757  // find hard scale Q (computed from colliding partons)
758  if (incomingParton && targetParton) {
759  math::XYZTLorentzVector totMomentum(0, 0, 0, 0);
760  totMomentum += incomingParton->momentum();
761  totMomentum += targetParton->momentum();
762  double evScale = totMomentum.mass();
763  double evScale2 = evScale * evScale;
764 
765  // find alpha_QED & alpha_QCD
766  int one = 1;
767  double alphaQCD = hwualf_(&one, &evScale);
768  double alphaQED = hwuaem_(&evScale2);
769 
770  if (!externalPartons || event()->event_scale() < 0)
771  event()->set_event_scale(evScale);
772  if (!externalPartons || event()->alphaQCD() < 0)
773  event()->set_alphaQCD(alphaQCD);
774  if (!externalPartons || event()->alphaQED() < 0)
775  event()->set_alphaQED(alphaQED);
776 
777  if (!externalPartons || pdfInfo.x1() < 0) {
778  // get the PDF information
779  pdfInfo.set_id1(incomingParton->pdg_id() == 21 ? 0 : incomingParton->pdg_id());
780  pdfInfo.set_id2(targetParton->pdg_id() == 21 ? 0 : targetParton->pdg_id());
781  if (incomingProton && targetProton) {
782  double x1 = incomingParton->momentum().pz() / incomingProton->momentum().pz();
783  double x2 = targetParton->momentum().pz() / targetProton->momentum().pz();
784  pdfInfo.set_x1(x1);
785  pdfInfo.set_x2(x2);
786  }
787  // we do not fill pdf1 & pdf2, since they are not easily available (what are they needed for anyways???)
788  pdfInfo.set_scalePDF(evScale); // the same as Q above... does this make sense?
789  }
790 
791  if (!externalPartons || event()->signal_process_id() < 0)
792  event()->set_signal_process_id(abs(hwproc.IPROC));
793  event()->set_pdf_info(pdfInfo);
794  }
795 
796  // add event weight & PDF information
797  if (lheRunInfo() != nullptr && std::abs(lheRunInfo()->getHEPRUP()->IDWTUP) == 4)
798  // in LHE weighting mode 4 the weight is an xsec, so convert form HERWIG
799  // to standard CMS unit "picobarn"
800  event()->weights().push_back(1.0e3 * hwevnt.EVWGT);
801  else
802  event()->weights().push_back(hwevnt.EVWGT);
803 
804  // find final parton (first entry with IST=123)
805  HepMC::GenParticle *finalParton = nullptr;
806  for (HepMC::GenEvent::particle_const_iterator it = event()->particles_begin();
807  (it != event()->particles_end() && finalParton == nullptr);
808  it++)
809  if ((*it)->status() == 123)
810  finalParton = (*it);
811 
812  // add GenEventInfo & binning Values
813  eventInfo() = std::make_unique<GenEventInfoProduct>(event().get());
814  if (finalParton) {
815  double thisPt = finalParton->momentum().perp();
816  eventInfo()->setBinningValues(std::vector<double>(1, thisPt));
817  }
818 
819  // emulate PY6 status codes, if switched on...
822 }

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(), SiPixelPI::one, pythiaStatusCodes(), testProducerWithPsetDescEmpty_cfi::x1, and testProducerWithPsetDescEmpty_cfi::x2.

◆ generatePartonsAndHadronize()

bool Herwig6Hadronizer::generatePartonsAndHadronize ( )
inline

Definition at line 104 of file Herwig6Hadronizer.cc.

104 { return hadronize(); }

References hadronize().

◆ hadronize()

bool Herwig6Hadronizer::hadronize ( )

Definition at line 629 of file Herwig6Hadronizer.cc.

629  {
630  // hard process generation, parton shower, hadron formation
631 
632  InstanceWrapper wrapper(this); // safe guard
633 
634  event().reset();
635 
636  // call herwig routines to create HEPEVT
637 
638  hwuine(); // initialize event
639 
640  if (callWithTimeout(10, hwepro)) { // process event and PS
641  // We hung for more than 10 seconds
642  int error = 199;
643  hwwarn_("HWHGUP", &error);
644  }
645 
646  hwbgen(); // parton cascades
647 
648  // call jimmy ... only if event is not killed yet by HERWIG
649  if (useJimmy && doMPInteraction && !hwevnt.IERROR && call_hwmsct()) {
650  if (lheEvent())
652  return false;
653  }
654 
655  hwdhob(); // heavy quark decays
656  hwcfor(); // cluster formation
657  hwcdec(); // cluster decays
658 
659  // // if event *not* killed by HERWIG, return true
660  // if (hwevnt.IERROR) {
661  // hwufne(); // finalize event, to keep system clean
662  // if (lheEvent()) lheEvent()->count(lhef::LHERunInfo::kKilled);
663  // return false;
664  // }
665 
666  //if (lheEvent()) lheEvent()->count(lhef::LHERunInfo::kAccepted);
667 
668  hwdhad(); // unstable particle decays
669  hwdhvy(); // heavy flavour decays
670  hwmevt(); // soft underlying event
671 
672  hwufne(); // finalize event
673 
674  // if event *not* killed by HERWIG, return true
675  if (hwevnt.IERROR) {
676  if (lheEvent())
678  return false;
679  }
680 
681  if (doMatching) {
682  bool pass = call_hwmatch();
683  if (!pass) {
684  printf("Event failed MLM matching\n");
685  if (lheEvent())
687  return false;
688  }
689  }
690 
691  if (lheEvent())
693 
694  event() = std::make_unique<HepMC::GenEvent>();
695  if (!conv.fill_next_event(event().get()))
696  throw cms::Exception("Herwig6Error") << "HepMC Conversion problems in event." << std::endl;
697 
698  // do particle ID conversion Herwig->PDG, if requested
699  if (fConvertToPDG) {
700  for (HepMC::GenEvent::particle_iterator part = event()->particles_begin(); part != event()->particles_end();
701  ++part) {
702  if ((*part)->pdg_id() != HepPID::translateHerwigtoPDT((*part)->pdg_id()))
703  (*part)->set_pdg_id(HepPID::translateHerwigtoPDT((*part)->pdg_id()));
704  }
705  }
706 
707  return true;
708 }

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 413 of file Herwig6Hadronizer.cc.

413  {
414  clear();
415 
416  externalPartons = (heprup != nullptr);
417 
418  std::ostringstream info;
419  info << "---------------------------------------------------\n";
420  info << "Initializing Herwig6Hadronizer for " << (externalPartons ? "external" : "internal") << " partons\n";
421  info << "---------------------------------------------------\n";
422 
423  info << " Herwig verbosity level = " << herwigVerbosity << "\n";
424  info << " HepMC verbosity = " << hepmcVerbosity << "\n";
425  info << " Number of events to be printed = " << maxEventsToPrint << "\n";
426 
427  // Call hwudat to set up HERWIG block data
428  hwudat();
429 
430  // Setting basic parameters
431  if (externalPartons) {
432  hwproc.PBEAM1 = heprup->EBMUP.first;
433  hwproc.PBEAM2 = heprup->EBMUP.second;
434  pdgToHerwig(heprup->IDBMUP.first, hwbmch.PART1);
435  pdgToHerwig(heprup->IDBMUP.second, hwbmch.PART2);
436  } else {
437  hwproc.PBEAM1 = 0.5 * comEnergy;
438  hwproc.PBEAM2 = 0.5 * comEnergy;
439  pdgToHerwig(2212, hwbmch.PART1);
440  pdgToHerwig(2212, hwbmch.PART2);
441  }
442 
443  if (useJimmy) {
444  info << " HERWIG will be using JIMMY for UE/MI.\n";
445  jmparm.MSFLAG = 1;
446  if (doMPInteraction)
447  info << " JIMMY trying to generate multiple interactions.\n";
448  }
449 
450  // set the IPROC already here... needed for VB pairs
451 
452  bool iprocFound = false;
453 
455  if (!strcmp((line->substr(0, 5)).c_str(), "IPROC")) {
456  if (!give(*line))
458  << "Herwig 6 did not accept the following: \"" << *line << "\"." << std::endl;
459  else
460  iprocFound = true;
461  }
462  }
463 
464  if (!iprocFound && !externalPartons)
465  throw edm::Exception(edm::errors::Configuration) << "You have to define the process with IPROC." << std::endl;
466 
467  // initialize other common blocks ...
468  call(hwigin);
469  hwevnt.MAXER = 100000000; // O(inf)
470  hwpram.LWSUD = 0; // don't write Sudakov form factors
471  hwdspn.LWDEC = 0; // don't write three/four body decays
472  // (no fort.77 and fort.88 ...)
473 
474  // init LHAPDF glue
475 
476  std::memset(hwprch.AUTPDF, ' ', sizeof hwprch.AUTPDF);
477  for (unsigned int i = 0; i < 2; i++) {
478  hwpram.MODPDF[i] = -111;
479  std::memcpy(hwprch.AUTPDF[i], "HWLHAPDF", 8);
480  }
481 
482  if (useJimmy)
483  call(jimmin);
484 
485  hwevnt.MAXPR = maxEventsToPrint;
486  hwpram.IPRINT = herwigVerbosity;
487  // hwprop.RMASS[6] = 175.0; //FIXME
488 
489  if (printCards) {
490  info << "\n";
491  info << "------------------------------------\n";
492  info << "Reading HERWIG parameters\n";
493  info << "------------------------------------\n";
494  }
496  if (printCards)
497  info << " " << *line << "\n";
498  if (!give(*line))
500  << "Herwig 6 did not accept the following: \"" << *line << "\"." << std::endl;
501  }
502 
503  if (printCards)
504  info << "\n";
505 
506  if (externalPartons) {
507  std::vector<std::string> slha = lheRunInfo()->findHeader("slha");
508  if (!slha.empty())
509  setSLHAFromHeader(slha);
510  }
511 
512  needClear = true;
513 
514  std::pair<int, int> pdfs(-1, -1);
515  if (externalPartons)
516  pdfs = lheRunInfo()->pdfSetTranslation();
517 
518  if (hwpram.MODPDF[0] != -111 || hwpram.MODPDF[1] != -111) {
519  for (unsigned int i = 0; i < 2; i++)
520  if (hwpram.MODPDF[i] == -111)
521  hwpram.MODPDF[i] = -1;
522 
523  if (pdfs.first != -1 || pdfs.second != -1)
524  edm::LogError("Generator|Herwig6Hadronzier") << "Both external Les Houches event and "
525  "config file specify a PDF set. "
526  "User PDF will override external one."
527  << std::endl;
528 
529  pdfs.first = hwpram.MODPDF[0] != -111 ? hwpram.MODPDF[0] : -1;
530  pdfs.second = hwpram.MODPDF[1] != -111 ? hwpram.MODPDF[1] : -1;
531  }
532 
533  printf("pdfs.first = %i, pdfs.second = %i\n", pdfs.first, pdfs.second);
534 
535  hwpram.MODPDF[0] = pdfs.first;
536  hwpram.MODPDF[1] = pdfs.second;
537 
538  if (externalPartons)
539  hwproc.IPROC = -1;
540 
541  //Lars: lower EFFMIN threshold, to continue execution of IPROC=4000, lambda'_211=0.01 at LM7,10
542  if (readParticleSpecFile) {
544  hwpram.EFFMIN = 1e-5;
545  }
546 
547  // HERWIG preparations ...
548  call(hwuinc);
549  markStable(13); // MU+
550  markStable(-13); // MU-
551  markStable(3112); // SIGMA+
552  markStable(-3112); // SIGMABAR+
553  markStable(3222); // SIGMA-
554  markStable(-3222); // SIGMABAR-
555  markStable(3122); // LAMBDA0
556  markStable(-3122); // LAMBDABAR0
557  markStable(3312); // XI-
558  markStable(-3312); // XIBAR+
559  markStable(3322); // XI0
560  markStable(-3322); // XI0BAR
561  markStable(3334); // OMEGA-
562  markStable(-3334); // OMEGABAR+
563  markStable(211); // PI+
564  markStable(-211); // PI-
565  markStable(321); // K+
566  markStable(-321); // K-
567  markStable(310); // K_S0
568  markStable(130); // K_L0
569 
570  // better: merge with declareStableParticles
571  // and get the list from configuration / Geant4 / Core somewhere
572 
573  // initialize HERWIG event generation
574  call(hweini);
575 
576  if (useJimmy)
577  call(jminit);
578 
579  edm::LogInfo(info.str());
580 
581  return true;
582 }

References gen::ParameterCollector::begin(), gen::FortranInstance::call(), clear(), comEnergy, edm::errors::Configuration, doMPInteraction, MillePedeFileConverter_cfg::e, lhef::HEPRUP::EBMUP, gen::ParameterCollector::end(), 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(), parameters, particleSpecFileName, lhef::LHERunInfo::pdfSetTranslation(), printCards, readParticleSpecFile, setSLHAFromHeader(), and useJimmy.

◆ initializeForExternalPartons()

bool Herwig6Hadronizer::initializeForExternalPartons ( )
inline

Definition at line 97 of file Herwig6Hadronizer.cc.

97 { return initializeForInternalPartons(); }

References initializeForInternalPartons().

◆ initializeForInternalPartons()

bool Herwig6Hadronizer::initializeForInternalPartons ( )

Definition at line 397 of file Herwig6Hadronizer.cc.

397  {
398  if (useJimmy)
399  call(jimmin);
400 
401  call(hwuinc);
402 
403  // initialize HERWIG event generation
404  call(hweini);
405 
406  if (useJimmy) {
407  call(jminit);
408  }
409 
410  return true;
411 }

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

Referenced by initializeForExternalPartons().

◆ pythiaStatusCode()

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

Definition at line 911 of file Herwig6Hadronizer.cc.

911  {
912  int status = p->status();
913 
914  // weird 9922212 particles...
915  if (status == 3 && !p->end_vertex())
916  return 2;
917 
918  if (status >= 1 && status <= 3)
919  return status;
920 
921  if (!p->end_vertex())
922  return 1;
923 
924  // let's prevent particles having status 3, if the identical
925  // particle downstream is a better status 3 candidate
926  int currentId = p->pdg_id();
927  int orig = status;
928  if (status == 123 || status == 124 || status == 155 || status == 156 || status == 160 ||
929  (status >= 195 && status <= 197)) {
930  for (const HepMC::GenParticle *q = p;;) {
931  const HepMC::GenVertex *vtx = q->end_vertex();
932  if (!vtx)
933  break;
934 
935  HepMC::GenVertex::particles_out_const_iterator iter;
936  for (iter = vtx->particles_out_const_begin(); iter != vtx->particles_out_const_end(); ++iter)
937  if ((*iter)->pdg_id() == currentId)
938  break;
939 
940  if (iter == vtx->particles_out_const_end())
941  break;
942 
943  q = *iter;
944  if (q->status() == 3 || ((status == 120 || status == 123 || status == 124) && orig > 124))
945  return 4;
946  }
947  }
948 
949  int nesting = 0;
950  for (;;) {
951  if ((status >= 120 && status <= 122) || status == 3) {
952  // avoid flagging status 3 if there is a
953  // better status 3 candidate upstream
954  if (externalPartons)
955  return ((orig >= 121 && orig <= 124) || orig == 3) ? 3 : 4;
956  else
957  return (nesting || (status != 3 && orig <= 124)) ? 3 : 4;
958  }
959 
960  // check whether we are leaving the hard process
961  // including heavy resonance decays
962  if (!(status == 4 || status == 123 || status == 124 || status == 155 || status == 156 || status == 160 ||
963  (status >= 195 && status <= 197)))
964  break;
965 
966  const HepMC::GenVertex *vtx = p->production_vertex();
967  if (!vtx || !vtx->particles_in_size())
968  break;
969 
970  p = *vtx->particles_in_const_begin();
971  status = p->status();
972 
973  int newId = p->pdg_id();
974 
975  if (!newId)
976  break;
977 
978  // nesting increases if we move to the next-best mother
979  if (newId != currentId) {
980  if (++nesting > 1 && externalPartons)
981  break;
982  currentId = newId;
983  }
984  }
985 
986  return 2;
987 }

References externalPartons, GenParticle::GenParticle, AlCaHLTBitMon_ParallelJobs::p, submitPVResolutionJobs::q, mps_update::status, and extraflags_cff::vtx.

Referenced by pythiaStatusCodes().

◆ pythiaStatusCodes()

void Herwig6Hadronizer::pythiaStatusCodes ( )
private

Definition at line 989 of file Herwig6Hadronizer.cc.

989  {
990  for (HepMC::GenEvent::particle_iterator iter = event()->particles_begin(); iter != event()->particles_end(); iter++)
991  (*iter)->set_status(pythiaStatusCode(*iter));
992 
993  for (HepMC::GenEvent::particle_iterator iter = event()->particles_begin(); iter != event()->particles_end(); iter++)
994  if ((*iter)->status() == 4)
995  (*iter)->set_status(2);
996 }

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

Referenced by finalizeEvent().

◆ readSettings()

bool Herwig6Hadronizer::readSettings ( int  key)

Definition at line 246 of file Herwig6Hadronizer.cc.

246  {
247  clear();
248  const lhef::HEPRUP *heprup = lheRunInfo()->getHEPRUP();
249  externalPartons = (heprup != nullptr);
250 
251  if (key == 0 && externalPartons)
252  return false;
253  if (key > 0 && !externalPartons)
254  return false;
255 
256  std::ostringstream info;
257  info << "---------------------------------------------------\n";
258  info << "Taking in settinsg for Herwig6Hadronizer for " << (externalPartons ? "external" : "internal")
259  << " partons\n";
260  info << "---------------------------------------------------\n";
261 
262  info << " Herwig verbosity level = " << herwigVerbosity << "\n";
263  info << " HepMC verbosity = " << hepmcVerbosity << "\n";
264  info << " Number of events to be printed = " << maxEventsToPrint << "\n";
265 
266  // Call hwudat to set up HERWIG block data
267  hwudat();
268 
269  // Setting basic parameters
270  if (externalPartons) {
271  hwproc.PBEAM1 = heprup->EBMUP.first;
272  hwproc.PBEAM2 = heprup->EBMUP.second;
273  pdgToHerwig(heprup->IDBMUP.first, hwbmch.PART1);
274  pdgToHerwig(heprup->IDBMUP.second, hwbmch.PART2);
275  } else {
276  hwproc.PBEAM1 = 0.5 * comEnergy;
277  hwproc.PBEAM2 = 0.5 * comEnergy;
278  pdgToHerwig(2212, hwbmch.PART1);
279  pdgToHerwig(2212, hwbmch.PART2);
280  }
281 
282  if (doMatching) {
283  hwmatchpram.n_match = nMatch;
284  hwmatchpram.matching_scale = matchingScale;
285 
286  if (inclusiveMatching)
287  hwmatchpram.max_multiplicity_flag = 1;
288  else
289  hwmatchpram.max_multiplicity_flag = 0;
290  }
291 
292  if (useJimmy) {
293  info << " HERWIG will be using JIMMY for UE/MI.\n";
294  jmparm.MSFLAG = 1;
295  if (doMPInteraction)
296  info << " JIMMY trying to generate multiple interactions.\n";
297  }
298 
299  // set the IPROC already here... needed for VB pairs
300 
301  bool iprocFound = false;
302 
304  if (!strcmp((line->substr(0, 5)).c_str(), "IPROC")) {
305  if (!give(*line))
307  << "Herwig 6 did not accept the following: \"" << *line << "\"." << std::endl;
308  else
309  iprocFound = true;
310  }
311  }
312 
313  if (!iprocFound && !externalPartons)
314  throw edm::Exception(edm::errors::Configuration) << "You have to define the process with IPROC." << std::endl;
315 
316  // initialize other common blocks ...
317  call(hwigin); // default init
318 
319  hwevnt.MAXER = 100000000; // O(inf)
320  hwpram.LWSUD = 0; // don't write Sudakov form factors
321  hwdspn.LWDEC = 0; // don't write three/four body decays
322  // (no fort.77 and fort.88 ...)
323  // init LHAPDF glue
324  std::memset(hwprch.AUTPDF, ' ', sizeof hwprch.AUTPDF);
325  for (unsigned int i = 0; i < 2; i++) {
326  hwpram.MODPDF[i] = -111;
327  std::memcpy(hwprch.AUTPDF[i], "HWLHAPDF", 8);
328  }
329 
330  hwevnt.MAXPR = maxEventsToPrint;
331  hwpram.IPRINT = herwigVerbosity;
332  // hwprop.RMASS[6] = 175.0; //FIXME
333 
334  if (printCards) {
335  info << "\n";
336  info << "------------------------------------\n";
337  info << "Reading HERWIG parameters\n";
338  info << "------------------------------------\n";
339  }
341  if (printCards)
342  info << " " << *line << "\n";
343  if (!give(*line))
345  << "Herwig 6 did not accept the following: \"" << *line << "\"." << std::endl;
346  }
347 
348  if (printCards)
349  info << "\n";
350 
351  if (externalPartons) {
352  std::vector<std::string> slha = lheRunInfo()->findHeader("slha");
353  if (!slha.empty())
354  setSLHAFromHeader(slha);
355  }
356 
357  needClear = true;
358 
359  std::pair<int, int> pdfs(-1, -1);
360  if (externalPartons)
361  pdfs = lheRunInfo()->pdfSetTranslation();
362 
363  if (hwpram.MODPDF[0] != -111 || hwpram.MODPDF[1] != -111) {
364  for (unsigned int i = 0; i < 2; i++)
365  if (hwpram.MODPDF[i] == -111)
366  hwpram.MODPDF[i] = -1;
367 
368  if (pdfs.first != -1 || pdfs.second != -1)
369  edm::LogError("Generator|Herwig6Hadronzier") << "Both external Les Houches event and "
370  "config file specify a PDF set. "
371  "User PDF will override external one."
372  << std::endl;
373 
374  pdfs.first = hwpram.MODPDF[0] != -111 ? hwpram.MODPDF[0] : -1;
375  pdfs.second = hwpram.MODPDF[1] != -111 ? hwpram.MODPDF[1] : -1;
376  }
377 
378  printf("pdfs.first = %i, pdfs.second = %i\n", pdfs.first, pdfs.second);
379 
380  hwpram.MODPDF[0] = pdfs.first;
381  hwpram.MODPDF[1] = pdfs.second;
382 
383  if (externalPartons && hwproc.IPROC >= 0)
384  hwproc.IPROC = -1;
385 
386  //Lars: lower EFFMIN threshold, to continue execution of IPROC=4000, lambda'_211=0.01 at LM7,10
387  if (readParticleSpecFile) {
389  hwpram.EFFMIN = 1e-5;
390  }
391 
392  edm::LogInfo(info.str());
393 
394  return true;
395 }

References gen::ParameterCollector::begin(), gen::FortranInstance::call(), clear(), comEnergy, edm::errors::Configuration, doMatching, doMPInteraction, MillePedeFileConverter_cfg::e, lhef::HEPRUP::EBMUP, gen::ParameterCollector::end(), 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(), parameters, particleSpecFileName, lhef::LHERunInfo::pdfSetTranslation(), printCards, readParticleSpecFile, setSLHAFromHeader(), and useJimmy.

◆ residualDecay()

bool Herwig6Hadronizer::residualDecay ( )

Definition at line 870 of file Herwig6Hadronizer.cc.

870 { return true; }

◆ setSLHAFromHeader()

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

Definition at line 208 of file Herwig6Hadronizer.cc.

208  {
209  std::set<std::string> blocks;
211  for (std::vector<std::string>::const_iterator iter = lines.begin(); iter != lines.end(); ++iter) {
212  std::string line = *iter;
213  std::transform(line.begin(), line.end(), line.begin(), (int (*)(int))std::toupper);
214  std::string::size_type pos = line.find('#');
215  if (pos != std::string::npos)
216  line.resize(pos);
217 
218  if (line.empty())
219  continue;
220 
221  if (!boost::algorithm::is_space()(line[0])) {
222  std::vector<std::string> tokens;
223  boost::split(tokens, line, boost::algorithm::is_space(), boost::token_compress_on);
224  if (tokens.empty())
225  continue;
226  block.clear();
227  if (tokens.size() < 2)
228  continue;
229  if (tokens[0] == "BLOCK")
230  block = tokens[1];
231  else if (tokens[0] == "DECAY")
232  block = "DECAY";
233 
234  if (block.empty())
235  continue;
236 
237  if (!blocks.count(block)) {
238  blocks.insert(block);
239  edm::LogWarning("Generator|Herwig6Hadronzier")
240  << "Unsupported SLHA block \"" << block << "\". It will be ignored." << std::endl;
241  }
242  }
243  }
244 }

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

Referenced by initialize(), and readSettings().

◆ statistics()

void Herwig6Hadronizer::statistics ( )

Definition at line 614 of file Herwig6Hadronizer.cc.

614  {
615  if (!runInfo().internalXSec()) {
616  // not set via LHE, so get it from HERWIG
617  // the reason is that HERWIG doesn't compute the xsec
618  // in all LHE modes
619 
620  double RNWGT = 1. / hwevnt.NWGTS;
621  double AVWGT = hwevnt.WGTSUM * RNWGT;
622 
623  double xsec = 1.0e3 * AVWGT;
624 
625  runInfo().setInternalXSec(xsec);
626  }
627 }

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

◆ upEvnt()

void Herwig6Hadronizer::upEvnt ( )
overrideprivatevirtual

Reimplemented from gen::FortranInstance.

Definition at line 895 of file Herwig6Hadronizer.cc.

895  {
897 
898  // if MCatNLO external file is read, read comment & pass IHPRO to HERWIG
899  if (readMCatNLOfile) {
900  for (std::vector<std::string>::const_iterator iter = lheEvent()->getComments().begin();
901  iter != lheEvent()->getComments().end();
902  ++iter) {
903  std::string toParse(iter->substr(1));
904  if (!give(toParse))
906  << "Herwig 6 did not accept the following: \"" << toParse << "\"." << std::endl;
907  }
908  }
909 }

References 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 872 of file Herwig6Hadronizer.cc.

872  {
874  heprup_.pdfgup[0] = heprup_.pdfgup[1] = -1;
875  heprup_.pdfsup[0] = heprup_.pdfsup[1] = -1;
876  // we set up the PDFs ourselves
877 
878  // pass HERWIG paramaters fomr header (if present)
879  std::string mcnloHeader = "herwig6header";
880  std::vector<lhef::LHERunInfo::Header> headers = lheRunInfo()->getHeaders();
881  for (std::vector<lhef::LHERunInfo::Header>::const_iterator hIter = headers.begin(); hIter != headers.end(); ++hIter) {
882  if (hIter->tag() == mcnloHeader) {
883  readMCatNLOfile = true;
884  for (lhef::LHERunInfo::Header::const_iterator lIter = hIter->begin(); lIter != hIter->end(); ++lIter) {
885  if ((lIter->c_str())[0] != '#' && (lIter->c_str())[0] != '\n') { // it's not a comment)
886  if (!give(*lIter))
888  << "Herwig 6 did not accept the following: \"" << *lIter << "\"." << std::endl;
889  }
890  }
891  }
892  }
893 }

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 136 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ conv

HepMC::IO_HERWIG Herwig6Hadronizer::conv
private

Definition at line 126 of file Herwig6Hadronizer.cc.

Referenced by hadronize().

◆ doMatching

bool Herwig6Hadronizer::doMatching
private

Definition at line 141 of file Herwig6Hadronizer.cc.

Referenced by hadronize(), and readSettings().

◆ doMPInteraction

bool Herwig6Hadronizer::doMPInteraction
private

Definition at line 138 of file Herwig6Hadronizer.cc.

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

◆ emulatePythiaStatusCodes

bool Herwig6Hadronizer::emulatePythiaStatusCodes
private

Definition at line 135 of file Herwig6Hadronizer.cc.

Referenced by finalizeEvent().

◆ externalPartons

bool Herwig6Hadronizer::externalPartons
private

Definition at line 128 of file Herwig6Hadronizer.cc.

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

◆ fConvertToPDG

bool Herwig6Hadronizer::fConvertToPDG
private

Definition at line 140 of file Herwig6Hadronizer.cc.

Referenced by hadronize(), and Herwig6Hadronizer().

◆ hepmcVerbosity

int Herwig6Hadronizer::hepmcVerbosity
private

Definition at line 132 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ herwigVerbosity

int Herwig6Hadronizer::herwigVerbosity
private

Definition at line 131 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ inclusiveMatching

bool Herwig6Hadronizer::inclusiveMatching
private

Definition at line 142 of file Herwig6Hadronizer.cc.

Referenced by readSettings().

◆ matchingScale

double Herwig6Hadronizer::matchingScale
private

Definition at line 144 of file Herwig6Hadronizer.cc.

Referenced by readSettings().

◆ maxEventsToPrint

int Herwig6Hadronizer::maxEventsToPrint
private

Definition at line 133 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ needClear

bool Herwig6Hadronizer::needClear
private

Definition at line 127 of file Herwig6Hadronizer.cc.

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

◆ nMatch

int Herwig6Hadronizer::nMatch
private

Definition at line 143 of file Herwig6Hadronizer.cc.

Referenced by readSettings().

◆ numTrials

int Herwig6Hadronizer::numTrials
private

Definition at line 139 of file Herwig6Hadronizer.cc.

◆ parameters

gen::ParameterCollector Herwig6Hadronizer::parameters
private

Definition at line 130 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ particleSpecFileName

std::string Herwig6Hadronizer::particleSpecFileName
private

Definition at line 149 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ printCards

bool Herwig6Hadronizer::printCards
private

Definition at line 134 of file Herwig6Hadronizer.cc.

Referenced by initialize(), and readSettings().

◆ readMCatNLOfile

bool Herwig6Hadronizer::readMCatNLOfile
private

Definition at line 146 of file Herwig6Hadronizer.cc.

Referenced by upEvnt(), and upInit().

◆ readParticleSpecFile

bool Herwig6Hadronizer::readParticleSpecFile
private

Definition at line 150 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
gen::BaseHadronizer::lheRunInfo
lhef::LHERunInfo * lheRunInfo()
Definition: BaseHadronizer.h:90
heprup_
struct HEPRUP_ heprup_
Herwig6Hadronizer::printCards
bool printCards
Definition: Herwig6Hadronizer.cc:134
gen::BaseHadronizer::lheEvent
lhef::LHEEvent * lheEvent()
Definition: BaseHadronizer.h:89
mps_fire.i
i
Definition: mps_fire.py:428
SiPixelPI::one
Definition: SiPixelPayloadInspectorHelper.h:39
edm::SharedResourceNames::kHerwig6
static const std::string kHerwig6
Definition: SharedResourceNames.h:31
lhef::LHEEvent::fillEventInfo
void fillEventInfo(HepMC::GenEvent *hepmc) const
Definition: LHEEvent.cc:220
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:196
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:150
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
jimmin
#define jimmin
Definition: herwig.h:315
Herwig6Hadronizer::doMPInteraction
bool doMPInteraction
Definition: Herwig6Hadronizer.cc:138
pos
Definition: PixelAliasList.h:18
gen::FortranInstance::kFortranInstance
static const std::string kFortranInstance
Definition: FortranInstance.h:88
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
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:208
wrapper
static HepMC::HEPEVT_Wrapper wrapper
Definition: BeamHaloProducer.cc:47
GenRunInfoProduct::setInternalXSec
void setInternalXSec(const XSec &xsec)
Definition: GenRunInfoProduct.h:26
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
lhef::LHEEvent::fillPdfInfo
void fillPdfInfo(HepMC::PdfInfo *info) const
Definition: LHEEvent.cc:193
findQualityFiles.v
v
Definition: findQualityFiles.py:179
jminit
#define jminit
Definition: herwig.h:316
relativeConstraints.error
error
Definition: relativeConstraints.py:53
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
getRunAppsInfo.headers
headers
Definition: getRunAppsInfo.py:65
Herwig6Hadronizer::nMatch
int nMatch
Definition: Herwig6Hadronizer.cc:143
jmefin
#define jmefin
Definition: herwig.h:318
edm::Exception
Definition: EDMException.h:77
Herwig6Hadronizer::hadronize
bool hadronize()
Definition: Herwig6Hadronizer.cc:629
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
gen::ParameterCollector::end
const_iterator end() const
Definition: ParameterCollector.h:76
Herwig6Hadronizer::conv
HepMC::IO_HERWIG conv
Definition: Herwig6Hadronizer.cc:126
Herwig6Hadronizer::doMatching
bool doMatching
Definition: Herwig6Hadronizer.cc:141
submitPVValidationJobs.split
def split(sequence, size)
Definition: submitPVValidationJobs.py:352
gen::BaseHadronizer::eventInfo
std::unique_ptr< GenEventInfoProduct > & eventInfo()
Definition: BaseHadronizer.h:87
Herwig6Hadronizer::hepmcVerbosity
int hepmcVerbosity
Definition: Herwig6Hadronizer.cc:132
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
Herwig6Hadronizer::inclusiveMatching
bool inclusiveMatching
Definition: Herwig6Hadronizer.cc:142
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Herwig6Hadronizer::numTrials
int numTrials
Definition: Herwig6Hadronizer.cc:139
gen::FortranInstance::call
void call(void(&fn)())
Definition: FortranInstance.h:20
Herwig6Hadronizer::theSharedResources
static const std::vector< std::string > theSharedResources
Definition: Herwig6Hadronizer.cc:124
Herwig6Hadronizer::initializeForInternalPartons
bool initializeForInternalPartons()
Definition: Herwig6Hadronizer.cc:397
edm::ParameterSet
Definition: ParameterSet.h:47
groupFilesInBlocks.lines
lines
Definition: groupFilesInBlocks.py:95
Herwig6Hadronizer::pythiaStatusCode
int pythiaStatusCode(const HepMC::GenParticle *p) const
Definition: Herwig6Hadronizer.cc:911
Herwig6Hadronizer::herwigVerbosity
int herwigVerbosity
Definition: Herwig6Hadronizer.cc:131
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:127
lhef::HEPRUP
Definition: LesHouches.h:22
Herwig6Hadronizer::particleSpecFileName
std::string particleSpecFileName
Definition: Herwig6Hadronizer.cc:149
gen::ParameterCollector::begin
const_iterator begin() const
Definition: ParameterCollector.cc:83
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
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:453
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
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:128
Herwig6Hadronizer::parameters
gen::ParameterCollector parameters
Definition: Herwig6Hadronizer.cc:130
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
gen::BaseHadronizer::event
std::unique_ptr< HepMC::GenEvent > & event()
Definition: BaseHadronizer.h:86
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
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:245
hwualf_
double hwualf_(int *mode, double *scale)
Herwig6Hadronizer::matchingScale
double matchingScale
Definition: Herwig6Hadronizer.cc:144
Herwig6Hadronizer::pythiaStatusCodes
void pythiaStatusCodes()
Definition: Herwig6Hadronizer.cc:989
lhef::LHEEvent::count
void count(LHERunInfo::CountMode count, double weight=1.0, double matchWeight=1.0)
Definition: LHEEvent.cc:184
Herwig6Hadronizer::comEnergy
double comEnergy
Definition: Herwig6Hadronizer.cc:136
Herwig6Hadronizer::maxEventsToPrint
int maxEventsToPrint
Definition: Herwig6Hadronizer.cc:133
Herwig6Hadronizer::fConvertToPDG
bool fConvertToPDG
Definition: Herwig6Hadronizer.cc:140
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:146
Herwig6Hadronizer::useJimmy
bool useJimmy
Definition: Herwig6Hadronizer.cc:137
Herwig6Hadronizer::emulatePythiaStatusCodes
bool emulatePythiaStatusCodes
Definition: Herwig6Hadronizer.cc:135
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:434
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
lhef::LHERunInfo::pdfSetTranslation
std::pair< int, int > pdfSetTranslation() const
Definition: LHERunInfo.cc:527
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