BmnRoot
Loading...
Searching...
No Matches
BmnSsdElement Class Reference

Class representing an element of the SSD setup. More...

#include <BmnSsdElement.h>

Inheritance diagram for BmnSsdElement:
[legend]
Collaboration diagram for BmnSsdElement:
[legend]

Public Member Functions

 BmnSsdElement ()
 
 BmnSsdElement (Int_t address, Int_t level, TGeoPhysicalNode *node=nullptr, BmnSsdElement *mother=nullptr)
 
virtual ~BmnSsdElement ()
 
Int_t GetAddress () const
 
BmnSsdElementGetDaughter (Int_t index) const
 
Int_t GetIndex () const
 
ESsdElementLevel GetLevel () const
 
BmnSsdElementGetMother () 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.
 
BmnSsdElementfMother
 Mother element.
 

Detailed Description

Class representing an element of the SSD setup.

Version
1.0

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.

Constructor & Destructor Documentation

◆ BmnSsdElement() [1/2]

BmnSsdElement::BmnSsdElement ( )

Default constructor

Definition at line 24 of file BmnSsdElement.cxx.

Referenced by InitDaughters().

◆ BmnSsdElement() [2/2]

BmnSsdElement::BmnSsdElement ( Int_t  address,
Int_t  level,
TGeoPhysicalNode *  node = nullptr,
BmnSsdElement mother = nullptr 
)

Standard constructor

Parameters
addressUnique element address
levelElement level
nodePointer to geometry node
motherPointer to mother element

Definition at line 37 of file BmnSsdElement.cxx.

References ConstructName(), fLevel, and SetLevel().

◆ ~BmnSsdElement()

virtual BmnSsdElement::~BmnSsdElement ( )
inlinevirtual

Destructor

Definition at line 48 of file BmnSsdElement.h.

Member Function Documentation

◆ ConstructName() [1/2]

void BmnSsdElement::ConstructName ( )
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().

◆ ConstructName() [2/2]

TString BmnSsdElement::ConstructName ( Int_t  address,
ESsdElementLevel  level 
)
static

Construct the element name from the address (static)

Parameters
addressUnique element address
levelElement level (unit, ladder, etc.)

Definition at line 94 of file BmnSsdElement.cxx.

References BmnSsdAddress::GetElementId(), kSsdHalfLadder, kSsdLadder, kSsdModule, kSsdSensor, and kSsdUnit.

◆ GetAddress()

Int_t BmnSsdElement::GetAddress ( ) const
inline

Get unique address

Returns
Element address

Definition at line 61 of file BmnSsdElement.h.

References fAddress.

Referenced by BmnSsdSetup::AssignSensor(), BmnSsdSensor::CreateHit(), BmnSsdSetup::Init(), and BmnSsdMC::Initialize().

◆ GetDaughter()

BmnSsdElement * BmnSsdElement::GetDaughter ( Int_t  index) const

Get a daughter element

Parameters
indexIndex 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().

◆ GetIndex()

Int_t BmnSsdElement::GetIndex ( ) const
inline

Get the index within the mother element

Returns
Index of element in mother

Definition at line 73 of file BmnSsdElement.h.

References fAddress, fLevel, and BmnSsdAddress::GetElementId().

Referenced by BmnSsdSensorDssd::GetClusterPosition(), and BmnSsdSensorDssdStereo::IntersectClusters().

◆ GetLevel()

ESsdElementLevel BmnSsdElement::GetLevel ( ) const
inline

Get the element level

Returns
Element level (type enum ESsdElementLevel)

Definition at line 81 of file BmnSsdElement.h.

References fLevel.

Referenced by BmnSsdStation::AddLadder(), and ConstructName().

◆ GetMother()

BmnSsdElement * BmnSsdElement::GetMother ( ) const
inline

Get the mother element

Definition at line 85 of file BmnSsdElement.h.

References fMother.

Referenced by BmnSsdSensor::GetModule().

◆ GetNofDaughters()

Int_t BmnSsdElement::GetNofDaughters ( ) const
inline

Get number of daughter elements

Returns
Number of daughters

Definition at line 91 of file BmnSsdElement.h.

References fDaughters.

Referenced by BmnSsdModule::FindHits(), GetDaughter(), GetNofElements(), BmnSsdSetup::Init(), InitDaughters(), BmnSsdMC::Initialize(), and Print().

◆ GetNofElements()

Int_t BmnSsdElement::GetNofElements ( Int_t  level) const

Get number of elements at given level

Parameters
levelElement level (see enum ESsdElementLevel)
Returns
Number of elements at given level with this element as ancestor

Definition at line 135 of file BmnSsdElement.cxx.

References fLevel, GetDaughter(), GetNofDaughters(), and GetNofElements().

Referenced by GetNofElements(), and BmnSsdSetup::Init().

◆ GetPnode()

TGeoPhysicalNode * BmnSsdElement::GetPnode ( ) const
inline

◆ InitDaughters()

void BmnSsdElement::InitDaughters ( )
virtual

◆ Print()

void BmnSsdElement::Print ( Option_t *  opt = "") const
virtual

Print

Definition at line 205 of file BmnSsdElement.cxx.

References fAddress, fNode, GetDaughter(), GetNofDaughters(), and Print().

Referenced by Print().

◆ SetLevel()

void BmnSsdElement::SetLevel ( Int_t  level)
protected

Set the element level from integer Protection against being out of range.

Parameters
levelElement level

Definition at line 220 of file BmnSsdElement.cxx.

References fLevel, kSsdHalfLadder, kSsdLadder, kSsdModule, kSsdSensor, kSsdSystem, and kSsdUnit.

Referenced by BmnSsdElement().

◆ SetMother()

void BmnSsdElement::SetMother ( BmnSsdElement mother)
inline

Set the mother element

Parameters
Pointerto mother element

Definition at line 112 of file BmnSsdElement.h.

References fMother.

Member Data Documentation

◆ fAddress

Int_t BmnSsdElement::fAddress
protected

◆ fDaughters

std::vector<BmnSsdElement*> BmnSsdElement::fDaughters
protected

Array of daughters.

Definition at line 124 of file BmnSsdElement.h.

Referenced by GetDaughter(), GetNofDaughters(), and InitDaughters().

◆ fLevel

ESsdElementLevel BmnSsdElement::fLevel
protected

Level in hierarchy.

Definition at line 122 of file BmnSsdElement.h.

Referenced by BmnSsdElement(), GetIndex(), GetLevel(), GetNofElements(), InitDaughters(), and SetLevel().

◆ fMother

BmnSsdElement* BmnSsdElement::fMother
protected

Mother element.

Definition at line 125 of file BmnSsdElement.h.

Referenced by ConstructName(), GetMother(), and SetMother().

◆ fNode

TGeoPhysicalNode* BmnSsdElement::fNode
protected

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