KaliVeda
Toolkit for HIC analysis
KVMaterial.h
1 /***************************************************************************
2  kvmaterial.h - description
3  -------------------
4  begin : Thu May 16 2002
5  copyright : (C) 2002 by J.D. Frankland
6  email : frankland@ganil.fr
7 
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 
20 #ifndef KVMATERIAL_H
21 #define KVMATERIAL_H
22 
23 #include "RVersion.h"
24 #include "KVBase.h"
25 #include "KVList.h"
26 #include "KVUnits.h"
27 #include "TF1.h"
28 #include "TVector3.h"
29 #include "Riostream.h"
30 class KVIonRangeTable;
31 
32 class KVNucleus;
33 class TGeoMedium;
34 class TGeoVolume;
35 class TGraph;
36 
94 class KVMaterial: public KVBase {
95 
96 protected:
98 
100 
101 public:
102 
103 private:
108  mutable Double_t fELoss;
109 
110 public:
111  enum SolType {
113  kEmin
114  };
115  KVMaterial();
116  KVMaterial(const Char_t* type, const Double_t thick = 0.0);
117  KVMaterial(const Char_t* gas, const Double_t thick, const Double_t pressure, const Double_t temperature = 19.0);
118  KVMaterial(Double_t area_density, const Char_t* type);
119  KVMaterial(const KVMaterial&);
120  ROOT_COPY_ASSIGN_OP(KVMaterial)
121 
122  static KVIonRangeTable* GetRangeTable();
123  static KVIonRangeTable* ChangeRangeTable(const Char_t* name);
124 
125  void init();
126  virtual ~ KVMaterial();
127  void SetMass(Int_t a);
128  virtual void SetMaterial(const Char_t* type);
129  Double_t GetMass() const;
130  Double_t GetZ() const;
131  Double_t GetDensity() const;
132  void SetAreaDensity(Double_t dens /* g/cm**2 */);
133  Double_t GetAreaDensity() const;
134  virtual void SetThickness(Double_t thick /* cm */);
135  virtual Double_t GetThickness() const;
136  Double_t GetEffectiveThickness(TVector3& norm, TVector3& direction);
138 
139  virtual void DetectParticle(KVNucleus*, TVector3* norm = nullptr);
140  virtual Double_t GetELostByParticle(KVNucleus*, TVector3* norm = nullptr);
141  virtual Double_t GetParticleEIncFromERes(KVNucleus*, TVector3* norm = nullptr);
142 
143  virtual void Print(Option_t* option = "") const;
144  virtual Double_t GetEnergyLoss() const
145  {
152  return fELoss;
153  }
154  virtual void SetEnergyLoss(Double_t e) const
155  {
158  fELoss = e;
159  }
160 
161 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
162  virtual void Copy(TObject& obj) const;
163 #else
164  virtual void Copy(TObject& obj);
165 #endif
166  virtual void Clear(Option_t* opt = "");
167 
169  virtual Double_t GetIncidentEnergy(Int_t Z, Int_t A, Double_t delta_e =
170  -1.0, enum SolType type = kEmax);
172  virtual Double_t GetDeltaE(Int_t Z, Int_t A, Double_t Einc);
173  virtual Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres);
174  virtual Double_t GetERes(Int_t Z, Int_t A, Double_t Einc);
175  virtual Double_t GetEResFromDeltaE(Int_t Z, Int_t A, Double_t dE =
176  -1.0, enum SolType type = kEmax);
177  virtual Double_t GetEIncOfMaxDeltaE(Int_t Z, Int_t A);
178  virtual Double_t GetMaxDeltaE(Int_t Z, Int_t A);
179 
180  virtual Double_t GetRange(Int_t Z, Int_t A, Double_t Einc);
181  virtual Double_t GetLinearRange(Int_t Z, Int_t A, Double_t Einc);
182 
184 
185  virtual KVMaterial* GetActiveLayer() const
186  {
188  return nullptr;
189  }
190 
191  virtual void SetPressure(Double_t);
192  virtual void SetTemperature(Double_t);
193 
194  virtual Double_t GetPressure() const;
195  virtual Double_t GetTemperature() const;
196 
197  Bool_t IsIsotopic() const;
198  Bool_t IsNat() const;
199 
200  Bool_t IsGas() const;
201 
202  virtual TGeoMedium* GetGeoMedium(const Char_t* /*med_name*/ = "");
203  virtual void SetAbsGeoVolume(TGeoVolume* v)
204  {
206  fAbsorberVolume = v;
207  }
208  virtual TGeoVolume* GetAbsGeoVolume() const
209  {
211  return fAbsorberVolume;
212  }
213 
214  virtual TGraph* GetGraphOfDeltaEVsE(const KVNucleus& nuc, Int_t npts, Double_t Emin, Double_t Emax);
215 
216  ClassDef(KVMaterial, 6)// Class describing physical materials used to construct detectors & targets
217 };
218 
219 #endif
int Int_t
#define e(i)
bool Bool_t
char Char_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition: KVBase.h:142
Abstract base class for calculation of range & energy loss of charged particles in matter.
Description of physical materials used to construct detectors & targets; interface to range tables.
Definition: KVMaterial.h:94
Double_t GetZ() const
Definition: KVMaterial.cpp:393
virtual Double_t GetPressure() const
Definition: KVMaterial.cpp:620
virtual void SetPressure(Double_t)
Definition: KVMaterial.cpp:583
virtual void Copy(TObject &obj) const
Make a copy of this material object.
virtual void SetTemperature(Double_t)
Definition: KVMaterial.cpp:649
Double_t GetEffectiveAreaDensity(TVector3 &norm, TVector3 &direction)
Definition: KVMaterial.cpp:723
virtual void SetEnergyLoss(Double_t e) const
Definition: KVMaterial.h:154
virtual void SetThickness(Double_t thick)
Definition: KVMaterial.cpp:454
virtual Double_t GetThickness() const
Definition: KVMaterial.cpp:487
Double_t GetDensity() const
Definition: KVMaterial.cpp:421
Double_t fThick
area density of absorber in g/cm**2
Definition: KVMaterial.h:105
Bool_t IsGas() const
Definition: KVMaterial.cpp:374
virtual TGeoMedium * GetGeoMedium(const Char_t *="")
static KVIonRangeTable * GetRangeTable()
Definition: KVMaterial.cpp:166
virtual Double_t GetEnergyLoss() const
Definition: KVMaterial.h:144
virtual void Print(Option_t *option="") const
Show information on this material.
Definition: KVMaterial.cpp:742
Int_t fAmasr
isotopic mass of element
Definition: KVMaterial.h:104
Double_t GetEmaxValid(Int_t Z, Int_t A)
virtual void SetAbsGeoVolume(TGeoVolume *v)
Definition: KVMaterial.h:203
TGeoVolume * fAbsorberVolume
pointer to corresponding volume in ROOT geometry
Definition: KVMaterial.h:99
virtual Double_t GetIncidentEnergy(Int_t Z, Int_t A, Double_t delta_e=-1.0, enum SolType type=kEmax)
Double_t fELoss
total of energy lost by all particles traversing absorber
Definition: KVMaterial.h:108
virtual Double_t GetEIncOfMaxDeltaE(Int_t Z, Int_t A)
virtual Double_t GetPunchThroughEnergy(Int_t Z, Int_t A)
Bool_t IsNat() const
Definition: KVMaterial.cpp:352
void SetMass(Int_t a)
Definition: KVMaterial.cpp:285
void init()
Definition: KVMaterial.cpp:50
virtual Double_t GetEResFromDeltaE(Int_t Z, Int_t A, Double_t dE=-1.0, enum SolType type=kEmax)
virtual Double_t GetMaxDeltaE(Int_t Z, Int_t A)
static KVIonRangeTable * ChangeRangeTable(const Char_t *name)
Definition: KVMaterial.cpp:187
void SetAreaDensity(Double_t dens)
Definition: KVMaterial.cpp:523
Double_t GetAreaDensity() const
Definition: KVMaterial.cpp:556
virtual Double_t GetParticleEIncFromERes(KVNucleus *, TVector3 *norm=nullptr)
Definition: KVMaterial.cpp:804
Double_t fTemp
gas temperature in degrees celsius
Definition: KVMaterial.h:107
virtual TGraph * GetGraphOfDeltaEVsE(const KVNucleus &nuc, Int_t npts, Double_t Emin, Double_t Emax)
Double_t fPressure
gas pressure in torr
Definition: KVMaterial.h:106
virtual void DetectParticle(KVNucleus *, TVector3 *norm=nullptr)
virtual Double_t GetTemperature() const
Definition: KVMaterial.cpp:680
virtual Double_t GetIncidentEnergyFromERes(Int_t Z, Int_t A, Double_t Eres)
virtual void SetMaterial(const Char_t *type)
Definition: KVMaterial.cpp:225
virtual Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres)
Definition: KVMaterial.cpp:949
static KVIonRangeTable * fIonRangeTable
pointer to class used to calculate charged particle ranges & energy losses
Definition: KVMaterial.h:97
virtual Double_t GetERes(Int_t Z, Int_t A, Double_t Einc)
virtual TGeoVolume * GetAbsGeoVolume() const
Definition: KVMaterial.h:208
virtual Double_t GetELostByParticle(KVNucleus *, TVector3 *norm=nullptr)
Definition: KVMaterial.cpp:769
virtual Double_t GetDeltaE(Int_t Z, Int_t A, Double_t Einc)
Definition: KVMaterial.cpp:835
virtual void Clear(Option_t *opt="")
Reset absorber - set stored energy lost by particles in absorber to zero.
virtual ~ KVMaterial()
KVMaterial()
default ctor
Definition: KVMaterial.cpp:77
virtual Double_t GetRange(Int_t Z, Int_t A, Double_t Einc)
Definition: KVMaterial.cpp:865
Bool_t IsIsotopic() const
Definition: KVMaterial.cpp:327
Double_t GetEffectiveThickness(TVector3 &norm, TVector3 &direction)
Definition: KVMaterial.cpp:700
virtual Double_t GetLinearRange(Int_t Z, Int_t A, Double_t Einc)
Definition: KVMaterial.cpp:902
virtual KVMaterial * GetActiveLayer() const
Definition: KVMaterial.h:185
Double_t GetMass() const
Definition: KVMaterial.cpp:305
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:126
v