CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
gen::Pythia6Hadronizer Class Reference

#include <Pythia6Hadronizer.h>

Inheritance diagram for gen::Pythia6Hadronizer:
gen::BaseHadronizer

Public Member Functions

const char * classname () const
 
bool decay ()
 
bool declareSpecialSettings (const std::vector< std::string > &)
 
bool declareStableParticles (const std::vector< int > &)
 
void finalizeEvent ()
 
bool generatePartonsAndHadronize ()
 
bool hadronize ()
 
bool initializeForExternalPartons ()
 
bool initializeForInternalPartons ()
 
 Pythia6Hadronizer (edm::ParameterSet const &ps)
 
bool readSettings (int)
 
bool residualDecay ()
 
void statistics ()
 
 ~Pythia6Hadronizer () 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)
 

Static Public Member Functions

static JetMatchinggetJetMatching ()
 

Private Types

enum  {
  PP, PPbar, ElectronPositron, ElectronProton,
  PositronProton
}
 

Private Member Functions

void doSetRandomEngine (CLHEP::HepRandomEngine *v) override
 
std::vector< std::string > const & doSharedResources () const override
 
void fillTmpStorage ()
 
void flushTmpStorage ()
 
void imposeProperTime ()
 

Private Attributes

double fBeam1PZ
 
double fBeam2PZ
 
double fCOMEnergy
 
bool fConvertToPDG
 
bool fDisplayPythiaBanner
 
bool fDisplayPythiaCards
 
bool fGluinoHadronsEnabled
 
bool fHepMCVerbosity
 
bool fImposeProperTime
 
int fInitialState
 
unsigned int fMaxEventsToPrint
 
Pythia6ServicefPy6Service
 
unsigned int fPythiaListVerbosity
 
bool fStopHadronsEnabled
 

Static Private Attributes

static JetMatchingfJetMatching = nullptr
 
static const std::vector< std::string > theSharedResources
 

Additional Inherited Members

- Protected Member Functions inherited from gen::BaseHadronizer
std::unique_ptr< HepMC::GenEvent > & event ()
 
std::unique_ptr< GenEventInfoProduct > & eventInfo ()
 
lhef::LHEEventlheEvent ()
 
lhef::LHERunInfolheRunInfo ()
 
GenRunInfoProductrunInfo ()
 
- Protected Attributes inherited from gen::BaseHadronizer
std::string lheFile_
 
int randomIndex_
 

Detailed Description

Definition at line 37 of file Pythia6Hadronizer.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
PP 
PPbar 
ElectronPositron 
ElectronProton 
PositronProton 

Definition at line 82 of file Pythia6Hadronizer.h.

Constructor & Destructor Documentation

◆ Pythia6Hadronizer()

gen::Pythia6Hadronizer::Pythia6Hadronizer ( edm::ParameterSet const &  ps)

Definition at line 96 of file Pythia6Hadronizer.cc.

97  : BaseHadronizer(ps),
98  fPy6Service(new Pythia6ServiceWithCallback(ps)), // this will store py6 params for further settings
100  fCOMEnergy(ps.getParameter<double>("comEnergy")),
101  fHepMCVerbosity(ps.getUntrackedParameter<bool>("pythiaHepMCVerbosity", false)),
102  fMaxEventsToPrint(ps.getUntrackedParameter<int>("maxEventsToPrint", 0)),
103  fPythiaListVerbosity(ps.getUntrackedParameter<int>("pythiaPylistVerbosity", 0)),
104  fDisplayPythiaBanner(ps.getUntrackedParameter<bool>("displayPythiaBanner", false)),
105  fDisplayPythiaCards(ps.getUntrackedParameter<bool>("displayPythiaCards", false)) {
106  // J.Y.: the following 3 parameters are hacked "for a reason"
107  //
108  if (ps.exists("PPbarInitialState")) {
109  if (fInitialState == PP) {
111  edm::LogInfo("GeneratorInterface|Pythia6Interface")
112  << "Pythia6 will be initialized for PROTON-ANTIPROTON INITIAL STATE. "
113  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
114  std::cout << "Pythia6 will be initialized for PROTON-ANTIPROTON INITIAL STATE." << std::endl;
115  std::cout << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
116  } else {
117  // probably need to throw on attempt to override ?
118  }
119  } else if (ps.exists("ElectronPositronInitialState")) {
120  if (fInitialState == PP) {
122  edm::LogInfo("GeneratorInterface|Pythia6Interface")
123  << "Pythia6 will be initialized for ELECTRON-POSITRON INITIAL STATE. "
124  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
125  std::cout << "Pythia6 will be initialized for ELECTRON-POSITRON INITIAL STATE." << std::endl;
126  std::cout << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
127  } else {
128  // probably need to throw on attempt to override ?
129  }
130  } else if (ps.exists("ElectronProtonInitialState")) {
131  if (fInitialState == PP) {
133  fBeam1PZ =
134  (ps.getParameter<edm::ParameterSet>("ElectronProtonInitialState")).getParameter<double>("electronMomentum");
135  fBeam2PZ =
136  (ps.getParameter<edm::ParameterSet>("ElectronProtonInitialState")).getParameter<double>("protonMomentum");
137  edm::LogInfo("GeneratorInterface|Pythia6Interface")
138  << "Pythia6 will be initialized for ELECTRON-PROTON INITIAL STATE. "
139  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
140  std::cout << "Pythia6 will be initialized for ELECTRON-PROTON INITIAL STATE." << std::endl;
141  std::cout << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
142  } else {
143  // probably need to throw on attempt to override ?
144  }
145  } else if (ps.exists("PositronProtonInitialState")) {
146  if (fInitialState == PP) {
148  fBeam1PZ =
149  (ps.getParameter<edm::ParameterSet>("ElectronProtonInitialState")).getParameter<double>("positronMomentum");
150  fBeam2PZ =
151  (ps.getParameter<edm::ParameterSet>("ElectronProtonInitialState")).getParameter<double>("protonMomentum");
152  edm::LogInfo("GeneratorInterface|Pythia6Interface")
153  << "Pythia6 will be initialized for POSITRON-PROTON INITIAL STATE. "
154  << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
155  std::cout << "Pythia6 will be initialized for POSITRON-PROTON INITIAL STATE." << std::endl;
156  std::cout << "This is a user-request change from the DEFAULT PROTON-PROTON initial state." << std::endl;
157  } else {
158  // throw on unknown initial state !
159  throw edm::Exception(edm::errors::Configuration, "Pythia6Interface")
160  << " UNKNOWN INITIAL STATE. \n The allowed initial states are: PP, PPbar, ElectronPositron, "
161  "ElectronProton, and PositronProton \n";
162  }
163  }
164 
165  // J.Y.: the following 4 params are "hacked", in the sense
166  // that they're tracked but get in optionally;
167  // this will be fixed once we update all applications
168  //
169 
170  fStopHadronsEnabled = false;
171  if (ps.exists("stopHadrons"))
172  fStopHadronsEnabled = ps.getParameter<bool>("stopHadrons");
173 
174  fGluinoHadronsEnabled = false;
175  if (ps.exists("gluinoHadrons"))
176  fGluinoHadronsEnabled = ps.getParameter<bool>("gluinoHadrons");
177 
178  fImposeProperTime = false;
179  if (ps.exists("imposeProperTime")) {
180  fImposeProperTime = ps.getParameter<bool>("imposeProperTime");
181  }
182 
183  fConvertToPDG = false;
184  if (ps.exists("doPDGConvert"))
185  fConvertToPDG = ps.getParameter<bool>("doPDGConvert");
186 
187  if (ps.exists("jetMatching")) {
188  edm::ParameterSet jmParams = ps.getUntrackedParameter<edm::ParameterSet>("jetMatching");
189 
190  fJetMatching = JetMatching::create(jmParams).release();
191  }
192 
193  // first of all, silence Pythia6 banner printout, unless display requested
194  //
195  if (!fDisplayPythiaBanner) {
196  if (!call_pygive("MSTU(12)=12345")) {
197  throw edm::Exception(edm::errors::Configuration, "PythiaError") << " Pythia did not accept MSTU(12)=12345";
198  }
199  }
200 
201  // silence printouts from PYGIVE, unless display requested
202  //
203  if (!fDisplayPythiaCards) {
204  if (!call_pygive("MSTU(13)=0")) {
205  throw edm::Exception(edm::errors::Configuration, "PythiaError") << " Pythia did not accept MSTU(13)=0";
206  }
207  }
208 
209  // tmp stuff to deal with EvtGen corrupting pyjets
210  // NPartsBeforeDecays = 0;
211  flushTmpStorage();
212  }

