KaliVeda
Toolkit for HIC analysis
KVedaLossMaterial.h
1 
4 #ifndef __KVEDALOSSMATERIAL_H
5 #define __KVEDALOSSMATERIAL_H
6 
7 #include "KVIonRangeTableMaterial.h"
8 #include <Riostream.h>
9 #include "TObjArray.h"
10 #include <vector>
11 
12 class TGeoMaterial;
13 class KVedaLoss;
14 
16 #define ZMAX_VEDALOSS 100
17 #define VERY_BIG_ENERGY 1.e+6
18 
28 
29 private:
30  static KVedaLoss* fgTable;
34  std::vector<Double_t>* par;
38 
39 protected:
40  std::vector<Double_t> fEmin;
41  std::vector<Double_t> fEmax;
42  std::vector< std::vector<Double_t> > fCoeff;
43 
44  static Bool_t fNoLimits;
45 
50 
51 public:
53  KVedaLossMaterial(const KVIonRangeTable*, const Char_t* name, const Char_t* type, const Char_t* state,
54  Double_t density, Double_t Z, Double_t A, Double_t MoleWt = 0.0);
55  virtual ~KVedaLossMaterial();
56 
57  Bool_t ReadRangeTable(FILE* fp);
58  Float_t GetEmaxValid(Int_t Z, Int_t A) const override
59  {
60  return (CheckIon(Z) ? A * fEmax[Z - 1] : 0.0);
61  };
62  Float_t GetEminValid(Int_t Z, Int_t A) const override
63  {
64  return (CheckIon(Z) ? A * fEmin[Z - 1] : 0.0);
65  };
66 
67  TF1* GetRangeFunction(Int_t Z, Int_t A, Double_t isoAmat = 0) override;
68  TF1* GetDeltaEFunction(Double_t e, Int_t Z, Int_t A, Double_t isoAmat = 0) override;
69  TF1* GetEResFunction(Double_t e, Int_t Z, Int_t A, Double_t isoAmat = 0) override;
70  TF1* GetStoppingFunction(Int_t Z, Int_t A, Double_t isoAmat = 0) override;
71 
72  Double_t GetRangeOfIon(Int_t Z, Int_t A, Double_t E, Double_t isoAmat = 0.) override;
73  Double_t GetDeltaEOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat = 0.) override;
74  Double_t GetEResOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat = 0.) override;
75  Double_t GetPunchThroughEnergy(Int_t Z, Int_t A, Double_t e, Double_t isoAmat = 0.) override;
76  Double_t GetEIncFromEResOfIon(Int_t Z, Int_t A, Double_t Eres, Double_t e, Double_t isoAmat = 0.) override;
77 
78  static void SetNoLimits(Bool_t on = kTRUE)
79  {
91  fNoLimits = on;
92  };
93 
94  void GetParameters(Int_t Zion, Int_t& Aion, std::vector<Double_t>& rangepar);
95  static Bool_t CheckIon(Int_t Z)
96  {
97  return (Z > 0 && Z <= ZMAX_VEDALOSS);
98  }
99 
100  ClassDefOverride(KVedaLossMaterial, 4) //Description of material properties used by KVedaLoss range calculation
101 };
102 
103 #endif
int Int_t
bool Bool_t
char Char_t
float Float_t
double Double_t
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Material for use in energy loss & range calculations.
Abstract base class for calculation of range & energy loss of charged particles in matter.
Description of material in the KVedaLoss range table.
Double_t EResFunc(Double_t *, Double_t *)
TObjArray fInvRange
KVedaLossInverseRangeFunction objects.
static void SetNoLimits(Bool_t on=kTRUE)
static KVedaLoss * fgTable
Double_t thickness
in g/cm**2
Float_t GetEminValid(Int_t Z, Int_t A) const override
Double_t GetEResOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat=0.) override
Double_t StoppingFunc(Double_t *, Double_t *)
TF1 * GetStoppingFunction(Int_t Z, Int_t A, Double_t isoAmat=0) override
Bool_t ReadRangeTable(FILE *fp)
Double_t RF_Z
internal variables used by RangeFunc/DeltaEFunc
std::vector< Double_t > fEmin
Z-dependent minimum energy/nucleon for calculation to be valid.
Double_t GetRangeOfIon(Int_t Z, Int_t A, Double_t E, Double_t isoAmat=0.) override
virtual ~KVedaLossMaterial()
Destructor.
Double_t RangeFunc(Double_t *, Double_t *)
std::vector< Double_t > fEmax
Z-dependent maximum energy/nucleon for calculation to be valid.
Double_t GetPunchThroughEnergy(Int_t Z, Int_t A, Double_t e, Double_t isoAmat=0.) override
TF1 * GetEResFunction(Double_t e, Int_t Z, Int_t A, Double_t isoAmat=0) override
static Bool_t fNoLimits
if kTRUE, ignore max E limit for validity of calculation
Float_t GetEmaxValid(Int_t Z, Int_t A) const override
Double_t GetDeltaEOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat=0.) override
void GetParameters(Int_t Zion, Int_t &Aion, std::vector< Double_t > &rangepar)
static Bool_t CheckIon(Int_t Z)
std::vector< Double_t > * par
Double_t DeltaEFunc(Double_t *, Double_t *)
Double_t GetEIncFromEResOfIon(Int_t Z, Int_t A, Double_t Eres, Double_t e, Double_t isoAmat=0.) override
KVedaLossMaterial()
Default constructor.
TF1 * GetRangeFunction(Int_t Z, Int_t A, Double_t isoAmat=0) override
TF1 * GetDeltaEFunction(Double_t e, Int_t Z, Int_t A, Double_t isoAmat=0) override
std::vector< std::vector< Double_t > > fCoeff
parameters for range tables
C++ implementation of VEDALOSS stopping power calculation.
Definition: KVedaLoss.h:63