KaliVeda
Toolkit for HIC analysis
participant_spectator_model.h
1 #ifndef PARTICIPANT_SPECTATOR_MODEL_H
2 #define PARTICIPANT_SPECTATOR_MODEL_H
3 
4 #include "KVNucleus.h"
5 
6 namespace KVImpactParameters {
17  double A1, A2, Z1, Z2, R1, R2, _beta, NORM;
18  int sector(double BETA, double NU) const;
19 
20  enum Sector
21  { I = 1, II, III, IV };
22 
23  public:
25  participant_spectator_model(const KVNucleus& PROJ, const KVNucleus& TARG, Bool_t normalize_b = kFALSE, Bool_t normalize_participants = kFALSE)
26  : A1(PROJ.GetA()), A2(TARG.GetA()),
27  Z1(PROJ.GetZ()), Z2(TARG.GetZ()),
28  R1(1.2 * pow(PROJ.GetA(), 1. / 3.)),
29  R2(1.2 * pow(TARG.GetA(), 1. / 3.)),
30  _beta(1. / (R1 + R2))
31  {
35 
36  if (normalize_b) _beta = 1;
37  if (normalize_participants) NORM = total_participants(0);
38  else NORM = 1;
39  }
41 
42  void set(const KVNucleus& PROJ, const KVNucleus& TARG, Bool_t normalize_b = kFALSE, Bool_t normalize_participants = kFALSE)
43  {
44  A1 = PROJ.GetA();
45  A2 = TARG.GetA();
46  Z1 = PROJ.GetZ();
47  Z2 = TARG.GetZ();
48  R1 = 1.2 * pow(PROJ.GetA(), 1. / 3.);
49  R2 = 1.2 * pow(TARG.GetA(), 1. / 3.);
50  _beta = 1. / (R1 + R2);
51  if (normalize_b) _beta = 1;
52  if (normalize_participants) NORM = total_participants(0);
53  else NORM = 1;
54  }
55  double F(double b, bool target = false) const;
56  double operator()(double* x, double*)
57  {
69 
70  return total_participants(*x) / NORM;
71  }
72  double total_participants(double b) const
73  {
78 
80  }
81  double projectile_participants(double b) const
82  {
83  return A1 * F(b);
84  }
85  double target_participants(double b) const
86  {
87  return A2 * F(b, true);
88  }
89  double proton_participants(double b) const
90  {
91  return (Z1 / A1) * projectile_participants(b) + (Z2 / A2) * target_participants(b);
92  }
93 
95  };
96 
97 }
98 
99 #endif // PARTICIPANT_SPECTATOR_MODEL_H
bool Bool_t
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
Formulae for participant-spectator model.
participant_spectator_model(const KVNucleus &PROJ, const KVNucleus &TARG, Bool_t normalize_b=kFALSE, Bool_t normalize_participants=kFALSE)
void set(const KVNucleus &PROJ, const KVNucleus &TARG, Bool_t normalize_b=kFALSE, Bool_t normalize_participants=kFALSE)
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:126
Int_t GetA() const
Definition: KVNucleus.cpp:802
Int_t GetZ() const
Return the number of proton / atomic number.
Definition: KVNucleus.cpp:773
RVec< PromoteTypes< T0, T1 > > pow(const T0 &x, const RVec< T1 > &v)
Double_t x[n]