CbmRoot
CbmTarget.h
Go to the documentation of this file.
1 
6 #ifndef CBMTARGET_H
7 #define CBMTARGET_H 1
8 
9 
10 #include "FairModule.h"
11 #include "TVector3.h"
12 #include <string>
13 
14 
31 class CbmTarget : public FairModule {
32 
33 public:
35  CbmTarget();
36 
37 
44  CbmTarget(const char* fileName);
45 
46 
58  CbmTarget(const char* element,
59  Double_t thickness,
60  Double_t diameter,
61  Double_t density = -1.);
62 
63 
74  CbmTarget(Int_t z,
75  Double_t thickness,
76  Double_t diameter,
77  Double_t density = -1.);
78 
79 
81  virtual ~CbmTarget() {};
82 
83 
85  virtual void ConstructGeometry();
86 
87 
91  Double_t GetDiameter() const { return fDiameter; }
92 
93 
97  TVector3 GetNormal() const;
98 
99 
103  TVector3 GetPosition() const { return TVector3(fPosX, fPosY, fPosZ); }
104 
105 
109  Double_t GetRotation() const { return fRotY; }
110 
111 
115  TVector3 GetSurfaceCentreDown() const;
116 
117 
121  TVector3 GetSurfaceCentreUp() const;
122 
123 
127  Double_t GetThickness() const { return fThickness; }
128 
129 
133  Double_t GetX() const { return fPosX; }
134 
135 
139  Double_t GetY() const { return fPosY; }
140 
141 
145  Double_t GetZ() const { return fPosZ; }
146 
147 
149  //virtual void Print(Option_t* = "") const;
150 
151 
159  virtual void SetGeometryFileName(TString name, TString geoVer = "0");
160 
161 
167  void SetPosition(Double_t x, Double_t y, Double_t z) {
168  fPosX = x;
169  fPosY = y;
170  fPosZ = z;
171  }
172 
173 
177  void SetRotation(Double_t angle) { fRotY = angle; }
178 
179 
181  std::string ToString() const;
182 
183 
184 private:
185  Int_t fZ;
186  Double_t fThickness;
187  Double_t fDiameter;
188  Double_t fDensity;
189  Double_t fPosX;
190  Double_t fPosY;
191  Double_t fPosZ;
192  Double_t fRotY;
193  TString fMaterial;
194  Bool_t fBuildFromFile;
195 
196 
201  Double_t GetStandardDensity(Int_t charge) const;
202 
203 
204  ClassDef(CbmTarget, 3)
205 };
206 
207 #endif //CBMTARGET_H
CbmTarget::fThickness
Double_t fThickness
Thickness [cm].
Definition: CbmTarget.h:186
CbmTarget::ConstructGeometry
virtual void ConstructGeometry()
Built the ROOT geometry.
Definition: CbmTarget.cxx:90
CbmTarget::GetThickness
Double_t GetThickness() const
Get target thickness @value Full target thickness in z [cm].
Definition: CbmTarget.h:127
CbmTarget::fRotY
Double_t fRotY
Target rotation angle around the y axis [rad].
Definition: CbmTarget.h:192
CbmTarget::GetSurfaceCentreDown
TVector3 GetSurfaceCentreDown() const
Downstream surface centre.
Definition: CbmTarget.cxx:217
CbmTarget::SetGeometryFileName
virtual void SetGeometryFileName(TString name, TString geoVer="0")
Output to stdout.
Definition: CbmTarget.cxx:235
CbmTarget::GetDiameter
Double_t GetDiameter() const
Get target diameter.
Definition: CbmTarget.h:91
CbmTarget::fPosY
Double_t fPosY
Target centre position in y [cm].
Definition: CbmTarget.h:190
CbmTarget
Class for constructing the geometry of the CBM target.
Definition: CbmTarget.h:31
CbmTarget::GetSurfaceCentreUp
TVector3 GetSurfaceCentreUp() const
Upstream surface centre.
Definition: CbmTarget.cxx:226
CbmTarget::GetZ
Double_t GetZ() const
Get z coordinate of target centre.
Definition: CbmTarget.h:145
CbmTarget::fPosZ
Double_t fPosZ
Target centre position in z [cm].
Definition: CbmTarget.h:191
CbmTarget::SetPosition
void SetPosition(Double_t x, Double_t y, Double_t z)
Set the position of the target w.r.t. the global coordinate system.
Definition: CbmTarget.h:167
CbmTarget::GetNormal
TVector3 GetNormal() const
Normal vector.
Definition: CbmTarget.cxx:189
CbmTarget::fBuildFromFile
Bool_t fBuildFromFile
Flag for building from geometry file.
Definition: CbmTarget.h:194
CbmTarget::GetRotation
Double_t GetRotation() const
Get target rotation angle.
Definition: CbmTarget.h:109
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmTarget::fZ
Int_t fZ
Atomic charge of target material.
Definition: CbmTarget.h:185
CbmTarget::fPosX
Double_t fPosX
Target centre position in x [cm].
Definition: CbmTarget.h:189
CbmTarget::GetY
Double_t GetY() const
Get y coordinate of target centre.
Definition: CbmTarget.h:139
CbmTarget::CbmTarget
CbmTarget()
Default constructor.
Definition: CbmTarget.cxx:18
CbmTarget::SetRotation
void SetRotation(Double_t angle)
Set the rotation of the target w.r.t. the global coordinate system.
Definition: CbmTarget.h:177
CbmTarget::ToString
std::string ToString() const
Info.
Definition: CbmTarget.cxx:244
CbmTarget::~CbmTarget
virtual ~CbmTarget()
Destructor.
Definition: CbmTarget.h:81
CbmTarget::GetX
Double_t GetX() const
Get x coordinate of target centre.
Definition: CbmTarget.h:133
CbmTarget::GetPosition
TVector3 GetPosition() const
Definition: CbmTarget.h:103
CbmTarget::GetStandardDensity
Double_t GetStandardDensity(Int_t charge) const
Definition: CbmTarget.cxx:196
CbmTarget::fDensity
Double_t fDensity
Density of target material [g/cm^3].
Definition: CbmTarget.h:188
CbmTarget::fDiameter
Double_t fDiameter
Diameter [cm].
Definition: CbmTarget.h:187
CbmTarget::fMaterial
TString fMaterial
Material name.
Definition: CbmTarget.h:193