106 for (UInt_t iLad = 0; iLad <
fLadders.size(); iLad++) {
125 TGeoPhysicalNode* sensorNode = sensor->
GetPnode();
127 Double_t local[3] = {0., 0., 0.};
129 sensorNode->GetMatrix()->LocalToMaster(local, global);
140 TGeoBBox* sBox =
dynamic_cast<TGeoBBox*
>(sensorNode->GetShape());
141 if (!sBox) LOG(fatal) << GetName() <<
": sensor shape is not a box!";
142 Double_t sD = 2. * sBox->GetDZ();
200 TGeoBBox* box =
dynamic_cast<TGeoBBox*
>(
fNode->GetShape());
201 if (!box) LOG(fatal) << GetName() <<
": shape is not box! ";
202 Double_t local[3] = {0., 0., 0.};
204 fNode->GetMatrix()->LocalToMaster(local, global);
205 fXmin = global[0] - box->GetDX();
206 fXmax = global[0] + box->GetDX();
207 fYmin = global[1] - box->GetDY();
208 fYmax = global[1] + box->GetDY();
216 TGeoVolumeAssembly* statVol =
new TGeoVolumeAssembly(
"myStation");
217 for (UInt_t iLadder = 0; iLadder <
fLadders.size(); iLadder++) {
218 TGeoVolume* ladVol =
fLadders.at(iLadder)->GetPnode()->GetVolume();
219 TGeoHMatrix* ladMat =
fLadders.at(iLadder)->GetPnode()->GetMatrix();
220 statVol->AddNode(ladVol, iLadder, ladMat);
222 statVol->GetShape()->ComputeBBox();
223 TGeoBBox* statShape =
dynamic_cast<TGeoBBox*
>(statVol->GetShape());
224 const Double_t* origin = statShape->GetOrigin();
225 fXmin = origin[0] - statShape->GetDX();
226 fXmax = origin[0] + statShape->GetDX();
227 fYmin = origin[1] - statShape->GetDY();
228 fYmax = origin[1] + statShape->GetDY();
237 if (
fDiffSensorD) LOG(warn) << GetName() <<
": Different values for sensor thickness!";
244 Double_t unitLocal[3] = {1., 0., 0.};
245 Double_t unitGlobal[3];
246 sensorNode->GetMatrix()->LocalToMaster(unitLocal, unitGlobal);
248 Double_t* translation = sensorNode->GetMatrix()->GetTranslation();
249 unitGlobal[0] -= translation[0];
250 unitGlobal[1] -= translation[1];
251 unitGlobal[2] -= translation[2];
253 fSensorRot = atan2(unitGlobal[1], unitGlobal[0]);