References gen::call_pygive(), edm::errors::Configuration, gather_cfg::cout, gen::JetMatching::create(), ElectronPositron, ElectronProton, Exception, edm::ParameterSet::exists(), fBeam1PZ, fBeam2PZ, fConvertToPDG, fDisplayPythiaBanner, fDisplayPythiaCards, fGluinoHadronsEnabled, fImposeProperTime, fInitialState, fJetMatching, flushTmpStorage(), fStopHadronsEnabled, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), PositronProton, PP, and PPbar.

◆ ~Pythia6Hadronizer()

gen::Pythia6Hadronizer::~Pythia6Hadronizer ( )
override

Definition at line 214 of file Pythia6Hadronizer.cc.

214  {
215  if (fPy6Service != nullptr)
216  delete fPy6Service;
217  if (fJetMatching != nullptr)
218  delete fJetMatching;
219  }

References fJetMatching, and fPy6Service.

Member Function Documentation

◆ classname()

const char * gen::Pythia6Hadronizer::classname ( ) const

Definition at line 909 of file Pythia6Hadronizer.cc.

909 { return "gen::Pythia6Hadronizer"; }

◆ decay()

bool gen::Pythia6Hadronizer::decay ( )

Definition at line 508 of file Pythia6Hadronizer.cc.

508 { return true; }

◆ declareSpecialSettings()

bool gen::Pythia6Hadronizer::declareSpecialSettings ( const std::vector< std::string > &  settings)

Definition at line 795 of file Pythia6Hadronizer.cc.

795  {
796  for (unsigned int iss = 0; iss < settings.size(); iss++) {
797  if (settings[iss].find("QED-brem-off") == std::string::npos)
798  continue;
799  size_t fnd1 = settings[iss].find(":");
800  if (fnd1 == std::string::npos)
801  continue;
802 
803  std::string value = settings[iss].substr(fnd1 + 1);
804 
805  if (value == "all") {
806  call_pygive("MSTJ(41)=3");
807  } else {
808  int number = atoi(value.c_str());
809  int PyID = HepPID::translatePDTtoPythia(number);
810  int pyCode = pycomp_(PyID);
811  if (pyCode > 0) {
812  // first of all, check if mstj(39) is 0 or if we're trying to override user's setting
813  // if so, throw an exception and stop, because otherwise the user will get behaviour
814  // that's different from what she/he expects !
815  if (pydat1_.mstj[38] > 0 && pydat1_.mstj[38] != pyCode) {
816  throw edm::Exception(edm::errors::Configuration, "Pythia6Interface")
817  << " Fatal conflict: \n mandatory internal directive to set MSTJ(39)=" << pyCode
818  << " overrides user setting MSTJ(39)=" << pydat1_.mstj[38]
819  << " - user will not get expected behaviour \n";
820  }
821  std::ostringstream pyCard;
822  pyCard << "MSTJ(39)=" << pyCode;
823  call_pygive(pyCard.str());
824  }
825  }
826  }
827 
828  return true;
829  }

References gen::call_pygive(), edm::errors::Configuration, Exception, spr::find(), contentValuesFiles::number, gen::pycomp_(), gen::pydat1_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ declareStableParticles()

bool gen::Pythia6Hadronizer::declareStableParticles ( const std::vector< int > &  pdg)

Definition at line 777 of file Pythia6Hadronizer.cc.

777  {
778  for (unsigned int i = 0; i < pdg.size(); i++) {
779  int PyID = HepPID::translatePDTtoPythia(pdg[i]);
780  // int PyID = pdg[i];
781  int pyCode = pycomp_(PyID);
782  if (pyCode > 0) {
783  std::ostringstream pyCard;
784  pyCard << "MDCY(" << pyCode << ",1)=0";
785  /* this is a test printout...
786  std::cout << "pdg= " << pdg[i] << " " << pyCard.str() << std::endl;
787 */
788  call_pygive(pyCard.str());
789  }
790  }
791 
792  return true;
793  }

References gen::call_pygive(), mps_fire::i, and gen::pycomp_().

◆ doSetRandomEngine()

void gen::Pythia6Hadronizer::doSetRandomEngine ( CLHEP::HepRandomEngine *  v)
overrideprivatevirtual

Reimplemented from gen::BaseHadronizer.

Definition at line 221 of file Pythia6Hadronizer.cc.

References fPy6Service, gen::Pythia6Service::setRandomEngine(), and gen::v.

◆ doSharedResources()

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

Reimplemented from gen::BaseHadronizer.

Definition at line 66 of file Pythia6Hadronizer.h.

66 { return theSharedResources; }

References theSharedResources.

◆ fillTmpStorage()

void gen::Pythia6Hadronizer::fillTmpStorage ( )
private

Definition at line 236 of file Pythia6Hadronizer.cc.

236  {
237  pyjets_local.n = pyjets.n;
238  pyjets_local.npad = pyjets.npad;
239  for (int ip = 0; ip < pyjets_maxn; ip++) {
240  for (int i = 0; i < 5; i++) {
241  pyjets_local.k[i][ip] = pyjets.k[i][ip];
242  pyjets_local.p[i][ip] = pyjets.p[i][ip];
243  pyjets_local.v[i][ip] = pyjets.v[i][ip];
244  }
245  }
246 
247  return;
248  }

References mps_fire::i, and gen::pyjets_local.

Referenced by generatePartonsAndHadronize(), and hadronize().

◆ finalizeEvent()

void gen::Pythia6Hadronizer::finalizeEvent ( )

Definition at line 250 of file Pythia6Hadronizer.cc.

