CbmRoot
CbmStsSetup Class Reference

Class representing the top level of the STS setup. More...

#include <CbmStsSetup.h>

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

Public Member Functions

virtual ~CbmStsSetup ()
 
CbmStsElementGetElement (Int_t address, Int_t level)
 
const char * GetLevelName (Int_t level) const
 
CbmStsModuleGetModule (Int_t index) const
 Get a module from the module array. More...
 
CbmStsSensorGetSensor (Int_t index) const
 Get a sensor from the sensor array. More...
 
Int_t GetNofModules () const
 
Int_t GetNofSensors () const
 
Int_t GetNofStations () const
 
CbmStsStationGetStation (Int_t stationId) const
 
Int_t GetStationNumber (Int_t address)
 
Bool_t Init (const char *geometryFile=nullptr)
 Initialise the setup. More...
 
Bool_t IsInit () const
 Initialisation status for sensor parameters. More...
 
Bool_t IsModuleParsInit () const
 Initialisation status for module parameters. More...
 
Bool_t IsSensorCondInit () const
 Initialisation status for sensor conditions. More...
 
Bool_t IsSensorParsInit () const
 Initialisation status for sensor parameters. More...
 
void ListModules () const
 
void ListSensors () const
 
UInt_t SetModuleParameters (CbmStsParSetModule *modulePars)
 Set module parameters from parameter container. More...
 
UInt_t SetSensorConditions (CbmStsParSetSensorCond *conds)
 Set sensor conditions from parameter container. More...
 
UInt_t SetSensorParameters (CbmStsParSetSensor *parSet)
 Set sensor parameters from parameter container. More...
 
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 CbmStsSetupInstance ()
 
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

 CbmStsSetup ()
 Default constructor
More...
 
Int_t CreateStations ()
 Create station objects. More...
 
Bool_t ReadGeometry (TGeoManager *geoManager)
 Read the geometry from TGeoManager. More...
 
Bool_t ReadGeometry (const char *fileName)
 Read the geometry from a ROOT geometry file. More...
 
 CbmStsSetup (const CbmStsSetup &)=delete
 Copy constructor (disabled) More...
 
CbmStsSetup operator= (const CbmStsSetup &)=delete
 Assignment operator (disabled) More...
 
 ClassDef (CbmStsSetup, 3)
 

Private Attributes

Bool_t fIsInitialised = kFALSE
 All parameter containers set. More...
 
Bool_t fIsModuleParsInit = kFALSE
 Module parameters set. More...
 
Bool_t fIsSensorParsInit = kFALSE
 Sensor parameters set. More...
 
Bool_t fIsSensorCondInit = kFALSE
 Sensor conditions set. More...
 
Bool_t fHasStations = kFALSE
 Legacy with stations instead of units. More...
 
std::map< Int_t, CbmStsSensor * > fSensors
 
std::map< Int_t, CbmStsModule * > fModules
 
std::vector< CbmStsModule * > fModuleVector
 
std::vector< CbmStsSensor * > fSensorVector
 
std::map< Int_t, CbmStsStation * > fStations
 

Static Private Attributes

static CbmStsSetupfgInstance = nullptr
 Static instance of this class. More...
 

Detailed Description

Class representing the top level of the STS setup.

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

The CbmStsSetup is a singleton class and represents the interface to the CBM geometry and its elements.

Definition at line 39 of file CbmStsSetup.h.

Constructor & Destructor Documentation

◆ ~CbmStsSetup()

virtual CbmStsSetup::~CbmStsSetup ( )
inlinevirtual

Destructor

Definition at line 43 of file CbmStsSetup.h.

◆ CbmStsSetup() [1/2]

CbmStsSetup::CbmStsSetup ( )
private

Default constructor

Definition at line 46 of file CbmStsSetup.cxx.

Referenced by Instance().

◆ CbmStsSetup() [2/2]

CbmStsSetup::CbmStsSetup ( const CbmStsSetup )
privatedelete

Copy constructor (disabled)

Member Function Documentation

◆ ClassDef()

CbmStsSetup::ClassDef ( CbmStsSetup  ,
 
)
private

◆ ConstructName() [1/2]

void CbmStsElement::ConstructName ( )
protectedinherited

◆ ConstructName() [2/2]

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

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.

◆ CreateStations()

