39 TGeoNode* topNode = gGeoManager->GetTopNode();
40 TObjArray* nodes = topNode->GetNodes();
42 LOG(fatal) <<
"CbmTrdParSetGeo::Init: nodes is null!";
47 for (Int_t iNode = 0; iNode < nodes->GetEntriesFast(); iNode++) {
48 TGeoNode* node =
static_cast<TGeoNode*
>(nodes->At(iNode));
49 if (!TString(node->GetName()).Contains(
"trd", TString::kIgnoreCase))
51 TGeoNode* station = node;
53 TObjArray* layers = station->GetNodes();
54 for (Int_t iLayer = 0; iLayer < layers->GetEntriesFast(); iLayer++) {
55 TGeoNode* layer =
static_cast<TGeoNode*
>(layers->At(iLayer));
56 if (!TString(layer->GetName()).Contains(
"layer", TString::kIgnoreCase))
continue;
58 TObjArray* modules = layer->GetNodes();
59 for (Int_t iModule = 0; iModule < modules->GetEntriesFast(); iModule++) {
60 TGeoNode* module =
static_cast<TGeoNode*
>(modules->At(iModule));
61 TString path = TString(
"/") + topNode->GetName() +
"/" + station->GetName() +
"/" + layer->GetName() +
"/"
63 TObjArray* parts =
module->GetNodes();
64 for (Int_t iPart = 0; iPart < parts->GetEntriesFast(); iPart++) {
65 TGeoNode* part =
static_cast<TGeoNode*
>(parts->At(iPart));
70 if (TString(part->GetName()).Contains(
"gas", TString::kIgnoreCase)) {
72 path += Form(
"/%s", part->GetName());
74 else if (TString(part->GetName()).Contains(
"Volume", TString::kIgnoreCase)) {
75 path += Form(
"/%s/gas_0", part->GetName());
79 LOG(debug) <<
"Adding detector with path " << path.Data();
81 gGeoManager->cd(path.Data());
110 std::map<Int_t, CbmTrdParMod*>::const_iterator imod =
fModuleMap.begin();
114 printf(
"Module %4d [%p]:\n", imod->first, (
void*) mod);
115 printf(
" %s[%s]\n", mod->GetName(), mod->GetPath());
118 printf(
" X[%.2f] Y[%.2f] Z[%.2f] DX[%.2f] DY[%.2f] DZ[%.2f]\n", xyz[0], xyz[1], xyz[2], mod->GetDX(), mod->GetDY(),