250  {
251  bool lhe = lheEvent() != nullptr;
252 
253  HepMC::PdfInfo pdf;
254 
255  // if we are in hadronizer mode, we can pass on information from
256  // the LHE input
257  if (lhe) {
259  lheEvent()->fillPdfInfo(&pdf);
260  } else {
261  // filling in factorization "Q scale" now! pthat moved to binningValues()
262  //
263 
264  if (event()->signal_process_id() <= 0)
265  event()->set_signal_process_id(pypars.msti[0]);
266  if (event()->event_scale() <= 0)
267  event()->set_event_scale(pypars.pari[22]);
268  if (event()->alphaQED() <= 0)
269  event()->set_alphaQED(pyint1.vint[56]);
270  if (event()->alphaQCD() <= 0)
271  event()->set_alphaQCD(pyint1.vint[57]);
272 
273  // get pdf info directly from Pythia6 and set it up into HepMC::GenEvent
274  // S. Mrenna: Prefer vint block
275  //
276  if (pdf.id1() <= 0)
277  pdf.set_id1(pyint1.mint[14] == 21 ? 0 : pyint1.mint[14]);
278  if (pdf.id2() <= 0)
279  pdf.set_id2(pyint1.mint[15] == 21 ? 0 : pyint1.mint[15]);
280  if (pdf.x1() <= 0)
281  pdf.set_x1(pyint1.vint[40]);
282  if (pdf.x2() <= 0)
283  pdf.set_x2(pyint1.vint[41]);
284  if (pdf.pdf1() <= 0)
285  pdf.set_pdf1(pyint1.vint[38] / pyint1.vint[40]);
286  if (pdf.pdf2() <= 0)
287  pdf.set_pdf2(pyint1.vint[39] / pyint1.vint[41]);
288  if (pdf.scalePDF() <= 0)
289  pdf.set_scalePDF(pyint1.vint[50]);
290  }
291 
292  /* 9/9/2010 - JVY: This is the old piece of code - I can't remember why we implemented it this way.
293  However, it's causing problems with pdf1 & pdf2 when processing LHE samples,
294  specifically, because both are set to -1, it tries to fill with Py6 numbers that
295  are NOT valid/right at this point !
296  In general, for LHE/ME event processing we should implement the correct calculation
297  of the pdf's, rather than using py6 ones.
298 
299  // filling in factorization "Q scale" now! pthat moved to binningValues()
300 
301  if (!lhe || event()->signal_process_id() < 0) event()->set_signal_process_id( pypars.msti[0] );
302  if (!lhe || event()->event_scale() < 0) event()->set_event_scale( pypars.pari[22] );
303  if (!lhe || event()->alphaQED() < 0) event()->set_alphaQED( pyint1.vint[56] );
304  if (!lhe || event()->alphaQCD() < 0) event()->set_alphaQCD( pyint1.vint[57] );
305 
306  // get pdf info directly from Pythia6 and set it up into HepMC::GenEvent
307  // S. Mrenna: Prefer vint block
308  //
309  if (!lhe || pdf.id1() < 0) pdf.set_id1( pyint1.mint[14] == 21 ? 0 : pyint1.mint[14] );
310  if (!lhe || pdf.id2() < 0) pdf.set_id2( pyint1.mint[15] == 21 ? 0 : pyint1.mint[15] );
311  if (!lhe || pdf.x1() < 0) pdf.set_x1( pyint1.vint[40] );
312  if (!lhe || pdf.x2() < 0) pdf.set_x2( pyint1.vint[41] );
313  if (!lhe || pdf.pdf1() < 0) pdf.set_pdf1( pyint1.vint[38] / pyint1.vint[40] );
314  if (!lhe || pdf.pdf2() < 0) pdf.set_pdf2( pyint1.vint[39] / pyint1.vint[41] );
315  if (!lhe || pdf.scalePDF() < 0) pdf.set_scalePDF( pyint1.vint[50] );
316 */
317 
318  event()->set_pdf_info(pdf);
319 
320  HepMC::GenCrossSection xsec;
321  double cs = pypars.pari[0]; // cross section in mb
322  cs *= 1.0e9; // translate to pb
323  double cserr = cs / sqrt(pypars.msti[4]);
324  xsec.set_cross_section(cs, cserr);
325  event()->set_cross_section(xsec);
326 
327  // this is "standard" Py6 event weight (corresponds to PYINT1/VINT(97)
328  //
329  if (lhe && std::abs(lheRunInfo()->getHEPRUP()->IDWTUP) == 4)
330  // translate mb to pb (CMS/Gen "convention" as of May 2009)
331  event()->weights().push_back(pyint1.vint[96] * 1.0e9);
332  else
333  event()->weights().push_back(pyint1.vint[96]);
334  //
335  // this is event weight as 1./VINT(99) (PYINT1/VINT(99) is returned by the PYEVWT)
336  //
337  event()->weights().push_back(1. / (pyint1.vint[98]));
338 
339  // now create the GenEventInfo product from the GenEvent and fill
340  // the missing pieces
341 
342  eventInfo().reset(new GenEventInfoProduct(event().get()));
343 
344  // in Pythia6 pthat is used to subdivide samples into different bins
345  // in LHE mode the binning is done by the external ME generator
346  // which is likely not pthat, so only filling it for Py6 internal mode
347  if (!lhe) {
348  eventInfo()->setBinningValues(std::vector<double>(1, pypars.pari[16]));
349  }
350 
351  // here we treat long-lived particles
352  //
353  if (fImposeProperTime || pydat1.mstj[21] == 3 || pydat1.mstj[21] == 4)
355 
356  // convert particle IDs Py6->PDG, if requested
357  if (fConvertToPDG) {
358  for (HepMC::GenEvent::particle_iterator part = event()->particles_begin(); part != event()->particles_end();
359  ++part) {
360  (*part)->set_pdg_id(HepPID::translatePythiatoPDT((*part)->pdg_id()));
361  }
362  }
363 
364  // service printouts, if requested
365  //
366  if (fMaxEventsToPrint > 0) {
370  if (fHepMCVerbosity) {
371  std::cout << "Event process = " << pypars.msti[0] << std::endl << "----------------------" << std::endl;
372  event()->print();
373  }
374  }
375 
376  // dump of all settings after all initializations
377  if (fDisplayPythiaCards) {
378  fDisplayPythiaCards = false;
379  call_pylist(12);
380  call_pylist(13);
381  std::cout << "\n PYPARS \n" << std::endl;
382  std::cout << std::setw(5) << std::fixed << "I" << std::setw(10) << std::fixed << "MSTP(I)" << std::setw(16)
383  << std::fixed << "PARP(I)" << std::setw(10) << std::fixed << "MSTI(I)" << std::setw(16) << std::fixed
384  << "PARI(I)" << std::endl;
385  for (unsigned int ind = 0; ind < 200; ind++) {
386  std::cout << std::setw(5) << std::fixed << ind + 1 << std::setw(10) << std::fixed << pypars.mstp[ind]
387  << std::setw(16) << std::fixed << pypars.parp[ind] << std::setw(10) << std::fixed << pypars.msti[ind]
388  << std::setw(16) << std::fixed << pypars.pari[ind] << std::endl;
389  }
390  }
391 
392  return;
393  }

