|
BmnRoot
|
Class representing an element of the SSD setup. More...
#include <BmnSsdElement.h>
Public Member Functions | |
| BmnSsdElement () | |
| BmnSsdElement (Int_t address, Int_t level, TGeoPhysicalNode *node=nullptr, BmnSsdElement *mother=nullptr) | |
| virtual | ~BmnSsdElement () |
| Int_t | GetAddress () const |
| BmnSsdElement * | GetDaughter (Int_t index) const |
| Int_t | GetIndex () const |
| ESsdElementLevel | GetLevel () const |
| BmnSsdElement * | GetMother () const |
| Int_t | GetNofDaughters () const |
| Int_t | GetNofElements (Int_t level) const |
| TGeoPhysicalNode * | GetPnode () const |
| virtual void | InitDaughters () |
| void | SetMother (BmnSsdElement *mother) |
| virtual void | Print (Option_t *opt="") const |
Static Public Member Functions | |
| static TString | ConstructName (Int_t address, ESsdElementLevel level) |
Protected Member Functions | |
| void | ConstructName () |
| void | SetLevel (Int_t level) |
Protected Attributes | |
| Int_t | fAddress |
| Unique element address. | |
| ESsdElementLevel | fLevel |
| Level in hierarchy. | |
| TGeoPhysicalNode * | fNode |
| Pointer to geometry. | |
| std::vector< BmnSsdElement * > | fDaughters |
| Array of daughters. | |
| BmnSsdElement * | fMother |
| Mother element. | |
Class representing an element of the SSD setup.
A BmnSsdElement represents an element in the SSD setup hierarchy (e.g., station, ladder, module,...). It has a unique address, a level (enum BmnSsdElementLevel), a pointer to a TGeoPhysicalNode and an array of daughter elements. It is thus an alignable object.
Definition at line 27 of file BmnSsdElement.h.
| BmnSsdElement::BmnSsdElement | ( | ) |
| BmnSsdElement::BmnSsdElement | ( | Int_t | address, |
| Int_t | level, | ||
| TGeoPhysicalNode * | node = nullptr, |
||
| BmnSsdElement * | mother = nullptr |
||
| ) |
Standard constructor
| address | Unique element address |
| level | Element level |
| node | Pointer to geometry node |
| mother | Pointer to mother element |
Definition at line 37 of file BmnSsdElement.cxx.
References ConstructName(), fLevel, and SetLevel().
|
inlinevirtual |
Destructor
Definition at line 48 of file BmnSsdElement.h.
|
protected |
Construct the name of the element
Definition at line 55 of file BmnSsdElement.cxx.
References fAddress, fMother, BmnSsdAddress::GetElementId(), GetLevel(), kSsdHalfLadder, kSsdLadder, kSsdModule, kSsdSensor, kSsdSystem, and kSsdUnit.
Referenced by BmnSsdElement(), and BmnSsdSensor::SetAddress().
|
static |
Construct the element name from the address (static)
| address | Unique element address |
| level | Element level (unit, ladder, etc.) |
Definition at line 94 of file BmnSsdElement.cxx.
References BmnSsdAddress::GetElementId(), kSsdHalfLadder, kSsdLadder, kSsdModule, kSsdSensor, and kSsdUnit.
|
inline |
Get unique address
Definition at line 61 of file BmnSsdElement.h.
References fAddress.
Referenced by BmnSsdSetup::AssignSensor(), BmnSsdSensor::CreateHit(), BmnSsdSetup::Init(), and BmnSsdMC::Initialize().
| BmnSsdElement * BmnSsdElement::GetDaughter | ( | Int_t | index | ) | const |
Get a daughter element
| index | Index of daughter element |
Definition at line 126 of file BmnSsdElement.cxx.
References fDaughters, and GetNofDaughters().
Referenced by BmnSsdModule::FindHits(), BmnSsdSetup::GetElement(), GetNofElements(), BmnSsdSetup::Init(), BmnSsdMC::Initialize(), Print(), and BmnSsdModule::SetParameters().
|
inline |
Get the index within the mother element
Definition at line 73 of file BmnSsdElement.h.
References fAddress, fLevel, and BmnSsdAddress::GetElementId().
Referenced by BmnSsdSensorDssd::GetClusterPosition(), and BmnSsdSensorDssdStereo::IntersectClusters().
|
inline |
Get the element level
Definition at line 81 of file BmnSsdElement.h.
References fLevel.
Referenced by BmnSsdStation::AddLadder(), and ConstructName().
|
inline |
Get the mother element
Definition at line 85 of file BmnSsdElement.h.
References fMother.
Referenced by BmnSsdSensor::GetModule().
|
inline |
Get number of daughter elements
Definition at line 91 of file BmnSsdElement.h.
References fDaughters.
Referenced by BmnSsdModule::FindHits(), GetDaughter(), GetNofElements(), BmnSsdSetup::Init(), InitDaughters(), BmnSsdMC::Initialize(), and Print().
| Int_t BmnSsdElement::GetNofElements | ( | Int_t | level | ) | const |
Get number of elements at given level
| level | Element level (see enum ESsdElementLevel) |
Definition at line 135 of file BmnSsdElement.cxx.
References fLevel, GetDaughter(), GetNofDaughters(), and GetNofElements().
Referenced by GetNofElements(), and BmnSsdSetup::Init().
|
inline |
Definition at line 102 of file BmnSsdElement.h.
References fNode.
Referenced by BmnSsdSetup::GetStationNumber(), BmnSsdMC::Initialize(), and BmnSsdSensorDssdStereo::ToString().
|
virtual |
Initialise daughters from geometry
Definition at line 151 of file BmnSsdElement.cxx.
References BmnSsdElement(), fAddress, fDaughters, fLevel, fNode, BmnSsdSetup::GetLevelName(), GetNofDaughters(), InitDaughters(), BmnSsdSetup::Instance(), kSsdHalfLadder, kSsdSensor, and BmnSsdAddress::SetElementId().
Referenced by InitDaughters().
|
virtual |
Definition at line 205 of file BmnSsdElement.cxx.
References fAddress, fNode, GetDaughter(), GetNofDaughters(), and Print().
Referenced by Print().
|
protected |
Set the element level from integer Protection against being out of range.
| level | Element level |
Definition at line 220 of file BmnSsdElement.cxx.
References fLevel, kSsdHalfLadder, kSsdLadder, kSsdModule, kSsdSensor, kSsdSystem, and kSsdUnit.
Referenced by BmnSsdElement().
|
inline |
Set the mother element
| Pointer | to mother element |
Definition at line 112 of file BmnSsdElement.h.
References fMother.
|
protected |
Unique element address.
Definition at line 121 of file BmnSsdElement.h.
Referenced by ConstructName(), GetAddress(), BmnSsdSetup::GetElement(), GetIndex(), BmnSsdSensor::GetSensorId(), BmnSsdSetup::Init(), InitDaughters(), Print(), and BmnSsdSensor::SetAddress().
|
protected |
Array of daughters.
Definition at line 124 of file BmnSsdElement.h.
Referenced by GetDaughter(), GetNofDaughters(), and InitDaughters().
|
protected |
Level in hierarchy.
Definition at line 122 of file BmnSsdElement.h.
Referenced by BmnSsdElement(), GetIndex(), GetLevel(), GetNofElements(), InitDaughters(), and SetLevel().
|
protected |
Mother element.
Definition at line 125 of file BmnSsdElement.h.
Referenced by ConstructName(), GetMother(), and SetMother().
|
protected |
Pointer to geometry.
Definition at line 123 of file BmnSsdElement.h.
Referenced by BmnSsdSensor::CreateHit(), BmnSsdSensor::GetNode(), GetPnode(), BmnSsdSensorDssdStereo::Init(), InitDaughters(), Print(), BmnSsdSensor::ProcessPoint(), and BmnSsdSensor::SetNode().