KaliVeda
Toolkit for HIC analysis
KVSimNucleus.h
1 
4 #ifndef __KVSIMNUCLEUS_H
5 #define __KVSIMNUCLEUS_H
6 
7 #include "KVNucleus.h"
8 #include "KVNameValueList.h"
9 
10 class TVector3;
11 
32 class KVSimNucleus : public KVNucleus {
33 
34 protected:
38 public:
39 
41  KVSimNucleus(Int_t z, Int_t a = 0, Double_t ekin = 0) : KVNucleus(z, a, ekin), fDensity(0.0) {}
42  KVSimNucleus(Int_t z, Double_t t, TVector3& p) : KVNucleus(z, t, p), fDensity(0.0) {}
43  KVSimNucleus(Int_t z, Int_t a, TVector3 p) : KVNucleus(z, a, p), fDensity(0.0) {}
44  KVSimNucleus(const Char_t* sym, Double_t EperA = 0) : KVNucleus(sym, EperA), fDensity(0.0) {}
45  KVSimNucleus(const KVSimNucleus&);
46  KVSimNucleus(const KVNucleus& n) : KVNucleus(n), fDensity(0.0) {}
47 
48  virtual ~KVSimNucleus() {}
49 
50  void Copy(TObject& obj) const;
51 
52  void SetPosition(Double_t rx, Double_t ry, Double_t rz);
53  void SetPosition(const TVector3&);
54  void SetDensity(Double_t);
55  Double_t GetDensity() const;
56  const TVector3* GetPosition() const
57  {
58  return &position;
59  }
61  {
62  return position;
63  }
64 
65  Double_t GetRx() const
66  {
67  return position.X();
68  }
69  Double_t GetRy() const
70  {
71  return position.Y();
72  }
73  Double_t GetRz() const
74  {
75  return position.Z();
76  }
77  Double_t GetRmag() const
78  {
79  return position.Mag();
80  }
81 
83  {
86  return (GetRy() >= 0.0 ? position.Perp() : -(position.Perp()));
87  }
88 
90  {
92  Double_t rmag = GetRmag();
93  if (rmag > 0)
94  return BoostVector().Dot(position) / rmag;
95  return 0;
96  }
97 
99  {
102  }
103 
104  Double_t GetLx() const
105  {
106  return angmom.X();
107  }
108  Double_t GetLy() const
109  {
110  return angmom.Y();
111  }
112  Double_t GetLz() const
113  {
114  return angmom.Z();
115  }
117  {
118  return angmom.Mag();
119  }
120 
121  void SetAngMom(Double_t lx, Double_t ly, Double_t lz);
123  {
124  SetAngMom(x, y, z);
125  }
126  const TVector3* GetAngMom() const
127  {
128  return &angmom;
129  }
131  {
132  return angmom;
133  }
135  {
137  return 1.2 * pow(GetA(), 1. / 3.);
138  }
140  {
142  return 0.4 * GetMass() * pow(GetRadius(), 2);
143  }
145  {
147  Double_t s = angmom.Mag();
148  return 0.5 * pow(hbar, 2) * (s * (s + 1.)) / GetMomentOfInertia();
149  }
150 
151  Double_t GetEnergyLoss(const TString& detname) const;
152  TVector3 GetEntrancePosition(const TString& detname) const;
153  TVector3 GetExitPosition(const TString& detname) const;
154 
155  void Print(Option_t* t = "") const;
156 
157  KVSimNucleus operator+(const KVSimNucleus& rhs) const;
158  KVSimNucleus& operator+=(const KVSimNucleus& rhs);
160 
161  ClassDef(KVSimNucleus, 4) //Nuclear particle in a simulated event
162 
163 };
164 
165 #endif
int Int_t
char Char_t
double Double_t
const char Option_t
#define ClassDef(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:126
static Double_t hbar
hbar*c in MeV.fm
Definition: KVNucleus.h:173
Int_t GetA() const
Definition: KVNucleus.cpp:802
Double_t GetMass() const
Definition: KVParticle.h:574
Nucleus in a simulated event.
Definition: KVSimNucleus.h:32
KVSimNucleus(const Char_t *sym, Double_t EperA=0)
Definition: KVSimNucleus.h:44
void SetPosition(Double_t rx, Double_t ry, Double_t rz)
set the position of the nucleus in position space
TVector3 GetExitPosition(const TString &detname) const
void SetSpin(Double_t x, Double_t y, Double_t z)
Definition: KVSimNucleus.h:122
Double_t GetRadialBoost() const
Definition: KVSimNucleus.h:89
KVSimNucleus & operator+=(const KVSimNucleus &rhs)
KVNucleus addition and assignment operator.
Double_t GetRz() const
Definition: KVSimNucleus.h:73
Double_t GetRperp() const
Definition: KVSimNucleus.h:82
void SetAngMom(Double_t lx, Double_t ly, Double_t lz)
set the angular momentum of the nucleus
TVector3 & GetPosition()
Definition: KVSimNucleus.h:60
TVector3 angmom
angular momentum of the particle in units
Definition: KVSimNucleus.h:36
void Copy(TObject &obj) const
Copy l'object "this" vers obj.
Double_t GetEnergyLoss(const TString &detname) const
void SetDensity(Double_t)
set density of the nucleus in nuc/fm3
KVSimNucleus(const KVNucleus &n)
Definition: KVSimNucleus.h:46
Double_t fDensity
density of the nucleus in nuc.fm-3
Definition: KVSimNucleus.h:37
KVSimNucleus & operator=(const KVSimNucleus &)
copy assignment operator
virtual ~KVSimNucleus()
Definition: KVSimNucleus.h:48
Double_t GetDensity() const
get density of the nucleus in nuc/fm3
Double_t GetRotationalEnergy() const
Definition: KVSimNucleus.h:144
TVector3 & GetAngMom()
Definition: KVSimNucleus.h:130
Double_t GetRadius() const
Definition: KVSimNucleus.h:134
Double_t GetLmag() const
Definition: KVSimNucleus.h:116
void Print(Option_t *t="") const
Double_t GetLz() const
Definition: KVSimNucleus.h:112
TVector3 position
vector position of the particle in fm
Definition: KVSimNucleus.h:35
KVSimNucleus(Int_t z, Int_t a, TVector3 p)
Definition: KVSimNucleus.h:43
KVSimNucleus(Int_t z, Int_t a=0, Double_t ekin=0)
Definition: KVSimNucleus.h:41
Double_t GetRx() const
Definition: KVSimNucleus.h:65
Double_t GetRy() const
Definition: KVSimNucleus.h:69
Double_t GetCosBoostPositionAngle() const
Definition: KVSimNucleus.h:98
const TVector3 * GetAngMom() const
Definition: KVSimNucleus.h:126
TVector3 GetEntrancePosition(const TString &detname) const
const TVector3 * GetPosition() const
Definition: KVSimNucleus.h:56
Double_t GetLx() const
Definition: KVSimNucleus.h:104
KVSimNucleus operator+(const KVSimNucleus &rhs) const
Double_t GetMomentOfInertia() const
Definition: KVSimNucleus.h:139
KVSimNucleus(Int_t z, Double_t t, TVector3 &p)
Definition: KVSimNucleus.h:42
Double_t GetLy() const
Definition: KVSimNucleus.h:108
Double_t GetRmag() const
Definition: KVSimNucleus.h:77
Double_t Angle(const TVector3 &v) const
TVector3 BoostVector() const
Double_t Z() const
Double_t Y() const
Double_t Dot(const TVector3 &) const
Double_t X() const
Double_t Mag() const
Double_t Perp() const
RVec< PromoteTypes< T0, T1 > > pow(const T0 &x, const RVec< T1 > &v)
Double_t y[n]
Double_t x[n]
const Int_t n
Double_t Cos(Double_t)
TArc a
#define sym(otri1, otri2)