References funct::abs(), gen::call_pylist(), gather_cfg::cout, fwrapper::cs, gen::BaseHadronizer::event(), gen::BaseHadronizer::eventInfo(), fConvertToPDG, fDisplayPythiaCards, fHepMCVerbosity, lhef::LHEEvent::fillEventInfo(), lhef::LHEEvent::fillPdfInfo(), fImposeProperTime, alignBH_cfg::fixed, fMaxEventsToPrint, fPythiaListVerbosity, get, imposeProperTime(), gen::BaseHadronizer::lheEvent(), gen::BaseHadronizer::lheRunInfo(), pydat1, pyint1, pypars, and mathSSE::sqrt().

◆ flushTmpStorage()

void gen::Pythia6Hadronizer::flushTmpStorage ( )
private

Definition at line 223 of file Pythia6Hadronizer.cc.

223  {
224  pyjets_local.n = 0;
225  pyjets_local.npad = 0;
226  for (int ip = 0; ip < pyjets_maxn; ip++) {
227  for (int i = 0; i < 5; i++) {
228  pyjets_local.k[i][ip] = 0;
229  pyjets_local.p[i][ip] = 0.;
230  pyjets_local.v[i][ip] = 0.;
231  }
232  }
233  return;
234  }

References mps_fire::i, and gen::pyjets_local.

Referenced by generatePartonsAndHadronize(), hadronize(), and Pythia6Hadronizer().

◆ generatePartonsAndHadronize()

bool gen::Pythia6Hadronizer::generatePartonsAndHadronize ( )

Definition at line 395 of file Pythia6Hadronizer.cc.

395  {
396  Pythia6Service::InstanceWrapper guard(fPy6Service); // grab Py6 instance
397 
399 
400  // generate event with Pythia6
401  //
402 
404  // call_pygive("MSTJ(1)=-1");
405  call_pygive("MSTJ(14)=-1");
406  }
407 
408  call_pyevnt();
409 
411  // call_pygive("MSTJ(1)=1");
412  call_pygive("MSTJ(14)=1");
413  int ierr = 0;
414  if (fStopHadronsEnabled) {
415  pystfr_(ierr);
416  if (ierr != 0) // skip failed events
417  {
418  event().reset();
419  return false;
420  }
421  }
423  pyglfr_();
424  }
425 
426  if (pyint1.mint[50] != 0) // skip event if py6 considers it bad
427  {
428  event().reset();
429  return false;
430  }
431 
432  call_pyhepc(1);
433  event().reset(conv.read_next_event());
434 
435  // this is to deal with post-gen tools & residualDecay() that may reuse PYJETS
436  //
437  flushTmpStorage();
438  fillTmpStorage();
439 
440  return true;
441  }

References gen::call_pygive(), conv, gen::BaseHadronizer::event(), fGluinoHadronsEnabled, fillTmpStorage(), flushTmpStorage(), fPy6Service, fStopHadronsEnabled, gen::FortranCallback::getInstance(), gen::pyglfr_(), pyint1, gen::pystfr_(), and gen::FortranCallback::resetIterationsPerEvent().

◆ getJetMatching()

static JetMatching* gen::Pythia6Hadronizer::getJetMatching ( )
inlinestatic

◆ hadronize()

bool gen::Pythia6Hadronizer::hadronize ( )

Definition at line 443 of file Pythia6Hadronizer.cc.

443  {
444  Pythia6Service::InstanceWrapper guard(fPy6Service); // grab Py6 instance
445 
448  if (fJetMatching) {
451  }
452 
453  // generate event with Pythia6
454  //
456  call_pygive("MSTJ(1)=-1");
457  call_pygive("MSTJ(14)=-1");
458  }
459 
460  call_pyevnt();
461 
462  if (FortranCallback::getInstance()->getIterationsPerEvent() > 1 || hepeup_.nup <= 0 || pypars.msti[0] == 1) {
463  // update LHE matching statistics
465 
466  event().reset();
467  return false;
468  }
469 
470  // update LHE matching statistics
471  //
473 
475  call_pygive("MSTJ(1)=1");
476  call_pygive("MSTJ(14)=1");
477  int ierr = 0;
478  if (fStopHadronsEnabled) {
479  pystfr_(ierr);
480  if (ierr != 0) // skip failed events
481  {
482  event().reset();
483  return false;
484  }
485  }
486 
488  pyglfr_();
489  }
490 
491  if (pyint1.mint[50] != 0) // skip event if py6 considers it bad
492  {
493  event().reset();
494  return false;
495  }
496 
497  call_pyhepc(1);
498  event().reset(conv.read_next_event());
499 
500  // this is to deal with post-gen tools and/or residualDecay(), that may reuse PYJETS
501  //
502  flushTmpStorage();
503  fillTmpStorage();
504 
505  return true;
506  }

References gen::JetMatching::beforeHadronisation(), gen::call_pygive(), conv, lhef::LHEEvent::count(), gen::BaseHadronizer::event(), fGluinoHadronsEnabled, fillTmpStorage(), fJetMatching, flushTmpStorage(), fPy6Service, fStopHadronsEnabled, gen::FortranCallback::getInstance(), hepeup_, lhef::LHERunInfo::kAccepted, lhef::LHERunInfo::kSelected, gen::BaseHadronizer::lheEvent(), HEPEUP_::nup, gen::pyglfr_(), pyint1, pypars, gen::pystfr_(), gen::FortranCallback::resetIterationsPerEvent(), gen::JetMatching::resetMatchingStatus(), and gen::FortranCallback::setLHEEvent().

◆ imposeProperTime()

void gen::Pythia6Hadronizer::imposeProperTime ( )
private

Definition at line 831 of file Pythia6Hadronizer.cc.

831  {
832  // this is practically a copy/paste of the original code by J.Alcaraz,
833  // taken directly from PythiaSource
834 
835  int dumm = 0;
836  HepMC::GenEvent::vertex_const_iterator vbegin = event()->vertices_begin();
837  HepMC::GenEvent::vertex_const_iterator vend = event()->vertices_end();
838  HepMC::GenEvent::vertex_const_iterator vitr = vbegin;
839  for (; vitr != vend; ++vitr) {
840  HepMC::GenVertex::particle_iterator pbegin = (*vitr)->particles_begin(HepMC::children);
841  HepMC::GenVertex::particle_iterator pend = (*vitr)->particles_end(HepMC::children);
842  HepMC::GenVertex::particle_iterator pitr = pbegin;
843  for (; pitr != pend; ++pitr) {
844  if ((*pitr)->end_vertex())
845  continue;
846  if ((*pitr)->status() != 1)
847  continue;
848 
849  int pdgcode = abs((*pitr)->pdg_id());
850  // Do nothing if the particle is not expected to decay
851  if (pydat3.mdcy[0][pycomp_(pdgcode) - 1] != 1)
852  continue;
853 
854  double ctau = pydat2.pmas[3][pycomp_(pdgcode) - 1];
855  HepMC::FourVector mom = (*pitr)->momentum();
856  HepMC::FourVector vin = (*vitr)->position();
857  double x = 0.;
858  double y = 0.;
859  double z = 0.;
860  double t = 0.;
861  bool decayInRange = false;
862  while (!decayInRange) {
863  double unif_rand = fPy6Service->call(pyr_, &dumm);
864  // Value of 0 is excluded, so following line is OK
865  double proper_length = -ctau * log(unif_rand);
866  double factor = proper_length / mom.m();
867  x = vin.x() + factor * mom.px();
868  y = vin.y() + factor * mom.py();
869  z = vin.z() + factor * mom.pz();
870  t = vin.t() + factor * mom.e();
871  // Decay must be happen outside a cylindrical region
872  if (pydat1.mstj[21] == 4) {
873  if (std::sqrt(x * x + y * y) > pydat1.parj[72] || fabs(z) > pydat1.parj[73])
874  decayInRange = true;
875  // Decay must be happen outside a given sphere
876  } else if (pydat1.mstj[21] == 3) {
877  if (std::sqrt(x * x + y * y + z * z) > pydat1.parj[71])
878  decayInRange = true;
879  }
880  // Decay is always OK otherwise
881  else {
882  decayInRange = true;
883  }
884  }
885 
886  HepMC::GenVertex* vdec = new HepMC::GenVertex(HepMC::FourVector(x, y, z, t));
887  event()->add_vertex(vdec);
888  vdec->add_particle_in((*pitr));
889  }
890  }
891 
892  return;
893  }

