PYTHIA  8.303
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
Angantyr Class Reference

The default HeavyIon model in Pythia. More...

#include <HeavyIons.h>

Inheritance diagram for Angantyr:
HeavyIons PhysicsBase

Classes

class  Redirect
 internal class to redirect stdout More...
 

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...
 
- 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
}
 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...
 
vector< Nucleon >::iterator projBegin ()
 Iterate over nucleons.
 
vector< Nucleon >::iterator targBegin ()
 
vector< Nucleon >::iterator projEnd ()
 
vector< Nucleon >::iterator targEnd ()
 
- 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
 

Static Public Member Functions

static bool getTransforms (Vec4 p1, Vec4 p2, const Vec4 &p1p, pair< RotBstMatrix, RotBstMatrix > &R12, int, int)
 
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 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
 
bool init (PythiaObject sel, string name, int n=0)
 
EventInfo mkEventInfo (Pythia &, Info &, const SubCollision *coll=0)
 Setup an EventInfo object from a Pythia instance. More...
 
EventInfo getSignal (const SubCollision &coll)
 Generate events from the internal Pythia oblects;. More...
 
EventInfo getND ()
 
EventInfo getND (const SubCollision &coll)
 
EventInfo getEl (const SubCollision &coll)
 
EventInfo getSDP (const SubCollision &coll)
 
EventInfo getSDT (const SubCollision &coll)
 
EventInfo getDD (const SubCollision &coll)
 
EventInfo getCD (const SubCollision &coll)
 
EventInfo getSDabsP (const SubCollision &coll)
 
EventInfo getSDabsT (const SubCollision &coll)
 
EventInfo getMBIAS (const SubCollision *coll, int procid)
 
EventInfo getSASD (const SubCollision *coll, int procid)
 
bool genAbs (const multiset< SubCollision > &coll, list< EventInfo > &subevents)
 
void addSASD (const multiset< SubCollision > &coll)
 Add secondary absorptive sub-collisions to the primary ones. More...
 
bool addDD (const multiset< SubCollision > &coll, list< EventInfo > &subevents)
 Add primary double diffraction sub-collisions. More...
 
bool addSD (const multiset< SubCollision > &coll, list< EventInfo > &subevents)
 Add primary single diffraction sub-collisions. More...
 
void addSDsecond (const multiset< SubCollision > &coll)
 
bool addCD (const multiset< SubCollision > &coll, list< EventInfo > &subevents)
 Add all primary central diffraction sub-colliions. More...
 
void addCDsecond (const multiset< SubCollision > &coll)
 
bool addEL (const multiset< SubCollision > &coll, list< EventInfo > &subevents)
 Add all primary elastic sub-colliions. More...
 
void addELsecond (const multiset< SubCollision > &coll)
 Add all secondary elastic sub-colliions to primary ones. More...
 
bool buildEvent (list< EventInfo > &subevents, const vector< Nucleon > &proj, const vector< Nucleon > &targ)
 Take all sub-events and merge them together. More...
 
bool setupFullCollision (EventInfo &ei, const SubCollision &coll, Nucleon::Status ptype, Nucleon::Status ttype)
 Prepare a primary sub-collision.
 
bool isRemnant (const EventInfo &ei, int i, int past=1) const
 
bool fixIsoSpin (EventInfo &ei)
 
EventInfoshiftEvent (EventInfo &ei)
 
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...
 
vector< int > findRecoilers (const Event &e, bool tside, int beam, int end, const Vec4 &pdiff, const Vec4 &pbeam)
 
void addSubEvent (Event &evnt, Event &sub)
 Add a sub-event to the final event record. More...
 
bool addNucleusRemnants (const vector< Nucleon > &proj, const vector< Nucleon > &targ)
 
- Protected Member Functions inherited from HeavyIons
void sumUpMessages (Info &in, string tag, const Info *other)
 Sum up info from all used Pythia objects. More...
 
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.
 
void registerSubObject (PhysicsBase &pb)
 Register a sub object that should have its information in sync with this.
 

Static Protected Member Functions

static int getBeam (Event &ev, int i)
 Trace a particle back to one of the beams in an event.
 
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:
 
static void setupSpecials (Pythia &p, string match)
 

Additional Inherited Members

- Public Attributes inherited from HeavyIons
HIInfo hiInfo
 
- Protected Attributes inherited from HeavyIons
PythiamainPythiaPtr
 
