BmnRoot
Loading...
Searching...
No Matches
BmnSsdElement.h
Go to the documentation of this file.
1
7#ifndef BMNSSDELEMENT_H
8#define BMNSSDELEMENT_H 1
9
10
11#include "TGeoPhysicalNode.h"
12#include "TNamed.h"
13#include "BmnSsdAddress.h"
14
15
16
27class BmnSsdElement : public TNamed
28{
29
30 public:
31
34
35
42 BmnSsdElement(Int_t address, Int_t level,
43 TGeoPhysicalNode* node = nullptr,
44 BmnSsdElement* mother = nullptr);
45
46
48 virtual ~BmnSsdElement() { };
49
50
55 static TString ConstructName(Int_t address, ESsdElementLevel level);
56
57
61 Int_t GetAddress() const { return fAddress; }
62
63
67 BmnSsdElement* GetDaughter(Int_t index) const;
68
69
73 Int_t GetIndex() const {
75 }
76
77
81 ESsdElementLevel GetLevel() const { return fLevel; }
82
83
85 BmnSsdElement* GetMother() const { return fMother; }
86
87
91 Int_t GetNofDaughters() const { return fDaughters.size(); }
92
93
99 Int_t GetNofElements(Int_t level) const;
100
101
102 TGeoPhysicalNode* GetPnode() const { return fNode; }
103
104
106 virtual void InitDaughters();
107
108
112 void SetMother(BmnSsdElement* mother) { fMother = mother; }
113
114
116 virtual void Print(Option_t* opt = "") const;
117
118
119 protected:
120
121 Int_t fAddress;
123 TGeoPhysicalNode* fNode;
124 std::vector<BmnSsdElement*> fDaughters;
126
127
129 void ConstructName();
130
131
136 void SetLevel(Int_t level);
137
138
139private:
140
141 // --- Disable copy constructor and assignment operator
142 BmnSsdElement(const BmnSsdElement&) = delete;
143 BmnSsdElement& operator=(const BmnSsdElement&) = delete;
144
145
146 ClassDef(BmnSsdElement, 2);
147};
148
149#endif /* BMNSSDELEMENT_H */
ESsdElementLevel
Class representing an element of the SSD setup.
virtual ~BmnSsdElement()
Int_t GetAddress() const
virtual void InitDaughters()
TGeoPhysicalNode * fNode
Pointer to geometry.
std::vector< BmnSsdElement * > fDaughters
Array of daughters.
Int_t GetNofDaughters() const
Int_t GetNofElements(Int_t level) const
Int_t fAddress
Unique element address.
BmnSsdElement * GetDaughter(Int_t index) const
virtual void Print(Option_t *opt="") const
BmnSsdElement * fMother
Mother element.
BmnSsdElement * GetMother() const
void SetMother(BmnSsdElement *mother)
ESsdElementLevel GetLevel() const
TGeoPhysicalNode * GetPnode() const
ESsdElementLevel fLevel
Level in hierarchy.
void SetLevel(Int_t level)
Int_t GetIndex() const
UInt_t GetElementId(Int_t address, Int_t level)
Get the index of an element.