References funct::abs(), gen::FortranInstance::call(), class-composition::children, gen::BaseHadronizer::event(), DQMScaleToClient_cfi::factor, fPy6Service, dqm-mbProfile::log, gen::pycomp_(), pydat1, gen::pyr_(), mathSSE::sqrt(), OrderedSet::t, vbegin, and vend.

Referenced by finalizeEvent().

◆ initializeForExternalPartons()

bool gen::Pythia6Hadronizer::initializeForExternalPartons ( )

Definition at line 670 of file Pythia6Hadronizer.cc.

670  {
671  Pythia6Service::InstanceWrapper guard(fPy6Service); // grab Py6 instance
672 
673  // note: CSA mode is NOT supposed to work with external partons !!!
674 
675  // fPy6Service->setGeneralParams();
676 
678 
680 
681  if (fStopHadronsEnabled) {
682  // overwrite mstp(111), no matter what
683  call_pygive("MSTP(111)=0");
684  pystrhad_();
685  call_pygive("MWID(302)=0"); // I don't know if this is specific to processing ME/LHE only,
686  call_pygive("MDCY(302,1)=0"); // or this should also be the case for full event...
687  // anyway, this comes from experience of processing MG events
688  }
689 
690  if (fGluinoHadronsEnabled) {
691  // overwrite mstp(111), no matter what
692  call_pygive("MSTP(111)=0");
693  pyglrhad_();
694  //call_pygive("MWID(309)=0");
695  //call_pygive("MDCY(309,1)=0");
696  }
697 
698  call_pyinit("USER", "", "", 0.0);
699 
701 
702  std::vector<std::string> slha = lheRunInfo()->findHeader("slha");
703  if (!slha.empty()) {
704  edm::LogInfo("Generator|LHEInterface") << "Pythia6 hadronisation found an SLHA header, "
705  << "will be passed on to Pythia." << std::endl;
708  }
709 
710  if (fJetMatching) {
712  // FIXME: the jet matching routine might not be interested in PS callback
713  call_pygive("MSTP(143)=1");
714  }
715 
716  return true;
717  }

References gen::call_pygive(), gen::Pythia6Service::closeSLHA(), fGluinoHadronsEnabled, lhef::LHERunInfo::findHeader(), fJetMatching, fPy6Service, fStopHadronsEnabled, gen::FortranCallback::getInstance(), gen::JetMatching::init(), gen::BaseHadronizer::lheRunInfo(), gen::pyglrhad_(), gen::pystrhad_(), gen::FortranCallback::setLHERunInfo(), gen::Pythia6Service::setPYUPDAParams(), and gen::Pythia6Service::setSLHAFromHeader().

◆ initializeForInternalPartons()

bool gen::Pythia6Hadronizer::initializeForInternalPartons ( )

Definition at line 719 of file Pythia6Hadronizer.cc.

719  {
720  Pythia6Service::InstanceWrapper guard(fPy6Service); // grab Py6 instance
721 
723 
724  if (fStopHadronsEnabled) {
725  // overwrite mstp(111), no matter what
726  call_pygive("MSTP(111)=0");
727  pystrhad_();
728  }
729 
730  if (fGluinoHadronsEnabled) {
731  // overwrite mstp(111), no matter what
732  call_pygive("MSTP(111)=0");
733  pyglrhad_();
734  }
735 
736  if (fInitialState == PP) // default
737  {
738  call_pyinit("CMS", "p", "p", fCOMEnergy);
739  } else if (fInitialState == PPbar) {
740  call_pyinit("CMS", "p", "pbar", fCOMEnergy);
741  } else if (fInitialState == ElectronPositron) {
742  call_pyinit("CMS", "e+", "e-", fCOMEnergy);
743  } else if (fInitialState == ElectronProton) {
744  // set p(1,i) & p(2,i) for the beams in pyjets !
745  pyjets.p[0][0] = 0.;
746  pyjets.p[1][0] = 0.;
747  pyjets.p[2][0] = fBeam1PZ;
748  pyjets.p[0][1] = 0.;
749  pyjets.p[1][1] = 0.;
750  pyjets.p[2][1] = fBeam2PZ;
751  // call "3mon" frame & 0.0 win
752  call_pyinit("3mom", "e-", "p", 0.0);
753  } else if (fInitialState == PositronProton) {
754  // set p(1,i) & p(2,i) for the beams in pyjets !
755  pyjets.p[0][0] = 0.;
756  pyjets.p[1][0] = 0.;
757  pyjets.p[2][0] = fBeam1PZ;
758  pyjets.p[0][1] = 0.;
759  pyjets.p[1][1] = 0.;
760  pyjets.p[2][1] = fBeam2PZ;
761  // call "3mon" frame & 0.0 win
762  call_pyinit("3mom", "e+", "p", 0.0);
763  } else {
764  // throw on unknown initial state !
765  throw edm::Exception(edm::errors::Configuration, "Pythia6Interface")
766  << " UNKNOWN INITIAL STATE. \n The allowed initial states are: PP, PPbar, ElectronPositron, ElectronProton, "
767  "and PositronProton \n";
768  }
769 
771 
773 
774  return true;
775  }

References gen::call_pygive(), gen::Pythia6Service::closeSLHA(), edm::errors::Configuration, ElectronPositron, ElectronProton, Exception, fBeam1PZ, fBeam2PZ, fCOMEnergy, fGluinoHadronsEnabled, fInitialState, fPy6Service, fStopHadronsEnabled, PositronProton, PP, PPbar, gen::pyglrhad_(), gen::pystrhad_(), and gen::Pythia6Service::setPYUPDAParams().

◆ readSettings()

bool gen::Pythia6Hadronizer::readSettings ( int  key)

Definition at line 659 of file Pythia6Hadronizer.cc.

659  {
660  Pythia6Service::InstanceWrapper guard(fPy6Service); // grab Py6 instance
661 
663  if (key == 0)
666 
667  return true;
668  }

