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");
180 virtual bool init()
override;
183 virtual bool next()
override;
186 bool setUserHooksPtr(
PythiaObject sel, UserHooksPtr userHooksPtrIn);
191 bool setKinematics(
double,
double,
double,
double,
double,
double)
override;
198 void banner(
int idProj,
int idTarg)
const;
206 return *collPtr.get(); }
210 return *bGenPtr.get(); }
222 return *projPtr.get(); }
226 return *targPtr.get(); }
238 void setBeamKinematics(
int idA,
int idB);
249 EventInfo getND() {
return getMBIAS(0, 101); }
257 {
return getSASD(&coll, 103); }
259 {
return getSASD(&coll, 104); }
263 bool genAbs(
SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
265 bool addDD(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
266 bool addSD(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
268 bool addCD(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
270 bool addEL(
const SubCollisionSet& subCollsIn, list<EventInfo>& subEventsIn);
273 bool buildEvent(list<EventInfo>& subEventsIn);
277 bool isRemnant(
const EventInfo& ei,
int i,
int past = 1 )
const {
278 int statNow = ei.
event[i].status()*past;
279 if ( statNow == 63 )
return true;
280 if ( statNow > 70 && statNow < 80 )
281 return isRemnant(ei, ei.
event[i].mother1(), -1);
286 static int getBeam(
Event& ev,
int i);
289 bool nextSASD(
int proc);
294 bool colConnect =
false);
298 vector<int> findRecoilers(
const Event& e,
bool tside,
int beam,
int end,
299 const Vec4& pdiff,
const Vec4& pbeam);
303 static void addJunctions(
Event& evnt,
Event& sub,
int coloff);
307 bool addNucleusRemnants();
315 pair<RotBstMatrix,RotBstMatrix>& R12);
316 static double mT2(
const Vec4& p) {
return p.pPos()*p.pNeg(); }
317 static double mT(
const Vec4& p) {
return sqrt(max(mT2(p), 0.0)); }
322 struct ProcessSelectorHook:
public UserHooks {
324 ProcessSelectorHook(): proc(0), b(-1.0) {}
333 return proc > 0 &&
infoPtr->code() != proc;
358 HoldProcess(shared_ptr<ProcessSelectorHook> hook,
int proc,
359 double b = -1.0) : saveHook(hook), saveProc(hook->proc), saveB(hook->b) {
367 saveHook->proc = saveProc;
373 shared_ptr<ProcessSelectorHook> saveHook;
384 shared_ptr<ProcessSelectorHook> selectMB;
387 shared_ptr<ProcessSelectorHook> selectSASD;
391 static const int MAXTRY = 999;
392 static const int MAXEVSAVE = 999;
412 shared_ptr<SubCollisionModel> collPtr;
415 shared_ptr<ImpactParameterGenerator> bGenPtr;
423 shared_ptr<NucleusModel> projPtr;
424 shared_ptr<NucleusModel> targPtr;
const SubCollisionModel & subCollisionModel() const
Get the underlying subcollision model.
Definition: HeavyIons.h:205
const NucleusModel & targetModel() const
The underlying target nucleus model.
Definition: HeavyIons.h:225
const SubCollisionSet & subCollisions() const
Subcollisions for the current event.
Definition: HeavyIons.h:201
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:135
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:221
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:209
Definition: HISubCollisionModel.h:479
const Nucleus & target() const
Target nucleus configuration for the current event.
Definition: HeavyIons.h:217
void clearProcessLevel(Pythia &pyt)
Definition: HeavyIons.cc:117
The SubCollisionSet gives a set of subcollisions between two nuclei.
Definition: HISubCollisionModel.h:84
HIUserHooksPtr HIHooksPtr
Definition: HeavyIons.h:124
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:213
Definition: HISubCollisionModel.h:121
Definition: HeavyIons.h:139
virtual void onInitInfoPtr() override
Definition: HeavyIons.h:234
PythiaObject
Enumerate the different internal Pythia objects.
Definition: HeavyIons.h:159
vector< string > pythiaNames
The names associated with the secondary pythia objects.
Definition: HeavyIons.h:131
static void addSpecialSettings(Settings &settings)
The abstract HeavyIons class.
Definition: HeavyIons.cc:25
Pythia * mainPythiaPtr
Definition: HeavyIons.h:116
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:142
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:229
Logger * loggerPtr
Pointer to logger.
Definition: PhysicsBase.h:87
SigmaTotal sigTotNN
Definition: HeavyIons.h:120
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:89
Info * infoPtr
Definition: PhysicsBase.h:78
UserHooks is base class for user access to program execution.
Definition: UserHooks.h:32
vector< Pythia * > pythia
Definition: HeavyIons.h:128
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:154
Definition: Settings.h:195
virtual double doSetImpactParameter()
Set the overall impact parameter for the MPI treatment.
Definition: UserHooks.h:224