CbmRoot
CbmStsElement Class Reference

Class representing an element of the STS setup. More...

#include <CbmStsElement.h>

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

Public Member Functions

 CbmStsElement ()
 
 CbmStsElement (Int_t address, Int_t level, TGeoPhysicalNode *node=nullptr, CbmStsElement *mother=nullptr)
 
virtual ~CbmStsElement ()
 
Int_t GetAddress () const
 
CbmStsElementGetDaughter (Int_t index) const
 
Int_t GetIndex () const
 
EStsElementLevel GetLevel () const
 
CbmStsElementGetMother () const
 
Int_t GetNofDaughters () const
 
Int_t GetNofElements (Int_t level) const
 
TGeoPhysicalNode * GetPnode () const
 
virtual void InitDaughters ()
 
void SetMother (CbmStsElement *mother)
 
virtual void Print (Option_t *opt="") const
 

Static Public Member Functions

static TString ConstructName (Int_t address, EStsElementLevel level)
 

Protected Member Functions

void ConstructName ()
 
void SetLevel (Int_t level)
 

Protected Attributes

Int_t fAddress
 Unique element address. More...
 
EStsElementLevel fLevel
 Level in hierarchy. More...
 
TGeoPhysicalNode * fNode
 Pointer to geometry. More...
 
std::vector< CbmStsElement * > fDaughters
 Array of daughters. More...
 
CbmStsElementfMother
 Mother element. More...
 

Private Member Functions

 CbmStsElement (const CbmStsElement &)=delete
 
CbmStsElementoperator= (const CbmStsElement &)=delete
 
 ClassDef (CbmStsElement, 2)
 

Detailed Description

Class representing an element of the STS setup.

Author
V.Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Version
1.0

A CbmStsElement represents an element in the STS setup hierarchy (e.g., station, ladder, module,...). It has a unique address, a level (enum CbmStsElementLevel), a pointer to a TGeoPhysicalNode and an array of daughter elements. It is thus an alignable object.

Definition at line 32 of file CbmStsElement.h.

Constructor & Destructor Documentation

◆ CbmStsElement() [1/3]

CbmStsElement::CbmStsElement ( )

Default constructor

Definition at line 26 of file CbmStsElement.cxx.

Referenced by InitDaughters().

◆ CbmStsElement() [2/3]

CbmStsElement::CbmStsElement ( Int_t  address,
Int_t  level,
TGeoPhysicalNode *  node = nullptr,
CbmStsElement mother = nullptr 
)

Standard constructor

Parameters
addressUnique element address
levelElement level
nodePointer to geometry node
motherPointer to mother element

Definition at line 37 of file CbmStsElement.cxx.

References ConstructName(), fLevel, and SetLevel().

◆ ~CbmStsElement()

virtual CbmStsElement::~CbmStsElement ( )
inlinevirtual

Destructor

Definition at line 52 of file CbmStsElement.h.

◆ CbmStsElement() [3/3]

CbmStsElement::CbmStsElement ( const CbmStsElement )
privatedelete

Member Function Documentation

◆ ClassDef()

CbmStsElement::ClassDef ( CbmStsElement  ,
 
)
private

◆ ConstructName() [1/2]

void CbmStsElement::ConstructName ( )
protected

Construct the name of the element

Definition at line 54 of file CbmStsElement.cxx.

References fAddress, fMother, CbmStsAddress::GetElementId(), GetLevel(), kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, kStsSystem, and kStsUnit.

Referenced by CbmStsElement(), and CbmStsSensor::SetAddress().

◆ ConstructName() [2/2]

TString CbmStsElement::ConstructName ( Int_t  address,
EStsElementLevel  level 
)
static

Construct the element name from the address (static)

Parameters
addressUnique element address
levelElement level (unit, ladder, etc.)

Definition at line 90 of file CbmStsElement.cxx.

References CbmStsAddress::GetElementId(), kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, and kStsUnit.

◆ GetAddress()

◆ GetDaughter()

◆ GetIndex()

Int_t CbmStsElement::GetIndex ( ) const
inline

Get the index within the mother element

Returns
Index of element in mother

Definition at line 77 of file CbmStsElement.h.

References fAddress, fLevel, and CbmStsAddress::GetElementId().

Referenced by CbmStsSetup::CreateStations().

◆ GetLevel()

EStsElementLevel CbmStsElement::GetLevel ( ) const
inline

Get the element level

Returns
Element level (type enum EStsElementLevel)

Definition at line 85 of file CbmStsElement.h.

References fLevel.

Referenced by CbmStsStation::AddLadder(), and ConstructName().

◆ GetMother()

CbmStsElement* CbmStsElement::GetMother ( ) const
inline

Get the mother element

Definition at line 89 of file CbmStsElement.h.

References fMother.

Referenced by CbmStsDigitize::InitSensors().

◆ GetNofDaughters()

◆ GetNofElements()

Int_t CbmStsElement::GetNofElements ( Int_t  level) const

Get number of elements at given level

Parameters
levelElement level (see enum EStsElementLevel)
Returns
Number of elements at given level with this element as ancestor

Definition at line 128 of file CbmStsElement.cxx.

References fLevel, GetDaughter(), GetNofDaughters(), and GetNofElements().

Referenced by GetNofElements(), and CbmStsSetup::Init().

◆ GetPnode()

◆ InitDaughters()

void CbmStsElement::InitDaughters ( )
virtual

◆ operator=()

CbmStsElement& CbmStsElement::operator= ( const CbmStsElement )
privatedelete

◆ Print()

void CbmStsElement::Print ( Option_t *  opt = "") const
virtual

Print

Definition at line 198 of file CbmStsElement.cxx.

References fAddress, fNode, GetDaughter(), GetNofDaughters(), and Print().

Referenced by Print().

◆ SetLevel()

void CbmStsElement::SetLevel ( Int_t  level)
protected

Set the element level from integer Protection against being out of range.

Parameters
levelElement level

Definition at line 211 of file CbmStsElement.cxx.

References fLevel, kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, kStsSystem, and kStsUnit.

Referenced by CbmStsElement().

◆ SetMother()

void CbmStsElement::SetMother ( CbmStsElement mother)
inline

Set the mother element

Parameters
Pointerto mother element

Definition at line 116 of file CbmStsElement.h.

References fMother.

Member Data Documentation

◆ fAddress

◆ fDaughters

std::vector<CbmStsElement*> CbmStsElement::fDaughters
protected

Array of daughters.

Definition at line 127 of file CbmStsElement.h.

Referenced by GetDaughter(), GetNofDaughters(), CbmStsModule::InitDaughters(), and InitDaughters().

◆ fLevel

EStsElementLevel CbmStsElement::fLevel
protected

Level in hierarchy.

Definition at line 125 of file CbmStsElement.h.

Referenced by CbmStsElement(), GetIndex(), GetLevel(), GetNofElements(), InitDaughters(), and SetLevel().

◆ fMother

CbmStsElement* CbmStsElement::fMother
protected

Mother element.

Definition at line 128 of file CbmStsElement.h.

Referenced by ConstructName(), GetMother(), and SetMother().

◆ fNode

TGeoPhysicalNode* CbmStsElement::fNode
protected

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