KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVIonRangeTableMaterial.h
Go to the documentation of this file.
1 
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 
12 class TGeoMaterial;
13 class TF1;
14 
15 #define RTT 62.36367e+03 // cm^3.Torr.K^-1.mol^-1
16 #define ZERO_KELVIN 273.15
17 
27 protected:
37 
39 
44 
45 public:
47  KVIonRangeTableMaterial(const KVIonRangeTable*, const Char_t* name, const Char_t* symbol, const Char_t* state,
48  Double_t density = -1, Double_t Z = -1, Double_t A = -1);
50  virtual ~KVIonRangeTableMaterial();
51 
52  virtual void Initialize();
53  const KVIonRangeTable* GetTable() const
54  {
55  return fTable;
56  }
57 
58  void ls(Option_t* = "") const;
59  void Print(Option_t* = "") const;
60  virtual Float_t GetEmaxValid(Int_t /* Z */, Int_t /* A */) const
61  {
62  return 1.e+4;
63  };
64  virtual Float_t GetEminValid(Int_t /* Z */, Int_t /* A */) const
65  {
66  return 0.0;
67  };
68 
69  void Copy(TObject&) const;
70  const Char_t* GetSymbol() const
71  {
72  return GetTitle();
73  };
74  Double_t GetMass() const
75  {
76  return fAmat;
77  };
78  Double_t GetZ() const
79  {
80  return fZmat;
81  };
83  {
85  return fMoleWt;
86  };
88  {
92  return fDens;
93  };
95  {
98  fDens = d;
99  };
101  {
104  if (IsGas() && P == 0) fDens = 0;
105  if (IsGas() && T > 0 && P > 0) fDens = (fMoleWt * P) / ((T + ZERO_KELVIN) * RTT);
106  };
107  void SetState(const Char_t* st)
108  {
110  fState = st;
111  };
112  Bool_t IsGas() const
113  {
115  return (fState == "gas");
116  };
117 
119  {
121  return (fCompound);
122  };
124  {
126  return (fMixture);
127  };
128 
130  {
132  return fComposition;
133  };
134 
135  void AddCompoundElement(Int_t Z, Int_t A, Int_t Natoms);
136  void AddMixtureElement(Int_t Z, Int_t A, Int_t Natoms, Double_t Proportion);
137 
138  TGeoMaterial* GetTGeoMaterial() const;
139 
140  virtual TF1* GetRangeFunction(Int_t Z, Int_t A, Double_t isoAmat = 0) = 0;
141  virtual TF1* GetDeltaEFunction(Double_t e, Int_t Z, Int_t A, Double_t isoAmat = 0) = 0;
142  virtual TF1* GetEResFunction(Double_t e, Int_t Z, Int_t A, Double_t isoAmat = 0) = 0;
143  virtual TF1* GetStoppingFunction(Int_t Z, Int_t A, Double_t isoAmat = 0) = 0;
144 
145  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);
146  void PrintComposition(std::ostream&) const;
147 
148  virtual Double_t GetRangeOfIon(Int_t Z, Int_t A, Double_t E, Double_t isoAmat = 0.);
149  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.);
150 
151  virtual Double_t GetDeltaEOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat = 0.);
152  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.);
153 
154  virtual Double_t GetEResOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat = 0.);
155  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.);
156 
157  virtual Double_t GetEIncFromEResOfIon(Int_t Z, Int_t A, Double_t Eres, Double_t e, Double_t isoAmat = 0.);
158  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.);
159 
161  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.);
162 
164  {
167  return GetEIncFromEResOfIon(Z, A, ERes, e, isoAmat) - ERes;
168  }
169 
171  Double_t isoAmat = 0., Double_t T = -1., Double_t P = -1.)
172  {
176  return GetLinearEIncFromEResOfIon(Z, A, ERes, e, isoAmat, T, P) - ERes;
177  }
178 
179  virtual Double_t GetPunchThroughEnergy(Int_t Z, Int_t A, Double_t e, Double_t isoAmat = 0.) ;
180  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.) ;
181 
182  virtual Double_t GetMaxDeltaEOfIon(Int_t Z, Int_t A, Double_t e, Double_t isoAmat = 0.);
183  virtual Double_t GetEIncOfMaxDeltaEOfIon(Int_t Z, Int_t A, Double_t e, Double_t isoAmat = 0.);
184  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.);
185  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.);
186 
188  {
191  return fRangeOfLastDE;
192  }
193 
194  ClassDef(KVIonRangeTableMaterial, 1) //Material for use in energy loss & range calculations
195 };
196 
197 #endif
int Int_t
#define RTT
#define ZERO_KELVIN
#define d(i)
#define e(i)
char Char_t
bool Bool_t
double Double_t
float Float_t
const char Option_t
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition: KVBase.h:141
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
const KVIonRangeTable * GetTable() const
virtual TF1 * GetEResFunction(Double_t e, Int_t Z, Int_t A, Double_t isoAmat=0)=0
const Char_t * GetSymbol() const
virtual TF1 * GetStoppingFunction(Int_t Z, Int_t A, Double_t isoAmat=0)=0
virtual Float_t GetEmaxValid(Int_t, Int_t) const
virtual TF1 * GetDeltaEFunction(Double_t e, Int_t Z, Int_t A, Double_t isoAmat=0)=0
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 TF1 * GetRangeFunction(Int_t Z, Int_t A, Double_t isoAmat=0)=0
virtual ~KVIonRangeTableMaterial()
Destructor.
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
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 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 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:27
virtual const char * GetTitle() const
const long double cm
Definition: KVUnits.h:66
double T(double x)