Relative shift of EBpos is too big, This is expected behaviour for testbeam and commissioning configurations
Relative shift of EBpos is too big, This is expected behaviour for testbeam and commissioning configurations
101{
102
103 bool Filling = true;
104 bool EBC = true , BAR = true , EBA = true ;
105 int NcpFrom = 1, NcpPlus = 63;
106
107
108
110 double AnglMin = (NcpFrom-1)*
deltaPhi*Gaudi::Units::deg, AnglMax = (NcpPlus+1)*
deltaPhi*Gaudi::Units::deg;
111
112
113
114
115
116
117
118 (*m_log) << MSG::INFO <<
" Entering TileAtlasFactory::create()" <<
endmsg;
119
120
121 StoredMaterialManager* theMaterialManager = nullptr;
122 if (StatusCode::SUCCESS !=
m_detectorStore->retrieve(theMaterialManager,
"MATERIALS")) {
123 (*m_log) << MSG::ERROR <<
"Could not find Material Manager MATERIALS" <<
endmsg;
124 return;
125 }
126 const GeoMaterial* matAir = theMaterialManager->
getMaterial(
"std::Air");
127 const GeoMaterial* matIron = theMaterialManager->
getMaterial(
"std::Iron");
128
129
130
132 TileGeoSectionBuilder* sectionBuilder =
new TileGeoSectionBuilder(theMaterialManager,dbManager,
m_switches,
m_log);
133
134 double DzSaddleSupport = 0, RadiusSaddle = 0;
136 (*m_log) << MSG::INFO <<
" Tile Geometry with Saddle supports, starting from TileCal-CSC-02 xxx"<<
endmsg;
137
139
141 RadiusSaddle = dbManager->
RadiusSaddle()*Gaudi::Units::cm;
142 if (
m_log->level()<=MSG::DEBUG)
143 (*m_log) << MSG::DEBUG << " DzSaddleSupport()= "<<DzSaddleSupport<<" RadiusSaddle= "<<RadiusSaddle
145 }
146
147 if (
m_log->level()<=MSG::DEBUG) {
148 (*m_log) <<MSG::DEBUG <<
"TileAtlasFactory. addPlates = " <<
m_switches.addPlatesToCell<<
endmsg;
149 (*m_log) <<MSG::DEBUG <<
"TileAtlasFactory. crackOption = " <<
m_switches.crackOption<<
endmsg;
150 }
153 if (barrel_flag == 5) crack_flag = 9;
154 if (crack_flag == 4 || crack_flag == 5) barrel_flag = 4;
155 bool eb_flag = (barrel_flag<4 || (barrel_flag==4 && crack_flag==0) );
156 if (
m_log->level()<=MSG::DEBUG) {
157 (*m_log) << MSG::DEBUG <<
"barrel_flag " << barrel_flag <<
endmsg;
158 (*m_log) << MSG::DEBUG <<
"crack_flag " << crack_flag <<
endmsg;
159 }
160
161
162
163
164
165
166 GeoIntrusivePtr<GeoLogVol> lvTileEnvelopeBarrel{nullptr}, lvTileEnvelopePosEndcap{nullptr}, lvTileEnvelopeNegEndcap{nullptr}, lvTileEnvelopePosCrack{nullptr}, lvTileEnvelopeNegCrack{nullptr};
167 PVLink pvTileEnvelopeBarrel{nullptr}, pvTileEnvelopePosEndcap{nullptr}, pvTileEnvelopeNegEndcap {nullptr}, pvTileEnvelopePosCrack{nullptr}, pvTileEnvelopeNegCrack{nullptr};
168
169 if (crack_flag==2) {
171 (*m_log) <<MSG::WARNING <<
"Top-level volume names for crack scintillators are missing"<<
endmsg;
172 (*m_log) <<MSG::WARNING <<
"Crack scintillators will not be built"<<
endmsg;
173 crack_flag = 9;
174 } else {
176 for (auto v : vols) {
178 pvTileEnvelopePosCrack = const_pointer_cast(PVConstLink{
v.first});
179 }
181 pvTileEnvelopeNegCrack = const_pointer_cast(PVConstLink{
v.first});
182 }
183 }
184 }
185 } else if (crack_flag==3) {
187 (*m_log) <<MSG::WARNING <<
"Top-level volume pointers for crack scintillators are missing"<<
endmsg;
188 (*m_log) <<MSG::WARNING <<
"Crack scintillators will not be built"<<
endmsg;
189 crack_flag = 9;
190 } else {
193 }
194 } else if (crack_flag==4) {
195 pvTileEnvelopePosCrack = world;
196 } else if (crack_flag==5) {
197 pvTileEnvelopeNegCrack = world;
198 }
199
200 if (pvTileEnvelopePosCrack || pvTileEnvelopeNegCrack) {
201 (*m_log) <<MSG::DEBUG << "Top-level volume names for crack scintillators are "
202 <<
" positive: " << ( (pvTileEnvelopePosCrack) ? pvTileEnvelopePosCrack->getLogVol()->
getName() :
"none" )
203 <<
" negative: " << ( (pvTileEnvelopeNegCrack) ? pvTileEnvelopeNegCrack->getLogVol()->
getName() :
"none" )
205 } else if (crack_flag==2) {
206 (*m_log) <<MSG::WARNING << "Top-level volume names for crack scintillators "
209 <<
" were not found" <<
endmsg;
210 (*m_log) <<MSG::WARNING <<
"Crack scintillators will not be built"<<
endmsg;
211 (*m_log) <<MSG::WARNING << "Available top-level volumes are:";
213 for (
auto v : vols) (*m_log) <<
" " <<
v.first->getLogVol()->getName();
215 crack_flag = 9;
216 }
217
218
219 double rless =0.15;
220
221 double dzITC1 =0, rMinITC1 =0, rMaxITC1 =0;
222 double dzITC2 =0, rMinITC2 =0, rMaxITC2 =0;
223
224 double thicknessWedgeMother =0, heightWedgeMother =0, dy1WedgeMother =0, dy2WedgeMother =0;
225 double Glue =0, dzGlue =0;
226 int NbPeriod =0;
227 double zEndSection =0;
228
229
231 double zITCStandard =0;
232
233 double ZLength[] = {0.0,0.0,0.0,0.0,0.0,0.0};
234 double EnvDZPos[] = {0.0,0.0,0.0,0.0,0.0,0.0};
235 double PhiMax[] = {-360.0,-360.0,-360.0,-360.0,-360.0,-360.0};
236 double PhiMin[] = {+360.0,+360.0,+360.0,+360.0,+360.0,+360.0};
237 double RInMin[] = {99999.9,99999.9,99999.9,99999.9,99999.9,99999.9};
238 double ROutMax[] = {0.0,0.0,0.0,0.0,0.0,0.0};
239 double FingerRmax = 0;
240
241
242
243 double BFingerLength =0;
244 double BFingerLengthNeg =0;
245 double BFingerLengthPos =0;
246
247
249 BFingerLength = BFingerLengthNeg = BFingerLengthPos = dbManager->
TIFGdz()*Gaudi::Units::cm;
250
251 double EBFingerLength =0;
252 double EBFingerLengthNeg =0;
253 double EBFingerLengthPos =0;
254
255
257 EBFingerLength = EBFingerLengthNeg = EBFingerLengthPos = dbManager->
TIFGdz()*Gaudi::Units::cm;
258
260
261
262
263 if (
m_log->level()<=MSG::DEBUG)
264 (*m_log) << MSG::DEBUG <<
"n_env " << n_env <<
endmsg;
265
266 for (
int i = 0;
i < n_env ; ++
i) {
269
270
271
272
273
274
275
277 EnvDZPos [
Type] = dbManager->
GetEnvDZ()*Gaudi::Units::cm;
282 FingerRmax = std::max(FingerRmax,dbManager->
GetEnvRout()*Gaudi::Units::cm);
283
284
285 }
286
287
288
289
290
291 double PosDelta =0;
292 PosDelta = EnvDZPos[3] - EnvDZPos[1];
293 if (
m_log->level()<=MSG::DEBUG)
294 (*m_log) << MSG::DEBUG <<" BFingerLengthPos "<<BFingerLengthPos<<" PosDelta "<<PosDelta;
295 if (std::abs(PosDelta) < std::abs(EBFingerLength - BFingerLength) ) {
296 BFingerLengthPos += PosDelta;
297 if (
m_log->level()<=MSG::DEBUG)
298 (*m_log) <<
" => New BFingerLengthPos "<<BFingerLengthPos<<
endmsg;
299 } else {
301 BFingerLengthPos = BFingerLength;
302 PosDelta =0;
303 if (
m_log->level()<=MSG::DEBUG)
304 (*m_log) <<
" => New PosDelta "<<PosDelta<<
endmsg;
305 }
306
307
308
309
310
311 double NegDelta =0;
312 NegDelta = (-EnvDZPos[2] + EnvDZPos[1]);
313 if (
m_log->level()<=MSG::DEBUG)
314 (*m_log) << MSG::DEBUG <<" BFingerLengthNeg "<<BFingerLengthNeg<<" NegDelta "<<NegDelta;
315 if (std::abs(NegDelta) < std::abs(EBFingerLength - BFingerLength) ) {
316 BFingerLengthNeg += NegDelta;
317 if (
m_log->level()<=MSG::DEBUG)
318 (*m_log) <<
" => New BFingerLengthNeg "<<BFingerLengthNeg<<
endmsg;
319 } else {
321 BFingerLengthNeg = BFingerLength;
322 NegDelta =0;
323 if (
m_log->level()<=MSG::DEBUG)
324 (*m_log) <<
" => New NegDelta "<<NegDelta<<
endmsg;
325 }
326
327
328 bool spC10 = false;
333 spC10 = (rMinC10sp < rMinC10);
334 if (spC10) {
335 (*m_log) << MSG::DEBUG <<
" Special C10, changing Rmin from "<<rMinC10<<
" to "<< rMinC10sp <<
endmsg;
336 rMinC10 = rMinC10sp;
337 }
338 }
339
342 double rMinE2neg = rMinE2pos;
343
344
345 bool spE4 = false;
348 double rMinE4neg = rMinE4pos;
350 double rMaxE3neg = rMaxE3pos;
353 spE4 = (rMinE4sp < rMinE4neg);
354 if (spE4) {
355 (*m_log) << MSG::DEBUG <<
" E4' present, changing Rmin for negative crack from "<<rMinE4neg<<
" to "<< rMinE4sp <<
endmsg;
356 rMinE4neg = rMinE4sp;
357 }
358 }
359
361 double BFingerRmin=0, EFingerRmin=0;
363 BFingerRmin = dbManager->
TILBrmax()*Gaudi::Units::cm;
365 EFingerRmin = dbManager->
TILBrmax()*Gaudi::Units::cm;
366
367
369
370
371
372
373
374
375
376 double endCentralBarrel = ZLength[1]/2 - BFingerLength;
377 double endEnvelopeNeg = endCentralBarrel + BFingerLengthNeg;
378 double endEnvelopePos = endCentralBarrel + BFingerLengthPos;
379
380
381 double rminBarrel = RInMin[1];
382
383
384 double rmaxTotal = ROutMax[1];
385
386 if (barrel_flag<1) {
387
388 GeoPcon* tileEnvPconeBarrel = new GeoPcon(PhiMin[1]*Gaudi::Units::deg, PhiMax[1]*Gaudi::Units::deg);
389
390 tileEnvPconeBarrel->addPlane(-endEnvelopeNeg, BFingerRmin, rmaxTotal);
391 tileEnvPconeBarrel->addPlane(-endCentralBarrel-DzSaddleSupport, BFingerRmin, rmaxTotal);
393 tileEnvPconeBarrel->addPlane(-endCentralBarrel-DzSaddleSupport, BFingerRmin-RadiusSaddle,rmaxTotal);
394 tileEnvPconeBarrel->addPlane(-endCentralBarrel, BFingerRmin-RadiusSaddle,rmaxTotal);
395 }
396 tileEnvPconeBarrel->addPlane(-endCentralBarrel, rminBarrel, rmaxTotal);
397 tileEnvPconeBarrel->addPlane( endCentralBarrel, rminBarrel, rmaxTotal);
399 tileEnvPconeBarrel->addPlane( endCentralBarrel, BFingerRmin-RadiusSaddle,rmaxTotal);
400 tileEnvPconeBarrel->addPlane( endCentralBarrel+DzSaddleSupport, BFingerRmin-RadiusSaddle,rmaxTotal);
401 }
402 tileEnvPconeBarrel->addPlane( endCentralBarrel+DzSaddleSupport, BFingerRmin, rmaxTotal);
403 tileEnvPconeBarrel->addPlane( endEnvelopePos, BFingerRmin, rmaxTotal);
404
405 lvTileEnvelopeBarrel = new GeoLogVol("TileCentralBarrel",tileEnvPconeBarrel,matAir);
406 pvTileEnvelopeBarrel = new GeoPhysVol(lvTileEnvelopeBarrel);
407
408 }
409
410
411
412
413
414
415 double PosEndBarrelFinger = ZLength[1]/2;
416 double PosEndITC = PosEndBarrelFinger + ZLength[5];
417 double PosEndExBarrelFinger = PosEndITC + ZLength[3];
418 double PosEndExBarrel = PosEndExBarrelFinger - EBFingerLengthPos;
419
420 if (
m_log->level()<=MSG::DEBUG) {
421 (*m_log) << MSG::DEBUG
422 << " EBPos EnvDZPos[3] " << EnvDZPos[3] << " ZLength[5] " <<ZLength[5]<<"+"<<ZLength[3]
423 << " = " << ZLength[3]+ZLength[5] << " EBFingerLengthPos = " <<EBFingerLengthPos
425
426 (*m_log) << MSG::DEBUG << " PosEndBarrelFinger = " << PosEndBarrelFinger
427 << " PosEndITC = " << PosEndITC
428 << " PosEndExBarrel = " << PosEndExBarrel
429 << " PosEndExtBarrelFinger = " << PosEndExBarrelFinger
431 }
432
435 double corr = PosEndITC - PosEndITC1;
436 if (std::abs(corr)>0.01) {
437 (*m_log) << MSG::WARNING
438 << "Discrepancy between TileGlobals and TILB tables in GeoModel DB "
439 << PosEndITC << " != " << PosEndITC1 << "; take this into account"
441 }
442
443
452
453 if (!spC10) {
454 double GapWidth = PosEndGap - PosBeginGap;
455 PosBeginGap = PosBeginCrack + 0.9 * Gaudi::Units::cm;
456 PosEndGap = PosBeginGap + GapWidth;
457 }
458
459 if (
m_log->level()<=MSG::DEBUG)
460 (*m_log) << MSG::DEBUG << " PosBeginITC2 = " << PosBeginITC2
461 << " PosBeginGap = " << PosBeginGap
462 << " PosEndGap = " << PosEndGap
463 << " PosBeginCrack = " << PosBeginCrack
464 << " PosEndCrack = " << PosEndCrack
466
467
469 double PosRminITC1 = dbManager->
TILBrminimal()*Gaudi::Units::cm;
471 double PosRminITC = rMinC10 *Gaudi::Units::cm;
473 double PosRminGap = rMinE2pos*Gaudi::Units::cm;
475 double PosRminCrack = rMinE4pos*Gaudi::Units::cm;
476 double PosRmaxCrack = rMaxE3pos*Gaudi::Units::cm;
477
478 double PosRminExt = RInMin[3];
479
480
481 double PosRmaxTotal = ROutMax[3];
482
483 if (
m_log->level()<=MSG::DEBUG)
484 (*m_log) << MSG::DEBUG
485 << " PosRminITC1 = " << PosRminITC1
486 << " PosRminITC2 = " << PosRminITC
487 << " PosRminGap = " << PosRminGap
488 << " PosRmaxCrack = " << PosRmaxCrack
489 << " PosRminCrack = " << PosRminCrack
490 << " PosRminExt = " << PosRminExt
491 << " PosRmaxTotal = " << PosRmaxTotal
493
494 if (eb_flag) {
495
496 GeoPcon* tileEnvPconePosEndcap = new GeoPcon(PhiMin[3]*Gaudi::Units::deg, PhiMax[3]*Gaudi::Units::deg);
497
498
499 tileEnvPconePosEndcap->addPlane(PosEndBarrelFinger, PosRminITC1, PosRmaxTotal);
500 tileEnvPconePosEndcap->addPlane(PosBeginITC2, PosRminITC1, PosRmaxTotal);
501 tileEnvPconePosEndcap->addPlane(PosBeginITC2, PosRminITC, PosRmaxTotal);
502 if (crack_flag>0) {
503
504 tileEnvPconePosEndcap->addPlane(PosBeginGap, PosRminITC, PosRmaxTotal);
505 tileEnvPconePosEndcap->addPlane(PosBeginGap, PosRminGap, PosRmaxTotal);
506 tileEnvPconePosEndcap->addPlane(PosEndGap, PosRminGap, PosRmaxTotal);
507 tileEnvPconePosEndcap->addPlane(PosEndGap, PosRminExt, PosRmaxTotal);
508 } else {
509
510 tileEnvPconePosEndcap->addPlane(PosBeginCrack, PosRminITC, PosRmaxTotal);
511 tileEnvPconePosEndcap->addPlane(PosBeginCrack, PosRminCrack, PosRmaxTotal);
512 tileEnvPconePosEndcap->addPlane(PosEndCrack, PosRminCrack, PosRmaxTotal);
513 tileEnvPconePosEndcap->addPlane(PosEndCrack, PosRminExt, PosRmaxTotal);
514 }
515 tileEnvPconePosEndcap->addPlane(PosEndExBarrel, PosRminExt, PosRmaxTotal);
517 tileEnvPconePosEndcap->addPlane(PosEndExBarrel, EFingerRmin-RadiusSaddle, PosRmaxTotal);
518 tileEnvPconePosEndcap->addPlane(PosEndExBarrel+DzSaddleSupport, EFingerRmin-RadiusSaddle, PosRmaxTotal);
519 }
520 tileEnvPconePosEndcap->addPlane(PosEndExBarrel+DzSaddleSupport, EFingerRmin, PosRmaxTotal);
521 tileEnvPconePosEndcap->addPlane(PosEndExBarrelFinger, EFingerRmin, PosRmaxTotal);
522
523 lvTileEnvelopePosEndcap = new GeoLogVol("TileEndcapPos",tileEnvPconePosEndcap,matAir);
524 pvTileEnvelopePosEndcap = new GeoPhysVol(lvTileEnvelopePosEndcap);
525
526 }
527
528 if (crack_flag==1) {
529
530 GeoPcon* tileEnvPconePosCrack = new GeoPcon(PhiMin[3]*Gaudi::Units::deg, PhiMax[3]*Gaudi::Units::deg);
531
532 tileEnvPconePosCrack->addPlane(PosBeginCrack, PosRminCrack, PosRmaxCrack);
533 tileEnvPconePosCrack->addPlane(PosEndCrack, PosRminCrack, PosRmaxCrack);
534
535 lvTileEnvelopePosCrack = new GeoLogVol("TileCrackPos",tileEnvPconePosCrack,matAir);
536 pvTileEnvelopePosCrack = new GeoPhysVol(lvTileEnvelopePosCrack);
537 }
538
539
540
541
542
543
544 double NegEndBarrelFinger = ZLength[1]/2;
545 double NegEndITC = NegEndBarrelFinger + ZLength[4];
546 double NegEndExtBarrelFinger = NegEndITC + ZLength[2];
547 double NegEndExBarrel = NegEndExtBarrelFinger - EBFingerLengthNeg;
548
549 if (
m_log->level()<=MSG::DEBUG) {
550 (*m_log) << MSG::DEBUG
551 << " EBNeg EnvDZPos[2] " << EnvDZPos[2] << " ZLength[4] " <<ZLength[4]<<"+"<<ZLength[2]
552 << " = " << ZLength[2]+ZLength[4] << " EBFingerLengthNeg = " <<EBFingerLengthNeg
554
555 (*m_log) << MSG::DEBUG << " NegEndBarrelFinger = " << NegEndBarrelFinger
556 << " NegEndITC = " << NegEndITC
557 << " NegEndExBarrel = " << NegEndExBarrel
558 << " NegEndExtBarrelFinger = " << NegEndExtBarrelFinger
560 }
561
564 corr = NegEndITC - NegEndITC1;
565
566 if (std::abs(corr)>0.01) {
567 (*m_log) << MSG::WARNING
568 << "Discrepancy between TileGlobals and TILB tables in GeoModel DB "
569 << NegEndITC << " != " << NegEndITC1 << "; take this into account"
571 }
572
581
582 if (!spC10) {
583 double GapWidth = NegEndGap - NegBeginGap;
584 NegBeginGap = NegBeginCrack + 0.9 * Gaudi::Units::cm;
585 NegEndGap = NegBeginGap + GapWidth;
586 }
587
588 if (
m_log->level()<=MSG::DEBUG)
589 (*m_log) << MSG::DEBUG << " NegBeginITC2 = " << NegBeginITC2
590 << " NegBeginGap = " << NegBeginGap
591 << " NegEndGap = " << NegEndGap
592 << " NegBeginCrack = " << NegBeginCrack
593 << " NegEndCrack = " << NegEndCrack
595
596
598 double NegRminITC1 = dbManager->
TILBrminimal()*Gaudi::Units::cm;
600 double NegRminITC = rMinC10 *Gaudi::Units::cm;
602 double NegRminGap = rMinE2neg*Gaudi::Units::cm;
604 double NegRminCrack = rMinE4neg*Gaudi::Units::cm;
605 double NegRmaxCrack = rMaxE3neg*Gaudi::Units::cm;
607
608 double NegRminExt = RInMin[2];
609
610
611 double NegRmaxTotal = ROutMax[2];
612
613 if (
m_log->level()<=MSG::DEBUG)
614 (*m_log) << MSG::DEBUG
615 << " NegRminITC1 = " << NegRminITC1
616 << " NegRminITC2 = " << NegRminITC
617 << " NegRminGap = " << NegRminGap
618 << " NegRmaxCrack = " << NegRmaxCrack
619 << " NegRminCrack = " << NegRminCrack
620 << " NegRminExt = " << NegRminExt
621 << " NegRmaxTotal = " << NegRmaxTotal
623
624 if (eb_flag) {
625
626 GeoPcon* tileEnvPconeNegEndcap = new GeoPcon(PhiMin[2]*Gaudi::Units::deg, PhiMax[2]*Gaudi::Units::deg);
627
628
629 tileEnvPconeNegEndcap->addPlane(-NegEndExtBarrelFinger, EFingerRmin, NegRmaxTotal);
630 tileEnvPconeNegEndcap->addPlane(-NegEndExBarrel-DzSaddleSupport, EFingerRmin, NegRmaxTotal);
632 tileEnvPconeNegEndcap->addPlane(-NegEndExBarrel-DzSaddleSupport, EFingerRmin-RadiusSaddle, NegRmaxTotal);
633 tileEnvPconeNegEndcap->addPlane(-NegEndExBarrel, EFingerRmin-RadiusSaddle, NegRmaxTotal);
634 }
635 tileEnvPconeNegEndcap->addPlane(-NegEndExBarrel, NegRminExt, NegRmaxTotal);
636 if (crack_flag>0) {
637
638 tileEnvPconeNegEndcap->addPlane(-NegEndGap, NegRminExt, NegRmaxTotal);
639 tileEnvPconeNegEndcap->addPlane(-NegEndGap, NegRminGap, NegRmaxTotal);
640 tileEnvPconeNegEndcap->addPlane(-NegBeginGap, NegRminGap, NegRmaxTotal);
641 tileEnvPconeNegEndcap->addPlane(-NegBeginGap, NegRminITC, NegRmaxTotal);
642 } else {
643
644 tileEnvPconeNegEndcap->addPlane(-NegEndCrack, NegRminExt, NegRmaxTotal);
645 tileEnvPconeNegEndcap->addPlane(-NegEndCrack, NegRminCrack, NegRmaxTotal);
646 tileEnvPconeNegEndcap->addPlane(-NegBeginCrack, NegRminCrack, NegRmaxTotal);
647 tileEnvPconeNegEndcap->addPlane(-NegBeginCrack, NegRminITC, NegRmaxTotal);
648 }
649 tileEnvPconeNegEndcap->addPlane(-NegBeginITC2, NegRminITC, NegRmaxTotal);
650 tileEnvPconeNegEndcap->addPlane(-NegBeginITC2, NegRminITC1, NegRmaxTotal);
651 tileEnvPconeNegEndcap->addPlane(-NegEndBarrelFinger, NegRminITC1, NegRmaxTotal);
652
653 lvTileEnvelopeNegEndcap = new GeoLogVol("TileEndcapNeg",tileEnvPconeNegEndcap,matAir);
654 pvTileEnvelopeNegEndcap = new GeoPhysVol(lvTileEnvelopeNegEndcap);
655
656 }
657
658 if (crack_flag==1) {
659
660 GeoPcon* tileEnvPconeNegCrack = new GeoPcon(PhiMin[3]*Gaudi::Units::deg, PhiMax[3]*Gaudi::Units::deg);
661
662 tileEnvPconeNegCrack->addPlane(-NegEndCrack, NegRminCrack, NegRmaxCrack);
663 tileEnvPconeNegCrack->addPlane(-NegBeginCrack, NegRminCrack, NegRmaxCrack);
664
665 lvTileEnvelopeNegCrack = new GeoLogVol("TileCrackNeg",tileEnvPconeNegCrack,matAir);
666 pvTileEnvelopeNegCrack = new GeoPhysVol(lvTileEnvelopeNegCrack);
667 }
668
669
671
673
677
678
681
682
684
687
688
690 }
691
692 PVLink pvBarrelMother{nullptr}, pvFingerMotherNeg{nullptr}, pvFingerMotherPos{nullptr}, pvSaddleMotherNeg{nullptr}, pvSaddleMotherPos{nullptr};
693 PVLink pvEBarrelMotherNeg{nullptr}, pvEBarrelMotherPos{nullptr};
694 PVLink pvEFingerMotherNeg{nullptr}, pvEFingerMotherPos{nullptr}, pvESaddleMotherNeg{nullptr}, pvESaddleMotherPos{nullptr};
695 PVLink pvITCMotherNeg{nullptr}, pvITCMotherPos{nullptr};
696 PVLink pvGapMotherNeg{nullptr}, pvGapMotherPos{nullptr};
697 PVLink pvCrackMotherNeg{nullptr}, pvCrackMotherPos{nullptr};
698
699 GeoLogVol *lvEBarrelModuleMotherPos{nullptr}, *lvEBarrelModuleMotherNeg{nullptr};
700 PVLink pvEBarrelModuleMotherPos{nullptr}, pvEBarrelModuleMotherNeg{nullptr};
701
702
703
704
705
706
707
708
709
710
711
712
713 double dX1 =0, dX2 =0, dY1 =0, dY2 =0, dZ1 =0, dZ2 =0;
714 double dxIron =0, dyIron =0, dxIr =0, dyIr =0;
715 std::string volname ="";
716
717
718 double PosXcut =0, PosYcut =0, PosY =0;
719 double modl_length =0;
720
721 const GeoShapeUnion *CutA= 0;
722 GeoShape *CutB= 0;
723
724 GeoLogVol *lvIrUp =0, *lvIrDw =0, *lvIron3 =0, *lvIron2 =0, *lvIron1 =0, *lvIrBox =0;
725 GeoPhysVol *pvIrUp =0, *pvIrDw =0, *pvIron3 =0, *pvIron2 =0, *pvIron1 =0, *pvIrBox =0;
726
728
729
731 if (
m_log->level()<=MSG::DEBUG)
732 (*m_log) << MSG::DEBUG << " Tile Geometry with Ext.Barrel CutOuts and Iron plates, starting form TileCal-CSC-01"
734
738 modl_length = 4*dbManager->
CutsDX1();
739
740
746
747 checking(
"CutB1",
false, 1, dX1,dX2,dY1,dY2,dZ1);
748 GeoTrd* CutB1 = new GeoTrd(dX1,dX2,dY1,dY2,dZ1);
749
750 CutB = CutB1;
751
752
753
760
761 checking(
"IrUp",
false, 1,dX1,dX2,dY1,dY2,dZ1);
762 GeoTrd* IrUp = new GeoTrd(dX1,dX2,dY1,dY2,dZ1);
763 lvIrUp = new GeoLogVol("IrUp",IrUp,matIron);
764 pvIrUp = new GeoPhysVol(lvIrUp);
765
766
773
774 checking(
"IrDw",
false, 1, dX1,dX2,dY1,dY2,dZ1);
775 GeoTrd* IrDw = new GeoTrd(dX1,dX2,dY1,dY2,dZ1);
776 lvIrDw = new GeoLogVol("IrDw",IrDw,matIron);
777 pvIrDw = new GeoPhysVol(lvIrDw);
778
779
782
788
789 checking(
"Cut1up",
false, 1, dX1,dX2,dY1,dY2,dZ1);
790 GeoTrd* Cut1up = new GeoTrd(dX1,dX2,dY1,dY2,dZ1);
791
798
799 checking(
"Cut2down",
false, 1, dX1,dX2,dY1,dY2,dZ2);
800 GeoTrd* Cut1down = new GeoTrd(dX1,dX2,dY1,dY2,dZ2);
801
802 GeoTrf::Translate3D yPosA(0.,0.,-dZ1-dZ2);
803
804 const GeoShapeUnion& CutA1 = Cut1up->add(*Cut1down<<yPosA);
805 CutA = &CutA1;
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
833
834 checking(
"Iron3",
false, 1, dX1,dX2,dY1,dY2,dZ1);
835 GeoTrd* Iron3 = new GeoTrd(dX1,dX2,dY1,dY2,dZ1);
836 lvIron3 = new GeoLogVol("Iron3",Iron3,matIron);
837 pvIron3 = new GeoPhysVol(lvIron3);
838
839
846
847 checking(
"Iron2",
false, 1, dX1,dX2,dY1,dY2,dZ1);
848 GeoTrd* Iron2 = new GeoTrd(dX1,dX2,dY1,dY2,dZ1);
849 lvIron2 = new GeoLogVol("Iron2",Iron2,matIron);
850 pvIron2 = new GeoPhysVol(lvIron2);
851
852
859
860 checking(
"Iron1",
false, 1, dX1,dX2,dY1,dY2,dZ1);
861 GeoTrd* Iron1 = new GeoTrd(dX1,dX2,dY1,dY2,dZ1);
862 lvIron1 = new GeoLogVol("Iron1",Iron1,matIron);
863 pvIron1 = new GeoPhysVol(lvIron1);
864
865
872
873 checking(
"IrBox",
false, 1, dX1,dX2,dY1,dY2,dZ1);
874 GeoTrd* IrBox = new GeoTrd(dX1,dX2,dY1,dY2,dZ1);
875 lvIrBox = new GeoLogVol("IrBox",IrBox,matIron);
876 pvIrBox = new GeoPhysVol(lvIrBox);
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900 }
901 }
902
905
906 for (int EnvCounter = 0; EnvCounter < NumberOfEnv ; ++EnvCounter) {
907
912
913
914
915
916 if (
m_log->level()<=MSG::DEBUG)
917 (*m_log) << MSG::DEBUG << " EnvCounter " << EnvCounter << " EnvType " << EnvType
918 <<
" EnvNModules " << NumberOfMod <<
endmsg;
919
920 if (EnvType == 1 && barrel_flag < 1) {
921
922 zEndSection = ZLength[1]/2 - BFingerLength;
923
924 GeoTubs* GeneralMother =
new GeoTubs(dbManager->
GetEnvRin()*Gaudi::Units::cm,
926 zEndSection,
927 AnglMin, AnglMax);
928
929 GeoTubs* barrelMother = GeneralMother;
930 GeoLogVol* lvBarrelMother = new GeoLogVol("Barrel",barrelMother,matAir);
931 pvBarrelMother = new GeoPhysVol(lvBarrelMother);
932
933 if (
m_log->level()<=MSG::DEBUG)
934 (*m_log) << MSG::DEBUG << "Barrel envelope parameters: "
935 << " Length=" << zEndSection
936 <<
" Rmin=" << dbManager->
GetEnvRin()*Gaudi::Units::cm
937 <<
" Rmax=" << dbManager->
GetEnvRout()*Gaudi::Units::cm
939
940
941 GeoTubs* fingerMotherPos = new GeoTubs(BFingerRmin,
943 BFingerLengthPos/2,
944 AnglMin, AnglMax);
945
946 GeoLogVol* lvFingerMotherPos = new GeoLogVol("FingerPos",fingerMotherPos,matAir);
947 pvFingerMotherPos = new GeoPhysVol(lvFingerMotherPos);
948
950 GeoTubs* SaddleMotherPos = new GeoTubs(BFingerRmin-RadiusSaddle,
951 BFingerRmin,
952 DzSaddleSupport/2,
953 AnglMin, AnglMax);
954
955 GeoLogVol* lvSaddleMotherPos = new GeoLogVol("SaddlePos",SaddleMotherPos,matAir);
956 pvSaddleMotherPos = new GeoPhysVol(lvSaddleMotherPos);
957 }
958
959
960 GeoTubs* fingerMotherNeg = new GeoTubs(BFingerRmin,
962 BFingerLengthNeg/2,
963 AnglMin, AnglMax);
964
965 GeoLogVol* lvFingerMotherNeg = new GeoLogVol("FingerNeg",fingerMotherNeg,matAir);
966 pvFingerMotherNeg = new GeoPhysVol(lvFingerMotherNeg);
967
968 if (
m_log->level()<=MSG::DEBUG)
969 (*m_log) << MSG::DEBUG << "Barrel finger envelope parameters: "
970 << " length Pos/Neg=" << BFingerLengthPos << "/" << BFingerLengthNeg
971 <<
" Rmin=" << BFingerRmin <<
" Rmax=" << dbManager->
GetEnvRout()*Gaudi::Units::cm
973
974
976 GeoTubs* SaddleMotherNeg = new GeoTubs(BFingerRmin-RadiusSaddle,
977 BFingerRmin,
978 DzSaddleSupport/2,
979 AnglMin, AnglMax);
980
981 GeoLogVol* lvSaddleMotherNeg = new GeoLogVol("SaddleNeg",SaddleMotherNeg,matAir);
982 pvSaddleMotherNeg = new GeoPhysVol(lvSaddleMotherNeg);
983 }
984 }
985
986 if (EnvType == 3 && eb_flag) {
987
988 if (
m_log->level()<=MSG::DEBUG)
989 (*m_log) << MSG::DEBUG <<
" EBarrelPos DZ "<<(dbManager->
GetEnvZLength()*Gaudi::Units::cm- EBFingerLengthPos)/2<<
endmsg;
990
993 AnglMin,AnglMax,(dbManager->
GetEnvZLength()*Gaudi::Units::cm- EBFingerLengthPos)/2);
994
995 GeoTubs* GeneralMother =
new GeoTubs(dbManager->
GetEnvRin()*Gaudi::Units::cm,
997 (dbManager->
GetEnvZLength()*Gaudi::Units::cm- EBFingerLengthPos)/2,
998 AnglMin, AnglMax);
999
1000 GeoTubs* ebarrelMotherPos = GeneralMother;
1001 GeoLogVol* lvEBarrelMotherPos = new GeoLogVol("EBarrel",ebarrelMotherPos,matAir);
1002 pvEBarrelMotherPos = new GeoPhysVol(lvEBarrelMotherPos);
1003
1004 if (
m_log->level()<=MSG::DEBUG)
1005 (*m_log) << MSG::DEBUG << "Positive ext.barrel envelope parameters: "
1006 <<
" length=" << (dbManager->
GetEnvZLength()*Gaudi::Units::cm- EBFingerLength)
1007 <<
" Rmin=" << dbManager->
GetEnvRin()*Gaudi::Units::cm
1008 <<
" Rmax=" << dbManager->
GetEnvRout()*Gaudi::Units::cm
1010
1011 if (barrel_flag < 2) {
1012
1014 EFingerRmin,dbManager->
GetEnvRout()*Gaudi::Units::cm,
1015 AnglMin,AnglMax, EBFingerLength/2);
1016
1017 GeoTubs* fingerMother = new GeoTubs(EFingerRmin,
1019 EBFingerLength/2,
1020 AnglMin, AnglMax);
1021
1022 GeoLogVol* lvEFingerMother = new GeoLogVol("EFinger",fingerMother,matAir);
1023 pvEFingerMotherPos = new GeoPhysVol(lvEFingerMother);
1024
1025 if (
m_log->level()<=MSG::DEBUG)
1026 (*m_log) << MSG::DEBUG << "Positive ext.barrel finger envelope parameters: "
1027 << " length=" << EBFingerLength
1028 << " Rmin=" << EFingerRmin
1029 <<
" Rmax=" << (dbManager->
GetEnvRout())*Gaudi::Units::cm
1031
1034 EFingerRmin-RadiusSaddle,EFingerRmin,AnglMin,AnglMax, DzSaddleSupport/2);
1035
1036 GeoTubs* ESaddleMother = new GeoTubs(EFingerRmin-RadiusSaddle,
1037 EFingerRmin,
1038 DzSaddleSupport/2,
1039 AnglMin, AnglMax);
1040
1041 GeoLogVol* lvESaddleMother = new GeoLogVol("ESaddlePos",ESaddleMother,matAir);
1042 pvESaddleMotherPos = new GeoPhysVol(lvESaddleMother);
1043 }
1044 }
1045 }
1046
1047
1048 if (EnvType == 2 && eb_flag) {
1049 if (
m_log->level()<=MSG::DEBUG)
1050 (*m_log) << MSG::DEBUG <<
" EBarrelNeg DZ "<<(dbManager->
GetEnvZLength()*Gaudi::Units::cm- EBFingerLengthNeg)/2<<
endmsg;
1051
1052 GeoTubs* GeneralMother =
new GeoTubs(dbManager->
GetEnvRin()*Gaudi::Units::cm,
1054 (dbManager->
GetEnvZLength()*Gaudi::Units::cm- EBFingerLengthNeg)/2,
1055 AnglMin, AnglMax);
1056
1057 GeoTubs* ebarrelMotherNeg = GeneralMother;
1058 GeoLogVol* lvEBarrelMotherNeg = new GeoLogVol("EBarrel",ebarrelMotherNeg,matAir);
1059 pvEBarrelMotherNeg = new GeoPhysVol(lvEBarrelMotherNeg);
1060
1061 if (
m_log->level()<=MSG::DEBUG)
1062 (*m_log) << MSG::DEBUG << "Nevative ext.barrel envelope parameters: "
1063 <<
" length=" << (dbManager->
GetEnvZLength()*Gaudi::Units::cm- EBFingerLength)
1064 <<
" Rmin=" << dbManager->
GetEnvRin()*Gaudi::Units::cm
1065 <<
" Rmax=" << dbManager->
GetEnvRout()*Gaudi::Units::cm
1067
1068 if (barrel_flag < 2) {
1069
1070 GeoTubs* fingerMother = new GeoTubs(EFingerRmin,
1072 EBFingerLengthNeg/2,
1073 AnglMin, AnglMax);
1074
1075 GeoLogVol* lvEFingerMother = new GeoLogVol("EFinger",fingerMother,matAir);
1076 pvEFingerMotherNeg = new GeoPhysVol(lvEFingerMother);
1077
1078 if (
m_log->level()<=MSG::DEBUG)
1079 (*m_log) << MSG::DEBUG <<"Negative ext.barrel finger envelope parameters: "
1080 << " length=" << EBFingerLengthNeg
1081 << " Rmin=" << EFingerRmin
1082 <<
" Rmax=" << dbManager->
GetEnvRout()*Gaudi::Units::cm
1084
1087 EFingerRmin-RadiusSaddle,EFingerRmin,AnglMin,AnglMax, DzSaddleSupport/2);
1088
1089 GeoTubs* ESaddleMother = new GeoTubs(EFingerRmin-RadiusSaddle,
1090 EFingerRmin,
1091 DzSaddleSupport/2,
1092 AnglMin, AnglMax);
1093
1094 GeoLogVol* lvESaddleMother = new GeoLogVol("ESaddlePos",ESaddleMother,matAir);
1095 pvESaddleMotherNeg = new GeoPhysVol(lvESaddleMother);
1096 }
1097 }
1098 }
1099
1100
1101 if (EnvType == 5) {
1102
1103 if (barrel_flag < 3) {
1104
1106
1107 rMinITC2 = rMinC10;
1110
1112
1116
1117 (*m_log) << MSG::INFO << " Positive ITC envelope parameters: PLUG1 "
1118 <<
" Rmin= "<<rMinITC1*Gaudi::Units::cm<<
" Rmax= "<<rMaxITC1*Gaudi::Units::cm<<
" dzITC1= "<<dzITC1/2*Gaudi::Units::cm<<
endmsg;
1119 (*m_log) << MSG::INFO << " PLUG2 "
1120 <<
" Rmin= "<<rMinITC2*Gaudi::Units::cm<<
" Rmax= "<<rMaxITC2*Gaudi::Units::cm<<
" dzITC2= "<<dzITC2/2*Gaudi::Units::cm<<
endmsg;
1121
1122 checking(
"ITC itcWheel1 (+)",
false, 0,
1123 rMinITC1*Gaudi::Units::cm,rMaxITC1*Gaudi::Units::cm, AnglMin,AnglMax, dzITC1/2*Gaudi::Units::cm);
1124
1125 GeoTubs* itcWheel1 = new GeoTubs(rMinITC1*Gaudi::Units::cm,
1126 rMaxITC1*Gaudi::Units::cm,
1127 dzITC1/2*Gaudi::Units::cm,
1128 AnglMin, AnglMax);
1129
1130 checking(
"ITC itcWheel2 (+)",
false, 0,
1131 rMinITC2*Gaudi::Units::cm,rMaxITC2*Gaudi::Units::cm, AnglMin,AnglMax, dzITC2/2*Gaudi::Units::cm);
1132
1133 GeoTubs* itcWheel2 = new GeoTubs(rMinITC2*Gaudi::Units::cm,
1134 rMaxITC2*Gaudi::Units::cm,
1135 dzITC2/2*Gaudi::Units::cm,
1136 AnglMin, AnglMax);
1137
1138 Z = ( dzITC1 - dzITC2)/2*Gaudi::Units::cm;
1139 GeoTrf::Translate3D itcWheel2OffsetPos(0.,0., Z);
1140
1142
1143 const GeoShapeUnion& itcMotherPos = itcWheel1->add(*itcWheel2<<itcWheel2OffsetPos);
1144
1145 GeoLogVol* lvITCMotherPos = new GeoLogVol("ITC",&itcMotherPos,matAir);
1146 pvITCMotherPos = new GeoPhysVol(lvITCMotherPos);
1147
1148 }
1149
1150
1151 if (barrel_flag < 4) {
1152
1154
1158 AnglMin,AnglMax, dbManager->
TILBdzmodul()/2*Gaudi::Units::cm);
1159
1160 GeoTubs* GapMotherPos =
new GeoTubs(dbManager->
TILBrminimal()*Gaudi::Units::cm,
1163 AnglMin, AnglMax);
1164
1165 GeoLogVol* lvGapMotherPos = new GeoLogVol("Gap",GapMotherPos,matAir);
1166 pvGapMotherPos = new GeoPhysVol(lvGapMotherPos);
1167
1168 }
1169
1170
1171 if (crack_flag<=0 || pvTileEnvelopePosCrack) {
1172
1174
1176 rMinE4pos*Gaudi::Units::cm,
1178 AnglMin,AnglMax, dbManager->
TILBdzmodul()/2*Gaudi::Units::cm);
1179
1180 GeoTubs* crackMotherPos = new GeoTubs(rMinE4pos*Gaudi::Units::cm,
1183 AnglMin, AnglMax);
1184
1185 GeoLogVol* lvCrackMotherPos = new GeoLogVol("Crack",crackMotherPos,matAir);
1186 pvCrackMotherPos = new GeoPhysVol(lvCrackMotherPos);
1187 }
1188 }
1189
1190
1191 if (EnvType == 4) {
1192
1193 if (barrel_flag < 3) {
1194
1196
1197 rMinITC2 = rMinC10;
1200
1202
1206
1207 (*m_log) << MSG::INFO << " Negative ITC envelope parameters: PLUG1 "
1208 <<
" Rmin= "<<rMinITC1*Gaudi::Units::cm<<
" Rmax= "<<rMaxITC1*Gaudi::Units::cm<<
" dzITC1= "<<dzITC1/2*Gaudi::Units::cm<<
endmsg;
1209 (*m_log) << MSG::INFO << " PLUG2 "
1210 <<
" Rmin= "<<rMinITC2*Gaudi::Units::cm<<
" Rmax= "<<rMaxITC2*Gaudi::Units::cm<<
" dzITC2= "<<dzITC2/2*Gaudi::Units::cm<<
endmsg;
1211
1212 checking(
"ITC itcWheel1 (-)",
false, 0,
1213 rMinITC1*Gaudi::Units::cm,rMaxITC1*Gaudi::Units::cm, AnglMin,AnglMax, dzITC1/2*Gaudi::Units::cm);
1214
1215 GeoTubs* itcWheel1 = new GeoTubs(rMinITC1*Gaudi::Units::cm,
1216 rMaxITC1*Gaudi::Units::cm,
1217 dzITC1/2*Gaudi::Units::cm,
1218 AnglMin, AnglMax);
1219
1220 checking(
"ITC itcWheel2 (-)",
false, 0,
1221 rMinITC2*Gaudi::Units::cm,rMaxITC2*Gaudi::Units::cm, AnglMin,AnglMax, dzITC2/2*Gaudi::Units::cm);
1222
1223 GeoTubs* itcWheel2 = new GeoTubs(rMinITC2*Gaudi::Units::cm,
1224 rMaxITC2*Gaudi::Units::cm,
1225 dzITC2/2*Gaudi::Units::cm,
1226 AnglMin, AnglMax);
1227
1228 Z = (-dzITC1 + dzITC2)/2*Gaudi::Units::cm;
1229 GeoTrf::Translate3D itcWheel2OffsetNeg(0.,0., Z);
1230
1232
1233 const GeoShapeUnion& itcMotherNeg = itcWheel1->add(*itcWheel2<<itcWheel2OffsetNeg);
1234
1235 GeoLogVol* lvITCMotherNeg = new GeoLogVol("ITC",&itcMotherNeg,matAir);
1236 pvITCMotherNeg = new GeoPhysVol(lvITCMotherNeg);
1237
1238 }
1239
1240
1241 if (barrel_flag < 4) {
1242
1244
1248 AnglMin,AnglMax, dbManager->
TILBdzmodul()/2*Gaudi::Units::cm);
1249
1250 GeoTubs* GapMotherNeg =
new GeoTubs(dbManager->
TILBrminimal()*Gaudi::Units::cm,
1253 AnglMin, AnglMax);
1254
1255 GeoLogVol* lvGapMotherNeg = new GeoLogVol("Gap",GapMotherNeg,matAir);
1256 pvGapMotherNeg = new GeoPhysVol(lvGapMotherNeg);
1257
1258 }
1259
1260
1261 if (crack_flag<=0 || pvTileEnvelopeNegCrack) {
1262
1264
1266 rMinE4neg*Gaudi::Units::cm,
1268 AnglMin,AnglMax, dbManager->
TILBdzmodul()/2*Gaudi::Units::cm);
1269
1270 GeoTubs* crackMotherNeg = new GeoTubs(rMinE4neg*Gaudi::Units::cm,
1273 AnglMin, AnglMax);
1274
1275 GeoLogVol* lvCrackMotherNeg = new GeoLogVol("Crack",crackMotherNeg,matAir);
1276 pvCrackMotherNeg = new GeoPhysVol(lvCrackMotherNeg);
1277 }
1278 }
1279
1281 ((EnvType&6) == 0 && barrel_flag < 1) ||
1282 ((EnvType&6) == 2 && barrel_flag < 2) ||
1283 ((EnvType&6) == 4 && barrel_flag < 5) )) {
1284
1285
1286 int ModuleIndex[64];
1287 for (
int i=0;
i < NumberOfMod;
i++) {
1288 ModuleIndex[
i] =
i+1;
1289 }
1290
1291
1292 int ModuleNcp =0;
1293
1294 GeoIntrusivePtr<GeoTransform> yrotMod{new GeoTransform(GeoTrf::RotateY3D(90*Gaudi::Units::deg))};
1295 GeoIntrusivePtr<GeoTransform> XYrtMod{new GeoTransform(GeoTrf::RotateX3D(180*Gaudi::Units::deg) * GeoTrf::RotateY3D(90*Gaudi::Units::deg))};
1296
1297 for (int ModCounter = 0; ModCounter < NumberOfMod; ModCounter++) {
1298
1299 ModuleNcp = ModuleIndex[ModCounter];
1300
1301
1304
1305 GeoIntrusivePtr<GeoTransform> zrotMod{
new GeoTransform(GeoTrf::RotateZ3D(
phi*Gaudi::Units::deg))};
1306 GeoIntrusivePtr<GeoTransform> zrotSaddle{new GeoTransform(GeoTrf::RotateZ3D(ph1*Gaudi::Units::deg))};
1307
1311
1312
1313 if (!(ModuleNcp>=NcpFrom && ModuleNcp<=NcpFrom+NcpPlus)) continue;
1314
1315
1316
1317
1318
1319
1320
1321 if (
m_log->level()<=MSG::DEBUG)
1322 (*m_log) << MSG::DEBUG <<
" ModuleNcp= "<< ModuleNcp <<
" ModType "<< ModType <<
" Phi "<<
phi <<
endmsg;
1323
1324
1325
1326
1327
1328 if ( EnvType == 1 && barrel_flag < 1) {
1329
1331
1332 thicknessWedgeMother = dbManager->
TILBdzmodul() * Gaudi::Units::cm;
1336
1340
1341 GeoTrd* barrelModuleMother = new GeoTrd(thicknessWedgeMother/2,
1342 thicknessWedgeMother/2,
1343 dy1WedgeMother,
1344 dy2WedgeMother,
1345 heightWedgeMother/2);
1346
1347 GeoLogVol* lvBarrelModuleMother = new GeoLogVol("BarrelModule",barrelModuleMother,matAir);
1348 PVLink pvBarrelModuleMother = new GeoPhysVol(lvBarrelModuleMother);
1349
1350
1351 if (Filling) {
1352 sectionBuilder->
fillSection(pvBarrelModuleMother, 1,
1355 dzGlue,
1357 }
1358
1359 GeoTransform* xtraMod = new GeoTransform(GeoTrf::TranslateX3D(
1361
1362 pvBarrelMother->add(zrotMod);
1363 pvBarrelMother->add(xtraMod);
1364 pvBarrelMother->add(XYrtMod);
1365
1366 pvBarrelMother->add(new GeoIdentifierTag(ModuleNcp));
1367 pvBarrelMother->add(pvBarrelModuleMother);
1368
1369
1370
1373
1374 heightWedgeMother = (dbManager->
TILErmax() - dbManager->
TILBrmax())*Gaudi::Units::cm;
1375 dy1WedgeMother = dbManager->
TILBrmax() *
tan(
deltaPhi/2*Gaudi::Units::deg)*Gaudi::Units::cm;
1376 dy2WedgeMother = dbManager->
TILErmax() *
tan(
deltaPhi/2*Gaudi::Units::deg)*Gaudi::Units::cm;
1377
1378
1379 if ( ModFingpattern != 10 ) {
1380 GeoTrd* fingerModuleMotherPos = new GeoTrd(BFingerLengthPos/2,
1381 BFingerLengthPos/2,
1382 dy1WedgeMother,
1383 dy2WedgeMother,
1384 heightWedgeMother/2);
1385
1386 GeoLogVol* lvFingerModuleMotherPos = new GeoLogVol("FingerModule",fingerModuleMotherPos,matAir);
1387 PVLink pvFingerModuleMotherPos = new GeoPhysVol(lvFingerModuleMotherPos);
1388
1389 if (Filling)
1390 sectionBuilder->
fillFinger(pvFingerModuleMotherPos, 1,
1395 ModuleNcp,
1396 BFingerLengthPos*(1./Gaudi::Units::cm));
1397
1398 GeoTransform* xtraModFingerPos =
new GeoTransform(GeoTrf::TranslateX3D((dbManager->
TILErmax() + dbManager->
TILBrmax())/2*Gaudi::Units::cm));
1399
1400
1401
1402 pvFingerMotherPos->add(zrotMod);
1403 pvFingerMotherPos->add(xtraModFingerPos);
1404 pvFingerMotherPos->add(XYrtMod);
1405
1406 pvFingerMotherPos->add(new GeoIdentifierTag(ModuleNcp));
1407 pvFingerMotherPos->add(pvFingerModuleMotherPos);
1408 }
1409
1410
1411 if ( ModFingpattern != 1 ) {
1412
1413 GeoTrd* fingerModuleMotherNeg = new GeoTrd(BFingerLengthNeg/2,
1414 BFingerLengthNeg/2,
1415 dy1WedgeMother,
1416 dy2WedgeMother,
1417 heightWedgeMother/2);
1418
1419 GeoLogVol* lvFingerModuleMotherNeg = new GeoLogVol("FingerModule",fingerModuleMotherNeg,matAir);
1420 PVLink pvFingerModuleMotherNeg = new GeoPhysVol(lvFingerModuleMotherNeg);
1421
1422 if (Filling)
1423 sectionBuilder->
fillFinger(pvFingerModuleMotherNeg, 1,
1428 ModuleNcp*100,
1429 BFingerLengthNeg*(1./Gaudi::Units::cm));
1430
1431 GeoTransform* xtraModFingerNeg =
new GeoTransform(GeoTrf::TranslateX3D((dbManager->
TILErmax() + dbManager->
TILBrmax())/2*Gaudi::Units::cm));
1432
1433
1434
1435 pvFingerMotherNeg->add(zrotMod);
1436 pvFingerMotherNeg->add(xtraModFingerNeg);
1437 pvFingerMotherNeg->add(yrotMod);
1438
1439 pvFingerMotherNeg->add(new GeoIdentifierTag(ModuleNcp));
1440 pvFingerMotherNeg->add(pvFingerModuleMotherNeg);
1441 }
1442
1443
1445 if ( (ModuleNcp >=40 && ModuleNcp <=41) || (ModuleNcp >=56 && ModuleNcp <=57) ) {
1446 GeoTubs* SaddleModule = new GeoTubs(BFingerRmin-RadiusSaddle,
1447 BFingerRmin,
1448 DzSaddleSupport/2,
1450
1451 GeoLogVol* lvSaddleModule = new GeoLogVol("SaddleModule",SaddleModule,matIron);
1452 PVLink pvSaddleModule = new GeoPhysVol(lvSaddleModule);
1453
1454 pvSaddleMotherPos->add(zrotSaddle);
1455 pvSaddleMotherPos->add(new GeoIdentifierTag(ModuleNcp));
1456 pvSaddleMotherPos->add(pvSaddleModule);
1457
1458 pvSaddleMotherNeg->add(zrotSaddle);
1459 pvSaddleMotherNeg->add(new GeoIdentifierTag(ModuleNcp));
1460 pvSaddleMotherNeg->add(pvSaddleModule);
1461 }
1462 }
1463 }
1464
1465
1466
1467 if (EnvType == 3 && barrel_flag < 2) {
1468
1470
1471
1472 thicknessWedgeMother = dbManager->
TILBdzmodul() * Gaudi::Units::cm;
1476
1480
1482
1483 checking(
"EBarrelModule (+)",
false, 1,
1484 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
1485
1486 GeoTrd* ebarrelModuleMotherPos = new GeoTrd(thicknessWedgeMother/2,
1487 thicknessWedgeMother/2,
1488 dy1WedgeMother,
1489 dy2WedgeMother,
1490 heightWedgeMother/2);
1491
1493 if (
m_log->level()<=MSG::DEBUG)
1494 (*m_log) << MSG::DEBUG <<
" BoolCuts NO "<< dbManager->
BoolCuts() <<
endmsg;
1495
1496 lvEBarrelModuleMotherPos = new GeoLogVol("EBarrelModule",ebarrelModuleMotherPos,matAir);
1497 pvEBarrelModuleMotherPos = new GeoPhysVol(lvEBarrelModuleMotherPos);
1498
1499 } else {
1500
1501
1502 if (
m_log->level()<=MSG::DEBUG)
1503 (*m_log) << MSG::DEBUG <<
" BoolCuts YES "<< dbManager->
BoolCuts() <<
endmsg;
1504
1505 double PoZ2 =0, PoZ1 =0, thicknessEndPlate =dbManager->
TILBdzend1()*Gaudi::Units::cm;
1506
1507 PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->
GetEnvZLength()*Gaudi::Units::cm- EBFingerLengthPos)/2;
1508 PoZ2 = PoZ1 + modl_length/4;
1509
1510 if ((ModuleNcp>=35 && ModuleNcp<=37) || (ModuleNcp>=60 && ModuleNcp<=62)) {
1511 GeoTrf::Transform3D TransCut2 = GeoTrf::TranslateZ3D(-Radius) * GeoTrf::RotateX3D((90-
phi)*Gaudi::Units::deg) * GeoTrf::RotateY3D(180*Gaudi::Units::deg)
1512 * GeoTrf::Translate3D(-PoZ2,0.,-PosY);
1513
1514 if (ModuleNcp>=60 && ModuleNcp<=62) {
1515 GeoTrf::Transform3D TransCutL = GeoTrf::TranslateZ3D(-Radius)
1516 * GeoTrf::RotateY3D(180*Gaudi::Units::deg) * GeoTrf::RotateX3D(
phi*Gaudi::Units::deg)
1517 * GeoTrf::Translate3D(PoZ1,PosYcut,-PosXcut);
1518
1519
1520 const GeoShape& TmL_EBarrelModuleMotherPos = ebarrelModuleMotherPos->subtract((*CutA)<<TransCut2).
1521 subtract((*CutB)<<TransCutL);
1522
1523 lvEBarrelModuleMotherPos = new GeoLogVol("EBarrelModule",&TmL_EBarrelModuleMotherPos,matAir);
1524
1525 } else if (ModuleNcp>=35 && ModuleNcp<=37) {
1526 GeoTrf::Transform3D TransCutR = GeoTrf::TranslateZ3D(-Radius)
1527 * GeoTrf::RotateY3D(180*Gaudi::Units::deg) * GeoTrf::RotateX3D(
phi*Gaudi::Units::deg)
1528 * GeoTrf::Translate3D(PoZ1,PosYcut,PosXcut) * GeoTrf::RotateY3D(180*Gaudi::Units::deg);
1529
1530
1531 const GeoShape& TmR_EBarrelModuleMotherPos = ebarrelModuleMotherPos->subtract((*CutA)<<TransCut2).
1532 subtract((*CutB)<<TransCutR);
1533
1534 lvEBarrelModuleMotherPos = new GeoLogVol("EBarrelModule",&TmR_EBarrelModuleMotherPos,matAir);
1535 }
1536
1537 pvEBarrelModuleMotherPos = new GeoPhysVol(lvEBarrelModuleMotherPos);
1538
1539 } else {
1540 lvEBarrelModuleMotherPos = new GeoLogVol("EBarrelModule",ebarrelModuleMotherPos,matAir);
1541 pvEBarrelModuleMotherPos = new GeoPhysVol(lvEBarrelModuleMotherPos);
1542 }
1543 }
1544
1545
1546 if (Filling) {
1547 sectionBuilder->
fillSection(pvEBarrelModuleMotherPos, 2,
1550 dzGlue,
1552 ModuleNcp);
1553 }
1554
1555 GeoTransform* xtraModPos = new GeoTransform(GeoTrf::TranslateX3D(Radius));
1556
1557 pvEBarrelMotherPos->add(zrotMod);
1558 pvEBarrelMotherPos->add(xtraModPos);
1559 pvEBarrelMotherPos->add(XYrtMod);
1560
1561 pvEBarrelMotherPos->add(new GeoIdentifierTag(ModuleNcp));
1562 pvEBarrelMotherPos->add(pvEBarrelModuleMotherPos);
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1622
1623
1624 thicknessWedgeMother = dbManager->
TIFGdz() * Gaudi::Units::cm;
1625 heightWedgeMother = (dbManager->
TILErmax() - dbManager->
TILBrmax()) * Gaudi::Units::cm;
1626 dy1WedgeMother = dbManager->
TILBrmax() *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
1627 dy2WedgeMother = dbManager->
TILErmax() *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
1628
1629 checking(
"EFingerModule (+)",
false, 1,
1630 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
1631
1632 GeoTrd* efingerModuleMother = new GeoTrd(thicknessWedgeMother/2,
1633 thicknessWedgeMother/2,
1634 dy1WedgeMother,
1635 dy2WedgeMother,
1636 heightWedgeMother/2);
1637
1638 GeoLogVol* lvEFingerModuleMother = new GeoLogVol("EFingerModule",efingerModuleMother,matAir);
1639 PVLink pvEFingerModuleMother = new GeoPhysVol(lvEFingerModuleMother);
1640
1641
1642 if (Filling) {
1643 sectionBuilder->
fillFinger(pvEFingerModuleMother, 2,
1648 ModuleNcp);
1649 }
1650 GeoTransform* xtraModFingerPos = new GeoTransform(GeoTrf::TranslateX3D(
1652 pvEFingerMotherPos->add(zrotMod);
1653 pvEFingerMotherPos->add(xtraModFingerPos);
1654 pvEFingerMotherPos->add(XYrtMod);
1655
1656 pvEFingerMotherPos->add(new GeoIdentifierTag(ModuleNcp));
1657 pvEFingerMotherPos->add(pvEFingerModuleMother);
1658
1659
1661 if ( (ModuleNcp >=39 && ModuleNcp <=42) || (ModuleNcp >=55 && ModuleNcp <=58) ) {
1662 GeoTubs* SaddleModule = new GeoTubs(BFingerRmin-RadiusSaddle,
1663 BFingerRmin,
1664 DzSaddleSupport/2,
1666
1667 GeoLogVol* lvSaddleModule = new GeoLogVol("SaddleModule",SaddleModule,matIron);
1668 PVLink pvSaddleModule = new GeoPhysVol(lvSaddleModule);
1669
1670 pvESaddleMotherPos->add(zrotSaddle);
1671 pvESaddleMotherPos->add(new GeoIdentifierTag(ModuleNcp));
1672 pvESaddleMotherPos->add(pvSaddleModule);
1673 }
1674 }
1675
1676 }
1677
1678
1679
1680 if (EnvType == 2 && barrel_flag < 2) {
1681
1683
1684
1685 thicknessWedgeMother = dbManager->
TILBdzmodul() * Gaudi::Units::cm;
1689
1693
1695
1696 checking(
"EBarrelModule (-)",
false, 1,
1697 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
1698
1699 GeoTrd* ebarrelModuleMotherNeg = new GeoTrd(thicknessWedgeMother/2,
1700 thicknessWedgeMother/2,
1701 dy1WedgeMother,
1702 dy2WedgeMother,
1703 heightWedgeMother/2);
1704
1706 if (
m_log->level()<=MSG::DEBUG)
1707 (*m_log) << MSG::DEBUG <<
" BoolCuts NO "<< dbManager->
BoolCuts() <<
endmsg;
1708
1709 lvEBarrelModuleMotherNeg = new GeoLogVol("EBarrelModule",ebarrelModuleMotherNeg,matAir);
1710 pvEBarrelModuleMotherNeg = new GeoPhysVol(lvEBarrelModuleMotherNeg);
1711
1712 } else {
1713
1714
1715 if (
m_log->level()<=MSG::DEBUG)
1716 (*m_log) << MSG::DEBUG <<
" BoolCuts YES "<< dbManager->
BoolCuts() <<
endmsg;
1717
1718 double PoZ2 =0, PoZ1 =0, thicknessEndPlate = dbManager->
TILBdzend1()*Gaudi::Units::cm;
1719
1720 PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->
GetEnvZLength()*Gaudi::Units::cm- EBFingerLengthNeg)/2;
1721 PoZ2 = PoZ1 + modl_length/4;
1722
1723 if ((ModuleNcp>=35 && ModuleNcp<=37) || (ModuleNcp>=60 && ModuleNcp<=62)) {
1724 GeoTrf::Transform3D TransCut2 = GeoTrf::TranslateZ3D(-Radius)
1725 * GeoTrf::RotateX3D((
phi-90)*Gaudi::Units::deg) * GeoTrf::RotateY3D(180*Gaudi::Units::deg)
1726 * GeoTrf::Translate3D(-PoZ2,0,-PosY);
1727
1728 if (ModuleNcp>=60 && ModuleNcp<=62) {
1729 GeoTrf::Transform3D TransCutL = GeoTrf::TranslateZ3D(-Radius)
1730 * GeoTrf::RotateY3D(180*Gaudi::Units::deg) * GeoTrf::RotateX3D(-
phi*Gaudi::Units::deg)
1731 * GeoTrf::Translate3D(PoZ1,-PosYcut,-PosXcut);
1732
1733
1734 const GeoShape& TmL_EBarrelModuleMotherNeg = ebarrelModuleMotherNeg->subtract((*CutA)<<TransCut2).
1735 subtract((*CutB)<<TransCutL);
1736
1737 lvEBarrelModuleMotherNeg = new GeoLogVol("EBarrelModule",&TmL_EBarrelModuleMotherNeg,matAir);
1738
1739 } else if (ModuleNcp>=35 && ModuleNcp<=37) {
1740 GeoTrf::Transform3D TransCutR = GeoTrf::TranslateZ3D(-Radius)
1741 * GeoTrf::RotateY3D(180*Gaudi::Units::deg) * GeoTrf::RotateX3D(-
phi*Gaudi::Units::deg)
1742 * GeoTrf::Translate3D(PoZ1,-PosYcut,PosXcut) * GeoTrf::RotateY3D(180*Gaudi::Units::deg);
1743
1744
1745 const GeoShape& TmR_EBarrelModuleMotherNeg = ebarrelModuleMotherNeg->subtract((*CutA)<<TransCut2).
1746 subtract((*CutB)<<TransCutR);
1747
1748 lvEBarrelModuleMotherNeg = new GeoLogVol("EBarrelModule",&TmR_EBarrelModuleMotherNeg,matAir);
1749 }
1750
1751 pvEBarrelModuleMotherNeg = new GeoPhysVol(lvEBarrelModuleMotherNeg);
1752
1753 } else {
1754 lvEBarrelModuleMotherNeg = new GeoLogVol("EBarrelModule",ebarrelModuleMotherNeg,matAir);
1755 pvEBarrelModuleMotherNeg = new GeoPhysVol(lvEBarrelModuleMotherNeg);
1756 }
1757 }
1758
1759
1760 if (Filling) {
1761 sectionBuilder->
fillSection(pvEBarrelModuleMotherNeg, 2,
1764 dzGlue,
1766 ModuleNcp,
1767 0.,true);
1768 }
1769
1770 GeoTransform* xtraModNeg = new GeoTransform(GeoTrf::TranslateX3D(Radius));
1771
1772 pvEBarrelMotherNeg->add(zrotMod);
1773 pvEBarrelMotherNeg->add(xtraModNeg);
1774 pvEBarrelMotherNeg->add(yrotMod);
1775
1776 pvEBarrelMotherNeg->add(new GeoIdentifierTag(ModuleNcp));
1777 pvEBarrelMotherNeg->add(pvEBarrelModuleMotherNeg);
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1837
1838
1839
1840
1841 thicknessWedgeMother = dbManager->
TIFGdz() * Gaudi::Units::cm;
1842 heightWedgeMother = (dbManager->
TILErmax() - dbManager->
TILBrmax()) * Gaudi::Units::cm;
1843 dy1WedgeMother = dbManager->
TILBrmax() *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
1844 dy2WedgeMother = dbManager->
TILErmax() *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
1845
1846 checking(
"EFingerModule (-)",
false, 1,
1847 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
1848
1849 GeoTrd* efingerModuleMother = new GeoTrd(thicknessWedgeMother/2,
1850 thicknessWedgeMother/2,
1851 dy1WedgeMother,
1852 dy2WedgeMother,
1853 heightWedgeMother/2);
1854
1855 GeoLogVol* lvEFingerModuleMother = new GeoLogVol("EFingerModule",efingerModuleMother,matAir);
1856 PVLink pvEFingerModuleMother = new GeoPhysVol(lvEFingerModuleMother);
1857
1858
1859 if (Filling) {
1860 sectionBuilder->
fillFinger(pvEFingerModuleMother, 2,
1865 ModuleNcp*100);
1866 }
1867 GeoTransform* xtraModFingerNeg = new GeoTransform(GeoTrf::TranslateX3D(
1869 pvEFingerMotherNeg->add(zrotMod);
1870 pvEFingerMotherNeg->add(xtraModFingerNeg);
1871 pvEFingerMotherNeg->add(yrotMod);
1872
1873 pvEFingerMotherNeg->add(new GeoIdentifierTag(ModuleNcp));
1874 pvEFingerMotherNeg->add(pvEFingerModuleMother);
1875
1876
1878 if ( (ModuleNcp >=39 && ModuleNcp <=42) || (ModuleNcp >=55 && ModuleNcp <=58) ) {
1879 GeoTubs* SaddleModule = new GeoTubs(BFingerRmin-RadiusSaddle,
1880 BFingerRmin,
1881 DzSaddleSupport/2,
1883
1884 GeoLogVol* lvSaddleModule = new GeoLogVol("SaddleModule",SaddleModule,matIron);
1885 PVLink pvSaddleModule = new GeoPhysVol(lvSaddleModule);
1886
1887 pvESaddleMotherNeg->add(zrotSaddle);
1888 pvESaddleMotherNeg->add(new GeoIdentifierTag(ModuleNcp));
1889 pvESaddleMotherNeg->add(pvSaddleModule);
1890 }
1891 }
1892
1893 }
1894
1895
1896
1897 if (((EnvType == 4) || (EnvType == 5)) && barrel_flag < 5) {
1898
1899 int Id4 = ModType%100;
1900 int Ic10 = (ModType/100)%100;
1901 int Igap = (ModType/10000)%100;
1902 int Icrack = (ModType/1000000)%100;
1903
1904 bool Ifd4 = ( Id4 != 0);
1905 bool Ifc10 = ( Ic10 != 0);
1906 bool Ifgap = ( Igap != 0);
1907 bool Ifcrack = ( Icrack != 0);
1908
1909 bool Ifspecialgirder = (Id4 == 7);
1910
1911 if (
m_log->level()<=MSG::DEBUG)
1912 (*m_log) << MSG::DEBUG <<
" ITC : EnvType "<<EnvType<<
" Size = "<<dbManager->
GetModTypeSize()
1913 <<" Ncp= "<<ModuleNcp<<" D4 "<<Id4<<" specialflag = "<<Ifspecialgirder<<" C10 "<<Ic10<<" Gap "<<Igap<<" Crack "<<Icrack
1915
1916 if (Ifc10) {
1921 } else {
1922 if (
m_log->level()<=MSG::DEBUG)
1923 (*m_log) << MSG::DEBUG <<
" C10 unavailable "<<
endmsg;
1924 }
1925
1926 if (Ifd4) {
1931 if (Ifspecialgirder) {
1932 if (
m_log->level()<=MSG::DEBUG)
1933 (*m_log) << MSG::DEBUG <<
" dzITC1 changed from "<<dzITC1<<
" to "<<dbManager->
TILBdzgir()<<
endmsg;
1935 }
1936 } else {
1937 (*m_log) << MSG::INFO <<
" D4 unavailable "<<
endmsg;
1938 dzITC1 = 9.485;
1939 }
1940
1941 bool specialC10 = (Ifd4 && Ifc10 && rMaxITC2 < rMinITC1);
1942 if (specialC10) {
1943 rMaxITC2 = rMinITC1;
1944 }
1945
1946
1947 if (EnvType == 4) {
1948
1949
1950 if ((Ifd4 || Ifc10) && pvITCMotherNeg) {
1951
1952
1953 thicknessWedgeMother = dzITC1 * Gaudi::Units::cm;
1954 heightWedgeMother = (rMaxITC1 - rMinITC1) * Gaudi::Units::cm;
1955 dy1WedgeMother = rMinITC1 *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
1956 dy2WedgeMother = rMaxITC1 *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
1957
1958 checking(
"ITCModule tcModuleSub1Neg (-) ",
false, 1,
1959 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
1960
1961 GeoTrd* itcModuleSub1Neg = new GeoTrd(thicknessWedgeMother/2,
1962 thicknessWedgeMother/2,
1963 dy1WedgeMother,
1964 dy2WedgeMother,
1965 heightWedgeMother/2);
1966
1967 thicknessWedgeMother = dzITC2 * Gaudi::Units::cm;
1968 heightWedgeMother = (rMaxITC2 - rMinITC2) * Gaudi::Units::cm;
1969 dy1WedgeMother = rMinITC2 *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
1970 dy2WedgeMother = rMaxITC2 *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
1971
1972 checking(
"ITCModule itcModuleSub2Neg (-)",
false, 1,
1973 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
1974
1975 GeoTrd* itcModuleSub2Neg = new GeoTrd(thicknessWedgeMother/2,
1976 thicknessWedgeMother/2,
1977 dy1WedgeMother,
1978 dy2WedgeMother,
1979 heightWedgeMother/2 );
1980
1981 X = (dzITC1 - dzITC2)/2*Gaudi::Units::cm;
1982 Z = ((rMinITC2+rMaxITC2)-(rMaxITC1 + rMinITC1))/2*Gaudi::Units::cm;
1983 if (
m_log->level()<=MSG::DEBUG)
1984 (*m_log) << MSG::DEBUG <<
" ITCModule Negative, position X= "<<
X<<
" Z= "<<
Z<<
endmsg;
1985
1986 GeoTrf::Translate3D itcModule_SubShiftNeg(X, 0., Z);
1987 const GeoShapeUnion& itcModuleMotherNeg = itcModuleSub1Neg->add(*itcModuleSub2Neg<<itcModule_SubShiftNeg);
1988
1989 GeoTrf::Translate3D itcModuleSubShiftNeg(X, 0., Z);
1990
1991 GeoLogVol* lvITCModuleMotherNeg = new GeoLogVol("ITCModule",&itcModuleMotherNeg,matAir);
1992 PVLink pvITCModuleMotherNeg = new GeoPhysVol(lvITCModuleMotherNeg);
1993
1994
1995
1996
1997
1998
1999
2001
2002 thicknessWedgeMother = dzITC1 * Gaudi::Units::cm;
2003 heightWedgeMother = (rMaxITC1 - dbManager->
TILBrmin()) * Gaudi::Units::cm;
2004 dy1WedgeMother = dbManager->
TILBrmin() *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
2005 dy2WedgeMother = rMaxITC1 *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
2006
2009
2010 if (
m_log->level()<=MSG::DEBUG)
2011 (*m_log) << MSG::DEBUG <<" Plug1Module : Glue= "<<Glue<<" dzITC1= "<<dzITC1
2015
2016 if (NbPeriod > 6) {
2017 dzGlue = (Glue - 2*NbPeriod * (dbManager->
TILBdzmast() + dbManager->
TILBdzspac())) / (4.*NbPeriod);
2018 } else {
2020 }
2021
2022 if (
m_log->level()<=MSG::DEBUG)
2023 (*m_log) << MSG::DEBUG <<" Plug1Module : Glue= "<<Glue<<" dzGlue= "<<dzGlue<<" NbPeriod= "<<NbPeriod
2026
2027 if (dzGlue <= 0.) {
2028 (*m_log) << MSG::WARNING <<" Plug1Module warning: "<<" dzGlue= "<<dzGlue
2030 }
2031
2032 checking(
"Plug1Module plug1SubMotherNeg (-)",
false, 2,
2033 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
2034
2035 GeoTrd* plug1SubMotherNeg = new GeoTrd(thicknessWedgeMother/2,
2036 thicknessWedgeMother/2,
2037 dy1WedgeMother,
2038 dy2WedgeMother,
2039 heightWedgeMother/2);
2040
2041 double dzITC2Bis = (specialC10) ? 0.0 : dzITC2;
2042 thicknessWedgeMother = (dbManager->
TILBdzmodul() - dzITC2Bis) * Gaudi::Units::cm;
2043 if (
m_log->level()<=MSG::DEBUG)
2044 if (specialC10)
2045 (*m_log) << MSG::DEBUG <<
" Separate C10 and D4 in module " << ModuleNcp <<
endmsg;
2046
2047 GeoLogVol *lvPlug1ModuleMotherNeg=0;
2048 if (thicknessWedgeMother > rless) {
2051 dy2WedgeMother = dbManager->
TILBrmin() *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
2052
2053 checking(
"Plug1Module plug2SubMotherNeg (-)",
false, 2,
2054 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
2055
2056 GeoTrd* plug2SubMotherNeg = new GeoTrd(thicknessWedgeMother/2,
2057 thicknessWedgeMother/2,
2058 dy1WedgeMother,
2059 dy2WedgeMother,
2060 heightWedgeMother/2);
2061
2062 GeoTrf::Translate3D plug1SubOffsetNeg(-dzITC2Bis*Gaudi::Units::cm/2, 0.,
2064
2065 const GeoShapeUnion& plug1ModuleMotherNeg =
2066 plug1SubMotherNeg->add(*plug2SubMotherNeg<<plug1SubOffsetNeg);
2067
2068 lvPlug1ModuleMotherNeg = new GeoLogVol("Plug1Module",&plug1ModuleMotherNeg,matAir);
2069 } else {
2070 lvPlug1ModuleMotherNeg = new GeoLogVol("Plug1Module",plug1SubMotherNeg,matAir);
2071 }
2072
2073 PVLink pvPlug1ModuleMotherNeg = new GeoPhysVol(lvPlug1ModuleMotherNeg);
2074
2075
2076 if (Filling) {
2077 sectionBuilder->
fillSection(pvPlug1ModuleMotherNeg, 3,
2080 dzGlue,
2082 ModuleNcp,
2083 dzITC2Bis);
2084 }
2085
2087 GeoTransform* tfPlug1ModuleMotherNeg = new GeoTransform(GeoTrf::Translate3D(0.,0.,Z));
2088
2089 pvITCModuleMotherNeg->add(tfPlug1ModuleMotherNeg);
2090 pvITCModuleMotherNeg->add(pvPlug1ModuleMotherNeg);
2091
2092
2093 if (Ifc10) {
2094
2095
2097
2098 thicknessWedgeMother = dbManager->
TILBdzmodul() * Gaudi::Units::cm;
2102
2107 } else {
2108 dzGlue = 0;
2109 }
2110
2111 checking(
"Plug2Module (-)",
false, 2,
2112 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
2113
2114 GeoTrd* plug2ModuleMotherNeg = new GeoTrd(thicknessWedgeMother/2,
2115 thicknessWedgeMother/2,
2116 dy1WedgeMother,
2117 dy2WedgeMother,
2118 heightWedgeMother/2);
2119
2120 GeoLogVol* lvPlug2ModuleMotherNeg = new GeoLogVol("Plug2Module",plug2ModuleMotherNeg,matAir);
2121 PVLink pvPlug2ModuleMotherNeg = new GeoPhysVol(lvPlug2ModuleMotherNeg);
2122
2123
2124 if (Filling) {
2125 sectionBuilder->
fillSection(pvPlug2ModuleMotherNeg, Ic10,
2128 dzGlue,
2130 }
2131
2132
2133 if (Ifd4) {
2135
2136 GeoTransform* tfPlug2ModuleMotherNeg = new GeoTransform(itcModuleSubShiftNeg);
2137
2138 pvITCModuleMotherNeg->add(tfPlug2ModuleMotherNeg);
2139 pvITCModuleMotherNeg->add(pvPlug2ModuleMotherNeg);
2140 }
2141 }
2142
2143 double zShift = 0;
2145
2146
2147
2148 Z = (dzITC1 - dzITC2)/2*Gaudi::Units::cm;
2149
2150 if (NbPeriod == 6 && !Ifspecialgirder && std::abs(Z) < std::abs(zITCStandard)) zShift = zITCStandard*(1./Gaudi::Units::cm);
2151
2152 if (
m_log->level()<=MSG::DEBUG)
2153 (*m_log) << MSG::DEBUG <<
" ITCModule Negative, position X= "<<
X<<
" Z= "<<
Z
2154 <<" zStandard= "<<zITCStandard<< " zShift= " <<zShift
2156
2157 GeoTransform* xtraITCNeg = new GeoTransform(GeoTrf::TranslateX3D(
2159 GeoTransform* ztraITCNeg = new GeoTransform(GeoTrf::TranslateZ3D(zShift*Gaudi::Units::cm));
2160
2161 pvITCMotherNeg->add(zrotMod);
2162 pvITCMotherNeg->add(xtraITCNeg);
2163 pvITCMotherNeg->add(ztraITCNeg);
2164 pvITCMotherNeg->add(yrotMod);
2165
2166 pvITCMotherNeg->add(new GeoIdentifierTag(ModuleNcp));
2167 pvITCMotherNeg->add(pvITCModuleMotherNeg);
2168
2169 }
2170
2171
2172 if (Ifgap && pvGapMotherNeg) {
2173
2174
2176
2177
2178 thicknessWedgeMother = dbManager->
TILBdzmodul() * Gaudi::Units::cm;
2182
2183 dzGlue = 0.;
2184
2185 checking(
"GapModule (-)",
false, 2,
2186 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
2187
2188 GeoTrd* gapModuleMotherNeg = new GeoTrd(thicknessWedgeMother/2,
2189 thicknessWedgeMother/2,
2190 dy1WedgeMother,
2191 dy2WedgeMother,
2192 heightWedgeMother/2);
2193
2194 GeoLogVol* lvGapModuleMotherNeg = new GeoLogVol("GapModule",gapModuleMotherNeg,matAir);
2195 PVLink pvGapModuleMotherNeg = new GeoPhysVol(lvGapModuleMotherNeg);
2196
2197
2198 if (Filling) {
2199 sectionBuilder->
fillSection(pvGapModuleMotherNeg, 5,
2202 dzGlue,
2204 }
2205
2206
2207 GeoTransform* xtraGapNeg = new GeoTransform(GeoTrf::TranslateX3D(
2209 pvGapMotherNeg->add(zrotMod);
2210 pvGapMotherNeg->add(xtraGapNeg);
2211 pvGapMotherNeg->add(yrotMod);
2212
2213 pvGapMotherNeg->add(new GeoIdentifierTag(ModuleNcp));
2214 pvGapMotherNeg->add(pvGapModuleMotherNeg);
2215 }
2216
2217
2218 if (Ifcrack && pvCrackMotherNeg) {
2219
2220
2222
2223
2224 thicknessWedgeMother = dbManager->
TILBdzmodul() * Gaudi::Units::cm;
2228
2229 dzGlue = 0.;
2230
2231 checking(
"CrackModule (-)", spE4, 2,
2232 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
2233
2234 GeoTrd* crackModuleMotherNeg = new GeoTrd(thicknessWedgeMother/2,
2235 thicknessWedgeMother/2,
2236 dy1WedgeMother,
2237 dy2WedgeMother,
2238 heightWedgeMother/2);
2239
2240 GeoLogVol* lvCrackModuleMotherNeg = new GeoLogVol("CrackModule",crackModuleMotherNeg,matAir);
2241 PVLink pvCrackModuleMotherNeg = new GeoPhysVol(lvCrackModuleMotherNeg);
2242
2243
2244 if (Filling) {
2245 sectionBuilder->
fillSection(pvCrackModuleMotherNeg, 6,
2248 dzGlue,
2250 }
2251
2252 GeoTransform* xtraCrackNeg = new GeoTransform(GeoTrf::TranslateX3D(
2254 pvCrackMotherNeg->add(zrotMod);
2255 pvCrackMotherNeg->add(xtraCrackNeg);
2256 pvCrackMotherNeg->add(yrotMod);
2257
2258 pvCrackMotherNeg->add(new GeoIdentifierTag(ModuleNcp));
2259 pvCrackMotherNeg->add(pvCrackModuleMotherNeg);
2260
2261 }
2262 }
2263
2264
2265 if (EnvType == 5) {
2266
2267
2268 if ((Ifd4 || Ifc10) && pvITCMotherPos) {
2269
2270
2271 thicknessWedgeMother = dzITC1 * Gaudi::Units::cm;
2272 heightWedgeMother = (rMaxITC1 - rMinITC1) * Gaudi::Units::cm;
2273 dy1WedgeMother = rMinITC1 *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
2274 dy2WedgeMother = rMaxITC1 *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
2275
2276 checking(
"ITCModule itcModuleSub2Pos (+)",
false, 1,
2277 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
2278
2279 GeoTrd* itcModuleSub1Pos = new GeoTrd(thicknessWedgeMother/2,
2280 thicknessWedgeMother/2,
2281 dy1WedgeMother ,
2282 dy2WedgeMother ,
2283 heightWedgeMother/2 );
2284
2285 thicknessWedgeMother = dzITC2 * Gaudi::Units::cm;
2286 heightWedgeMother = (rMaxITC2 - rMinITC2) * Gaudi::Units::cm;
2287 dy1WedgeMother = rMinITC2 *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
2288 dy2WedgeMother = rMaxITC2 *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
2289
2290 checking(
"ITCModule itcModuleSub2Pos (+)",
false, 1,
2291 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
2292
2293 GeoTrd* itcModuleSub2Pos = new GeoTrd(thicknessWedgeMother/2,
2294 thicknessWedgeMother/2,
2295 dy1WedgeMother ,
2296 dy2WedgeMother ,
2297 heightWedgeMother/2 );
2298
2299 X = (dzITC1 - dzITC2)/2*Gaudi::Units::cm;
2300 Z = ((rMinITC2+rMaxITC2)-(rMaxITC1 + rMinITC1))/2*Gaudi::Units::cm;
2301 if (
m_log->level()<=MSG::DEBUG)
2302 (*m_log) << MSG::DEBUG <<
" ITCModule Positive, position X= "<<
X<<
" Z= "<<
Z<<
endmsg;
2303
2304 GeoTrf::Translate3D itcModule_SubShiftPos(X, 0., Z);
2305 const GeoShapeUnion& itcModuleMotherPos = itcModuleSub1Pos->add(*itcModuleSub2Pos<<itcModule_SubShiftPos);
2306
2307 GeoTrf::Translate3D itcModuleSubShiftPos(X, 0., Z);
2308
2309 GeoLogVol* lvITCModuleMotherPos = new GeoLogVol("ITCModule",&itcModuleMotherPos,matAir);
2310 PVLink pvITCModuleMotherPos = new GeoPhysVol(lvITCModuleMotherPos);
2311
2312
2313
2314
2315
2316
2317
2319
2320 thicknessWedgeMother = dzITC1 * Gaudi::Units::cm;
2321 dy1WedgeMother = dbManager->
TILBrmin() *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
2322 dy2WedgeMother = rMaxITC1 *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
2323 heightWedgeMother = (rMaxITC1 - dbManager->
TILBrmin()) * Gaudi::Units::cm;
2324
2325
2328
2329 if (
m_log->level()<=MSG::DEBUG)
2330 (*m_log) << MSG::DEBUG <<" Plug1Module : Glue= "<<Glue<<" dzITC1= "<<dzITC1
2334
2335 if (NbPeriod > 6) {
2336 dzGlue = (Glue - 2*NbPeriod * (dbManager->
TILBdzmast() + dbManager->
TILBdzspac())) / (4.*NbPeriod);
2337 } else {
2339 + dbManager->
TILBdzspac())) / (4.*(NbPeriod-1));
2340 }
2341
2342 if (
m_log->level()<=MSG::DEBUG)
2343 (*m_log) << MSG::DEBUG <<" Plug1Module : Glue= "<<Glue<<" dzGlue= "<<dzGlue<<" NbPeriod= "<<NbPeriod
2346
2347 if (dzGlue <= 0.) {
2348 (*m_log) << MSG::WARNING <<" Plug1Module warning: "<<" dzGlue= "<<dzGlue
2350 }
2351
2352 checking(
"Plug1Module plug1SubMotherPos (+)",
false, 2,
2353 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
2354
2355 GeoTrd* plug1SubMotherPos = new GeoTrd(thicknessWedgeMother/2,
2356 thicknessWedgeMother/2,
2357 dy1WedgeMother ,
2358 dy2WedgeMother ,
2359 heightWedgeMother/2 );
2360
2361
2362 double dzITC2Bis = (specialC10) ? 0.0 : dzITC2;
2363 thicknessWedgeMother = (dbManager->
TILBdzmodul() - dzITC2Bis) * Gaudi::Units::cm;
2364 if (
m_log->level()<=MSG::DEBUG)
2365 if (specialC10)
2366 (*m_log) << MSG::DEBUG <<
" Separate C10 and D4 in module " << ModuleNcp <<
endmsg;
2367
2368 GeoLogVol *lvPlug1ModuleMotherPos=0;
2369 if (thicknessWedgeMother > rless) {
2372 dy2WedgeMother = dbManager->
TILBrmin() *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
2373
2374 checking(
"Plug1Module plug2SubMotherPos (+)",
false, 2,
2375 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
2376
2377 GeoTrd* plug2SubMotherPos = new GeoTrd(thicknessWedgeMother/2,
2378 thicknessWedgeMother/2,
2379 dy1WedgeMother ,
2380 dy2WedgeMother ,
2381 heightWedgeMother/2 );
2382
2383 GeoTrf::Translate3D plug1SubOffsetPos(-dzITC2Bis/2*Gaudi::Units::cm, 0.,
2385
2386 const GeoShapeUnion& plug1ModuleMotherPos = plug1SubMotherPos->add(*plug2SubMotherPos<<plug1SubOffsetPos);
2387
2388 lvPlug1ModuleMotherPos = new GeoLogVol("Plug1Module",&plug1ModuleMotherPos,matAir);
2389 } else {
2390 lvPlug1ModuleMotherPos = new GeoLogVol("Plug1Module",plug1SubMotherPos,matAir);
2391 }
2392
2393 PVLink pvPlug1ModuleMotherPos = new GeoPhysVol(lvPlug1ModuleMotherPos);
2394
2395
2396 if (Filling) {
2397 sectionBuilder->
fillSection(pvPlug1ModuleMotherPos, 3,
2400 dzGlue,
2402 ModuleNcp,
2403 dzITC2Bis);
2404 }
2405
2407 GeoTransform* tfPlug1ModuleMotherPos = new GeoTransform(GeoTrf::Translate3D(0.,0.,Z));
2408
2409 pvITCModuleMotherPos->add(tfPlug1ModuleMotherPos);
2410 pvITCModuleMotherPos->add(pvPlug1ModuleMotherPos);
2411
2412
2413 if (Ifc10) {
2414
2415
2417
2418 thicknessWedgeMother = dzITC2 * Gaudi::Units::cm;
2419 heightWedgeMother = (rMaxITC2 - rMinITC2) * Gaudi::Units::cm;
2420 dy1WedgeMother = rMinITC2 *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
2421 dy2WedgeMother = rMaxITC2 *
tan(
deltaPhi/2*Gaudi::Units::deg) * Gaudi::Units::cm;
2422
2427 } else {
2428 dzGlue = 0;
2429 }
2430
2431 checking(
"Plug2Module (+)",
false, 2,
2432 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
2433
2434 GeoTrd* plug2ModuleMotherPos = new GeoTrd(thicknessWedgeMother/2,
2435 thicknessWedgeMother/2,
2436 dy1WedgeMother,
2437 dy2WedgeMother,
2438 heightWedgeMother/2);
2439
2440 GeoLogVol* lvPlug2ModuleMotherPos = new GeoLogVol("Plug2Module",plug2ModuleMotherPos,matAir);
2441 PVLink pvPlug2ModuleMotherPos = new GeoPhysVol(lvPlug2ModuleMotherPos);
2442
2443
2444 if (Filling) {
2445 sectionBuilder->
fillSection(pvPlug2ModuleMotherPos, Ic10,
2448 dzGlue,
2450 }
2451
2452
2453 if ((Ifd4)) {
2455
2456 GeoTransform* tfPlug2ModuleMotherPos = new GeoTransform(itcModuleSubShiftPos);
2457
2458 pvITCModuleMotherPos->add(tfPlug2ModuleMotherPos);
2459 pvITCModuleMotherPos->add(pvPlug2ModuleMotherPos);
2460 }
2461 }
2462
2463 double zShift = 0;
2465
2466 Z = (dzITC1 - dzITC2)/2*Gaudi::Units::cm;
2467
2468 if (NbPeriod == 6 && !Ifspecialgirder && std::abs(Z) < std::abs(zITCStandard)) zShift = zITCStandard*(1./Gaudi::Units::cm);
2469
2470 if (
m_log->level()<=MSG::DEBUG)
2471 (*m_log) << MSG::DEBUG <<
" ITCModule Positive, position X= "<<
X<<
" Z= "<<
Z
2472 <<" zStandard= "<<zITCStandard<< " zShift= " <<zShift
2474
2475 GeoTransform* xtraITCPos = new GeoTransform(GeoTrf::TranslateX3D(
2477 GeoTransform* ztraITCPos = new GeoTransform(GeoTrf::TranslateZ3D(zShift*Gaudi::Units::cm));
2478
2479 pvITCMotherPos->add(zrotMod);
2480 pvITCMotherPos->add(xtraITCPos);
2481 pvITCMotherPos->add(ztraITCPos);
2482 pvITCMotherPos->add(XYrtMod);
2483
2484 pvITCMotherPos->add(new GeoIdentifierTag(ModuleNcp));
2485 pvITCMotherPos->add(pvITCModuleMotherPos);
2486
2487 }
2488
2489
2490
2491 if (Ifgap && pvGapMotherPos) {
2492
2493
2495
2496
2497 thicknessWedgeMother = dbManager->
TILBdzmodul() * Gaudi::Units::cm;
2501
2502 dzGlue = 0;
2503
2504 checking(
"Plug2Module (+)",
false, 2,
2505 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
2506
2507 GeoTrd* gapModuleMotherPos = new GeoTrd(thicknessWedgeMother/2,
2508 thicknessWedgeMother/2,
2509 dy1WedgeMother,
2510 dy2WedgeMother,
2511 heightWedgeMother/2);
2512
2513 GeoLogVol* lvGapModuleMotherPos = new GeoLogVol("GapModule",gapModuleMotherPos,matAir);
2514 PVLink pvGapModuleMotherPos = new GeoPhysVol(lvGapModuleMotherPos);
2515
2516
2517 if (Filling) {
2518 sectionBuilder->
fillSection(pvGapModuleMotherPos, 5,
2521 dzGlue,
2523 }
2524
2525
2526 GeoTransform* xtraGapPos = new GeoTransform(GeoTrf::TranslateX3D(
2528 pvGapMotherPos->add(zrotMod);
2529 pvGapMotherPos->add(xtraGapPos);
2530 pvGapMotherPos->add(XYrtMod);
2531
2532 pvGapMotherPos->add(new GeoIdentifierTag(ModuleNcp));
2533 pvGapMotherPos->add(pvGapModuleMotherPos);
2534 }
2535
2536
2537 if (Ifcrack && pvCrackMotherPos) {
2538
2539
2541
2542
2543 thicknessWedgeMother = dbManager->
TILBdzmodul() * Gaudi::Units::cm;
2547
2548 dzGlue = 0.;
2549
2550 checking(
"CrackModule (+)", spE4, 2,
2551 thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2);
2552
2553 GeoTrd* crackModuleMotherPos = new GeoTrd(thicknessWedgeMother/2,
2554 thicknessWedgeMother/2,
2555 dy1WedgeMother,
2556 dy2WedgeMother,
2557 heightWedgeMother/2);
2558
2559 GeoLogVol* lvCrackModuleMotherPos = new GeoLogVol("CrackModule",crackModuleMotherPos,matAir);
2560 PVLink pvCrackModuleMotherPos = new GeoPhysVol(lvCrackModuleMotherPos);
2561
2562
2563 if (Filling) {
2564 sectionBuilder->
fillSection(pvCrackModuleMotherPos, 6,
2567 dzGlue,
2569 }
2570
2571
2572 GeoTransform* xtraCrackPos = new GeoTransform(GeoTrf::TranslateX3D(
2574 pvCrackMotherPos->add(zrotMod);
2575 pvCrackMotherPos->add(xtraCrackPos);
2576 pvCrackMotherPos->add(XYrtMod);
2577
2578 pvCrackMotherPos->add(new GeoIdentifierTag(ModuleNcp));
2579 pvCrackMotherPos->add(pvCrackModuleMotherPos);
2580
2581 }
2582 }
2583
2584 }
2585
2586 }
2587
2588
2589 }
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599 double ztrans =0;
2601
2602 if (EnvType == 1 && barrel_flag < 1) {
2603
2604 GeoTransform* tfBarrelMother;
2605
2606
2607 ztrans = 0;
2608
2609 tfBarrelMother =
new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::RotateZ3D((dbManager->
GetEnvDPhi())*Gaudi::Units::deg));
2610
2611 (*m_log) << MSG::INFO <<
" Positioning barrel with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
2612
2613 GeoNameTag* ntBarrelModuleMother = new GeoNameTag("Barrel");
2614
2615 pvTileEnvelopeBarrel->add(tfBarrelMother);
2616 pvTileEnvelopeBarrel->add(ntBarrelModuleMother);
2617 pvTileEnvelopeBarrel->add(pvBarrelMother);
2618
2619 GeoTransform* tfFingerMotherPos;
2620
2621 ztrans = (dbManager->
GetEnvZLength()*Gaudi::Units::cm/2 - BFingerLengthPos/2 + PosDelta)*(1./Gaudi::Units::cm);
2622
2623 tfFingerMotherPos =
new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)*GeoTrf::RotateZ3D((dbManager->
GetEnvDPhi())*Gaudi::Units::deg));
2624
2625 (*m_log) << MSG::INFO <<
" Positioning positive barrel finger with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
2626
2627 GeoNameTag* ntFingerMotherPos = new GeoNameTag("TileFingerPos");
2628
2629 pvTileEnvelopeBarrel->add(tfFingerMotherPos);
2630 pvTileEnvelopeBarrel->add(ntFingerMotherPos);
2631 pvTileEnvelopeBarrel->add(pvFingerMotherPos);
2632
2634 GeoTransform* tfSaddleMotherPos;
2635
2636 ztrans = (dbManager->
GetEnvZLength()*Gaudi::Units::cm/2 - BFingerLengthPos + DzSaddleSupport/2 + PosDelta)*(1./Gaudi::Units::cm);
2637
2638 tfSaddleMotherPos =
new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)*GeoTrf::RotateZ3D((dbManager->
GetEnvDPhi())*Gaudi::Units::deg));
2639
2640 GeoNameTag* ntSaddleMotherPos = new GeoNameTag("TileSaddlePos");
2641
2642 pvTileEnvelopeBarrel->add(tfSaddleMotherPos);
2643 pvTileEnvelopeBarrel->add(ntSaddleMotherPos);
2644 pvTileEnvelopeBarrel->add(pvSaddleMotherPos);
2645 }
2646
2647
2648
2649 GeoTransform* tfFingerMotherNeg;
2650
2651 ztrans = (-dbManager->
GetEnvZLength()*Gaudi::Units::cm/2 + BFingerLengthNeg/2 - NegDelta)*(1./Gaudi::Units::cm);
2652
2653 tfFingerMotherNeg =
new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)*GeoTrf::RotateZ3D((dbManager->
GetEnvDPhi())*Gaudi::Units::deg));
2654
2655 (*m_log) << MSG::INFO <<
" Positioning negative barrel finger with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
2656
2657 GeoNameTag* ntFingerMotherNeg = new GeoNameTag("TileFingerNeg");
2658 pvTileEnvelopeBarrel->add(tfFingerMotherNeg);
2659 pvTileEnvelopeBarrel->add(ntFingerMotherNeg);
2660 pvTileEnvelopeBarrel->add(pvFingerMotherNeg);
2661
2663 GeoTransform* tfSaddleMotherNeg;
2664
2665 ztrans = (-dbManager->
GetEnvZLength()*Gaudi::Units::cm/2 + BFingerLengthNeg - DzSaddleSupport/2 - NegDelta)*(1./Gaudi::Units::cm);
2666
2667 tfSaddleMotherNeg =
new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)*GeoTrf::RotateZ3D((dbManager->
GetEnvDPhi())*Gaudi::Units::deg));
2668
2669 GeoNameTag* ntSaddleMotherNeg = new GeoNameTag("TileSaddleNeg");
2670
2671 pvTileEnvelopeBarrel->add(tfSaddleMotherNeg);
2672 pvTileEnvelopeBarrel->add(ntSaddleMotherNeg);
2673 pvTileEnvelopeBarrel->add(pvSaddleMotherNeg);
2674 }
2675 }
2676
2677
2678
2679
2680 if (EnvType == 3 && eb_flag) {
2681
2683 double thicknessEndPlate = dbManager->
TILBdzend1()*Gaudi::Units::cm;
2684
2685 double PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->
GetEnvZLength()*Gaudi::Units::cm- EBFingerLengthPos)/2;
2686 double PoZ2 = modl_length/4 + PoZ1;
2687
2688
2689
2691 if (dbManager->
BoolCuts() && barrel_flag < 2) {
2692
2693
2697 if (
m_log->level()<=MSG::DEBUG)
2698 (*m_log) << MSG::DEBUG <<
" Iron1: " << dxIron <<
" " << dyIron <<
endmsg;
2699
2700 GeoTransform* tfIron1 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(dxIron,PosY-dyIron,PoZ2)
2701 * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2702 pvEBarrelMotherPos->add(tfIron1);
2703 pvEBarrelMotherPos->add(new GeoIdentifierTag(1));
2704 pvEBarrelMotherPos->add(pvIron1);
2705
2706 tfIron1 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(-dxIron,PosY-dyIron,PoZ2)
2707 * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2708 pvEBarrelMotherPos->add(tfIron1);
2709 pvEBarrelMotherPos->add(pvIron1);
2710
2711
2715 if (
m_log->level()<=MSG::DEBUG)
2716 (*m_log) << MSG::DEBUG <<
" Iron2: " << dxIron <<
" " << dyIron <<
endmsg;
2717
2718 GeoTransform* tfIron2 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(dxIron,PosY+dyIron,PoZ2)
2719 * GeoTrf::RotateZ3D(-84.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2720 pvEBarrelMotherPos->add(tfIron2);
2721 pvEBarrelMotherPos->add(new GeoIdentifierTag(2));
2722 pvEBarrelMotherPos->add(pvIron2);
2723
2724 tfIron2 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(-dxIron,PosY+dyIron,PoZ2)
2725 * GeoTrf::RotateZ3D(84.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2726 pvEBarrelMotherPos->add(tfIron2);
2727 pvEBarrelMotherPos->add(pvIron2);
2728
2729
2733 if (
m_log->level()<=MSG::DEBUG)
2734 (*m_log) << MSG::DEBUG <<
" Iron3: " << dxIron <<
" " << dyIron <<
endmsg;
2735
2736 GeoTransform* tfIron3 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(dxIron,PosY+dyIron,PoZ2)
2737 * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2738 pvEBarrelMotherPos->add(tfIron3);
2739 pvEBarrelMotherPos->add(new GeoIdentifierTag(3));
2740 pvEBarrelMotherPos->add(pvIron3);
2741
2742 tfIron3 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(-dxIron,PosY+dyIron,PoZ2)
2743 * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2744 pvEBarrelMotherPos->add(tfIron3);
2745 pvEBarrelMotherPos->add(pvIron3);
2746
2747
2751
2752 GeoTransform* tfIrBoxL = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(dxIron,PosY-dyIron,PoZ2)
2753 * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2754 pvEBarrelMotherPos->add(tfIrBoxL);
2755 pvEBarrelMotherPos->add(new GeoIdentifierTag(4));
2756 pvEBarrelMotherPos->add(pvIrBox);
2757
2758 GeoTransform* tfIrBoxR = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(-dxIron,PosY-dyIron,PoZ2)
2759 * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2760 pvEBarrelMotherPos->add(tfIrBoxR);
2761 pvEBarrelMotherPos->add(pvIrBox);
2762
2763
2767 if (
m_log->level()<=MSG::DEBUG)
2768 (*m_log) << MSG::DEBUG <<
" IrUp: " <<dxIr<<
" " <<dyIr<<
endmsg;
2769
2770 GeoTransform* tfIrUp = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)
2771 * GeoTrf::Translate3D(PosXcut+dxIr,-PosYcut+dyIr,-PoZ1)
2772 * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2773 pvEBarrelMotherPos->add(tfIrUp);
2774 pvEBarrelMotherPos->add(new GeoIdentifierTag(5));
2775 pvEBarrelMotherPos->add(pvIrUp);
2776
2777 tfIrUp = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)
2778 * GeoTrf::Translate3D(-PosXcut-dxIr,-PosYcut+dyIr,-PoZ1)
2779 * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2780 pvEBarrelMotherPos->add(tfIrUp);
2781 pvEBarrelMotherPos->add(pvIrUp);
2782
2783
2787 if (
m_log->level()<=MSG::DEBUG)
2788 (*m_log) << MSG::DEBUG <<
" IrDw: " <<dxIr<<
" " <<dyIr<<
endmsg;
2789
2790 GeoTransform* tfIrDw = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)
2791 * GeoTrf::Translate3D(PosXcut+dxIr,-PosYcut+dyIr,-PoZ1)
2792 * GeoTrf::RotateZ3D(70.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2793 pvEBarrelMotherPos->add(tfIrDw);
2794 pvEBarrelMotherPos->add(new GeoIdentifierTag(6));
2795 pvEBarrelMotherPos->add(pvIrDw);
2796
2797 tfIrDw = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)
2798 * GeoTrf::Translate3D(-PosXcut+dxIr,-PosYcut+dyIr,-PoZ1)
2799 * GeoTrf::RotateZ3D(-70.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2800
2801 pvEBarrelMotherPos->add(tfIrDw);
2802 pvEBarrelMotherPos->add(pvIrDw);
2803 }
2804 }
2805
2806
2807 ztrans = (PosEndCrack + (dbManager->
GetEnvZLength()*Gaudi::Units::cm - EBFingerLengthPos)/2 + 19.5)*(1./Gaudi::Units::cm);
2808
2809 GeoTransform* tfEBarrelMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) *
2810 GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi()*Gaudi::Units::deg));
2811
2812 (*m_log) << MSG::INFO <<
" Positioning positive ext.barrel with translation "<< ztrans*Gaudi::Units::cm <<
endmsg;
2813
2814
2815 GeoNameTag* ntEBarrelMotherPos = new GeoNameTag("EBarrelPos");
2816 pvTileEnvelopePosEndcap->add(tfEBarrelMotherPos);
2817 pvTileEnvelopePosEndcap->add(ntEBarrelMotherPos);
2818 pvTileEnvelopePosEndcap->add(new GeoIdentifierTag(3));
2819 pvTileEnvelopePosEndcap->add(pvEBarrelMotherPos);
2820
2821
2822 if (barrel_flag < 2) {
2823
2824
2825
2826 ztrans = (PosEndExBarrel + EBFingerLengthPos/2)*(1./Gaudi::Units::cm);
2827
2828 GeoTransform* tfEFingerMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) *
2829 GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi() * Gaudi::Units::deg));
2830
2831 (*m_log) << MSG::INFO <<
" Positioning positive ext.barrel finger with translation ztrans= "<<ztrans*Gaudi::Units::cm<<
endmsg;
2832
2833 GeoNameTag* ntEFingerMotherPos = new GeoNameTag("TileEFingerPos");
2834
2835 pvTileEnvelopePosEndcap->add(tfEFingerMotherPos);
2836 pvTileEnvelopePosEndcap->add(ntEFingerMotherPos);
2837 pvTileEnvelopePosEndcap->add(pvEFingerMotherPos);
2838
2839
2840
2842 ztrans = (PosEndExBarrel + DzSaddleSupport/2)*(1./Gaudi::Units::cm);
2843
2844 GeoTransform* tfESaddleMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) *
2845 GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi() * Gaudi::Units::deg));
2846
2847 (*m_log) << MSG::INFO <<" Positioning positive ext.barrel saddle with translation ztrans= "<<ztrans*Gaudi::Units::cm
2849
2850 GeoNameTag* ntESaddleMotherPos = new GeoNameTag("TileESaddlePos");
2851
2852 pvTileEnvelopePosEndcap->add(tfESaddleMotherPos);
2853 pvTileEnvelopePosEndcap->add(ntESaddleMotherPos);
2854 pvTileEnvelopePosEndcap->add(pvESaddleMotherPos);
2855 }
2856
2857 }
2858 }
2859
2860
2861
2862 if (EnvType == 2 && eb_flag) {
2863
2865 double thicknessEndPlate = dbManager->
TILBdzend1()*Gaudi::Units::cm;
2866
2867 double PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->
GetEnvZLength()*Gaudi::Units::cm- EBFingerLengthNeg)/2;
2868 double PoZ2 = modl_length/4 + PoZ1;
2869
2870
2871
2873 if (dbManager->
BoolCuts() && barrel_flag < 2) {
2874
2878
2879 GeoTransform* tfIron1 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(dxIron,PosY-dyIron,-PoZ2)
2880 * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2881 pvEBarrelMotherNeg->add(tfIron1);
2882 pvEBarrelMotherNeg->add(new GeoIdentifierTag(1));
2883 pvEBarrelMotherNeg->add(pvIron1);
2884
2885 tfIron1 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(-dxIron,PosY-dyIron,-PoZ2)
2886 * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2887 pvEBarrelMotherNeg->add(tfIron1);
2888 pvEBarrelMotherNeg->add(new GeoIdentifierTag(2));
2889 pvEBarrelMotherNeg->add(pvIron1);
2890
2891
2895
2896 GeoTransform* tfIron2 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(dxIron,PosY+dyIron,-PoZ2)
2897 * GeoTrf::RotateZ3D(-84.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2898 pvEBarrelMotherNeg->add(tfIron2);
2899 pvEBarrelMotherNeg->add(new GeoIdentifierTag(2));
2900 pvEBarrelMotherNeg->add(pvIron2);
2901
2902 tfIron2 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(-dxIron,PosY+dyIron,-PoZ2)
2903 * GeoTrf::RotateZ3D(84.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2904 pvEBarrelMotherNeg->add(tfIron2);
2905 pvEBarrelMotherNeg->add(pvIron2);
2906
2907
2911
2912 GeoTransform* tfIron3 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(dxIron,PosY+dyIron,-PoZ2)
2913 * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2914 pvEBarrelMotherNeg->add(tfIron3);
2915 pvEBarrelMotherNeg->add(new GeoIdentifierTag(3));
2916 pvEBarrelMotherNeg->add(pvIron3);
2917
2918 tfIron3 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(-dxIron,PosY+dyIron,-PoZ2)
2919 * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2920 pvEBarrelMotherNeg->add(tfIron3);
2921 pvEBarrelMotherNeg->add(pvIron3);
2922
2923
2927 GeoTransform* tfIrBoxL = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) * GeoTrf::Translate3D(dxIron,PosY-dyIron,-PoZ2)
2928 * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2929 pvEBarrelMotherNeg->add(tfIrBoxL);
2930 pvEBarrelMotherNeg->add(new GeoIdentifierTag(4));
2931 pvEBarrelMotherNeg->add(pvIrBox);
2932
2933 GeoTransform* tfIrBoxR = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) *GeoTrf::Translate3D(-dxIron,PosY-dyIron,-PoZ2)
2934 * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2935 pvEBarrelMotherNeg->add(tfIrBoxR);
2936 pvEBarrelMotherNeg->add(pvIrBox);
2937
2938
2942
2943 GeoTransform* tfIrUp = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)
2944 * GeoTrf::Translate3D(PosXcut+dxIr,-PosYcut+dyIr,PoZ1)
2945 * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2946 pvEBarrelMotherNeg->add(tfIrUp);
2947 pvEBarrelMotherNeg->add(new GeoIdentifierTag(5));
2948 pvEBarrelMotherNeg->add(pvIrUp);
2949
2950 tfIrUp = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)
2951 * GeoTrf::Translate3D(-PosXcut-dxIr,-PosYcut+dyIr,PoZ1)
2952 * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2953 pvEBarrelMotherNeg->add(tfIrUp);
2954 pvEBarrelMotherNeg->add(pvIrUp);
2955
2956
2960
2961 GeoTransform* tfIrDw = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)
2962 * GeoTrf::Translate3D(PosXcut+dxIr,-PosYcut+dyIr,PoZ1)
2963 * GeoTrf::RotateZ3D(70.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2964 pvEBarrelMotherNeg->add(tfIrDw);
2965 pvEBarrelMotherNeg->add(new GeoIdentifierTag(6));
2966 pvEBarrelMotherNeg->add(pvIrDw);
2967
2968 tfIrDw = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)
2969 * GeoTrf::Translate3D(-PosXcut+dxIr,-PosYcut+dyIr,PoZ1)
2970 * GeoTrf::RotateZ3D(-70.*Gaudi::Units::deg) * GeoTrf::RotateX3D(90.*Gaudi::Units::deg) * GeoTrf::RotateZ3D(90.*Gaudi::Units::deg));
2971
2972 pvEBarrelMotherNeg->add(tfIrDw);
2973 pvEBarrelMotherNeg->add(pvIrDw);
2974 }
2975 }
2976
2977
2978
2979 ztrans = (-NegEndCrack - (dbManager->
GetEnvZLength()*Gaudi::Units::cm - EBFingerLengthNeg)/2 - 19.5)*(1./Gaudi::Units::cm);
2980
2981 GeoTransform* tfEBarrelMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) *
2982 GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi()*Gaudi::Units::deg));
2983
2984 (*m_log) << MSG::INFO <<
" Positioning negative ext.barrel with translation ztrans "<<ztrans*Gaudi::Units::cm<<
endmsg;
2985
2986 GeoNameTag* ntEBarrelMotherNeg = new GeoNameTag("EBarrelNeg");
2987
2988 pvTileEnvelopeNegEndcap->add(tfEBarrelMotherNeg);
2989 pvTileEnvelopeNegEndcap->add(ntEBarrelMotherNeg);
2990 pvTileEnvelopeNegEndcap->add(new GeoIdentifierTag(2));
2991 pvTileEnvelopeNegEndcap->add(pvEBarrelMotherNeg);
2992
2993 if (barrel_flag < 2) {
2994
2995
2996
2997 ztrans = (-NegEndExBarrel - EBFingerLengthPos/2)*(1./Gaudi::Units::cm);
2998
2999 GeoTransform* tfEFingerMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) *
3000 GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi() * Gaudi::Units::deg));
3001
3002 (*m_log) << MSG::INFO <<
" Positioning negative ext.barrel finger with translation ztrans= "<<ztrans*Gaudi::Units::cm<<
endmsg;
3003
3004 GeoNameTag* ntEFingerMotherNeg = new GeoNameTag("TileEFingerNeg");
3005
3006 pvTileEnvelopeNegEndcap->add(tfEFingerMotherNeg);
3007 pvTileEnvelopeNegEndcap->add(ntEFingerMotherNeg);
3008 pvTileEnvelopeNegEndcap->add(pvEFingerMotherNeg);
3009
3010
3011
3013 ztrans = (-NegEndExBarrel - DzSaddleSupport/2)*(1./Gaudi::Units::cm);
3014
3015 GeoTransform* tfESaddleMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) *
3016 GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi() * Gaudi::Units::deg));
3017
3018 (*m_log) << MSG::INFO <<" Positioning negative ext.barrel saddle with translation ztrans= "<<ztrans*Gaudi::Units::cm
3020
3021 GeoNameTag* ntESaddleMotherNeg = new GeoNameTag("TileESaddleNeg");
3022
3023 pvTileEnvelopeNegEndcap->add(tfESaddleMotherNeg);
3024 pvTileEnvelopeNegEndcap->add(ntESaddleMotherNeg);
3025 pvTileEnvelopeNegEndcap->add(pvESaddleMotherNeg);
3026 }
3027
3028 }
3029 }
3030
3031
3032
3033
3034
3035 if (EnvType == 5) {
3036
3037 if (barrel_flag < 3) {
3038
3040
3041 ztrans = PosEndBarrelFinger*(1./Gaudi::Units::cm) + dbManager->
TILBdzmodul()/2;
3042
3043
3044
3045
3046 (*m_log) << MSG::INFO <<
" Positioning positive ITC with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
3047
3048 GeoTransform* tfITCMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm) *
3049 GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi() * Gaudi::Units::deg));
3050
3051 GeoNameTag* ntITCMotherPos = new GeoNameTag("ITCPos");
3052
3053 pvTileEnvelopePosEndcap->add(tfITCMotherPos);
3054 pvTileEnvelopePosEndcap->add(ntITCMotherPos);
3055 pvTileEnvelopePosEndcap->add(pvITCMotherPos);
3056
3057 }
3058
3059 if (barrel_flag < 4) {
3060
3062 ztrans = PosBeginGap*(1./Gaudi::Units::cm) + dbManager->
TILBdzmodul()/2;
3063
3064 (*m_log) << MSG::INFO <<
" Positioning positive Gap with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
3065
3066 GeoTransform* tfGapMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)*
3067 GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi()*Gaudi::Units::deg));
3068
3069 GeoNameTag* ntGapMotherPos = new GeoNameTag("GapPos");
3070
3071 pvTileEnvelopePosEndcap->add(tfGapMotherPos);
3072 pvTileEnvelopePosEndcap->add(ntGapMotherPos);
3073 pvTileEnvelopePosEndcap->add(pvGapMotherPos);
3074
3075 }
3076
3077
3078 if (crack_flag<=0 || pvTileEnvelopePosCrack) {
3079
3081 ztrans = PosBeginCrack*(1./Gaudi::Units::cm) + dbManager->
TILBdzmodul()/2;
3082
3083 if (crack_flag<=0) {
3084 (*m_log) << MSG::INFO <<
" Positioning positive Crack with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
3085 } else if (crack_flag==1) {
3086 (*m_log) << MSG::INFO <<
" Positioning positive Crack in separate mother volume with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
3087 } else {
3089 (*m_log) << MSG::INFO <<
" Positioning positive Crack in " << pvTileEnvelopePosCrack->getLogVol()->getName() <<
" mother volume with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
3090 }
3091
3092 GeoTransform* tfCrackMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)*
3093 GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi()*Gaudi::Units::deg));
3094
3095 GeoNameTag* ntCrackMotherPos = new GeoNameTag("CrackPos");
3096
3097 if (crack_flag<=0) {
3098 pvTileEnvelopePosEndcap->add(tfCrackMotherPos);
3099 pvTileEnvelopePosEndcap->add(ntCrackMotherPos);
3100 pvTileEnvelopePosEndcap->add(pvCrackMotherPos);
3101 } else {
3102 pvTileEnvelopePosCrack->add(tfCrackMotherPos);
3103 pvTileEnvelopePosCrack->add(ntCrackMotherPos);
3104 pvTileEnvelopePosCrack->add(pvCrackMotherPos);
3105 }
3106 } else {
3107 (*m_log) << MSG::INFO <<
" Do not create positive Crack"<<
endmsg;
3108 }
3109
3110 }
3111
3112
3113
3114
3115
3116
3117 if (EnvType == 4) {
3118
3119 if (barrel_flag < 3) {
3120
3122 ztrans = -NegEndBarrelFinger*(1./Gaudi::Units::cm) - dbManager->
TILBdzmodul()/2;
3123
3124 (*m_log) << MSG::INFO <<
" Positioning negative ITC with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
3125
3126 GeoTransform* tfITCMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)*
3127 GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi()*Gaudi::Units::deg));
3128
3129 GeoNameTag* ntITCMotherNeg = new GeoNameTag("ITCNeg");
3130
3131 pvTileEnvelopeNegEndcap->add(tfITCMotherNeg);
3132 pvTileEnvelopeNegEndcap->add(ntITCMotherNeg);
3133 pvTileEnvelopeNegEndcap->add(pvITCMotherNeg);
3134
3135 }
3136
3137 if (barrel_flag < 4) {
3138
3140 ztrans = -NegBeginGap*(1./Gaudi::Units::cm) - dbManager->
TILBdzmodul()/2;
3141
3142 (*m_log) << MSG::INFO <<
" Positioning negative Gap with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
3143
3144 GeoTransform* tfGapMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)*
3145 GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi()*Gaudi::Units::deg));
3146
3147 GeoNameTag* ntGapMotherNeg = new GeoNameTag("GapNeg");
3148
3149 pvTileEnvelopeNegEndcap->add(tfGapMotherNeg);
3150 pvTileEnvelopeNegEndcap->add(ntGapMotherNeg);
3151 pvTileEnvelopeNegEndcap->add(pvGapMotherNeg);
3152
3153 }
3154
3155
3156 if (crack_flag<=0 || pvTileEnvelopeNegCrack) {
3157
3159 ztrans = -NegBeginCrack*(1./Gaudi::Units::cm) - dbManager->
TILBdzmodul()/2;
3160
3161 if (crack_flag<=0) {
3162 (*m_log) << MSG::INFO <<
" Positioning negative Crack with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
3163 } else if (crack_flag==1) {
3164 (*m_log) << MSG::INFO <<
" Positioning negative Crack in separate mother volume with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
3165 } else {
3167 (*m_log) << MSG::INFO <<
" Positioning positive Crack in " << pvTileEnvelopeNegCrack->getLogVol()->getName() <<
" mother volume with translation "<<ztrans*Gaudi::Units::cm<<
endmsg;
3168 }
3169
3170 GeoTransform* tfCrackMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*Gaudi::Units::cm)*
3171 GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi()*Gaudi::Units::deg));
3172
3173 GeoNameTag* ntCrackMotherNeg = new GeoNameTag("CrackNeg");
3174
3175 if (crack_flag<=0) {
3176 pvTileEnvelopeNegEndcap->add(tfCrackMotherNeg);
3177 pvTileEnvelopeNegEndcap->add(ntCrackMotherNeg);
3178 pvTileEnvelopeNegEndcap->add(pvCrackMotherNeg);
3179 } else {
3180 pvTileEnvelopeNegCrack->add(tfCrackMotherNeg);
3181 pvTileEnvelopeNegCrack->add(ntCrackMotherNeg);
3182 pvTileEnvelopeNegCrack->add(pvCrackMotherNeg);
3183 }
3184 } else {
3185 (*m_log) << MSG::INFO <<
" Do not create negative Crack"<<
endmsg;
3186 }
3187
3188 }
3189 }
3190
3191
3192
3193
3194
3195 if (barrel_flag<4 || (barrel_flag==4 && crack_flag<2) ) {
3196
3197 (*m_log) << MSG::DEBUG <<
"Creating descriptors for " << dbManager->
GetNumberOfEnv() <<
" envelopes..." <<
endmsg;
3198
3199 int nModulesInSection[6] = {0,0,0,0,0,0};
3200 double zShiftInSection[6] = {0.0,0.0,0.0,0.0,0.0,0.0,};
3201
3202
3203 for (
int EnvCounter = 0; EnvCounter < dbManager->
GetNumberOfEnv(); ++EnvCounter) {
3204
3208 double Zshift = dbManager->
GetEnvZShift()*Gaudi::Units::cm;
3209
3210 if (
m_log->level()<=MSG::DEBUG)
3211 (*m_log) << MSG::DEBUG
3212 << " EnvCounter is " << EnvCounter
3213 << " EnvType is " << EnvType
3214 << " Zshift is " << Zshift*(1./Gaudi::Units::cm) << " cm"
3216
3217
3218 if (EnvType == 1 || EnvType == 0) {
3219 nModulesInSection[0] = nModulesInSection[1] = NumberOfMod;
3220 zShiftInSection[0] = zShiftInSection[1] = Zshift;
3221 } else if (EnvType < 6) {
3222 nModulesInSection[EnvType] = NumberOfMod;
3223 zShiftInSection[EnvType] = Zshift;
3224 }
3225 }
3226
3228
3231 int side[6] = {0,1,0,1,0,1};
3232
3233
3234 (*m_log) << MSG::DEBUG <<
"Loop over Tile detector regions, and call computeCellDim() when needed..." <<
endmsg;
3235 for (int ii=0; ii<6; ++ii) {
3236
3237 (*m_log) << MSG::DEBUG <<
"ii: " << ii <<
", region: " << dete[ii] <<
endmsg;
3238
3239 if (ii%2 == 0) {
3240 (*m_log) << MSG::DEBUG <<
"ii: " << ii <<
", region: " << dete[ii] <<
" --> calling computeCellDim()..." <<
endmsg;
3243 zShiftInSection[ii+1],
3244 zShiftInSection[ii]);
3245 }
3246
3247 (*m_log) << MSG::DEBUG <<
"calling fillDescriptor()..." <<
endmsg;
3248 TileDetDescriptor* descriptor = new TileDetDescriptor();
3252 nModulesInSection[ii],
3253 zShiftInSection[ii]);
3254
3255 (*m_log) << MSG::DEBUG <<
"Get an Identifier for the region and add it to the detectorManager..." <<
endmsg;
3256 Identifier idRegion = tileID->
region_id(ii);
3257 descriptor->
set(idRegion);
3260 }
3261 }
3262
3263
3264 GeoNameTag *
nTag =
new GeoNameTag(
"Tile");
3265
3266 if (BAR && barrel_flag<1) {
3267 world->add(nTag);
3268
3269
3271 GeoTrf::Transform3D
mz = GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi());
3272 GeoTrf::Transform3D
my = GeoTrf::RotateY3D(dbManager->
GetEnvDTheta());
3273 GeoTrf::Transform3D
mx = GeoTrf::RotateZ3D(dbManager->
GetEnvDPsi());
3274 GeoTrf::Transform3D vpos = GeoTrf::Translate3D(dbManager->
GetEnvDX()*Gaudi::Units::cm,dbManager->
GetEnvDY()*Gaudi::Units::cm,dbManager->
GetEnvDZ()*Gaudi::Units::cm);
3275 GeoTransform* barrelTT = new GeoTransform(GeoTrf::Transform3D(vpos*(mx*(my*(mz)))));
3276
3277 (*m_log) << MSG::INFO << " Global positioning of barrel with rotation ("
3280 <<
") Gaudi::Units::cm" <<
endmsg;
3281
3282 world->add(barrelTT);
3283 world->add(pvTileEnvelopeBarrel);
3285 }
3286
3287 if (EBA && eb_flag) {
3288 world->add(nTag);
3289
3290
3292 GeoTrf::Transform3D
mz = GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi());
3293 GeoTrf::Transform3D
my = GeoTrf::RotateY3D(dbManager->
GetEnvDTheta());
3294 GeoTrf::Transform3D
mx = GeoTrf::RotateZ3D(dbManager->
GetEnvDPsi());
3295 GeoTrf::Transform3D vpos = GeoTrf::Translate3D(dbManager->
GetEnvDX()*Gaudi::Units::cm,dbManager->
GetEnvDY()*Gaudi::Units::cm,dbManager->
GetEnvDZ()*Gaudi::Units::cm);
3296 GeoTransform* posEcTT = new GeoTransform(GeoTrf::Transform3D(vpos*(mx*(my*(mz)))));
3297
3298 (*m_log) << MSG::INFO << " Global positioning of positive ext.barrel with rotation ("
3301 <<
") Gaudi::Units::cm" <<
endmsg;
3302
3303 world->add(posEcTT);
3304 world->add(pvTileEnvelopePosEndcap);
3306 }
3307
3308 if (EBC && eb_flag) {
3309 world->add(nTag);
3310
3311
3313 GeoTrf::Transform3D
mz = GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi());
3314 GeoTrf::Transform3D
my = GeoTrf::RotateY3D(dbManager->
GetEnvDTheta());
3315 GeoTrf::Transform3D
mx = GeoTrf::RotateZ3D(dbManager->
GetEnvDPsi());
3316 GeoTrf::Transform3D vpos = GeoTrf::Translate3D(dbManager->
GetEnvDX()*Gaudi::Units::cm,dbManager->
GetEnvDY()*Gaudi::Units::cm,dbManager->
GetEnvDZ()*Gaudi::Units::cm);
3317 GeoTransform* negEcTT = new GeoTransform(GeoTrf::Transform3D(vpos*(mx*(my*(mz)))));
3318
3319 (*m_log) << MSG::INFO << " Global positioning of negative ext.barrel with rotation ("
3322 <<
") Gaudi::Units::cm" <<
endmsg;
3323
3324 world->add(negEcTT);
3325 world->add(pvTileEnvelopeNegEndcap);
3327
3328 }
3329
3330 if (crack_flag==1) {
3331
3332
3333 if (EBA && pvTileEnvelopePosCrack) {
3334
3335 world->add(nTag);
3336
3337
3339 GeoTrf::Transform3D
mz = GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi());
3340 GeoTrf::Transform3D
my = GeoTrf::RotateY3D(dbManager->
GetEnvDTheta());
3341 GeoTrf::Transform3D
mx = GeoTrf::RotateZ3D(dbManager->
GetEnvDPsi());
3342 GeoTrf::Transform3D vpos = GeoTrf::Translate3D(dbManager->
GetEnvDX()*Gaudi::Units::cm,dbManager->
GetEnvDY()*Gaudi::Units::cm,dbManager->
GetEnvDZ()*Gaudi::Units::cm);
3343 GeoTransform* posCrackTT = new GeoTransform(GeoTrf::Transform3D(vpos*(mx*(my*(mz)))));
3344
3345 (*m_log) << MSG::INFO << " Global positioning of positive Crack with rotation ("
3348 <<
") Gaudi::Units::cm" <<
endmsg;
3349
3350 world->add(posCrackTT);
3351 world->add(pvTileEnvelopePosCrack);
3353
3354 }
3355
3356
3357 if (EBC && pvTileEnvelopeNegCrack) {
3358
3359 world->add(nTag);
3360
3361
3363 GeoTrf::Transform3D
mz = GeoTrf::RotateZ3D(dbManager->
GetEnvDPhi());
3364 GeoTrf::Transform3D
my = GeoTrf::RotateY3D(dbManager->
GetEnvDTheta());
3365 GeoTrf::Transform3D
mx = GeoTrf::RotateZ3D(dbManager->
GetEnvDPsi());
3366 GeoTrf::Transform3D vpos = GeoTrf::Translate3D(dbManager->
GetEnvDX()*Gaudi::Units::cm,dbManager->
GetEnvDY()*Gaudi::Units::cm,dbManager->
GetEnvDZ()*Gaudi::Units::cm);
3367 GeoTransform* negCrackTT = new GeoTransform(GeoTrf::Transform3D(vpos*(mx*(my*(mz)))));
3368
3369 (*m_log) << MSG::INFO << " Global positioning of negative Crack with rotation ("
3372 <<
") Gaudi::Units::cm" <<
endmsg;
3373
3374 world->add(negCrackTT);
3375 world->add(pvTileEnvelopeNegCrack);
3377 }
3378
3379 }
3380
3381 delete sectionBuilder;
3382
3383
3384}
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
Scalar phi() const
phi method
GeoVolumeVec_t geoGetVolumes(const GeoGraphNode *node, int depthLimit=1, int sizeHint=20)
Return the child volumes and associated transforms.
std::vector< std::pair< const GeoVPhysVol *, GeoTrf::Transform3D > > GeoVolumeVec_t
Return the child volumes and associated transforms.
#define TILE_REGION_CENTRAL
#define TILE_REGION_EXTENDED
virtual const GeoMaterial * getMaterial(const std::string &name)=0
void checking(const std::string &VolumeName, bool print, int level, double X1, double X2, double Y1, double Y2, double Z)
Function for checking empty volumes:
double TILBrminimal() const
double TILBdzend1() const
int GetNumberOfEnv() const
int SetCurrentModuleByIndex(unsigned int Id)
double DzSaddleSupport() const
int SetCurrentTifg(int section)
double GetEnvDPhi() const
unsigned int GetModTypeSize() const
double TILBzoffset() const
int SetCurrentCuts(const std::string &input)
Fields of CUTS structure (see also Oracle comments):
int SetCurrentSaddle(unsigned int index)
Fields of SADDLE structure (see also Oracle comments):
double GetEnvZShift() const
double TILBdzspac() const
double GetEnvDTheta() const
int GetEnvNModules() const
double TILBdzend2() const
double GetEnvDPsi() const
double TILEzshift() const
int SetCurrentEnvByIndex(unsigned int envelope)
int SetCurrentSectionByNumber(unsigned int section)
double GetEnvZLength() const
int SetCurrentSection(unsigned int section, bool print=true)
double TILBdzmast() const
int TILBfingpattern() const
double RadiusSaddle() const
double TILBdzmodul() const
int SetCurrentEnvByType(unsigned int envelope)
double GetEnvRout() const
double TILBrmaximal() const
void set(const Identifier &id)
void fillFinger(PVLink &mother, int sec_number, double tile_rmax, double tilb_rmax, double delta_phi_not_used, bool testbeam, int ModuleNcp=0, double corrected_dz=0.)
Finger parameters are the following:
void setBarrelGlue(double val)
void setBarrelPeriodThickness(double val)
void fillDescriptor(TileDetDescriptor *&descriptor, unsigned int detector, int side, bool testbeam, bool addPlates, unsigned int nphi, float zshift)
Readout Descriptor parameters are the following:
void computeCellDim(TileDetDescrManager *&manager, int detector, bool addPlates, float zShiftPos, float zShiftNeg)
Cell dimension parameters are the following:
void setExtendedPeriodThickness(double val)
void fillSection(PVLink &mother, int sec_number, double tile_rmax, double rminb, double dzglue, double delta_phi, int ModuleNcp=0, double zlen_itc2=0., bool neg=false)
Section parameters are the following:
Identifier region_id(int index) const
build single region, module, tower, cell, pmt, adc identifiers