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);
197 bool setKinematicsCM();
200 bool setKinematics(
double,
double,
double,
double,
double,
double)
override;
205 bool setBeamIDs(
int idAIn,
int idBIn = 0)
override;
219 return *collPtr.get(); }
222 return collPtr.get();
227 return *bGenPtr.get(); }
239 return *projPtr.get(); }
243 return *targPtr.get(); }
255 void setBeamKinematics(
int idA,
int idB);
266 EventInfo getND() {
return getMBIAS(0, 101); }
274 {
return getSASD(&coll, 103); }
276 {
return getSASD(&coll, 104); }
280 bool genAbs(
SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
282 bool addDD(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
283 bool addSD(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
285 bool addCD(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
287 bool addEL(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
291 bool buildEvent(list<EventInfo>& subEventsIn);
295 bool isRemnant(
const EventInfo& ei,
int i,
int past = 1 )
const {
296 int statNow = ei.
event[i].status()*past;
297 if ( statNow == 63 )
return true;
298 if ( statNow > 70 && statNow < 80 )
299 return isRemnant(ei, ei.
event[i].mother1(), -1);
304 static int getBeam(
Event& ev,
int i);
307 bool nextSASD(
int proc);
312 bool colConnect =
false);
316 vector<int> findRecoilers(
const Event& e,
bool tside,
int beam,
int end,
317 const Vec4& pdiff,
const Vec4& pbeam);
321 static void addJunctions(
Event& evnt,
Event& sub,
int coloff);
325 bool addNucleusRemnants();
333 pair<RotBstMatrix,RotBstMatrix>& R12);
334 static double mT2(
const Vec4& p) {
return p.pPos()*p.pNeg(); }
335 static double mT(
const Vec4& p) {
return sqrt(max(mT2(p), 0.0)); }
340 struct ProcessSelectorHook:
public UserHooks {
342 ProcessSelectorHook(): proc(0), b(-1.0) {}
351 return proc > 0 &&
infoPtr->code() != proc;
376 HoldProcess(shared_ptr<ProcessSelectorHook> hook,
int proc,
377 double b = -1.0) : saveHook(hook), saveProc(hook->proc), saveB(hook->b) {
385 saveHook->proc = saveProc;
391 shared_ptr<ProcessSelectorHook> saveHook;
402 shared_ptr<ProcessSelectorHook> selectMB;
405 shared_ptr<ProcessSelectorHook> selectSASD;
409 static const int MAXTRY = 999;
410 static const int MAXEVSAVE = 999;
430 shared_ptr<SubCollisionModel> collPtr;
433 shared_ptr<ImpactParameterGenerator> bGenPtr;
441 shared_ptr<NucleusModel> projPtr;
442 shared_ptr<NucleusModel> targPtr;
const SubCollisionModel & subCollisionModel() const
Get the underlying subcollision model.
Definition: HeavyIons.h:218
const NucleusModel & targetModel() const
The underlying target nucleus model.
Definition: HeavyIons.h:242
const SubCollisionSet & subCollisions() const
Subcollisions for the current event.
Definition: HeavyIons.h:214
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:408
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:299
Definition: SigmaTotal.h:141
const NucleusModel & projectileModel() const
The underlying projectile nucleus model.
Definition: HeavyIons.h:238
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:226
Definition: HISubCollisionModel.h:502
const Nucleus & target() const
Target nucleus configuration for the current event.
Definition: HeavyIons.h:234
void clearProcessLevel(Pythia &pyt)
Definition: HeavyIons.cc:117
The SubCollisionSet gives a set of subcollisions between two nuclei.
Definition: HISubCollisionModel.h:88
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:33
const Nucleus & projectile() const
Projectile nucleus configuration for the current event.
Definition: HeavyIons.h:230
Definition: HISubCollisionModel.h:130
Definition: HeavyIons.h:147
virtual void onInitInfoPtr() override
Definition: HeavyIons.h:251
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:235
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:25
const SigmaTotal sigmaNN() const
Hadronic cross sections used by the subcollision model.
Definition: HeavyIons.h:246
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:196
virtual double doSetImpactParameter()
Set the overall impact parameter for the MPI treatment.
Definition: UserHooks.h:238