Int_t CbmStsSetup::CreateStations ( )
private

◆ GetAddress()

◆ GetDaughter()

◆ GetElement()

CbmStsElement * CbmStsSetup::GetElement ( Int_t  address,
Int_t  level 
)

Get an STS element by address

Parameters
addressUnique element address (see CbmStsAddress)
levelElement level (EStsElementLevel)
Returns
Pointer to STS element

Definition at line 137 of file CbmStsSetup.cxx.

References CbmStsElement::fAddress, CbmStsElement::GetDaughter(), CbmStsAddress::GetElementId(), CbmStsAddress::GetSystemId(), kSts, and kStsNofLevels.

Referenced by GetStationNumber(), and CbmStsDigitizeQa::ProcessDigisAndPoints().

◆ GetIndex()

Int_t CbmStsElement::GetIndex ( ) const
inlineinherited

Get the index within the mother element

Returns
Index of element in mother

Definition at line 77 of file CbmStsElement.h.

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

Referenced by CreateStations().

◆ GetLevel()

EStsElementLevel CbmStsElement::GetLevel ( ) const
inlineinherited

Get the element level

Returns
Element level (type enum EStsElementLevel)

Definition at line 85 of file CbmStsElement.h.

References CbmStsElement::fLevel.

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

◆ GetLevelName()

const char * CbmStsSetup::GetLevelName ( Int_t  level) const

Get the name of an element level

Parameters
levelElement level (EStsElementLevel)
Returns
Name of element level (station, ladder, etc.)

Definition at line 167 of file CbmStsSetup.cxx.

References fHasStations, kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, kStsSide, kStsSystem, and kStsUnit.

Referenced by Init(), and CbmStsElement::InitDaughters().

◆ GetModule()

CbmStsModule* CbmStsSetup::GetModule ( Int_t  index) const
inline

Get a module from the module array.

Parameters
indexIndex of module in the vector
Returns
Pointer to module

For convenient loops over all modules. Note that the index of the module is meaningless.

Definition at line 68 of file CbmStsSetup.h.

References fModuleVector.

Referenced by CbmStsDigitizeQa::CreateDigiHistograms(), CbmRecoSts::CreateModules(), CbmStsDigitizeQa::Init(), and CbmStsDigitize::InitModules().

◆ GetMother()

CbmStsElement* CbmStsElement::GetMother ( ) const
inlineinherited

Get the mother element

Definition at line 89 of file CbmStsElement.h.

References CbmStsElement::fMother.

Referenced by CbmStsDigitize::InitSensors().

◆ GetNofDaughters()

◆ GetNofElements()

Int_t CbmStsElement::GetNofElements ( Int_t  level) const
inherited

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 CbmStsElement::fLevel, CbmStsElement::GetDaughter(), CbmStsElement::GetNofDaughters(), and CbmStsElement::GetNofElements().

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

◆ GetNofModules()

Int_t CbmStsSetup::GetNofModules ( ) const
inline

Get number of modules in setup

Definition at line 82 of file CbmStsSetup.h.

References fModules.

Referenced by CbmStsDigitizeQa::CreateDigiHistograms(), CbmRecoSts::CreateModules(), and CbmStsDigitize::InitModules().

◆ GetNofSensors()

Int_t CbmStsSetup::GetNofSensors ( ) const
inline

Get number of sensors in setup

Definition at line 86 of file CbmStsSetup.h.

References fSensors.

Referenced by Init(), CbmStsDigitize::InitParams(), and CbmStsDigitize::InitSensors().

◆ GetNofStations()

Int_t CbmStsSetup::GetNofStations ( ) const
inline

◆ GetPnode()

◆ GetSensor()

CbmStsSensor* CbmStsSetup::GetSensor ( Int_t  index) const
inline

Get a sensor from the sensor array.

Parameters
indexIndex of sensor in the vector
Returns
Pointer to sensor

For convenient loops over all sensors. Note that the index of the sensor is meaningless.

Definition at line 78 of file CbmStsSetup.h.

References fSensorVector.

Referenced by CbmStsDigitize::InitParams(), and CbmStsDigitize::InitSensors().

◆ GetStation()

CbmStsStation* CbmStsSetup::GetStation ( Int_t  stationId) const
inline

Get a station

Parameters
stationIdStation number @value Pointer to station object. nullptr if not present.

