49 GeoFullPhysVol* pPixelEnvelopeVol=(*m_mapFPV)[
"Pixel_Envelope"];
60 if (endcapAPresent || endcapCPresent) {
82 xMat.add(pPixelEnvelopeVol,
"Pixel");
102 return pPixelEnvelopeVol;
114 const GeoShape * envelopeShape;
120 envelopeShape =
new GeoTube(rmin,rmax,halflength);
126 for (
int i = 0;
i < numPlanes * 2;
i++) {
127 int tableIndex = (
i < numPlanes) ? numPlanes - 1 -
i :
i - numPlanes;
128 int sign = (
i < numPlanes) ? -1 : 1;
132 envelopeShapeTmp->addPlane(
z, rmin, rmax);
134 envelopeShape = envelopeShapeTmp;
138 const GeoLogVol* envelopeLog =
new GeoLogVol(
"Pixel",envelopeShape,air);
139 GeoFullPhysVol* envelopePhys =
new GeoFullPhysVol(envelopeLog);
159 GeoNameTag*
tag =
new GeoNameTag(
"Barrel");
160 GeoVPhysVol* barrelPhys = brl.Build() ;
161 envelopePhys->add(
tag);
162 envelopePhys->add(
new GeoIdentifierTag(0));
163 envelopePhys->add(
new GeoTransform(barrelTransform));
164 envelopePhys->add(barrelPhys );
168 if (endcapAPresent || endcapCPresent) {
175 if (endcapAPresent) {
182 GeoTransform* xform =
new GeoTransform(endcapATransform * GeoTrf::TranslateZ3D(zpos));
183 GeoNameTag*
tag =
new GeoNameTag(
"EndCapA");
184 envelopePhys->add(
tag);
185 envelopePhys->add(
new GeoIdentifierTag(2));
186 envelopePhys->add(xform);
187 envelopePhys->add(pec.Build() );
191 if (endcapCPresent) {
199 GeoTransform* xform =
new GeoTransform(endcapCTransform * GeoTrf::TranslateZ3D(-zpos) * GeoTrf::RotateY3D(180*
Gaudi::Units::deg));
200 GeoNameTag*
tag =
new GeoNameTag(
"EndCapC");
201 envelopePhys->add(
tag);
202 envelopePhys->add(
new GeoIdentifierTag(-2));
203 envelopePhys->add(xform);
204 envelopePhys->add(pec.Build() );
212 frame.BuildOutBarrel(envelopePhys);
234 for(
int iSection=1; iSection<4; iSection++)
242 GeoNameTag * tagFlexA =
new GeoNameTag(
"PP0Flex_A");
243 GeoTransform *xformFlexA = iFlexSrv.getSupportTrfA();
244 GeoPhysVol *flexPhys_A = iFlexSrv.getSupportA();
245 envelopePhys->add(tagFlexA);
246 envelopePhys->add(xformFlexA);
247 envelopePhys->add(flexPhys_A);
249 GeoNameTag * tagFlexC =
new GeoNameTag(
"PP0Flex_C");
250 GeoTransform *xformFlexC = iFlexSrv.getSupportTrfC();
251 GeoPhysVol *flexPhys_C = iFlexSrv.getSupportC();
252 envelopePhys->add(tagFlexC);
253 envelopePhys->add(xformFlexC);
254 envelopePhys->add(flexPhys_C);
260 if(fwdSrv.isComplexShapeDefined()){
264 GeoNameTag * tagFwdSvcA =
new GeoNameTag(
"FwdSvc_A");
265 GeoTransform *xformFwdSvcA = fwdSrv.getSupportTrfA();
266 GeoPhysVol *svcPhys_A = fwdSrv.getSupportA();
267 envelopePhys->add(tagFwdSvcA);
268 envelopePhys->add(xformFwdSvcA);
269 envelopePhys->add(svcPhys_A);
271 GeoNameTag * tagFwdSvcC =
new GeoNameTag(
"FwdSvc_C");
272 GeoTransform *xformFwdSvcC = fwdSrv.getSupportTrfC();
273 GeoPhysVol *svcPhys_C = fwdSrv.getSupportC();
274 envelopePhys->add(tagFwdSvcC);
275 envelopePhys->add(xformFwdSvcC);
276 envelopePhys->add(svcPhys_C);
285 for (
int iSection = 0; iSection < numSections; iSection++) {
288 frame.BuildAndPlace(envelopePhys,iSection);
294 xMat.add(envelopePhys,
"Pixel");
307 GeoNameTag*
tag1 =
new GeoNameTag(
"DBMA");
308 GeoVPhysVol* dbmPhys1 = theDBM.Build() ;
309 envelopePhys->add(
tag1);
310 envelopePhys->add(
new GeoIdentifierTag(4));
311 envelopePhys->add(
new GeoTransform(dbmTransform1));
312 envelopePhys->add(dbmPhys1 );
316 GeoNameTag*
tag2 =
new GeoNameTag(
"DBMC");
318 envelopePhys->add(
tag2);
319 envelopePhys->add(
new GeoIdentifierTag(-4));
320 envelopePhys->add(dbmTransform2);
321 envelopePhys->add(theDBM.Build());
335 if (
sc.isFailure()) {
336 std::cout <<
"PixelGeoModel failed to build BCM." << std::endl;
344 if (
sc.isFailure()) {
345 std::cout <<
"PixelGeoModel failed to build BLM." << std::endl;
349 if(pixServices)
delete pixServices;