PYTHIA  8.316
Info.h
1 // Info.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2025 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
5 
6 // This file contains classes that keep track of generic event info.
7 // Info: contains information on the generation process and errors.
8 // Info: user interface to make parts of Info publicly available.
9 
10 #ifndef Pythia8_Info_H
11 #define Pythia8_Info_H
12 
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/LHEF3.h"
15 #include "Pythia8/Logger.h"
16 #include "Pythia8/PythiaStdlib.h"
17 #include "Pythia8/SharedPointers.h"
18 #include "Pythia8/Weights.h"
19 
20 namespace Pythia8 {
21 
22 // Forward declaration of various classes.
23 class Settings;
24 class ParticleData;
25 class Rndm;
26 class BeamSetup;
27 class CoupSM;
28 class CoupSUSY;
29 class BeamParticle;
30 class PartonSystems;
31 class SigmaTotal;
32 class SigmaCombined;
33 class HadronWidths;
34 
35 // Forward declaration of HIInfo class.
36 class HIInfo;
37 
38 //==========================================================================
39 
40 // The Info class contains a mixed bag of information on the event
41 // generation activity, especially on the current subprocess properties,
42 // and on the number of errors encountered. This is used by the
43 // generation machinery.
44 
45 class Info {
46 
47 public:
48 
49  // Constructors.
50  Info() = default;
51  Info(bool) : Info() {}
52 
53  // Destructor for clean-up.
54  ~Info() {
55  if (hasOwnEventAttributes && eventAttributes != nullptr)
56  delete eventAttributes;
57  }
58 
59  // Assignment operator gives a shallow copy; no objects pointed to
60  // are copied.
61  Info & operator=(const Info &) = default;
62 
63  // Pointers to other class objects, carried piggyback by Info.
64 
65  // Set pointers to other class objects.
66  void setPtrs(Settings* settingsPtrIn, ParticleData* particleDataPtrIn,
67  Logger* loggerPtrIn, Rndm* rndmPtrIn, BeamSetup* beamSetupIn,
68  CoupSM* coupSMPtrIn, CoupSUSY* coupSUSYPtrIn,
69  PartonSystems* partonSystemsPtrIn, SigmaTotal* sigmaTotPtrIn,
70  SigmaCombined* sigmaCmbPtrIn, HadronWidths* hadronWidthsPtrIn,
71  WeightContainer* weightContainerPtrIn) {
72  settingsPtr = settingsPtrIn; particleDataPtr = particleDataPtrIn;
73  loggerPtr = loggerPtrIn; rndmPtr = rndmPtrIn; beamSetupPtr = beamSetupIn;
74  coupSMPtr = coupSMPtrIn; coupSUSYPtr = coupSUSYPtrIn;
75  partonSystemsPtr = partonSystemsPtrIn; sigmaTotPtr = sigmaTotPtrIn;
76  sigmaCmbPtr = sigmaCmbPtrIn; hadronWidthsPtr = hadronWidthsPtrIn;
77  weightContainerPtr = weightContainerPtrIn; }
78 
79  // Pointer to the settings database.
81 
82  // Pointer to the particle data table.
84 
85  // Pointer to the logger.
87 
88  // Pointer to the random number generator.
90 
91  // Pointers to beam configuration.
93 
94  // Pointers to Standard Model and Beyond SM couplings.
96  CoupSUSY* coupSUSYPtr{};
97 
98  // Pointer to information on subcollision parton locations.
100 
101  // Pointers to the total/elastic/diffractive cross sections.
103  SigmaCombined* sigmaCmbPtr{};
104 
105  // Pointer to the hadron widths data table.
107 
108  // Pointer to the UserHooks object set for the run.
109  UserHooksPtr userHooksPtr{};
110 
111  // Mutex that should be locked for thread-unsafe code.
112  mutex* mutexPtr{};
113 
114  // Pointer to information about a HeavyIons run and the current event.
115  // (Is nullptr if HeavyIons object is inactive.)
117 
118  WeightContainer* weightContainerPtr{};
119 
120  // Listing of most available information on current event.
121  void list() const;
122 
123  // Beam particles (in rest frame). CM energy of event.
124  int idA() const {return idASave;}
125  int idB() const {return idBSave;}
126  double pzA() const {return pzASave;}
127  double pzB() const {return pzBSave;}
128  double eA() const {return eASave;}
129  double eB() const {return eBSave;}
130  double mA() const {return mASave;}
131  double mB() const {return mBSave;}
132  double eCM() const {return eCMSave;}
133  double s() const {return sSave;}
134 
135  // Warnings from initialization.
136  bool tooLowPTmin() const {return lowPTmin;}
137 
138  // Process name and code, and the number of final-state particles.
139  string name() const {return nameSave;}
140  int code() const {return codeSave;}
141  int nFinal() const {return nFinalSave;}
142 
143  // Are beam particles resolved, with pdf's? Are they diffractive?
144  bool isResolved() const {return isRes;}
145  bool isDiffractiveA() const {return isDiffA;}
146  bool isDiffractiveB() const {return isDiffB;}
147  bool isDiffractiveC() const {return isDiffC;}
148  bool isNonDiffractive() const {return isND;}
149  bool isElastic() const {return (codeSave == 102);}
150  // Retained for backwards compatibility.
151  bool isMinBias() const {return isND;}
152 
153  // Information for Les Houches Accord and reading files.
154  bool isLHA() const {return isLH;}
155  bool atEndOfFile() const {return atEOF;}
156 
157  // For nondiffractive and Les Houches Accord identify hardest subprocess.
158  bool hasSub(int i = 0) const {return hasSubSave[i];}
159  string nameSub(int i = 0) const {return nameSubSave[i];}
160  int codeSub(int i = 0) const {return codeSubSave[i];}
161  int nFinalSub(int i = 0) const {return nFinalSubSave[i];}
162 
163  // Incoming parton flavours and x values.
164  int id1(int i = 0) const {return id1Save[i];}
165  int id2(int i = 0) const {return id2Save[i];}
166  double x1(int i = 0) const {return x1Save[i];}
167  double x2(int i = 0) const {return x2Save[i];}
168  double y(int i = 0) const {return 0.5 * log( x1Save[i] / x2Save[i]);}
169  double tau(int i = 0) const {return x1Save[i] * x2Save[i];}
170 
171  // Hard process flavours, x values, parton densities, couplings, Q2 scales.
172  int id1pdf(int i = 0) const {return id1pdfSave[i];}
173  int id2pdf(int i = 0) const {return id2pdfSave[i];}
174  double x1pdf(int i = 0) const {return x1pdfSave[i];}
175  double x2pdf(int i = 0) const {return x2pdfSave[i];}
176  double pdf1(int i = 0) const {return pdf1Save[i];}
177  double pdf2(int i = 0) const {return pdf2Save[i];}
178  double QFac(int i = 0) const {return sqrtpos(Q2FacSave[i]);}
179  double Q2Fac(int i = 0) const {return Q2FacSave[i];}
180  bool isValence1() const {return isVal1;}
181  bool isValence2() const {return isVal2;}
182  double alphaS(int i = 0) const {return alphaSSave[i];}
183  double alphaEM(int i = 0) const {return alphaEMSave[i];}
184  double QRen(int i = 0) const {return sqrtpos(Q2RenSave[i]);}
185  double Q2Ren(int i = 0) const {return Q2RenSave[i];}
186  double scalup(int i = 0) const {return scalupSave[i];}
187 
188  // DIS-specific kinematic variables.
189  double Q2DIS() const {return Q2DISSave;}
190  double WDIS() const {return WDISSave;}
191  double xDIS() const {return xDISSave;}
192  double yDIS() const {return yDISSave;}
193  bool isDIS() const {return isDISSave;}
194 
195  // Kinematics of photons from lepton beams.
196  double xGammaA() const {return x1GammaSave;}
197  double xGammaB() const {return x2GammaSave;}
198  double Q2GammaA() const {return Q2Gamma1Save;}
199  double Q2GammaB() const {return Q2Gamma2Save;}
200  double eCMsub() const {return eCMsubSave;}
201  double thetaScatLepA() const {return thetaLepton1;}
202  double thetaScatLepB() const {return thetaLepton2;}
203  double sHatNew() const {return sHatNewSave;}
204  int photonMode() const {return gammaModeEvent;}
205 
206  // Information on VMD state inside a photon.
207  bool isVMDstateA() const {return isVMDstateAEvent;}
208  bool isVMDstateB() const {return isVMDstateBEvent;}
209  int idVMDA() const {return idVMDASave;}
210  int idVMDB() const {return idVMDBSave;}
211  double mVMDA() const {return mVMDASave;}
212  double mVMDB() const {return mVMDBSave;}
213  double scaleVMDA() const {return scaleVMDASave;}
214  double scaleVMDB() const {return scaleVMDBSave;}
215 
216  // Mandelstam variables (notation as if subcollision).
217  double mHat(int i = 0) const {return sqrt(sH[i]);}
218  double sHat(int i = 0) const {return sH[i];}
219  double tHat(int i = 0) const {return tH[i];}
220  double uHat(int i = 0) const {return uH[i];}
221  double pTHat(int i = 0) const {return pTH[i];}
222  double pT2Hat(int i = 0) const {return pTH[i] * pTH[i];}
223  double m3Hat(int i = 0) const {return m3H[i];}
224  double m4Hat(int i = 0) const {return m4H[i];}
225  double thetaHat(int i = 0) const {return thetaH[i];}
226  double phiHat(int i = 0) const {return phiH[i];}
227 
228  // Weight of current event; normally 1, but used for Les Houches events
229  // or when reweighting phase space selection. Conversion from mb to pb
230  // for LHA strategy +-4. Uncertainty variations can be accessed by
231  // providing an index >= 1 (0 = no variations). Also cumulative sum.
232  double weight(int i = 0) const;
233  double weightSum() const;
234  double lhaStrategy() const {return lhaStrategySave;}
235 
236  // Further access to uncertainty weights: number and labels.
237  int nWeights() const {
238  return weightContainerPtr->weightsShowerPtr->getWeightsSize() +
239  weightContainerPtr->weightsFragmentation.getWeightsSize() - 1;}
240  string weightLabel(int iWgt) const;
241  int nWeightGroups() const {return weightContainerPtr->
242  weightsShowerPtr->nWeightGroups() + weightContainerPtr->
243  weightsFragmentation.nWeightGroups();}
244  string getGroupName(int iGN) const;
245  double getGroupWeight(int iGW) const;
246 
247  // Number of times other steps have been carried out.
248  int nISR() const {return nISRSave;}
249  int nFSRinProc() const {return nFSRinProcSave;}
250  int nFSRinRes() const {return nFSRinResSave;}
251 
252  // Maximum pT scales for MPI, ISR and FSR (in hard process).
253  double pTmaxMPI() const {return pTmaxMPISave;}
254  double pTmaxISR() const {return pTmaxISRSave;}
255  double pTmaxFSR() const {return pTmaxFSRSave;}
256 
257  // Current evolution scale (for UserHooks).
258  double pTnow() const {return pTnowSave;}
259 
260  // Impact parameter picture, global information
261  double a0MPI() const {return a0MPISave;}
262 
263  // Impact parameter picture, as set by hardest interaction.
264  double bMPI() const {return (bIsSet) ? bMPISave : 1.;}
265  double enhanceMPI() const {return (bIsSet) ? enhanceMPISave : 1.;}
266  double enhanceMPIavg() const {return (bIsSet) ? enhanceMPIavgSave : 1.;}
267  double eMPI(int i) const {return (bIsSet) ? eMPISave[i] : 1.;}
268  double bMPIold() const {return (bIsSet) ? bMPIoldSave : 1.;}
269  double enhanceMPIold() const {return (bIsSet) ? enhanceMPIoldSave : 1.;}
270  double enhanceMPIoldavg() const {return (bIsSet)
271  ? enhanceMPIoldavgSave : 1.;}
272 
273  // Number of multiparton interactions, with code and pT for them.
274  int nMPI() const {return nMPISave;}
275  int codeMPI(int i) const {return codeMPISave[i];}
276  double pTMPI(int i) const {return pTMPISave[i];}
277  int iAMPI(int i) const {return iAMPISave[i];}
278  int iBMPI(int i) const {return iBMPISave[i];}
279 
280  // Cross section estimate, optionally process by process.
281  vector<int> codesHard();
282 
283  // Name of the specified process.
284  string nameProc(int i = 0) const {
285  if (i == 0) return "sum";
286  auto itr = procNameM.find(i);
287  if (itr != procNameM.end()) return itr->second;
288  loggerPtr->ERROR_MSG("process code not found", to_string(i));
289  return "unknown process";}
290 
291  // The number of phase-space points tried.
292  long nTried(int i = 0) const {
293  if (i == 0) return nTry;
294  auto itr = nTryM.find(i);
295  if (itr != nTryM.end()) return itr->second;
296  loggerPtr->ERROR_MSG("process code not found", to_string(i));
297  return 0;}
298 
299  // The number of selected hard processes.
300  long nSelected(int i = 0) const {
301  if (i == 0) return nSel;
302  auto itr = nSelM.find(i);
303  if (itr != nSelM.end()) return itr->second;
304  loggerPtr->ERROR_MSG("process code not found", to_string(i));
305  return 0;}
306 
307  // The number of accepted events.
308  long nAccepted(int i = 0) const {
309  if (i == 0) return nAcc;
310  auto itr = nAccM.find(i);
311  if (itr != nAccM.end()) return itr->second;
312  loggerPtr->ERROR_MSG("process code not found", to_string(i));
313  return 0;}
314 
315  // The estimated cross-section in units of mb.
316  double sigmaGen(int i = 0) const {
317  if (i == 0) return sigGen;
318  auto itr = sigGenM.find(i);
319  if (itr != sigGenM.end()) return itr->second;
320  loggerPtr->ERROR_MSG("process code not found", to_string(i));
321  return 0;}
322 
323  // The uncertainty on the estimated cross-section in units of mb.
324  double sigmaErr(int i = 0) const {
325  if (i == 0) return sigErr;
326  auto itr = sigErrM.find(i);
327  if (itr != sigErrM.end()) return itr->second;
328  //loggerPtr->ERROR_MSG("process code not found", to_string(code));
329  return 0;}
330 
331  // Counters for number of loops in various places.
332  int getCounter( int i) const {return counters[i];}
333 
334  // Set or increase the value stored in a counter.
335  void setCounter( int i, int value = 0) {counters[i] = value;}
336  void addCounter( int i, int value = 1) {counters[i] += value;}
337 
338  // Set initialization warning flag when too low pTmin in ISR/FSR/MPI.
339  void setTooLowPTmin(bool lowPTminIn) {lowPTmin = lowPTminIn;}
340 
341  // Set info on valence character of hard collision partons.
342  void setValence( bool isVal1In, bool isVal2In) {isVal1 = isVal1In;
343  isVal2 = isVal2In;}
344 
345  // Set and get some MPI/ISR/FSR properties needed for matching,
346  // i.e. mainly of internal relevance.
347  void hasHistory( bool hasHistoryIn) {hasHistorySave = hasHistoryIn;}
348  bool hasHistory() {return hasHistorySave;}
349  void zNowISR( double zNowIn) {zNowISRSave = zNowIn;}
350  double zNowISR() {return zNowISRSave;}
351  void pT2NowISR( double pT2NowIn) {pT2NowISRSave = pT2NowIn;}
352  double pT2NowISR() {return pT2NowISRSave;}
353 
354  // Return merging weight.
355  double mergingWeight(int i=0) const {
356  return weightContainerPtr->weightsMerging.getWeightsValue(i);}
357 
358  // Return the complete NLO weight.
359  double mergingWeightNLO(int i=0) const {
360  return weightContainerPtr->weightsMerging.getWeightsValue(i); }
361 
362  // Return an LHEF header
363  string header(const string &key) const {
364  if (headers.find(key) == headers.end()) return "";
365  else return headers.at(key);
366  }
367 
368  // Return a list of all header key names
369  vector<string> headerKeys() const;
370 
371  // Return the number of processes in the LHEF.
372  int nProcessesLHEF() const { return int(sigmaLHEFSave.size());}
373  // Return the cross section information read from LHEF.
374  double sigmaLHEF(int iProcess) const { return sigmaLHEFSave[iProcess];}
375 
376  // LHEF3 information: Public for easy access.
378 
379  // Save process information as read from init block of LHEF.
380  vector<double> sigmaLHEFSave;
381 
382  // Contents of the LHAinitrwgt tag
384 
385  // Contents of the LHAgenerator tags.
386  vector<LHAgenerator > *generators{};
387 
388  // A map of the LHAweightgroup tags, indexed by name.
389  map<string,LHAweightgroup > *weightgroups{};
390 
391  // A map of the LHAweight tags, indexed by name.
392  map<string,LHAweight > *init_weights{};
393 
394  // Store current-event Les Houches event tags.
396  map<string, string > *eventAttributes{};
397 
398  // The weights associated with this event, as given by the LHAwgt tags
399  map<string,double > *weights_detailed{};
400 
401  // The weights associated with this event, as given by the LHAweights tags
402  vector<double > *weights_compressed{};
403 
404  // Contents of the LHAscales tag.
406 
407  // Contents of the LHAweights tag (compressed format)
409 
410  // Contents of the LHArwgt tag (detailed format)
412 
413  // Vectorized version of LHArwgt tag, for easy and ordered access.
414  vector<double> weights_detailed_vector;
415 
416  // Value of the unit event weight read from a Les Houches event, necessary
417  // if additional weights in an otherwise unweighted input file are in
418  // relation to this number.
419  double eventWeightLHEF = {};
420 
421  // Set the LHEF3 objects read from the init and header blocks.
422  void setLHEF3InitInfo();
423  void setLHEF3InitInfo( int LHEFversionIn, LHAinitrwgt *initrwgtIn,
424  vector<LHAgenerator> *generatorsIn,
425  map<string,LHAweightgroup> *weightgroupsIn,
426  map<string,LHAweight> *init_weightsIn, string headerBlockIn );
427  // Set the LHEF3 objects read from the event block.
428  void setLHEF3EventInfo();
429  void setLHEF3EventInfo( map<string, string> *eventAttributesIn,
430  map<string, double > *weights_detailedIn,
431  vector<double > *weights_compressedIn,
432  LHAscales *scalesIn, LHAweights *weightsIn,
433  LHArwgt *rwgtIn, vector<double> weights_detailed_vecIn,
434  vector<string> weights_detailed_name_vecIn,
435  string eventCommentsIn, double eventWeightLHEFIn );
436 
437  // Retrieve events tag information.
438  string getEventAttribute(string key, bool doRemoveWhitespace = false) const;
439 
440  // Externally set event tag auxiliary information.
441  void setEventAttribute(string key, string value, bool doOverwrite = true) {
442  if (eventAttributes == nullptr) {
443  eventAttributes = new map<string,string>();
444  hasOwnEventAttributes = true;
445  }
446  map<string, string>::iterator it = eventAttributes->find(key);
447  if ( it != eventAttributes->end() && !doOverwrite ) return;
448  if ( it != eventAttributes->end() ) eventAttributes->erase(it);
449  eventAttributes->insert(make_pair(key,value));
450  }
451 
452  // Retrieve LHEF version
453  int LHEFversion() const { return LHEFversionSave; }
454 
455  // Retrieve initrwgt tag information.
456  unsigned int getInitrwgtSize() const;
457 
458  // Retrieve generator tag information.
459  unsigned int getGeneratorSize() const;
460  string getGeneratorValue(unsigned int n = 0) const;
461  string getGeneratorAttribute( unsigned int n, string key,
462  bool doRemoveWhitespace = false) const;
463 
464  // Retrieve rwgt tag information.
465  unsigned int getWeightsDetailedSize() const;
466  double getWeightsDetailedValue(string n) const;
467  string getWeightsDetailedAttribute(string n, string key,
468  bool doRemoveWhitespace = false) const;
469 
470  // Retrieve weights tag information.
471  unsigned int getWeightsCompressedSize() const;
472  double getWeightsCompressedValue(unsigned int n) const;
473  string getWeightsCompressedAttribute(string key,
474  bool doRemoveWhitespace = false) const;
475 
476  // Retrieve scales tag information.
477  string getScalesValue(bool doRemoveWhitespace = false) const;
478  double getScalesAttribute(string key) const;
479 
480  // Retrieve complete header block and event comments
481  // Retrieve scales tag information.
482  string getHeaderBlock() const { return headerBlock;}
483  string getEventComments() const { return eventComments;}
484 
485  // Set LHEF headers
486  void setHeader(const string &key, const string &val)
487  { headers[key] = val; }
488 
489  // Set abort in parton level.
490  void setAbortPartonLevel(bool abortIn) {abortPartonLevel = abortIn;}
491  bool getAbortPartonLevel() const {return abortPartonLevel;}
492 
493  // Get information on hard diffractive events.
494  bool hasUnresolvedBeams() const {return hasUnresBeams;}
495  bool hasPomPsystem() const {return hasPomPsys;}
496  bool isHardDiffractive() const {return isHardDiffA || isHardDiffB;}
497  bool isHardDiffractiveA() const {return isHardDiffA;}
498  bool isHardDiffractiveB() const {return isHardDiffB;}
499  double xPomeronA() const {return xPomA;}
500  double xPomeronB() const {return xPomB;}
501  double tPomeronA() const {return tPomA;}
502  double tPomeronB() const {return tPomB;}
503 
504  // History information needed to setup the weak shower for 2 -> n.
505  vector<int> getWeakModes() const {return weakModes;}
506  vector<pair<int,int> > getWeakDipoles() const {return weakDipoles;}
507  vector<Vec4> getWeakMomenta() const {return weakMomenta;}
508  vector<int> getWeak2to2lines() const {return weak2to2lines;}
509  void setWeakModes(vector<int> weakModesIn) {weakModes = weakModesIn;}
510  void setWeakDipoles(vector<pair<int,int> > weakDipolesIn)
511  {weakDipoles = weakDipolesIn;}
512  void setWeakMomenta(vector<Vec4> weakMomentaIn)
513  {weakMomenta = weakMomentaIn;}
514  void setWeak2to2lines(vector<int> weak2to2linesIn)
515  {weak2to2lines = weak2to2linesIn;}
516 
517  // Check if onia is included in showers (used for MPI process setup).
518  void setOniumShower(bool oniumShowerIn) {oniumShower = oniumShowerIn;}
519  bool getOniumShower() const {return oniumShower;}
520 
521  // Check whether in initialization stage (init) or generating events (next).
522  void setInInit(bool inInitIn) {inInitSave = inInitIn;}
523  bool getInInit() const {return inInitSave;}
524 
525  // From here on what used to be the private part of the class.
526 
527  // Allow conversion from mb to pb.
528  static const double CONVERTMB2PB;
529 
530  // Store common beam quantities.
531  int idASave{}, idBSave{};
532  double pzASave{}, eASave{}, mASave{}, pzBSave{}, eBSave{}, mBSave{},
533  eCMSave{}, sSave{};
534 
535  // Store initialization information.
536  bool lowPTmin, inInitSave{};
537 
538  // Store common integrated cross section quantities.
539  long nTry{}, nSel{}, nAcc{};
540  double sigGen{}, sigErr{}, wtAccSum{};
541  map<int, string> procNameM;
542  map<int, long> nTryM, nSelM, nAccM;
543  map<int, double> sigGenM, sigErrM;
544  int lhaStrategySave{};
545 
546  // Store common MPI information.
547  double a0MPISave;
548 
549  // Store current-event quantities.
550  bool isRes{}, isDiffA{}, isDiffB{}, isDiffC{}, isND{}, isLH{},
551  hasSubSave[4], bIsSet{}, evolIsSet{}, atEOF{}, isVal1{}, isVal2{},
552  hasHistorySave{}, abortPartonLevel{}, isHardDiffA{}, isHardDiffB{},
553  hasUnresBeams{}, hasPomPsys{};
554  int codeSave{}, codeSubSave[4], nFinalSave{}, nFinalSubSave[4], nTotal{},
555  id1Save[4], id2Save[4], id1pdfSave[4], id2pdfSave[4], nMPISave{},
556  nISRSave{}, nFSRinProcSave{}, nFSRinResSave{};
557  double x1Save[4], x2Save[4], x1pdfSave[4], x2pdfSave[4], pdf1Save[4],
558  pdf2Save[4], Q2FacSave[4], alphaEMSave[4], alphaSSave[4],
559  Q2RenSave[4], scalupSave[4], sH[4], tH[4], uH[4], pTH[4], m3H[4],
560  m4H[4], thetaH[4], phiH[4], bMPISave{}, enhanceMPISave{},
561  enhanceMPIavgSave{}, bMPIoldSave{}, enhanceMPIoldSave{},
562  enhanceMPIoldavgSave{}, pTmaxMPISave{}, pTmaxISRSave{},
563  pTmaxFSRSave{}, pTnowSave{}, zNowISRSave{}, pT2NowISRSave{}, xPomA{},
564  xPomB{}, tPomA{}, tPomB{};
565  string nameSave{}, nameSubSave[4];
566  vector<int> codeMPISave, iAMPISave, iBMPISave;
567  vector<double> pTMPISave, eMPISave;
568 
569  // DIS-specific kinematic variables.
570  double Q2DISSave{}, WDISSave{}, xDISSave{}, yDISSave{};
571  bool isDISSave{};
572 
573  // Variables related to photon kinematics.
574  bool isVMDstateAEvent{}, isVMDstateBEvent{};
575  int gammaModeEvent{}, idVMDASave{}, idVMDBSave{};
576  double x1GammaSave{}, x2GammaSave{}, Q2Gamma1Save{}, Q2Gamma2Save{},
577  eCMsubSave{}, thetaLepton1{}, thetaLepton2{}, sHatNewSave{},
578  mVMDASave{}, mVMDBSave{}, scaleVMDASave{}, scaleVMDBSave{};
579 
580  // Vector of various loop counters.
581  int counters[50];
582 
583  // Map for LHEF headers.
584  map<string, string> headers;
585 
586  // Strings for complete header block and event comments.
587  string headerBlock{}, eventComments{};
588 
589  // Set info on the two incoming beams: only from Pythia class.
590  void setBeamIDs( int idAin, int idBin) { idASave = idAin; idBSave = idBin;}
591  void setBeamA( int idAin, double pzAin, double eAin, double mAin) {
592  idASave = idAin; pzASave = pzAin; eASave = eAin; mASave = mAin;}
593  void setBeamB( int idBin, double pzBin, double eBin, double mBin) {
594  idBSave = idBin; pzBSave = pzBin; eBSave = eBin; mBSave = mBin;}
595  void setECM( double eCMin) {eCMSave = eCMin; sSave = eCMSave * eCMSave;}
596 
597  // Set info on DIS-specific kinematic variables.
598  void setDISKinematics(double Q2In, double WIn, double xIn, double yIn) {
599  Q2DISSave = Q2In; WDISSave = WIn; xDISSave = xIn; yDISSave = yIn;
600  isDISSave = true;}
601  // Set info related to gamma+gamma subcollision.
602  void setX1Gamma( double x1GammaIn) { x1GammaSave = x1GammaIn; }
603  void setX2Gamma( double x2GammaIn) { x2GammaSave = x2GammaIn; }
604  void setQ2Gamma1( double Q2gammaIn) { Q2Gamma1Save = Q2gammaIn; }
605  void setQ2Gamma2( double Q2gammaIn) { Q2Gamma2Save = Q2gammaIn; }
606  void setTheta1( double theta1In) { thetaLepton1 = theta1In; }
607  void setTheta2( double theta2In) { thetaLepton2 = theta2In; }
608  void setECMsub( double eCMsubIn) { eCMsubSave = eCMsubIn; }
609  void setsHatNew( double sHatNewIn) { sHatNewSave = sHatNewIn; }
610  void setGammaMode( double gammaModeIn) { gammaModeEvent = gammaModeIn; }
611  // Set info on VMD state.
612  void setVMDstateA(bool isVMDAIn, int idAIn, double mAIn, double scaleAIn)
613  {isVMDstateAEvent = isVMDAIn; idVMDASave = idAIn; mVMDASave = mAIn;
614  scaleVMDASave = scaleAIn;}
615  void setVMDstateB(bool isVMDBIn, int idBIn, double mBIn, double scaleBIn)
616  {isVMDstateBEvent = isVMDBIn; idVMDBSave = idBIn; mVMDBSave = mBIn;
617  scaleVMDBSave = scaleBIn;}
618 
619  // Reset info for current event: only from Pythia class.
620  void clear() {
621  isRes = isDiffA = isDiffB = isDiffC = isND = isLH = bIsSet
622  = evolIsSet = atEOF = isVal1 = isVal2 = hasHistorySave
623  = isHardDiffA = isHardDiffB = hasUnresBeams = hasPomPsys = false;
624  codeSave = nFinalSave = nTotal = nMPISave = nISRSave = nFSRinProcSave
625  = nFSRinResSave = 0;
626  bMPISave = enhanceMPISave = enhanceMPIavgSave = bMPIoldSave
627  = enhanceMPIoldSave = enhanceMPIoldavgSave = 1.;
628  pTmaxMPISave = pTmaxISRSave = pTmaxFSRSave = pTnowSave = zNowISRSave
629  = pT2NowISRSave = 0.;
630  nameSave = " ";
631  for (int i = 0; i < 4; ++i) {
632  hasSubSave[i] = false;
633  codeSubSave[i] = nFinalSubSave[i] = id1pdfSave[i] = id2pdfSave[i]
634  = id1Save[i] = id2Save[i] = 0;
635  x1pdfSave[i] = x2pdfSave[i] = pdf1Save[i] = pdf2Save[i]
636  = Q2FacSave[i] = alphaEMSave[i] = alphaSSave[i] = Q2RenSave[i]
637  = scalupSave[i] = x1Save[i] = x2Save[i] = sH[i] = tH[i] = uH[i]
638  = pTH[i] = m3H[i] = m4H[i] = thetaH[i] = phiH[i] = 0.;
639  nameSubSave[i] = " ";
640  }
641  codeMPISave.resize(0); iAMPISave.resize(0); iBMPISave.resize(0);
642  pTMPISave.resize(0); eMPISave.resize(0); setHardDiff();
643  weightContainerPtr->clear();
644  }
645 
646  // Reset info arrays only for parton and hadron level.
647  int sizeMPIarrays() const { return codeMPISave.size(); }
648  void resizeMPIarrays(int newSize) { codeMPISave.resize(newSize);
649  iAMPISave.resize(newSize); iBMPISave.resize(newSize);
650  pTMPISave.resize(newSize); eMPISave.resize(newSize); }
651 
652  // Set info on the (sub)process: from ProcessLevel, ProcessContainer or
653  // MultipartonInteractions classes.
654  void setType( string nameIn, int codeIn, int nFinalIn,
655  bool isNonDiffIn = false, bool isResolvedIn = true,
656  bool isDiffractiveAin = false, bool isDiffractiveBin = false,
657  bool isDiffractiveCin = false, bool isLHAin = false) {
658  nameSave = nameIn; codeSave = codeIn; nFinalSave = nFinalIn;
659  isND = isNonDiffIn; isRes = isResolvedIn; isDiffA = isDiffractiveAin;
660  isDiffB = isDiffractiveBin; isDiffC = isDiffractiveCin; isLH = isLHAin;
661  nTotal = 2 + nFinalSave; bIsSet = false; hasSubSave[0] = false;
662  nameSubSave[0] = " "; codeSubSave[0] = 0; nFinalSubSave[0] = 0;
663  evolIsSet = false;}
664  void setSubType( int iDS, string nameSubIn, int codeSubIn,
665  int nFinalSubIn) { hasSubSave[iDS] = true; nameSubSave[iDS] = nameSubIn;
666  codeSubSave[iDS] = codeSubIn; nFinalSubSave[iDS] = nFinalSubIn;}
667  void setPDFalpha( int iDS, int id1pdfIn, int id2pdfIn, double x1pdfIn,
668  double x2pdfIn, double pdf1In, double pdf2In, double Q2FacIn,
669  double alphaEMIn, double alphaSIn, double Q2RenIn, double scalupIn) {
670  id1pdfSave[iDS] = id1pdfIn; id2pdfSave[iDS] = id2pdfIn;
671  x1pdfSave[iDS] = x1pdfIn; x2pdfSave[iDS] = x2pdfIn;
672  pdf1Save[iDS] = pdf1In; pdf2Save[iDS] = pdf2In; Q2FacSave[iDS] = Q2FacIn;
673  alphaEMSave[iDS] = alphaEMIn; alphaSSave[iDS] = alphaSIn;
674  Q2RenSave[iDS] = Q2RenIn; scalupSave[iDS] = scalupIn;}
675  void setScalup( int iDS, double scalupIn) {scalupSave[iDS] = scalupIn;}
676  void setKin( int iDS, int id1In, int id2In, double x1In, double x2In,
677  double sHatIn, double tHatIn, double uHatIn, double pTHatIn,
678  double m3HatIn, double m4HatIn, double thetaHatIn, double phiHatIn) {
679  id1Save[iDS] = id1In; id2Save[iDS] = id2In; x1Save[iDS] = x1In;
680  x2Save[iDS] = x2In; sH[iDS] = sHatIn; tH[iDS] = tHatIn;
681  uH[iDS] = uHatIn; pTH[iDS] = pTHatIn; m3H[iDS] = m3HatIn;
682  m4H[iDS] = m4HatIn; thetaH[iDS] = thetaHatIn; phiH[iDS] = phiHatIn;}
683  void setTypeMPI( int codeMPIIn, double pTMPIIn, int iAMPIIn = 0,
684  int iBMPIIn = 0, double eMPIIn = 1.) {codeMPISave.push_back(codeMPIIn);
685  pTMPISave.push_back(pTMPIIn); iAMPISave.push_back(iAMPIIn);
686  iBMPISave.push_back(iBMPIIn); eMPISave.push_back(eMPIIn); }
687 
688  // Set info on cross section: from ProcessLevel (reset in Pythia).
689  void sigmaReset() { nTry = nSel = nAcc = 0; sigGen = sigErr = wtAccSum = 0.;
690  procNameM.clear(); nTryM.clear(); nSelM.clear(); nAccM.clear();
691  sigGenM.clear(); sigErrM.clear();}
692  void setSigma( int i, string procNameIn, long nTryIn, long nSelIn,
693  long nAccIn, double sigGenIn, double sigErrIn, double wtAccSumIn) {
694  if (i == 0) {nTry = nTryIn; nSel = nSelIn; nAcc = nAccIn;
695  sigGen = sigGenIn; sigErr = sigErrIn; wtAccSum = wtAccSumIn;}
696  else {procNameM[i] = procNameIn; nTryM[i] = nTryIn; nSelM[i] = nSelIn;
697  nAccM[i] = nAccIn; sigGenM[i] = sigGenIn; sigErrM[i] = sigErrIn;} }
698  void addSigma( int i, long nTryIn, long nSelIn, long nAccIn, double sigGenIn,
699  double sigErrIn) { nTryM[i] += nTryIn; nSelM[i] += nSelIn;
700  nAccM[i] += nAccIn; sigGenM[i] += sigGenIn;
701  sigErrM[i] = sqrtpos(sigErrM[i]*sigErrM[i] + sigErrIn*sigErrIn); }
702 
703  // Set info on impact parameter: from PartonLevel.
704  void setImpact( double bMPIIn, double enhanceMPIIn, double enhanceMPIavgIn,
705  bool bIsSetIn = true, bool pushBack = false) {
706  if (pushBack) {bMPIoldSave = bMPISave; enhanceMPIoldSave = enhanceMPISave;
707  enhanceMPIoldavgSave = enhanceMPIavgSave;}
708  bMPISave = bMPIIn; enhanceMPISave = eMPISave[0] = enhanceMPIIn,
709  enhanceMPIavgSave = enhanceMPIavgIn, bIsSet = bIsSetIn;}
710 
711  // Set info on pTmax scales and number of evolution steps: from PartonLevel.
712  void setPartEvolved( int nMPIIn, int nISRIn) {
713  nMPISave = nMPIIn; nISRSave = nISRIn;}
714  void setEvolution( double pTmaxMPIIn, double pTmaxISRIn, double pTmaxFSRIn,
715  int nMPIIn, int nISRIn, int nFSRinProcIn, int nFSRinResIn) {
716  pTmaxMPISave = pTmaxMPIIn; pTmaxISRSave = pTmaxISRIn;
717  pTmaxFSRSave = pTmaxFSRIn; nMPISave = nMPIIn; nISRSave = nISRIn;
718  nFSRinProcSave = nFSRinProcIn; nFSRinResSave = nFSRinResIn;
719  evolIsSet = true;}
720 
721  // Set current pT evolution scale for MPI/ISR/FSR; from PartonLevel.
722  void setPTnow( double pTnowIn) {pTnowSave = pTnowIn;}
723 
724  // Set a0 from MultipartonInteractions.
725  void seta0MPI(double a0MPIin) {a0MPISave = a0MPIin;}
726 
727  // Set info whether reading of Les Houches Accord file at end.
728  void setEndOfFile( bool atEOFin) {atEOF = atEOFin;}
729 
730  // Set event weight, either for LHEF3 or for uncertainty bands. If weight
731  // has units (lhaStrategy 4 or -4), input in mb
732  void setWeight( double weightIn, int lhaStrategyIn) {
733  for (int i = 0; i < nWeights(); ++i)
734  weightContainerPtr->weightsShowerPtr->setValueByIndex(i,1.);
735  // Nominal weight in weightContainer saved in pb for lhaStrategy +-4
736  weightContainerPtr->setWeightNominal(
737  abs(lhaStrategyIn) == 4 ? CONVERTMB2PB*weightIn : weightIn);
738  lhaStrategySave = lhaStrategyIn;}
739  //
740  // Set info on resolved processes.
741  void setIsResolved(bool isResIn) {isRes = isResIn;}
742 
743  // Set info on hard diffraction.
744  void setHardDiff(bool hasUnresBeamsIn = false, bool hasPomPsysIn = false,
745  bool isHardDiffAIn = false, bool isHardDiffBIn = false,
746  double xPomAIn = 0., double xPomBIn = 0., double tPomAIn = 0.,
747  double tPomBIn = 0.) { hasUnresBeams = hasUnresBeamsIn;
748  hasPomPsys = hasPomPsysIn; isHardDiffA = isHardDiffAIn;
749  isHardDiffB = isHardDiffBIn;
750  xPomA = xPomAIn; xPomB = xPomBIn;
751  tPomA = tPomAIn; tPomB = tPomBIn;}
752 
753  // Move process information to an another diffractive system.
754  void reassignDiffSystem(int iDSold, int iDSnew);
755 
756  // Set information in hard diffractive events.
757  void setHasUnresolvedBeams(bool hasUnresBeamsIn)
758  {hasUnresBeams = hasUnresBeamsIn;}
759  void setHasPomPsystem(bool hasPomPsysIn) {hasPomPsys = hasPomPsysIn;}
760 
761  // Variables for weak and onia shower setup.
762  vector<int> weakModes, weak2to2lines;
763  vector<Vec4> weakMomenta;
764  vector<pair<int, int> > weakDipoles;
765  bool oniumShower{false};
766 
767  int numberOfWeights() const {
768  return weightContainerPtr->numberOfWeights(); }
769  double weightValueByIndex(int key=0) const {
770  return weightContainerPtr->weightValueByIndex(key); }
771  string weightNameByIndex(int key=0) const {
772  return weightContainerPtr->weightNameByIndex(key); }
773  vector<double> weightValueVector() const {
774  return weightContainerPtr->weightValueVector(); }
775  vector<string> weightNameVector() const {
776  return weightContainerPtr->weightNameVector(); }
777 
778  // The random state is saved before the generation of an event
779  // starts. To be used for debugging purposes.
781  void dumpRandomState(string fileName="EventRandomState.dat") const;
782  void readRandomState(string fileName="EventRandomState.dat") const;
783 
784  // Special variables for (below-threshold) toponium production.
785  double toponiumE, toponiumm3, toponiumm4;
786 
787 };
788 
789 //==========================================================================
790 
791 } // end namespace Pythia8
792 
793 #endif // Pythia8_Info_H
Info()=default
Constructors.
SigmaTotal * sigmaTotPtr
Pointers to the total/elastic/diffractive cross sections.
Definition: Info.h:102
void list() const
Listing of most available information on current event.
Definition: Info.cc:32
string name() const
Process name and code, and the number of final-state particles.
Definition: Info.h:139
void setPartEvolved(int nMPIIn, int nISRIn)
Set info on pTmax scales and number of evolution steps: from PartonLevel.
Definition: Info.h:712
BeamSetup * beamSetupPtr
Pointers to beam configuration.
Definition: Info.h:92
Rndm * rndmPtr
Pointer to the random number generator.
Definition: Info.h:89
bool hasUnresolvedBeams() const
Get information on hard diffractive events.
Definition: Info.h:494
double Q2DISSave
DIS-specific kinematic variables.
Definition: Info.h:570
UserHooksPtr userHooksPtr
Pointer to the UserHooks object set for the run.
Definition: Info.h:109
bool isVMDstateAEvent
Variables related to photon kinematics.
Definition: Info.h:574
string getScalesValue(bool doRemoveWhitespace=false) const
Retrieve scales tag information.
Definition: Info.cc:423
Definition: Info.h:45
double bMPI() const
Impact parameter picture, as set by hardest interaction.
Definition: Info.h:264
Definition: BeamSetup.h:33
bool hasOwnEventAttributes
Store current-event Les Houches event tags.
Definition: Info.h:395
void seta0MPI(double a0MPIin)
Set a0 from MultipartonInteractions.
Definition: Info.h:725
mutex * mutexPtr
Mutex that should be locked for thread-unsafe code.
Definition: Info.h:112
Definition: Weights.h:433
WeightsFragmentation weightsFragmentation
Fragmentation weights.
Definition: Weights.h:460
Logger * loggerPtr
Pointer to the logger.
Definition: Info.h:86
Definition: SigmaLowEnergy.h:135
vector< double > * weights_compressed
The weights associated with this event, as given by the LHAweights tags.
Definition: Info.h:402
double pTnow() const
Current evolution scale (for UserHooks).
Definition: Info.h:258
double pTmaxMPI() const
Maximum pT scales for MPI, ISR and FSR (in hard process).
Definition: Info.h:253
int counters[50]
Vector of various loop counters.
Definition: Info.h:581
Info & operator=(const Info &)=default
int idASave
Store common beam quantities.
Definition: Info.h:531
void setCounter(int i, int value=0)
Set or increase the value stored in a counter.
Definition: Info.h:335
CoupSM * coupSMPtr
Pointers to Standard Model and Beyond SM couplings.
Definition: Info.h:95
Definition: SigmaTotal.h:141
int nMPI() const
Number of multiparton interactions, with code and pT for them.
Definition: Info.h:274
vector< double > weights_detailed_vector
Vectorized version of LHArwgt tag, for easy and ordered access.
Definition: Info.h:414
bool isVMDstateA() const
Information on VMD state inside a photon.
Definition: Info.h:207
double mergingWeightNLO(int i=0) const
Return the complete NLO weight.
Definition: Info.h:359
map< string, string > headers
Map for LHEF headers.
Definition: Info.h:584
vector< int > codesHard()
Cross section estimate, optionally process by process.
Definition: Info.cc:212
double getWeightsValue(int iPos) const override
Modified weight getter to include first order weight.
Definition: Weights.h:258
void dumpRandomState(string fileName="EventRandomState.dat") const
Definition: Info.cc:489
double mHat(int i=0) const
Mandelstam variables (notation as if subcollision).
Definition: Info.h:217
LHAweights * weights
Contents of the LHAweights tag (compressed format)
Definition: Info.h:408
long nAccepted(int i=0) const
The number of accepted events.
Definition: Info.h:308
double sigmaErr(int i=0) const
The uncertainty on the estimated cross-section in units of mb.
Definition: Info.h:324
void reassignDiffSystem(int iDSold, int iDSnew)
Move process information to an another diffractive system.
Definition: Info.cc:453
Collect different scales relevant for an event.
Definition: LHEF3.h:281
map< string, double > * weights_detailed
The weights associated with this event, as given by the LHAwgt tags.
Definition: Info.h:399
The LHAweights struct represents the information in a weights tag.
Definition: LHEF3.h:245
Definition: Logger.h:23
string header(const string &key) const
Return an LHEF header.
Definition: Info.h:363
vector< LHAgenerator > * generators
Contents of the LHAgenerator tags.
Definition: Info.h:386
unsigned int getGeneratorSize() const
Retrieve generator tag information.
Definition: Info.cc:331
unsigned int getInitrwgtSize() const
Retrieve initrwgt tag information.
Definition: Info.cc:322
int id1pdf(int i=0) const
Hard process flavours, x values, parton densities, couplings, Q2 scales.
Definition: Info.h:172
bool hasSub(int i=0) const
For nondiffractive and Les Houches Accord identify hardest subprocess.
Definition: Info.h:158
void setWeight(double weightIn, int lhaStrategyIn)
Definition: Info.h:732
int LHEFversion() const
Retrieve LHEF version.
Definition: Info.h:453
The LHArwgt assigns a group-name to a set of LHAwgt objects.
Definition: LHEF3.h:473
void setOniumShower(bool oniumShowerIn)
Check if onia is included in showers (used for MPI process setup).
Definition: Info.h:518
long nSelected(int i=0) const
The number of selected hard processes.
Definition: Info.h:300
The LHAinitrwgt assigns a group-name to a set of LHAweightgroup objects.
Definition: LHEF3.h:511
RndmState currentEventRndmState
Definition: Info.h:780
void setEventAttribute(string key, string value, bool doOverwrite=true)
Externally set event tag auxiliary information.
Definition: Info.h:441
unsigned int getWeightsDetailedSize() const
Retrieve rwgt tag information.
Definition: Info.cc:362
int id1(int i=0) const
Incoming parton flavours and x values.
Definition: Info.h:164
LHAscales * scales
Contents of the LHAscales tag.
Definition: Info.h:405
Definition: Basics.h:388
bool isLHA() const
Information for Les Houches Accord and reading files.
Definition: Info.h:154
double a0MPI() const
Impact parameter picture, global information.
Definition: Info.h:261
void setVMDstateA(bool isVMDAIn, int idAIn, double mAIn, double scaleAIn)
Set info on VMD state.
Definition: Info.h:612
double mergingWeight(int i=0) const
Return merging weight.
Definition: Info.h:355
void setLHEF3EventInfo()
Set the LHEF3 objects read from the event block.
Definition: Info.cc:266
void setEndOfFile(bool atEOFin)
Set info whether reading of Les Houches Accord file at end.
Definition: Info.h:728
int nISR() const
Number of times other steps have been carried out.
Definition: Info.h:248
double a0MPISave
Store common MPI information.
Definition: Info.h:547
void setBeamIDs(int idAin, int idBin)
Set info on the two incoming beams: only from Pythia class.
Definition: Info.h:590
void setHasUnresolvedBeams(bool hasUnresBeamsIn)
Set information in hard diffractive events.
Definition: Info.h:757
long nTried(int i=0) const
The number of phase-space points tried.
Definition: Info.h:292
int numberOfWeights()
Functions to retrieve information stored in the subcategory members.
Definition: Weights.cc:985
HIInfo * hiInfo
Definition: Info.h:116
Definition: HadronWidths.h:22
void setWeightNominal(double weightNow)
The WeightContainer class.
Definition: Weights.cc:966
void clear()
Reset info for current event: only from Pythia class.
Definition: Info.h:620
double xGammaA() const
Kinematics of photons from lepton beams.
Definition: Info.h:196
string headerBlock
Strings for complete header block and event comments.
Definition: Info.h:587
void hasHistory(bool hasHistoryIn)
Definition: Info.h:347
map< string, LHAweight > * init_weights
A map of the LHAweight tags, indexed by name.
Definition: Info.h:392
double toponiumE
Special variables for (below-threshold) toponium production.
Definition: Info.h:785
map< string, LHAweightgroup > * weightgroups
A map of the LHAweightgroup tags, indexed by name.
Definition: Info.h:389
vector< string > weightNameVector()
Definition: Weights.cc:1029
vector< int > getWeakModes() const
History information needed to setup the weak shower for 2 -> n.
Definition: Info.h:505
bool lowPTmin
Store initialization information.
Definition: Info.h:536
void setHardDiff(bool hasUnresBeamsIn=false, bool hasPomPsysIn=false, bool isHardDiffAIn=false, bool isHardDiffBIn=false, double xPomAIn=0., double xPomBIn=0., double tPomAIn=0., double tPomBIn=0.)
Set info on hard diffraction.
Definition: Info.h:744
vector< string > headerKeys() const
Return a list of all header key names.
Definition: Info.cc:224
~Info()
Destructor for clean-up.
Definition: Info.h:54
void setValueByIndex(int iPos, double val)
Functions to set values of weights.
Definition: Weights.h:96
int nProcessesLHEF() const
Return the number of processes in the LHEF.
Definition: Info.h:372
double sigmaGen(int i=0) const
The estimated cross-section in units of mb.
Definition: Info.h:316
Definition: StandardModel.h:142
void setX1Gamma(double x1GammaIn)
Set info related to gamma+gamma subcollision.
Definition: Info.h:602
unsigned int getWeightsCompressedSize() const
Retrieve weights tag information.
Definition: Info.cc:394
void clear()
Reset all members to default stage.
Definition: Weights.cc:1053
bool isRes
Store current-event quantities.
Definition: Info.h:550
void setValence(bool isVal1In, bool isVal2In)
Set info on valence character of hard collision partons.
Definition: Info.h:342
long nTry
Store common integrated cross section quantities.
Definition: Info.h:539
int nWeights() const
Further access to uncertainty weights: number and labels.
Definition: Info.h:237
double sigmaLHEF(int iProcess) const
Return the cross section information read from LHEF.
Definition: Info.h:374
bool isResolved() const
Are beam particles resolved, with pdf&#39;s? Are they diffractive?
Definition: Info.h:144
vector< int > weakModes
Variables for weak and onia shower setup.
Definition: Info.h:762
ParticleData * particleDataPtr
Pointer to the particle data table.
Definition: Info.h:83
PartonSystems * partonSystemsPtr
Pointer to information on subcollision parton locations.
Definition: Info.h:99
void setIsResolved(bool isResIn)
Set info on resolved processes.
Definition: Info.h:741
string getHeaderBlock() const
Definition: Info.h:482
double eventWeightLHEF
Definition: Info.h:419
Definition: Basics.h:373
void setDISKinematics(double Q2In, double WIn, double xIn, double yIn)
Set info on DIS-specific kinematic variables.
Definition: Info.h:598
LHArwgt * rwgt
Contents of the LHArwgt tag (detailed format)
Definition: Info.h:411
HadronWidths * hadronWidthsPtr
Pointer to the hadron widths data table.
Definition: Info.h:106
void setImpact(double bMPIIn, double enhanceMPIIn, double enhanceMPIavgIn, bool bIsSetIn=true, bool pushBack=false)
Set info on impact parameter: from PartonLevel.
Definition: Info.h:704
static const double CONVERTMB2PB
From here on what used to be the private part of the class.
Definition: Info.h:528
void setInInit(bool inInitIn)
Check whether in initialization stage (init) or generating events (next).
Definition: Info.h:522
The PartonSystems class describes the whole set of subcollisions.
Definition: PartonSystems.h:42
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
void setTooLowPTmin(bool lowPTminIn)
Set initialization warning flag when too low pTmin in ISR/FSR/MPI.
Definition: Info.h:339
double Q2DIS() const
DIS-specific kinematic variables.
Definition: Info.h:189
LHAinitrwgt * initrwgt
Contents of the LHAinitrwgt tag.
Definition: Info.h:383
void setAbortPartonLevel(bool abortIn)
Set abort in parton level.
Definition: Info.h:490
vector< double > weightValueVector()
Definition: Weights.cc:1002
bool isMinBias() const
Retained for backwards compatibility.
Definition: Info.h:151
WeightsMerging weightsMerging
Merging weights.
Definition: Weights.h:457
void sigmaReset()
Set info on cross section: from ProcessLevel (reset in Pythia).
Definition: Info.h:689
void setPTnow(double pTnowIn)
Set current pT evolution scale for MPI/ISR/FSR; from PartonLevel.
Definition: Info.h:722
void setPtrs(Settings *settingsPtrIn, ParticleData *particleDataPtrIn, Logger *loggerPtrIn, Rndm *rndmPtrIn, BeamSetup *beamSetupIn, CoupSM *coupSMPtrIn, CoupSUSY *coupSUSYPtrIn, PartonSystems *partonSystemsPtrIn, SigmaTotal *sigmaTotPtrIn, SigmaCombined *sigmaCmbPtrIn, HadronWidths *hadronWidthsPtrIn, WeightContainer *weightContainerPtrIn)
Pointers to other class objects, carried piggyback by Info.
Definition: Info.h:66
string getEventAttribute(string key, bool doRemoveWhitespace=false) const
Retrieve events tag information.
Definition: Info.cc:307
string nameProc(int i=0) const
Name of the specified process.
Definition: Info.h:284
int sizeMPIarrays() const
Reset info arrays only for parton and hadron level.
Definition: Info.h:647
bool tooLowPTmin() const
Warnings from initialization.
Definition: Info.h:136
vector< double > sigmaLHEFSave
Save process information as read from init block of LHEF.
Definition: Info.h:380
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:423
void setLHEF3InitInfo()
Set the LHEF3 objects read from the init and header blocks.
Definition: Info.cc:235
int getCounter(int i) const
Counters for number of loops in various places.
Definition: Info.h:332
Settings * settingsPtr
Pointer to the settings database.
Definition: Info.h:80
WeightsShower * weightsShowerPtr
Definition: Weights.h:453
void setHeader(const string &key, const string &val)
Set LHEF headers.
Definition: Info.h:486
int LHEFversionSave
LHEF3 information: Public for easy access.
Definition: Info.h:377
Definition: HIInfo.h:27
void setType(string nameIn, int codeIn, int nFinalIn, bool isNonDiffIn=false, bool isResolvedIn=true, bool isDiffractiveAin=false, bool isDiffractiveBin=false, bool isDiffractiveCin=false, bool isLHAin=false)
Definition: Info.h:654
Definition: SusyCouplings.h:27
double weight(int i=0) const
Event weights and accumulated weight.
Definition: Info.cc:162
Definition: Settings.h:196
double sqrtpos(const double &x)
Avoid problem with negative square root argument (from roundoff).
Definition: PythiaStdlib.h:182
int idA() const
Beam particles (in rest frame). CM energy of event.
Definition: Info.h:124