CbmRoot
Loading...
Searching...
No Matches
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.
 
 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.
 

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 37 of file CbmTarget.h.

Constructor & Destructor Documentation

◆ CbmTarget() [1/4]

CbmTarget::CbmTarget ( )

Default constructor.

Definition at line 23 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 41 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 60 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 78 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 96 of file CbmTarget.cxx.

References 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 197 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 202 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 225 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 233 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 241 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 178 of file CbmTarget.h.

References fRotY.

◆ ToString()

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.

Member Data Documentation

◆ fBuildFromFile

Bool_t CbmTarget::fBuildFromFile
private

Flag for building from geometry file.

Definition at line 195 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 189 of file CbmTarget.h.

Referenced by ConstructGeometry(), and ToString().

◆ fDiameter

Double_t CbmTarget::fDiameter
private

Diameter [cm].

Definition at line 188 of file CbmTarget.h.

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

◆ fMaterial

TString CbmTarget::fMaterial
private

Material name.

Definition at line 194 of file CbmTarget.h.

Referenced by ConstructGeometry(), and ToString().

◆ fPosX

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

◆ fPosY

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

◆ fPosZ

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

◆ fRotY

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

◆ fThickness

Double_t CbmTarget::fThickness
private

Thickness [cm].

Definition at line 187 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 186 of file CbmTarget.h.

Referenced by ConstructGeometry().


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