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. More... | |
CbmStsSensor * | GetSensor (Int_t index) const |
Get a sensor from the sensor array. More... | |
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. 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 |
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. More... | |
EStsElementLevel | fLevel |
Level in hierarchy. More... | |
TGeoPhysicalNode * | fNode |
Pointer to geometry. More... | |
std::vector< CbmStsElement * > | fDaughters |
Array of daughters. More... | |
CbmStsElement * | fMother |
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 CbmStsSetup * | fgInstance = nullptr |
Static instance of this class. More... | |
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 39 of file CbmStsSetup.h.
|
inlinevirtual |
Destructor
Definition at line 43 of file CbmStsSetup.h.
|
private |
|
privatedelete |
Copy constructor (disabled)
|
private |
|
protectedinherited |
Construct the name of the element
Definition at line 54 of file CbmStsElement.cxx.
References CbmStsElement::fAddress, CbmStsElement::fMother, CbmStsAddress::GetElementId(), CbmStsElement::GetLevel(), kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, kStsSystem, and kStsUnit.
Referenced by CbmStsElement::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 90 of file CbmStsElement.cxx.
References CbmStsAddress::GetElementId(), kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, and kStsUnit.
|
private |
Create station objects.
Definition at line 56 of file CbmStsSetup.cxx.
References CbmStsStation::AddLadder(), 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 CbmStsElement::fAddress.
Referenced by CbmStsRecoModule::AddDigiToQueue(), CbmRecoSts::CreateModules(), CbmStsSimModule::Digitize(), CbmStsSimSensor::GetSensorId(), CbmStsDigitizeQa::Init(), Init(), CbmStsMC::Initialize(), CbmStsDigitize::InitModules(), CbmStsDigitize::InitParams(), CbmStsDigitize::InitSensors(), and CbmStsRecoModule::Reconstruct().
|
inherited |
Get a daughter element
index | Index of daughter element |
Definition at line 120 of file CbmStsElement.cxx.
References CbmStsElement::fDaughters, and CbmStsElement::GetNofDaughters().
Referenced by CbmStsStation::CheckSensorProperties(), CbmRecoSts::CreateModules(), CreateStations(), CbmStsDigitizeQa::Finish(), GetElement(), CbmStsElement::GetNofElements(), CbmStsDigitizeQa::Init(), Init(), CbmStsRecoModule::Init(), CbmStsMC::Initialize(), CbmStsElement::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 137 of file CbmStsSetup.cxx.
References CbmStsElement::fAddress, CbmStsElement::GetDaughter(), CbmStsAddress::GetElementId(), CbmStsAddress::GetSystemId(), kSts, and kStsNofLevels.
Referenced by GetStationNumber(), and CbmStsDigitizeQa::ProcessDigisAndPoints().
|
inlineinherited |
Get the index within the mother element
Definition at line 77 of file CbmStsElement.h.
References CbmStsElement::fAddress, CbmStsElement::fLevel, and CbmStsAddress::GetElementId().
Referenced by CreateStations().
|
inlineinherited |
Get the element level
Definition at line 85 of file CbmStsElement.h.
References CbmStsElement::fLevel.
Referenced by CbmStsStation::AddLadder(), and CbmStsElement::ConstructName().
const char * CbmStsSetup::GetLevelName | ( | Int_t | level | ) | const |
Get the name of an element level
level | Element level (EStsElementLevel) |
Definition at line 167 of file CbmStsSetup.cxx.
References fHasStations, kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, kStsSide, kStsSystem, and kStsUnit.
Referenced by Init(), and CbmStsElement::InitDaughters().
|
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 68 of file CbmStsSetup.h.
References fModuleVector.
Referenced by CbmStsDigitizeQa::CreateDigiHistograms(), CbmRecoSts::CreateModules(), CbmStsDigitizeQa::Init(), and CbmStsDigitize::InitModules().
|
inlineinherited |
Get the mother element
Definition at line 89 of file CbmStsElement.h.
References CbmStsElement::fMother.
Referenced by CbmStsDigitize::InitSensors().
|
inlineinherited |
Get number of daughter elements
Definition at line 95 of file CbmStsElement.h.
References CbmStsElement::fDaughters.
Referenced by CbmStsStation::CheckSensorProperties(), CbmRecoSts::CreateModules(), CreateStations(), CbmStsDigitizeQa::Finish(), CbmStsElement::GetDaughter(), CbmStsElement::GetNofElements(), CbmStsDigitizeQa::Init(), CbmKF::Init(), Init(), CbmStsRecoModule::Init(), CbmStsModule::InitDaughters(), CbmStsElement::InitDaughters(), CbmStsMC::Initialize(), CbmStsElement::Print(), and CbmStsDigitizeQa::ProcessAngles().
|
inherited |
Get number of elements at given level
level | Element level (see enum EStsElementLevel) |
Definition at line 128 of file CbmStsElement.cxx.
References CbmStsElement::fLevel, CbmStsElement::GetDaughter(), CbmStsElement::GetNofDaughters(), and CbmStsElement::GetNofElements().
Referenced by CbmStsElement::GetNofElements(), and Init().
|
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().
|
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().
|
inline |
Get number of stations
Definition at line 90 of file CbmStsSetup.h.
References fStations.
Referenced by CbmEventBuilderQA::CalculateIsReconstructable(), CbmStsDigitizeQaReport::Draw2dHistograms(), CbmStsFindTracksQa::GetGeometry(), CbmStsDigitizeQa::Init(), and CbmL1::Init().
|
inlineinherited |
Definition at line 106 of file CbmStsElement.h.
References CbmStsElement::fNode.
Referenced by CbmStsStation::CheckSensorProperties(), CbmRecoSts::CreateModules(), CreateStations(), GetStationNumber(), CbmStsSimSensorDssdOrtho::Init(), CbmStsSimSensorDssdStereo::Init(), CbmStsRecoModule::Init(), CbmStsMC::Initialize(), CbmStsDigitize::InitParams(), CbmStsDigitize::InitSensors(), CbmStsSimSensor::ProcessPoint(), CbmStsSimSensorDssdOrtho::SetParameters(), CbmStsSimSensorDssdOrtho::ToString(), and CbmStsSimSensorDssdStereo::ToString().
|
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 78 of file CbmStsSetup.h.
References fSensorVector.
Referenced by CbmStsDigitize::InitParams(), and CbmStsDigitize::InitSensors().
|
inline |
Get a station
stationId | Station 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().
Int_t CbmStsSetup::GetStationNumber | ( | Int_t | address | ) |
Get station number from address
address | Unique detector address @value Station number |
Definition at line 187 of file CbmStsSetup.cxx.
References fHasStations, GetElement(), CbmStsAddress::GetElementId(), CbmStsElement::GetPnode(), kStsLadder, and kStsUnit.
Referenced by CbmL1PFFitter::CalculateFieldRegion(), CbmL1PFFitter::CalculateFieldRegionAtLastPoint(), CbmKFStsHit::Create(), CbmBinnedTrackerQA::Exec(), CbmStsFitPerformanceTask::Exec(), CbmBinnedDebug::Exec(), CbmStsFindTracksQa::FillHitMap(), CbmLitMCTrackCreator::FillStationMaps(), CbmL1PFFitter::Fit(), CbmL1PFFitter::GetChiToVertex(), CbmKFTrErrMCPoints::GetNConsHitStations(), CbmKFTrErrMCPoints::GetNHitStations(), CbmLitClusteringQa::GetStationId(), CbmBinnedTrackerQA::HandleSts(), CbmBinnedTrackerQANew::Init(), CbmBinnedTrackerQA::Init(), CbmStsDigitizeQa::ProcessDigisAndPoints(), CbmLitFitQa::ProcessStsTrack(), CbmBinnedStsHitReader::Read(), CbmBinnedStsMCReader::Read(), and CbmL1::ReadEvent().
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 201 of file CbmStsSetup.cxx.
References CreateStations(), CbmStsElement::fAddress, fIsInitialised, fModules, fModuleVector, fSensors, fSensorVector, fStations, CbmStsElement::GetAddress(), CbmStsAddress::GetAddress(), CbmStsElement::GetDaughter(), GetLevelName(), CbmStsElement::GetNofDaughters(), CbmStsElement::GetNofElements(), GetNofSensors(), kStsModule, kStsSensor, and ReadGeometry().
Referenced by CbmStsDigitizeQa::Init(), CbmBinnedTrackerConfigurator::Init(), CbmBinnedTrackerQANew::Init(), CbmBinnedTrackerQA::Init(), CbmLitClusteringQa::Init(), CbmKF::Init(), CbmLitTrackingQa::Init(), CbmRecoSts::Init(), CbmL1::Init(), CbmStsDigitize::Init(), CbmStsMC::Initialize(), and CbmStsDigitize::InitSetup().
|
virtualinherited |
Initialise daughters from geometry
Reimplemented in CbmStsModule.
Definition at line 145 of file CbmStsElement.cxx.
References CbmStsElement::CbmStsElement(), CbmStsElement::fAddress, CbmStsElement::fDaughters, CbmStsElement::fLevel, CbmStsElement::fNode, GetLevelName(), CbmStsElement::GetNofDaughters(), CbmStsElement::InitDaughters(), Instance(), kStsHalfLadder, kStsSensor, and CbmStsAddress::SetElementId().
Referenced by CbmStsElement::InitDaughters(), and ReadGeometry().
|
static |
Static instance of CbmStsSetup
Definition at line 293 of file CbmStsSetup.cxx.
References CbmStsSetup(), and fgInstance.
Referenced by CbmL1PFFitter::CalculateFieldRegion(), CbmL1PFFitter::CalculateFieldRegionAtLastPoint(), CbmEventBuilderQA::CalculateIsReconstructable(), CbmKFStsHit::Create(), CbmBinnedTrackerQA::Exec(), CbmStsFitPerformanceTask::Exec(), CbmBinnedDebug::Exec(), CbmL1::FieldApproxCheck(), CbmLitMCTrackCreator::FillStationMaps(), CbmL1PFFitter::Fit(), CbmL1PFFitter::GetChiToVertex(), CbmStsFindTracksQa::GetGeometry(), CbmKFTrErrMCPoints::GetNConsHitStations(), CbmKFTrErrMCPoints::GetNHitStations(), CbmLitClusteringQa::GetStationId(), CbmBinnedTrackerQA::HandleSts(), CbmStsDigitizeQa::Init(), CbmBinnedTrackerConfigurator::Init(), CbmBinnedTrackerQANew::Init(), CbmBinnedTrackerQA::Init(), CbmLitClusteringQa::Init(), CbmKF::Init(), CbmLitTrackingQa::Init(), CbmStsFindTracksQa::Init(), CbmRecoSts::Init(), CbmL1::Init(), CbmStsDigitize::Init(), CbmStsElement::InitDaughters(), CbmStsMC::Initialize(), CbmStsDigitize::InitSetup(), CbmLitFitQa::ProcessStsTrack(), CbmBinnedStsHitReader::Read(), CbmBinnedStsMCReader::Read(), CbmL1::ReadEvent(), CbmStsDigitize::ReInit(), and CbmL1::WriteSIMDKFData().
|
inline |
Initialisation status for sensor parameters.
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().
|
inline |
Initialisation status for module parameters.
Definition at line 130 of file CbmStsSetup.h.
References fIsModuleParsInit.
Referenced by CbmStsDigitizeQa::Init(), and CbmL1::Init().
|
inline |
Initialisation status for sensor conditions.
Definition at line 136 of file CbmStsSetup.h.
References fIsSensorParsInit.
Referenced by CbmL1::Init().
|
inline |
Initialisation status for sensor parameters.
Definition at line 142 of file CbmStsSetup.h.
References fIsSensorParsInit.
Referenced by CbmL1::Init().
void CbmStsSetup::ListModules | ( | ) | const |
Print list of modules with parameters
Definition at line 301 of file CbmStsSetup.cxx.
References fModules.
|
inline |
Print list of sensors with parameters
Definition at line 154 of file CbmStsSetup.h.
References fSensors.
|
privatedelete |
Assignment operator (disabled)
|
virtualinherited |
Definition at line 198 of file CbmStsElement.cxx.
References CbmStsElement::fAddress, CbmStsElement::fNode, CbmStsElement::GetDaughter(), CbmStsElement::GetNofDaughters(), and CbmStsElement::Print().
Referenced by CbmStsElement::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 371 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 309 of file CbmStsSetup.cxx.
References fHasStations, CbmStsElement::fNode, and CbmStsElement::InitDaughters().
Referenced by Init().
|
protectedinherited |
Set the element level from integer Protection against being out of range.
level | Element level |
Definition at line 211 of file CbmStsElement.cxx.
References CbmStsElement::fLevel, kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, kStsSystem, and kStsUnit.
Referenced by CbmStsElement::CbmStsElement().
UInt_t CbmStsSetup::SetModuleParameters | ( | CbmStsParSetModule * | modulePars | ) |
Set module parameters from parameter container.
Parameter | container for modules |
Definition at line 455 of file CbmStsSetup.cxx.
References fIsModuleParsInit, fModules, and CbmStsParSetModule::GetParModule().
Referenced by CbmStsDigitizeQa::Init(), CbmL1::Init(), and CbmStsDigitize::InitSetup().
|
inlineinherited |
Set the mother element
Pointer | to mother element |
Definition at line 116 of file CbmStsElement.h.
References CbmStsElement::fMother.
UInt_t CbmStsSetup::SetSensorConditions | ( | CbmStsParSetSensorCond * | conds | ) |
Set sensor conditions from parameter container.
Parameter | container for sensor conditions |
Definition at line 470 of file CbmStsSetup.cxx.
References fIsSensorCondInit, fSensors, and CbmStsParSetSensorCond::GetParSensor().
Referenced by CbmL1::Init(), and CbmStsDigitize::InitSetup().
UInt_t CbmStsSetup::SetSensorParameters | ( | CbmStsParSetSensor * | parSet | ) |
Set sensor parameters from parameter container.
Parameter | container for sensor parameters |
Definition at line 486 of file CbmStsSetup.cxx.
References fIsSensorParsInit, fSensors, and CbmStsParSetSensor::GetParSensor().
Referenced by CbmL1::Init(), and CbmStsDigitize::InitSetup().
|
protectedinherited |
Unique element address.
Definition at line 124 of file CbmStsElement.h.
Referenced by CbmStsElement::ConstructName(), CbmStsElement::GetAddress(), GetElement(), CbmStsElement::GetIndex(), CbmStsSensor::GetSensorId(), Init(), CbmStsModule::InitDaughters(), CbmStsElement::InitDaughters(), CbmStsElement::Print(), CbmStsSensor::SetAddress(), CbmStsModule::ToString(), and CbmStsSensor::ToString().
|
protectedinherited |
Array of daughters.
Definition at line 127 of file CbmStsElement.h.
Referenced by CbmStsElement::GetDaughter(), CbmStsElement::GetNofDaughters(), CbmStsModule::InitDaughters(), and CbmStsElement::InitDaughters().
|
staticprivate |
Static instance of this class.
Definition at line 221 of file CbmStsSetup.h.
Referenced by Instance().
|
private |
Legacy with stations instead of units.
Definition at line 226 of file CbmStsSetup.h.
Referenced by CreateStations(), GetLevelName(), GetStationNumber(), and ReadGeometry().
|
private |
All parameter containers set.
Definition at line 222 of file CbmStsSetup.h.
|
private |
Module parameters set.
Definition at line 223 of file CbmStsSetup.h.
Referenced by IsModuleParsInit(), and SetModuleParameters().
|
private |
Sensor conditions set.
Definition at line 225 of file CbmStsSetup.h.
Referenced by SetSensorConditions().
|
private |
Sensor parameters set.
Definition at line 224 of file CbmStsSetup.h.
Referenced by IsSensorCondInit(), IsSensorParsInit(), and SetSensorParameters().
|
protectedinherited |
Level in hierarchy.
Definition at line 125 of file CbmStsElement.h.
Referenced by CbmStsElement::CbmStsElement(), CbmStsElement::GetIndex(), CbmStsElement::GetLevel(), CbmStsElement::GetNofElements(), CbmStsElement::InitDaughters(), and CbmStsElement::SetLevel().
|
private |
Definition at line 232 of file CbmStsSetup.h.
Referenced by GetNofModules(), Init(), ListModules(), and SetModuleParameters().
|
private |
Definition at line 235 of file CbmStsSetup.h.
Referenced by GetModule(), and Init().
|
protectedinherited |
Mother element.
Definition at line 128 of file CbmStsElement.h.
Referenced by CbmStsElement::ConstructName(), CbmStsElement::GetMother(), and CbmStsElement::SetMother().
|
protectedinherited |
Pointer to geometry.
Definition at line 126 of file CbmStsElement.h.
Referenced by CbmStsSensor::GetNode(), CbmStsElement::GetPnode(), CbmStsModule::InitDaughters(), CbmStsElement::InitDaughters(), CbmStsElement::Print(), ReadGeometry(), and CbmStsSensor::SetNode().
|
private |
Definition at line 229 of file CbmStsSetup.h.
Referenced by GetNofSensors(), Init(), ListSensors(), SetSensorConditions(), and SetSensorParameters().
|
private |
Definition at line 238 of file CbmStsSetup.h.
Referenced by GetSensor(), and Init().
|
private |
Definition at line 243 of file CbmStsSetup.h.
Referenced by CreateStations(), GetNofStations(), GetStation(), and Init().