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");
187 virtual bool init()
override;
190 virtual bool next()
override;
193 bool setUserHooksPtr(
PythiaObject sel, UserHooksPtr userHooksPtrIn);
196 bool setKinematicsCM();
199 bool setKinematics(
double,
double,
double,
double,
double,
double)
override;
204 bool setBeamIDs(
int idAIn,
int idBIn = 0)
override;
218 return *collPtr.get(); }
221 return collPtr.get();
226 return *bGenPtr.get(); }
238 return *projPtr.get(); }
242 return *targPtr.get(); }
254 void setBeamKinematics(
int idA,
int idB);
265 EventInfo getND() {
return getMBIAS(0, 101); }
273 {
return getSASD(&coll, 103); }
275 {
return getSASD(&coll, 104); }
279 bool genAbs(
SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
281 bool addDD(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
282 bool addSD(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
284 bool addCD(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
286 bool addEL(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
290 bool buildEvent(list<EventInfo>& subEventsIn);
294 bool isRemnant(
const EventInfo& ei,
int i,
int past = 1 )
const {
295 int statNow = ei.
event[i].status()*past;
296 if ( statNow == 63 )
return true;
297 if ( statNow > 70 && statNow < 80 )
298 return isRemnant(ei, ei.
event[i].mother1(), -1);
303 static int getBeam(
Event& ev,
int i);
306 bool nextSASD(
int proc);
311 bool colConnect =
false);
315 vector<int> findRecoilers(
const Event& e,
bool tside,
int beam,
int end,
316 const Vec4& pdiff,
const Vec4& pbeam);
320 static void addJunctions(
Event& evnt,
Event& sub,
int coloff);
324 bool addNucleusRemnants();
332 pair<RotBstMatrix,RotBstMatrix>& R12);
333 static double mT2(
const Vec4& p) {
return p.pPos()*p.pNeg(); }
334 static double mT(
const Vec4& p) {
return sqrt(max(mT2(p), 0.0)); }
339 struct ProcessSelectorHook:
public UserHooks {
341 ProcessSelectorHook(): proc(0), b(-1.0) {}
350 return proc > 0 &&
infoPtr->code() != proc;
375 HoldProcess(shared_ptr<ProcessSelectorHook> hook,
int proc,
376 double b = -1.0) : saveHook(hook), saveProc(hook->proc), saveB(hook->b) {
384 saveHook->proc = saveProc;
390 shared_ptr<ProcessSelectorHook> saveHook;
401 shared_ptr<ProcessSelectorHook> selectMB;
404 shared_ptr<ProcessSelectorHook> selectSASD;
408 static const int MAXTRY = 999;
409 static const int MAXEVSAVE = 999;
429 shared_ptr<SubCollisionModel> collPtr;
432 shared_ptr<ImpactParameterGenerator> bGenPtr;
440 shared_ptr<NucleusModel> projPtr;
441 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:241
const SubCollisionSet & subCollisions() const
Subcollisions for the current event.
Definition: HeavyIons.h:213
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
The Event class holds all info on the generated event.
Definition: Event.h:408
Definition: HINucleusModel.h:152
vector< Info * > info
The Info objects associated to the secondary Pythia objects.
Definition: HeavyIons.h:142
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:237
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:225
Definition: HISubCollisionModel.h:511
const Nucleus & target() const
Target nucleus configuration for the current event.
Definition: HeavyIons.h:233
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:229
Definition: HISubCollisionModel.h:130
Definition: HeavyIons.h:146
virtual void onInitInfoPtr() override
Definition: HeavyIons.h:250
PythiaObject
Enumerate the different internal Pythia objects.
Definition: HeavyIons.h:166
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:149
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:245
Logger * loggerPtr
Pointer to logger.
Definition: PhysicsBase.h:91
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:72
HIInfo hiInfo
Definition: HeavyIons.h:94
Info * infoPtr
Definition: PhysicsBase.h:82
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:161
Definition: Settings.h:196
virtual double doSetImpactParameter()
Set the overall impact parameter for the MPI treatment.
Definition: UserHooks.h:238