CbmRoot
|
Class for constructing the geometry of the CBM target. More...
#include <CbmTarget.h>
Public Member Functions | |
CbmTarget () | |
Default constructor. More... | |
CbmTarget (const char *fileName) | |
Constructor with file name. More... | |
CbmTarget (const char *element, Double_t thickness, Double_t diameter, Double_t density=-1.) | |
Constructor with target properties. More... | |
CbmTarget (Int_t z, Double_t thickness, Double_t diameter, Double_t density=-1.) | |
Constructor with target properties. More... | |
virtual | ~CbmTarget () |
Destructor. More... | |
virtual void | ConstructGeometry () |
Built the ROOT geometry. More... | |
Double_t | GetDiameter () const |
Get target diameter. More... | |
TVector3 | GetNormal () const |
Normal vector. More... | |
TVector3 | GetPosition () const |
Double_t | GetRotation () const |
Get target rotation angle. More... | |
TVector3 | GetSurfaceCentreDown () const |
Downstream surface centre. More... | |
TVector3 | GetSurfaceCentreUp () const |
Upstream surface centre. More... | |
Double_t | GetThickness () const |
Get target thickness @value Full target thickness in z [cm]. More... | |
Double_t | GetX () const |
Get x coordinate of target centre. More... | |
Double_t | GetY () const |
Get y coordinate of target centre. More... | |
Double_t | GetZ () const |
Get z coordinate of target centre. More... | |
virtual void | SetGeometryFileName (TString name, TString geoVer="0") |
Output to stdout. More... | |
void | SetPosition (Double_t x, Double_t y, Double_t z) |
Set the position of the target w.r.t. the global coordinate system. More... | |
void | SetRotation (Double_t angle) |
Set the rotation of the target w.r.t. the global coordinate system. More... | |
std::string | ToString () const |
Info. More... | |
Private Member Functions | |
Double_t | GetStandardDensity (Int_t charge) const |
Private Attributes | |
Int_t | fZ |
Atomic charge of target material. More... | |
Double_t | fThickness |
Thickness [cm]. More... | |
Double_t | fDiameter |
Diameter [cm]. More... | |
Double_t | fDensity |
Density of target material [g/cm^3]. More... | |
Double_t | fPosX |
Target centre position in x [cm]. More... | |
Double_t | fPosY |
Target centre position in y [cm]. More... | |
Double_t | fPosZ |
Target centre position in z [cm]. More... | |
Double_t | fRotY |
Target rotation angle around the y axis [rad]. More... | |
TString | fMaterial |
Material name. More... | |
Bool_t | fBuildFromFile |
Flag for building from geometry file. More... | |
Class for constructing the geometry of the CBM target.
The target of CBM can be created either on the fly, by specifying the target material (element), its thickness, its diameter and the density of the material. In this case, a single volume of shape TUBE will be positioned at the target position, as daughter of the node already present there. If no position is specified by the method SetPosition, the target is placed at the origin of the global coordinate system.
In case a geometry file is specified, the geometry will be constructed from this file in the same manner as for all other modules.
Definition at line 31 of file CbmTarget.h.
CbmTarget::CbmTarget | ( | ) |
Default constructor.
Definition at line 18 of file CbmTarget.cxx.
CbmTarget::CbmTarget | ( | const char * | fileName | ) |
Constructor with file name.
fileName | Name of geometry file |
This constructor will force the target geometry to be constructed from a geometry file (ROOT format only).
Definition at line 34 of file CbmTarget.cxx.
References SetGeometryFileName().
CbmTarget::CbmTarget | ( | const char * | element, |
Double_t | thickness, | ||
Double_t | diameter, | ||
Double_t | density = -1. |
||
) |
Constructor with target properties.
element | Element name of target material (Full name or element symbol, e.g. "Gold", "Au"); |
thickness | Thickness in z [cm] |
diameter | Diameter [cm] |
density | Density [g/cm^3]. If negative (default), density under standard conditions will be taken, if available. |
By using this constructor, the target geometry will be constructed as a tube with material and parameters specified as arguments.
Definition at line 52 of file CbmTarget.cxx.
CbmTarget::CbmTarget | ( | Int_t | z, |
Double_t | thickness, | ||
Double_t | diameter, | ||
Double_t | density = -1. |
||
) |
Constructor with target properties.
z | Atomic charge of target material element |
thickness | Thickness in z [cm] |
diameter | Diameter [cm] |
density | Density [g/cm^3]. If negative, density under standard conditions will be taken. |
By using this constructor, the target geometry will be constructed as a tube with material and parameters specified as arguments.
Definition at line 71 of file CbmTarget.cxx.
|
inlinevirtual |
Destructor.
Definition at line 81 of file CbmTarget.h.
|
virtual |
Built the ROOT geometry.
Definition at line 90 of file CbmTarget.cxx.
References DEBUG, fBuildFromFile, fDensity, fDiameter, fMaterial, fPosX, fPosY, fPosZ, fRotY, fThickness, fZ, and GetStandardDensity().
|
inline |
Get target diameter.
Definition at line 91 of file CbmTarget.h.
References fDiameter.
Referenced by CbmBeamProfile::CheckWithTarget().
TVector3 CbmTarget::GetNormal | ( | ) | const |
Normal vector.
Definition at line 189 of file CbmTarget.cxx.
References fRotY.
Referenced by CbmBeamProfile::CheckWithTarget().
|
inline |
Get target centre position
Definition at line 103 of file CbmTarget.h.
|
inline |
Get target rotation angle.
Definition at line 109 of file CbmTarget.h.
References fRotY.
|
private |
Get the standard density (at standard conditions)
charge | atomic charge of material |
Definition at line 196 of file CbmTarget.cxx.
Referenced by ConstructGeometry().
TVector3 CbmTarget::GetSurfaceCentreDown | ( | ) | const |
Downstream surface centre.
Definition at line 217 of file CbmTarget.cxx.
References fPosX, fPosY, fPosZ, fRotY, and fThickness.
Referenced by CbmBeamProfile::CheckWithTarget().
TVector3 CbmTarget::GetSurfaceCentreUp | ( | ) | const |
Upstream surface centre.
Definition at line 226 of file CbmTarget.cxx.
References fPosX, fPosY, fPosZ, fRotY, and fThickness.
Referenced by CbmBeamProfile::CheckWithTarget().
|
inline |
Get target thickness @value Full target thickness in z [cm].
Definition at line 127 of file CbmTarget.h.
References fThickness.
|
inline |
Get x coordinate of target centre.
Definition at line 133 of file CbmTarget.h.
References fPosX.
|
inline |
Get y coordinate of target centre.
Definition at line 139 of file CbmTarget.h.
References fPosY.
|
inline |
Get z coordinate of target centre.
Definition at line 145 of file CbmTarget.h.
References fPosZ.
|
virtual |
Output to stdout.
Set the geometry file name
name | Name of geometry file |
geoVer | Not used |
If a geometry file is set by this method, the target geometry will be built from this file; the parameters will have no effect.
Definition at line 235 of file CbmTarget.cxx.
References fBuildFromFile.
Referenced by CbmTarget().
|
inline |
|
inline |
Set the rotation of the target w.r.t. the global coordinate system.
angle | target rotation angle around the y axis [rad] |
Definition at line 177 of file CbmTarget.h.
References fRotY.
std::string CbmTarget::ToString | ( | ) | const |
Info.
Definition at line 244 of file CbmTarget.cxx.
References fBuildFromFile, fDensity, fDiameter, fMaterial, fPosX, fPosY, fPosZ, fRotY, and fThickness.
|
private |
Flag for building from geometry file.
Definition at line 194 of file CbmTarget.h.
Referenced by ConstructGeometry(), SetGeometryFileName(), and ToString().
|
private |
Density of target material [g/cm^3].
Definition at line 188 of file CbmTarget.h.
Referenced by ConstructGeometry(), and ToString().
|
private |
Diameter [cm].
Definition at line 187 of file CbmTarget.h.
Referenced by ConstructGeometry(), GetDiameter(), and ToString().
|
private |
Material name.
Definition at line 193 of file CbmTarget.h.
Referenced by ConstructGeometry(), and ToString().
|
private |
Target centre position in x [cm].
Definition at line 189 of file CbmTarget.h.
Referenced by ConstructGeometry(), GetPosition(), GetSurfaceCentreDown(), GetSurfaceCentreUp(), GetX(), SetPosition(), and ToString().
|
private |
Target centre position in y [cm].
Definition at line 190 of file CbmTarget.h.
Referenced by ConstructGeometry(), GetPosition(), GetSurfaceCentreDown(), GetSurfaceCentreUp(), GetY(), SetPosition(), and ToString().
|
private |
Target centre position in z [cm].
Definition at line 191 of file CbmTarget.h.
Referenced by ConstructGeometry(), GetPosition(), GetSurfaceCentreDown(), GetSurfaceCentreUp(), GetZ(), SetPosition(), and ToString().
|
private |
Target rotation angle around the y axis [rad].
Definition at line 192 of file CbmTarget.h.
Referenced by ConstructGeometry(), GetNormal(), GetRotation(), GetSurfaceCentreDown(), GetSurfaceCentreUp(), SetRotation(), and ToString().
|
private |
Thickness [cm].
Definition at line 186 of file CbmTarget.h.
Referenced by ConstructGeometry(), GetSurfaceCentreDown(), GetSurfaceCentreUp(), GetThickness(), and ToString().
|
private |
Atomic charge of target material.
Definition at line 185 of file CbmTarget.h.
Referenced by ConstructGeometry().