Go to the documentation of this file.
12 #include <FairLogger.h>
14 #include <TGeoManager.h>
16 #include <TGeoPhysicalNode.h>
27 TGeoPhysicalNode* node,
41 Bool_t isValid = kTRUE;
42 if (name.Length() != 16) isValid = kFALSE;
44 if (!name.BeginsWith(
"STS")) isValid = kFALSE;
45 if (name[4] !=
'U') isValid = kFALSE;
46 if (name[8] !=
'L') isValid = kFALSE;
47 if (name[13] !=
'M') isValid = kFALSE;
50 LOG(fatal) <<
"GetAddressFromName: Not a valid module name " << name;
54 Int_t unit = 10 * (name[5] -
'0') + name[6] -
'0' - 1;
55 Int_t ladder = 10 * (name[9] -
'0') + name[10] -
'0' - 1;
56 Int_t hLadder = (name[11] ==
'U' ? 0 : 1);
57 Int_t module = 10 * (name[14] -
'0') + name[15] -
'0' - 1;
73 TGeoNode* moduleNode =
fNode->GetNode();
74 TString modulePath =
fNode->GetName();
76 for (Int_t iNode = 0; iNode < moduleNode->GetNdaughters(); iNode++) {
79 TString daughterName = moduleNode->GetDaughter(iNode)->GetName();
80 if (daughterName.Contains(
"Sensor", TString::kIgnoreCase)) {
83 TString daughterPath = modulePath +
"/" + daughterName;
84 TGeoPhysicalNode* sensorNode =
new TGeoPhysicalNode(daughterPath.Data());
std::vector< CbmStsElement * > fDaughters
Array of daughters.
Int_t GetAddress(UInt_t unit=0, UInt_t ladder=0, UInt_t halfladder=0, UInt_t module=0, UInt_t sensor=0, UInt_t side=0, UInt_t version=kCurrentVersion)
Construct address.
std::string ToString() const
Class representing an instance of a readout unit in the CBM-STS.
virtual void InitDaughters()
Initialise daughters from geometry.
Int_t SetElementId(Int_t address, Int_t level, UInt_t newId)
Set the index of an element, leaving the other element levels untouched.
static Int_t GetAddressFromName(TString name)
Get the address from the module name (static)
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Class representing an instance of a sensor in the CBM-STS.
virtual ~CbmStsModule()
Destructor.
Int_t GetNofDaughters() const
Class representing an element of the STS setup.
Int_t fAddress
Unique element address.
std::string ToString(Int_t address)
String output.
TGeoPhysicalNode * fNode
Pointer to geometry.
CbmStsModule(UInt_t address=0, TGeoPhysicalNode *node=nullptr, CbmStsElement *mother=nullptr)
Standard constructor.