346 std::map<std::string, unsigned int> tubeMap;
347 for (
unsigned int i=0;
i<BarrelDMTubes->size();
i++)
349 const std::string&
key = (*BarrelDMTubes)[
i]->getString(
"TUBENAME");
352 std::map<std::string, unsigned int> boxMap;
353 for (
unsigned int j=0; j<BarrelDMBoxes->size(); j++)
355 const std::string&
key = (*BarrelDMBoxes)[j]->getString(
"BOXNAME");
358 std::map<std::string, unsigned int> trdMap;
359 for (
unsigned int k=0;
k<BarrelDMTrds->size();
k++)
361 const std::string&
key = (*BarrelDMTrds)[
k]->getString(
"TRDNAME");
364 std::map<std::string, unsigned int> trapMap;
365 for (
unsigned int l=0;
l<BarrelDMTraps->size();
l++)
367 const std::string&
key = (*BarrelDMTraps)[
l]->getString(
"TRAPNAME");
371 unsigned int recordIndex;
374 const GeoMaterial *alu = materialManager->
getMaterial(
"std::Aluminium");
375 const GeoMaterial* matBoardsEnvelope = materialManager->
getMaterial(
"LAr::BoardsEnvelope");
376 const GeoMaterial* matLArServices1 = materialManager->
getMaterial(
"LAr::LArServices1");
377 const GeoMaterial* matLArServices2 = materialManager->
getMaterial(
"LAr::LArServices2");
378 const GeoMaterial* matLArServices3 = materialManager->
getMaterial(
"LAr::LArServices3");
379 const GeoMaterial* matLArServices4 = materialManager->
getMaterial(
"LAr::LArServices4");
380 const GeoMaterial* matLArServices5 = materialManager->
getMaterial(
"LAr::LArServices5");
381 const GeoMaterial* matLArServices6 = materialManager->
getMaterial(
"LAr::LArServices6");
382 const GeoMaterial* matLArServices7 = materialManager->
getMaterial(
"LAr::LArServices7");
383 const GeoMaterial* matLArServices8 = materialManager->
getMaterial(
"LAr::LArServices8");
384 const GeoMaterial* matLArServices9 = materialManager->
getMaterial(
"LAr::LArServices9");
385 const GeoMaterial* matLArServices10 = materialManager->
getMaterial(
"LAr::LArServices10");
386 const GeoMaterial* matLArServices11 = materialManager->
getMaterial(
"LAr::LArServices11");
387 const GeoMaterial* matLArServices12 = materialManager->
getMaterial(
"LAr::LArServices12");
388 const GeoMaterial* matLArServices13 = materialManager->
getMaterial(
"LAr::LArServices13");
389 const GeoMaterial* matLArServices14 = materialManager->
getMaterial(
"LAr::LArServices14");
390 const GeoMaterial* matLArServices15 = materialManager->
getMaterial(
"LAr::LArServices15");
391 const GeoMaterial* matLArServices16 = materialManager->
getMaterial(
"LAr::LArServices16");
393 const double inv_Endab = 1. / (Endb - Enda);
395 GENFUNCTION
f = Alfa*
i;
399 recordIndex = tubeMap[
"Ped2"];
400 double ped2zhlen = (*BarrelDMTubes)[recordIndex]->getDouble(
"ZHLEN");
401 double ped2minr = (*BarrelDMTubes)[recordIndex]->getDouble(
"MINR");
402 double ped2maxr = (*BarrelDMTubes)[recordIndex]->getDouble(
"MAXR");
403 double ped2ytr = (*BarrelDMTubes)[recordIndex]->getDouble(
"YTR");
404 recordIndex = tubeMap[
"Ped3"];
405 double ped3zhlen = (*BarrelDMTubes)[recordIndex]->getDouble(
"ZHLEN");
406 double ped3minr = (*BarrelDMTubes)[recordIndex]->getDouble(
"MINR");
407 double ped3maxr = (*BarrelDMTubes)[recordIndex]->getDouble(
"MAXR");
408 double ped3xtr = (*BarrelDMTubes)[recordIndex]->getDouble(
"XTR");
410 recordIndex = boxMap[
"Pedest"];
411 double pedesthlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
412 double pedesthwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
413 double pedesthhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
414 double pedestxtr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"XTR");
415 double pedestztr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"ZTR");
416 recordIndex = boxMap[
"Ped1"];
417 double ped1hlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
418 double ped1hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
419 double ped1hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
420 recordIndex = boxMap[
"Crate1"];
421 double crate1hlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
422 double crate1hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
423 double crate1hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
424 double crate1xtr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"XTR");
425 double crate1ztr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"ZTR");
426 recordIndex = boxMap[
"Crate2"];
427 double crate2hlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
428 double crate2hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
429 double crate2hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
430 recordIndex = boxMap[
"Crate3"];
431 double crate3hlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
432 double crate3hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
433 double crate3hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
434 double crate3xtr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"XTR");
435 recordIndex = boxMap[
"BoardE"];
436 double BoardEhlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
437 double BoardEhwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
438 double BoardEhhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
439 double BoardExtr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"XTR");
440 double BoardEytr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"YTR");
441 double BoardEztr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"ZTR");
442 recordIndex = boxMap[
"Box"];
443 double Boxhlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
444 double Boxhwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
445 double Boxhhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
446 double Boxxtr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"XTR");
447 double Boxytr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"YTR");
448 double Boxxrot = (*BarrelDMBoxes)[recordIndex]->getDouble(
"XROT");
451 GeoBox *Pedestal =
new GeoBox(pedesthlen, pedesthwdt, pedesthhgt);
452 GeoBox *Ped1 =
new GeoBox(ped1hlen, ped1hwdt, ped1hhgt);
453 GeoTube *Ped2 =
new GeoTube(ped2minr, ped2maxr, ped2zhlen);
454 GeoTube *Ped3 =
new GeoTube(ped3minr,ped3maxr , ped3zhlen);
455 const GeoShape & CratePed=((*Pedestal).subtract(*Ped1).
456 subtract((*Ped2) <<GeoTrf::TranslateY3D(-ped2ytr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg)).
457 subtract((*Ped3) <<GeoTrf::TranslateX3D(-ped3xtr)).
458 subtract((*Ped2) <<GeoTrf::TranslateY3D(ped2ytr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg)));
460 GeoLogVol *lvped =
new GeoLogVol(
"LAr::DM::Ped",&CratePed,alu);
461 GeoPhysVol *pedestal =
new GeoPhysVol(lvped);
464 GeoBox *Crate1 =
new GeoBox(crate1hlen, crate1hwdt, crate1hhgt);
465 GeoBox *Crate2 =
new GeoBox(crate2hlen, crate2hwdt, crate2hhgt);
466 GeoBox *Crate3 =
new GeoBox(crate3hlen, crate3hwdt, crate3hhgt);
467 const GeoShape & FEBCrate=(*Crate1).subtract(*Crate2).add((*Crate3) <<GeoTrf::TranslateX3D(-crate3xtr));
469 GeoLogVol *lvcrate =
new GeoLogVol(
"LAr::DM::Crate",&FEBCrate,alu);
470 GeoPhysVol *crate =
new GeoPhysVol(lvcrate);
473 GeoBox *BoardEnvelope =
new GeoBox(BoardEhlen, BoardEhwdt, BoardEhhgt);
474 GeoLogVol *lvbenv =
new GeoLogVol(
"LAr::DM::FEBoard",BoardEnvelope,matBoardsEnvelope);
475 GeoPhysVol *boardenvelope =
new GeoPhysVol(lvbenv);
480 TRANSFUNCTION crA = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateX3D(crate1xtr)*GeoTrf::TranslateZ3D(crate1ztr);
481 TRANSFUNCTION crC = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateX3D(crate1xtr)*GeoTrf::TranslateZ3D(-crate1ztr);
482 GeoSerialTransformer *crtA =
new GeoSerialTransformer(crate,&crA, NCrates);
483 GeoSerialTransformer *crtC =
new GeoSerialTransformer(crate,&crC, NCrates);
488 TRANSFUNCTION pedA = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateX3D(pedestxtr)*GeoTrf::TranslateZ3D(pedestztr);
489 TRANSFUNCTION pedC = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateX3D(pedestxtr)*GeoTrf::TranslateZ3D(-pedestztr);
490 GeoSerialTransformer *pedtA =
new GeoSerialTransformer(pedestal,&pedA, NCrates);
491 GeoSerialTransformer *pedtC =
new GeoSerialTransformer(pedestal,&pedC, NCrates);
492 envelope->add(pedtA);
493 envelope->add(pedtC);
496 TRANSFUNCTION feb1A = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateY3D(BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(BoardEztr);
497 TRANSFUNCTION feb2A = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateY3D(-BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(BoardEztr);
498 TRANSFUNCTION feb1C = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateY3D(BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(-BoardEztr);
499 TRANSFUNCTION feb2C = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateY3D(-BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(-BoardEztr);
500 GeoSerialTransformer *febt1A =
new GeoSerialTransformer(boardenvelope,&feb1A, NCrates);
501 GeoSerialTransformer *febt1C =
new GeoSerialTransformer(boardenvelope,&feb1C, NCrates);
502 GeoSerialTransformer *febt2A =
new GeoSerialTransformer(boardenvelope,&feb2A, NCrates);
503 GeoSerialTransformer *febt2C =
new GeoSerialTransformer(boardenvelope,&feb2C, NCrates);
504 envelope->add(febt1A);
505 envelope->add(febt1C);
506 envelope->add(febt2A);
507 envelope->add(febt2C);
510 recordIndex = trdMap[
"SecP"];
511 double SecPxhlen1 = (*BarrelDMTrds)[recordIndex]->getDouble(
"XHLEN1");
512 double SecPxhlen2 = (*BarrelDMTrds)[recordIndex]->getDouble(
"XHLEN2");
513 double SecPyhlen1 = (*BarrelDMTrds)[recordIndex]->getDouble(
"YHLEN1");
514 double SecPyhlen2 = (*BarrelDMTrds)[recordIndex]->getDouble(
"YHLEN2");
515 double SecPzhlen = (*BarrelDMTrds)[recordIndex]->getDouble(
"ZHLEN");
516 double SecPxtr = (*BarrelDMTrds)[recordIndex]->getDouble(
"XTR");
517 double SecPztr = (*BarrelDMTrds)[recordIndex]->getDouble(
"ZTR");
518 recordIndex = trdMap[
"BaseP"];
519 double BasePxhlen1 = (*BarrelDMTrds)[recordIndex]->getDouble(
"XHLEN1");
520 double BasePxhlen2 = (*BarrelDMTrds)[recordIndex]->getDouble(
"XHLEN2");
521 double BasePyhlen1 = (*BarrelDMTrds)[recordIndex]->getDouble(
"YHLEN1");
522 double BasePyhlen2 = (*BarrelDMTrds)[recordIndex]->getDouble(
"YHLEN2");
523 double BasePzhlen = (*BarrelDMTrds)[recordIndex]->getDouble(
"ZHLEN");
524 double BasePxtr = (*BarrelDMTrds)[recordIndex]->getDouble(
"XTR");
525 double BasePztr = (*BarrelDMTrds)[recordIndex]->getDouble(
"ZTR");
526 recordIndex = trdMap[
"SecE1"];
527 double SecE1xhlen1 = (*BarrelDMTrds)[recordIndex]->getDouble(
"XHLEN1");
528 double SecE1xhlen2 = (*BarrelDMTrds)[recordIndex]->getDouble(
"XHLEN2");
529 double SecE1ztr = (*BarrelDMTrds)[recordIndex]->getDouble(
"ZTR");
530 recordIndex = trapMap[
"BridgeP"];
531 double BridgePzhlen = (*BarrelDMTraps)[recordIndex]->getDouble(
"ZHLEN");
532 double BridgePtheta = (*BarrelDMTraps)[recordIndex]->getDouble(
"THETA");
533 double BridgePphi = (*BarrelDMTraps)[recordIndex]->getDouble(
"PHI");
534 double BridgePyzn = (*BarrelDMTraps)[recordIndex]->getDouble(
"YZN");
535 double BridgePxynzn = (*BarrelDMTraps)[recordIndex]->getDouble(
"XYNZN");
536 double BridgePxypzn = (*BarrelDMTraps)[recordIndex]->getDouble(
"XYPZN");
537 double BridgePangn = (*BarrelDMTraps)[recordIndex]->getDouble(
"ANGN");
538 double BridgePyzp = (*BarrelDMTraps)[recordIndex]->getDouble(
"YZP");
539 double BridgePxynzp = (*BarrelDMTraps)[recordIndex]->getDouble(
"XYNZP");
540 double BridgePxypzp = (*BarrelDMTraps)[recordIndex]->getDouble(
"XYPZP");
541 double BridgePangp = (*BarrelDMTraps)[recordIndex]->getDouble(
"ANGP");
542 double BridgePxtr = (*BarrelDMTraps)[recordIndex]->getDouble(
"XTR");
543 double BridgePztr = (*BarrelDMTraps)[recordIndex]->getDouble(
"ZTR");
546 GeoBox *
Box =
new GeoBox(Boxhlen, Boxhwdt, Boxhhgt);
553 GeoTrd *Trdair1 =
new GeoTrd(SecE1xhlen1, SecE1xhlen2, DYa, DYb, (Endb-Enda)/2);
555 GeoLogVol *lvse1g1 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g1",Trdair1,matLArServices1);
556 GeoPhysVol *sectorenvelopes1g1 =
new GeoPhysVol(lvse1g1);
558 GeoLogVol *lvse1g2 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g3",Trdair1,matLArServices2);
559 GeoPhysVol *sectorenvelopes1g2 =
new GeoPhysVol(lvse1g2);
561 GeoLogVol *lvse1g3 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g3",Trdair1,matLArServices3);
562 GeoPhysVol *sectorenvelopes1g3 =
new GeoPhysVol(lvse1g3);
564 GeoLogVol *lvse1g4 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g4",Trdair1,matLArServices4);
565 GeoPhysVol *sectorenvelopes1g4 =
new GeoPhysVol(lvse1g4);
567 GeoLogVol *lvse1g5 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g5",Trdair1,matLArServices5);
568 GeoPhysVol *sectorenvelopes1g5 =
new GeoPhysVol(lvse1g5);
570 GeoLogVol *lvse1g6 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g6",Trdair1,matLArServices6);
571 GeoPhysVol *sectorenvelopes1g6 =
new GeoPhysVol(lvse1g6);
573 GeoLogVol *lvse1g7 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g7",Trdair1,matLArServices7);
574 GeoPhysVol *sectorenvelopes1g7 =
new GeoPhysVol(lvse1g7);
576 GeoLogVol *lvse1g8 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g8",Trdair1,matLArServices8);
577 GeoPhysVol *sectorenvelopes1g8 =
new GeoPhysVol(lvse1g8);
579 GeoLogVol *lvse1g9 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g9",Trdair1,matLArServices9);
580 GeoPhysVol *sectorenvelopes1g9 =
new GeoPhysVol(lvse1g9);
582 GeoLogVol *lvse1g10 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g10",Trdair1,matLArServices10);
583 GeoPhysVol *sectorenvelopes1g10 =
new GeoPhysVol(lvse1g10);
585 GeoLogVol *lvse1g11 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g11",Trdair1,matLArServices11);
586 GeoPhysVol *sectorenvelopes1g11 =
new GeoPhysVol(lvse1g11);
588 GeoLogVol *lvse1g12 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g12",Trdair1,matLArServices12);
589 GeoPhysVol *sectorenvelopes1g12 =
new GeoPhysVol(lvse1g12);
591 GeoLogVol *lvse1g13 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g13",Trdair1,matLArServices13);
592 GeoPhysVol *sectorenvelopes1g13 =
new GeoPhysVol(lvse1g13);
594 GeoLogVol *lvse1g14 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g14",Trdair1,matLArServices14);
595 GeoPhysVol *sectorenvelopes1g14 =
new GeoPhysVol(lvse1g14);
597 GeoLogVol *lvse1g15 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g15",Trdair1,matLArServices15);
598 GeoPhysVol *sectorenvelopes1g15 =
new GeoPhysVol(lvse1g15);
600 GeoLogVol *lvse1g16 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g16",Trdair1,matLArServices16);
601 GeoPhysVol *sectorenvelopes1g16 =
new GeoPhysVol(lvse1g16);
604 std::vector<GeoPhysVol*> se1List;
605 se1List.push_back(sectorenvelopes1g1);
606 se1List.push_back(sectorenvelopes1g2);
607 se1List.push_back(sectorenvelopes1g3);
608 se1List.push_back(sectorenvelopes1g4);
609 se1List.push_back(sectorenvelopes1g5);
610 se1List.push_back(sectorenvelopes1g6);
611 se1List.push_back(sectorenvelopes1g7);
612 se1List.push_back(sectorenvelopes1g8);
613 se1List.push_back(sectorenvelopes1g9);
614 se1List.push_back(sectorenvelopes1g10);
615 se1List.push_back(sectorenvelopes1g11);
616 se1List.push_back(sectorenvelopes1g12);
617 se1List.push_back(sectorenvelopes1g13);
618 se1List.push_back(sectorenvelopes1g14);
619 se1List.push_back(sectorenvelopes1g15);
620 se1List.push_back(sectorenvelopes1g16);
625 for (
unsigned int i=0;
i<BarrelDMRing->size();
i++) {
626 double etaMin=(*BarrelDMRing)[
i]->getDouble(
"ETAMIN");
627 double etaMax=(*BarrelDMRing)[
i]->getDouble(
"ETAMAX");
628 double thicknessExtra=(*BarrelDMRing)[
i]->getDouble(
"THICKNESS");
629 std::string ringName =
"LAr::DM::SectorEnvelopes1::"+(*BarrelDMRing)[
i]->getString(
"RINGNAME");
631 double radiusMin=SecE1ztr/sinh(
etaMax);
632 double radiusMax=SecE1ztr/sinh(
etaMin);
633 double dy1 = DYa + (DYb-DYa)*(radiusMin-Enda)*inv_Endab;
634 double dy2 = DYa + (DYb-DYa)*(radiusMax-Enda)*inv_Endab;
635 double zpos=0.5*(radiusMax+radiusMin - (Endb+Enda));
636 const GeoMaterial *matExtraTdr = materialManager->
getMaterial((*BarrelDMRing)[
i]->getString(
"MATERIAL"));
638 GeoTrd *extraMatTdr =
new GeoTrd(thicknessExtra/2., thicknessExtra/2., dy1, dy2, (radiusMax-radiusMin)/2);
639 GeoLogVol *extraMatLog =
new GeoLogVol(ringName,extraMatTdr,matExtraTdr);
640 GeoPhysVol *extraMatPhys =
new GeoPhysVol(extraMatLog);
641 for (
unsigned int isect=0;isect<se1List.size();isect++) {
642 se1List[isect]->add(
new GeoTransform(GeoTrf::TranslateZ3D(zpos)));
643 se1List[isect]->add(extraMatPhys);
649 for (
unsigned int i=0;
i<BarrelDMPhiBox->size();
i++) {
650 double eta=(*BarrelDMPhiBox)[
i]->getDouble(
"ETA");
651 double phi0=(*BarrelDMPhiBox)[
i]->getDouble(
"PHI0");
652 double deltaR=(*BarrelDMPhiBox)[
i]->getDouble(
"DELTAR");
653 double deltaRphi=(*BarrelDMPhiBox)[
i]->getDouble(
"DELTARPHI");
654 double thickness=(*BarrelDMPhiBox)[
i]->getDouble(
"THICKNESS");
655 int nphi=(*BarrelDMPhiBox)[
i]->getInt(
"NPHI");
656 int noHorizontal = (*BarrelDMPhiBox)[
i]->getInt(
"NOHORIZ");
658 const GeoMaterial* matExtraPPF1 = materialManager->
getMaterial((*BarrelDMPhiBox)[
i]->getString(
"MATERIAL"));
659 std::string boxName =
"LAr::DM::SectorEnvelopes1::"+(*BarrelDMPhiBox)[
i]->getString(
"BOXNAME");
661 GeoBox *ppf1Box =
new GeoBox(thickness/2.,deltaRphi/2.,
deltaR/2.);
662 GeoLogVol *ppf1Log =
new GeoLogVol(boxName,ppf1Box,matExtraPPF1);
663 GeoPhysVol *ppf1Phys =
new GeoPhysVol(ppf1Log);
665 int nPerEnv1 = nphi/NCrates;
668 for (
int iphi=0;iphi<nPerEnv1;iphi++) {
671 double zpos=
radius*
cos(
phi0+((
float)(iphi))*dphi) - (Endb+Enda)/2.;
672 for (
unsigned int isect=0;isect<se1List.size();isect++) {
674 if (noHorizontal>0 && ((isect==7 && iphi==1) || (isect==8 && iphi==0) || (isect==15 && iphi==1) || (isect==0 && iphi==0) ) )
continue;
675 se1List[isect]->add(
new GeoTransform(GeoTrf::Translate3D(xpos,ypos,zpos)));
676 se1List[isect]->add(ppf1Phys);
682 GeoTrd *Trd1alu =
new GeoTrd(BasePxhlen1, BasePxhlen2, BasePyhlen1, BasePyhlen2, BasePzhlen);
683 GeoLogVol *lvbp =
new GeoLogVol(
"LAr::DM::BasePlates",Trd1alu,alu);
684 GeoPhysVol *baseplates =
new GeoPhysVol(lvbp);
687 GeoTrap *Trapalu =
new GeoTrap(BridgePzhlen, BridgePtheta*
Gaudi::Units::deg, BridgePphi, BridgePyzn, BridgePxynzn, BridgePxypzn, BridgePangn, BridgePyzp, BridgePxynzp, BridgePxypzp, BridgePangp);
688 GeoLogVol *lvbrp =
new GeoLogVol(
"LAr::DM::BridgePlates",Trapalu,alu);
689 GeoPhysVol *bridgeplates =
new GeoPhysVol(lvbrp);
693 GeoTrd *Trd2alu =
new GeoTrd(SecPxhlen1, SecPxhlen2, SecPyhlen1, SecPyhlen2, SecPzhlen );
694 const GeoShape & SectorPlates= ((*Trd2alu).
697 GeoLogVol *lvsp =
new GeoLogVol(
"LAr::DM::SectorPlates",&SectorPlates,alu);
698 GeoPhysVol *sectorplates =
new GeoPhysVol(lvsp);
704 TRANSFUNCTION spA = Pow(GeoTrf::RotateZ3D(1.0),
f-(Alfa/2))*GeoTrf::TranslateX3D(SecPxtr)*GeoTrf::TranslateZ3D(SecPztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
705 TRANSFUNCTION spC = Pow(GeoTrf::RotateZ3D(1.0),
f+(Alfa/2))*GeoTrf::TranslateX3D(SecPxtr)*GeoTrf::TranslateZ3D(-SecPztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
706 GeoSerialTransformer *sptA =
new GeoSerialTransformer(sectorplates,&spA, NCrates);
707 GeoSerialTransformer *sptC =
new GeoSerialTransformer(sectorplates,&spC, NCrates);
715 TRANSFUNCTION brpC2 = Pow(GeoTrf::RotateZ3D(1.0),
f+(13*Alfa/2))*GeoTrf::TranslateX3D(BridgePxtr)*GeoTrf::TranslateZ3D(-BridgePztr)*GeoTrf::RotateZ3D(-90*
Gaudi::Units::deg)*GeoTrf::RotateY3D(-90*
Gaudi::Units::deg)*GeoTrf::RotateX3D(-90*
Gaudi::Units::deg); GeoSerialTransformer *brptA1 =
new GeoSerialTransformer(bridgeplates,&brpA1, 5);
716 GeoSerialTransformer *brptA2 =
new GeoSerialTransformer(bridgeplates,&brpA2, 5);
717 GeoSerialTransformer *brptC1 =
new GeoSerialTransformer(bridgeplates,&brpC1, 5);
718 GeoSerialTransformer *brptC2 =
new GeoSerialTransformer(bridgeplates,&brpC2, 5);
719 envelope->add(brptA1);
720 envelope->add(brptA2);
721 envelope->add(brptC1);
722 envelope->add(brptC2);
725 TRANSFUNCTION bpA = Pow(GeoTrf::RotateZ3D(1.0),
f-(Alfa/2))*GeoTrf::TranslateX3D(BasePxtr)*GeoTrf::TranslateZ3D(BasePztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
726 TRANSFUNCTION bpC = Pow(GeoTrf::RotateZ3D(1.0),
f+(Alfa/2))*GeoTrf::TranslateX3D(BasePxtr)*GeoTrf::TranslateZ3D(-BasePztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
727 GeoSerialTransformer *bptA =
new GeoSerialTransformer(baseplates,&bpA, NCrates);
728 GeoSerialTransformer *bptC =
new GeoSerialTransformer(baseplates,&bpC, NCrates);
734 TRANSFUNCTION seA1G5 = Pow(GeoTrf::RotateZ3D(1.0),
f+(9*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
735 TRANSFUNCTION seC1G5 = Pow(GeoTrf::RotateZ3D(1.0),
f+(9*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
736 TRANSFUNCTION seA1G6 = Pow(GeoTrf::RotateZ3D(1.0),
f+(11*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
737 TRANSFUNCTION seC1G6 = Pow(GeoTrf::RotateZ3D(1.0),
f+(11*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
738 TRANSFUNCTION seA1G7 = Pow(GeoTrf::RotateZ3D(1.0),
f+(13*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
739 TRANSFUNCTION seC1G7 = Pow(GeoTrf::RotateZ3D(1.0),
f+(13*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
740 TRANSFUNCTION seA1G8 = Pow(GeoTrf::RotateZ3D(1.0),
f+(15*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
741 TRANSFUNCTION seC1G8 = Pow(GeoTrf::RotateZ3D(1.0),
f+(15*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
742 TRANSFUNCTION seA1G9 = Pow(GeoTrf::RotateZ3D(1.0),
f+(17*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
743 TRANSFUNCTION seC1G9 = Pow(GeoTrf::RotateZ3D(1.0),
f+(17*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
744 TRANSFUNCTION seA1G10 = Pow(GeoTrf::RotateZ3D(1.0),
f+(19*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
745 TRANSFUNCTION seC1G10 = Pow(GeoTrf::RotateZ3D(1.0),
f+(19*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
746 TRANSFUNCTION seA1G11 = Pow(GeoTrf::RotateZ3D(1.0),
f+(21*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
747 TRANSFUNCTION seC1G11 = Pow(GeoTrf::RotateZ3D(1.0),
f+(21*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
748 TRANSFUNCTION seA1G12 = Pow(GeoTrf::RotateZ3D(1.0),
f+(23*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
749 TRANSFUNCTION seC1G12 = Pow(GeoTrf::RotateZ3D(1.0),
f+(23*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
751 TRANSFUNCTION seA1G4 = Pow(GeoTrf::RotateZ3D(1.0),
f+(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
752 TRANSFUNCTION seC1G4 = Pow(GeoTrf::RotateZ3D(1.0),
f+(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
753 TRANSFUNCTION seA1G3 = Pow(GeoTrf::RotateZ3D(1.0),
f+(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
754 TRANSFUNCTION seC1G3 = Pow(GeoTrf::RotateZ3D(1.0),
f+(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
755 TRANSFUNCTION seA1G2 = Pow(GeoTrf::RotateZ3D(1.0),
f+(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
756 TRANSFUNCTION seC1G2 = Pow(GeoTrf::RotateZ3D(1.0),
f+(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
757 TRANSFUNCTION seA1G1 = Pow(GeoTrf::RotateZ3D(1.0),
f+(1*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
758 TRANSFUNCTION seC1G1 = Pow(GeoTrf::RotateZ3D(1.0),
f+(1*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
759 TRANSFUNCTION seA1G16 = Pow(GeoTrf::RotateZ3D(1.0),
f-(1*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
760 TRANSFUNCTION seC1G16 = Pow(GeoTrf::RotateZ3D(1.0),
f-(1*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
761 TRANSFUNCTION seA1G15 = Pow(GeoTrf::RotateZ3D(1.0),
f-(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
762 TRANSFUNCTION seC1G15 = Pow(GeoTrf::RotateZ3D(1.0),
f-(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
763 TRANSFUNCTION seA1G14 = Pow(GeoTrf::RotateZ3D(1.0),
f-(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
764 TRANSFUNCTION seC1G14 = Pow(GeoTrf::RotateZ3D(1.0),
f-(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
765 TRANSFUNCTION seA1G13 = Pow(GeoTrf::RotateZ3D(1.0),
f-(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
766 TRANSFUNCTION seC1G13 = Pow(GeoTrf::RotateZ3D(1.0),
f-(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
768 GeoSerialTransformer *setA1G5 =
new GeoSerialTransformer(sectorenvelopes1g5,&seA1G5, 1);
769 GeoSerialTransformer *setC1G5 =
new GeoSerialTransformer(sectorenvelopes1g5,&seC1G5, 1);
770 GeoSerialTransformer *setA1G6 =
new GeoSerialTransformer(sectorenvelopes1g6,&seA1G6, 1);
771 GeoSerialTransformer *setC1G6 =
new GeoSerialTransformer(sectorenvelopes1g6,&seC1G6, 1);
772 GeoSerialTransformer *setA1G7 =
new GeoSerialTransformer(sectorenvelopes1g7,&seA1G7, 1);
773 GeoSerialTransformer *setC1G7 =
new GeoSerialTransformer(sectorenvelopes1g7,&seC1G7, 1);
774 GeoSerialTransformer *setA1G8 =
new GeoSerialTransformer(sectorenvelopes1g8,&seA1G8, 1);
775 GeoSerialTransformer *setC1G8 =
new GeoSerialTransformer(sectorenvelopes1g8,&seC1G8, 1);
776 GeoSerialTransformer *setA1G9 =
new GeoSerialTransformer(sectorenvelopes1g9,&seA1G9, 1);
777 GeoSerialTransformer *setC1G9 =
new GeoSerialTransformer(sectorenvelopes1g9,&seC1G9, 1);
778 GeoSerialTransformer *setA1G10 =
new GeoSerialTransformer(sectorenvelopes1g10,&seA1G10, 1);
779 GeoSerialTransformer *setC1G10 =
new GeoSerialTransformer(sectorenvelopes1g10,&seC1G10, 1);
780 GeoSerialTransformer *setA1G11 =
new GeoSerialTransformer(sectorenvelopes1g11,&seA1G11, 1);
781 GeoSerialTransformer *setC1G11 =
new GeoSerialTransformer(sectorenvelopes1g11,&seC1G11, 1);
782 GeoSerialTransformer *setA1G12 =
new GeoSerialTransformer(sectorenvelopes1g12,&seA1G12, 1);
783 GeoSerialTransformer *setC1G12 =
new GeoSerialTransformer(sectorenvelopes1g12,&seC1G12, 1);
785 GeoSerialTransformer *setA1G4 =
new GeoSerialTransformer(sectorenvelopes1g4,&seA1G4, 1);
786 GeoSerialTransformer *setC1G4 =
new GeoSerialTransformer(sectorenvelopes1g4,&seC1G4, 1);
787 GeoSerialTransformer *setA1G3 =
new GeoSerialTransformer(sectorenvelopes1g3,&seA1G3, 1);
788 GeoSerialTransformer *setC1G3 =
new GeoSerialTransformer(sectorenvelopes1g3,&seC1G3, 1);
789 GeoSerialTransformer *setA1G2 =
new GeoSerialTransformer(sectorenvelopes1g2,&seA1G2, 1);
790 GeoSerialTransformer *setC1G2 =
new GeoSerialTransformer(sectorenvelopes1g2,&seC1G2, 1);
791 GeoSerialTransformer *setA1G1 =
new GeoSerialTransformer(sectorenvelopes1g1,&seA1G1, 1);
792 GeoSerialTransformer *setC1G1 =
new GeoSerialTransformer(sectorenvelopes1g1,&seC1G1, 1);
793 GeoSerialTransformer *setA1G16 =
new GeoSerialTransformer(sectorenvelopes1g16,&seA1G16, 1);
794 GeoSerialTransformer *setC1G16 =
new GeoSerialTransformer(sectorenvelopes1g16,&seC1G16, 1);
795 GeoSerialTransformer *setA1G15 =
new GeoSerialTransformer(sectorenvelopes1g15,&seA1G15, 1);
796 GeoSerialTransformer *setC1G15 =
new GeoSerialTransformer(sectorenvelopes1g15,&seC1G15, 1);
797 GeoSerialTransformer *setA1G14 =
new GeoSerialTransformer(sectorenvelopes1g14,&seA1G14, 1);
798 GeoSerialTransformer *setC1G14 =
new GeoSerialTransformer(sectorenvelopes1g14,&seC1G14, 1);
799 GeoSerialTransformer *setA1G13 =
new GeoSerialTransformer(sectorenvelopes1g13,&seA1G13, 1);
800 GeoSerialTransformer *setC1G13 =
new GeoSerialTransformer(sectorenvelopes1g13,&seC1G13, 1);
802 envelope->add(setA1G5);
803 envelope->add(setC1G5);
804 envelope->add(setA1G6);
805 envelope->add(setC1G6);
806 envelope->add(setA1G7);
807 envelope->add(setC1G7);
808 envelope->add(setA1G8);
809 envelope->add(setC1G8);
810 envelope->add(setA1G9);
811 envelope->add(setC1G9);
812 envelope->add(setA1G10);
813 envelope->add(setC1G10);
814 envelope->add(setA1G11);
815 envelope->add(setC1G11);
816 envelope->add(setA1G12);
817 envelope->add(setC1G12);
819 envelope->add(setA1G4);
820 envelope->add(setC1G4);
821 envelope->add(setA1G3);
822 envelope->add(setC1G3);
823 envelope->add(setA1G2);
824 envelope->add(setC1G2);
825 envelope->add(setA1G1);
826 envelope->add(setC1G1);
827 envelope->add(setA1G16);
828 envelope->add(setC1G16);
829 envelope->add(setA1G15);
830 envelope->add(setC1G15);
831 envelope->add(setA1G14);
832 envelope->add(setC1G14);
833 envelope->add(setA1G13);
834 envelope->add(setC1G13);
837 trdMap, *BarrelDMTrds,
838 trapMap, *BarrelDMTraps,
839 boxMap, *BarrelDMBoxes,