PYTHIA  8.317
HeavyIons.h
1 // HeavyIons.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2026 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 the definition of the HeavyIons class which
7 // Provides Pythia with infrastructure to combine several nucleon
8 // collisions into a single heavy ion collision event. This file also
9 // includes the definition of the Angantyr class which implements the
10 // default model for heavy ion collisions in Pythia.
11 
12 #ifndef Pythia8_HeavyIons_H
13 #define Pythia8_HeavyIons_H
14 
15 #include "Pythia8/HIInfo.h"
16 #include "Pythia8/PhysicsBase.h"
17 
18 namespace Pythia8 {
19 
20 // Forward declaration of the Pythia class.
21 class Pythia;
22 
23 //==========================================================================
24 
25 // HeavyIons contains several standard Pythia objects to allow for
26 // the combination of different kinds of nucleon-nucleon events into
27 // a heavy ion collision event. The actual model for doing this must
28 // be implemented in a subclass overriding the the virtual init()
29 // and next() methods.
30 
31 class HeavyIons : public PhysicsBase {
32 
33 public:
34 
35  // The constructor needs a reference to the main Pythia object to
36  // which it will belong. A HeavyIons object cannot belong to more
37  // than one main Pythia object.
38  HeavyIons(Pythia& mainPythiaIn)
39  : mainPythiaPtr(&mainPythiaIn), HIHooksPtr(0),
40  pythia(vector<Pythia*>(1, &mainPythiaIn)) {
41  }
42 
43  // Destructor.
44  virtual ~HeavyIons() {}
45 
46  // Virtual function to be implemented in a subclass. This will be
47  // called in the beginning of the Pythia::init function if the mode
48  // HeavyIon:mode is set non zero. The return value should be true
49  // if this object is able to handle the requested collision
50  // type. If false Pythia::init will set HeavyIon:mode to zero but
51  // will try to cope anyway.
52  virtual bool init() = 0;
53 
54  // Virtual function to be implemented in a subclass. This will be
55  // called in the beginning of the Pythia::next function if
56  // HeavyIon:mode is set non zero. After the call, Pythia::next will
57  // return immediately with the return value of this function.
58  virtual bool next() = 0;
59 
60  // Static function to allow Pythia to duplicate some setting names
61  // to be used for secondary Pythia objects.
62  static void addSpecialSettings(Settings& settings);
63 
64  // Clear SoftQCD flags for Pythia subobjects, but return processes
65  // explicitly turned off.
66  static set<int> clearSoftQCDFlags(Settings& settings);
67 
68  // Return true if the beams in the Primary Pythia object contains
69  // heavy ions.
70  static bool isHeavyIon(Settings& settings);
71 
72  // Possibility to pass in pointer for special heavy ion user hooks.
73  bool setHIUserHooksPtr(HIUserHooksPtr userHooksPtrIn) {
74  HIHooksPtr = userHooksPtrIn; return true;
75  }
76 
77  // Set beam kinematics.
78  virtual bool setKinematics(double /*eCMIn*/) {
79  loggerPtr->ERROR_MSG("method not implemented for this heavy ion model");
80  return false; }
81  virtual bool setKinematics(double /*eAIn*/, double /*eBIn*/) {
82  loggerPtr->ERROR_MSG("method not implemented for this heavy ion model");
83  return false; }
84  virtual bool setKinematics(double, double, double, double, double, double) {
85  loggerPtr->ERROR_MSG("method not implemented for this heavy ion model");
86  return false; }
87  virtual bool setKinematics(Vec4, Vec4) {
88  loggerPtr->ERROR_MSG("method not implemented for this heavy ion model");
89  return false; }
90 
91  // Set beam particles.
92  virtual bool setBeamIDs(int /*idAIn*/, int /*idBIn*/ = 0) {
93  loggerPtr->ERROR_MSG("method not implemented for this heavy ion model");
94  return false; }
95 
96  // The HIInfo object contains information about the last generated heavy
97  // ion event as well as overall statistics of the generated events.
99 
100  // Print out statistics.
101  virtual void stat();
102 
103 protected:
104 
105  // Report status of glauber calculation. Return 0 for none, 1 for
106  // total cross section only, and 2 for full calculation.
107  virtual int hasGlauberCalculation() const { return 0; }
108 
109  // Update the cross section in the main Pythia Info object using
110  // information in the hiInfo object.
111  void updateInfo();
112 
113  // If subclasses has additional Pythia objects for generating
114  // minimum bias nucleon collisions and the main Pythia object is
115  // set up to generated a hard signal process, this function can be
116  // used to clear all selected processes in a clone of the main
117  // Pythia object.
118  void clearProcessLevel(Pythia& pyt);
119 
120  // Duplicate setting on the form match: to settings on the form HImatch:
121  static void setupSpecials(Settings& settings, string match);
122 
123  // Copy settings on the form HImatch: to the corresponding match:
124  // in the given Pythia object.
125  static void setupSpecials(Pythia& p, string match);
126 
127  // Save current beam configuration.
128  int idProj, idTarg;
129 
130  // This is the pointer to the main Pythia object to which this
131  // object is assigned.
133 
134  // Object containing information on inclusive pp cross sections to
135  // be used in Glauber calculations in subclasses.
137 
138  // Optional HIUserHooks object able to modify the behavior of the
139  // HeavyIon model.
140  HIUserHooksPtr HIHooksPtr = {};
141 
142  // The internal Pythia objects. Index zero will always correspond
143  // to the mainPythiaPtr.
144  vector<Pythia *> pythia;
145 
146  // The names associated with the secondary pythia objects.
147  vector<string> pythiaNames;
148 
149  // The Info objects associated to the secondary Pythia objects.
150  vector<Info*> info;
151 
152  // Helper class to gain access to the Info object in a Pythia
153  // instance.
154  struct InfoGrabber : public UserHooks {
155 
156  // Only one function: return the info object.
158  return infoPtr;
159  }
160 
161  };
162 
163 };
164 
165 //==========================================================================
166 
167 // The default HeavyIon model in Pythia.
168 
169 class Angantyr : public HeavyIons {
170 
171 public:
172 
173  // Enumerate the different internal Pythia objects.
175  HADRON = 0, // For hadronization only.
176  MBIAS = 1, // Minimum Bias processed.
177  SASD = 2, // Single diffractive as one side of non-diffractive.
178  SIGPP = 3, // Optional object for signal processes (pp).
179  SIGPN = 4, // Optional object for signal processes (pn).
180  SIGNP = 5, // Optional object for signal processes (np).
181  SIGNN = 6, // Optional object for signal processes (nn).
182  ALL = 7 // Indicates all objects.
183  };
184 
185  // Convenient typedef for adding secondary sub-collisions.
186  typedef tuple<SubCollision::CollisionType, int,
188 
189 public:
190 
191  // The constructor needs a reference to the main Pythia object to
192  // which it will belong. A Angantyr object cannot belong to more
193  // than one main Pythia object.
194  Angantyr(Pythia& mainPythiaIn);
195 
196  virtual ~Angantyr();
197 
198  // Initialize Angantyr.
199  virtual bool init() override;
200 
201  // Produce a collision involving heavy ions.
202  virtual bool next() override;
203 
204  // Set UserHooks for specific (or ALL) internal Pythia objects.
205  bool setUserHooksPtr(PythiaObject sel, UserHooksPtr userHooksPtrIn);
206 
207  // Set beam kinematics.
208  bool setKinematicsCM();
209  bool setKinematics(double eCMIn) override;
210  bool setKinematics(double eAIn, double eBIn) override;
211  bool setKinematics(double, double, double, double, double, double) override;
212  bool setKinematics(Vec4, Vec4) override;
213  bool setKinematics();
214 
215  // Set beam IDs.
216  bool setBeamIDs(int idAIn, int idBIn = 0) override;
217 
218  // Make sure the correct information is available irrespective of frame type.
219  void unifyFrames();
220 
221  // Print the Angantyr banner.
222  void banner() const;
223 
224  // Subcollisions for the current event.
226  return subColls; }
227 
228  // Get the underlying subcollision model.
230  return *collPtr.get(); }
231 
232  SubCollisionModel* subCollPtr() {
233  return collPtr.get();
234  }
235 
236  // Get the underlying impact parameter generator.
238  return *bGenPtr.get(); }
239 
240  // Projectile nucleus configuration for the current event.
241  const Nucleus& projectile() const {
242  return proj; }
243 
244  // Target nucleus configuration for the current event.
245  const Nucleus& target() const {
246  return targ; }
247 
248  // The underlying projectile nucleus model.
249  const NucleusModel& projectileModel() const {
250  return *projPtr.get(); }
251 
252  // The underlying target nucleus model.
253  const NucleusModel& targetModel() const {
254  return *targPtr.get(); }
255 
256  // Hadronic cross sections used by the subcollision model.
257  const SigmaTotal & sigmaNN() const {
258  return sigTotNN; }
259 
260 protected:
261 
262  virtual void onInitInfoPtr() override {
264 
265  // Figure out what beams the user want.
266  void setBeamKinematics(int idA, int idB);
267 
268  // Initialize a specific Pythia object and optionally run a number.
269  // of events to get a handle of the cross section.
270  bool init(PythiaObject sel, string name, int n = 0);
271 
272  // Generate events from the internal Pythia objects;
273  EventInfo getSignal(const SubCollision& coll);
274  EventInfo getMBIAS(const SubCollision * coll, int procid);
275  EventInfo getSASD(const SubCollision * coll, int procid, EventInfo * evp);
276  EventInfo getSABS(const SubCollision * coll, int procid, EventInfo * evp);
277 
278  // Setup an EventInfo object from a Pythia instance.
279  EventInfo mkEventInfo(Pythia &, Info &, const SubCollision * coll = 0);
280  static bool streamline(EventInfo& ei);
281  bool fixIsoSpin(EventInfo& ei);
282  EventInfo& shiftEvent(EventInfo& ei);
283  static int getBeam(Event& ev, int i);
284  static int isRemnant(const EventInfo& ei, int i, int past = 1 ) {
285  if ( i < 3 ) return 0;
286  int statNow = ei.event[i].status()*past;
287  if ( statNow == 63 ) return ei.event[i].mother1();
288  if ( statNow/10 == 7 )
289  return isRemnant(ei, ei.event[i].mother1(), -1);
290  return false;
291  }
292 
293  // Special procedures for generating primary hard or ND events and
294  // secondary ones.
295  bool genAbs(SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
296  void addSASD(const SubCollisionSet& subCollsIn);
297 
298  // Setup sub-events.
299  bool setupFullCollision(EventInfo& ei, const SubCollision& coll,
300  Nucleon::Status projStatus, Nucleon::Status targStatus);
301  bool addSubCollisions(const SubCollisionSet& subCollsIn,
302  list<EventInfo>& subEventsIn,
303  vector<CollDesc> colldescs);
304  void addSecondaries(const SubCollisionSet& subCollsIn,
305  vector<CollDesc> colldescs);
306 
307  // Fix the final event.
308  void resetEvent();
309  bool buildEvent(list<EventInfo>& subEventsIn);
310 
311 
312  // Generate a single diffractive
313  bool nextSASD(int proc);
314 
315  // Add a diffractive event to an existing one. Optionally connect
316  // the colours of the added event to the original.
317  bool addNucleonExcitation(EventInfo& orig, EventInfo& add,
318  bool colConnect = false);
319  bool addNucleonExcitation2(EventInfo& orig, EventInfo& add,
320  bool colConnect = false);
321 
322  // Find the recoilers in the current event to conserve energy and
323  // momentum in addNucleonExcitation.
324  vector<int> findRecoilers(const Event& e, bool tside, int beam, int end,
325  const Vec4& pdiff, const Vec4& pbeam);
326 
327  // Add entries in the middle of the event record.
328  static void insertEntries(Event & e, int pos, int n);
329 
330  // Fix a non-diffractive event so that one side looks like an single
331  // diffractive event.
332  bool fixSecondaryAbsorptive(Event & ev, double xpom);
333 
334  // Add a sub-event to the final event record.
335  void addSubEvent(Event& evnt, Event& sub);
336  static void addJunctions(Event& evnt, Event& sub, int coloff);
337 
338  // Add a nucleus remnant to the given event. Possibly introducing
339  // a new particle type.
340  bool addNucleusRemnants();
341 
342  // Update the medium cross section overestimates for the cascade mode.
343  void updateMedium();
344 
345 public:
346 
347  // Helper function to construct two transformations that would give
348  // the vectors p1 and p2 the total four momentum of p1p + p2p.
349  static bool
350  getTransforms(Vec4 p1, Vec4 p2, const Vec4& p1p,
351  pair<RotBstMatrix,RotBstMatrix>& R12);
352  static double mT2(const Vec4& p) { return p.pPos()*p.pNeg(); }
353  static double mT(const Vec4& p) { return sqrt(max(mT2(p), 0.0)); }
354 
355 private:
356 
357  // Private UserHooks class to select a specific process and restrict
358  // emissions.
359  struct ProcessSelectorHook: public UserHooks {
360 
361  ProcessSelectorHook(): proc(0), b(-1.0) {}
362 
363  // Yes we can veto event after process-level selection.
364  virtual bool canVetoProcessLevel() {
365  return true;
366  }
367 
368  // Veto any unwanted process.
369  virtual bool doVetoProcessLevel(Event& process) {
370  failcount = 0;
371  if ( proc > 0 && infoPtr->code()%10 != proc%10 ) return true;
372 
373  // *** TODO *** This is a workaround for problems with
374  // diffractively excited bottom mesons.
375  if ( infoPtr->code() == 103 && process[1].idAbs() < 600 &&
376  process[1].idAbs() > 500 && process[3].status() == 15 &&
377  process[3].m() < process[1].m() + 1.0 + 0.4)
378  return true;
379  if ( infoPtr->code() == 105 && process[1].idAbs() < 600 &&
380  process[1].idAbs() > 500 && process[3].status() == 15 &&
381  process[3].m() < process[1].m() + 1.0 + 0.4)
382  return true;
383  return false;
384  }
385 
386  // Possibility to veto an emission in the ISR machinery.
387  virtual bool canVetoISREmission() { return true; }
388 
389  // Decide whether to veto current ISR emission or not, based on
390  // event record.
391  virtual bool doVetoISREmission( int oldsize, const Event& ev, int iSys) {
392  return xveto(4, ev, oldsize, iSys);
393  }
394 
395  // Possibility to veto an emission in the FSR machinery.
396  virtual bool canVetoFSREmission() { return true; }
397 
398  // Decide whether to veto current FSR emission or not, based on
399  // event record.
400  virtual bool doVetoFSREmission( int oldsize, const Event& ev,
401  int iSys, bool = false ) {
402  return xveto(5, ev, oldsize, iSys);
403  }
404 
405  // Possibility to veto an MPI.
406  virtual bool canVetoMPIEmission() { return true; }
407 
408  // Decide whether to veto an MPI based on event record.
409  virtual bool doVetoMPIEmission( int oldsize, const Event & ev) {
410  return xveto(3, ev, oldsize, -1);
411  }
412 
413  // Possibility to veto MPI evolution and kill event, making
414  // decision after fixed number of MPI steps.
415  virtual bool canVetoMPIStep() {return true;}
416 
417  // Up to how many MPI steps should be checked.
418  virtual int numberVetoMPIStep() {return 1;}
419 
420  // Decide whether to veto current event or not, based on event
421  // record.
422  virtual bool doVetoMPIStep( int istep, const Event& ev) {
423  return istep == 1? procveto(ev): giveUp;
424  }
425 
426  // Possibility to veto ISR + FSR evolution and kill event, making
427  // decision after fixed number of ISR and FSR steps.
428  virtual bool canVetoStep() {return true;}
429 
430  // Up to how many MPI steps should be checked.
431  virtual int numberVetoStep() {return 1000000;}
432 
433  // Check if we have already given up on this event.
434  virtual bool doVetoStep( int , int, int, const Event&) {
435  if ( giveUp ) infoPtr->setAbortPartonLevel(true);
436  return giveUp;
437  }
438 
439  // We must veto the before we get beam remnants.
440  virtual bool canVetoPartonLevelEarly() {
441  return true;
442  }
443 
444  // Check that how much valance flavour has been extracted. This is
445  // the final veto.
446  virtual bool doVetoPartonLevelEarly(const Event & event) {
447  return finalveto(event);
448  }
449 
450  // Can set the enhancement for the MPI treatment.
451  virtual bool canSetEnhanceB() const {
452  return olap >= 0.0;
453  }
454 
455  // Set the enhancement for the MPI treatment.
456  virtual double doSetEnhanceB() {
457  return olap;
458  }
459 
460  // Can set the overall impact parameter for the MPI treatment.
461  virtual bool canSetImpactParameter() const {
462  return b >= 0.0;
463  }
464 
465  // Set the overall impact parameter for the MPI treatment.
466  virtual double doSetImpactParameter() {
467  return b;
468  }
469 
470  // When generating non-diffractive events to get a secondary
471  // absorptive, figure out if an emission or a MPI should be
472  // vetoed.
473  bool xveto(int type, const Event & event, int oldsize, int iSys);
474 
475  // Check that we are generating the correct process.
476  bool procveto(const Event& ev);
477 
478  // Check that we are happy with the final parton level of this
479  // event.
480  bool finalveto(const Event& ev);
481 
482  bool checkVeto(bool ret) {
483  if ( ret ) {
484  ++failcount;
485  if ( failcount >= 100 ) {
486  giveUp = true;
487  }
488  } else
489  failcount = 0;
490  return ( giveUp? false: ret );
491  }
492 
493  // The wanted process;
494  int proc = 0;
495 
496  // The selected b-value.
497  double b = -1;
498 
499  // The selected b-value (scaled with average overlap).
500  double olap = 0;
501 
502  // The absolute value gives of the maximum energy allowed to be
503  // taken out from the nucleon. The sign indicates which side is
504  // affected.
505  double xmax = 0.0;
506 
507  // Handle initial state quarks.
508  int nAllowQuarkTries = 1;
509  int iAllowQuarkTries = 0;
510  bool hasQuark = false;
511  bool giveUp = false;
512  int failcount = 0;
513 
514  };
515 
516  // Holder class to temporarily select a specific process
517  struct HoldProcess {
518 
519  // Set the given process for the given hook object.
520  HoldProcess(shared_ptr<ProcessSelectorHook> hook, int proc,
521  double b = -1.0, double olap = -1.0, double xmax = 0.0)
522  : saveHook(hook), saveProc(hook->proc), saveB(hook->b),
523  saveOlap(hook->olap), saveXmax(hook->xmax) {
524  hook->proc = proc;
525  hook->b = b;
526  hook->olap = olap;
527  hook->xmax = xmax;
528  hook->iAllowQuarkTries = 0;
529  hook->hasQuark = hook->giveUp = false;
530  hook->failcount = 0;
531  }
532 
533  // Reset the process of the hook object given in the constructor.
534  ~HoldProcess() {
535  if ( saveHook ) {
536  saveHook->proc = saveProc;
537  saveHook->b = saveB;
538  saveHook->olap = saveOlap;
539  saveHook->xmax = saveXmax;
540  }
541  }
542 
543  // The hook object.
544  shared_ptr<ProcessSelectorHook> saveHook;
545 
546  // The previous process of the hook object.
547  int saveProc;
548 
549  // The previous b-value of the hook object.
550  double saveB;
551 
552  // The previous olap-value of the hook object.
553  double saveOlap;
554 
555  // The previous xpom value of the hook object.
556  double saveXmax;
557 
558  };
559 
560  // The process selector for standard minimum bias processes.
561  shared_ptr<ProcessSelectorHook> selectMB;
562 
563  // The process selector for the SASD object.
564  shared_ptr<ProcessSelectorHook> selectSASD;
565 
566  // Report status of glauber calculation. Return 0 for none, 1 for
567  // total cross section only, and 2 for full calculation.
568  virtual int hasGlauberCalculation() const override {
569  return doLowEnergyNow? 1: 2; }
570 
571 private:
572 
573  static const int MAXTRY = 999;
574  static const int MAXEVSAVE = 999;
575 
576  // Flag set if there is a specific signal process specified beyond
577  // minimum bias.
578  bool hasSignal = false;
579 
580  // If only certain SoftQCD processes has been specified, this only
581  // applies to the primary processes. Here is listed the ones that
582  // then will not be considered as primary.
583  set<int> vetoPrimaryProcess = {};
584 
585  // Whether to do hadronization and hadron level effects.
586  bool doHadronLevel = true;
587 
588  // Flag to determine whether to do single diffractive test.
589  bool doSDTest = false;
590 
591  // Flag to determine whether to do only Glauber modelling.
592  bool glauberOnly = false;
593 
594  // All subcollisions in current collision.
595  SubCollisionSet subColls;
596 
597  // The underlying SubCollisionModel for generating nucleon-nucleon
598  // subcollisions.
599  shared_ptr<SubCollisionModel> collPtr = {};
600 
601  // Additional SubCollisionModel for low-energy collisions.
602  shared_ptr<SubCollisionModel> lowEnergyCollPtr = {};
603 
604  // The impact parameter generator.
605  shared_ptr<ImpactParameterGenerator> bGenPtr = {};
606 
607  // The projectile and target nuclei in the current collision.
608  Nucleus proj;
609  Nucleus targ;
610 
611  // The underlying nucleus model for generating nucleons inside the
612  // projectile and target nucleus.
613  shared_ptr<NucleusModel> projPtr = {};
614  shared_ptr<NucleusModel> targPtr = {};
615 
616  // Flag to indicate whether variable energy is enabled.
617  bool doVarECM = false;
618 
619  // Flag to indicate if we are allowed to switch beams.
620  bool allowIDAswitch = false;
621 
622  // Flag to indicate that the low energy option enabled.
623  bool doLowEnergy = false;
624 
625  // Flag to indicate that the low energy option was selected for the
626  // next event.
627  bool doLowEnergyNow = false;
628 
629  // The energy below which we will use the LowEnergyQCD machinery.
630  double eCMlow = 20.0;
631 
632  // Different choices in choosing recoilers when adding
633  // diffractively excited nucleon.
634  int recoilerMode = 1;
635 
636  // Different choices for handling impact parameters.
637  int bMode = 0;
638 
639  // Different options for secondary absorptives.
640  int sabsMode = 4;
641 
642  // The slope in the diffractive mass used in generating secondary
643  // absorptive sub-collisions.
644  double sabsEps = 0.0;
645 
646  // The minimum diffractive mass used in generating secondary
647  // absorptive sub-collisions.
648  double sabsMinMX = 1.23;
649 
650  // The minimum diffractive mass used in generating secondary
651  // absorptive sub-collisions using non-diffractive events.
652  double sabsCutMX = 20.0;
653 
654  // Use Angantyr in a hadronic cascade.
655  bool cascadeMode = false;
656 
657  // The ion content in the medium where the hadronic cascade takes
658  // place.
659  vector<int> cascadeMediumIons = { 1000070140, 1000080160, 1000180400 };
660 
661  // Critical internal error, abort the event.
662  bool doAbort = false;
663 
664 };
665 
666 //==========================================================================
667 
668 } // end namespace Pythia8
669 
670 #endif // Pythia8_HeavyIons_H
virtual bool init()=0
virtual int numberVetoStep()
Up to how many ISR + FSR steps of hardest interaction should be checked.
Definition: UserHooks.h:100
const SubCollisionModel & subCollisionModel() const
Get the underlying subcollision model.
Definition: HeavyIons.h:229
const NucleusModel & targetModel() const
The underlying target nucleus model.
Definition: HeavyIons.h:253
virtual bool canVetoPartonLevelEarly()
Definition: UserHooks.h:120
const SubCollisionSet & subCollisions() const
Subcollisions for the current event.
Definition: HeavyIons.h:225
Definition: PhysicsBase.h:26
void registerSubObject(PhysicsBase &pb)
Register a sub object that should have its information in sync with this.
Definition: PhysicsBase.cc:57
HeavyIons(Pythia &mainPythiaIn)
Definition: HeavyIons.h:38
Definition: Info.h:45
virtual bool canSetEnhanceB() const
Can set the enhancement for the MPI treatment.
Definition: UserHooks.h:241
The Event class holds all info on the generated event.
Definition: Event.h:408
Definition: HINucleusModel.h:152
virtual int hasGlauberCalculation() const
Definition: HeavyIons.h:107
vector< Info * > info
The Info objects associated to the secondary Pythia objects.
Definition: HeavyIons.h:150
static bool isHeavyIon(Settings &settings)
Check the settings and return false of there are no heavy ion beams.
Definition: HeavyIons.cc:394
Definition: SigmaTotal.h:141
const NucleusModel & projectileModel() const
The underlying projectile nucleus model.
Definition: HeavyIons.h:249
static void setupSpecials(Settings &settings, string match)
Duplicate setting on the form match: to settings on the form HImatch:
Definition: HeavyIons.cc:41
static set< int > clearSoftQCDFlags(Settings &settings)
Definition: HeavyIons.cc:125
virtual bool doVetoMPIStep(int, const Event &)
Definition: UserHooks.h:116
virtual bool doVetoFSREmission(int, const Event &, int, bool=false)
Definition: UserHooks.h:164
Definition: HINucleusModel.h:198
virtual bool doVetoPartonLevelEarly(const Event &)
Definition: UserHooks.h:124
Definition: HISubCollisionModel.h:704
virtual int numberVetoMPIStep()
Up to how many MPI steps should be checked.
Definition: UserHooks.h:112
const Nucleus & target() const
Target nucleus configuration for the current event.
Definition: HeavyIons.h:245
void clearProcessLevel(Pythia &pyt)
Definition: HeavyIons.cc:208
The SubCollisionSet gives a set of subcollisions between two nuclei.
Definition: HISubCollisionModel.h:96
int idProj
Save current beam configuration.
Definition: HeavyIons.h:128
HIUserHooksPtr HIHooksPtr
Definition: HeavyIons.h:140
virtual ~HeavyIons()
Destructor.
Definition: HeavyIons.h:44
virtual bool canVetoISREmission()
Possibility to veto an emission in the ISR machinery.
Definition: UserHooks.h:147
Event event
The Event object.
Definition: HIBasics.h:33
virtual bool canVetoMPIEmission()
Possibility to veto an MPI.
Definition: UserHooks.h:168
virtual bool next()=0
const Nucleus & projectile() const
Projectile nucleus configuration for the current event.
Definition: HeavyIons.h:241
Definition: HISubCollisionModel.h:143
Definition: HeavyIons.h:154
virtual void onInitInfoPtr() override
Definition: HeavyIons.h:262
PythiaObject
Enumerate the different internal Pythia objects.
Definition: HeavyIons.h:174
vector< string > pythiaNames
The names associated with the secondary pythia objects.
Definition: HeavyIons.h:147
static void addSpecialSettings(Settings &settings)
The abstract HeavyIons class.
Definition: HeavyIons.cc:26
Pythia * mainPythiaPtr
Definition: HeavyIons.h:132
Definition: HISubCollisionModel.h:30
virtual bool canVetoProcessLevel()
Possibility to veto event after process-level selection.
Definition: UserHooks.h:60
virtual bool canSetImpactParameter() const
Can set the overall impact parameter for the MPI treatment.
Definition: UserHooks.h:235
virtual bool canVetoStep()
Definition: UserHooks.h:97
bool setHIUserHooksPtr(HIUserHooksPtr userHooksPtrIn)
Possibility to pass in pointer for special heavy ion user hooks.
Definition: HeavyIons.h:73
Info * getInfo()
Only one function: return the info object.
Definition: HeavyIons.h:157
Status
Enum for specifying the status of a nucleon.
Definition: HINucleusModel.h:33
Class for storing Events and Info objects.
Definition: HIBasics.h:25
Logger * loggerPtr
Pointer to logger.
Definition: PhysicsBase.h:91
virtual bool doVetoISREmission(int, const Event &, int)
Definition: UserHooks.h:153
CollisionType
This defines the type of a binary nucleon collision.
Definition: HISubCollisionModel.h:35
SigmaTotal sigTotNN
Definition: HeavyIons.h:136
virtual bool setKinematics(double)
Set beam kinematics.
Definition: HeavyIons.h:78
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
The Pythia class contains the top-level routines to generate an event.
Definition: Pythia.h:72
virtual bool doVetoMPIEmission(int, const Event &)
Definition: UserHooks.h:173
HIInfo hiInfo
Definition: HeavyIons.h:98
Info * infoPtr
Definition: PhysicsBase.h:82
void setAbortPartonLevel(bool abortIn)
Set abort in parton level.
Definition: Info.h:490
virtual bool setBeamIDs(int, int=0)
Set beam particles.
Definition: HeavyIons.h:92
UserHooks is base class for user access to program execution.
Definition: UserHooks.h:32
tuple< SubCollision::CollisionType, int, Nucleon::Status, Nucleon::Status > CollDesc
Convenient typedef for adding secondary sub-collisions.
Definition: HeavyIons.h:187
const SigmaTotal & sigmaNN() const
Hadronic cross sections used by the subcollision model.
Definition: HeavyIons.h:257
virtual bool canVetoFSREmission()
Possibility to veto an emission in the FSR machinery.
Definition: UserHooks.h:156
vector< Pythia * > pythia
Definition: HeavyIons.h:144
virtual bool doVetoProcessLevel(Event &)
Definition: UserHooks.h:64
virtual bool canVetoMPIStep()
Definition: UserHooks.h:109
virtual bool doVetoStep(int, int, int, const Event &)
Definition: UserHooks.h:105
Definition: HeavyIons.h:31
virtual void stat()
Print out statistics.
Definition: HeavyIons.cc:268
virtual double doSetEnhanceB()
Set the enhancement for the MPI treatment.
Definition: UserHooks.h:244
const ImpactParameterGenerator & impactParameterGenerator() const
Get the underlying impact parameter generator.
Definition: HeavyIons.h:237
void updateInfo()
Update the Info object in the main Pythia object.
Definition: HeavyIons.cc:237
Definition: Basics.h:32
The default HeavyIon model in Pythia.
Definition: HeavyIons.h:169
Definition: HIInfo.h:27
Definition: Settings.h:196
virtual double doSetImpactParameter()
Set the overall impact parameter for the MPI treatment.
Definition: UserHooks.h:238