CbmRoot
CbmKFMaterial.h
Go to the documentation of this file.
1 
11 #ifndef CBMKFMATERIAL_H
12 #define CBMKFMATERIAL_H 1
13 
14 #include "CbmKFTrackInterface.h"
15 class TString;
16 
17 class CbmKFMaterial : public TObject {
18 public:
20  : ID(-1)
21  , ZReference(-1)
22  , ZThickness(-1)
23  , RadLength(-1)
24  , F(1)
25  , Fe(0.02145) {}
26  virtual ~CbmKFMaterial() {};
27 
28  Int_t ID;
29  Double_t ZReference;
30  Double_t ZThickness;
31  Double_t RadLength;
32  Double_t F;
33  Double_t Fe;
34  virtual Bool_t IsOutside(Double_t, Double_t) { return 0; }
35 
36  virtual Int_t Pass(Double_t ZCross,
37  Double_t ZThick,
38  CbmKFTrackInterface& track,
39  Bool_t downstream,
40  Double_t& QP0);
41 
42  virtual Int_t
43  Pass(CbmKFTrackInterface& track, Bool_t downstream, Double_t& QP0) {
44  return Pass(ZReference, ZThickness, track, downstream, QP0);
45  }
46 
47  virtual Int_t Pass(CbmKFTrackInterface& track, Bool_t downstream) {
48  Double_t QP0 = track.GetTrack()[4];
49  return Pass(ZReference, ZThickness, track, downstream, QP0);
50  }
51 
52  virtual TString KFInfo() const;
53 
54  static Bool_t comparePDown(const CbmKFMaterial* a, const CbmKFMaterial* b) {
55  return a->ZReference < b->ZReference;
56  }
57 
58  static Bool_t compareP_z(const CbmKFMaterial* a, Double_t z) {
59  return (a->ZReference + a->ZThickness / 2) < z;
60  }
61 
62  static Bool_t compareP_Z(Double_t z, const CbmKFMaterial* a) {
63  return z < (a->ZReference + a->ZThickness / 2);
64  }
65 
66  ClassDef(CbmKFMaterial, 1)
67 };
68 
69 class CbmKFWall : public CbmKFMaterial {
70 public:
71  CbmKFWall() {}
73 
74  ClassDef(CbmKFWall, 1)
75 };
76 
77 class CbmKFTube : public CbmKFMaterial {
78 public:
79  CbmKFTube() : x(0), y(0), z(0), dz(0), r(0), R(0), rr(0), RR(0) {}
80  CbmKFTube(Int_t ID,
81  Double_t x,
82  Double_t y,
83  Double_t z,
84  Double_t dz,
85  Double_t r,
86  Double_t R,
87  Double_t radL);
89 
90  TString KFInfo() const;
91 
92  Double_t x, y, z, dz;
93  Double_t r, R, rr, RR;
94 
95  Bool_t IsOutside(Double_t X, Double_t Y) {
96  X -= x;
97  Y -= y;
98  Double_t r2 = X * X + Y * Y;
99  return (r2 < rr || RR < r2);
100  }
101  ClassDef(CbmKFTube, 1)
102 };
103 
104 class CbmKFBox : public CbmKFMaterial {
105 public:
106  CbmKFBox() : x(0), y(0), z(0), dx05(0), dy05(0), dz(0) {}
107  CbmKFBox(Int_t ID,
108  Double_t x,
109  Double_t y,
110  Double_t z,
111  Double_t dx,
112  Double_t dy,
113  Double_t dz,
114  Double_t radL);
116 
117  TString KFInfo() const;
118 
119  Double_t x, y, z, dx05, dy05, dz;
120 
121  Bool_t IsOutside(Double_t X, Double_t Y);
122 
123  ClassDef(CbmKFBox, 1)
124 };
125 
126 class CbmKFCone : public CbmKFMaterial {
127 public:
128  CbmKFCone() : z1(0), z2(0), r1(0), R1(0), r2(0), R2(0) {};
130 
131  Double_t z1, z2;
132  Double_t r1, R1, r2, R2;
133 
134  Int_t Pass(Double_t ZCross,
135  Double_t ZThick,
136  CbmKFTrackInterface& track,
137  Bool_t downstream,
138  Double_t& QP0);
139 
140  Int_t Pass(CbmKFTrackInterface& track, Bool_t downstream, Double_t& QP0) {
141  return Pass(ZReference, ZThickness, track, downstream, QP0);
142  }
143 
144  Int_t Pass(CbmKFTrackInterface& track, Bool_t downstream) {
145  Double_t QP0 = track.GetTrack()[4];
146  return Pass(ZReference, ZThickness, track, downstream, QP0);
147  }
148  ClassDef(CbmKFCone, 1)
149 };
150 
151 
152 #endif /* !CBMKFMATERIAL_H */
CbmKFBox
Definition: CbmKFMaterial.h:104
CbmKFTube::z
Double_t z
Definition: CbmKFMaterial.h:92
CbmKFCone
Definition: CbmKFMaterial.h:126
CbmKFTube::RR
Double_t RR
Definition: CbmKFMaterial.h:93
CbmKFTube::IsOutside
Bool_t IsOutside(Double_t X, Double_t Y)
Definition: CbmKFMaterial.h:95
CbmKFTube::CbmKFTube
CbmKFTube()
Definition: CbmKFMaterial.h:79
CbmKFBox::z
Double_t z
Definition: CbmKFMaterial.h:119
CbmKFBox::dx05
Double_t dx05
Definition: CbmKFMaterial.h:119
CbmKFMaterial::compareP_Z
static Bool_t compareP_Z(Double_t z, const CbmKFMaterial *a)
Definition: CbmKFMaterial.h:62
CbmKFTrackInterface::GetTrack
virtual Double_t * GetTrack()
Is it electron.
Definition: CbmKFTrackInterface.cxx:33
CbmKFMaterial::ZThickness
Double_t ZThickness
Definition: CbmKFMaterial.h:30
CbmKFCone::R2
Double_t R2
Definition: CbmKFMaterial.h:132
CbmKFBox::dy05
Double_t dy05
Definition: CbmKFMaterial.h:119
CbmKFCone::~CbmKFCone
~CbmKFCone()
Definition: CbmKFMaterial.h:129
CbmKFMaterial::comparePDown
static Bool_t comparePDown(const CbmKFMaterial *a, const CbmKFMaterial *b)
Definition: CbmKFMaterial.h:54
CbmKFWall::~CbmKFWall
~CbmKFWall()
Definition: CbmKFMaterial.h:72
CbmKFTube::KFInfo
TString KFInfo() const
Definition: CbmKFMaterial.cxx:84
CbmKFCone::R1
Double_t R1
Definition: CbmKFMaterial.h:132
CbmKFBox::dz
Double_t dz
Definition: CbmKFMaterial.h:119
CbmKFTube::R
Double_t R
Definition: CbmKFMaterial.h:93
CbmKFMaterial
Definition: CbmKFMaterial.h:17
CbmKFTrackInterface.h
CbmKFMaterial::F
Double_t F
Definition: CbmKFMaterial.h:32
CbmKFCone::r1
Double_t r1
Definition: CbmKFMaterial.h:132
CbmKFCone::Pass
Int_t Pass(CbmKFTrackInterface &track, Bool_t downstream)
Definition: CbmKFMaterial.h:144
CbmKFBox::IsOutside
Bool_t IsOutside(Double_t X, Double_t Y)
Definition: CbmKFMaterial.cxx:119
CbmKFMaterial::ID
Int_t ID
Definition: CbmKFMaterial.h:26
CbmKFBox::KFInfo
TString KFInfo() const
Definition: CbmKFMaterial.cxx:123
CbmKFBox::~CbmKFBox
~CbmKFBox()
Definition: CbmKFMaterial.h:115
CbmKFWall
Definition: CbmKFMaterial.h:69
CbmKFCone::Pass
Int_t Pass(CbmKFTrackInterface &track, Bool_t downstream, Double_t &QP0)
Definition: CbmKFMaterial.h:140
CbmKFCone::Pass
Int_t Pass(Double_t ZCross, Double_t ZThick, CbmKFTrackInterface &track, Bool_t downstream, Double_t &QP0)
Definition: CbmKFMaterial.cxx:142
CbmKFMaterial::RadLength
Double_t RadLength
Definition: CbmKFMaterial.h:31
CbmKFMaterial::KFInfo
virtual TString KFInfo() const
Definition: CbmKFMaterial.cxx:13
CbmKFWall::CbmKFWall
CbmKFWall()
Definition: CbmKFMaterial.h:71
CbmKFMaterial::IsOutside
virtual Bool_t IsOutside(Double_t, Double_t)
Definition: CbmKFMaterial.h:34
CbmKFMaterial::ZReference
Double_t ZReference
Definition: CbmKFMaterial.h:29
CbmKFTube::rr
Double_t rr
Definition: CbmKFMaterial.h:93
CbmKFTube::dz
Double_t dz
Definition: CbmKFMaterial.h:92
CbmKFBox::x
Double_t x
Definition: CbmKFMaterial.h:119
CbmKFCone::CbmKFCone
CbmKFCone()
Definition: CbmKFMaterial.h:128
CbmKFTube::x
Double_t x
Definition: CbmKFMaterial.h:92
CbmKFTube::r
Double_t r
Definition: CbmKFMaterial.h:93
CbmKFTrackInterface
Definition: CbmKFTrackInterface.h:26
CbmKFTube::y
Double_t y
Definition: CbmKFMaterial.h:92
CbmKFMaterial::CbmKFMaterial
CbmKFMaterial()
Definition: CbmKFMaterial.h:19
CbmKFTube
Definition: CbmKFMaterial.h:77
CbmKFTube::~CbmKFTube
~CbmKFTube()
Definition: CbmKFMaterial.h:88
CbmKFMaterial::~CbmKFMaterial
virtual ~CbmKFMaterial()
Definition: CbmKFMaterial.h:26
CbmKFMaterial::Pass
virtual Int_t Pass(Double_t ZCross, Double_t ZThick, CbmKFTrackInterface &track, Bool_t downstream, Double_t &QP0)
Definition: CbmKFMaterial.cxx:25
CbmKFMaterial::compareP_z
static Bool_t compareP_z(const CbmKFMaterial *a, Double_t z)
Definition: CbmKFMaterial.h:58
CbmKFCone::r2
Double_t r2
Definition: CbmKFMaterial.h:132
CbmKFMaterial::Fe
Double_t Fe
Definition: CbmKFMaterial.h:33
CbmKFBox::y
Double_t y
Definition: CbmKFMaterial.h:119
CbmKFMaterial::Pass
virtual Int_t Pass(CbmKFTrackInterface &track, Bool_t downstream)
Definition: CbmKFMaterial.h:47
CbmKFMaterial::Pass
virtual Int_t Pass(CbmKFTrackInterface &track, Bool_t downstream, Double_t &QP0)
Definition: CbmKFMaterial.h:43
CbmKFBox::CbmKFBox
CbmKFBox()
Definition: CbmKFMaterial.h:106
CbmKFCone::z2
Double_t z2
Definition: CbmKFMaterial.h:131
CbmKFCone::z1
Double_t z1
Definition: CbmKFMaterial.h:131