References fPy6Service, crabWrapper::key, gen::Pythia6Service::setCSAParams(), gen::Pythia6Service::setGeneralParams(), and gen::Pythia6Service::setSLHAParams().

◆ residualDecay()

bool gen::Pythia6Hadronizer::residualDecay ( )

Definition at line 510 of file Pythia6Hadronizer.cc.

510  {
511  // event().get()->print();
512 
513  Pythia6Service::InstanceWrapper guard(fPy6Service); // grab Py6 instance
514 
515  // int nDocLines = pypars.msti[3];
516 
517  int NPartsBeforeDecays = pyjets_local.n;
518  int NPartsAfterDecays = event().get()->particles_size();
519  int barcode = NPartsAfterDecays;
520 
521  // JVY: well, in principle, it's not a 100% fair to go up to NPartsBeforeDecays,
522  // because Photos will attach gamma's to existing vertexes, i.e. in the middle
523  // of the event rather than at the end; but this will only shift poiters down,
524  // so we'll be going again over a few "original" particle...
525  // in the alternative, we may go all the way up to the beginning of the event
526  // and re-check if anything remains to decay, that's fine even if it'll take
527  // some extra CPU...
528 
529  for (int ipart = NPartsAfterDecays; ipart > NPartsBeforeDecays; ipart--) {
530  HepMC::GenParticle* part = event().get()->barcode_to_particle(ipart);
531  int status = part->status();
532  if (status != 1)
533  continue; // check only "stable" particles,
534  // as some undecayed may still be marked as such
535  int pdgid = part->pdg_id();
536  int py6ptr = pycomp_(pdgid);
537  if (pydat3.mdcy[0][py6ptr - 1] != 1)
538  continue; // particle is not expected to decay
539  int py6id = HepPID::translatePDTtoPythia(pdgid);
540  //
541  // first, will need to zero out, then fill up PYJETS
542  // I better do it directly (by hands) rather than via py1ent
543  // - to avoid (additional) mass smearing
544  //
545  if (part->momentum().t() <= part->generated_mass()) {
546  continue; // e==m --> 0-momentum, nothing to decay...
547  } else {
548  pyjets.n = 0;
549  for (int i = 0; i < 5; i++) {
550  pyjets.k[i][0] = 0;
551  pyjets.p[i][0] = 0.;
552  pyjets.v[i][0] = 0.;
553  }
554  pyjets.k[0][0] = 1;
555  pyjets.k[1][0] = py6id;
556  pyjets.p[4][0] = part->generated_mass();
557  pyjets.p[3][0] = part->momentum().t();
558  pyjets.p[0][0] = part->momentum().x();
559  pyjets.p[1][0] = part->momentum().y();
560  pyjets.p[2][0] = part->momentum().z();
561  HepMC::GenVertex* prod_vtx = part->production_vertex();
562  if (!prod_vtx)
563  continue; // in principle, should never happen but...
564  pyjets.v[0][0] = prod_vtx->position().x();
565  pyjets.v[1][0] = prod_vtx->position().y();
566  pyjets.v[2][0] = prod_vtx->position().z();
567  pyjets.v[3][0] = prod_vtx->position().t();
568  pyjets.v[4][0] = 0.;
569  pyjets.n = 1;
570  pyjets.npad = pyjets_local.npad;
571  }
572 
573  // now call Py6 decay routine
574  //
575  int parent = 1; // since we always pass to Py6 a single particle
576  pydecy_(parent);
577 
578  // now attach decay products to mother
579  //
580  for (int iprt1 = 1; iprt1 < pyjets.n; iprt1++) {
581  part->set_status(2);
582 
583  HepMC::GenVertex* DecVtx = new HepMC::GenVertex(
584  HepMC::FourVector(pyjets.v[0][iprt1], pyjets.v[1][iprt1], pyjets.v[2][iprt1], pyjets.v[3][iprt1]));
585  DecVtx->add_particle_in(part); // this will cleanup end_vertex if exists, replace with the new one
586  // I presume (vtx) barcode will be given automatically
587 
588  HepMC::FourVector pmom(pyjets.p[0][iprt1], pyjets.p[1][iprt1], pyjets.p[2][iprt1], pyjets.p[3][iprt1]);
589 
590  int dstatus = 0;
591  if (pyjets.k[0][iprt1] >= 1 && pyjets.k[0][iprt1] <= 10) {
592  dstatus = 1;
593  } else if (pyjets.k[0][iprt1] >= 11 && pyjets.k[0][iprt1] <= 20) {
594  dstatus = 2;
595  } else if (pyjets.k[0][iprt1] >= 21 && pyjets.k[0][iprt1] <= 30) {
596  dstatus = 3;
597  } else if (pyjets.k[0][iprt1] >= 31 && pyjets.k[0][iprt1] <= 100) {
598  dstatus = pyjets.k[0][iprt1];
599  }
600  HepMC::GenParticle* daughter =
601  new HepMC::GenParticle(pmom, HepPID::translatePythiatoPDT(pyjets.k[1][iprt1]), dstatus);
602  barcode++;
603  daughter->suggest_barcode(barcode);
604  DecVtx->add_particle_out(daughter);
605 
606  int iprt2;
607  for (iprt2 = iprt1 + 1; iprt2 < pyjets.n; iprt2++) // the pointer is shifted by -1, c++ style
608  {
609  if (pyjets.k[2][iprt2] != parent) {
610  parent = pyjets.k[2][iprt2];
611  break; // another parent particle; reset & break the loop
612  }
613 
614  HepMC::FourVector pmomN(pyjets.p[0][iprt2], pyjets.p[1][iprt2], pyjets.p[2][iprt2], pyjets.p[3][iprt2]);
615 
616  dstatus = 0;
617  if (pyjets.k[0][iprt2] >= 1 && pyjets.k[0][iprt2] <= 10) {
618  dstatus = 1;
619  } else if (pyjets.k[0][iprt2] >= 11 && pyjets.k[0][iprt2] <= 20) {
620  dstatus = 2;
621  } else if (pyjets.k[0][iprt2] >= 21 && pyjets.k[0][iprt2] <= 30) {
622  dstatus = 3;
623  } else if (pyjets.k[0][iprt2] >= 31 && pyjets.k[0][iprt2] <= 100) {
624  dstatus = pyjets.k[0][iprt2];
625  }
626  HepMC::GenParticle* daughterN =
627  new HepMC::GenParticle(pmomN, HepPID::translatePythiatoPDT(pyjets.k[1][iprt2]), dstatus);
628  barcode++;
629  daughterN->suggest_barcode(barcode);
630  DecVtx->add_particle_out(daughterN);
631  }
632 
633  iprt1 = iprt2 - 1; // reset counter such that it doesn't go over the same child more than once
634  // don't forget to offset back into c++ counting, as it's already +1 forward
635 
636  event().get()->add_vertex(DecVtx);
637  }
638  }
639 
640  // now restore the very original Py6 event record
641  //
642  if (pyjets_local.n != pyjets.n) {
643  // restore pyjets to its state as it was before external decays -
644  // might have been jammed by action above or by py1ent calls in EvtGen
645  pyjets.n = pyjets_local.n;
646  pyjets.npad = pyjets_local.npad;
647  for (int ip = 0; ip < pyjets_local.n; ip++) {
648  for (int i = 0; i < 5; i++) {
649  pyjets.k[i][ip] = pyjets_local.k[i][ip];
650  pyjets.p[i][ip] = pyjets_local.p[i][ip];
651  pyjets.v[i][ip] = pyjets_local.v[i][ip];
652  }
653  }
654  }
655 
656  return true;
657  }