SigmaTotal sigtot
 
HIUserHooksPtr HIHooksPtr
 
vector< Pythia * > pythia
 
vector< string > pythiaNames
 The names associated with the secondary pythia objects.
 
vector< Info * > info
 
- Protected Attributes inherited from PhysicsBase
InfoinfoPtr = {}
 
SettingssettingsPtr = {}
 Pointer to the settings database.
 
ParticleDataparticleDataPtr = {}
 Pointer to the particle data table.
 
HadronWidthshadronWidthsPtr = {}
 Pointer to the hadron widths data table.
 
RndmrndmPtr = {}
 Pointer to the random number generator.
 
CoupSMcoupSMPtr = {}
 Pointers to SM and SUSY couplings.
 
CoupSUSYcoupSUSYPtr = {}
 
BeamParticlebeamAPtr = {}
 
BeamParticlebeamBPtr = {}
 
BeamParticlebeamPomAPtr = {}
 
BeamParticlebeamPomBPtr = {}
 
BeamParticlebeamGamAPtr = {}
 
BeamParticlebeamGamBPtr = {}
 
BeamParticlebeamVMDAPtr = {}
 
BeamParticlebeamVMDBPtr = {}
 
PartonSystemspartonSystemsPtr = {}
 Pointer to information on subcollision parton locations.
 
SigmaTotalsigmaTotPtr = {}
 Pointer to the total/elastic/diffractive cross sections.
 
set< PhysicsBase * > subObjects
 
UserHooksPtr userHooksPtr
 

Detailed Description

The default HeavyIon model in Pythia.

Member Enumeration Documentation

Enumerate the different internal Pythia objects.

Enumerator
HADRON 

For hadronization only.

MBIAS 

Minimum Bias processed.

SASD 

Single diffractive as one side of non-diffractive.

SIGPP 

Optional object for signal processes (pp).

SIGPN 

Optional object for signal processes (pn).

SIGNP 

Optional object for signal processes (np).

SIGNN 

Optional object for signal processes (nn).

ALL 

Indicates all objects.

Constructor & Destructor Documentation

Angantyr ( Pythia mainPythiaIn)

Angantyr is the main HeavyIons model in Pythia.

The constructor needs a reference to the main Pythia object to which it will belong. A Angantyr object cannot belong to more than one main Pythia object.

Constructor.

~Angantyr ( )
virtual

Destructor deleting model objects that are not provided from the outside (via HIUserHooks).

Member Function Documentation

bool addCD ( const multiset< SubCollision > &  coll,
list< EventInfo > &  subevents 
)
protected

Add all primary central diffraction sub-colliions.

Collect full central diffraction collisions.

void addCDsecond ( const multiset< SubCollision > &  coll)
protected

Add all secondary central diffraction sub-colliions to primary ones.

Collect secondary central diffractive sub-collisions.

bool addDD ( const multiset< SubCollision > &  coll,
list< EventInfo > &  subevents 
)
protected

Add primary double diffraction sub-collisions.

Collect full double diffraction collisions.

bool addEL ( const multiset< SubCollision > &  coll,
list< EventInfo > &  subevents 
)
protected

Add all primary elastic sub-colliions.

Collect full elastic collisions.

void addELsecond ( const multiset< SubCollision > &  coll)
protected

Add all secondary elastic sub-colliions to primary ones.

Collect secondary elastic sub-collisions.

void addJunctions ( Event evnt,
Event sub,
int  coloff 
)
staticprotected

Read out junctions one by one.

Add colour offsets to all three legs.

Append junction to summed event.

bool addNucleonExcitation ( EventInfo orig,
EventInfo add,
bool  colConnect = false 
)
protected

Add a secondary sub-collision to a primary one.

Add a diffractive event to an exsisting 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 ransform to the recoilers and the diffractive combined cms

Transform the recoilers.

Copy the event and transform and offset the particles appropriately.

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.

bool addNucleusRemnants ( const vector< Nucleon > &  proj,
const vector< Nucleon > &  targ 
)
protected

Add a nucleus remnant to the given event. Possibly introducing a new particle type.

Construct nucleus remnants fron all non-interacting nucleons and add them to the main event.

void addSASD ( const multiset< SubCollision > &  coll)
protected

Add secondary absorptive sub-collisions to the primary ones.

Collect absorptively wounded nucleons in secondary sub-collisions.

