102 Int_t nStat; TVector3 p;
109 for(Int_t i=0; i<=muStZpos.size(); i++) {
116 p.SetXYZ(-999999,-999999,-999999);
121 p.SetZ(muStZpos[--nStat]);
122 dID -= 10000*(nStat);
124 Int_t muXpos, muYpos;
125 muXpos =
tileXdim*((dID%tileXn[nStat])+0.5)-muStxMax[nStat];
126 muYpos =
tileYdim*((Int_t)(dID/tileXn[nStat])+0.5)-muStyMax[nStat];
127 p.SetXYZ(muXpos, muYpos, muStZpos[nStat]);
137 TGeoShape* muShape; TGeoBBox* muonBox;
138 TGeoNavigator* nav = gGeoManager->GetCurrentNavigator();
139 Double_t loc[3]={0,0,0}, global[3]={0,0,0};
141 TString muDet =
"cave/MuonDetector_1";
143 TGeoNode* node = nav->GetCurrentNode();
144 TObjArray* nodes = node->GetVolume()->GetNodes();
146 for (Int_t i = 0; i < nodes->GetEntries(); i++) {
147 node = (TGeoNode*)nodes->At(i);
149 if (TString(node->GetName()).Contains(
"muondet")) {
150 nav->cd(muDet+
"/"+node->GetName());
151 TGeoVolume* volu = node->GetVolume();
152 muShape = node->GetVolume()->GetShape();
153 muonBox = (TGeoBBox*) muShape;
154 muStxMax.push_back(muonBox->GetDX()); muStyMax.push_back(muonBox->GetDY());
155 muStzMax.push_back(muonBox->GetDZ());
156 nav->LocalToMaster(loc,global); muStZpos.push_back(global[2]);
157 tileXn.push_back(2*muStxMax.at(muStNs)/
tileXdim);
158 tileYn.push_back(2*muStyMax.at(muStNs)/
tileYdim);