23 #include "GeoModelKernel/GeoNameTag.h"
24 #include "GeoModelKernel/GeoPhysVol.h"
25 #include "GeoModelKernel/GeoPcon.h"
26 #include "GeoModelKernel/GeoShapeUnion.h"
38 #include "GaudiKernel/PhysicalConstants.h"
45 :
InDetDD::DetectorFactoryBase(athenaComps)
63 msg(
MSG::DEBUG) <<
"Building InDet Service Material with ATLAS Version Tag: " << atlasVersionKey.
tag() <<
endmsg;
64 msg(
MSG::DEBUG) <<
" with InDet Version Tag: " << indetVersionKey.
tag() <<
" at Node: "
66 msg(
MSG::DEBUG) <<
" with TRT Version Tag: " << trtVersionKey.
tag() <<
" at Node: "
68 msg(
MSG::DEBUG) <<
" with SCT Version Tag: " << sctVersionKey.
tag() <<
" at Node: "
78 const IRDBRecord *envelopes = (*servEnvelopeTable)[0];
94 double ZMaxIDet = (*atls)[0]->getDouble(
"IDETZMX") *
Gaudi::Units::cm + safety;
104 double RMaxIDet = (*atls)[0]->getDouble(
"IDETOR") *
Gaudi::Units::cm + safety;
122 RMaxFwdTRTC = RMinPixServ;
123 RMaxPixServ = RMinPixServ;
126 RMaxPixServ = RMaxFwdTRTC;
134 const GeoShapeUnion *ServVolAux =
nullptr;
141 pixServP->addPlane(ZMinPixServ, RMinPixServ, RMaxPixServ);
142 pixServM->addPlane(-ZMinPixServ, RMinPixServ, RMaxPixServ);
145 pixServP->addPlane(ZMaxFwdTRTC, RMinPixServ, RMaxPixServ);
146 pixServP->addPlane(ZMaxFwdTRTC, RMinPixServ, RMaxIDet);
147 pixServM->addPlane(-ZMaxFwdTRTC, RMinPixServ, RMaxPixServ);
148 pixServM->addPlane(-ZMaxFwdTRTC, RMinPixServ, RMaxIDet);
151 pixServP->addPlane(ZMaxIDet, RMinPixServ, RMaxIDet);
152 pixServM->addPlane(-ZMaxIDet, RMinPixServ, RMaxIDet);
154 ServVolAux =
new GeoShapeUnion(pixServP, pixServM);
163 sctTrtServ->addPlane(-ZMaxIDet, RMinPixServ, RMaxIDet);
166 sctTrtServ->addPlane(-ZMinPixServ, RMinPixServ, RMaxIDet);
167 sctTrtServ->addPlane(-ZMinPixServ, RMaxPixServ, RMaxIDet);
171 sctTrtServ->addPlane(-ZMaxIDet, RMaxFwdTRTC, RMaxIDet);
175 sctTrtServ->addPlane(-ZMaxSCTServInTRT, RMaxFwdTRTC, RMaxIDet);
176 sctTrtServ->addPlane(-ZMaxSCTServInTRT, RMaxFwdSCT, RMaxIDet);
177 sctTrtServ->addPlane(-ZMinSCTServInTRT, RMaxFwdSCT, RMaxIDet);
178 sctTrtServ->addPlane(-ZMinSCTServInTRT, RMaxFwdTRT, RMaxIDet);
181 sctTrtServ->addPlane(-ZMinFwdSCTandTRT, RMaxFwdTRT, RMaxIDet);
182 sctTrtServ->addPlane(-ZMinFwdSCTandTRT, RMinBrlSCT, RMaxIDet);
185 sctTrtServ->addPlane(-ZMaxBrlSCT, RMinBrlSCT, RMaxIDet);
186 sctTrtServ->addPlane(-ZMaxBrlSCT, RMinBrlTRT, RMaxIDet);
189 sctTrtServ->addPlane(-ZMaxBrlTRT, RMinBrlTRT, RMaxIDet);
190 sctTrtServ->addPlane(-ZMaxBrlTRT, RMaxBrlTRT, RMaxIDet);
195 sctTrtServ->addPlane(ZMaxBrlTRT, RMaxBrlTRT, RMaxIDet);
196 sctTrtServ->addPlane(ZMaxBrlTRT, RMinBrlTRT, RMaxIDet);
199 sctTrtServ->addPlane(ZMaxBrlSCT, RMinBrlTRT, RMaxIDet);
200 sctTrtServ->addPlane(ZMaxBrlSCT, RMinBrlSCT, RMaxIDet);
203 sctTrtServ->addPlane(ZMinFwdSCTandTRT, RMinBrlSCT, RMaxIDet);
204 sctTrtServ->addPlane(ZMinFwdSCTandTRT, RMaxFwdTRT, RMaxIDet);
207 sctTrtServ->addPlane(ZMinSCTServInTRT, RMaxFwdTRT, RMaxIDet);
208 sctTrtServ->addPlane(ZMinSCTServInTRT, RMaxFwdSCT, RMaxIDet);
209 sctTrtServ->addPlane(ZMaxSCTServInTRT, RMaxFwdSCT, RMaxIDet);
210 sctTrtServ->addPlane(ZMaxSCTServInTRT, RMaxFwdTRTC, RMaxIDet);
216 sctTrtServ->addPlane(ZMinPixServ, RMaxPixServ, RMaxIDet);
217 sctTrtServ->addPlane(ZMinPixServ, RMinPixServ, RMaxIDet);
220 sctTrtServ->addPlane(ZMaxIDet, RMinPixServ, RMaxIDet);
224 sctTrtServ->addPlane(ZMaxIDet, RMaxFwdTRTC, RMaxIDet);
227 const GeoShape * ServVol =
nullptr;
228 if (ServVolAux ==
nullptr) {
229 ServVol = sctTrtServ;
231 ServVol =
new GeoShapeUnion(sctTrtServ, ServVolAux);
233 const GeoMaterial* air = materialManager->
getMaterial(
"std::Air");
234 const GeoLogVol* ServLog =
new GeoLogVol(
"ServLog",ServVol,air);
235 GeoPhysVol* ServPhys =
new GeoPhysVol(ServLog);
240 GeoNameTag *
tag =
new GeoNameTag(
"InDetServMat");
242 world->add(ServPhys);
271 xMat.
add(ServPhys,
"InDetServMat");
273 delete materialManager;