KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVIonRangeTableMaterial.h
1
3
4#ifndef __KVIONRANGETABLEMATERIAL_H
5#define __KVIONRANGETABLEMATERIAL_H
6
7#include "KVBase.h"
8#include <TString.h>
9#include <KVList.h>
10#include "KVIonRangeTable.h"
11
12class TGeoMaterial;
13class TF1;
14
15#define RTT 62.36367e+03 // cm^3.Torr.K^-1.mol^-1
16#define ZERO_KELVIN 273.15
17
28protected:
38
40
45
46public:
48 KVIonRangeTableMaterial(const KVIonRangeTable*, const Char_t* name, const Char_t* symbol, const Char_t* state,
49 Double_t density = -1, Double_t Z = -1, Double_t A = -1);
52
53 virtual void Initialize();
55 {
56 return fTable;
57 }
58
59 void ls(Option_t* = "") const;
60 void Print(Option_t* = "") const;
61 virtual Float_t GetEmaxValid(Int_t /* Z */, Int_t /* A */) const
62 {
63 return 1.e+4;
64 };
65 virtual Float_t GetEminValid(Int_t /* Z */, Int_t /* A */) const
66 {
67 return 0.0;
68 };
69
70 void Copy(TObject&) const;
71 const Char_t* GetSymbol() const
72 {
73 return GetTitle();
74 };
76 {
77 return fAmat;
78 };
79 Double_t GetZ() const
80 {
81 return fZmat;
82 };
84 {
86 return fMoleWt;
87 };
89 {
93 return fDens;
94 };
96 {
99 fDens = d;
100 };
102 {
105 if (IsGas() && P == 0) fDens = 0;
106 if (IsGas() && T > 0 && P > 0) fDens = (fMoleWt * P) / ((T + ZERO_KELVIN) * RTT);
107 };
108 void SetState(const Char_t* st)
109 {
111 fState = st;
112 };
113 Bool_t IsGas() const
114 {
116 return (fState == "gas");
117 };
118
120 {
122 return (fCompound);
123 };
125 {
127 return (fMixture);
128 };
129
131 {
133 return fComposition;
134 };
135
136 void AddCompoundElement(Int_t Z, Int_t A, Int_t Natoms);
137 void AddMixtureElement(Int_t Z, Int_t A, Int_t Natoms, Double_t Proportion);
138
140
141 virtual TF1* GetRangeFunction(Int_t Z, Int_t A, Double_t isoAmat = 0) = 0;
142 virtual TF1* GetDeltaEFunction(Double_t e, Int_t Z, Int_t A, Double_t isoAmat = 0) = 0;
143 virtual TF1* GetEResFunction(Double_t e, Int_t Z, Int_t A, Double_t isoAmat = 0) = 0;
144 virtual TF1* GetStoppingFunction(Int_t Z, Int_t A, Double_t isoAmat = 0) = 0;
145
146 void PrintRangeTable(Int_t Z, Int_t A, Double_t isoAmat = 0, Double_t units = KVUnits::cm, Double_t T = -1, Double_t P = -1);
147 void PrintComposition(std::ostream&) const;
148
149 virtual Double_t GetRangeOfIon(Int_t Z, Int_t A, Double_t E, Double_t isoAmat = 0.);
150 virtual Double_t GetLinearRangeOfIon(Int_t Z, Int_t A, Double_t E, Double_t isoAmat = 0, Double_t T = -1., Double_t P = -1.);
151
152 virtual Double_t GetDeltaEOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat = 0.);
153 virtual Double_t GetLinearDeltaEOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat = 0., Double_t T = -1., Double_t P = -1.);
154
155 virtual Double_t GetEResOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat = 0.);
156 virtual Double_t GetLinearEResOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat = 0., Double_t T = -1., Double_t P = -1.);
157
158 virtual Double_t GetEIncFromEResOfIon(Int_t Z, Int_t A, Double_t Eres, Double_t e, Double_t isoAmat = 0.);
159 virtual Double_t GetLinearEIncFromEResOfIon(Int_t Z, Int_t A, Double_t Eres, Double_t e, Double_t isoAmat = 0., Double_t T = -1., Double_t P = -1.);
160
163
165 {
168 return GetEIncFromEResOfIon(Z, A, ERes, e, isoAmat) - ERes;
169 }
170
172 Double_t isoAmat = 0., Double_t T = -1., Double_t P = -1.)
173 {
177 return GetLinearEIncFromEResOfIon(Z, A, ERes, e, isoAmat, T, P) - ERes;
178 }
179
180 virtual Double_t GetPunchThroughEnergy(Int_t Z, Int_t A, Double_t e, Double_t isoAmat = 0.) ;
181 virtual Double_t GetLinearPunchThroughEnergy(Int_t Z, Int_t A, Double_t e, Double_t isoAmat = 0., Double_t T = -1., Double_t P = -1.) ;
182
183 virtual Double_t GetMaxDeltaEOfIon(Int_t Z, Int_t A, Double_t e, Double_t isoAmat = 0.);
184 virtual Double_t GetEIncOfMaxDeltaEOfIon(Int_t Z, Int_t A, Double_t e, Double_t isoAmat = 0.);
185 virtual Double_t GetLinearMaxDeltaEOfIon(Int_t Z, Int_t A, Double_t e, Double_t isoAmat = 0., Double_t T = -1., Double_t P = -1.);
186 virtual Double_t GetLinearEIncOfMaxDeltaEOfIon(Int_t Z, Int_t A, Double_t e, Double_t isoAmat = 0., Double_t T = -1., Double_t P = -1.);
187
189 {
192 return fRangeOfLastDE;
193 }
194
195 ClassDef(KVIonRangeTableMaterial, 1) //Material for use in energy loss & range calculations
196};
197
198#endif
int Int_t
#define d(i)
#define e(i)
bool Bool_t
char Char_t
float Float_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition KVBase.h:142
Material for use in energy loss & range calculations.
virtual Double_t GetLinearEIncOfMaxDeltaEOfIon(Int_t Z, Int_t A, Double_t e, Double_t isoAmat=0., Double_t T=-1., Double_t P=-1.)
virtual Double_t GetLinearPunchThroughEnergy(Int_t Z, Int_t A, Double_t e, Double_t isoAmat=0., Double_t T=-1., Double_t P=-1.)
virtual Double_t GetDeltaEOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat=0.)
Double_t GetDeltaEFromEResOfIon(Int_t Z, Int_t A, Double_t ERes, Double_t e, Double_t isoAmat=0.)
void AddCompoundElement(Int_t Z, Int_t A, Int_t Natoms)
virtual Double_t GetLinearMaxDeltaEOfIon(Int_t Z, Int_t A, Double_t e, Double_t isoAmat=0., Double_t T=-1., Double_t P=-1.)
virtual Double_t GetLinearEIncFromDeltaEOfIon(Int_t Z, Int_t A, Double_t DeltaE, Double_t e, enum KVIonRangeTable::SolType type=KVIonRangeTable::kEmax, Double_t isoAmat=0., Double_t T=-1., Double_t P=-1.)
TF1 * fDeltaE
function parameterising energy loss in material
virtual Double_t GetEResOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat=0.)
virtual Double_t GetLinearRangeOfIon(Int_t Z, Int_t A, Double_t E, Double_t isoAmat=0, Double_t T=-1., Double_t P=-1.)
Double_t fZmat
effective atomic number of material
TGeoMaterial * GetTGeoMaterial() const
virtual TF1 * GetEResFunction(Double_t e, Int_t Z, Int_t A, Double_t isoAmat=0)=0
const KVIonRangeTable * GetTable() const
virtual Float_t GetEmaxValid(Int_t, Int_t) const
void AddMixtureElement(Int_t Z, Int_t A, Int_t Natoms, Double_t Proportion)
void SetState(const Char_t *st)
Double_t fDens
density of material in g/cm**3
KVIonRangeTableMaterial()
Default constructor.
TString fState
state of material = "solid", "liquid", "gas", "unknown"
virtual Double_t GetEIncFromDeltaEOfIon(Int_t Z, Int_t A, Double_t DeltaE, Double_t e, enum KVIonRangeTable::SolType type=KVIonRangeTable::kEmax, Double_t isoAmat=0.)
virtual Double_t GetLinearDeltaEOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat=0., Double_t T=-1., Double_t P=-1.)
virtual ~KVIonRangeTableMaterial()
Destructor.
virtual TF1 * GetRangeFunction(Int_t Z, Int_t A, Double_t isoAmat=0)=0
void ls(Option_t *="") const
void PrintComposition(std::ostream &) const
Print to stream the composition of this material, in a format compatible with the VEDALOSS parameter ...
Double_t fAmat
effective mass number of material
const Char_t * GetSymbol() const
TF1 * fEres
function parameterising residual energy after crossing material
virtual Float_t GetEminValid(Int_t, Int_t) const
virtual Double_t GetEIncFromEResOfIon(Int_t Z, Int_t A, Double_t Eres, Double_t e, Double_t isoAmat=0.)
TF1 * fRange
function parameterising range of charged particles in material
TF1 * fStopping
function parameterising stopping power of charged particles in material
virtual TF1 * GetDeltaEFunction(Double_t e, Int_t Z, Int_t A, Double_t isoAmat=0)=0
virtual Double_t GetLinearEResOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat=0., Double_t T=-1., Double_t P=-1.)
Double_t fRangeOfLastDE
range corresponding to last calculated DE
void Print(Option_t *="") const
const KVIonRangeTable * fTable
parent range table
virtual Double_t GetPunchThroughEnergy(Int_t Z, Int_t A, Double_t e, Double_t isoAmat=0.)
KVList * fComposition
composition of compound/mixture
virtual Double_t GetLinearEIncFromEResOfIon(Int_t Z, Int_t A, Double_t Eres, Double_t e, Double_t isoAmat=0., Double_t T=-1., Double_t P=-1.)
void SetTemperatureAndPressure(Double_t T, Double_t P)
void PrintRangeTable(Int_t Z, Int_t A, Double_t isoAmat=0, Double_t units=KVUnits::cm, Double_t T=-1, Double_t P=-1)
virtual Double_t GetEIncOfMaxDeltaEOfIon(Int_t Z, Int_t A, Double_t e, Double_t isoAmat=0.)
Double_t GetLinearDeltaEFromEResOfIon(Int_t Z, Int_t A, Double_t ERes, Double_t e, Double_t isoAmat=0., Double_t T=-1., Double_t P=-1.)
virtual TF1 * GetStoppingFunction(Int_t Z, Int_t A, Double_t isoAmat=0)=0
virtual Double_t GetMaxDeltaEOfIon(Int_t Z, Int_t A, Double_t e, Double_t isoAmat=0.)
Double_t fMoleWt
mass of one mole of substance in grammes
virtual Double_t GetRangeOfIon(Int_t Z, Int_t A, Double_t E, Double_t isoAmat=0.)
Abstract base class for calculation of range & energy loss of charged particles in matter.
Extended TList class which owns its objects by default.
Definition KVList.h:28
const char * GetTitle() const override
const long double cm
Definition KVUnits.h:66
double T(double x)