8 #include "TGeoManager.h"
10 #include "TObjArray.h"
19 : fIsElectronSetup(false), fIsMuonSetup(false), fDet() {}
28 assert(
fDet.count(detId) != 0);
29 return fDet.find(detId)->second;
33 assert(gGeoManager != NULL);
35 TObjArray* nodes = gGeoManager->GetTopNode()->GetNodes();
36 for (Int_t iNode = 0; iNode < nodes->GetEntriesFast(); iNode++) {
37 TGeoNode* node = (TGeoNode*) nodes->At(iNode);
38 if (TString(node->GetName()).Contains(name.c_str())) {
return true; }
42 TGeoNode* node1 = gGeoManager->GetTopVolume()->FindNode(
"pipevac1_0");
44 if (node1->GetVolume()->FindNode(
"mvdstation01_0")) {
return true; }
46 TObjArray* nodes = gGeoManager->GetTopNode()->GetNodes();
47 for (Int_t iNode = 0; iNode < nodes->GetEntriesFast(); iNode++) {
48 TGeoNode* node = (TGeoNode*) nodes->At(iNode);
49 TString nodeName = node->GetName();
51 if (nodeName.Contains(
"pipe")) {
52 TObjArray* nodes2 = node->GetNodes();
53 for (Int_t iiNode = 0; iiNode < nodes2->GetEntriesFast(); iiNode++) {
54 TGeoNode* node2 = (TGeoNode*) nodes2->At(iiNode);
55 TString nodeName2 = node2->GetName();
57 if (nodeName2.Contains(
"pipevac1")) {
60 TObjArray* nodes3 = node2->GetNodes();
61 if (!nodes3)
return false;
62 for (Int_t iiiNode = 0; iiiNode < nodes3->GetEntriesFast();
64 TGeoNode* node3 = (TGeoNode*) nodes3->At(iiiNode);
65 TString nodeName3 = node3->GetName();
67 if (nodeName3.Contains(
"mvd")) {
return true; }
100 string str =
"LitDetectorSetup: ";
103 str +=
"detectors in geometry: ";