References gen::BaseHadronizer::event(), fPy6Service, GenParticle::GenParticle, mps_fire::i, class-composition::parent, EgammaValidation_cff::pdgid, gen::pycomp_(), gen::pydecy_(), gen::pyjets_local, and mps_update::status.

◆ statistics()

void gen::Pythia6Hadronizer::statistics ( )

Definition at line 895 of file Pythia6Hadronizer.cc.

895  {
896  if (!runInfo().internalXSec()) {
897  // set xsec if not already done (e.g. from LHE cross section collector)
898  double cs = pypars.pari[0]; // cross section in mb
899  cs *= 1.0e9; // translate to pb (CMS/Gen "convention" as of May 2009)
901  // FIXME: can we get the xsec statistical error somewhere?
902  }
903 
904  call_pystat(1);
905 
906  return;
907  }

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

Member Data Documentation

◆ fBeam1PZ

double gen::Pythia6Hadronizer::fBeam1PZ
private

Definition at line 87 of file Pythia6Hadronizer.h.

Referenced by initializeForInternalPartons(), and Pythia6Hadronizer().

◆ fBeam2PZ

double gen::Pythia6Hadronizer::fBeam2PZ
private

Definition at line 88 of file Pythia6Hadronizer.h.

Referenced by initializeForInternalPartons(), and Pythia6Hadronizer().

◆ fCOMEnergy

double gen::Pythia6Hadronizer::fCOMEnergy
private

Definition at line 85 of file Pythia6Hadronizer.h.

Referenced by initializeForInternalPartons().

◆ fConvertToPDG

bool gen::Pythia6Hadronizer::fConvertToPDG
private

Definition at line 112 of file Pythia6Hadronizer.h.

Referenced by finalizeEvent(), and Pythia6Hadronizer().

◆ fDisplayPythiaBanner

bool gen::Pythia6Hadronizer::fDisplayPythiaBanner
private

Definition at line 98 of file Pythia6Hadronizer.h.

Referenced by Pythia6Hadronizer().

◆ fDisplayPythiaCards

bool gen::Pythia6Hadronizer::fDisplayPythiaCards
private

Definition at line 99 of file Pythia6Hadronizer.h.

Referenced by finalizeEvent(), and Pythia6Hadronizer().

◆ fGluinoHadronsEnabled

bool gen::Pythia6Hadronizer::fGluinoHadronsEnabled
private

◆ fHepMCVerbosity

bool gen::Pythia6Hadronizer::fHepMCVerbosity
private

Definition at line 92 of file Pythia6Hadronizer.h.

Referenced by finalizeEvent().

◆ fImposeProperTime

bool gen::Pythia6Hadronizer::fImposeProperTime
private

Definition at line 109 of file Pythia6Hadronizer.h.

Referenced by finalizeEvent(), and Pythia6Hadronizer().

◆ fInitialState

int gen::Pythia6Hadronizer::fInitialState
private

Definition at line 84 of file Pythia6Hadronizer.h.

Referenced by initializeForInternalPartons(), and Pythia6Hadronizer().

◆ fJetMatching

JetMatching * gen::Pythia6Hadronizer::fJetMatching = nullptr
staticprivate

◆ fMaxEventsToPrint

unsigned int gen::Pythia6Hadronizer::fMaxEventsToPrint
private

Definition at line 93 of file Pythia6Hadronizer.h.

Referenced by finalizeEvent().

◆ fPy6Service

Pythia6Service* gen::Pythia6Hadronizer::fPy6Service
private

◆ fPythiaListVerbosity

unsigned int gen::Pythia6Hadronizer::fPythiaListVerbosity
private

Definition at line 97 of file Pythia6Hadronizer.h.

Referenced by finalizeEvent().

◆ fStopHadronsEnabled

bool gen::Pythia6Hadronizer::fStopHadronsEnabled
private

◆ theSharedResources

