CbmRoot
|
Class for constructing the geometry of the CBM target. More...
#include <CbmTarget.h>
Public Member Functions | |
CbmTarget () | |
Default constructor. | |
CbmTarget (const char *fileName) | |
Constructor with file name. | |
CbmTarget (const char *element, Double_t thickness, Double_t diameter, Double_t density=-1.) | |
Constructor with target properties. | |
CbmTarget (Int_t z, Double_t thickness, Double_t diameter, Double_t density=-1.) | |
Constructor with target properties. | |
virtual | ~CbmTarget () |
Destructor. | |
virtual void | ConstructGeometry () |
Built the ROOT geometry. | |
Double_t | GetDiameter () const |
Get target diameter. | |
TVector3 | GetNormal () const |
Normal vector. | |
TVector3 | GetPosition () const |
Double_t | GetRotation () const |
Get target rotation angle. | |
TVector3 | GetSurfaceCentreDown () const |
Downstream surface centre. | |
TVector3 | GetSurfaceCentreUp () const |
Upstream surface centre. | |
Double_t | GetThickness () const |
Get target thickness @value Full target thickness in z [cm]. | |
Double_t | GetX () const |
Get x coordinate of target centre. | |
Double_t | GetY () const |
Get y coordinate of target centre. | |
Double_t | GetZ () const |
Get z coordinate of target centre. | |
virtual void | SetGeometryFileName (TString name, TString geoVer="0") |
Output to stdout. | |
void | SetPosition (Double_t x, Double_t y, Double_t z) |
Set the position of the target w.r.t. the global coordinate system. | |
void | SetRotation (Double_t angle) |
Set the rotation of the target w.r.t. the global coordinate system. | |
std::string | ToString () const |
Info. | |
Private Member Functions | |
Double_t | GetStandardDensity (Int_t charge) const |
Private Attributes | |
Int_t | fZ |
Atomic charge of target material. | |
Double_t | fThickness |
Thickness [cm]. | |
Double_t | fDiameter |
Diameter [cm]. | |
Double_t | fDensity |
Density of target material [g/cm^3]. | |
Double_t | fPosX |
Target centre position in x [cm]. | |
Double_t | fPosY |
Target centre position in y [cm]. | |
Double_t | fPosZ |
Target centre position in z [cm]. | |
Double_t | fRotY |
Target rotation angle around the y axis [rad]. | |
TString | fMaterial |
Material name. | |
Bool_t | fBuildFromFile |
Flag for building from geometry file. | |
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 37 of file CbmTarget.h.
CbmTarget::CbmTarget | ( | ) |
Default constructor.
Definition at line 23 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 41 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 60 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 78 of file CbmTarget.cxx.
|
inlinevirtual |
Destructor.
Definition at line 81 of file CbmTarget.h.
|
virtual |
Built the ROOT geometry.
Definition at line 96 of file CbmTarget.cxx.
References 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 197 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 202 of file CbmTarget.cxx.
Referenced by ConstructGeometry().
TVector3 CbmTarget::GetSurfaceCentreDown | ( | ) | const |
Downstream surface centre.
Definition at line 225 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 233 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 241 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 178 of file CbmTarget.h.
References fRotY.
std::string CbmTarget::ToString | ( | ) | const |
Info.
Definition at line 251 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 195 of file CbmTarget.h.
Referenced by ConstructGeometry(), SetGeometryFileName(), and ToString().
|
private |
Density of target material [g/cm^3].
Definition at line 189 of file CbmTarget.h.
Referenced by ConstructGeometry(), and ToString().
|
private |
Diameter [cm].
Definition at line 188 of file CbmTarget.h.
Referenced by ConstructGeometry(), GetDiameter(), and ToString().
|
private |
Material name.
Definition at line 194 of file CbmTarget.h.
Referenced by ConstructGeometry(), and ToString().
|
private |
Target centre position in x [cm].
Definition at line 190 of file CbmTarget.h.
Referenced by ConstructGeometry(), GetPosition(), GetSurfaceCentreDown(), GetSurfaceCentreUp(), GetX(), SetPosition(), and ToString().
|
private |
Target centre position in y [cm].
Definition at line 191 of file CbmTarget.h.
Referenced by ConstructGeometry(), GetPosition(), GetSurfaceCentreDown(), GetSurfaceCentreUp(), GetY(), SetPosition(), and ToString().
|
private |
Target centre position in z [cm].
Definition at line 192 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 193 of file CbmTarget.h.
Referenced by ConstructGeometry(), GetNormal(), GetRotation(), GetSurfaceCentreDown(), GetSurfaceCentreUp(), SetRotation(), and ToString().
|
private |
Thickness [cm].
Definition at line 187 of file CbmTarget.h.
Referenced by ConstructGeometry(), GetSurfaceCentreDown(), GetSurfaceCentreUp(), GetThickness(), and ToString().
|
private |
Atomic charge of target material.
Definition at line 186 of file CbmTarget.h.
Referenced by ConstructGeometry().