CbmRoot
Loading...
Searching...
No Matches
CbmTarget.h
Go to the documentation of this file.
1/* Copyright (C) 2006-2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
10#ifndef CBMTARGET_H
11#define CBMTARGET_H 1
12
13
14#include "FairModule.h"
15
16#include "TVector3.h"
17
18#include <string>
19
20
37class CbmTarget : public FairModule {
38
39public:
41 CbmTarget();
42
43
50 CbmTarget(const char* fileName);
51
52
64 CbmTarget(const char* element, Double_t thickness, Double_t diameter, Double_t density = -1.);
65
66
77 CbmTarget(Int_t z, Double_t thickness, Double_t diameter, 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 {
169 fPosX = x;
170 fPosY = y;
171 fPosZ = z;
172 }
173
174
178 void SetRotation(Double_t angle) { fRotY = angle; }
179
180
182 std::string ToString() const;
183
184
185private:
186 Int_t fZ;
187 Double_t fThickness;
188 Double_t fDiameter;
189 Double_t fDensity;
190 Double_t fPosX;
191 Double_t fPosY;
192 Double_t fPosZ;
193 Double_t fRotY;
194 TString fMaterial;
196
197
202 Double_t GetStandardDensity(Int_t charge) const;
203
204
205 ClassDef(CbmTarget, 3)
206};
207
208#endif //CBMTARGET_H
Class for constructing the geometry of the CBM target.
Definition CbmTarget.h:37
Double_t fPosX
Target centre position in x [cm].
Definition CbmTarget.h:190
Bool_t fBuildFromFile
Flag for building from geometry file.
Definition CbmTarget.h:195
CbmTarget()
Default constructor.
Definition CbmTarget.cxx:23
Double_t GetRotation() const
Get target rotation angle.
Definition CbmTarget.h:109
Double_t GetStandardDensity(Int_t charge) const
void SetRotation(Double_t angle)
Set the rotation of the target w.r.t. the global coordinate system.
Definition CbmTarget.h:178
Double_t GetX() const
Get x coordinate of target centre.
Definition CbmTarget.h:133
virtual void ConstructGeometry()
Built the ROOT geometry.
Definition CbmTarget.cxx:96
Double_t fDensity
Density of target material [g/cm^3].
Definition CbmTarget.h:189
Double_t fRotY
Target rotation angle around the y axis [rad].
Definition CbmTarget.h:193
TVector3 GetSurfaceCentreUp() const
Upstream surface centre.
Double_t GetZ() const
Get z coordinate of target centre.
Definition CbmTarget.h:145
Double_t fThickness
Thickness [cm].
Definition CbmTarget.h:187
TVector3 GetSurfaceCentreDown() const
Downstream surface centre.
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
Double_t GetThickness() const
Get target thickness @value Full target thickness in z [cm].
Definition CbmTarget.h:127
virtual ~CbmTarget()
Destructor.
Definition CbmTarget.h:81
TVector3 GetPosition() const
Definition CbmTarget.h:103
TString fMaterial
Material name.
Definition CbmTarget.h:194
Double_t GetDiameter() const
Get target diameter.
Definition CbmTarget.h:91
std::string ToString() const
Info.
Int_t fZ
Atomic charge of target material.
Definition CbmTarget.h:186
TVector3 GetNormal() const
Normal vector.
Double_t fPosZ
Target centre position in z [cm].
Definition CbmTarget.h:192
Double_t fDiameter
Diameter [cm].
Definition CbmTarget.h:188
Double_t fPosY
Target centre position in y [cm].
Definition CbmTarget.h:191
virtual void SetGeometryFileName(TString name, TString geoVer="0")
Output to stdout.
Double_t GetY() const
Get y coordinate of target centre.
Definition CbmTarget.h:139