CbmRoot
Loading...
Searching...
No Matches
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.
 
CbmStsSensorGetSensor (Int_t index) const
 Get a sensor from the sensor array.
 
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.
 
Bool_t IsInit () const
 Initialisation status for sensor parameters.
 
Bool_t IsModuleParsInit () const
 Initialisation status for module parameters.
 
Bool_t IsSensorCondInit () const
 Initialisation status for sensor conditions.
 
Bool_t IsSensorParsInit () const
 Initialisation status for sensor parameters.
 
void ListModules () const
 
void ListSensors () const
 
UInt_t SetModuleParameters (CbmStsParSetModule *modulePars)
 Set module parameters from parameter container.
 
UInt_t SetSensorConditions (CbmStsParSetSensorCond *conds)
 Set sensor conditions from parameter container.
 
UInt_t SetSensorParameters (CbmStsParSetSensor *parSet)
 Set sensor parameters from parameter container.
 
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.
 
EStsElementLevel fLevel
 Level in hierarchy.
 
TGeoPhysicalNode * fNode
 Pointer to geometry.
 
std::vector< CbmStsElement * > fDaughters
 Array of daughters.
 
CbmStsElementfMother
 Mother element.
 

Private Member Functions

 CbmStsSetup ()
 Default constructor

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

Private Attributes

Bool_t fIsInitialised = kFALSE
 All parameter containers set.
 
Bool_t fIsModuleParsInit = kFALSE
 Module parameters set.
 
Bool_t fIsSensorParsInit = kFALSE
 Sensor parameters set.
 
Bool_t fIsSensorCondInit = kFALSE
 Sensor conditions set.
 
Bool_t fHasStations = kFALSE
 Legacy with stations instead of units.
 
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.
 

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 43 of file CbmStsSetup.h.

Constructor & Destructor Documentation

◆ ~CbmStsSetup()

virtual CbmStsSetup::~CbmStsSetup ( )
inlinevirtual

Destructor

Definition at line 47 of file CbmStsSetup.h.

◆ CbmStsSetup() [1/2]

CbmStsSetup::CbmStsSetup ( )
private

Default constructor

Definition at line 54 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 ,
3  )
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 95 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 147 of file CbmStsSetup.cxx.

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

Referenced by CbmBbaAlignmentTask::Finish(), GetStationNumber(), CbmStsTrackingInterface::GetStereoAnglesSensor(), 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 83 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 177 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 72 of file CbmStsSetup.h.

References fModuleVector.

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

◆ GetMother()

CbmStsElement * CbmStsElement::GetMother ( ) const
inlineinherited

Get the mother element

Definition at line 87 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 135 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

◆ GetNofSensors()

Int_t CbmStsSetup::GetNofSensors ( ) const
inline

Get number of sensors in setup

Definition at line 90 of file CbmStsSetup.h.

References fSensors.

Referenced by Init(), CbmStsDigitize::InitParams(), CbmStsDigitizePixel::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 82 of file CbmStsSetup.h.

References fSensorVector.

Referenced by CbmStsDigitize::InitParams(), CbmStsDigitizePixel::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 101 of file CbmStsSetup.h.

References fStations.

Referenced by CbmStsTrackingInterface::__attribute__(), CbmEventBuilderQa::CalculateIsReconstructable(), CbmStsTrackingInterface::Init(), and CbmRecoStsPixel::ProcessData().

◆ 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 129 of file CbmStsSetup.h.

References fIsInitialised.

Referenced by CbmLitClusteringQa::Init(), CbmLitTrackingQa::Init(), CbmRecoStsPixel::Init(), CbmStsDigitizePixel::Init(), CbmStsDigitizeQa::Init(), and CbmStsFindTracksQa::Init().

◆ IsModuleParsInit()

Bool_t CbmStsSetup::IsModuleParsInit ( ) const
inline

Initialisation status for module parameters.

Returns
kTRUE if modules are initialised

Definition at line 135 of file CbmStsSetup.h.

References fIsModuleParsInit.

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

◆ IsSensorCondInit()

Bool_t CbmStsSetup::IsSensorCondInit ( ) const
inline

Initialisation status for sensor conditions.

Returns
kTRUE if sensor conditions are initialised

Definition at line 141 of file CbmStsSetup.h.

References fIsSensorParsInit.

Referenced by CbmRecoStsPixel::Init().

◆ IsSensorParsInit()

Bool_t CbmStsSetup::IsSensorParsInit ( ) const
inline

Initialisation status for sensor parameters.

Returns
kTRUE if sensor parameters are initialised

Definition at line 147 of file CbmStsSetup.h.

References fIsSensorParsInit.

Referenced by CbmRecoStsPixel::Init().

◆ ListModules()

void CbmStsSetup::ListModules ( ) const

Print list of modules with parameters

Definition at line 312 of file CbmStsSetup.cxx.

References fModules.

◆ ListSensors()

void CbmStsSetup::ListSensors ( ) const
inline

Print list of sensors with parameters

Definition at line 159 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 397 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 321 of file CbmStsSetup.cxx.

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

Referenced by Init().

◆ RecomputePhysicalAssmbBbox()

void CbmStsSetup::RecomputePhysicalAssmbBbox ( TGeoManager * geo)
private

Definition at line 382 of file CbmStsSetup.cxx.

Referenced by ReadGeometry().

◆ 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 213 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 489 of file CbmStsSetup.cxx.

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

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

◆ SetMother()

void CbmStsElement::SetMother ( CbmStsElement * mother)
inlineinherited

Set the mother element

Parameters
Pointerto mother element

Definition at line 114 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 505 of file CbmStsSetup.cxx.

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

Referenced by CbmRecoStsPixel::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 522 of file CbmStsSetup.cxx.

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

Referenced by CbmRecoStsPixel::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 229 of file CbmStsSetup.h.

Referenced by Instance().

◆ fHasStations

Bool_t CbmStsSetup::fHasStations = kFALSE
private

Legacy with stations instead of units.

Definition at line 234 of file CbmStsSetup.h.

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

◆ fIsInitialised

Bool_t CbmStsSetup::fIsInitialised = kFALSE
private

All parameter containers set.

Definition at line 230 of file CbmStsSetup.h.

Referenced by Init(), and IsInit().

◆ fIsModuleParsInit

Bool_t CbmStsSetup::fIsModuleParsInit = kFALSE
private

Module parameters set.

Definition at line 231 of file CbmStsSetup.h.

Referenced by IsModuleParsInit(), and SetModuleParameters().

◆ fIsSensorCondInit

Bool_t CbmStsSetup::fIsSensorCondInit = kFALSE
private

Sensor conditions set.

Definition at line 233 of file CbmStsSetup.h.

Referenced by SetSensorConditions().

◆ fIsSensorParsInit

Bool_t CbmStsSetup::fIsSensorParsInit = kFALSE
private

Sensor parameters set.

Definition at line 232 of file CbmStsSetup.h.

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

◆ fLevel

◆ fModules

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

Definition at line 240 of file CbmStsSetup.h.

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

◆ fModuleVector

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

Definition at line 243 of file CbmStsSetup.h.

Referenced by GetModule(), and Init().

◆ fMother

CbmStsElement* CbmStsElement::fMother
protectedinherited

Mother element.

Definition at line 126 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 246 of file CbmStsSetup.h.

Referenced by GetSensor(), and Init().

◆ fStations

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

Definition at line 251 of file CbmStsSetup.h.

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


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