|
CbmRoot
|
Class representing the top level of the STS setup. More...
#include <CbmStsSetup.h>
Public Member Functions | |
| virtual | ~CbmStsSetup () |
| CbmStsElement * | GetElement (Int_t address, Int_t level) |
| const char * | GetLevelName (Int_t level) const |
| CbmStsModule * | GetModule (Int_t index) const |
| Get a module from the module array. | |
| CbmStsSensor * | GetSensor (Int_t index) const |
| Get a sensor from the sensor array. | |
| Int_t | GetNofModules () const |
| Int_t | GetNofSensors () const |
| Int_t | GetNofStations () const |
| CbmStsStation * | GetStation (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 |
| CbmStsElement * | GetDaughter (Int_t index) const |
| Int_t | GetIndex () const |
| EStsElementLevel | GetLevel () const |
| CbmStsElement * | GetMother () 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 CbmStsSetup * | Instance () |
| 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. | |
| CbmStsElement * | fMother |
| 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 CbmStsSetup * | fgInstance = nullptr |
| Static instance of this class. | |
Class representing the top level of the STS setup.
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.
|
inlinevirtual |
Destructor
Definition at line 47 of file CbmStsSetup.h.
|
private |
Default constructor.
Definition at line 53 of file CbmStsSetup.cxx.
References CbmStsElement::CbmStsElement(), fModules, fModuleVector, fSensors, fStations, kSts, kStsSystem, and ToIntegralType().
Referenced by CbmStsSetup(), ClassDef(), Instance(), and operator=().
|
privatedelete |
Copy constructor (disabled)
References CbmStsSetup().
|
private |
References CbmStsSetup().
|
protectedinherited |
Construct the name of the element
Definition at line 58 of file CbmStsElement.cxx.
References fAddress, fMother, CbmStsAddress::GetElementId(), GetLevel(), kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, kStsSystem, and kStsUnit.
Referenced by CbmStsElement(), and CbmStsSensor::SetAddress().
|
staticinherited |
Construct the element name from the address (static)
| address | Unique element address |
| level | Element level (unit, ladder, etc.) |
Definition at line 95 of file CbmStsElement.cxx.
References CbmStsAddress::GetElementId(), kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, and kStsUnit.
|
private |
Create station objects.
Definition at line 65 of file CbmStsSetup.cxx.
References CbmStsStation::AddLadder(), CbmStsElement::CbmStsElement(), fHasStations, fStations, CbmStsElement::GetDaughter(), CbmStsElement::GetIndex(), CbmStsElement::GetNofDaughters(), CbmStsElement::GetPnode(), and CbmStsStation::Init().
Referenced by Init().
|
inlineinherited |
Get unique address
Definition at line 65 of file CbmStsElement.h.
References fAddress.
Referenced by CbmRecoSts::CreateModules(), CbmTaskStsHitFinderParWrite::CreateModules(), CbmStsSetup::Init(), CbmStsMC::Initialize(), CbmStsDigitize::InitModules(), CbmStsDigitize::InitParams(), CbmStsDigitizePixel::InitParams(), CbmStsDigitize::InitSensors(), and CbmStsAnaBase::LoadSetup().
|
inherited |
Get a daughter element
| index | Index of daughter element |
Definition at line 126 of file CbmStsElement.cxx.
References CbmStsElement(), fDaughters, and GetNofDaughters().
Referenced by CbmStsStation::CheckSensorProperties(), CbmRecoSts::CreateModules(), CbmTaskStsHitFinderParWrite::CreateModules(), CbmStsSetup::CreateStations(), CbmStsDigitizeQa::Finish(), CbmStsSetup::GetElement(), GetNofElements(), CbmStsDigitizeQa::Init(), CbmStsSetup::Init(), CbmStsMC::Initialize(), CbmStsAnaBase::LoadSetup(), Print(), and CbmStsDigitizeQa::ProcessAngles().
| CbmStsElement * CbmStsSetup::GetElement | ( | Int_t | address, |
| Int_t | level ) |
Get an STS element by address
| address | Unique element address (see CbmStsAddress) |
| level | Element level (EStsElementLevel) |
Definition at line 146 of file CbmStsSetup.cxx.
References CbmStsElement::CbmStsElement(), CbmStsElement::fAddress, CbmStsElement::GetDaughter(), CbmStsAddress::GetElementId(), CbmStsAddress::GetSystemId(), kSts, and kStsNofLevels.
Referenced by GetStationNumber().
|
inlineinherited |
Get the index within the mother element
Definition at line 77 of file CbmStsElement.h.
References fAddress, fLevel, and CbmStsAddress::GetElementId().
Referenced by cbm::sts::RecoSetupUnitFactory::CreateStationIdMap(), and CbmStsSetup::CreateStations().
|
inlineinherited |
Get the element level
Definition at line 83 of file CbmStsElement.h.
References fLevel.
Referenced by CbmStsStation::AddLadder(), and ConstructName().
| const char * CbmStsSetup::GetLevelName | ( | Int_t | level | ) | const |
Get the name of an element level
| level | Element level (EStsElementLevel) |
Definition at line 176 of file CbmStsSetup.cxx.
References fHasStations, kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, kStsSide, kStsSystem, and kStsUnit.
Referenced by Init().
|
inline |
Get a module from the module array.
| index | Index of module in the vector |
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 CbmStsAnaBase::LoadSetup().
|
inlineinherited |
Get the mother element
Definition at line 87 of file CbmStsElement.h.
References CbmStsElement(), and fMother.
Referenced by cbm::sts::RecoSetupUnitFactory::CreateStationIdMap(), and CbmStsDigitize::InitSensors().
|
inlineinherited |
Get number of daughter elements
Definition at line 93 of file CbmStsElement.h.
References fDaughters.
Referenced by CbmStsStation::CheckSensorProperties(), CbmRecoSts::CreateModules(), CbmTaskStsHitFinderParWrite::CreateModules(), CbmStsSetup::CreateStations(), CbmStsDigitizeQa::Finish(), GetDaughter(), GetNofElements(), CbmStsDigitizeQa::Init(), CbmStsSetup::Init(), InitDaughters(), CbmStsModule::InitDaughters(), CbmStsMC::Initialize(), CbmStsAnaBase::LoadSetup(), Print(), and CbmStsDigitizeQa::ProcessAngles().
Get number of elements at given level
| level | Element level (see enum EStsElementLevel) |
Definition at line 135 of file CbmStsElement.cxx.
References fLevel, GetDaughter(), GetNofDaughters(), and GetNofElements().
Referenced by GetNofElements(), and CbmStsSetup::Init().
|
inline |
Get number of modules in setup
Definition at line 86 of file CbmStsSetup.h.
References fModules.
Referenced by CbmStsAnaBase::LoadSetup().
|
inline |
Get number of sensors in setup
Definition at line 90 of file CbmStsSetup.h.
References fSensors.
Referenced by Init().
|
inline |
Get number of stations
Definition at line 94 of file CbmStsSetup.h.
References fStations.
Referenced by CbmEventBuilderQa::CalculateIsReconstructable(), CbmStsFindTracksQa::GetGeometry(), and CbmStsAnaBase::LoadSetup().
|
inlineinherited |
Definition at line 104 of file CbmStsElement.h.
References fNode.
Referenced by CbmStsStation::CheckSensorProperties(), CbmRecoSts::CreateModules(), CbmTaskStsHitFinderParWrite::CreateModules(), CbmStsSetup::CreateStations(), CbmStsSetup::GetStationNumber(), CbmStsMC::Initialize(), CbmStsDigitize::InitParams(), CbmStsDigitizePixel::InitParams(), CbmStsDigitize::InitSensors(), and CbmStsAnaBase::LoadSetup().
|
inline |
Get a sensor from the sensor array.
| index | Index of sensor in the vector |
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.
|
inline |
Get a station
| stationId | Station number @value Pointer to station object. nullptr if not present. |
Definition at line 101 of file CbmStsSetup.h.
References fStations.
Referenced by CbmEventBuilderQa::CalculateIsReconstructable(), CbmKF::Init(), CbmStsAnaBase::LoadSetup(), and CbmRecoStsPixel::ProcessData().
Get station number from address
| address | Unique detector address @value Station number |
Definition at line 197 of file CbmStsSetup.cxx.
References CbmStsElement::CbmStsElement(), fHasStations, GetElement(), CbmStsAddress::GetElementId(), CbmStsElement::GetPnode(), kStsLadder, and kStsUnit.
Referenced by CbmKFStsHit::Create(), CbmLitMCTrackCreator::FillStationMaps(), CbmLitClusteringQa::GetStationId(), CbmRecoStsPixel::ProcessData(), and CbmLitFitQa::ProcessStsTrack().
| Bool_t CbmStsSetup::Init | ( | const char * | geometryFile = nullptr | ) |
Initialise the setup.
| geometryFile | Name of file with STS geometry |
The setup will be initialised from the STS geometry, either taken from the TGeoManager or, if specified, read from a geometry file.
Definition at line 212 of file CbmStsSetup.cxx.
References CbmStsElement::CbmStsElement(), CreateStations(), CbmStsElement::fAddress, fIsInitialised, fModules, fModuleVector, fSensors, fSensorVector, fStations, CbmStsAddress::GetAddress(), CbmStsElement::GetAddress(), CbmStsElement::GetDaughter(), GetLevelName(), CbmStsElement::GetNofDaughters(), CbmStsElement::GetNofElements(), GetNofSensors(), kStsModule, kStsSensor, and ReadGeometry().
Referenced by CbmLitClusteringQa::Init(), CbmLitTrackingQa::Init(), and CbmStsAnaBase::LoadSetup().
|
virtualinherited |
Initialise daughters from geometry
Reimplemented in CbmStsModule.
Definition at line 152 of file CbmStsElement.cxx.
References CbmStsElement(), fAddress, fDaughters, fLevel, fNode, GetNofDaughters(), InitDaughters(), CbmStsSetup::Instance(), kStsHalfLadder, kStsSensor, and CbmStsAddress::SetElementId().
Referenced by InitDaughters(), CbmStsSetup::ReadGeometry(), and CbmStsSetup::ReadGeometry().
|
static |
Static instance of CbmStsSetup
Definition at line 302 of file CbmStsSetup.cxx.
References CbmStsSetup(), and fgInstance.
Referenced by CbmEventBuilderQa::CalculateIsReconstructable(), CbmKFStsHit::Create(), cbm::sts::RecoSetupUnitFactory::CreateStationIdMap(), cbm::sts::RecoSetupUnitFactory::CreateStationVolumes(), CbmLitMCTrackCreator::FillStationMaps(), CbmStsFindTracksQa::GetGeometry(), CbmKFTrErrMCPoints::GetNConsHitStations(), CbmKFTrErrMCPoints::GetNHitStations(), CbmLitClusteringQa::GetStationId(), CbmL1PFFitter::GetStsStationIndex(), CbmKF::Init(), CbmLitClusteringQa::Init(), CbmLitTrackingQa::Init(), CbmRecoSts::Init(), CbmRecoStsPixel::Init(), CbmStsDigitize::Init(), CbmStsDigitizePixel::Init(), CbmStsDigitizeQa::Init(), CbmStsFindTracksQa::Init(), CbmTaskStsHitFinderParWrite::Init(), CbmStsElement::InitDaughters(), CbmStsMC::Initialize(), CbmStsDigitize::InitSetup(), CbmStsAnaBase::LoadSetup(), CbmRecoStsPixel::ProcessData(), CbmLitFitQa::ProcessStsTrack(), cbm::sts::RecoSetupUnitFactory::RecoSetupUnitFactory(), and CbmStsDigitize::ReInit().
|
inline |
Initialisation status for sensor parameters.
Definition at line 129 of file CbmStsSetup.h.
References fIsInitialised.
Referenced by CbmLitClusteringQa::Init(), CbmLitTrackingQa::Init(), and CbmStsAnaBase::LoadSetup().
|
inline |
Initialisation status for module parameters.
Definition at line 135 of file CbmStsSetup.h.
References fIsModuleParsInit.
|
inline |
Initialisation status for sensor conditions.
Definition at line 141 of file CbmStsSetup.h.
References fIsSensorParsInit.
|
inline |
Initialisation status for sensor parameters.
Definition at line 147 of file CbmStsSetup.h.
References fIsSensorParsInit.
| void CbmStsSetup::ListModules | ( | ) | const |
Print list of modules with parameters
Definition at line 311 of file CbmStsSetup.cxx.
References fModules.
|
inline |
Print list of sensors with parameters
Definition at line 159 of file CbmStsSetup.h.
References fSensors.
|
privatedelete |
Assignment operator (disabled)
References CbmStsSetup().
|
virtualinherited |
Definition at line 200 of file CbmStsElement.cxx.
References fAddress, fNode, GetDaughter(), GetNofDaughters(), and Print().
Referenced by Print().
|
private |
Read the geometry from a ROOT geometry file.
| fileName | Name of geometry file |
The ROOT geometry is browsed for elements of the setup, which are then instantiated and connected to the respective physical node.
Definition at line 396 of file CbmStsSetup.cxx.
References fHasStations, CbmStsElement::fNode, and CbmStsElement::InitDaughters().
|
private |
Read the geometry from TGeoManager.
| geoManager | Instance of TGeoManager |
The ROOT geometry is browsed for elements of the setup, which are then instantiated and connected to the respective physical node.
Definition at line 320 of file CbmStsSetup.cxx.
References fHasStations, CbmStsElement::fNode, CbmStsElement::InitDaughters(), and RecomputePhysicalAssmbBbox().
Referenced by Init().
|
private |
Definition at line 381 of file CbmStsSetup.cxx.
Referenced by ReadGeometry().
|
protectedinherited |
Set the element level from integer Protection against being out of range.
| level | Element level |
Definition at line 213 of file CbmStsElement.cxx.
References fLevel, kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, kStsSystem, and kStsUnit.
Referenced by CbmStsElement().
| UInt_t CbmStsSetup::SetModuleParameters | ( | CbmStsParSetModule * | modulePars | ) |
Set module parameters from parameter container.
| Parameter | container for modules |
Definition at line 488 of file CbmStsSetup.cxx.
References fIsModuleParsInit, fModules, and CbmStsParSetModule::GetParModule().
|
inlineinherited |
Set the mother element
| Pointer | to mother element |
Definition at line 114 of file CbmStsElement.h.
References CbmStsElement(), and fMother.
| UInt_t CbmStsSetup::SetSensorConditions | ( | CbmStsParSetSensorCond * | conds | ) |
Set sensor conditions from parameter container.
| Parameter | container for sensor conditions |
Definition at line 504 of file CbmStsSetup.cxx.
References fIsSensorCondInit, fSensors, and CbmStsParSetSensorCond::GetParSensor().
| UInt_t CbmStsSetup::SetSensorParameters | ( | CbmStsParSetSensor * | parSet | ) |
Set sensor parameters from parameter container.
| Parameter | container for sensor parameters |
Definition at line 521 of file CbmStsSetup.cxx.
References fIsSensorParsInit, fSensors, and CbmStsParSetSensor::GetParSensor().
|
protectedinherited |
Unique element address.
Definition at line 122 of file CbmStsElement.h.
Referenced by CbmStsElement(), CbmStsElement(), ConstructName(), GetAddress(), CbmStsSetup::GetElement(), GetIndex(), CbmStsSensor::GetSensorId(), CbmStsSetup::Init(), InitDaughters(), CbmStsModule::InitDaughters(), Print(), CbmStsSensor::SetAddress(), CbmStsModule::ToString(), and CbmStsSensor::ToString().
|
protectedinherited |
Array of daughters.
Definition at line 125 of file CbmStsElement.h.
Referenced by CbmStsElement(), CbmStsElement(), GetDaughter(), GetNofDaughters(), InitDaughters(), and CbmStsModule::InitDaughters().
|
staticprivate |
Static instance of this class.
Definition at line 229 of file CbmStsSetup.h.
Referenced by Instance().
|
private |
Legacy with stations instead of units.
Definition at line 234 of file CbmStsSetup.h.
Referenced by CreateStations(), GetLevelName(), GetStationNumber(), ReadGeometry(), and ReadGeometry().
|
private |
All parameter containers set.
Definition at line 230 of file CbmStsSetup.h.
|
private |
Module parameters set.
Definition at line 231 of file CbmStsSetup.h.
Referenced by IsModuleParsInit(), and SetModuleParameters().
|
private |
Sensor conditions set.
Definition at line 233 of file CbmStsSetup.h.
Referenced by SetSensorConditions().
|
private |
Sensor parameters set.
Definition at line 232 of file CbmStsSetup.h.
Referenced by IsSensorCondInit(), IsSensorParsInit(), and SetSensorParameters().
|
protectedinherited |
Level in hierarchy.
Definition at line 123 of file CbmStsElement.h.
Referenced by CbmStsElement(), CbmStsElement(), GetIndex(), GetLevel(), GetNofElements(), InitDaughters(), and SetLevel().
|
private |
Definition at line 240 of file CbmStsSetup.h.
Referenced by CbmStsSetup(), GetNofModules(), Init(), ListModules(), and SetModuleParameters().
|
private |
Definition at line 243 of file CbmStsSetup.h.
Referenced by CbmStsSetup(), GetModule(), and Init().
|
protectedinherited |
Mother element.
Definition at line 126 of file CbmStsElement.h.
Referenced by CbmStsElement(), CbmStsElement(), ConstructName(), GetMother(), and SetMother().
|
protectedinherited |
Pointer to geometry.
Definition at line 124 of file CbmStsElement.h.
Referenced by CbmStsElement(), CbmStsElement(), CbmStsSensor::GetNode(), GetPnode(), InitDaughters(), CbmStsModule::InitDaughters(), Print(), CbmStsSetup::ReadGeometry(), CbmStsSetup::ReadGeometry(), and CbmStsSensor::SetNode().
|
private |
Definition at line 237 of file CbmStsSetup.h.
Referenced by CbmStsSetup(), GetNofSensors(), Init(), ListSensors(), SetSensorConditions(), and SetSensorParameters().
|
private |
Definition at line 246 of file CbmStsSetup.h.
Referenced by GetSensor(), and Init().
|
private |
Definition at line 251 of file CbmStsSetup.h.
Referenced by CbmStsSetup(), CreateStations(), GetNofStations(), GetStation(), and Init().