const std::vector< std::string > gen::Pythia6Hadronizer::theSharedResources
staticprivate
lhef::LHERunInfo::kAccepted
Definition: LHERunInfo.h:64
GenEventInfoProduct
Definition: GenEventInfoProduct.h:17
vend
#define vend()
Definition: vmac.h:43
gen::Pythia6Hadronizer::PositronProton
Definition: Pythia6Hadronizer.h:82
gen::BaseHadronizer::lheRunInfo
lhef::LHERunInfo * lheRunInfo()
Definition: BaseHadronizer.h:90
DDAxes::y
gen::BaseHadronizer::lheEvent
lhef::LHEEvent * lheEvent()
Definition: BaseHadronizer.h:89
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
mps_fire.i
i
Definition: mps_fire.py:355
lhef::LHEEvent::fillEventInfo
void fillEventInfo(HepMC::GenEvent *hepmc) const
Definition: LHEEvent.cc:218
gen::pycomp_
int pycomp_(int &)
fwrapper::cs
unique_ptr< ClusterSequence > cs
Definition: fastjetfortran_madfks.cc:45
mps_update.status
status
Definition: mps_update.py:69
pyint1
#define pyint1
Definition: ExhumeHadronizer.cc:51
class-composition.children
children
Definition: class-composition.py:88
gen::Pythia6Hadronizer::fJetMatching
static JetMatching * fJetMatching
Definition: Pythia6Hadronizer.h:90
gen::pyr_
double pyr_(int *idummy)
Definition: Pythia6Service.cc:60
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::LogInfo
Definition: MessageLogger.h:254
pypars
#define pypars
Definition: ExhumeHadronizer.cc:45
gen::FortranInstance::kFortranInstance
static const std::string kFortranInstance
Definition: FortranInstance.h:88
gen::Pythia6Hadronizer::ElectronProton
Definition: Pythia6Hadronizer.h:82
gen::Pythia6Hadronizer::PP
Definition: Pythia6Hadronizer.h:82
gen::Pythia6Service::setPYUPDAParams
void setPYUPDAParams(bool afterPyinit)
Definition: Pythia6Service.cc:276
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDAxes::x
GenRunInfoProduct::setInternalXSec
void setInternalXSec(const XSec &xsec)
Definition: GenRunInfoProduct.h:26
gen::Pythia6Service::setRandomEngine
void setRandomEngine(CLHEP::HepRandomEngine *v)
Definition: Pythia6Service.h:46
vbegin
#define vbegin()
Definition: vmac.h:36
gen::pyglfr_
void pyglfr_()
lhef::LHEEvent::fillPdfInfo
void fillPdfInfo(HepMC::PdfInfo *info) const
Definition: LHEEvent.cc:191
gen::Pythia6Hadronizer::fInitialState
int fInitialState
Definition: Pythia6Hadronizer.h:84
gen::Pythia6Service::setSLHAParams
void setSLHAParams()
Definition: Pythia6Service.cc:239
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
gen::Pythia6Hadronizer::fGluinoHadronsEnabled
bool fGluinoHadronsEnabled
Definition: Pythia6Hadronizer.h:106
gen::pydat1_
struct gen::@693 pydat1_
gen::Pythia6Hadronizer::fPy6Service
Pythia6Service * fPy6Service
Definition: Pythia6Hadronizer.h:76
gen::Pythia6Hadronizer::theSharedResources
static const std::vector< std::string > theSharedResources
Definition: Pythia6Hadronizer.h:117
gen::Pythia6Service::setGeneralParams
void setGeneralParams()
Definition: Pythia6Service.cc:157
gen::FortranCallback::getInstance
static FortranCallback * getInstance()
Definition: FortranCallback.h:52
gen::pyglrhad_
void pyglrhad_()
lhef::LHERunInfo::kSelected
Definition: LHERunInfo.h:64
gen::Pythia6Service::closeSLHA
void closeSLHA()
Definition: Pythia6Service.cc:227
gen::Pythia6Hadronizer::flushTmpStorage
void flushTmpStorage()
Definition: Pythia6Hadronizer.cc:223
part
part
Definition: HCALResponse.h:20
gen::Pythia6Service::setCSAParams
void setCSAParams()
Definition: Pythia6Service.cc:168
contentValuesFiles.number
number
Definition: contentValuesFiles.py:53
gen::Pythia6Hadronizer::fStopHadronsEnabled
bool fStopHadronsEnabled
Definition: Pythia6Hadronizer.h:105
hepeup_
struct HEPEUP_ hepeup_
conv
HepMC::IO_HEPEVT conv
Definition: Pythia6Hadronizer.cc:24
gen::FortranCallback::setLHEEvent
void setLHEEvent(lhef::LHEEvent *lhee)
Definition: FortranCallback.h:21
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
gen::Pythia6Hadronizer::fHepMCVerbosity
bool fHepMCVerbosity
Definition: Pythia6Hadronizer.h:92
gen::Pythia6Hadronizer::fCOMEnergy
double fCOMEnergy
Definition: Pythia6Hadronizer.h:85
DDAxes::z
gen::Pythia6Hadronizer::fBeam1PZ
double fBeam1PZ
Definition: Pythia6Hadronizer.h:87
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
gen::BaseHadronizer::eventInfo
std::unique_ptr< GenEventInfoProduct > & eventInfo()
Definition: BaseHadronizer.h:87
OrderedSet.t
t
Definition: OrderedSet.py:90
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
gen::FortranCallback::resetIterationsPerEvent
void resetIterationsPerEvent()
Definition: FortranCallback.h:23
gen::FortranInstance::call
void call(void(&fn)())
Definition: FortranInstance.h:20
gen::Pythia6Hadronizer::fDisplayPythiaCards
bool fDisplayPythiaCards
Definition: Pythia6Hadronizer.h:99
edm::ParameterSet
Definition: ParameterSet.h:36
gen::pystfr_
void pystfr_(int &)
gen::JetMatching::resetMatchingStatus
void resetMatchingStatus()
Definition: JetMatching.h:73
gen::pyjets_local
static struct gen::@662 pyjets_local
gen::FortranCallback::setLHERunInfo
void setLHERunInfo(lhef::LHERunInfo *lheri)
Definition: FortranCallback.h:20
gen::v
double v[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:74
gen::Pythia6Hadronizer::fImposeProperTime
bool fImposeProperTime
Definition: Pythia6Hadronizer.h:109
gen::pydecy_
void pydecy_(int &ip)
gen::call_pylist
void call_pylist(int mode)
Definition: ExhumeHadronizer.cc:63
gen::Pythia6Hadronizer::fMaxEventsToPrint
unsigned int fMaxEventsToPrint
Definition: Pythia6Hadronizer.h:93
gen::pystrhad_
void pystrhad_()
value
Definition: value.py:1
gen::Pythia6Hadronizer::ElectronPositron
Definition: Pythia6Hadronizer.h:82
gen::JetMatching::create
static std::unique_ptr< JetMatching > create(const edm::ParameterSet &params)
Definition: JetMatching.cc:32
gen::Pythia6Hadronizer::fPythiaListVerbosity
unsigned int fPythiaListVerbosity
Definition: Pythia6Hadronizer.h:97
get
#define get
gen::Pythia6Hadronizer::imposeProperTime
void imposeProperTime()
Definition: Pythia6Hadronizer.cc:831
gen::Pythia6Hadronizer::fBeam2PZ
double fBeam2PZ
Definition: Pythia6Hadronizer.h:88
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
gen::BaseHadronizer::event
std::unique_ptr< HepMC::GenEvent > & event()
Definition: BaseHadronizer.h:86
gen::Pythia6Hadronizer::fConvertToPDG
bool fConvertToPDG
Definition: Pythia6Hadronizer.h:112
gen::BaseHadronizer::BaseHadronizer
BaseHadronizer(edm::ParameterSet const &ps)
Definition: BaseHadronizer.cc:12
edm::SharedResourceNames::kPythia6
static const std::string kPythia6
Definition: SharedResourceNames.h:26
Exception
Definition: hltDiff.cc:246
gen::JetMatching::beforeHadronisation
virtual void beforeHadronisation(const lhef::LHEEvent *event)
Definition: JetMatching.cc:21
HEPEUP_::nup
int nup
Definition: LHECommonBlocks.h:21
gen::Pythia6Service::setSLHAFromHeader
void setSLHAFromHeader(const std::vector< std::string > &lines)
Definition: Pythia6Service.cc:324
pdg
Definition: pdg_functions.h:28
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
gen::Pythia6Hadronizer::PPbar
Definition: Pythia6Hadronizer.h:82
lhef::LHEEvent::count
void count(LHERunInfo::CountMode count, double weight=1.0, double matchWeight=1.0)
Definition: LHEEvent.cc:182
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
gen::Pythia6Hadronizer::fillTmpStorage
void fillTmpStorage()
Definition: Pythia6Hadronizer.cc:236
EgammaValidation_cff.pdgid
pdgid
Definition: EgammaValidation_cff.py:30
lhef::LHERunInfo::findHeader
std::vector< std::string > findHeader(const std::string &tag) const
Definition: LHERunInfo.cc:436
gen::JetMatching::init
virtual void init(const lhef::LHERunInfo *runInfo)
Definition: JetMatching.cc:19
crabWrapper.key
key
Definition: crabWrapper.py:19
gen::BaseHadronizer::runInfo
GenRunInfoProduct & runInfo()
Definition: BaseHadronizer.h:85
gen::call_pygive
bool call_pygive(const std::string &line)
Definition: ExhumeHadronizer.cc:64
edm::errors::Configuration
Definition: EDMException.h:36
class-composition.parent
parent
Definition: class-composition.py:88
pydat1
#define pydat1
Definition: ExhumeHadronizer.cc:37
gen::Pythia6Hadronizer::fDisplayPythiaBanner
bool fDisplayPythiaBanner
Definition: Pythia6Hadronizer.h:98