59 #include "GeoModelKernel/GeoElement.h"
60 #include "GeoModelKernel/GeoMaterial.h"
61 #include "GeoModelKernel/GeoFullPhysVol.h"
62 #include "GeoModelKernel/GeoPhysVol.h"
63 #include "GeoModelKernel/GeoVPhysVol.h"
64 #include "GeoModelKernel/GeoLogVol.h"
65 #include "GeoModelKernel/GeoBox.h"
66 #include "GeoModelKernel/GeoPcon.h"
67 #include "GeoModelKernel/GeoTubs.h"
68 #include "GeoModelKernel/GeoCons.h"
69 #include "GeoModelKernel/GeoPara.h"
70 #include "GeoModelKernel/GeoNameTag.h"
71 #include "GeoModelKernel/GeoTransform.h"
72 #include "GeoModelKernel/GeoAlignableTransform.h"
73 #include "GeoModelKernel/GeoIdentifierTag.h"
74 #include "GeoModelKernel/GeoDefinitions.h"
79 #include "GaudiKernel/MsgStream.h"
80 #include "GaudiKernel/ISvcLocator.h"
81 #include "GaudiKernel/PhysicalConstants.h"
95 std::string
basename,
double position
96 ) : m_Type(
type), m_pos_zside(pos_zside), m_isModule(is_module),
97 m_BaseName(std::move(
basename)), m_Position(position)
101 ISvcLocator *svcLocator = Gaudi::svcLocator();
103 if(svcLocator->service(
"DetectorStore",
detStore,
false) == StatusCode::FAILURE){
104 throw std::runtime_error(
"Error in EMECSupportConstruction, cannot access DetectorStore");
107 if (
detStore->retrieve(materialManager, std::string(
"MATERIALS")).isFailure()) {
108 throw std::runtime_error(
"Error in EMECSupportConstruction, cannot access MATERIALS");
122 if(!
m_Lead)
throw std::runtime_error(
"Error in EMECSupportConstruction, std::Lead is not found.");
125 if(!
m_Alu)
throw std::runtime_error(
"Error in EMECSupportConstruction, std::Aluminium is not found.");
128 if(!
m_Copper)
throw std::runtime_error(
"Error in EMECSupportConstruction, std::Copper is not found.");
131 if(!
m_LAr)
throw std::runtime_error(
"Error in EMECSupportConstruction, std::LiquidArgon is not found.");
134 if(!
m_Gten)
throw std::runtime_error(
"Error in EMECSupportConstruction, LAr::G10 is not found.");
137 if(!
m_PermaliE730)
throw std::runtime_error(
"Error in EMECSupportConstruction, LAr::Glue is not found.");
140 if(!
m_G10FeOuter)
throw std::runtime_error(
"Error in EMECSupportConstruction, LAr::G10FeOuter is not found.");
143 if(!
m_G10FeInner)
throw std::runtime_error(
"Error in EMECSupportConstruction, LAr::G10FeInner is not found.");
146 if(!
m_Kapton_Cu)
throw std::runtime_error(
"Error in EMECSupportConstruction, LAr::KaptonC is not found.");
149 if(!
m_Cable)
throw std::runtime_error(
"Error in EMECSupportConstruction, LAr::Cables is not found.");
154 if(svcLocator->service(
"GeoModelSvc", geoModel) == StatusCode::FAILURE)
155 throw std::runtime_error(
"Error cannot access GeoModelSvc");
156 if(svcLocator->service (
"RDBAccessSvc",rdbAccess) == StatusCode::FAILURE)
157 throw std::runtime_error(
"Error cannot access RDBAccessSvc");
162 std::string detectorKey = LArVersion.empty() ?
AtlasVersion : LArVersion;
163 std::string detectorNode = LArVersion.empty() ?
"ATLAS" :
"LAr";
213 static void printWarning(
const std::ostringstream &
message)
215 ISvcLocator* svcLocator = Gaudi::svcLocator();
219 throw std::runtime_error(
"EMECSupportConstruction: cannot initialze message service");
221 MsgStream
msg(
msgSvc,
"EMECSupportConstruction");
227 using map_t = std::map<std::string, unsigned int>;
231 for(
unsigned int i = 0;
i <
db->size(); ++
i) {
232 const std::string&
key = (*db)[
i]->getString(
s);
241 for(
unsigned int i = 0;
i <
db->size(); ++
i) {
242 const std::string&
object = (*db)[
i]->getString(
"OBJECTNAME");
244 const std::string&
key = (*db)[
i]->getString(
"PARNAME");
251 static double getNumber(
253 const char *
number,
double defval = 0.
256 map_t::const_iterator
i =
m.find(
idx);
258 std::ostringstream
tmp;
259 tmp <<
"Cannot get " <<
idx <<
"/" <<
number <<
" from DB";
263 double value = (*db)[(*i).second]->getDouble(
number);
264 assert(
value == defval);
268 static double getNumber(
270 const std::string ¶meter,
double defval = 0.)
272 for(
unsigned int i = 0;
i <
db->size(); ++
i){
273 const std::string&
object = (*db)[
i]->getString(
"OBJECTNAME");
275 const std::string&
key = (*db)[
i]->getString(
"PARNAME");
276 if(
key == parameter){
277 double value = (*db)[
i]->getDouble(
"PARVALUE");
278 assert(
value == defval);
283 std::ostringstream
tmp;
284 tmp <<
"Cannot get " <<
s <<
"/" << parameter <<
" from DB_numbers";
285 tmp <<
", default is " << defval;
305 std::ostringstream
tmp;
306 tmp <<
"Unknown Type " <<
m_Type <<
" in GetEnvelope,"
307 <<
" null pointer returned";
317 std::vector<double> zplane, rmin, rmax;
319 std::string id1 =
id;
322 else if(
id.
find(
"Stretchers") != std::string::npos) id1 =
"Stretchers";
323 else if(
id ==
"FrontMiddleRing::LowerHole") id1 =
"FrontMiddleRing::LH";
324 else if(
id ==
"FrontMiddleRing::LowerGTen") id1 =
"FrontMiddleRing::LGT";
325 else if(
id ==
"FrontMiddleRing::UpperHole") id1 =
"FrontMiddleRing::UH";
326 else if(
id ==
"FrontMiddleRing::UpperGTen") id1 =
"FrontMiddleRing::UGT";
327 else if(
id ==
"BackMiddleRing::LowerHole") id1 =
"BackMiddleRing::LH";
328 else if(
id ==
"BackMiddleRing::LowerGTen") id1 =
"BackMiddleRing::LGT";
329 else if(
id ==
"BackMiddleRing::UpperHole") id1 =
"BackMiddleRing::UH";
330 else if(
id ==
"BackMiddleRing::UpperGTen") id1 =
"BackMiddleRing::UGT";
332 std::map<int, unsigned int> pcone;
336 const std::string&
object = (*m_DB_pcons)[
i]->getString(
"PCONNAME");
338 int key = (*m_DB_pcons)[
i]->getInt(
"NZPLANE");
339 if(pcone.find(
key) != pcone.end()){
340 std::ostringstream
tmp;
341 tmp <<
"Duplicate NZPLANE in " <<
id;
347 if(
key >= 0) ++ nzplanes;
352 zplane.resize(nzplanes); rmin.resize(nzplanes); rmax.resize(nzplanes);
353 for(
int n = 0;
n < nzplanes; ++
n){
358 if(id1 ==
"FrontSupportMother"){
359 if(
id.
find(
"Inner") != std::string::npos){
360 zplane.resize(2); rmin.resize(2); rmax.resize(2);
364 }
else if(
id.
find(
"Outer") != std::string::npos){
370 if(id1 ==
"BackSupportMother"){
371 if(
id.
find(
"Inner") != std::string::npos){
372 zplane.resize(2); rmin.resize(2); rmax.resize(2);
376 }
else if(
id.
find(
"Outer") != std::string::npos){
382 if(id1 ==
"Stretchers"){
383 if(
id ==
"WideStretchers"){
388 if(
id ==
"NarrowStretchers"){
397 std::cout <<
"!!!! " <<
id <<
":" << std::endl;
398 for(
int i = 0;
i < nzplanes; ++
i){
399 std::cout <<
"\t" <<
i <<
" " << zplane[
i] <<
" " << rmin[
i] <<
" " << rmax[
i] << std::endl;
404 zplane.resize(6); rmin.resize(6); rmax.resize(6);
411 if(
id ==
"FrontSupportMother::Outer"){
415 if(
id ==
"FrontSupportMother::Inner"){
416 zplane.resize(2); rmin.resize(2); rmax.resize(2);
421 zplane.resize(4); rmin.resize(4); rmax.resize(4);
426 if(
id ==
"BackSupportMother::Outer"){
430 if(
id ==
"BackSupportMother::Inner"){
431 zplane.resize(2); rmin.resize(2); rmax.resize(2);
435 }
else if(
id ==
"WideStretchers" ||
id ==
"NarrowStretchers"){
441 double rmidS = rminS + drnotch;
442 zplane.resize(6); rmin.resize(6); rmax.resize(6);
443 zplane[0] = -dzS ; rmin[0] = rminS; rmax[0] = rmaxS;
444 zplane[1] = -dznotch; rmin[1] = rminS; rmax[1] = rmaxS;
445 zplane[2] = -dznotch; rmin[2] = rmidS; rmax[2] = rmaxS;
446 zplane[3] = dznotch; rmin[3] = rmidS; rmax[3] = rmaxS;
447 zplane[4] = dznotch; rmin[4] = rminS; rmax[4] = rmaxS;
448 zplane[5] = dzS ; rmin[5] = rminS; rmax[5] = rmaxS;
449 if(
id ==
"WideStretchers"){
454 if(
id ==
"NarrowStretchers"){
460 }
else if(
id ==
"OuterSupportMother"){
466 zplane.resize(6); rmin.resize(6); rmax.resize(6);
467 zplane[0] = -dzOTB ; rmin[0] = rminOTB; rmax[0] = rmaxOTB;
468 zplane[1] = -dzS; rmin[1] = rminOTB; rmax[1] = rmaxOTB;
469 zplane[2] = -dzS; rmin[2] = rminOTB; rmax[2] = rmaxS;
470 zplane[3] = dzS; rmin[3] = rminOTB; rmax[3] = rmaxS;
471 zplane[4] = dzS; rmin[4] = rminOTB; rmax[4] = rmaxOTB;
472 zplane[5] = dzOTB ; rmin[5] = rminOTB; rmax[5] = rmaxOTB;
473 }
else if(
id ==
"FrontMiddleRing"){
475 zplane.resize(4); rmin.resize(4); rmax.resize(4);
480 }
else if(
id ==
"FrontMiddleRing::LowerHole"){
482 zplane.resize(6); rmin.resize(6); rmax.resize(6);
489 }
else if(
id ==
"FrontMiddleRing::LowerGTen"){
491 zplane.resize(6); rmin.resize(6); rmax.resize(6);
498 }
else if(
id ==
"FrontMiddleRing::UpperHole"){
500 zplane.resize(6); rmin.resize(6); rmax.resize(6);
507 }
else if(
id ==
"FrontMiddleRing::UpperGTen"){
509 zplane.resize(6); rmin.resize(6); rmax.resize(6);
516 }
else if(
id ==
"FrontInnerRing"){
518 zplane.resize(5); rmin.resize(5); rmax.resize(5);
524 }
else if(
id ==
"FrontInnerRing::Hole"){
526 zplane.resize(6); rmin.resize(6); rmax.resize(6);
533 }
else if(
id ==
"FrontInnerRing::GTen"){
535 zplane.resize(6); rmin.resize(6); rmax.resize(6);
542 }
else if(
id ==
"BackMiddleRing"){
544 zplane.resize(4); rmin.resize(4); rmax.resize(4);
549 }
else if(
id ==
"BackMiddleRing::LowerHole"){
551 zplane.resize(6); rmin.resize(6); rmax.resize(6);
559 }
else if(
id ==
"BackMiddleRing::LowerGTen"){
561 zplane.resize(6); rmin.resize(6); rmax.resize(6);
568 }
else if(
id ==
"BackMiddleRing::UpperHole"){
570 zplane.resize(6); rmin.resize(6); rmax.resize(6);
577 }
else if(
id ==
"BackMiddleRing::UpperGTen"){
579 zplane.resize(6); rmin.resize(6); rmax.resize(6);
586 }
else if(
id ==
"BackInnerRing"){
588 zplane.resize(4); rmin.resize(4); rmax.resize(4);
593 }
else if(
id ==
"BackInnerRing::Hole"){
595 zplane.resize(6); rmin.resize(6); rmax.resize(6);
602 }
else if(
id ==
"BackInnerRing::GTen"){
604 zplane.resize(6); rmin.resize(6); rmax.resize(6);
611 }
else if(
id ==
"FrontOuterRing"){
613 zplane.resize(7); rmin.resize(7); rmax.resize(7);
621 }
else if(
id ==
"FrontOuterLongBar"){
622 zplane.resize(4); rmin.resize(4); rmax.resize(4);
628 }
else if(
id ==
"BackOuterRing"){
630 zplane.resize(7); rmin.resize(7); rmax.resize(7);
638 }
else if(
id ==
"BackOuterLongBar"){
639 zplane.resize(4); rmin.resize(4); rmax.resize(4);
645 throw std::runtime_error(
"EMECSupportConstruction: wrong Pcone id");
647 std::ostringstream
tmp;
648 tmp <<
"Cannot get " <<
id <<
" polycone fom DB";
652 GeoPcon* shape =
new GeoPcon(phi_start, phi_size);
653 for(
size_t i = 0;
i < zplane.size(); ++
i){
654 shape->addPlane(zplane[
i], rmin[
i], rmax[
i]);
662 std::string
id =
"FrontSupportMother";
664 GeoPcon *motherShape =
getPcon(
id);
665 GeoLogVol *motherLogical =
new GeoLogVol(
name, motherShape,
m_LAr);
666 GeoIntrusivePtr<GeoPhysVol>motherPhysical=
new GeoPhysVol(motherLogical);
679 return motherPhysical;
684 std::string
id =
"BackSupportMother";
686 GeoPcon *motherShape =
getPcon(
id);
687 GeoLogVol *motherLogical =
new GeoLogVol(
name, motherShape,
m_LAr);
688 GeoIntrusivePtr<GeoPhysVol>motherPhysical=
new GeoPhysVol(motherLogical);
699 return motherPhysical;
705 const double coldContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ABSORBERCONTRACTION");
706 const double electrodeInvColdContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ELECTRODEINVCONTRACTION");
707 const double leadThicknessOuter=(*m_DB_EmecFan)[0]->getDouble(
"LEADTHICKNESSOUTER")*
Gaudi::Units::mm;
708 const double steelThickness=(*m_DB_EmecFan)[0]->getDouble(
"STEELTHICKNESS")*
Gaudi::Units::mm;
709 const double glueThickness=(*m_DB_EmecFan)[0]->getDouble(
"GLUETHICKNESS")*
Gaudi::Units::mm;
710 const double electrodeTotalThickness=(*m_DB_EmecFan)[0]->getDouble(
"ELECTRODETOTALTHICKNESS")*
Gaudi::Units::mm;
712 const double outerAbsorberDy=(leadThicknessOuter/2+steelThickness+glueThickness)*coldContraction;
713 const double electrodeDy=electrodeTotalThickness/2/electrodeInvColdContraction;
715 std::string
id =
"FrontOuterBarrettes";
720 double rminFOB = getNumber(
m_DB_tubes, tubes,
id,
"RMIN", 614.-2.+40.);
721 double rmaxFOB = getNumber(
m_DB_tubes, tubes,
id,
"RMAX", 1961.-7.+62.);
722 double dzFOB = getNumber(
m_DB_tubes, tubes,
id,
"DZ", 11. / 2);
723 double zposFOB = getNumber(
m_DB_numbers, numbers,
"Z0",
"PARVALUE", 50.) + dzFOB;
725 GeoLogVol *logicalFOB =
new GeoLogVol(
name, shapeFOB,
m_LAr);
726 GeoIntrusivePtr<GeoPhysVol>physFOB =
new GeoPhysVol(logicalFOB);
727 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(zposFOB)));
728 motherPhysical->add(physFOB);
730 const int number_of_modules = 8;
732 const int nofabs = (*m_DB_EmecWheelParameters)[1]->getInt(
"NABS");
733 const int nofdiv = nofabs / number_of_modules;
737 GeoTubs *shapeFOBMP =
new GeoTubs(rminFOB, rmaxFOB, dzFOB, -dfi/4., dfi);
738 GeoLogVol *logicalFOBMP =
new GeoLogVol(
name, shapeFOBMP,
m_LAr);
739 GeoIntrusivePtr<GeoPhysVol>physFOBMP =
new GeoPhysVol(logicalFOBMP);
743 double rmn = getNumber(
m_DB_numbers, numbers,
"R0",
"PARVALUE", 613.38);
744 double dr = getNumber(
m_DB_numbers, numbers,
"DRabs",
"PARVALUE", 41.4);
745 double dx = getNumber(
m_DB_numbers, numbers,
"Labs",
"PARVALUE", 1290.) / 2.;
746 assert(rmn +
dr > rminFOB && rmn +
dr +
dx*2 < rmaxFOB);
748 const double r0A = rmn +
dr +
dx;
749 GeoBox *shapeFOBA =
new GeoBox(
dx, outerAbsorberDy, dzFOB);
751 GeoIntrusivePtr<GeoPhysVol>physFOBA =
new GeoPhysVol(logicalFOBA);
752 physFOBMP->add(
new GeoTransform(GeoTrf::TranslateX3D(r0A)));
753 physFOBMP->add(physFOBA);
757 dx = getNumber(
m_DB_numbers, numbers,
"Lele",
"PARVALUE", 1283.8) / 2.;
758 assert(rmn +
dr > rminFOB && rmn +
dr +
dx*2 < rmaxFOB);
760 const double r0E = rmn +
dr +
dx;
761 double x0 = r0E *
cos(dfi/2.);
762 double y0 = r0E *
sin(dfi/2.);
763 GeoBox *shapeFOBE =
new GeoBox(
dx, electrodeDy, dzFOB);
765 GeoIntrusivePtr<GeoPhysVol>physFOBE =
new GeoPhysVol(logicalFOBE);
766 physFOBMP->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(
x0,
y0,0.)*GeoTrf::RotateZ3D(dfi/2.))));
767 physFOBMP->add(physFOBE);
771 for(
int i = 0;
i < nofdiv - 1; ++
i){
773 physFOB->add(
new GeoIdentifierTag(
i));
774 physFOB->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
775 physFOB->add(physFOBMP);
781 physFOB->add(
new GeoIdentifierTag(nofdiv-1));
783 physFOB->add(physFOBA);
788 GeoTubs *shapeFOBM =
new GeoTubs(rminFOB, rmaxFOB, dzFOB, -dfi/4., moduldfi);
789 GeoLogVol *logicalFOBM =
new GeoLogVol(
name, shapeFOBM,
m_LAr);
790 GeoIntrusivePtr<GeoPhysVol>physFOBM =
new GeoPhysVol(logicalFOBM);
793 for(
int i = 0;
i < nofdiv; ++
i){
795 physFOBM->add(
new GeoIdentifierTag(
i));
796 physFOBM->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
797 physFOBM->add(physFOBMP);
801 for(
int i = 0;
i < number_of_modules; ++
i){
802 double fi = dfi/2.+
i * moduldfi;
803 physFOB->add(
new GeoIdentifierTag(
i));
804 physFOB->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
805 physFOB->add(physFOBM);
813 const double coldContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ABSORBERCONTRACTION");
814 const double electrodeInvColdContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ELECTRODEINVCONTRACTION");
815 const double leadThicknessInner=(*m_DB_EmecFan)[0]->getDouble(
"LEADTHICKNESSINNER")*
Gaudi::Units::mm;
816 const double steelThickness=(*m_DB_EmecFan)[0]->getDouble(
"STEELTHICKNESS")*
Gaudi::Units::mm;
817 const double glueThickness=(*m_DB_EmecFan)[0]->getDouble(
"GLUETHICKNESS")*
Gaudi::Units::mm;
818 const double electrodeTotalThickness=(*m_DB_EmecFan)[0]->getDouble(
"ELECTRODETOTALTHICKNESS")*
Gaudi::Units::mm;
820 const double innerAbsorberDy=(leadThicknessInner/2+steelThickness+glueThickness)*coldContraction;
821 const double electrodeDy=electrodeTotalThickness/2/electrodeInvColdContraction;
823 std::string
id =
"FrontInnerBarrettes";
828 double rminFIB = getNumber(
m_DB_tubes, tubes,
id,
"RMIN", 335.5-1.+40.5);
829 double rmaxFIB = getNumber(
m_DB_tubes, tubes,
id,
"RMAX", 614.-2.-40.);
830 double dzFIB = getNumber(
m_DB_tubes, tubes,
id,
"DZ", 11. / 2);
831 double zposFIB = getNumber(
m_DB_numbers, numbers,
"Z0",
"PARVALUE", 50.) + dzFIB;
834 GeoLogVol *logicalFIB =
new GeoLogVol(
name, shapeFIB,
m_LAr);
835 GeoIntrusivePtr<GeoPhysVol>physFIB =
new GeoPhysVol(logicalFIB);
836 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(zposFIB)));
837 motherPhysical->add(physFIB);
839 const int number_of_modules = 8;
841 const int nofabs = (*m_DB_EmecWheelParameters)[0]->getInt(
"NABS");
842 const int nofdiv = nofabs / number_of_modules;
846 GeoTubs *shapeFIBMP =
new GeoTubs(rminFIB,rmaxFIB,dzFIB, -dfi/4., dfi);
847 GeoLogVol *logicalFIBMP =
new GeoLogVol(
name, shapeFIBMP,
m_LAr);
848 GeoIntrusivePtr<GeoPhysVol>physFIBMP =
new GeoPhysVol(logicalFIBMP);
851 double rmn = getNumber(
m_DB_numbers, numbers,
"R0",
"PARVALUE", 302.31);
852 double dr = getNumber(
m_DB_numbers, numbers,
"DRabs",
"PARVALUE", 75.6);
853 double dx = getNumber(
m_DB_numbers, numbers,
"Labs",
"PARVALUE", 192.) / 2.;
854 assert(rmn +
dr > rminFIB && rmn +
dr +
dx*2 < rmaxFIB);
856 const double r0A = rmn +
dr +
dx;
857 GeoBox *shapeFIBA =
new GeoBox(
dx, innerAbsorberDy, dzFIB);
859 GeoIntrusivePtr<GeoPhysVol>physFIBA =
new GeoPhysVol(logicalFIBA);
860 physFIBMP->add(
new GeoTransform(GeoTrf::TranslateX3D(r0A)));
861 physFIBMP->add(physFIBA);
864 dr = getNumber(
m_DB_numbers, numbers,
"DRele",
"PARVALUE", 106.3);
865 dx = getNumber(
m_DB_numbers, numbers,
"Lele",
"PARVALUE", 144.4) / 2.;
866 assert(rmn +
dr > rminFIB && rmn +
dr +
dx*2 < rmaxFIB);
868 const double r0E = rmn +
dr +
dx;
869 double x0 = r0E *
cos(dfi/2.);
870 double y0 = r0E *
sin(dfi/2.);
871 GeoBox *shapeFIBE =
new GeoBox(
dx, electrodeDy, dzFIB);
873 GeoIntrusivePtr<GeoPhysVol>physFIBE =
new GeoPhysVol(logicalFIBE);
874 physFIBMP->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(
x0,
y0,0.)*GeoTrf::RotateZ3D(dfi/2.))));
875 physFIBMP->add(physFIBE);
879 for(
int i = 0;
i < nofdiv - 1; ++
i){
881 physFIB->add(
new GeoIdentifierTag(
i));
882 physFIB->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
883 physFIB->add(physFIBMP);
889 physFIB->add(
new GeoIdentifierTag(nofdiv-1));
891 physFIB->add(physFIBA);
896 GeoTubs *shapeFIBM =
new GeoTubs(rminFIB, rmaxFIB, dzFIB, -dfi/4., moduldfi);
897 GeoLogVol *logicalFIBM =
new GeoLogVol(
name, shapeFIBM,
m_LAr);
898 GeoIntrusivePtr<GeoPhysVol>physFIBM =
new GeoPhysVol(logicalFIBM);
900 for(
int i = 0;
i < nofdiv; ++
i){
902 physFIBM->add(
new GeoIdentifierTag(
i));
903 physFIBM->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
904 physFIBM->add(physFIBMP);
908 for(
int i = 0;
i < number_of_modules; ++
i){
909 double fi = dfi/2.+
i * moduldfi;
910 physFIB->add(
new GeoIdentifierTag(
i));
911 physFIB->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
912 physFIB->add(physFIBM);
921 const double coldContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ABSORBERCONTRACTION");
922 const double electrodeInvColdContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ELECTRODEINVCONTRACTION");
923 const double leadThicknessOuter=(*m_DB_EmecFan)[0]->getDouble(
"LEADTHICKNESSOUTER")*
Gaudi::Units::mm;
924 const double steelThickness=(*m_DB_EmecFan)[0]->getDouble(
"STEELTHICKNESS")*
Gaudi::Units::mm;
925 const double glueThickness=(*m_DB_EmecFan)[0]->getDouble(
"GLUETHICKNESS")*
Gaudi::Units::mm;
926 const double electrodeTotalThickness=(*m_DB_EmecFan)[0]->getDouble(
"ELECTRODETOTALTHICKNESS")*
Gaudi::Units::mm;
928 const double outerAbsorberDy=(leadThicknessOuter/2+steelThickness+glueThickness)*coldContraction;
929 const double electrodeDy=electrodeTotalThickness/2/electrodeInvColdContraction;
931 const std::string
id =
"BackOuterBarrettes";
938 std::string
name = baseName +
id;
940 double rminBOB = getNumber(
m_DB_tubes, tubes,
id,
"RMIN", 699.-2.5+40.);
941 double rmaxBOB = getNumber(
m_DB_tubes, tubes,
id,
"RMAX", 1961.-7.+62.);
942 double dzBOB = getNumber(
m_DB_tubes, tubes,
id,
"DZ", 11. / 2);
943 double zposBOB = getNumber(
m_DB_numbers, numbers,
"Z0",
"PARVALUE", 44.) + dzBOB;
945 GeoLogVol *logicalBOB =
new GeoLogVol(
name, shapeBOB,
m_LAr);
946 GeoIntrusivePtr<GeoPhysVol>physBOB =
new GeoPhysVol(logicalBOB);
947 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(zposBOB)));
948 motherPhysical->add(physBOB);
950 const int number_of_modules = 8;
952 int nofabs = (*m_DB_EmecWheelParameters)[1]->getInt(
"NABS");
953 int nofdiv = nofabs / number_of_modules;
956 name = baseName +
"BackOuterBarrette::Module::Phidiv";
957 GeoTubs *shapeBOBMP =
new GeoTubs(rminBOB, rmaxBOB, dzBOB, -dfi/4., dfi);
958 GeoLogVol *logicalBOBMP =
new GeoLogVol(
name, shapeBOBMP,
m_LAr);
959 GeoIntrusivePtr<GeoPhysVol>physBOBMP =
new GeoPhysVol(logicalBOBMP);
961 name = baseName +
"BackOuterBarrette::Abs";
962 double rmn = getNumber(
m_DB_numbers, numbers,
"R0",
"PARVALUE", 698.4);
963 double dr = getNumber(
m_DB_numbers, numbers,
"DRabs",
"PARVALUE", 42.1);
964 double dx = getNumber(
m_DB_numbers, numbers,
"Labs",
"PARVALUE", 1229.) / 2.;
965 assert(rmn +
dr > rminBOB && rmn +
dr +
dx * 2 < rmaxBOB);
967 const double r0A = rmn +
dr +
dx;
968 GeoBox *shapeBOBA =
new GeoBox(
dx, outerAbsorberDy, dzBOB);
970 GeoIntrusivePtr<GeoPhysVol>physBOBA =
new GeoPhysVol(logicalBOBA);
971 physBOBMP->add(
new GeoTransform(GeoTrf::TranslateX3D(r0A)));
972 physBOBMP->add(physBOBA);
974 name = baseName +
"BackOuterBarrette::Ele";
976 dx = getNumber(
m_DB_numbers, numbers,
"Lele",
"PARVALUE", 1246.9) / 2.;
977 assert(rmn +
dr > rminBOB && rmn +
dr +
dx*2 < rmaxBOB);
979 double r0E = rmn +
dr +
dx;
980 double y0 = r0E *
sin(dfi/2.);
981 double x0 = r0E *
cos(dfi/2.);
982 GeoBox *shapeBOBE =
new GeoBox(
dx, electrodeDy, dzBOB);
984 GeoIntrusivePtr<GeoPhysVol>physBOBE =
new GeoPhysVol(logicalBOBE);
985 physBOBMP->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(
x0,
y0,0.)*GeoTrf::RotateZ3D(dfi/2.))));
986 physBOBMP->add(physBOBE);
990 name = baseName +
"BackOuterBarrette::Module::Phidiv";
991 for(
int i = 0;
i < nofdiv - 1; ++
i){
993 physBOB->add(
new GeoIdentifierTag(
i));
994 physBOB->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
995 physBOB->add(physBOBMP);
997 name = baseName +
"BackOuterBarrette::Abs";
1001 physBOB->add(
new GeoIdentifierTag(nofdiv - 1));
1003 physBOB->add(physBOBA);
1008 GeoTubs *shapeBOBM =
new GeoTubs(rminBOB, rmaxBOB, dzBOB, -dfi/4.,moduldfi);
1009 GeoLogVol *logicalBOBM =
new GeoLogVol(
name, shapeBOBM,
m_LAr);
1010 GeoIntrusivePtr<GeoPhysVol>physBOBM =
new GeoPhysVol(logicalBOBM);
1012 name = baseName +
"BackOuterBarrette::Module::Phidiv";
1013 for(
int i = 0;
i < nofdiv; ++
i){
1014 double fi = dfi *
i;
1015 physBOBM->add(
new GeoIdentifierTag(
i));
1016 physBOBM->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
1017 physBOBM->add(physBOBMP);
1020 name = baseName +
"BackOuterBarrette::Module";
1021 for(
int i = 0;
i < number_of_modules; ++
i){
1022 double fi = dfi/2.+
i * moduldfi;
1023 physBOB->add(
new GeoIdentifierTag(
i));
1024 physBOB->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
1025 physBOB->add(physBOBM);
1032 const double coldContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ABSORBERCONTRACTION");
1033 const double electrodeInvColdContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ELECTRODEINVCONTRACTION");
1034 const double leadThicknessInner=(*m_DB_EmecFan)[0]->getDouble(
"LEADTHICKNESSINNER")*
Gaudi::Units::mm;
1035 const double steelThickness=(*m_DB_EmecFan)[0]->getDouble(
"STEELTHICKNESS")*
Gaudi::Units::mm;
1036 const double glueThickness=(*m_DB_EmecFan)[0]->getDouble(
"GLUETHICKNESS")*
Gaudi::Units::mm;
1037 const double electrodeTotalThickness=(*m_DB_EmecFan)[0]->getDouble(
"ELECTRODETOTALTHICKNESS")*
Gaudi::Units::mm;
1039 const double innerAbsorberDy=(leadThicknessInner/2+steelThickness+glueThickness)*coldContraction;
1040 const double electrodeDy=electrodeTotalThickness/2/electrodeInvColdContraction;
1044 std::string
id =
"BackInnerBarrettes";
1050 double rminBIB = getNumber(
m_DB_tubes, tubes,
id,
"RMIN", 357.5-1.+40.5);
1051 double rmaxBIB = getNumber(
m_DB_tubes, tubes,
id,
"RMAX", 699.-2.5-40.);
1052 double dzBIB = getNumber(
m_DB_tubes, tubes,
id,
"DZ", 11. / 2);
1053 double zposBIB = getNumber(
m_DB_numbers, numbers,
"Z0",
"PARVALUE", 44.) + dzBIB;
1055 GeoLogVol *logicalBIB =
new GeoLogVol(
name, shapeBIB,
m_LAr);
1056 GeoIntrusivePtr<GeoPhysVol>physBIB =
new GeoPhysVol(logicalBIB);
1057 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(zposBIB)));
1058 motherPhysical->add(physBIB);
1060 const int number_of_modules = 8;
1062 const int nofabs = (*m_DB_EmecWheelParameters)[0]->getInt(
"NABS");
1063 const int nofdiv = nofabs / number_of_modules;
1067 GeoTubs *shapeBIBMP =
new GeoTubs(rminBIB, rmaxBIB, dzBIB, -dfi/4., dfi);
1068 GeoLogVol *logicalBIBMP =
new GeoLogVol(
name, shapeBIBMP,
m_LAr);
1069 GeoIntrusivePtr<GeoPhysVol>physBIBMP =
new GeoPhysVol(logicalBIBMP);
1072 id =
"BackInnerBarrette::Abs";
1074 double rmn = getNumber(
m_DB_numbers, numbers,
"R0",
"PARVALUE", 344.28);
1075 double dr = getNumber(
m_DB_numbers, numbers,
"DRabs",
"PARVALUE", 56.1);
1076 double dx = getNumber(
m_DB_numbers, numbers,
"Labs",
"PARVALUE", 255.) / 2.;
1078 assert(rmn+
dr>rminBIB && rmn+
dr+
dx*2.<rmaxBIB);
1079 const double r0A = rmn +
dr +
dx;
1080 GeoBox *shapeBIBA =
new GeoBox(
dx, innerAbsorberDy, dzBIB);
1082 GeoIntrusivePtr<GeoPhysVol>physBIBA =
new GeoPhysVol(logicalBIBA);
1083 physBIBMP->add(
new GeoTransform(GeoTrf::TranslateX3D(r0A)));
1084 physBIBMP->add(physBIBA);
1086 id =
"BackInnerBarrette::Ele";
1088 dr = getNumber(
m_DB_numbers, numbers,
"DRele",
"PARVALUE", 76.6);
1089 dx = getNumber(
m_DB_numbers, numbers,
"Lele",
"PARVALUE", 208.9) / 2.;
1090 assert(rmn +
dr > rminBIB && rmn +
dr +
dx * 2. < rmaxBIB);
1092 const double r0E = rmn +
dr +
dx;
1093 double y0 = r0E *
sin(dfi * 0.5);
1094 double x0 = r0E *
cos(dfi * 0.5);
1095 GeoBox *shapeBIBE =
new GeoBox(
dx, electrodeDy, dzBIB);
1097 GeoIntrusivePtr<GeoPhysVol>physBIBE =
new GeoPhysVol(logicalBIBE);
1098 physBIBMP->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(
x0,
y0, 0.)*GeoTrf::RotateZ3D(dfi*0.5))));
1099 physBIBMP->add(physBIBE);
1115 for(
int i = 0;
i < nofdiv - 1; ++
i){
1117 physBIB->add(
new GeoIdentifierTag(
i));
1118 physBIB->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
1119 physBIB->add(physBIBMP);
1125 physBIB->add(
new GeoIdentifierTag(nofdiv - 1));
1127 physBIB->add(physBIBA);
1132 GeoTubs *shapeBIBM =
new GeoTubs(rminBIB, rmaxBIB, dzBIB, -dfi/4., moduldfi);
1133 GeoLogVol *logicalBIBM =
new GeoLogVol(
name, shapeBIBM,
m_LAr);
1134 GeoIntrusivePtr<GeoPhysVol>physBIBM =
new GeoPhysVol(logicalBIBM);
1137 for(
int i = 0;
i < nofdiv; ++
i){
1138 double fi = dfi *
i;
1139 physBIBM->add(
new GeoIdentifierTag(
i));
1140 physBIBM->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
1141 physBIBM->add(physBIBMP);
1145 for(
int i = 0;
i < number_of_modules; ++
i){
1146 double fi = dfi*0.5 +
i * moduldfi;
1147 physBIB->add(
new GeoIdentifierTag(
i));
1148 physBIB->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
1149 physBIB->add(physBIBM);
1157 std::string
id =
"OuterTransversalBars";
1163 GeoLogVol* logicalOTB =
new GeoLogVol(
name, shapeOTB,
m_Gten);
1164 GeoIntrusivePtr<GeoPhysVol> physOTB =
new GeoPhysVol(logicalOTB);
1166 id =
"TopIndexingRing";
1168 double rminTIR = getNumber(
m_DB_tubes, tubes,
id,
"RMIN", rmaxOTB);
1172 GeoLogVol* logicalTIR =
new GeoLogVol(
name, shapeTIR,
m_Alu);
1173 GeoIntrusivePtr<GeoPhysVol> physTIR =
new GeoPhysVol(logicalTIR);
1177 double rmaxTIRH = getNumber(
m_DB_tubes, tubes,
id,
"RMAX", rmaxTIR);
1180 GeoLogVol* logicalTIRH =
new GeoLogVol(
name, shapeTIRH,
m_LAr);
1181 GeoIntrusivePtr<GeoPhysVol> physTIRH =
new GeoPhysVol(logicalTIRH);
1182 physTIR->add(physTIRH);
1184 id =
"WideStretchers";
1186 GeoPcon* shapeWS =
getPcon(
id);
1187 GeoLogVol* logicalWS =
new GeoLogVol(
name, shapeWS,
m_Alu);
1188 GeoIntrusivePtr<GeoPhysVol> physWS =
new GeoPhysVol(logicalWS);
1190 id =
"NarrowStretchers";
1192 GeoPcon* shapeNS =
getPcon(
id);
1193 GeoLogVol* logicalNS =
new GeoLogVol(
name, shapeNS,
m_Alu);
1194 GeoIntrusivePtr<GeoPhysVol> physNS =
new GeoPhysVol(logicalNS);
1196 id =
"OuterSupportMother";
1198 GeoPcon *motherShape =
getPcon(
id);
1199 GeoLogVol *motherLogical =
new GeoLogVol(
name, motherShape,
m_LAr);
1200 GeoIntrusivePtr<GeoPhysVol>motherPhysical=
new GeoPhysVol(motherLogical);
1202 motherPhysical->add(physTIR);
1203 motherPhysical->add(physOTB);
1205 const int number_of_stretchers = 8;
1207 motherPhysical->add(
new GeoIdentifierTag(0));
1208 motherPhysical->add(physNS);
1210 double dfi =
M_PI / number_of_stretchers;
1211 double dfiNS = shapeNS->getDPhi();
1212 motherPhysical->add(
new GeoIdentifierTag(1));
1213 motherPhysical->add(
new GeoTransform(GeoTrf::RotateZ3D(dfi - dfiNS*0.5)));
1214 motherPhysical->add(physNS);
1215 motherPhysical->add(
new GeoIdentifierTag(2));
1216 motherPhysical->add(
new GeoTransform(GeoTrf::RotateZ3D(-dfi + dfiNS*0.5)));
1217 motherPhysical->add(physNS);
1221 for(
int i = 0;
i < number_of_stretchers; ++
i, ++ copyno){
1222 double fiW =
i * dfi;
1223 motherPhysical->add(
new GeoIdentifierTag(copyno));
1224 motherPhysical->add(
new GeoTransform(GeoTrf::RotateZ3D(fiW)));
1225 motherPhysical->add(physWS);
1226 double fiN = (
i + 0.5) * dfi;
1227 motherPhysical->add(
new GeoIdentifierTag(copyno));
1228 motherPhysical->add(
new GeoTransform(GeoTrf::RotateZ3D(fiN)));
1229 motherPhysical->add(physNS);
1233 return motherPhysical;
1238 std::string
id =
"InnerAluCone";
1243 double dz = 0.5 * (*m_DB_mn)[0]->getDouble(
"ACTIVELENGTH")*
Gaudi::Units::mm;
1249 std::ostringstream
tmp(
"cannot get STRAIGHTSTARTSECTION from DB");
1256 const double talpha = (r2min - r1min)*0.5/dz;
1257 const double calpha = 2.*dz/sqrt(
pow(2.*dz,2.)+
pow(r2min-r1min,2.));
1258 const double inv_calpha = 1. / calpha;
1259 const double alpha =
atan(talpha);
1262 double r1max =
pow(barthick/2.,2.)+
pow(r1min+(surfthick+barthick)*inv_calpha,2.);
1263 r1max = sqrt(r1max)+surfthick*inv_calpha;
1264 double r2max = r2min+(r1max-r1min);
1266 GeoCons* shapeIAC =
new GeoCons ( r1min ,r2min,
1270 GeoLogVol* logicalIAC =
new GeoLogVol (name0, shapeIAC,
m_LAr);
1271 GeoIntrusivePtr<GeoPhysVol> physIAC =
new GeoPhysVol(logicalIAC);
1277 std::string
name = name0 +
"::InnerShell";
1278 GeoCons* shapeIACIS =
new GeoCons(
1280 r1min+surfthick*inv_calpha, r2min+surfthick*inv_calpha,
1282 GeoLogVol* logicalIACIS =
new GeoLogVol (
name,shapeIACIS,
m_Alu);
1283 GeoIntrusivePtr<GeoPhysVol> physIACIS =
new GeoPhysVol(logicalIACIS);
1284 physIAC->add(physIACIS);
1286 name = name0 +
"::OuterShell";
1289 GeoCons* shapeIACOS =
new GeoCons (
1290 r1max-surfthick*inv_calpha, r2max-surfthick*inv_calpha,
1293 GeoLogVol* logicalIACOS =
new GeoLogVol (
name,shapeIACOS,
m_Alu);
1294 GeoIntrusivePtr<GeoPhysVol> physIACOS =
new GeoPhysVol(logicalIACOS);
1295 physIAC->add(physIACOS);
1297 name = name0 +
"::Phidiv";
1300 const int nofmodul = 8;
1302 GeoCons* shapeIACP =
new GeoCons(
1303 r1min+surfthick*inv_calpha,r2min+surfthick*inv_calpha,
1304 r1max-surfthick*inv_calpha,r2max-surfthick*inv_calpha,
1305 dz, -moduldphi/2.,moduldphi);
1306 GeoLogVol* logicalIACP =
new GeoLogVol (
name,shapeIACP,
m_LAr);
1307 GeoIntrusivePtr<GeoPhysVol> physIACP =
new GeoPhysVol(logicalIACP);
1309 name = name0 +
"::AluBar";
1312 GeoPara* shapeIACAB =
new GeoPara(
1313 barthick/2.*inv_calpha,barthick/2.,dz,
1315 GeoLogVol* logicalIACAB=
new GeoLogVol (
name,shapeIACAB,
m_Alu);
1316 GeoIntrusivePtr<GeoPhysVol> physIACAB=
new GeoPhysVol(logicalIACAB);
1320 const double phi[9]={-15.,-11.,-7.5,-4.,0.,4.,7.5,11.,15.};
1321 const double r0=r1min+(surfthick+barthick/2.)*inv_calpha+dz*talpha;
1323 for(
int i = 0;
i < nbar; ++
i){
1327 physIACP->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(r0*cfi,r0*sfi,0.)*GeoTrf::RotateZ3D(
fi))));
1328 physIACP->add(physIACAB);
1331 name = name0 +
"::Phidiv";
1332 for(
int i=0;
i<nofmodul;
i++){
1333 double fi=(
i+0.5)*moduldphi;
1334 physIAC->add(
new GeoIdentifierTag(
i));
1335 physIAC->add(
new GeoTransform(GeoTrf::RotateZ3D(
fi)));
1336 physIAC->add(physIACP);
1345 double dMechFocaltoWRP = (*m_DB_EmecGeometry)[0]->getDouble(
"Z1") *
Gaudi::Units::cm;
1346 double LArEMECHalfCrack = (*m_DB_EmecGeometry)[0]->getDouble(
"DCRACK") *
Gaudi::Units::cm;
1347 double LArTotalThickness = (*m_DB_EmecGeometry)[0]->getDouble(
"ETOT") *
Gaudi::Units::cm;
1349 double eta_mid = (*m_DB_EmecWheelParameters)[0]->getDouble(
"ETAEXT");
1351 double tanThetaMid = 2. *
exp(-eta_mid) / (1. -
exp(-2.*eta_mid));
1352 const double cosThetaMid = (1. -
exp(2.*-eta_mid)) / (1. +
exp(-2.*eta_mid));
1353 const double inv_cosThetaMid = 1. / cosThetaMid;
1355 double z0 = LArTotalThickness * 0.5 + dMechFocaltoWRP;
1360 double dz =
length * cosThetaMid * 0.5;
1361 double rmin0 = (
z0 - dz) * tanThetaMid - LArEMECHalfCrack + inv_cosThetaMid;
1362 double rmin1 = (
z0 + dz) * tanThetaMid - LArEMECHalfCrack + inv_cosThetaMid;
1364 GeoCons* shapeITB =
new GeoCons(rmin0, rmin1, rmin0 + rthickness, rmin1 + rthickness,
1367 GeoLogVol* logicalITB =
new GeoLogVol (
name,shapeITB,
m_Gten);
1368 GeoIntrusivePtr<GeoPhysVol> physITB =
new GeoPhysVol(logicalITB);
1376 std::string
id =
"FrontMiddleRing";
1380 GeoPcon *shapeFMR =
getPcon(
id);
1382 GeoIntrusivePtr<GeoPhysVol>physFMR =
new GeoPhysVol(logicalFMR);
1383 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1384 motherPhysical->add(physFMR);
1386 id =
"FrontMiddleRing::LowerHole";
1388 GeoPcon *shapeFMRLH =
getPcon(
id);
1389 GeoLogVol *logicalFMRLH =
new GeoLogVol(
name, shapeFMRLH,
m_LAr);
1390 GeoIntrusivePtr<GeoPhysVol>physFMRLH =
new GeoPhysVol(logicalFMRLH);
1391 physFMR->add(physFMRLH);
1394 id =
"FrontMiddleRing::LowerGTen";
1396 GeoPcon *shapeFMRLG =
getPcon(
id);
1397 GeoLogVol *logicalFMRLG =
new GeoLogVol(
name, shapeFMRLG,
m_Gten);
1398 GeoIntrusivePtr<GeoPhysVol>physFMRLG =
new GeoPhysVol(logicalFMRLG);
1399 physFMRLH->add(physFMRLG);
1401 id =
"FrontMiddleRing::UpperHole";
1403 GeoPcon *shapeFMRUH =
getPcon(
id);
1404 GeoLogVol *logicalFMRUH =
new GeoLogVol(
name, shapeFMRUH,
m_LAr);
1405 GeoIntrusivePtr<GeoPhysVol>physFMRUH =
new GeoPhysVol(logicalFMRUH);
1406 physFMR->add(physFMRUH);
1409 id =
"FrontMiddleRing::UpperGTen";
1411 GeoPcon *shapeFMRUG =
getPcon(
id);
1412 GeoLogVol *logicalFMRUG =
new GeoLogVol(
name, shapeFMRUG,
m_Gten);
1413 GeoIntrusivePtr<GeoPhysVol>physFMRUG =
new GeoPhysVol(logicalFMRUG);
1414 physFMRUH->add(physFMRUG);
1419 std::string
id =
"FrontInnerRing";
1422 GeoPcon *shapeFIR =
getPcon(
id);
1423 GeoLogVol *logicalFIR =
new GeoLogVol(
name, shapeFIR,
m_Alu);
1424 GeoIntrusivePtr<GeoPhysVol>physFIR =
new GeoPhysVol(logicalFIR);
1425 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1426 motherPhysical->add(physFIR);
1428 id =
"FrontInnerRing::Hole";
1430 GeoPcon *shapeFIRH =
getPcon(
id);
1431 GeoLogVol *logicalFIRH =
new GeoLogVol(
name, shapeFIRH,
m_LAr);
1432 GeoIntrusivePtr<GeoPhysVol>physFIRH =
new GeoPhysVol(logicalFIRH);
1433 physFIR->add(physFIRH);
1436 id =
"FrontInnerRing::GTen";
1438 GeoPcon *shapeFIRG =
getPcon(
id);
1439 GeoLogVol *logicalFIRG =
new GeoLogVol(
name, shapeFIRG,
m_Gten);
1440 GeoIntrusivePtr<GeoPhysVol>physFIRG =
new GeoPhysVol(logicalFIRG);
1441 physFIRH->add(physFIRG);
1447 std::string
id =
"FrontInnerLongBar";
1450 double rmin = getNumber(
m_DB_tubes, tubes,
id,
"RMIN", 375.);
1452 double rmax = getNumber(
m_DB_tubes, tubes,
id,
"RMAX", 572.);
1453 double dz = getNumber(
m_DB_tubes, tubes,
id,
"DZ", 20./2);
1456 GeoLogVol *logicalFILB =
new GeoLogVol(
name,shapeFILB,
m_Gten);
1457 GeoIntrusivePtr<GeoPhysVol>physFILB =
new GeoPhysVol(logicalFILB);
1458 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1459 motherPhysical->add(physFILB);
1464 std::string
id =
"BackMiddleRing";
1467 GeoPcon *shapeBMR =
getPcon(
id);
1468 GeoLogVol *logicalBMR =
new GeoLogVol(
name, shapeBMR,
m_Alu);
1469 GeoIntrusivePtr<GeoPhysVol>physBMR =
new GeoPhysVol(logicalBMR);
1470 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1471 motherPhysical->add(physBMR);
1473 id =
"BackMiddleRing::LowerHole";
1475 GeoPcon *shapeBMRLH =
getPcon(
id);
1476 GeoLogVol *logicalBMRLH =
new GeoLogVol(
name, shapeBMRLH,
m_LAr);
1477 GeoIntrusivePtr<GeoPhysVol>physBMRLH =
new GeoPhysVol(logicalBMRLH);
1478 physBMR->add( physBMRLH);
1481 id =
"BackMiddleRing::LowerGTen";
1483 GeoPcon *shapeBMRLG =
getPcon(
id);
1484 GeoLogVol *logicalBMRLG =
new GeoLogVol(
name, shapeBMRLG,
m_Gten);
1485 GeoIntrusivePtr<GeoPhysVol>physBMRLG =
new GeoPhysVol(logicalBMRLG);
1486 physBMRLH->add(physBMRLG);
1488 id =
"BackMiddleRing::UpperHole";
1490 GeoPcon *shapeBMRUH =
getPcon(
id);
1491 GeoLogVol *logicalBMRUH =
new GeoLogVol(
name, shapeBMRUH,
m_LAr);
1492 GeoIntrusivePtr<GeoPhysVol>physBMRUH =
new GeoPhysVol(logicalBMRUH);
1493 physBMR->add( physBMRUH);
1496 id =
"BackMiddleRing::UpperGTen";
1498 GeoPcon *shapeBMRUG =
getPcon(
id);
1499 GeoLogVol *logicalBMRUG =
new GeoLogVol(
name, shapeBMRUG,
m_Gten);
1500 GeoIntrusivePtr<GeoPhysVol>physBMRUG =
new GeoPhysVol(logicalBMRUG);
1501 physBMRUH->add(physBMRUG);
1506 std::string
id =
"BackInnerRing";
1509 GeoPcon *shapeBIR =
getPcon(
id);
1510 GeoLogVol *logicalBIR =
new GeoLogVol(
name, shapeBIR,
m_Alu);
1511 GeoIntrusivePtr<GeoPhysVol>physBIR =
new GeoPhysVol(logicalBIR);
1512 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1513 motherPhysical->add(physBIR);
1515 id =
"BackInnerRing::Hole";
1517 GeoPcon *shapeBIRH =
getPcon(
id);
1518 GeoLogVol *logicalBIRH =
new GeoLogVol(
name, shapeBIRH,
m_LAr);
1519 GeoIntrusivePtr<GeoPhysVol>physBIRH =
new GeoPhysVol(logicalBIRH);
1520 physBIR->add(physBIRH);
1523 id =
"BackInnerRing::GTen";
1525 GeoPcon *shapeBIRG =
getPcon(
id);
1526 GeoLogVol *logicalBIRG =
new GeoLogVol(
name, shapeBIRG,
m_Gten);
1527 GeoIntrusivePtr<GeoPhysVol>physBIRG =
new GeoPhysVol(logicalBIRG);
1528 physBIRH->add(physBIRG);
1533 std::string
id =
"BackInnerLongBar";
1537 double rmin = getNumber(
m_DB_tubes, tubes,
id,
"RMIN", 357.5-1.+40.5);
1538 double rmax = getNumber(
m_DB_tubes, tubes,
id,
"RMAX", 699.-2.5-40.);
1539 double dz = getNumber(
m_DB_tubes, tubes,
id,
"DZ", 20./2.);
1542 GeoLogVol *logicalBILB =
new GeoLogVol(
name, shapeBILB,
m_Gten);
1543 GeoIntrusivePtr<GeoPhysVol>physBILB =
new GeoPhysVol(logicalBILB);
1544 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1545 motherPhysical->add(physBILB);
1550 std::string
id =
"FrontOuterRing";
1553 GeoPcon *shapeFOR =
getPcon(
id);
1554 GeoLogVol *logicalFOR =
new GeoLogVol(
name, shapeFOR,
m_Alu);
1555 GeoIntrusivePtr<GeoPhysVol>physFOR =
new GeoPhysVol(logicalFOR);
1556 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1557 motherPhysical->add(physFOR);
1562 std::string
id =
"FrontOuterLongBar";
1565 GeoPcon *shapeFOLB =
getPcon(
id);
1566 GeoLogVol *logicalFOLB =
new GeoLogVol(
name, shapeFOLB,
m_Gten);
1567 GeoIntrusivePtr<GeoPhysVol>physFOLB =
new GeoPhysVol(logicalFOLB);
1568 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1569 motherPhysical->add(physFOLB);
1577 double r0 = getNumber(
m_DB_numbers, numbers,
"Router",
"PARVALUE", 1565.-5.);
1578 double r1 = getNumber(
m_DB_numbers, numbers,
"Rinner",
"PARVALUE", 1025.-4.);
1579 std::string
id =
"FrontIndexingRing";
1580 double ring_rmin = getNumber(
m_DB_tubes, tubes,
id,
"RMIN", -15.);
1581 double ring_rmax = getNumber(
m_DB_tubes, tubes,
id,
"RMAX", 15.);
1582 double ring_dz = getNumber(
m_DB_tubes, tubes,
id,
"DZ", 21./2.);
1583 double z_hole = -ring_dz;
1584 double z0 = getNumber(
m_DB_numbers, numbers,
"Z0",
"PARVALUE", 9.) + ring_dz;
1585 double gten_dz = getNumber(
m_DB_numbers, numbers,
"GTenDZ",
"PARVALUE", (16. - 11.) / 2);
1587 double hole_rmin = getNumber(
m_DB_tubes, tubes,
id,
"RMIN", -6.5);
1588 double hole_rmax = getNumber(
m_DB_tubes, tubes,
id,
"RMAX", 6.5);
1589 double hole_dz = getNumber(
m_DB_tubes, tubes,
id,
"DZ", 5.55/2.);
1592 GeoTubs *shapeFHIR =
new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, ring_dz,
m_PhiStart,
m_PhiSize);
1593 GeoLogVol *logicalFHIR =
new GeoLogVol(
name, shapeFHIR,
m_Alu);
1594 GeoIntrusivePtr<GeoPhysVol>physFHIR =
new GeoPhysVol(logicalFHIR);
1595 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1596 motherPhysical->add(physFHIR);
1599 GeoTubs *shapeFHIRH =
new GeoTubs(r0 + hole_rmin, r0 + hole_rmax, hole_dz,
m_PhiStart,
m_PhiSize);
1600 GeoLogVol *logicalFHIRH =
new GeoLogVol(
name, shapeFHIRH,
m_LAr);
1601 GeoIntrusivePtr<GeoPhysVol>physFHIRH =
new GeoPhysVol(logicalFHIRH);
1602 physFHIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz)));
1603 physFHIR->add(physFHIRH);
1608 GeoTubs *shapeFHIRG =
new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, gten_dz,
m_PhiStart,
m_PhiSize);
1609 GeoLogVol *logicalFHIRG =
new GeoLogVol(
name, shapeFHIRG,
m_Gten);
1610 GeoIntrusivePtr<GeoPhysVol>physFHIRG =
new GeoPhysVol(logicalFHIRG);
1611 physFHIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz)));
1612 physFHIR->add(physFHIRG);
1615 GeoTubs *shapeFLIR =
new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, ring_dz,
m_PhiStart,
m_PhiSize);
1616 GeoLogVol *logicalFLIR =
new GeoLogVol(
name, shapeFLIR,
m_Alu);
1617 GeoIntrusivePtr<GeoPhysVol>physFLIR =
new GeoPhysVol(logicalFLIR);
1618 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1619 motherPhysical->add(physFLIR);
1622 GeoTubs *shapeFLIRH =
new GeoTubs(r1 + hole_rmin, r1 + hole_rmax, hole_dz,
m_PhiStart,
m_PhiSize);
1623 GeoLogVol *logicalFLIRH =
new GeoLogVol(
name, shapeFLIRH,
m_LAr);
1624 GeoIntrusivePtr<GeoPhysVol>physFLIRH =
new GeoPhysVol(logicalFLIRH);
1625 physFLIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz)));
1626 physFLIR->add(physFLIRH);
1630 GeoTubs *shapeFLIRG =
new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, gten_dz,
m_PhiStart,
m_PhiSize);
1631 GeoLogVol *logicalFLIRG =
new GeoLogVol(
name, shapeFLIRG,
m_Gten);
1632 GeoIntrusivePtr<GeoPhysVol>physFLIRG =
new GeoPhysVol(logicalFLIRG);
1633 physFLIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz)));
1634 physFLIR->add(physFLIRG);
1642 double r0 = getNumber(
m_DB_numbers, numbers,
"Router",
"PARVALUE", 1437.-5.);
1643 double r1 = getNumber(
m_DB_numbers, numbers,
"Rinner",
"PARVALUE", 1051.-4.);
1644 std::string
id =
"BackIndexingRing";
1645 double ring_rmin = getNumber(
m_DB_tubes, tubes,
id,
"RMIN", -15.);
1646 double ring_rmax = getNumber(
m_DB_tubes, tubes,
id,
"RMAX", 15.);
1647 double ring_dz = getNumber(
m_DB_tubes, tubes,
id,
"DZ", 16./2.);
1648 double z_hole = -ring_dz;
1649 double z0 = getNumber(
m_DB_numbers, numbers,
"Z0",
"PARVALUE", 8.) + ring_dz;
1650 double gten_dz = getNumber(
m_DB_numbers, numbers,
"GTenDZ",
"PARVALUE", (16. - 11.) / 2);
1652 double hole_rmin = getNumber(
m_DB_tubes, tubes,
id,
"RMIN", -6.5);
1653 double hole_rmax = getNumber(
m_DB_tubes, tubes,
id,
"RMAX", 6.5);
1654 double hole_dz = getNumber(
m_DB_tubes, tubes,
id,
"DZ", 5.55/2.);
1657 GeoTubs *shapeBHIR =
new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, ring_dz,
m_PhiStart,
m_PhiSize);
1658 GeoLogVol *logicalBHIR =
new GeoLogVol(
name, shapeBHIR,
m_Alu);
1659 GeoIntrusivePtr<GeoPhysVol>physBHIR =
new GeoPhysVol(logicalBHIR);
1660 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1661 motherPhysical->add(physBHIR);
1666 GeoTubs *shapeBHIRG =
new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, gten_dz,
m_PhiStart,
m_PhiSize);
1667 GeoLogVol *logicalBHIRG =
new GeoLogVol(
name, shapeBHIRG,
m_Gten);
1668 GeoIntrusivePtr<GeoPhysVol>physBHIRG =
new GeoPhysVol(logicalBHIRG);
1669 physBHIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz)));
1670 physBHIR->add(physBHIRG);
1673 GeoTubs* shapeBHIRH =
new GeoTubs(r0 + hole_rmin, r0 + hole_rmax, hole_dz,
m_PhiStart,
m_PhiSize);
1674 GeoLogVol* logicalBHIRH =
new GeoLogVol(
name, shapeBHIRH,
m_LAr);
1675 GeoIntrusivePtr<GeoPhysVol> physBHIRH =
new GeoPhysVol(logicalBHIRH);
1676 physBHIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz)));
1677 physBHIR->add(physBHIRH);
1680 GeoTubs *shapeBLIR =
new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, ring_dz,
m_PhiStart,
m_PhiSize);
1681 GeoLogVol *logicalBLIR =
new GeoLogVol(
name, shapeBLIR,
m_Alu);
1682 GeoIntrusivePtr<GeoPhysVol>physBLIR =
new GeoPhysVol(logicalBLIR);
1683 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1684 motherPhysical->add(physBLIR);
1688 GeoTubs *shapeBLIRG =
new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, gten_dz,
m_PhiStart,
m_PhiSize);
1689 GeoLogVol *logicalBLIRG =
new GeoLogVol(
name, shapeBLIRG,
m_Gten);
1690 GeoIntrusivePtr<GeoPhysVol>physBLIRG =
new GeoPhysVol(logicalBLIRG);
1691 physBLIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz)));
1692 physBLIR->add(physBLIRG);
1695 GeoTubs *shapeBLIRH =
new GeoTubs(r1 + hole_rmin, r1 + hole_rmax, hole_dz,
m_PhiStart,
m_PhiSize);
1696 GeoLogVol *logicalBLIRH =
new GeoLogVol(
name, shapeBLIRH,
m_LAr);
1697 GeoIntrusivePtr<GeoPhysVol>physBLIRH =
new GeoPhysVol(logicalBLIRH);
1698 physBLIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz)));
1699 physBLIR->add(physBLIRH);
1704 std::string
id =
"BackOuterRing";
1707 GeoPcon *shapeBOR =
getPcon(
id);
1708 GeoLogVol *logicalBOR =
new GeoLogVol(
name, shapeBOR,
m_Alu);
1709 GeoIntrusivePtr<GeoPhysVol>physBOR =
new GeoPhysVol(logicalBOR);
1710 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1711 motherPhysical->add(physBOR);
1716 std::string
id =
"BackOuterLongBar";
1719 GeoPcon *shapeBOLB =
getPcon(
id);
1720 GeoLogVol *logicalBOLB =
new GeoLogVol(
name, shapeBOLB,
m_Gten);
1721 GeoIntrusivePtr<GeoPhysVol>physBOLB =
new GeoPhysVol(logicalBOLB);
1722 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
1723 motherPhysical->add(physBOLB);
1734 for(
unsigned int i=0;
i<nextra;
i++){
1735 const std::string&
name=(*m_DB_emecExtraCyl)[
i]->getString(
"CONE");
1736 if(
name.find(
"EmecCylAfterPS") != std::string::npos){
1737 double rmin=(*m_DB_emecExtraCyl)[
i]->getDouble(
"RMIN1");
1738 double rmax=(*m_DB_emecExtraCyl)[
i]->getDouble(
"RMAX1");
1739 double dz = (*m_DB_emecExtraCyl)[
i]->getDouble(
"DZ");
1740 if(dz>0. && dz<= dzmax){
1742 ISvcLocator *svcLocator = Gaudi::svcLocator();
1744 if(svcLocator->service(
"DetectorStore",
detStore,
false) == StatusCode::FAILURE){
1745 throw std::runtime_error(
"Error in EMECSupportConstruction/extracyl, cannot access DetectorStore");
1748 if (
detStore->retrieve(materialManager, std::string(
"MATERIALS")).isFailure()) {
1749 throw std::runtime_error(
"Error in EMECSupportConstruction: cannot find MATERIALS.");
1752 const std::string& material=(*m_DB_emecExtraCyl)[
i]->getString(
"MATERIAL");
1755 throw std::runtime_error(
"Error in EMECSupportConstruction/extracyl,material for CylBeforePS is not found.");
1758 std::string
id =
"ExtraCyl_afterPS";
1762 GeoLogVol *logicCyl =
new GeoLogVol(
name, solidCyl,
mat);
1763 GeoIntrusivePtr<GeoPhysVol>physCyl =
new GeoPhysVol(logicCyl);
1765 motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(dz/2.)));
1766 motherPhysical->add(physCyl);
1768 std::cout<<
"******************************************************"<<std::endl;
1769 std::cout<<
" EMECSupportConstruction insert extra material after PS"<<std::endl;
1770 std::cout<<
" ExtraCyl params: name,mat= "<<
name<<
" "<<
mat->getName()
1771 <<
" rmin,rmax,dzthick,zpos="<<rmin<<
" "<<rmax<<
" "<<dz<<
" "<<dz/2.
1774 std::cout<<
"******************************************************"<<std::endl;
1792 std::string
id =
"FrontBoard";
1794 std::string
idx =
id +
"I";
1797 double rmax = getNumber(
m_DB_tubes, tubes,
idx,
"RMAX", 1025.-4. - 15.);
1799 double rmin = getNumber(
m_DB_tubes, tubes,
idx,
"RMIN", 614.-2. + 57.);
1800 double dz_boards = getNumber(
m_DB_tubes, tubes,
idx,
"DZ", 1.);
1801 double phi_size =
M_PI / getNumber(
m_DB_numbers, fbn,
"PhiSizeDiv",
"PARVALUE", 16.);
1802 double phi_start = -0.5 * phi_size;
1803 GeoTubs *bi_shape =
new GeoTubs(rmin, rmax, dz_boards, phi_start, phi_size);
1804 GeoLogVol *bi_l =
new GeoLogVol(
name, bi_shape,
m_Gten);
1805 GeoIntrusivePtr<GeoPhysVol>bi_phys =
new GeoPhysVol(bi_l);
1806 double z_boards = getNumber(
m_DB_numbers, fbn,
"Zdist",
"PARVALUE", 29.) - dz_boards;
1810 rmin = getNumber(
m_DB_tubes, tubes,
idx,
"RMIN", 1025.-4. + 15.);
1811 rmax = getNumber(
m_DB_tubes, tubes,
idx,
"RMAX", (1565.-5. - 15.));
1813 GeoTubs *bm_shape =
new GeoTubs(rmin, rmax, dz_boards, phi_start, phi_size);
1814 GeoLogVol *bm_l =
new GeoLogVol(
name, bm_shape,
m_Gten);
1815 GeoIntrusivePtr<GeoPhysVol>bm_phys =
new GeoPhysVol(bm_l);
1819 rmin = getNumber(
m_DB_tubes, tubes,
idx,
"RMIN", (1565.-5. + 15.));
1820 rmax = getNumber(
m_DB_tubes, tubes,
idx,
"RMAX", (1961.-7.));
1822 GeoTubs *bo_shape =
new GeoTubs(rmin, rmax, dz_boards, phi_start, phi_size);
1823 GeoLogVol *bo_l =
new GeoLogVol(
name, bo_shape,
m_Gten);
1824 GeoIntrusivePtr<GeoPhysVol>bo_phys =
new GeoPhysVol(bo_l);
1828 double z_mb = z_boards - dz_boards;
1829 std::string mb_n[5] = {
"F1",
"F2",
"F3",
"F4",
"F5" };
1830 const double mb_dy[5] = { 74., 57., 57., 60., 44. };
1831 const double mb_dx[5] = { 38.5, 60., 138.5, 100., 165. };
1832 const double mb_dz_cu[5] = { .1, .15, .15, .15, .2 };
1834 double mb_r[5] = { (1739.-5.) , (1640.-5.), (1400.-4.), (1140. - 4.), (835.-1.)};
1835 double mb_dz[5] = { 1.4, 1.1, 1.25, 1.1, 1.25 };
1837 GeoIntrusivePtr<GeoPhysVol>mb_p[5];
1838 for(
int i = 0;
i < 5; ++
i){
1839 idx =
id +
"::" + mb_n[
i];
1844 GeoBox *mb_s =
new GeoBox(
dx,
dy, mb_dz[
i]);
1845 GeoLogVol *mb_l =
new GeoLogVol(
name, mb_s,
m_Gten);
1846 mb_p[
i] =
new GeoPhysVol(mb_l);
1849 std::ostringstream
tmp;
1850 tmp <<
"Cu" << (
i + 1) <<
"z";
1851 double dz1 = getNumber(
m_DB_numbers, mbn,
tmp.str(),
"PARVALUE", mb_dz_cu[
i]);
1852 GeoBox *cu =
new GeoBox(
dx,
dy, dz1);
1854 GeoIntrusivePtr<GeoPhysVol>cup =
new GeoPhysVol(cul);
1855 mb_p[
i]->add(
new GeoTransform(GeoTrf::TranslateZ3D(dz1 - mb_dz[
i])));
1859 tmp <<
"R" << (
i + 1);
1865 idx =
id +
"::Outer";
1871 GeoTubs *oc_s =
new GeoTubs(rmin, rmax, dz_oc, phi_start, phi_size);
1872 GeoLogVol *oc_l =
new GeoLogVol(
name, oc_s,
m_Cable);
1873 GeoIntrusivePtr<GeoPhysVol>oc_p =
new GeoPhysVol(oc_l);
1874 double z_oc = z_boards - dz_boards - dz_oc;
1876 idx =
id +
"::SideOuter";
1878 double dz_soc = getNumber(
m_DB_tubes, tubes,
idx,
"DZ", 1.2);
1881 double dphi_sc = getNumber(
m_DB_numbers, fcson,
"Width",
"PARVALUE", 100.) / rmax;
1882 GeoTubs *soc_s =
new GeoTubs(rmin, rmax, dz_soc, -0.5 * dphi_sc, dphi_sc);
1883 GeoLogVol *soc_l =
new GeoLogVol(
name, soc_s,
m_Cable);
1884 GeoIntrusivePtr<GeoPhysVol>soc_p =
new GeoPhysVol(soc_l);
1886 double z_soc = getNumber(
m_DB_numbers, fcson,
"Zdist",
"PARVALUE", 9.) - dz_soc;
1888 const int number_of_sectors =
m_isModule? 4: 32;
1889 for(
int i = 0;
i < number_of_sectors; ++
i){
1892 GeoIdentifierTag* iTag =
new GeoIdentifierTag(
i);
1894 GeoTransform* xf1 =
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_oc)*GeoTrf::RotateZ3D(
phi)));
1896 motherPhysical->add(iTag);
1897 motherPhysical->add(xf);
1898 motherPhysical->add(bi_phys);
1900 motherPhysical->add(iTag);
1901 motherPhysical->add(xf);
1902 motherPhysical->add(bm_phys);
1904 motherPhysical->add(iTag);
1905 motherPhysical->add(xf);
1906 motherPhysical->add(bo_phys);
1908 motherPhysical->add(iTag);
1909 motherPhysical->add(xf1);
1910 motherPhysical->add(oc_p);
1912 for(
int j = 0; j < 5; ++ j){
1913 GeoTransform* xf2 =
new GeoTransform(
1915 motherPhysical->add(iTag);
1916 motherPhysical->add(xf2);
1917 motherPhysical->add(mb_p[j]);
1920 GeoTransform* xf3 =
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_soc)*GeoTrf::RotateZ3D(
m_Position + (
i - 2) * phi_size + 0.5 * dphi_sc)));;
1922 GeoTransform* xf4 =
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_soc)*GeoTrf::RotateZ3D(
m_Position + (
i - 1) * phi_size - 0.5 * dphi_sc)));
1924 motherPhysical->add(
new GeoIdentifierTag(
i * 2));
1925 motherPhysical->add(xf3);
1926 motherPhysical->add(soc_p);
1928 motherPhysical->add(
new GeoIdentifierTag(
i * 2 + 1));
1929 motherPhysical->add(xf4);
1930 motherPhysical->add(soc_p);
1936 std::string
id =
"FrontSupportMother";
1938 GeoPcon *motherShape =
getPcon(
id +
"::Inner");
1939 GeoLogVol *motherLogical =
new GeoLogVol(
name, motherShape,
m_LAr);
1940 GeoIntrusivePtr<GeoPhysVol>motherPhysical =
new GeoPhysVol(motherLogical);
1946 return motherPhysical;
1951 std::string
id =
"BackSupportMother";
1953 GeoPcon *motherShape =
getPcon(
id +
"::Inner");
1954 GeoLogVol *motherLogical =
new GeoLogVol(
name, motherShape,
m_LAr);
1955 GeoIntrusivePtr<GeoPhysVol>motherPhysical =
new GeoPhysVol(motherLogical);
1961 return motherPhysical;
1966 std::string
id =
"FrontSupportMother";
1968 GeoPcon *motherShape =
getPcon(
id +
"::Outer");
1969 GeoLogVol *motherLogical =
new GeoLogVol(
name, motherShape,
m_LAr);
1970 GeoIntrusivePtr<GeoPhysVol>motherPhysical=
new GeoPhysVol(motherLogical);
1979 return motherPhysical;
1984 std::string
id =
"BackSupportMother";
1986 GeoPcon *motherShape =
getPcon(
id +
"::Outer");
1987 GeoLogVol *motherLogical =
new GeoLogVol(
name, motherShape,
m_LAr);
1988 GeoIntrusivePtr<GeoPhysVol>motherPhysical=
new GeoPhysVol(motherLogical);
1996 return motherPhysical;