FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairGeoMedium.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #ifndef FAIRGEOMEDIUM_H
9 #define FAIRGEOMEDIUM_H
10 
11 #include <Rtypes.h> // for Double_t, Int_t, Bool_t, etc
12 #include <TNamed.h> // for TNamed
13 #include <iosfwd> // for fstream
14 
19 class FairGeoMedium : public TNamed
20 {
21  private:
22  Int_t medId;
23  Int_t autoflag;
24  Int_t nComponents;
25  Int_t weightFac;
26  Double_t* ca; //[nComponents] /** Atomic weights for the components*/
27  Double_t* cz; //[nComponents] /** Atomic numbers for the components*/
28  Double_t* cw; //[nComponents] /** Weights of the components in a mixture*/
29  Double_t density;
30  Double_t radLen;
31  Int_t sensFlag;
32  Int_t fldFlag;
33  Double_t fld;
34  Double_t epsil;
35  Double_t madfld;
36  Double_t maxstep;
37  Double_t maxde;
38  Double_t minstep;
39  Int_t npckov;
40  Double_t* ppckov; //[npckov] /** Photon momentum*/
41  Double_t* absco; //[npckov] /** Absoption length*/
42  Double_t* effic; //[npckov] /** Detection efficiency*/
43  Double_t* rindex; //[npckov] /** Refraction index*/
44  public:
45  FairGeoMedium(const char* name = "");
46  FairGeoMedium& operator=(const FairGeoMedium&) { return *this; }
48  void setMediumIndex(Int_t i) { medId = i; }
49  Int_t getMediumIndex() { return medId; }
50  void setAutoFlag(Int_t i) { autoflag = i; }
51  Int_t getAutoFlag() { return autoflag; }
52  void setNComponents(Int_t);
53  Int_t getNComponents() { return nComponents; }
54  Bool_t setComponent(Int_t, Double_t, Double_t, Double_t w = 1.);
55  void getComponent(Int_t, Double_t*);
56  Int_t getWeightFac() { return weightFac; }
57  void setDensity(Double_t d) { density = d; }
58  Double_t getDensity() { return density; }
59  void setRadiationLength(Double_t l) { radLen = l; }
60  Double_t getRadiationLength() { return radLen; }
61  void setNpckov(Int_t);
62  Int_t getNpckov() { return npckov; }
63  Bool_t setCerenkovPar(Int_t, Double_t, Double_t, Double_t, Double_t);
64  void getCerenkovPar(Int_t, Double_t*);
65  void setMediumPar(Int_t,
66  Int_t,
67  Double_t,
68  Double_t,
69  Double_t maxDeviation = -1.,
70  Double_t maxStep = -1.,
71  Double_t maxDE = -1.,
72  Double_t minStepDouble_t = -1.);
73  void getMediumPar(Double_t*);
74  inline Bool_t isSensitive();
75  Int_t getSensitivityFlag() { return sensFlag; }
76  Int_t getFieldFlag() { return fldFlag; }
77  Double_t getField() { return fld; }
78  Double_t getEpsil() { return epsil; }
79  void read(std::fstream&, Int_t autoflag);
80  void print();
81  void write(std::fstream&);
82  Bool_t calcRadiationLength();
83 
84  private:
86  // TODO: correct copy constructor for FairGeoMedium
87  // FairGeoMedium& operator=(const FairGeoMedium&);
88 
89  ClassDef(FairGeoMedium, 1); //
90 };
91 
93 {
94  if (sensFlag) {
95  return kTRUE;
96  } else {
97  return kFALSE;
98  }
99 }
100 
101 #endif /* !FAIRGEOMEDIUM_H */
void setDensity(Double_t d)
Definition: FairGeoMedium.h:57
Int_t getFieldFlag()
Definition: FairGeoMedium.h:76
void setNComponents(Int_t)
Double_t getRadiationLength()
Definition: FairGeoMedium.h:60
Bool_t setComponent(Int_t, Double_t, Double_t, Double_t w=1.)
void write(std::fstream &)
FairGeoMedium(const char *name="")
Int_t getWeightFac()
Definition: FairGeoMedium.h:56
FairGeoMedium & operator=(const FairGeoMedium &)
Definition: FairGeoMedium.h:46
Bool_t setCerenkovPar(Int_t, Double_t, Double_t, Double_t, Double_t)
void getCerenkovPar(Int_t, Double_t *)
void getMediumPar(Double_t *)
void setRadiationLength(Double_t l)
Definition: FairGeoMedium.h:59
void setNpckov(Int_t)
void read(std::fstream &, Int_t autoflag)
Double_t getDensity()
Definition: FairGeoMedium.h:58
Int_t getNComponents()
Definition: FairGeoMedium.h:53
Int_t getNpckov()
Definition: FairGeoMedium.h:62
void setMediumIndex(Int_t i)
Definition: FairGeoMedium.h:48
Double_t getField()
Definition: FairGeoMedium.h:77
void setAutoFlag(Int_t i)
Definition: FairGeoMedium.h:50
void getComponent(Int_t, Double_t *)
Bool_t calcRadiationLength()
void setMediumPar(Int_t, Int_t, Double_t, Double_t, Double_t maxDeviation=-1., Double_t maxStep=-1., Double_t maxDE=-1., Double_t minStepDouble_t=-1.)
Int_t getAutoFlag()
Definition: FairGeoMedium.h:51
Bool_t isSensitive()
Definition: FairGeoMedium.h:92
Int_t getSensitivityFlag()
Definition: FairGeoMedium.h:75
Int_t getMediumIndex()
Definition: FairGeoMedium.h:49
Double_t getEpsil()
Definition: FairGeoMedium.h:78