12 #ifndef Pythia8_HeavyIons_H 13 #define Pythia8_HeavyIons_H 15 #include "Pythia8/HIInfo.h" 16 #include "Pythia8/PhysicsBase.h" 52 virtual bool init() = 0;
58 virtual bool next() = 0;
75 loggerPtr->ERROR_MSG(
"method not implemented for this heavy ion model");
78 loggerPtr->ERROR_MSG(
"method not implemented for this heavy ion model");
80 virtual bool setKinematics(
double,
double,
double,
double,
double,
double) {
81 loggerPtr->ERROR_MSG(
"method not implemented for this heavy ion model");
84 loggerPtr->ERROR_MSG(
"method not implemented for this heavy ion model");
89 loggerPtr->ERROR_MSG(
"method not implemented for this heavy ion model");
188 virtual bool init()
override;
191 virtual bool next()
override;
194 bool setUserHooksPtr(
PythiaObject sel, UserHooksPtr userHooksPtrIn);
199 bool setKinematics(
double,
double,
double,
double,
double,
double)
override;
204 bool setBeamIDs(
int idAIn,
int idBIn = 0)
override;
218 return *collPtr.get(); }
222 return *bGenPtr.get(); }
234 return *projPtr.get(); }
238 return *targPtr.get(); }
250 void setBeamKinematics(
int idA,
int idB);
261 EventInfo getND() {
return getMBIAS(0, 101); }
269 {
return getSASD(&coll, 103); }
271 {
return getSASD(&coll, 104); }
275 bool genAbs(
SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
277 bool addDD(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
278 bool addSD(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
280 bool addCD(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
282 bool addEL(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
285 bool buildEvent(list<EventInfo>& subEventsIn);
289 bool isRemnant(
const EventInfo& ei,
int i,
int past = 1 )
const {
290 int statNow = ei.
event[i].status()*past;
291 if ( statNow == 63 )
return true;
292 if ( statNow > 70 && statNow < 80 )
293 return isRemnant(ei, ei.
event[i].mother1(), -1);
298 static int getBeam(
Event& ev,
int i);
301 bool nextSASD(
int proc);
306 bool colConnect =
false);
310 vector<int> findRecoilers(
const Event& e,
bool tside,
int beam,
int end,
311 const Vec4& pdiff,
const Vec4& pbeam);
315 static void addJunctions(
Event& evnt,
Event& sub,
int coloff);
319 bool addNucleusRemnants();
327 pair<RotBstMatrix,RotBstMatrix>& R12);
328 static double mT2(
const Vec4& p) {
return p.pPos()*p.pNeg(); }
329 static double mT(
const Vec4& p) {
return sqrt(max(mT2(p), 0.0)); }
334 struct ProcessSelectorHook:
public UserHooks {
336 ProcessSelectorHook(): proc(0), b(-1.0) {}
345 return proc > 0 &&
infoPtr->code() != proc;
370 HoldProcess(shared_ptr<ProcessSelectorHook> hook,
int proc,
371 double b = -1.0) : saveHook(hook), saveProc(hook->proc), saveB(hook->b) {
379 saveHook->proc = saveProc;
385 shared_ptr<ProcessSelectorHook> saveHook;
396 shared_ptr<ProcessSelectorHook> selectMB;
399 shared_ptr<ProcessSelectorHook> selectSASD;
403 static const int MAXTRY = 999;
404 static const int MAXEVSAVE = 999;
424 shared_ptr<SubCollisionModel> collPtr;
427 shared_ptr<ImpactParameterGenerator> bGenPtr;
435 shared_ptr<NucleusModel> projPtr;
436 shared_ptr<NucleusModel> targPtr;
const SubCollisionModel & subCollisionModel() const
Get the underlying subcollision model.
Definition: HeavyIons.h:217
const NucleusModel & targetModel() const
The underlying target nucleus model.
Definition: HeavyIons.h:237
const SubCollisionSet & subCollisions() const
Subcollisions for the current event.
Definition: HeavyIons.h:213
Definition: PhysicsBase.h:27
void registerSubObject(PhysicsBase &pb)
Register a sub object that should have its information in sync with this.
Definition: PhysicsBase.cc:56
HeavyIons(Pythia &mainPythiaIn)
Definition: HeavyIons.h:38
The Event class holds all info on the generated event.
Definition: Event.h:453
Definition: HINucleusModel.h:152
vector< Info * > info
Definition: HeavyIons.h:143
static bool isHeavyIon(Settings &settings)
Check the settings and return false of there are no heavy ion beams.
Definition: HeavyIons.cc:250
Definition: SigmaTotal.h:141
const NucleusModel & projectileModel() const
The underlying projectile nucleus model.
Definition: HeavyIons.h:233
static void setupSpecials(Settings &settings, string match)
Duplicate setting on the form match: to settings on the form HImatch:
Definition: HeavyIons.cc:33
Definition: HINucleusModel.h:187
const ImpactParameterGenerator impactParameterGenerator() const
Get the underlying impact parameter generator.
Definition: HeavyIons.h:221
Definition: HISubCollisionModel.h:491
const Nucleus & target() const
Target nucleus configuration for the current event.
Definition: HeavyIons.h:229
void clearProcessLevel(Pythia &pyt)
Definition: HeavyIons.cc:117
The SubCollisionSet gives a set of subcollisions between two nuclei.
Definition: HISubCollisionModel.h:84
int idProj
Save current beam configuration.
Definition: HeavyIons.h:120
HIUserHooksPtr HIHooksPtr
Definition: HeavyIons.h:132
virtual ~HeavyIons()
Destructor.
Definition: HeavyIons.h:44
Event event
The Event object.
Definition: HIBasics.h:55
const Nucleus & projectile() const
Projectile nucleus configuration for the current event.
Definition: HeavyIons.h:225
Definition: HISubCollisionModel.h:121
Definition: HeavyIons.h:147
virtual void onInitInfoPtr() override
Definition: HeavyIons.h:246
PythiaObject
Enumerate the different internal Pythia objects.
Definition: HeavyIons.h:167
vector< string > pythiaNames
The names associated with the secondary pythia objects.
Definition: HeavyIons.h:139
static void addSpecialSettings(Settings &settings)
The abstract HeavyIons class.
Definition: HeavyIons.cc:25
Pythia * mainPythiaPtr
Definition: HeavyIons.h:124
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:221
bool setHIUserHooksPtr(HIUserHooksPtr userHooksPtrIn)
Possibility to pass in pointer for special heavy ion user hooks.
Definition: HeavyIons.h:69
Info * getInfo()
Only one function: return the info object.
Definition: HeavyIons.h:150
Status
Enum for specifying the status of a nucleon.
Definition: HINucleusModel.h:33
Class for storing Events and Info objects.
Definition: HIBasics.h:47
const SigmaTotal sigmaNN() const
Hadronic cross sections used by the subcollision model.
Definition: HeavyIons.h:241
Logger * loggerPtr
Pointer to logger.
Definition: PhysicsBase.h:87
SigmaTotal sigTotNN
Definition: HeavyIons.h:128
virtual bool setKinematics(double)
Set beam kinematics.
Definition: HeavyIons.h:74
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:71
HIInfo hiInfo
Definition: HeavyIons.h:94
Info * infoPtr
Definition: PhysicsBase.h:78
virtual bool setBeamIDs(int, int=0)
Set beam particles.
Definition: HeavyIons.h:88
UserHooks is base class for user access to program execution.
Definition: UserHooks.h:32
vector< Pythia * > pythia
Definition: HeavyIons.h:136
virtual bool doVetoProcessLevel(Event &)
Definition: UserHooks.h:64
Definition: HeavyIons.h:31
virtual void stat()
Print out statistics.
Definition: HeavyIons.cc:176
void updateInfo()
Update the Info object in the main Pythia object.
Definition: HeavyIons.cc:146
The default HeavyIon model in Pythia.
Definition: HeavyIons.h:162
Definition: Settings.h:195
virtual double doSetImpactParameter()
Set the overall impact parameter for the MPI treatment.
Definition: UserHooks.h:224