CbmRoot
CbmTarget Class Reference

Class for constructing the geometry of the CBM target. More...

#include <CbmTarget.h>

Inheritance diagram for CbmTarget:
[legend]
Collaboration diagram for CbmTarget:
[legend]

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...
 

Detailed Description

Class for constructing the geometry of the CBM target.

Author
Volker Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Since
08.10.2013

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.

Constructor & Destructor Documentation

◆ CbmTarget() [1/4]

CbmTarget::CbmTarget ( )

Default constructor.

Definition at line 18 of file CbmTarget.cxx.

◆ CbmTarget() [2/4]

CbmTarget::CbmTarget ( const char *  fileName)

Constructor with file name.

Parameters
fileNameName 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() [3/4]

CbmTarget::CbmTarget ( const char *  element,
Double_t  thickness,
Double_t  diameter,
Double_t  density = -1. 
)

Constructor with target properties.

Parameters
elementElement name of target material (Full name or element symbol, e.g. "Gold", "Au");
thicknessThickness in z [cm]
diameterDiameter [cm]
densityDensity [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() [4/4]

CbmTarget::CbmTarget ( Int_t  z,
Double_t  thickness,
Double_t  diameter,
Double_t  density = -1. 
)

Constructor with target properties.

Parameters
zAtomic charge of target material element
thicknessThickness in z [cm]
diameterDiameter [cm]
densityDensity [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.

◆ ~CbmTarget()

virtual CbmTarget::~CbmTarget ( )
inlinevirtual

Destructor.

Definition at line 81 of file CbmTarget.h.

Member Function Documentation

◆ ConstructGeometry()

void CbmTarget::ConstructGeometry ( )
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().

◆ GetDiameter()

Double_t CbmTarget::GetDiameter ( ) const
inline

Get target diameter.

Returns
Target diameter [cm]

Definition at line 91 of file CbmTarget.h.

References fDiameter.

Referenced by CbmBeamProfile::CheckWithTarget().

◆ GetNormal()

TVector3 CbmTarget::GetNormal ( ) const

Normal vector.

Returns
Normale vector to the target surface

Definition at line 189 of file CbmTarget.cxx.

References fRotY.

Referenced by CbmBeamProfile::CheckWithTarget().

◆ GetPosition()

TVector3 CbmTarget::GetPosition ( ) const
inline

Get target centre position

Returns
Target position vector in global c.s. [cm]

Definition at line 103 of file CbmTarget.h.

References fPosX, fPosY, and fPosZ.

◆ GetRotation()

Double_t CbmTarget::GetRotation ( ) const
inline

Get target rotation angle.

Returns
Target rotation angle around the y axis [rad]

Definition at line 109 of file CbmTarget.h.

References fRotY.

◆ GetStandardDensity()

Double_t CbmTarget::GetStandardDensity ( Int_t  charge) const
private

Get the standard density (at standard conditions)

Parameters
chargeatomic charge of material
Returns
density [g/cm^3]

Definition at line 196 of file CbmTarget.cxx.

Referenced by ConstructGeometry().

◆ GetSurfaceCentreDown()

TVector3 CbmTarget::GetSurfaceCentreDown ( ) const

Downstream surface centre.

Returns
Coordinate vector of downstream surface centre

Definition at line 217 of file CbmTarget.cxx.

References fPosX, fPosY, fPosZ, fRotY, and fThickness.

Referenced by CbmBeamProfile::CheckWithTarget().

◆ GetSurfaceCentreUp()

TVector3 CbmTarget::GetSurfaceCentreUp ( ) const

Upstream surface centre.

Returns
Coordinate vector of upstream surface centre

Definition at line 226 of file CbmTarget.cxx.

References fPosX, fPosY, fPosZ, fRotY, and fThickness.

Referenced by CbmBeamProfile::CheckWithTarget().

◆ GetThickness()

Double_t CbmTarget::GetThickness ( ) const
inline

Get target thickness @value Full target thickness in z [cm].

Definition at line 127 of file CbmTarget.h.

References fThickness.

◆ GetX()

Double_t CbmTarget::GetX ( ) const
inline

Get x coordinate of target centre.

Returns
x coordinate of target centre in global c.s. [cm]

Definition at line 133 of file CbmTarget.h.

References fPosX.

◆ GetY()

Double_t CbmTarget::GetY ( ) const
inline

Get y coordinate of target centre.

Returns
y coordinate of target centre in global c.s. [cm]

Definition at line 139 of file CbmTarget.h.

References fPosY.

◆ GetZ()

Double_t CbmTarget::GetZ ( ) const
inline

Get z coordinate of target centre.

Returns
z coordinate of target centre in global c.s. [cm]

Definition at line 145 of file CbmTarget.h.

References fPosZ.

◆ SetGeometryFileName()

void CbmTarget::SetGeometryFileName ( TString  name,
TString  geoVer = "0" 
)
virtual

Output to stdout.

Set the geometry file name

Parameters
nameName of geometry file
geoVerNot 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().

◆ SetPosition()

void CbmTarget::SetPosition ( Double_t  x,
Double_t  y,
Double_t  z 
)
inline

Set the position of the target w.r.t. the global coordinate system.

Parameters
posXtarget centre position in x [cm]
posYtarget centre position in y [cm]
posZtarget centre position in z [cm]

Definition at line 167 of file CbmTarget.h.

References fPosX, fPosY, fPosZ, x, and y.

◆ SetRotation()

void CbmTarget::SetRotation ( Double_t  angle)
inline

Set the rotation of the target w.r.t. the global coordinate system.

Parameters
angletarget rotation angle around the y axis [rad]

Definition at line 177 of file CbmTarget.h.

References fRotY.

◆ ToString()

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.

Member Data Documentation

◆ fBuildFromFile

Bool_t CbmTarget::fBuildFromFile
private

Flag for building from geometry file.

Definition at line 194 of file CbmTarget.h.

Referenced by ConstructGeometry(), SetGeometryFileName(), and ToString().

◆ fDensity

Double_t CbmTarget::fDensity
private

Density of target material [g/cm^3].

Definition at line 188 of file CbmTarget.h.

Referenced by ConstructGeometry(), and ToString().

◆ fDiameter

Double_t CbmTarget::fDiameter
private

Diameter [cm].

Definition at line 187 of file CbmTarget.h.

Referenced by ConstructGeometry(), GetDiameter(), and ToString().

◆ fMaterial

TString CbmTarget::fMaterial
private

Material name.

Definition at line 193 of file CbmTarget.h.

Referenced by ConstructGeometry(), and ToString().

◆ fPosX

Double_t CbmTarget::fPosX
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().

◆ fPosY

Double_t CbmTarget::fPosY
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().

◆ fPosZ

Double_t CbmTarget::fPosZ
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().

◆ fRotY

Double_t CbmTarget::fRotY
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().

◆ fThickness

Double_t CbmTarget::fThickness
private

Thickness [cm].

Definition at line 186 of file CbmTarget.h.

Referenced by ConstructGeometry(), GetSurfaceCentreDown(), GetSurfaceCentreUp(), GetThickness(), and ToString().

◆ fZ

Int_t CbmTarget::fZ
private

Atomic charge of target material.

Definition at line 185 of file CbmTarget.h.

Referenced by ConstructGeometry().


The documentation for this class was generated from the following files: