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 |
|
privatedelete |
Copy constructor (disabled)
|
private |
|
protectedinherited |
Construct the name of the element
Definition at line 58 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 95 of file CbmStsElement.cxx.
References CbmStsAddress::GetElementId(), kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, and kStsUnit.
|
private |
Create station objects.
Definition at line 66 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(), CbmTaskStsHitFinderParWrite::CreateModules(), CbmStsSimModule::Digitize(), CbmStsRecoModule::FindClusters(), CbmStsRecoModule::FindHits(), CbmStsSimSensor::GetSensorId(), CbmStsDigitizeQa::Init(), Init(), CbmStsMC::Initialize(), CbmStsDigitize::InitModules(), CbmStsDigitize::InitParams(), CbmStsDigitizePixel::InitParams(), and CbmStsDigitize::InitSensors().
|
inherited |
Get a daughter element
index | Index of daughter element |
Definition at line 126 of file CbmStsElement.cxx.
References CbmStsElement::fDaughters, and CbmStsElement::GetNofDaughters().
Referenced by CbmStsStation::CheckSensorProperties(), CbmRecoSts::CreateModules(), CbmTaskStsHitFinderParWrite::CreateModules(), CreateStations(), CbmStsDigitizeQa::Finish(), GetElement(), CbmStsElement::GetNofElements(), CbmStsDigitizeQa::Init(), CbmStsRecoModule::Init(), 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 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().
|
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 83 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 177 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 72 of file CbmStsSetup.h.
References fModuleVector.
Referenced by CbmStsDigitizeQa::CreateDigiHistograms(), CbmRecoSts::CreateModules(), CbmTaskStsHitFinderParWrite::CreateModules(), CbmStsDigitizeQa::Init(), CbmStsDigitize::InitModules(), CbmStsDigitize::InitParams(), and CbmStsDigitizePixel::InitParams().
|
inlineinherited |
Get the mother element
Definition at line 87 of file CbmStsElement.h.
References CbmStsElement::fMother.
Referenced by CbmStsDigitize::InitSensors().
|
inlineinherited |
Get number of daughter elements
Definition at line 93 of file CbmStsElement.h.
References CbmStsElement::fDaughters.
Referenced by CbmStsStation::CheckSensorProperties(), CbmRecoSts::CreateModules(), CbmTaskStsHitFinderParWrite::CreateModules(), CreateStations(), CbmStsDigitizeQa::Finish(), CbmStsElement::GetDaughter(), CbmStsElement::GetNofElements(), CbmStsDigitizeQa::Init(), CbmStsRecoModule::Init(), Init(), CbmStsElement::InitDaughters(), CbmStsModule::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 135 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 86 of file CbmStsSetup.h.
References fModules.
Referenced by CbmStsDigitizeQa::CreateDigiHistograms(), CbmRecoSts::CreateModules(), CbmTaskStsHitFinderParWrite::CreateModules(), CbmStsDigitize::InitModules(), CbmStsDigitize::InitParams(), and CbmStsDigitizePixel::InitParams().
|
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().
|
inline |
Get number of stations
Definition at line 94 of file CbmStsSetup.h.
References fStations.
Referenced by CbmEventBuilderQa::CalculateIsReconstructable(), CbmStsDigitizeQaReport::Draw2dHistograms(), CbmStsFindTracksQa::GetGeometry(), CbmStsDigitizeQa::Init(), and CbmStsTrackingInterface::Init().
|
inlineinherited |
Definition at line 104 of file CbmStsElement.h.
References CbmStsElement::fNode.
Referenced by CbmStsStation::CheckSensorProperties(), CbmRecoSts::CreateModules(), CbmTaskStsHitFinderParWrite::CreateModules(), CreateStations(), CbmBbaAlignmentTask::Finish(), GetStationNumber(), CbmStsRecoModule::Init(), CbmStsSimSensorDssdOrtho::Init(), CbmStsSimSensorDssdStereo::Init(), CbmStsMC::Initialize(), CbmStsDigitize::InitParams(), CbmStsDigitizePixel::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 82 of file CbmStsSetup.h.
References fSensorVector.
Referenced by CbmStsDigitize::InitParams(), CbmStsDigitizePixel::InitParams(), and CbmStsDigitize::InitSensors().
|
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 CbmStsTrackingInterface::__attribute__(), CbmEventBuilderQa::CalculateIsReconstructable(), CbmStsTrackingInterface::Init(), and CbmRecoStsPixel::ProcessData().
Int_t CbmStsSetup::GetStationNumber | ( | Int_t | address | ) |
Get station number from address
address | Unique detector address @value Station number |
Definition at line 198 of file CbmStsSetup.cxx.
References fHasStations, GetElement(), CbmStsAddress::GetElementId(), CbmStsElement::GetPnode(), kStsLadder, and kStsUnit.
Referenced by CbmKFStsHit::Create(), CbmStsDigitizePixel::Exec(), CbmStsFindTracksQa::FillHitMap(), CbmLitMCTrackCreator::FillStationMaps(), CbmLitClusteringQa::GetStationId(), CbmStsTrackingInterface::GetTrackingStationIndex(), CbmStsDigitizePixel::InitParams(), CbmRecoStsPixel::ProcessData(), CbmStsDigitizeQa::ProcessDigisAndPoints(), 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 213 of file CbmStsSetup.cxx.
References 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(), CbmRecoSts::Init(), CbmRecoStsPixel::Init(), CbmStsDigitize::Init(), CbmStsDigitizePixel::Init(), CbmStsDigitizeQa::Init(), CbmStsFindTracksQa::Init(), CbmTaskStsHitFinderParWrite::Init(), CbmStsMC::Initialize(), and CbmStsDigitize::InitSetup().
|
virtualinherited |
Initialise daughters from geometry
Reimplemented in CbmStsModule.
Definition at line 152 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(), ReadGeometry(), and ReadGeometry().
|
static |
Static instance of CbmStsSetup
Definition at line 303 of file CbmStsSetup.cxx.
References CbmStsSetup(), and fgInstance.
Referenced by CbmStsTrackingInterface::__attribute__(), CbmEventBuilderQa::CalculateIsReconstructable(), CbmKFStsHit::Create(), CbmLitMCTrackCreator::FillStationMaps(), CbmBbaAlignmentTask::Finish(), CbmStsFindTracksQa::GetGeometry(), CbmKFTrErrMCPoints::GetNConsHitStations(), CbmKFTrErrMCPoints::GetNHitStations(), CbmLitClusteringQa::GetStationId(), CbmStsTrackingInterface::GetStereoAnglesSensor(), CbmL1PFFitter::GetStsStationIndex(), CbmStsTrackingInterface::GetTrackingStationIndex(), CbmLitClusteringQa::Init(), CbmLitTrackingQa::Init(), CbmRecoSts::Init(), CbmRecoStsPixel::Init(), CbmStsDigitize::Init(), CbmStsDigitizePixel::Init(), CbmStsDigitizeQa::Init(), CbmStsFindTracksQa::Init(), CbmStsTrackingInterface::Init(), CbmTaskStsHitFinderParWrite::Init(), CbmStsElement::InitDaughters(), CbmStsMC::Initialize(), CbmStsDigitize::InitSetup(), CbmRecoStsPixel::ProcessData(), CbmLitFitQa::ProcessStsTrack(), 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(), CbmRecoStsPixel::Init(), CbmStsDigitizePixel::Init(), CbmStsDigitizeQa::Init(), and CbmStsFindTracksQa::Init().
|
inline |
Initialisation status for module parameters.
Definition at line 135 of file CbmStsSetup.h.
References fIsModuleParsInit.
Referenced by CbmRecoStsPixel::Init(), and CbmStsDigitizeQa::Init().
|
inline |
Initialisation status for sensor conditions.
Definition at line 141 of file CbmStsSetup.h.
References fIsSensorParsInit.
Referenced by CbmRecoStsPixel::Init().
|
inline |
Initialisation status for sensor parameters.
Definition at line 147 of file CbmStsSetup.h.
References fIsSensorParsInit.
Referenced by CbmRecoStsPixel::Init().
void CbmStsSetup::ListModules | ( | ) | const |
Print list of modules with parameters
Definition at line 312 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)
|
virtualinherited |
Definition at line 200 of file CbmStsElement.cxx.
References CbmStsElement::fAddress, CbmStsElement::fNode, CbmStsElement::GetDaughter(), CbmStsElement::GetNofDaughters(), and CbmStsElement::Print().
Referenced by CbmBbaAlignmentTask::Finish(), and 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 397 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 321 of file CbmStsSetup.cxx.
References fHasStations, CbmStsElement::fNode, CbmStsElement::InitDaughters(), and RecomputePhysicalAssmbBbox().
Referenced by Init().
|
private |
Definition at line 382 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 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 489 of file CbmStsSetup.cxx.
References fIsModuleParsInit, fModules, and CbmStsParSetModule::GetParModule().
Referenced by CbmRecoStsPixel::Init(), CbmStsDigitizeQa::Init(), and CbmStsDigitize::InitSetup().
|
inlineinherited |
Set the mother element
Pointer | to mother element |
Definition at line 114 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 505 of file CbmStsSetup.cxx.
References fIsSensorCondInit, fSensors, and CbmStsParSetSensorCond::GetParSensor().
Referenced by CbmRecoStsPixel::Init(), and CbmStsDigitize::InitSetup().
UInt_t CbmStsSetup::SetSensorParameters | ( | CbmStsParSetSensor * | parSet | ) |
Set sensor parameters from parameter container.
Parameter | container for sensor parameters |
Definition at line 522 of file CbmStsSetup.cxx.
References fIsSensorParsInit, fSensors, and CbmStsParSetSensor::GetParSensor().
Referenced by CbmRecoStsPixel::Init(), and CbmStsDigitize::InitSetup().
|
protectedinherited |
Unique element address.
Definition at line 122 of file CbmStsElement.h.
Referenced by CbmStsElement::ConstructName(), CbmStsElement::GetAddress(), GetElement(), CbmStsElement::GetIndex(), CbmStsSensor::GetSensorId(), Init(), CbmStsElement::InitDaughters(), CbmStsModule::InitDaughters(), CbmStsElement::Print(), CbmStsSensor::SetAddress(), CbmStsModule::ToString(), and CbmStsSensor::ToString().
|
protectedinherited |
Array of daughters.
Definition at line 125 of file CbmStsElement.h.
Referenced by CbmStsElement::GetDaughter(), CbmStsElement::GetNofDaughters(), CbmStsElement::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(), CbmStsElement::GetIndex(), CbmStsElement::GetLevel(), CbmStsElement::GetNofElements(), CbmStsElement::InitDaughters(), and CbmStsElement::SetLevel().
|
private |
Definition at line 240 of file CbmStsSetup.h.
Referenced by GetNofModules(), Init(), ListModules(), and SetModuleParameters().
|
private |
Definition at line 243 of file CbmStsSetup.h.
Referenced by GetModule(), and Init().
|
protectedinherited |
Mother element.
Definition at line 126 of file CbmStsElement.h.
Referenced by CbmStsElement::ConstructName(), CbmStsElement::GetMother(), and CbmStsElement::SetMother().
|
protectedinherited |
Pointer to geometry.
Definition at line 124 of file CbmStsElement.h.
Referenced by CbmStsSensor::GetNode(), CbmStsElement::GetPnode(), CbmStsElement::InitDaughters(), CbmStsModule::InitDaughters(), CbmStsElement::Print(), ReadGeometry(), ReadGeometry(), and CbmStsSensor::SetNode().
|
private |
Definition at line 237 of file CbmStsSetup.h.
Referenced by 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 CreateStations(), GetNofStations(), GetStation(), and Init().