Definition at line 97 of file CbmStsSetup.h.

References fStations.

Referenced by CbmEventBuilderQA::CalculateIsReconstructable(), CbmL1::FieldApproxCheck(), CbmKF::Init(), CbmL1::Init(), and CbmL1::WriteSIMDKFData().

◆ GetStationNumber()

◆ Init()

Bool_t CbmStsSetup::Init ( const char *  geometryFile = nullptr)

◆ InitDaughters()

◆ Instance()

◆ IsInit()

Bool_t CbmStsSetup::IsInit ( ) const
inline

Initialisation status for sensor parameters.

Returns
kTRUE if setup is initialised

Definition at line 124 of file CbmStsSetup.h.

References fIsInitialised.

Referenced by CbmStsDigitizeQa::Init(), CbmBinnedTrackerConfigurator::Init(), CbmBinnedTrackerQANew::Init(), CbmBinnedTrackerQA::Init(), CbmLitClusteringQa::Init(), CbmLitTrackingQa::Init(), and CbmL1::Init().

◆ IsModuleParsInit()

Bool_t CbmStsSetup::IsModuleParsInit ( ) const
inline

Initialisation status for module parameters.

Returns
kTRUE if modules are initialised

Definition at line 130 of file CbmStsSetup.h.

References fIsModuleParsInit.

Referenced by CbmStsDigitizeQa::Init(), and CbmL1::Init().

◆ IsSensorCondInit()

Bool_t CbmStsSetup::IsSensorCondInit ( ) const
inline

Initialisation status for sensor conditions.

Returns
kTRUE if sensor conditions are initialised

Definition at line 136 of file CbmStsSetup.h.

References fIsSensorParsInit.

Referenced by CbmL1::Init().

◆ IsSensorParsInit()

Bool_t CbmStsSetup::IsSensorParsInit ( ) const
inline

Initialisation status for sensor parameters.

Returns
kTRUE if sensor parameters are initialised

Definition at line 142 of file CbmStsSetup.h.

References fIsSensorParsInit.

Referenced by CbmL1::Init().

◆ ListModules()

void CbmStsSetup::ListModules ( ) const

Print list of modules with parameters

Definition at line 301 of file CbmStsSetup.cxx.

References fModules.

◆ ListSensors()

void CbmStsSetup::ListSensors ( ) const
inline

Print list of sensors with parameters

Definition at line 154 of file CbmStsSetup.h.

References fSensors.

◆ operator=()

CbmStsSetup CbmStsSetup::operator= ( const CbmStsSetup )
privatedelete

Assignment operator (disabled)

◆ Print()

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

◆ ReadGeometry() [1/2]

Bool_t CbmStsSetup::ReadGeometry ( const char *  fileName)
private

Read the geometry from a ROOT geometry file.

Parameters
fileNameName of geometry file
Returns
kTRUE if successfully read; kFALSE else

The ROOT geometry is browsed for elements of the setup, which are then instantiated and connected to the respective physical node.

Definition at line 371 of file CbmStsSetup.cxx.

References fHasStations, CbmStsElement::fNode, and CbmStsElement::InitDaughters().

◆ ReadGeometry() [2/2]

Bool_t CbmStsSetup::ReadGeometry ( TGeoManager *  geoManager)
private

Read the geometry from TGeoManager.

Parameters
geoManagerInstance of TGeoManager
Returns
kTRUE if successfully read; kFALSE else

The ROOT geometry is browsed for elements of the setup, which are then instantiated and connected to the respective physical node.

Definition at line 309 of file CbmStsSetup.cxx.

References fHasStations, CbmStsElement::fNode, and CbmStsElement::InitDaughters().

Referenced by Init().

◆ SetLevel()

void CbmStsElement::SetLevel ( Int_t  level)
protectedinherited

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

Parameters
levelElement level

Definition at line 211 of file CbmStsElement.cxx.

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

Referenced by CbmStsElement::CbmStsElement().

◆ SetModuleParameters()

UInt_t CbmStsSetup::SetModuleParameters ( CbmStsParSetModule modulePars)

Set module parameters from parameter container.

Parameters
Parametercontainer for modules
Returns
Number of module the paraneters of which were set

Definition at line 455 of file CbmStsSetup.cxx.

