EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairGeoMedium.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairGeoMedium.h
1 #ifndef FAIRGEOMEDIUM_H
2 #define FAIRGEOMEDIUM_H
3 
4 #include "TNamed.h"
5 
6 #include <fstream>
7 //#include <iomanip>
8 
13 class FairGeoMedium : public TNamed
14 {
15  // setSensitivityFlag() is missing anyway; do not overcomplicate things further;
16  friend class FairModule;
17 
18  private:
19  Int_t medId;
20  Int_t autoflag;
21  Int_t nComponents;
22  Int_t weightFac;
23  Double_t* ca; //[nComponents] /** Atomic weights for the components*/
24  Double_t* cz; //[nComponents] /** Atomic numbers for the components*/
25  Double_t* cw; //[nComponents] /** Weights of the components in a mixture*/
26  Double_t density;
27  Double_t radLen;
28  Int_t sensFlag;
29  Int_t fldFlag;
30  Double_t fld;
31  Double_t epsil;
32  Double_t madfld;
33  Double_t maxstep;
34  Double_t maxde;
35  Double_t minstep;
36  Int_t npckov;
37  Double_t* ppckov; //[npckov] /** Photon momentum*/
38  Double_t* absco; //[npckov] /** Absoption length*/
39  Double_t* effic; //[npckov] /** Detection efficiency*/
40  Double_t* rindex; //[npckov] /** Refraction index*/
41  public:
42  FairGeoMedium(const char* name="");
43  FairGeoMedium& operator=(const FairGeoMedium&) {return *this;}
45  void setMediumIndex(Int_t i) {medId=i;}
46  Int_t getMediumIndex() {return medId;}
47  void setAutoFlag(Int_t i) {autoflag=i;}
48  Int_t getAutoFlag() {return autoflag;}
49  void setNComponents(Int_t);
50  Int_t getNComponents() {return nComponents;}
51  Bool_t setComponent(Int_t,Double_t,Double_t,Double_t w=1.);
52  void getComponent(Int_t,Double_t*);
53  Int_t getWeightFac() {return weightFac;}
54  void setDensity(Double_t d) {density=d;}
55  Double_t getDensity() {return density;}
56  void setRadiationLength(Double_t l) {radLen=l;}
57  Double_t getRadiationLength() {return radLen;}
58  void setNpckov(Int_t);
59  Int_t getNpckov() {return npckov;}
60  Bool_t setCerenkovPar(Int_t,Double_t,Double_t,Double_t,Double_t);
61  void getCerenkovPar(Int_t,Double_t*);
62  void setMediumPar(Int_t,Int_t,Double_t,Double_t,Double_t maxDeviation=-1.,
63  Double_t maxStep=-1.,Double_t maxDE=-1.,
64  Double_t minStepDouble_t=-1.);
65  void getMediumPar(Double_t*);
66  inline Bool_t isSensitive();
67  Int_t getSensitivityFlag() { return sensFlag;}
68  Int_t getFieldFlag() {return fldFlag;}
69  Double_t getField() {return fld;}
70  Double_t getEpsil() {return epsil;}
71  void read(std::fstream&, Int_t autoflag );
72  void print();
73  void write (std::fstream&);
74  Bool_t calcRadiationLength();
75  private:
77  //TODO: correct copy constructor for FairGeoMedium
78  // FairGeoMedium& operator=(const FairGeoMedium&);
79 
80  ClassDef(FairGeoMedium,1) //
81 };
82 
84 {
85  if (sensFlag) { return kTRUE; }
86  else { return kFALSE; }
87 }
88 
89 #endif /* !FAIRGEOMEDIUM_H */