|
PYTHIA
8.317
|
The default HeavyIon model in Pythia. More...
#include <HeavyIons.h>
Public Types | |
| enum | PythiaObject { HADRON = 0, MBIAS = 1, SASD = 2, SIGPP = 3, SIGPN = 4, SIGNP = 5, SIGNN = 6, ALL = 7 } |
| Enumerate the different internal Pythia objects. More... | |
| typedef tuple< SubCollision::CollisionType, int, Nucleon::Status, Nucleon::Status > | CollDesc |
| Convenient typedef for adding secondary sub-collisions. | |
Public Types inherited from PhysicsBase | |
| enum | Status { INCOMPLETE = -1, COMPLETE = 0, CONSTRUCTOR_FAILED, INIT_FAILED, LHEF_END, LOWENERGY_FAILED, PROCESSLEVEL_FAILED, PROCESSLEVEL_USERVETO, MERGING_FAILED, PARTONLEVEL_FAILED, PARTONLEVEL_USERVETO, HADRONLEVEL_FAILED, CHECK_FAILED, OTHER_UNPHYSICAL, HEAVYION_FAILED, HADRONLEVEL_USERVETO } |
| Enumerate the different status codes the event generation can have. | |
Public Member Functions | |
| Angantyr (Pythia &mainPythiaIn) | |
| Angantyr is the main HeavyIons model in Pythia. More... | |
| virtual | ~Angantyr () |
| virtual bool | init () override |
| Initialize Angantyr. More... | |
| virtual bool | next () override |
| Produce a collision involving heavy ions. More... | |
| bool | setUserHooksPtr (PythiaObject sel, UserHooksPtr userHooksPtrIn) |
| Set UserHooks for specific (or ALL) internal Pythia objects. More... | |
| bool | setKinematicsCM () |
| Set beam kinematics. | |
| bool | setKinematics (double eCMIn) override |
| Set beam kinematics. | |
| bool | setKinematics (double eAIn, double eBIn) override |
| bool | setKinematics (double, double, double, double, double, double) override |
| bool | setKinematics (Vec4, Vec4) override |
| bool | setKinematics () |
| Set beam kinematics. More... | |
| bool | setBeamIDs (int idAIn, int idBIn=0) override |
| Set beam IDs. More... | |
| void | unifyFrames () |
| Make sure the correct information is available irrespective of frame type. More... | |
| void | banner () const |
| Print the Angantyr banner. More... | |
| const SubCollisionSet & | subCollisions () const |
| Subcollisions for the current event. | |
| const SubCollisionModel & | subCollisionModel () const |
| Get the underlying subcollision model. | |
| SubCollisionModel * | subCollPtr () |
| const ImpactParameterGenerator & | impactParameterGenerator () const |
| Get the underlying impact parameter generator. | |
| const Nucleus & | projectile () const |
| Projectile nucleus configuration for the current event. | |
| const Nucleus & | target () const |
| Target nucleus configuration for the current event. | |
| const NucleusModel & | projectileModel () const |
| The underlying projectile nucleus model. | |
| const NucleusModel & | targetModel () const |
| The underlying target nucleus model. | |
| const SigmaTotal & | sigmaNN () const |
| Hadronic cross sections used by the subcollision model. | |
Public Member Functions inherited from HeavyIons | |
| HeavyIons (Pythia &mainPythiaIn) | |
| virtual | ~HeavyIons () |
| Destructor. | |
| bool | setHIUserHooksPtr (HIUserHooksPtr userHooksPtrIn) |
| Possibility to pass in pointer for special heavy ion user hooks. | |
| virtual void | stat () |
| Print out statistics. More... | |
Public Member Functions inherited from PhysicsBase | |
| void | initInfoPtr (Info &infoPtrIn) |
| This function is called from above for physics objects used in a run. More... | |
| virtual | ~PhysicsBase () |
| Empty virtual destructor. | |
| bool | flag (string key) const |
| Shorthand to read settings values. | |
| int | mode (string key) const |
| double | parm (string key) const |
| string | word (string key) const |
| vector< bool > | fvec (string key) const |
| vector< int > | mvec (string key) const |
| vector< double > | pvec (string key) const |
| vector< string > | wvec (string key) const |
Static Public Member Functions | |
| static bool | getTransforms (Vec4 p1, Vec4 p2, const Vec4 &p1p, pair< RotBstMatrix, RotBstMatrix > &R12) |
| static double | mT2 (const Vec4 &p) |
| static double | mT (const Vec4 &p) |
Static Public Member Functions inherited from HeavyIons | |
| static void | addSpecialSettings (Settings &settings) |
| The abstract HeavyIons class. More... | |
| static set< int > | clearSoftQCDFlags (Settings &settings) |
| static bool | isHeavyIon (Settings &settings) |
| Check the settings and return false of there are no heavy ion beams. More... | |
Protected Member Functions | |
| virtual void | onInitInfoPtr () override |
| void | setBeamKinematics (int idA, int idB) |
| Figure out what beams the user want. More... | |
| bool | init (PythiaObject sel, string name, int n=0) |
| EventInfo | getSignal (const SubCollision &coll) |
| Generate events from the internal Pythia objects;. More... | |
| EventInfo | getMBIAS (const SubCollision *coll, int procid) |
| EventInfo | getSASD (const SubCollision *coll, int procid, EventInfo *evp) |
| EventInfo | getSABS (const SubCollision *coll, int procid, EventInfo *evp) |
| EventInfo | mkEventInfo (Pythia &, Info &, const SubCollision *coll=0) |
| Setup an EventInfo object from a Pythia instance. More... | |
| bool | fixIsoSpin (EventInfo &ei) |
| EventInfo & | shiftEvent (EventInfo &ei) |
| bool | genAbs (SubCollisionSet &subCollsIn, list< EventInfo > &subEventsIn) |
| void | addSASD (const SubCollisionSet &subCollsIn) |
| Add secondary absorptive sub-collisions to the primary ones. More... | |
| bool | setupFullCollision (EventInfo &ei, const SubCollision &coll, Nucleon::Status projStatus, Nucleon::Status targStatus) |
| Setup sub-events. More... | |
| bool | addSubCollisions (const SubCollisionSet &subCollsIn, list< EventInfo > &subEventsIn, vector< CollDesc > colldescs) |
| Add primary sub-collisions, of the given types. More... | |
| void | addSecondaries (const SubCollisionSet &subCollsIn, vector< CollDesc > colldescs) |
| Add secondary sub-collisions of given types to primary ones. | |
| void | resetEvent () |
| Fix the final event. More... | |
| bool | buildEvent (list< EventInfo > &subEventsIn) |
| Take all sub-events and merge them together. More... | |
| bool | nextSASD (int proc) |
| Generate a single diffractive. More... | |
| bool | addNucleonExcitation (EventInfo &orig, EventInfo &add, bool colConnect=false) |
| Add a secondary sub-collision to a primary one. More... | |
| bool | addNucleonExcitation2 (EventInfo &orig, EventInfo &add, bool colConnect=false) |
| Add a secondary sub-collision to a primary one (new version). More... | |
| vector< int > | findRecoilers (const Event &e, bool tside, int beam, int end, const Vec4 &pdiff, const Vec4 &pbeam) |
| bool | fixSecondaryAbsorptive (Event &ev, double xpom) |
| void | addSubEvent (Event &evnt, Event &sub) |
| Add a sub-event to the final event record. More... | |
| bool | addNucleusRemnants () |
| void | updateMedium () |
| Update the medium cross section overestimates for the cascade mode. More... | |
Protected Member Functions inherited from HeavyIons | |
| void | updateInfo () |
| Update the Info object in the main Pythia object. More... | |
| void | clearProcessLevel (Pythia &pyt) |
Protected Member Functions inherited from PhysicsBase | |
| PhysicsBase () | |
| Default constructor. | |
| virtual void | onBeginEvent () |
| This function is called in the very beginning of each Pythia::next call. | |
| virtual void | onEndEvent (Status) |
| virtual void | onStat () |
| This function is called from the Pythia::stat() call. | |
| virtual void | onStat (vector< PhysicsBase * >, Pythia *) |
| void | registerSubObject (PhysicsBase &pb) |
| Register a sub object that should have its information in sync with this. | |
Static Protected Member Functions | |
| static bool | streamline (EventInfo &ei) |
| Parse a given sub-event and streamline it to be easier to handle. More... | |
| static int | getBeam (Event &ev, int i) |
| Trace a particle back to one of the beams in an event. | |
| static int | isRemnant (const EventInfo &ei, int i, int past=1) |
| static void | insertEntries (Event &e, int pos, int n) |
| Add entries in the middle of the event record. More... | |
| static void | addJunctions (Event &evnt, Event &sub, int coloff) |
Static Protected Member Functions inherited from HeavyIons | |
| static void | setupSpecials (Settings &settings, string match) |
| Duplicate setting on the form match: to settings on the form HImatch: More... | |
| static void | setupSpecials (Pythia &p, string match) |
Additional Inherited Members | |
Public Attributes inherited from HeavyIons | |
| HIInfo | hiInfo |
Protected Attributes inherited from HeavyIons | |
| int | idProj |
| Save current beam configuration. | |
| int | idTarg |
| Pythia * | mainPythiaPtr = {} |
| SigmaTotal | sigTotNN |
| HIUserHooksPtr | HIHooksPtr = {} |
| vector< Pythia * > | pythia |
| vector< string > | pythiaNames |
| The names associated with the secondary pythia objects. | |
| vector< Info * > | info |
| The Info objects associated to the secondary Pythia objects. | |
Protected Attributes inherited from PhysicsBase | |
| Info * | infoPtr = {} |
| Settings * | settingsPtr = {} |
| Pointer to the settings database. | |
| ParticleData * | particleDataPtr = {} |
| Pointer to the particle data table. | |
| Logger * | loggerPtr = {} |
| Pointer to logger. | |
| HadronWidths * | hadronWidthsPtr = {} |
| Pointer to the hadron widths data table. | |
| Rndm * | rndmPtr = {} |
| Pointer to the random number generator. | |
| CoupSM * | coupSMPtr = {} |
| Pointers to SM and SUSY couplings. | |
| CoupSUSY * | coupSUSYPtr = {} |
| BeamSetup * | beamSetupPtr = {} |
| BeamParticle * | beamAPtr = {} |
| BeamParticle * | beamBPtr = {} |
| BeamParticle * | beamPomAPtr = {} |
| BeamParticle * | beamPomBPtr = {} |
| BeamParticle * | beamGamAPtr = {} |
| BeamParticle * | beamGamBPtr = {} |
| BeamParticle * | beamVMDAPtr = {} |
| BeamParticle * | beamVMDBPtr = {} |
| PartonSystems * | partonSystemsPtr = {} |
| Pointer to information on subcollision parton locations. | |
| SigmaTotal * | sigmaTotPtr = {} |
| Pointers to the total/elastic/diffractive cross sections. | |
| SigmaCombined * | sigmaCmbPtr = {} |
| set< PhysicsBase * > | subObjects |
| UserHooksPtr | userHooksPtr |
| mutex * | mutexPtr |
| Mutex that should be locked for thread-unsafe code. | |
The default HeavyIon model in Pythia.
| enum PythiaObject |
Enumerate the different internal Pythia objects.
|
virtual |
Destructor deleting model objects that are not provided from the outside (via HIUserHooks).
Read out junctions one by one.
Add colour offsets to all three legs.
Append junction to summed event.
Add a secondary sub-collision to a primary one.
Add a diffractive event to an existing one. Optionally connect the colours of the added event to the original.
First get the projectile system to take recoil and their momentum.
Find the transform to the recoilers and the diffractive combined cms.
Transform the recoilers.
Copy the event and transform and offset the particles appropriately. Note that -203 is a special status code for identifying incoming particles in a sub-event.
Special handling of central diffraction.
Add energy to zeroth line and calculate new invariant mass.
Add offset to nonzero mother, daughter and colour indices.
Append particle to summed event.
Add a secondary sub-collision to a primary one (new version).
Find out which nucleon in the new sub-event that is to be added.
This is the beam to be added with its excited state.
This is the beam for which the remnants will receive a shift in momentum due to more energy is taken out to go into the new sub event.
Find the transform to the recoilers and the diffractive combined cms.
Just checking:
Copy and transform the recoilers.
Now we start copying over the relevant parts of the new First make room for the beams. Note that -203 is a special status code for identifying incoming particles in a sub-event.
Add energy to zeroth line and calculate new invariant mass.
Copy everyting else to the main event.
Append particle to summed event.
Now remove the elastically scattered old beam, and setup info about the new subevent in the main event.
|
protected |
Add a nucleus remnant to the given event. Possibly introducing a new particle type.
Construct nucleus remnants from all non-interacting nucleons and add them to the main event.
Get beam particle energies in rest frame.
(1) Sum up number of non-interacted nucleons in the projectile and target. Add them directly if they are not protons or neutrons.
If every single target and projectile nucleon has interacted, there are no nucleus remanants to add.
(2) Sum up the missing momentum: ptot = p_total - sum(p_final).
Collect candidate remnant entries.
Collect fallback particles with the largest p+/p- to be used in the basence of remnants.
(3) Decide whether projectile/target spectators form a nucleus remnants:
More than one nucleon: we need a composite remnant.
mAr = (npp + nnp)*bs.mA;
Only one spectator: Simply use p oe n.
If no nucleus remnants, use nucleon remnants for energy conservation.
More than one necleon: we need a composite remnant.
Only one spectator: Simply use p oe n.
If no nucleus remnants, use nucleon remnants energy conservation.
(4) Do the two body kinematics in the restframe of remnants to be added.
Fail if two-body knematics is not possible.
(5) Add new remnants (status 14) or boost existing ones. For the projectile,
and for the target.
Temporary check for energy-momentum inbalance.
Return successful.
|
protected |
Add secondary absorptive sub-collisions to the primary ones.
Collect absorptively wounded nucleons in secondary sub-collisions.
|
protected |
Add primary sub-collisions, of the given types.
Collect full single diffraction collisions.
Add a sub-event to the final event record.
Add sub-events together taking special care with the status of the incoming nucleons, and also handle the junctions correctly.
Add offset to nonzero mother, daughter and colour indices.
Incoming particle to a sub-event
Append particle to summed event.
|
protected |
Take all sub-events and merge them together.
Start with the signal event(s)
Make sure the events are not SoftQCD or LowEnergyQCD events.
Then all the others
Add statistics about participating nucleons and subcollisions.
Finally add all nucleon remnants.
|
protected |
Find the recoilers in the current event to conserve energy and momentum in addNucleonExcitation.
Find recoilers in a primary sub-collisions to conserve energy and momentum when adding a secondary one. Not actually used yet.
*** THINK! *** Is this the best way?
|
protected |
Minimum-bias sub-collisions are always generated as p-p events. We assume the generator is isospin invariant, and post–hoc flip the beam IDs and remnant quark content to emulate p-n, n-p, and n-n collisions.
Check if isospin needs fixing.
Try to find corresponding remnants that change flavour
Try to find any final state quark that we modify, preferably far in the beam direction. For projectile (beam 1), pick the most forward u-quark (largest y). For target (beam 2), pick the most backward u-quark (smallest y).
|
protected |
Fix a non-diffractive event so that one side looks like an single diffractive event.
Fix up a diffractive event with only one gluon extracted from one side to look lie an single diffractive event.
First decide by the sign of xpom which beam should be elastically scattered, and which should be diffractively excited (obeam).
We need to keep track of all flavours in the beam to be elastic.
First trace all colours in the final state and find the two remnants (quark and diquark (or antiquark in the case of a meson)). Also sum up all other momenta.
map from colour lines to the indices of the final state endpoints (note special code for junctions below).
particle index or encoded junction ref (<0)
List of all coloured and anticoloured remnants.
List of all remnant colours and anticolours of remnants.
Map colour lines to junction legs.
Here we collect the momentum of everything that is not the remnants to become an elastically scattered beam.
Make sure we find all beam flavours.
Save the colours and indices of the interesting remnants.
Sum momentum of everyting else.
Collect information of all colour lines.
Make sure we have found all flavours in the beam, and only remnats consistent with only having extracted gluons from the beam to be elastically scattered.
for ( int i = 0; i < 5; ++i ) cout << beamquarks[i];
We now only have one collered and one anti-coloured remnant.
Now go through all cases and make the remnants colour singlet. Optionally keep a gluon, taking some of the momentum.
Remnants in colour singlet - nothing to do. Currently this will never happen, but may be useful in the future.
Change the coloured remnat to a gluon to take some recoil.
Remnants connected to a single gluon, we need to connect that elsewhere. Insert in a dipole so that the (Ariadne definition of the) transverse momentum is as small as possible.
Both remnants connected to junctions won't work.
Remnants connecting to junction is tricky.
Should never happen.
Remnants connecting to junction is tricky.
Should never happen.
Remnants connected normally. We just need to reconnect one.
Now replace the remnants with a proton. Fix up the colours and momenta, and set up the event to be a single diffractive one. We calculate: the original summed remnant momentum,
the momentum of the pomeron to be inserted.
The momenum of the elastically scattered beam,
and the boost needed for all other particles to get energy-momentum conservarion.
Optionally we include a gluon so that the mass of the diffractive system corresponds to the exchange of a pomeron with energy fraction xpom.
Finally we manipulate the Event to make it look like a single diffractive excitation event.
|
protected |
Special procedures for generating primary hard or ND events and secondary ones.
Generate primary absorptive (non-diffractive) nucleon-nucleon sub-collisions.
The fully absorptive.
The partly absorptive.
The non-diffractive and signal events.
Select the primary absorptive sub collisions.
Count how many potential absorpitve collisions there are for each iso-spin combination.
*** THINK *** Is it ok to always pair the hardest events with the *** most central sub-collisions, or will this introduce a strange *** bias?
|
protected |
Which side is to be diffractively excited.
Get info about the sub collision
Get limits on the energy available for usage in the main event.
Draw xmax from a 1/x^e distribution with special procedure for e==0.
Only do the special non-diffractive event if xmax > xc, otherwise we do a standard single diffractive event (specified in procidIn).
Setup the selectMB UserHook temporarily (is reset again when "hold" is out of scope).
LowEnergyQCD (151) processes cannot be handled here. so try again until we get a SoftQCD one (101).
|
protected |
|
static |
Helper function to construct two transformations that would give the vectors p1 and p2 the total four momentum of p1p + p2p.
Calculate boosts to shuffle momenta when adding secondary sub-collisions.
|
overridevirtual |
Initialize Angantyr.
Initialise Angantyr. Called from within Pythia::init().
Read settings.
Fix settings to be used for subobjects.
Create Pythia subobjects.
Allow for user to override with a custom HIUserHooks.
Initialize kinematics and cross sections.
Initialize subobject for minimum bias processes.
Initialize semi-inclusive cross sections.
Set up nucleus geometry (projectile).
Set up nucleus geometry (target).
Set up subcollision model.
Set up impact parameter generator.
Initialize subobject for secondary absorptive processes.
Initialize subobject for hadronization.
Initialize subobjects for signal processes.
Implements HeavyIons.
|
protected |
|
staticprotected |
Add entries in the middle of the event record.
Insert n entries before pos in the event.
|
protected |
Setup an EventInfo object from a Pythia instance.
Create an EventInfo object connected to a SubCollision from the last event generated by the given PythiaObject.
|
overridevirtual |
Produce a collision involving heavy ions.
The main method called from Pythia::next().
If cascade mode we only get one try.
Generate impact parameter, nuclei, and sub-collisions.
Veto early if the primary sub-collision is unwanted.
Collect absorptively wounded nucleons in secondary sub-collisions.
Collect full low-energy annihilation collisions.
Collect full double diffraction collisions.
Collect full low-energy excitation collisions.
Collect full single diffraction collisions.
Collect secondary single diffractive sub-collisions.
Collect secondary single diffractive excitations as elastic if the excited one is already excited.
Collect full central diffraction collisions.
Collect full low-energy resonance collisions.
Collect secondary central diffractive sub-collisions. addCDsecond(subColls);
Collect full elastic collisions.
Collect secondary elastic sub-collisions.
After all sub-events have been collected, bunch them together.
Hadronise everything, if requested.
Finally, boost to the requested frame and optionally do vertex spreading.
Implements HeavyIons.
|
protected |
Generate a single diffractive.
Special function to generate secondary absorptive events as single diffraction. Called from Angantyr::next() and used for debugging and tuning purposes.
|
inlineoverrideprotectedvirtual |
If an object needs to set up infoPtr for sub objects, override this and call registerSubObject for each object in question.
Reimplemented from PhysicsBase.
|
protected |
Fix the final event.
Reset the main event.
|
overridevirtual |
Set beam IDs.
Switch to new beam particle identities.
Reset the statistics.
Set the projectile and target IDs.
Set the beam IDs in minimum bias.
Set masses and IDs.
Beam masses may have changed so we reset kinematics as well.
Calculate the total cross-section.
Update Subcollision and impact parameter handlers.
If cascade mode update cross sections for all nuclei in the medium.
Reimplemented from HeavyIons.
|
protected |
| bool setKinematics | ( | ) |
Set beam kinematics.
If cascade mode update cross sections for all nuclei in the medium.
|
protected |
Setup sub-events.
Prepare a primary sub-collision.
Note that -203 is a special status code for identifying incoming particles in a sub-event.
| bool setUserHooksPtr | ( | PythiaObject | sel, |
| UserHooksPtr | userHooksPtrIn | ||
| ) |
Set UserHooks for specific (or ALL) internal Pythia objects.
Add a HIUserHooks object to customise the Angantyr model.
Shift an event in impact parameter from the nucleon-nucleon sub-collision to the overall nucleus-nucleus frame. It is assumed that all partonic vertices are given in units of femtometers.
|
staticprotected |
Parse a given sub-event and streamline it to be easier to handle.
Function for sorting in pseudo rapidity.
Append a particle but modify its status and inheritance.
Convert an id into its diffractive counterpart. (eg. 2212 -> 9902210)
If we have low energy versions of minimum bias events, remove the hadrons produced in fragmentation, and massage mother/daughter links so that it looks more like the corresponing HardQCD event if possible.
Special case of too low energy.
Special case of too low energy strings, leave as it is and hope for the best.
Make the most forward incoming parton and outgoing remnant come from the first beam.
Special for central diffractive excitation.
Special for secondary absorptives.
Look through the event to find remnants to act as recoilers, if any. Also look for quasi-elastically scattered beam particles.
(quasi) elastically scattered nucleons are always also remnants.
| void unifyFrames | ( | ) |
Make sure the correct information is available irrespective of frame type.
If beam energy is set to less than the mass, it is assumed at rest.
|
protected |
Update the medium cross section overestimates for the cascade mode.
Update the medium cross section overestimates for Cascade mode.
1.8.11