References fIsModuleParsInit, fModules, and CbmStsParSetModule::GetParModule().

Referenced by CbmStsDigitizeQa::Init(), CbmL1::Init(), and CbmStsDigitize::InitSetup().

◆ SetMother()

void CbmStsElement::SetMother ( CbmStsElement mother)
inlineinherited

Set the mother element

Parameters
Pointerto mother element

Definition at line 116 of file CbmStsElement.h.

References CbmStsElement::fMother.

◆ SetSensorConditions()

UInt_t CbmStsSetup::SetSensorConditions ( CbmStsParSetSensorCond conds)

Set sensor conditions from parameter container.

Parameters
Parametercontainer for sensor conditions
Returns
Number of sensors the conditions of which were set

Definition at line 470 of file CbmStsSetup.cxx.

References fIsSensorCondInit, fSensors, and CbmStsParSetSensorCond::GetParSensor().

Referenced by CbmL1::Init(), and CbmStsDigitize::InitSetup().

◆ SetSensorParameters()

UInt_t CbmStsSetup::SetSensorParameters ( CbmStsParSetSensor parSet)

Set sensor parameters from parameter container.

Parameters
Parametercontainer for sensor parameters
Returns
Number of sensors the parameters of which were set

Definition at line 486 of file CbmStsSetup.cxx.

References fIsSensorParsInit, fSensors, and CbmStsParSetSensor::GetParSensor().

Referenced by CbmL1::Init(), and CbmStsDigitize::InitSetup().

Member Data Documentation

◆ fAddress

◆ fDaughters

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

◆ fgInstance

CbmStsSetup * CbmStsSetup::fgInstance = nullptr
staticprivate

Static instance of this class.

Definition at line 221 of file CbmStsSetup.h.

Referenced by Instance().

◆ fHasStations

Bool_t CbmStsSetup::fHasStations = kFALSE
private

Legacy with stations instead of units.

Definition at line 226 of file CbmStsSetup.h.

Referenced by CreateStations(), GetLevelName(), GetStationNumber(), and ReadGeometry().

◆ fIsInitialised

Bool_t CbmStsSetup::fIsInitialised = kFALSE
private

All parameter containers set.

Definition at line 222 of file CbmStsSetup.h.

Referenced by Init(), and IsInit().

◆ fIsModuleParsInit

Bool_t CbmStsSetup::fIsModuleParsInit = kFALSE
private

Module parameters set.

Definition at line 223 of file CbmStsSetup.h.

Referenced by IsModuleParsInit(), and SetModuleParameters().

◆ fIsSensorCondInit

Bool_t CbmStsSetup::fIsSensorCondInit = kFALSE
private

Sensor conditions set.

Definition at line 225 of file CbmStsSetup.h.

Referenced by SetSensorConditions().

◆ fIsSensorParsInit

Bool_t CbmStsSetup::fIsSensorParsInit = kFALSE
private

Sensor parameters set.

Definition at line 224 of file CbmStsSetup.h.

Referenced by IsSensorCondInit(), IsSensorParsInit(), and SetSensorParameters().

◆ fLevel

◆ fModules

std::map<Int_t, CbmStsModule*> CbmStsSetup::fModules
private

Definition at line 232 of file CbmStsSetup.h.

Referenced by GetNofModules(), Init(), ListModules(), and SetModuleParameters().

◆ fModuleVector

std::vector<CbmStsModule*> CbmStsSetup::fModuleVector
private

Definition at line 235 of file CbmStsSetup.h.

Referenced by GetModule(), and Init().

◆ fMother

CbmStsElement* CbmStsElement::fMother
protectedinherited

Mother element.

Definition at line 128 of file CbmStsElement.h.

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

◆ fNode

TGeoPhysicalNode* CbmStsElement::fNode
protectedinherited

◆ fSensors

std::map<Int_t, CbmStsSensor*> CbmStsSetup::fSensors
private

◆ fSensorVector

std::vector<CbmStsSensor*> CbmStsSetup::fSensorVector
private

Definition at line 238 of file CbmStsSetup.h.

Referenced by GetSensor(), and Init().

◆ fStations

std::map<Int_t, CbmStsStation*> CbmStsSetup::fStations
private

Definition at line 243 of file CbmStsSetup.h.

Referenced by CreateStations(), GetNofStations(), GetStation(), and Init().


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