bool addSD ( const multiset< SubCollision > &  coll,
list< EventInfo > &  subevents 
)
protected

Add primary single diffraction sub-collisions.

Collect full single diffraction collisions.

void addSDsecond ( const multiset< SubCollision > &  coll)
protected

Add all secondary single diffractive sub-collisions to primary ones.

Collect secondary single diffractive sub-collisions.

void addSubEvent ( Event evnt,
Event sub 
)
protected

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.

Append particle to summed event.

bool buildEvent ( list< EventInfo > &  subevents,
const vector< Nucleon > &  proj,
const vector< Nucleon > &  targ 
)
protected

Take all sub-events and merge them together.

Start with the signal event(s)

Then all the others

Finally add all nucleon remnants.

vector< int > findRecoilers ( const Event e,
bool  tside,
int  beam,
int  end,
const Vec4 pdiff,
const Vec4 pbeam 
)
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.

cout << "--- find recoilers ----" << endl; cout << setw(10) << setprecision(4) << log(pdiff.pPos()) << setw(10) << pdiff.rap() << " diffractive system" << pdiff;

cout << setw(10) << setprecision(4) << it->first*dir << " failed " << (pz2 < 0.0? -sqrt(-pz2): sqrt(pz2)) << endl;

cout << setw(10) << setprecision(4) << it->first*dir << " accept " << sqrt(pz2) << " (" << sqrt(S) << ")" << test;

cout << "--- found recoilers ---" << endl;

*** THINK! *** Is this the best way?

bool fixIsoSpin ( EventInfo ei)
protected

Minimum-bias sub-collisions are always generated as p-p events, and it is assumed to be safe to be assumed that they are iso-spin invariant so we can just modify the quark contet in the remnants to get 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.

bool genAbs ( const multiset< SubCollision > &  coll,
list< EventInfo > &  subevents 
)
protected

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?

EventInfo getSignal ( const SubCollision coll)
protected

Generate events from the internal Pythia oblects;.

Generate events and return EventInfo objects for different process types.

bool getTransforms ( Vec4  prec,
Vec4  pdiff,
const Vec4 pbeam,
pair< RotBstMatrix, RotBstMatrix > &  R12,
int  code1,
int  code2 
)
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.

static ofstream os("testhi.out"); os << "=== " << code1 << "+" << code2 << " ===" << endl; os << prec << pbeam << pdiff;

os << "=>" << endl << pr1 << pb1 << pd1;

os << "*** failed to rotate ***" << endl;

os << "=>" << endl << pr2 << pd1;

os << "*** failed to boost ***" << endl;

os << "*** failed to boost ***" << endl;

os << "=>" << endl << pr3 << pd3;

os << "=>" << endl << pr4 << pd4 << pr4 + pd4 << prec + pbeam;

os << prec << pdiff;

bool init ( )
overridevirtual

Initialize Angantyr.

Initialise Angantyr. Called from within Pythia::init().

Implements HeavyIons.

bool init ( PythiaObject  sel,
string  name,
int  n = 0 
)
protected

Initiaize a specific Pythia object and optionally run a number of events to get a handle of the cross section.

EventInfo mkEventInfo ( Pythia pyt,
Info infoIn,
const SubCollision coll = 0 
)
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.

bool next ( )
overridevirtual

Produce a collision involving heavy ions.

The main method called from Pythia::next().

Generate nuclei, impact paramter and nucleon sub-collisions.

Collect absorptively wounded nucleons in secondary sub-collisions.

Collect full double diffraction collisions.

Collect full single diffraction collisions.

Collect secondary single diffractive sub-collisions.

Collect full central diffraction collisions.

Collect secondary central diffractive sub-collisions.

Collect full elastic collisions.

Collect secondary elastic sub-collisions.

Finally bunch all events together.

Finally we hadronise everything, if requested.

Implements HeavyIons.

bool nextSASD ( int  procid)
protected

Generate a single diffractive.

Special function to generatee secondary absorptive events as single diffraction. Called from Angantyr::next() and used for debugging and tuning purposes.

virtual void onInitInfoPtr ( )
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.

bool setUserHooksPtr ( PythiaObject  sel,
UserHooksPtr  userHooksPtrIn 
)

Set UserHooks for specific (or ALL) internal Pythia objects.

Add a HIUserHooks object to customise the Angantyr model.

EventInfo & shiftEvent ( EventInfo ei)
protected

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.


The documentation for this class was generated from the following files: