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" 
   93                          std::string 
basename, 
double position)
 
   96   , m_pos_zside(pos_zside)
 
   97   , m_isModule(is_module)
 
   99   , m_Position(position)
 
  101     ISvcLocator *svcLocator = Gaudi::svcLocator();
 
  102     SmartIF<StoreGateSvc> 
detStore{svcLocator->service(
"DetectorStore")};
 
  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.");
 
  151     SmartIF<IGeoModelSvc> geoModel{svcLocator->service(
"GeoModelSvc")};
 
  152     if(!geoModel.isValid())
 
  153       throw std::runtime_error(
"Error cannot access GeoModelSvc");
 
  154     SmartIF<IRDBAccessSvc> rdbAccess{svcLocator->service(
"RDBAccessSvc")};
 
  155     if(!rdbAccess.isValid())
 
  156       throw std::runtime_error(
"Error cannot access RDBAccessSvc");
 
  160     std::string LArVersion   = geoModel->LAr_VersionOverride();
 
  161     std::string detectorKey  = LArVersion.empty() ? 
AtlasVersion : LArVersion;
 
  162     std::string detectorNode = LArVersion.empty() ? 
"ATLAS" : 
"LAr";
 
  163     m_DB_emecExtraCyl = rdbAccess->getRecordsetPtr(
"LArCones",detectorKey, detectorNode);
 
  169         rdbAccess->getRecordsetPtr(
"EmecGeometry", larVersionKey.
tag(), larVersionKey.
node());
 
  171         m_DB_EmecGeometry = rdbAccess->getRecordsetPtr(
"EmecGeometry", 
"EmecGeometry-00");
 
  175         rdbAccess->getRecordsetPtr(
"EmecWheelParameters", larVersionKey.
tag(), larVersionKey.
node());
 
  180     m_DB_boxes = rdbAccess->getRecordsetPtr(
"EmecDMBoxes", larVersionKey.
tag(), larVersionKey.
node());
 
  182         m_DB_boxes = rdbAccess->getRecordsetPtr(
"EmecDMBoxes", 
"EmecDMBoxes-00");
 
  184     m_DB_numbers = rdbAccess->getRecordsetPtr(
"EmecDMNumbers", larVersionKey.
tag(), larVersionKey.
node());
 
  186         m_DB_numbers = rdbAccess->getRecordsetPtr(
"EmecDMNumbers", 
"EmecDMNumbers-00");
 
  188     m_DB_tubes = rdbAccess->getRecordsetPtr(
"EmecDMTubes", larVersionKey.
tag(), larVersionKey.
node());
 
  190         m_DB_tubes = rdbAccess->getRecordsetPtr(
"EmecDMTubes", 
"EmecDMTubes-00");
 
  192     m_DB_pcons = rdbAccess->getRecordsetPtr(
"EmecDMPCons", larVersionKey.
tag(), larVersionKey.
node());
 
  194         m_DB_pcons = rdbAccess->getRecordsetPtr(
"EmecDMPCons", 
"EmecDMPCons-00");
 
  197     m_DB_mn = rdbAccess->getRecordsetPtr(
"EmecMagicNumbers", larVersionKey.
tag(), larVersionKey.
node());
 
  199         m_DB_mn = rdbAccess->getRecordsetPtr(
"EmecMagicNumbers", 
"EmecMagicNumbers-00");
 
  202     m_DB_EmecFan = rdbAccess->getRecordsetPtr(
"EmecFan", larVersionKey.
tag(), larVersionKey.
node());
 
  204       m_DB_EmecFan = rdbAccess->getRecordsetPtr(
"EmecFan", 
"EmecFan-00");
 
  215   for(
unsigned int i = 0; 
i < 
db->size(); ++ 
i) {
 
  216     const std::string& 
key = (*db)[
i]->getString(
s);
 
  225   for(
unsigned int i = 0; 
i < 
db->size(); ++ 
i) {
 
  226     const std::string& 
object = (*db)[
i]->getString(
"OBJECTNAME");
 
  228       const std::string& 
key = (*db)[
i]->getString(
"PARNAME");
 
  236                       const char *
number, 
double defval)
 const 
  238   map_t::const_iterator 
i = 
m.find(
idx);
 
  243   double value = (*db)[(*i).second]->getDouble(
number);
 
  244   assert(
value == defval);
 
  249                       const std::string ¶meter, 
double defval)
 const 
  251   for(
unsigned int i = 0; 
i < 
db->size(); ++ 
i){
 
  252     const std::string& 
object = (*db)[
i]->getString(
"OBJECTNAME");
 
  254       const std::string& 
key = (*db)[
i]->getString(
"PARNAME");
 
  255       if(
key == parameter){
 
  256     double value = (*db)[
i]->getDouble(
"PARVALUE");
 
  257     assert(
value == defval);
 
  262   ATH_MSG_WARNING(
"Cannot get " << 
s << 
"/" << parameter << 
" from DB_numbers" 
  263           << 
", default is " << defval);
 
  285             << 
" null pointer returned");
 
  295     std::vector<double> zplane, rmin, rmax;
 
  297     std::string id1 = 
id;
 
  298     if(
id.starts_with( 
"FrontSupportMother")) id1 = 
"FrontSupportMother";
 
  299     else if(
id.starts_with( 
"BackSupportMother")) id1 = 
"BackSupportMother";
 
  300     else if(
id.
find(
"Stretchers") != std::string::npos) id1 = 
"Stretchers";
 
  301     else if(
id == 
"FrontMiddleRing::LowerHole") id1 = 
"FrontMiddleRing::LH";
 
  302     else if(
id == 
"FrontMiddleRing::LowerGTen") id1 = 
"FrontMiddleRing::LGT";
 
  303     else if(
id == 
"FrontMiddleRing::UpperHole") id1 = 
"FrontMiddleRing::UH";
 
  304     else if(
id == 
"FrontMiddleRing::UpperGTen") id1 = 
"FrontMiddleRing::UGT";
 
  305     else if(
id == 
"BackMiddleRing::LowerHole") id1 = 
"BackMiddleRing::LH";
 
  306     else if(
id == 
"BackMiddleRing::LowerGTen") id1 = 
"BackMiddleRing::LGT";
 
  307     else if(
id == 
"BackMiddleRing::UpperHole") id1 = 
"BackMiddleRing::UH";
 
  308     else if(
id == 
"BackMiddleRing::UpperGTen") id1 = 
"BackMiddleRing::UGT";
 
  310     std::map<int, unsigned int> pcone;
 
  314         const std::string& 
object = (*m_DB_pcons)[
i]->getString(
"PCONNAME");
 
  316             int key = (*m_DB_pcons)[
i]->getInt(
"NZPLANE");
 
  317             if(pcone.find(
key) != pcone.end()){
 
  323             if(
key >= 0) ++ nzplanes;
 
  328         zplane.resize(nzplanes); rmin.resize(nzplanes); rmax.resize(nzplanes);
 
  329         for(
int n = 0; 
n < nzplanes; ++ 
n){
 
  334         if(id1 == 
"FrontSupportMother"){
 
  335             if(
id.
find(
"Inner") != std::string::npos){
 
  336                 zplane.resize(2); rmin.resize(2); rmax.resize(2);
 
  340             } 
else if(
id.
find(
"Outer") != std::string::npos){
 
  346         if(id1 == 
"BackSupportMother"){
 
  347             if(
id.
find(
"Inner") != std::string::npos){
 
  348                 zplane.resize(2); rmin.resize(2); rmax.resize(2);
 
  352             } 
else if(
id.
find(
"Outer") != std::string::npos){
 
  358         if(id1 == 
"Stretchers"){
 
  359             if(
id == 
"WideStretchers"){
 
  364             if(
id == 
"NarrowStretchers"){
 
  373 std::cout << 
"!!!! " << 
id << 
":" << std::endl;
 
  374 for(
int i = 0; 
i < nzplanes; ++ 
i){
 
  375     std::cout << 
"\t" << 
i << 
" " << zplane[
i] << 
" " << rmin[
i] << 
" " << rmax[
i] << std::endl;
 
  379           if(
id.starts_with( 
"FrontSupportMother")){
 
  380         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  387         if(
id == 
"FrontSupportMother::Outer"){
 
  391         if(
id == 
"FrontSupportMother::Inner"){
 
  392             zplane.resize(2); rmin.resize(2); rmax.resize(2);
 
  396     } 
else if(
id.starts_with( 
"BackSupportMother")){
 
  397         zplane.resize(4);  rmin.resize(4);    rmax.resize(4);
 
  402         if(
id == 
"BackSupportMother::Outer"){
 
  406         if(
id == 
"BackSupportMother::Inner"){
 
  407             zplane.resize(2); rmin.resize(2); rmax.resize(2);
 
  411     } 
else if(
id == 
"WideStretchers" || 
id == 
"NarrowStretchers"){
 
  417         double rmidS = rminS + drnotch;
 
  418         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  419         zplane[0] = -dzS ; rmin[0] = rminS; rmax[0] = rmaxS;
 
  420         zplane[1] = -dznotch; rmin[1] = rminS; rmax[1] = rmaxS;
 
  421         zplane[2] = -dznotch; rmin[2] = rmidS; rmax[2] = rmaxS;
 
  422         zplane[3] =  dznotch; rmin[3] = rmidS; rmax[3] = rmaxS;
 
  423         zplane[4] = dznotch; rmin[4] = rminS; rmax[4] = rmaxS;
 
  424         zplane[5] = dzS  ; rmin[5] = rminS; rmax[5] = rmaxS;
 
  425         if(
id == 
"WideStretchers"){
 
  430         if(
id == 
"NarrowStretchers"){
 
  436     } 
else if(
id == 
"OuterSupportMother"){
 
  442         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  443         zplane[0] = -dzOTB ; rmin[0] = rminOTB; rmax[0] = rmaxOTB;
 
  444         zplane[1] = -dzS; rmin[1] = rminOTB; rmax[1] = rmaxOTB;
 
  445         zplane[2] = -dzS; rmin[2] = rminOTB; rmax[2] = rmaxS;
 
  446         zplane[3] =  dzS; rmin[3] = rminOTB; rmax[3] = rmaxS;
 
  447         zplane[4] = dzS; rmin[4] = rminOTB; rmax[4] = rmaxOTB;
 
  448         zplane[5] = dzOTB  ; rmin[5] = rminOTB; rmax[5] = rmaxOTB;
 
  449     } 
else if(
id == 
"FrontMiddleRing"){
 
  451         zplane.resize(4);  rmin.resize(4);    rmax.resize(4);
 
  456     } 
else if(
id == 
"FrontMiddleRing::LowerHole"){
 
  458         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  465     } 
else if(
id == 
"FrontMiddleRing::LowerGTen"){
 
  467         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  474     } 
else if(
id == 
"FrontMiddleRing::UpperHole"){
 
  476         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  483     } 
else if(
id == 
"FrontMiddleRing::UpperGTen"){
 
  485         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  492     } 
else if(
id == 
"FrontInnerRing"){
 
  494         zplane.resize(5);  rmin.resize(5);    rmax.resize(5);
 
  500     } 
else if(
id == 
"FrontInnerRing::Hole"){
 
  502         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  509     } 
else if(
id == 
"FrontInnerRing::GTen"){
 
  511         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  518     } 
else if(
id == 
"BackMiddleRing"){
 
  520         zplane.resize(4);  rmin.resize(4);    rmax.resize(4);
 
  525     } 
else if(
id == 
"BackMiddleRing::LowerHole"){
 
  527         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  535     } 
else if(
id == 
"BackMiddleRing::LowerGTen"){
 
  537         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  544     } 
else if(
id == 
"BackMiddleRing::UpperHole"){
 
  546         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  553     } 
else if(
id == 
"BackMiddleRing::UpperGTen"){
 
  555         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  562     } 
else if(
id == 
"BackInnerRing"){
 
  564         zplane.resize(4);  rmin.resize(4);    rmax.resize(4);
 
  569     } 
else if(
id == 
"BackInnerRing::Hole"){
 
  571         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  578     } 
else if(
id == 
"BackInnerRing::GTen"){
 
  580         zplane.resize(6);  rmin.resize(6);    rmax.resize(6);
 
  587     } 
else if(
id == 
"FrontOuterRing"){
 
  589         zplane.resize(7);  rmin.resize(7);    rmax.resize(7);
 
  597     } 
else if(
id == 
"FrontOuterLongBar"){
 
  598         zplane.resize(4);  rmin.resize(4);    rmax.resize(4);
 
  604     } 
else if(
id == 
"BackOuterRing"){
 
  606         zplane.resize(7);  rmin.resize(7);    rmax.resize(7);
 
  614     } 
else if(
id == 
"BackOuterLongBar"){
 
  615         zplane.resize(4);  rmin.resize(4);    rmax.resize(4);
 
  621         throw std::runtime_error(
"EMECSupportConstruction: wrong Pcone id");
 
  626     GeoPcon* shape = 
new GeoPcon(phi_start, phi_size);
 
  627     for(
size_t i = 0; 
i < zplane.size(); ++ 
i){
 
  628         shape->addPlane(zplane[
i], rmin[
i], rmax[
i]);
 
  636     std::string 
id = 
"FrontSupportMother";
 
  638     GeoPcon *motherShape = 
getPcon(
id);
 
  639     GeoLogVol *motherLogical = 
new GeoLogVol(
name, motherShape, 
m_LAr);
 
  640     GeoIntrusivePtr<GeoPhysVol>motherPhysical= 
new GeoPhysVol(motherLogical);
 
  653     return motherPhysical;
 
  658     std::string 
id = 
"BackSupportMother";
 
  660     GeoPcon *motherShape = 
getPcon(
id);
 
  661     GeoLogVol *motherLogical = 
new GeoLogVol(
name, motherShape, 
m_LAr);
 
  662     GeoIntrusivePtr<GeoPhysVol>motherPhysical= 
new GeoPhysVol(motherLogical);
 
  673     return motherPhysical;
 
  679         const double coldContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ABSORBERCONTRACTION");
 
  680         const double electrodeInvColdContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ELECTRODEINVCONTRACTION");
 
  681         const double leadThicknessOuter=(*m_DB_EmecFan)[0]->getDouble(
"LEADTHICKNESSOUTER")*
Gaudi::Units::mm;
 
  682         const double steelThickness=(*m_DB_EmecFan)[0]->getDouble(
"STEELTHICKNESS")*
Gaudi::Units::mm;
 
  683         const double glueThickness=(*m_DB_EmecFan)[0]->getDouble(
"GLUETHICKNESS")*
Gaudi::Units::mm;
 
  684         const double electrodeTotalThickness=(*m_DB_EmecFan)[0]->getDouble(
"ELECTRODETOTALTHICKNESS")*
Gaudi::Units::mm;
 
  686         const double outerAbsorberDy=(leadThicknessOuter/2+steelThickness+glueThickness)*coldContraction;
 
  687         const double electrodeDy=electrodeTotalThickness/2/electrodeInvColdContraction;
 
  689     std::string 
id = 
"FrontOuterBarrettes";
 
  699     GeoLogVol *logicalFOB = 
new GeoLogVol(
name, shapeFOB, 
m_LAr);
 
  700     GeoIntrusivePtr<GeoPhysVol>physFOB = 
new GeoPhysVol(logicalFOB);
 
  701     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(zposFOB)));
 
  702     motherPhysical->add(physFOB);
 
  704     const int number_of_modules = 8;
 
  706     const int nofabs = (*m_DB_EmecWheelParameters)[1]->getInt(
"NABS");
 
  707     const int nofdiv = nofabs / number_of_modules;
 
  711     GeoTubs *shapeFOBMP = 
new GeoTubs(rminFOB, rmaxFOB, dzFOB, -dfi/4., dfi);
 
  712     GeoLogVol *logicalFOBMP = 
new GeoLogVol(
name, shapeFOBMP, 
m_LAr);
 
  713     GeoIntrusivePtr<GeoPhysVol>physFOBMP = 
new GeoPhysVol(logicalFOBMP);
 
  720     assert(rmn + 
dr > rminFOB && rmn + 
dr + 
dx*2 < rmaxFOB);
 
  722     const double r0A = rmn + 
dr + 
dx;
 
  723     GeoBox *shapeFOBA = 
new GeoBox(
dx, outerAbsorberDy, dzFOB);
 
  725     GeoIntrusivePtr<GeoPhysVol>physFOBA = 
new GeoPhysVol(logicalFOBA);
 
  726     physFOBMP->add(
new GeoTransform(GeoTrf::TranslateX3D(r0A)));
 
  727     physFOBMP->add(physFOBA);
 
  732     assert(rmn + 
dr > rminFOB && rmn + 
dr + 
dx*2 < rmaxFOB);
 
  734     const double r0E = rmn + 
dr + 
dx;
 
  735     double x0 = r0E * 
cos(dfi/2.);
 
  736     double y0 = r0E * 
sin(dfi/2.);
 
  737     GeoBox *shapeFOBE = 
new GeoBox(
dx, electrodeDy, dzFOB);
 
  739     GeoIntrusivePtr<GeoPhysVol>physFOBE = 
new GeoPhysVol(logicalFOBE);
 
  740     physFOBMP->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(dfi/2.))));
 
  741     physFOBMP->add(physFOBE);
 
  745         for(
int i = 0; 
i < nofdiv - 1; ++ 
i){
 
  747             physFOB->add(
new GeoIdentifierTag(
i));
 
  748             physFOB->add(
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
  749             physFOB->add(physFOBMP);
 
  752         double fi = 
m_PhiStart + dfi/2.+ (nofdiv-1) * dfi;
 
  755         physFOB->add(
new GeoIdentifierTag(nofdiv-1));
 
  756         physFOB->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(fi))));
 
  757         physFOB->add(physFOBA);
 
  762         GeoTubs *shapeFOBM = 
new GeoTubs(rminFOB, rmaxFOB, dzFOB, -dfi/4., moduldfi);
 
  763         GeoLogVol *logicalFOBM = 
new GeoLogVol(
name, shapeFOBM, 
m_LAr);
 
  764         GeoIntrusivePtr<GeoPhysVol>physFOBM = 
new GeoPhysVol(logicalFOBM);
 
  767         for(
int i = 0; 
i < nofdiv; ++ 
i){
 
  769             physFOBM->add(
new GeoIdentifierTag(
i));
 
  770             physFOBM->add(
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
  771             physFOBM->add(physFOBMP);
 
  775         for(
int i = 0; 
i < number_of_modules; ++ 
i){
 
  776             double fi = dfi/2.+ 
i * moduldfi;
 
  777             physFOB->add(
new GeoIdentifierTag(
i));
 
  778             physFOB->add(
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
  779             physFOB->add(physFOBM);
 
  787         const double coldContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ABSORBERCONTRACTION");
 
  788         const double electrodeInvColdContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ELECTRODEINVCONTRACTION");
 
  789         const double leadThicknessInner=(*m_DB_EmecFan)[0]->getDouble(
"LEADTHICKNESSINNER")*
Gaudi::Units::mm;
 
  790         const double steelThickness=(*m_DB_EmecFan)[0]->getDouble(
"STEELTHICKNESS")*
Gaudi::Units::mm;
 
  791         const double glueThickness=(*m_DB_EmecFan)[0]->getDouble(
"GLUETHICKNESS")*
Gaudi::Units::mm;
 
  792         const double electrodeTotalThickness=(*m_DB_EmecFan)[0]->getDouble(
"ELECTRODETOTALTHICKNESS")*
Gaudi::Units::mm;
 
  794         const double innerAbsorberDy=(leadThicknessInner/2+steelThickness+glueThickness)*coldContraction;
 
  795         const double electrodeDy=electrodeTotalThickness/2/electrodeInvColdContraction;
 
  797     std::string 
id = 
"FrontInnerBarrettes";
 
  808     GeoLogVol *logicalFIB = 
new GeoLogVol(
name, shapeFIB, 
m_LAr);
 
  809     GeoIntrusivePtr<GeoPhysVol>physFIB = 
new GeoPhysVol(logicalFIB);
 
  810     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(zposFIB)));
 
  811     motherPhysical->add(physFIB);
 
  813     const int number_of_modules = 8;
 
  815     const int nofabs = (*m_DB_EmecWheelParameters)[0]->getInt(
"NABS");
 
  816     const int nofdiv = nofabs / number_of_modules;
 
  820     GeoTubs *shapeFIBMP = 
new GeoTubs(rminFIB,rmaxFIB,dzFIB, -dfi/4., dfi);
 
  821     GeoLogVol *logicalFIBMP = 
new GeoLogVol(
name, shapeFIBMP, 
m_LAr);
 
  822     GeoIntrusivePtr<GeoPhysVol>physFIBMP = 
new GeoPhysVol(logicalFIBMP);
 
  828     assert(rmn + 
dr > rminFIB && rmn + 
dr + 
dx*2 < rmaxFIB);
 
  830     const double r0A = rmn + 
dr + 
dx;
 
  831     GeoBox *shapeFIBA = 
new GeoBox(
dx, innerAbsorberDy, dzFIB);
 
  833     GeoIntrusivePtr<GeoPhysVol>physFIBA = 
new GeoPhysVol(logicalFIBA);
 
  834     physFIBMP->add(
new GeoTransform(GeoTrf::TranslateX3D(r0A)));
 
  835     physFIBMP->add(physFIBA);
 
  840     assert(rmn + 
dr > rminFIB && rmn + 
dr + 
dx*2 < rmaxFIB);
 
  842     const double r0E = rmn + 
dr + 
dx;
 
  843     double x0 = r0E * 
cos(dfi/2.);
 
  844     double y0 = r0E * 
sin(dfi/2.);
 
  845     GeoBox *shapeFIBE = 
new GeoBox(
dx, electrodeDy, dzFIB);
 
  847     GeoIntrusivePtr<GeoPhysVol>physFIBE = 
new GeoPhysVol(logicalFIBE);
 
  848     physFIBMP->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(dfi/2.))));
 
  849     physFIBMP->add(physFIBE);
 
  853         for(
int i = 0; 
i < nofdiv - 1; ++ 
i){
 
  855             physFIB->add(
new GeoIdentifierTag(
i));
 
  856             physFIB->add(
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
  857             physFIB->add(physFIBMP);
 
  860         double fi = 
m_PhiStart + dfi/2.+ (nofdiv-1) * dfi;
 
  863         physFIB->add(
new GeoIdentifierTag(nofdiv-1));
 
  864         physFIB->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(fi))));
 
  865         physFIB->add(physFIBA);
 
  870         GeoTubs *shapeFIBM = 
new GeoTubs(rminFIB, rmaxFIB, dzFIB, -dfi/4., moduldfi);
 
  871         GeoLogVol *logicalFIBM = 
new GeoLogVol(
name, shapeFIBM, 
m_LAr);
 
  872         GeoIntrusivePtr<GeoPhysVol>physFIBM = 
new GeoPhysVol(logicalFIBM);
 
  874         for(
int i = 0; 
i < nofdiv; ++ 
i){
 
  876             physFIBM->add(
new GeoIdentifierTag(
i));
 
  877             physFIBM->add(
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
  878             physFIBM->add(physFIBMP);
 
  882         for(
int i = 0; 
i < number_of_modules; ++ 
i){
 
  883             double fi = dfi/2.+ 
i * moduldfi;
 
  884             physFIB->add(
new GeoIdentifierTag(
i));
 
  885             physFIB->add(
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
  886             physFIB->add(physFIBM);
 
  895         const double coldContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ABSORBERCONTRACTION");
 
  896         const double electrodeInvColdContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ELECTRODEINVCONTRACTION");
 
  897         const double leadThicknessOuter=(*m_DB_EmecFan)[0]->getDouble(
"LEADTHICKNESSOUTER")*
Gaudi::Units::mm;
 
  898         const double steelThickness=(*m_DB_EmecFan)[0]->getDouble(
"STEELTHICKNESS")*
Gaudi::Units::mm;
 
  899         const double glueThickness=(*m_DB_EmecFan)[0]->getDouble(
"GLUETHICKNESS")*
Gaudi::Units::mm;
 
  900         const double electrodeTotalThickness=(*m_DB_EmecFan)[0]->getDouble(
"ELECTRODETOTALTHICKNESS")*
Gaudi::Units::mm;
 
  902         const double outerAbsorberDy=(leadThicknessOuter/2+steelThickness+glueThickness)*coldContraction;
 
  903         const double electrodeDy=electrodeTotalThickness/2/electrodeInvColdContraction;
 
  905     const std::string 
id = 
"BackOuterBarrettes";
 
  912     std::string 
name = baseName + 
id;
 
  919     GeoLogVol *logicalBOB = 
new GeoLogVol(
name, shapeBOB, 
m_LAr);
 
  920     GeoIntrusivePtr<GeoPhysVol>physBOB = 
new GeoPhysVol(logicalBOB);
 
  921     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(zposBOB)));
 
  922     motherPhysical->add(physBOB);
 
  924     const int number_of_modules = 8;
 
  926     int nofabs = (*m_DB_EmecWheelParameters)[1]->getInt(
"NABS");
 
  927     int nofdiv = nofabs / number_of_modules;
 
  930     name = baseName + 
"BackOuterBarrette::Module::Phidiv";
 
  931     GeoTubs *shapeBOBMP = 
new GeoTubs(rminBOB, rmaxBOB, dzBOB, -dfi/4., dfi);
 
  932     GeoLogVol *logicalBOBMP = 
new GeoLogVol(
name, shapeBOBMP, 
m_LAr);
 
  933     GeoIntrusivePtr<GeoPhysVol>physBOBMP = 
new GeoPhysVol(logicalBOBMP);
 
  935     name = baseName + 
"BackOuterBarrette::Abs";  
 
  939     assert(rmn + 
dr > rminBOB && rmn + 
dr + 
dx * 2 < rmaxBOB);
 
  941     const double r0A = rmn + 
dr + 
dx;
 
  942     GeoBox *shapeBOBA = 
new GeoBox(
dx, outerAbsorberDy, dzBOB);
 
  944     GeoIntrusivePtr<GeoPhysVol>physBOBA = 
new GeoPhysVol(logicalBOBA);
 
  945     physBOBMP->add(
new GeoTransform(GeoTrf::TranslateX3D(r0A)));
 
  946     physBOBMP->add(physBOBA);
 
  948     name = baseName + 
"BackOuterBarrette::Ele";   
 
  951     assert(rmn + 
dr > rminBOB && rmn + 
dr + 
dx*2 < rmaxBOB);
 
  953     double r0E = rmn + 
dr + 
dx;
 
  954     double y0 = r0E * 
sin(dfi/2.);
 
  955     double x0 = r0E * 
cos(dfi/2.);
 
  956     GeoBox *shapeBOBE = 
new GeoBox(
dx, electrodeDy, dzBOB);
 
  958     GeoIntrusivePtr<GeoPhysVol>physBOBE = 
new GeoPhysVol(logicalBOBE);
 
  959     physBOBMP->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(dfi/2.))));
 
  960     physBOBMP->add(physBOBE);
 
  964         name = baseName + 
"BackOuterBarrette::Module::Phidiv";
 
  965         for(
int i = 0; 
i < nofdiv - 1; ++ 
i){
 
  967             physBOB->add(
new GeoIdentifierTag(
i));
 
  968             physBOB->add(
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
  969             physBOB->add(physBOBMP);
 
  971         name = baseName + 
"BackOuterBarrette::Abs";
 
  972         double fi = 
m_PhiStart + dfi/2.+ (nofdiv - 1) * dfi;
 
  975         physBOB->add(
new GeoIdentifierTag(nofdiv - 1));
 
  976         physBOB->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(fi))));
 
  977         physBOB->add(physBOBA);
 
  982         GeoTubs *shapeBOBM = 
new GeoTubs(rminBOB, rmaxBOB, dzBOB, -dfi/4.,moduldfi);
 
  983         GeoLogVol *logicalBOBM = 
new GeoLogVol(
name, shapeBOBM, 
m_LAr);
 
  984         GeoIntrusivePtr<GeoPhysVol>physBOBM = 
new GeoPhysVol(logicalBOBM);
 
  986         name = baseName + 
"BackOuterBarrette::Module::Phidiv";
 
  987         for(
int i = 0; 
i < nofdiv; ++ 
i){
 
  989             physBOBM->add(
new GeoIdentifierTag(
i));
 
  990             physBOBM->add(
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
  991             physBOBM->add(physBOBMP);
 
  994         name = baseName + 
"BackOuterBarrette::Module";
 
  995         for(
int i = 0; 
i < number_of_modules; ++ 
i){
 
  996             double fi = dfi/2.+ 
i * moduldfi;
 
  997             physBOB->add(
new GeoIdentifierTag(
i));
 
  998             physBOB->add(
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
  999             physBOB->add(physBOBM);
 
 1006         const double coldContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ABSORBERCONTRACTION");
 
 1007         const double electrodeInvColdContraction=(*m_DB_ColdContraction)[0]->getDouble(
"ELECTRODEINVCONTRACTION");
 
 1008         const double leadThicknessInner=(*m_DB_EmecFan)[0]->getDouble(
"LEADTHICKNESSINNER")*
Gaudi::Units::mm;
 
 1009         const double steelThickness=(*m_DB_EmecFan)[0]->getDouble(
"STEELTHICKNESS")*
Gaudi::Units::mm;
 
 1010         const double glueThickness=(*m_DB_EmecFan)[0]->getDouble(
"GLUETHICKNESS")*
Gaudi::Units::mm;
 
 1011         const double electrodeTotalThickness=(*m_DB_EmecFan)[0]->getDouble(
"ELECTRODETOTALTHICKNESS")*
Gaudi::Units::mm;
 
 1013         const double innerAbsorberDy=(leadThicknessInner/2+steelThickness+glueThickness)*coldContraction;
 
 1014         const double electrodeDy=electrodeTotalThickness/2/electrodeInvColdContraction;
 
 1018     std::string 
id = 
"BackInnerBarrettes";
 
 1029     GeoLogVol *logicalBIB = 
new GeoLogVol(
name, shapeBIB, 
m_LAr);
 
 1030     GeoIntrusivePtr<GeoPhysVol>physBIB = 
new GeoPhysVol(logicalBIB);
 
 1031     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(zposBIB)));
 
 1032     motherPhysical->add(physBIB);
 
 1034     const int number_of_modules = 8;
 
 1036     const int nofabs = (*m_DB_EmecWheelParameters)[0]->getInt(
"NABS");
 
 1037     const int nofdiv = nofabs / number_of_modules;
 
 1041     GeoTubs *shapeBIBMP = 
new GeoTubs(rminBIB, rmaxBIB, dzBIB, -dfi/4., dfi);
 
 1042     GeoLogVol *logicalBIBMP = 
new GeoLogVol(
name, shapeBIBMP, 
m_LAr);
 
 1043     GeoIntrusivePtr<GeoPhysVol>physBIBMP = 
new GeoPhysVol(logicalBIBMP);
 
 1046     id = 
"BackInnerBarrette::Abs";
 
 1052     assert(rmn+
dr>rminBIB && rmn+
dr+
dx*2.<rmaxBIB);
 
 1053     const double r0A = rmn + 
dr + 
dx;
 
 1054     GeoBox *shapeBIBA = 
new GeoBox(
dx, innerAbsorberDy, dzBIB);
 
 1056     GeoIntrusivePtr<GeoPhysVol>physBIBA = 
new GeoPhysVol(logicalBIBA);
 
 1057     physBIBMP->add(
new GeoTransform(GeoTrf::TranslateX3D(r0A)));
 
 1058     physBIBMP->add(physBIBA);
 
 1060     id = 
"BackInnerBarrette::Ele";   
 
 1064     assert(rmn + 
dr > rminBIB && rmn + 
dr + 
dx * 2. < rmaxBIB);
 
 1066     const double r0E = rmn + 
dr + 
dx;
 
 1067     double y0 = r0E * 
sin(dfi * 0.5);
 
 1068     double x0 = r0E * 
cos(dfi * 0.5);
 
 1069     GeoBox *shapeBIBE = 
new GeoBox(
dx, electrodeDy, dzBIB);
 
 1071     GeoIntrusivePtr<GeoPhysVol>physBIBE = 
new GeoPhysVol(logicalBIBE);
 
 1072     physBIBMP->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(x0, y0, 0.)*GeoTrf::RotateZ3D(dfi*0.5))));
 
 1073     physBIBMP->add(physBIBE);
 
 1089         for(
int i = 0; 
i < nofdiv - 1; ++ 
i){
 
 1091             physBIB->add(
new GeoIdentifierTag(
i));
 
 1092             physBIB->add(
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
 1093             physBIB->add(physBIBMP);
 
 1096         double fi = 
m_PhiStart + dfi/2.+ (nofdiv - 1) * dfi;
 
 1099         physBIB->add(
new GeoIdentifierTag(nofdiv - 1));
 
 1100         physBIB->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(x0, y0, 0.)*GeoTrf::RotateZ3D(fi))));
 
 1101         physBIB->add(physBIBA);
 
 1106         GeoTubs *shapeBIBM = 
new GeoTubs(rminBIB, rmaxBIB, dzBIB, -dfi/4., moduldfi);
 
 1107         GeoLogVol *logicalBIBM = 
new GeoLogVol(
name, shapeBIBM, 
m_LAr);
 
 1108         GeoIntrusivePtr<GeoPhysVol>physBIBM = 
new GeoPhysVol(logicalBIBM);
 
 1111         for(
int i = 0; 
i < nofdiv; ++ 
i){
 
 1112             double fi = dfi * 
i;
 
 1113             physBIBM->add(
new GeoIdentifierTag(
i));
 
 1114             physBIBM->add(
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
 1115             physBIBM->add(physBIBMP);
 
 1119         for(
int i = 0; 
i < number_of_modules; ++ 
i){
 
 1120             double fi = dfi*0.5 + 
i * moduldfi;
 
 1121             physBIB->add(
new GeoIdentifierTag(
i));
 
 1122             physBIB->add(
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
 1123         physBIB->add(physBIBM);
 
 1131     std::string 
id = 
"OuterTransversalBars";
 
 1137     GeoLogVol* logicalOTB = 
new GeoLogVol(
name, shapeOTB, 
m_Gten);
 
 1138     GeoIntrusivePtr<GeoPhysVol> physOTB = 
new GeoPhysVol(logicalOTB);
 
 1140     id = 
"TopIndexingRing";
 
 1146     GeoLogVol* logicalTIR = 
new GeoLogVol(
name, shapeTIR, 
m_Alu);
 
 1147     GeoIntrusivePtr<GeoPhysVol> physTIR = 
new GeoPhysVol(logicalTIR);
 
 1154     GeoLogVol* logicalTIRH = 
new GeoLogVol(
name, shapeTIRH, 
m_LAr);
 
 1155     GeoIntrusivePtr<GeoPhysVol> physTIRH = 
new GeoPhysVol(logicalTIRH);
 
 1156     physTIR->add(physTIRH);
 
 1158     id = 
"WideStretchers";
 
 1160     GeoPcon* shapeWS = 
getPcon(
id);
 
 1161     GeoLogVol* logicalWS = 
new GeoLogVol(
name, shapeWS, 
m_Alu);
 
 1162     GeoIntrusivePtr<GeoPhysVol> physWS = 
new GeoPhysVol(logicalWS);
 
 1164     id = 
"NarrowStretchers";
 
 1166     GeoPcon* shapeNS = 
getPcon(
id);
 
 1167     GeoLogVol* logicalNS = 
new GeoLogVol(
name, shapeNS, 
m_Alu);
 
 1168     GeoIntrusivePtr<GeoPhysVol> physNS = 
new GeoPhysVol(logicalNS);
 
 1170     id = 
"OuterSupportMother";
 
 1172     GeoPcon *motherShape = 
getPcon(
id);
 
 1173     GeoLogVol *motherLogical = 
new GeoLogVol(
name, motherShape, 
m_LAr);
 
 1174     GeoIntrusivePtr<GeoPhysVol>motherPhysical= 
new GeoPhysVol(motherLogical);
 
 1176     motherPhysical->add(physTIR);
 
 1177     motherPhysical->add(physOTB);
 
 1179     const int number_of_stretchers = 8; 
 
 1181         motherPhysical->add(
new GeoIdentifierTag(0));
 
 1182         motherPhysical->add(physNS);
 
 1184         double dfi = 
M_PI / number_of_stretchers;
 
 1185         double dfiNS = shapeNS->getDPhi();
 
 1186         motherPhysical->add(
new GeoIdentifierTag(1));
 
 1187         motherPhysical->add(
new GeoTransform(GeoTrf::RotateZ3D(dfi - dfiNS*0.5)));
 
 1188         motherPhysical->add(physNS);
 
 1189         motherPhysical->add(
new GeoIdentifierTag(2));
 
 1190         motherPhysical->add(
new GeoTransform(GeoTrf::RotateZ3D(-dfi + dfiNS*0.5)));
 
 1191         motherPhysical->add(physNS);
 
 1195         for(
int i = 0; 
i < number_of_stretchers; ++ 
i, ++ copyno){
 
 1196             double fiW = 
i * dfi;
 
 1197             motherPhysical->add(
new GeoIdentifierTag(copyno));
 
 1198             motherPhysical->add(
new GeoTransform(GeoTrf::RotateZ3D(fiW)));
 
 1199             motherPhysical->add(physWS);
 
 1200             double fiN = (
i + 0.5) * dfi;
 
 1201             motherPhysical->add(
new GeoIdentifierTag(copyno));
 
 1202             motherPhysical->add(
new GeoTransform(GeoTrf::RotateZ3D(fiN)));
 
 1203             motherPhysical->add(physNS);
 
 1207     return motherPhysical;
 
 1212     std::string 
id = 
"InnerAluCone";
 
 1217     double dz = 0.5 * (*m_DB_mn)[0]->getDouble(
"ACTIVELENGTH")*
Gaudi::Units::mm;
 
 1229     const double talpha = (r2min - r1min)*0.5/dz;
 
 1230     const double calpha = 2.*dz/sqrt(
pow(2.*dz,2.)+
pow(r2min-r1min,2.));
 
 1231         const double inv_calpha = 1. / calpha;
 
 1235     double r1max     = 
pow(barthick/2.,2.)+ 
pow(r1min+(surfthick+barthick)*inv_calpha,2.);
 
 1236             r1max     = sqrt(r1max)+surfthick*inv_calpha;
 
 1237     double r2max     = r2min+(r1max-r1min);
 
 1239     GeoCons*    shapeIAC    = 
new GeoCons ( r1min ,r2min,
 
 1243     GeoLogVol* logicalIAC = 
new GeoLogVol (name0, shapeIAC, 
m_LAr);
 
 1244     GeoIntrusivePtr<GeoPhysVol> physIAC = 
new GeoPhysVol(logicalIAC);
 
 1250     std::string 
name = name0 + 
"::InnerShell";
 
 1251     GeoCons*  shapeIACIS  = 
new GeoCons(
 
 1253                                r1min+surfthick*inv_calpha, r2min+surfthick*inv_calpha,
 
 1255   GeoLogVol* logicalIACIS = 
new GeoLogVol (
name,shapeIACIS,
m_Alu);
 
 1256   GeoIntrusivePtr<GeoPhysVol>   physIACIS = 
new GeoPhysVol(logicalIACIS);
 
 1257   physIAC->add(physIACIS);
 
 1259   name = name0 + 
"::OuterShell";
 
 1262   GeoCons*     shapeIACOS  = 
new GeoCons (
 
 1263                               r1max-surfthick*inv_calpha,  r2max-surfthick*inv_calpha,
 
 1266   GeoLogVol* logicalIACOS = 
new GeoLogVol (
name,shapeIACOS,
m_Alu);
 
 1267   GeoIntrusivePtr<GeoPhysVol>   physIACOS = 
new GeoPhysVol(logicalIACOS);
 
 1268   physIAC->add(physIACOS);
 
 1270   name = name0 + 
"::Phidiv";
 
 1273     const int    nofmodul  =   8;
 
 1275   GeoCons*     shapeIACP  = 
new GeoCons(
 
 1276                               r1min+surfthick*inv_calpha,r2min+surfthick*inv_calpha,
 
 1277                               r1max-surfthick*inv_calpha,r2max-surfthick*inv_calpha,
 
 1278                               dz, -moduldphi/2.,moduldphi);
 
 1279   GeoLogVol* logicalIACP = 
new GeoLogVol (
name,shapeIACP,
m_LAr);
 
 1280   GeoIntrusivePtr<GeoPhysVol>   physIACP = 
new GeoPhysVol(logicalIACP);
 
 1282   name = name0 + 
"::AluBar";
 
 1285   GeoPara* shapeIACAB    = 
new GeoPara(
 
 1286                                   barthick/2.*inv_calpha,barthick/2.,dz,
 
 1288   GeoLogVol* logicalIACAB= 
new GeoLogVol (
name,shapeIACAB, 
m_Alu);
 
 1289   GeoIntrusivePtr<GeoPhysVol>   physIACAB= 
new GeoPhysVol(logicalIACAB);
 
 1293   const double phi[9]={-15.,-11.,-7.5,-4.,0.,4.,7.5,11.,15.}; 
 
 1294   const double r0=r1min+(surfthick+barthick/2.)*inv_calpha+dz*talpha;
 
 1296     for(
int i = 0; 
i < nbar; ++ 
i){  
 
 1297         double fi=
phi[
i]*dphi;
 
 1300         physIACP->add(
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(
r0*cfi,
r0*sfi,0.)*GeoTrf::RotateZ3D(fi))));
 
 1301         physIACP->add(physIACAB);
 
 1304   name = name0 + 
"::Phidiv";
 
 1305   for(
int i=0;
i<nofmodul;
i++){ 
 
 1306     double fi=(
i+0.5)*moduldphi;
 
 1307     physIAC->add( 
new GeoIdentifierTag(
i));
 
 1308     physIAC->add( 
new GeoTransform(GeoTrf::RotateZ3D(fi)));
 
 1309     physIAC->add(physIACP);
 
 1318     double dMechFocaltoWRP = (*m_DB_EmecGeometry)[0]->getDouble(
"Z1") *
Gaudi::Units::cm;
 
 1319     double LArEMECHalfCrack = (*m_DB_EmecGeometry)[0]->getDouble(
"DCRACK") *
Gaudi::Units::cm;
 
 1320     double LArTotalThickness = (*m_DB_EmecGeometry)[0]->getDouble(
"ETOT") *
Gaudi::Units::cm;
 
 1322     double eta_mid = (*m_DB_EmecWheelParameters)[0]->getDouble(
"ETAEXT");
 
 1324     double tanThetaMid = 2. * 
exp(-eta_mid) / (1. - 
exp(-2.*eta_mid));
 
 1325     const double cosThetaMid = (1. - 
exp(2.*-eta_mid)) / (1. + 
exp(-2.*eta_mid));
 
 1326         const double inv_cosThetaMid = 1. / cosThetaMid;
 
 1328     double z0 = LArTotalThickness * 0.5 + dMechFocaltoWRP;
 
 1333     double dz = 
length * cosThetaMid * 0.5;
 
 1334     double rmin0 = (
z0 - dz) * tanThetaMid - LArEMECHalfCrack + inv_cosThetaMid;
 
 1335     double rmin1 = (
z0 + dz) * tanThetaMid - LArEMECHalfCrack + inv_cosThetaMid;
 
 1337     GeoCons* shapeITB = 
new GeoCons(rmin0, rmin1, rmin0 + rthickness, rmin1 + rthickness,
 
 1340     GeoLogVol* logicalITB  = 
new GeoLogVol (
name,shapeITB,
m_Gten);
 
 1341     GeoIntrusivePtr<GeoPhysVol> physITB = 
new GeoPhysVol(logicalITB);
 
 1349     std::string 
id = 
"FrontMiddleRing";
 
 1353     GeoPcon *shapeFMR = 
getPcon(
id);
 
 1355     GeoIntrusivePtr<GeoPhysVol>physFMR = 
new GeoPhysVol(logicalFMR);
 
 1356     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1357     motherPhysical->add(physFMR);
 
 1359     id = 
"FrontMiddleRing::LowerHole";
 
 1361     GeoPcon *shapeFMRLH = 
getPcon(
id);
 
 1362     GeoLogVol *logicalFMRLH = 
new GeoLogVol(
name, shapeFMRLH, 
m_LAr);
 
 1363     GeoIntrusivePtr<GeoPhysVol>physFMRLH = 
new GeoPhysVol(logicalFMRLH);
 
 1364     physFMR->add(physFMRLH);
 
 1367     id = 
"FrontMiddleRing::LowerGTen";
 
 1369     GeoPcon *shapeFMRLG = 
getPcon(
id);
 
 1370     GeoLogVol *logicalFMRLG = 
new GeoLogVol(
name, shapeFMRLG, 
m_Gten);
 
 1371     GeoIntrusivePtr<GeoPhysVol>physFMRLG = 
new GeoPhysVol(logicalFMRLG);
 
 1372     physFMRLH->add(physFMRLG);
 
 1374     id = 
"FrontMiddleRing::UpperHole";
 
 1376     GeoPcon *shapeFMRUH = 
getPcon(
id);
 
 1377     GeoLogVol *logicalFMRUH = 
new GeoLogVol(
name, shapeFMRUH, 
m_LAr);
 
 1378     GeoIntrusivePtr<GeoPhysVol>physFMRUH = 
new GeoPhysVol(logicalFMRUH);
 
 1379     physFMR->add(physFMRUH);
 
 1382     id = 
"FrontMiddleRing::UpperGTen";
 
 1384     GeoPcon *shapeFMRUG = 
getPcon(
id);
 
 1385     GeoLogVol *logicalFMRUG = 
new GeoLogVol(
name, shapeFMRUG, 
m_Gten);
 
 1386     GeoIntrusivePtr<GeoPhysVol>physFMRUG = 
new GeoPhysVol(logicalFMRUG);
 
 1387     physFMRUH->add(physFMRUG);
 
 1392     std::string 
id = 
"FrontInnerRing";
 
 1395     GeoPcon *shapeFIR = 
getPcon(
id);
 
 1396     GeoLogVol *logicalFIR = 
new GeoLogVol(
name, shapeFIR, 
m_Alu);
 
 1397     GeoIntrusivePtr<GeoPhysVol>physFIR = 
new GeoPhysVol(logicalFIR);
 
 1398     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1399     motherPhysical->add(physFIR);
 
 1401     id = 
"FrontInnerRing::Hole";
 
 1403     GeoPcon *shapeFIRH = 
getPcon(
id);
 
 1404     GeoLogVol *logicalFIRH = 
new GeoLogVol(
name, shapeFIRH, 
m_LAr);
 
 1405     GeoIntrusivePtr<GeoPhysVol>physFIRH = 
new GeoPhysVol(logicalFIRH);
 
 1406     physFIR->add(physFIRH);
 
 1409     id = 
"FrontInnerRing::GTen";
 
 1411     GeoPcon *shapeFIRG = 
getPcon(
id);
 
 1412     GeoLogVol *logicalFIRG = 
new GeoLogVol(
name, shapeFIRG, 
m_Gten);
 
 1413     GeoIntrusivePtr<GeoPhysVol>physFIRG = 
new GeoPhysVol(logicalFIRG);
 
 1414     physFIRH->add(physFIRG);
 
 1420     std::string 
id = 
"FrontInnerLongBar";
 
 1429     GeoLogVol *logicalFILB = 
new GeoLogVol(
name,shapeFILB,
m_Gten);
 
 1430     GeoIntrusivePtr<GeoPhysVol>physFILB = 
new GeoPhysVol(logicalFILB);
 
 1431     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1432     motherPhysical->add(physFILB);
 
 1437     std::string 
id = 
"BackMiddleRing";
 
 1440     GeoPcon *shapeBMR = 
getPcon(
id);
 
 1441     GeoLogVol *logicalBMR = 
new GeoLogVol(
name, shapeBMR, 
m_Alu);
 
 1442     GeoIntrusivePtr<GeoPhysVol>physBMR = 
new GeoPhysVol(logicalBMR);
 
 1443     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1444     motherPhysical->add(physBMR);
 
 1446     id = 
"BackMiddleRing::LowerHole";
 
 1448     GeoPcon *shapeBMRLH = 
getPcon(
id);
 
 1449     GeoLogVol *logicalBMRLH = 
new GeoLogVol(
name, shapeBMRLH, 
m_LAr);
 
 1450     GeoIntrusivePtr<GeoPhysVol>physBMRLH = 
new GeoPhysVol(logicalBMRLH);
 
 1451     physBMR->add( physBMRLH);
 
 1454     id = 
"BackMiddleRing::LowerGTen";
 
 1456     GeoPcon *shapeBMRLG = 
getPcon(
id);
 
 1457     GeoLogVol *logicalBMRLG = 
new GeoLogVol(
name, shapeBMRLG, 
m_Gten);
 
 1458     GeoIntrusivePtr<GeoPhysVol>physBMRLG = 
new GeoPhysVol(logicalBMRLG);
 
 1459     physBMRLH->add(physBMRLG);
 
 1461     id = 
"BackMiddleRing::UpperHole";
 
 1463     GeoPcon *shapeBMRUH = 
getPcon(
id);
 
 1464     GeoLogVol *logicalBMRUH = 
new GeoLogVol(
name, shapeBMRUH, 
m_LAr);
 
 1465     GeoIntrusivePtr<GeoPhysVol>physBMRUH = 
new GeoPhysVol(logicalBMRUH);
 
 1466     physBMR->add( physBMRUH);
 
 1469     id = 
"BackMiddleRing::UpperGTen";
 
 1471     GeoPcon *shapeBMRUG = 
getPcon(
id);
 
 1472     GeoLogVol *logicalBMRUG = 
new GeoLogVol(
name, shapeBMRUG, 
m_Gten);
 
 1473     GeoIntrusivePtr<GeoPhysVol>physBMRUG = 
new GeoPhysVol(logicalBMRUG);
 
 1474     physBMRUH->add(physBMRUG);
 
 1479     std::string 
id = 
"BackInnerRing";
 
 1482     GeoPcon *shapeBIR = 
getPcon(
id);
 
 1483     GeoLogVol *logicalBIR = 
new GeoLogVol(
name, shapeBIR, 
m_Alu);
 
 1484     GeoIntrusivePtr<GeoPhysVol>physBIR = 
new GeoPhysVol(logicalBIR);
 
 1485     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1486     motherPhysical->add(physBIR);
 
 1488     id = 
"BackInnerRing::Hole";
 
 1490     GeoPcon *shapeBIRH = 
getPcon(
id);
 
 1491     GeoLogVol *logicalBIRH = 
new GeoLogVol(
name, shapeBIRH, 
m_LAr);
 
 1492     GeoIntrusivePtr<GeoPhysVol>physBIRH = 
new GeoPhysVol(logicalBIRH);
 
 1493     physBIR->add(physBIRH);
 
 1496     id = 
"BackInnerRing::GTen";
 
 1498     GeoPcon *shapeBIRG = 
getPcon(
id);
 
 1499     GeoLogVol *logicalBIRG = 
new GeoLogVol(
name, shapeBIRG, 
m_Gten);
 
 1500     GeoIntrusivePtr<GeoPhysVol>physBIRG = 
new GeoPhysVol(logicalBIRG);
 
 1501     physBIRH->add(physBIRG);
 
 1506     std::string 
id = 
"BackInnerLongBar";
 
 1515     GeoLogVol *logicalBILB = 
new GeoLogVol(
name, shapeBILB, 
m_Gten);
 
 1516     GeoIntrusivePtr<GeoPhysVol>physBILB = 
new GeoPhysVol(logicalBILB);
 
 1517     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1518     motherPhysical->add(physBILB);
 
 1523     std::string 
id = 
"FrontOuterRing";
 
 1526     GeoPcon *shapeFOR = 
getPcon(
id);
 
 1527     GeoLogVol *logicalFOR = 
new GeoLogVol(
name, shapeFOR, 
m_Alu);
 
 1528     GeoIntrusivePtr<GeoPhysVol>physFOR = 
new GeoPhysVol(logicalFOR);
 
 1529     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1530     motherPhysical->add(physFOR);
 
 1535     std::string 
id = 
"FrontOuterLongBar";
 
 1538     GeoPcon *shapeFOLB = 
getPcon(
id);
 
 1539     GeoLogVol *logicalFOLB = 
new GeoLogVol(
name, shapeFOLB, 
m_Gten);
 
 1540     GeoIntrusivePtr<GeoPhysVol>physFOLB = 
new GeoPhysVol(logicalFOLB);
 
 1541     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1542     motherPhysical->add(physFOLB);
 
 1552     std::string 
id = 
"FrontIndexingRing";
 
 1556     double z_hole = -ring_dz;
 
 1566     GeoLogVol *logicalFHIR = 
new GeoLogVol(
name, shapeFHIR, 
m_Alu);
 
 1567     GeoIntrusivePtr<GeoPhysVol>physFHIR = 
new GeoPhysVol(logicalFHIR);
 
 1568     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1569     motherPhysical->add(physFHIR);
 
 1573     GeoLogVol *logicalFHIRH = 
new GeoLogVol(
name, shapeFHIRH, 
m_LAr);
 
 1574     GeoIntrusivePtr<GeoPhysVol>physFHIRH = 
new GeoPhysVol(logicalFHIRH);
 
 1575     physFHIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz)));
 
 1576     physFHIR->add(physFHIRH);
 
 1582     GeoLogVol *logicalFHIRG = 
new GeoLogVol(
name, shapeFHIRG, 
m_Gten);
 
 1583     GeoIntrusivePtr<GeoPhysVol>physFHIRG = 
new GeoPhysVol(logicalFHIRG);
 
 1584     physFHIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz)));
 
 1585     physFHIR->add(physFHIRG);
 
 1588     GeoTubs *shapeFLIR = 
new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, ring_dz, 
m_PhiStart, 
m_PhiSize);
 
 1589     GeoLogVol *logicalFLIR = 
new GeoLogVol(
name, shapeFLIR, 
m_Alu);
 
 1590     GeoIntrusivePtr<GeoPhysVol>physFLIR = 
new GeoPhysVol(logicalFLIR);
 
 1591     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1592     motherPhysical->add(physFLIR);
 
 1595     GeoTubs *shapeFLIRH = 
new GeoTubs(r1 + hole_rmin, r1 + hole_rmax, hole_dz, 
m_PhiStart, 
m_PhiSize);
 
 1596     GeoLogVol *logicalFLIRH = 
new GeoLogVol(
name, shapeFLIRH, 
m_LAr);
 
 1597     GeoIntrusivePtr<GeoPhysVol>physFLIRH = 
new GeoPhysVol(logicalFLIRH);
 
 1598     physFLIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz)));
 
 1599     physFLIR->add(physFLIRH);
 
 1603     GeoTubs *shapeFLIRG = 
new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, gten_dz, 
m_PhiStart, 
m_PhiSize);
 
 1604     GeoLogVol *logicalFLIRG = 
new GeoLogVol(
name, shapeFLIRG, 
m_Gten);
 
 1605     GeoIntrusivePtr<GeoPhysVol>physFLIRG = 
new GeoPhysVol(logicalFLIRG);
 
 1606     physFLIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz)));
 
 1607     physFLIR->add(physFLIRG);
 
 1617     std::string 
id = 
"BackIndexingRing";
 
 1621     double z_hole = -ring_dz;
 
 1631     GeoLogVol *logicalBHIR = 
new GeoLogVol(
name, shapeBHIR, 
m_Alu);
 
 1632     GeoIntrusivePtr<GeoPhysVol>physBHIR = 
new GeoPhysVol(logicalBHIR);
 
 1633     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1634     motherPhysical->add(physBHIR);
 
 1640     GeoLogVol *logicalBHIRG = 
new GeoLogVol(
name, shapeBHIRG, 
m_Gten);
 
 1641     GeoIntrusivePtr<GeoPhysVol>physBHIRG = 
new GeoPhysVol(logicalBHIRG);
 
 1642     physBHIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz)));
 
 1643     physBHIR->add(physBHIRG);
 
 1647     GeoLogVol* logicalBHIRH = 
new GeoLogVol(
name, shapeBHIRH, 
m_LAr);
 
 1648     GeoIntrusivePtr<GeoPhysVol> physBHIRH = 
new GeoPhysVol(logicalBHIRH);
 
 1649     physBHIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz)));
 
 1650     physBHIR->add(physBHIRH);
 
 1653     GeoTubs *shapeBLIR = 
new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, ring_dz, 
m_PhiStart, 
m_PhiSize);
 
 1654     GeoLogVol *logicalBLIR = 
new GeoLogVol(
name, shapeBLIR, 
m_Alu);
 
 1655     GeoIntrusivePtr<GeoPhysVol>physBLIR = 
new GeoPhysVol(logicalBLIR);
 
 1656     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1657     motherPhysical->add(physBLIR);
 
 1661     GeoTubs *shapeBLIRG = 
new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, gten_dz, 
m_PhiStart, 
m_PhiSize);
 
 1662     GeoLogVol *logicalBLIRG = 
new GeoLogVol(
name, shapeBLIRG, 
m_Gten);
 
 1663     GeoIntrusivePtr<GeoPhysVol>physBLIRG = 
new GeoPhysVol(logicalBLIRG);
 
 1664     physBLIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz)));
 
 1665     physBLIR->add(physBLIRG);
 
 1668     GeoTubs *shapeBLIRH = 
new GeoTubs(r1 + hole_rmin, r1 + hole_rmax, hole_dz, 
m_PhiStart, 
m_PhiSize);
 
 1669     GeoLogVol *logicalBLIRH = 
new GeoLogVol(
name, shapeBLIRH, 
m_LAr);
 
 1670     GeoIntrusivePtr<GeoPhysVol>physBLIRH = 
new GeoPhysVol(logicalBLIRH);
 
 1671     physBLIR->add(
new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz)));
 
 1672     physBLIR->add(physBLIRH);
 
 1677     std::string 
id = 
"BackOuterRing";
 
 1680     GeoPcon *shapeBOR = 
getPcon(
id);
 
 1681     GeoLogVol *logicalBOR = 
new GeoLogVol(
name, shapeBOR, 
m_Alu);
 
 1682     GeoIntrusivePtr<GeoPhysVol>physBOR = 
new GeoPhysVol(logicalBOR);
 
 1683     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1684     motherPhysical->add(physBOR);
 
 1689     std::string 
id = 
"BackOuterLongBar";
 
 1692     GeoPcon *shapeBOLB = 
getPcon(
id);
 
 1693     GeoLogVol *logicalBOLB = 
new GeoLogVol(
name, shapeBOLB, 
m_Gten);
 
 1694     GeoIntrusivePtr<GeoPhysVol>physBOLB = 
new GeoPhysVol(logicalBOLB);
 
 1695     motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(
z0)));
 
 1696     motherPhysical->add(physBOLB);
 
 1706       SmartIF<StoreGateSvc> 
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
 
 1708     throw std::runtime_error(
"Error in EMECSupportConstruction/extracyl, cannot access DetectorStore");
 
 1711       if (
detStore->retrieve(materialManager, std::string(
"MATERIALS")).isFailure()) {
 
 1712     throw std::runtime_error(
"Error in EMECSupportConstruction: cannot find MATERIALS.");
 
 1717       for(
unsigned int i=0;
i<nextra;
i++){
 
 1718         const std::string& 
name=(*m_DB_emecExtraCyl)[
i]->getString(
"CONE");
 
 1719           if(
name.find(
"EmecCylAfterPS") != std::string::npos){
 
 1720             double rmin=(*m_DB_emecExtraCyl)[
i]->getDouble(
"RMIN1"); 
 
 1721             double rmax=(*m_DB_emecExtraCyl)[
i]->getDouble(
"RMAX1"); 
 
 1722             double dz = (*m_DB_emecExtraCyl)[
i]->getDouble(
"DZ");    
 
 1723             if(dz>0. && dz<= dzmax){
 
 1725               const std::string& material=(*m_DB_emecExtraCyl)[
i]->getString(
"MATERIAL"); 
 
 1728                 throw std::runtime_error(
"Error in EMECSupportConstruction/extracyl,material for CylBeforePS is not found.");
 
 1731               std::string 
id = 
"ExtraCyl_afterPS";
 
 1735               GeoLogVol  *logicCyl  = 
new GeoLogVol(
name, solidCyl, 
mat);
 
 1736               GeoIntrusivePtr<GeoPhysVol>physCyl   = 
new GeoPhysVol(logicCyl);
 
 1738               motherPhysical->add(
new GeoTransform(GeoTrf::TranslateZ3D(dz/2.)));
 
 1739               motherPhysical->add(physCyl);
 
 1741               std::cout<<
"******************************************************"<<std::endl;
 
 1742               std::cout<<
" EMECSupportConstruction insert extra material after PS"<<std::endl;
 
 1743               std::cout<<
" ExtraCyl params: name,mat= "<<
name<<
" "<<
mat->getName()
 
 1744                        <<
" rmin,rmax,dzthick,zpos="<<rmin<<
" "<<rmax<<
" "<<dz<<
" "<<dz/2.
 
 1747               std::cout<<
"******************************************************"<<std::endl;
 
 1765     std::string 
id = 
"FrontBoard";
 
 1767     std::string 
idx = 
id + 
"I";
 
 1775     double phi_start = -0.5 * phi_size;
 
 1776     GeoTubs *bi_shape = 
new GeoTubs(rmin, rmax, dz_boards, phi_start, phi_size);
 
 1777     GeoLogVol *bi_l = 
new GeoLogVol(
name, bi_shape, 
m_Gten);
 
 1778     GeoIntrusivePtr<GeoPhysVol>bi_phys = 
new GeoPhysVol(bi_l);
 
 1786     GeoTubs *bm_shape = 
new GeoTubs(rmin, rmax, dz_boards, phi_start, phi_size);
 
 1787     GeoLogVol *bm_l = 
new GeoLogVol(
name, bm_shape, 
m_Gten);
 
 1788     GeoIntrusivePtr<GeoPhysVol>bm_phys = 
new GeoPhysVol(bm_l);
 
 1795     GeoTubs *bo_shape = 
new GeoTubs(rmin, rmax, dz_boards, phi_start, phi_size);
 
 1796     GeoLogVol *bo_l = 
new GeoLogVol(
name, bo_shape, 
m_Gten);
 
 1797     GeoIntrusivePtr<GeoPhysVol>bo_phys = 
new GeoPhysVol(bo_l);
 
 1801     double z_mb = z_boards - dz_boards;
 
 1802     std::string mb_n[5] = { 
"F1",      
"F2",     
"F3",     
"F4",    
"F5" };
 
 1803     const double mb_dy[5] = {   74.,    57.,   57.,   60.,  44. };
 
 1804     const double mb_dx[5] = {   38.5,   60.,  138.5, 100., 165. };
 
 1805     const double mb_dz_cu[5] = {  .1,     .15,   .15,   .15,  .2 };
 
 1807     double mb_r[5]  = { (1739.-5.) , (1640.-5.), (1400.-4.), (1140. - 4.), (835.-1.)};
 
 1808     double mb_dz[5] = {    1.4,    1.1,   1.25,  1.1,  1.25 };
 
 1810     GeoIntrusivePtr<GeoPhysVol>mb_p[5];
 
 1811     for(
int i = 0; 
i < 5; ++ 
i){
 
 1812         idx = 
id + 
"::" + mb_n[
i];
 
 1817         GeoBox *mb_s = 
new GeoBox(
dx, 
dy, mb_dz[
i]);
 
 1818         GeoLogVol *mb_l = 
new GeoLogVol(
name, mb_s, 
m_Gten);
 
 1819         mb_p[
i] = 
new GeoPhysVol(mb_l);
 
 1822         std::ostringstream 
tmp;
 
 1823         tmp << 
"Cu" << (
i + 1) << 
"z";
 
 1825         GeoBox *cu = 
new GeoBox(
dx, 
dy, dz1);
 
 1827         GeoIntrusivePtr<GeoPhysVol>cup = 
new GeoPhysVol(cul);
 
 1828         mb_p[
i]->add(
new GeoTransform(GeoTrf::TranslateZ3D(dz1 - mb_dz[
i])));
 
 1832         tmp << 
"R" << (
i + 1);
 
 1838     idx = 
id + 
"::Outer";
 
 1844     GeoTubs *oc_s = 
new GeoTubs(rmin, rmax, dz_oc, phi_start, phi_size);
 
 1845     GeoLogVol *oc_l = 
new GeoLogVol(
name, oc_s, 
m_Cable);
 
 1846     GeoIntrusivePtr<GeoPhysVol>oc_p = 
new GeoPhysVol(oc_l);
 
 1847     double z_oc = z_boards - dz_boards - dz_oc;
 
 1849     idx = 
id + 
"::SideOuter";
 
 1855     GeoTubs *soc_s = 
new GeoTubs(rmin, rmax, dz_soc, -0.5 * dphi_sc, dphi_sc);
 
 1856     GeoLogVol *soc_l = 
new GeoLogVol(
name, soc_s, 
m_Cable);
 
 1857     GeoIntrusivePtr<GeoPhysVol>soc_p = 
new GeoPhysVol(soc_l);
 
 1861     const int number_of_sectors = 
m_isModule? 4: 32;
 
 1862     for(
int i = 0; 
i < number_of_sectors; ++ 
i){
 
 1865         GeoIdentifierTag* iTag = 
new GeoIdentifierTag(
i);
 
 1867         GeoTransform* xf1 = 
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_oc)*GeoTrf::RotateZ3D(
phi)));
 
 1869         motherPhysical->add(iTag);
 
 1870         motherPhysical->add(xf);
 
 1871         motherPhysical->add(bi_phys);
 
 1873         motherPhysical->add(iTag);
 
 1874         motherPhysical->add(xf);
 
 1875         motherPhysical->add(bm_phys);
 
 1877         motherPhysical->add(iTag);
 
 1878         motherPhysical->add(xf);
 
 1879         motherPhysical->add(bo_phys);
 
 1881         motherPhysical->add(iTag);
 
 1882         motherPhysical->add(xf1);
 
 1883         motherPhysical->add(oc_p);
 
 1885         for(
int j = 0; j < 5; ++ j){
 
 1886             GeoTransform* xf2 = 
new GeoTransform(
 
 1888             motherPhysical->add(iTag);
 
 1889             motherPhysical->add(xf2);
 
 1890             motherPhysical->add(mb_p[j]);
 
 1893         GeoTransform* xf3 = 
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_soc)*GeoTrf::RotateZ3D(
m_Position + (
i - 2) * phi_size + 0.5 * dphi_sc)));;
 
 1895         GeoTransform* xf4 = 
new GeoTransform(
GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_soc)*GeoTrf::RotateZ3D(
m_Position + (
i - 1) * phi_size - 0.5 * dphi_sc)));
 
 1897         motherPhysical->add(
new GeoIdentifierTag(
i * 2));
 
 1898         motherPhysical->add(xf3);
 
 1899         motherPhysical->add(soc_p);
 
 1901         motherPhysical->add(
new GeoIdentifierTag(
i * 2 + 1));
 
 1902         motherPhysical->add(xf4);
 
 1903         motherPhysical->add(soc_p);
 
 1909     std::string 
id = 
"FrontSupportMother";
 
 1911     GeoPcon *motherShape = 
getPcon(
id + 
"::Inner");
 
 1912     GeoLogVol *motherLogical = 
new GeoLogVol(
name, motherShape, 
m_LAr);
 
 1913     GeoIntrusivePtr<GeoPhysVol>motherPhysical = 
new GeoPhysVol(motherLogical);
 
 1919     return motherPhysical;
 
 1924     std::string 
id = 
"BackSupportMother";
 
 1926     GeoPcon *motherShape = 
getPcon(
id + 
"::Inner");
 
 1927     GeoLogVol *motherLogical = 
new GeoLogVol(
name, motherShape, 
m_LAr);
 
 1928     GeoIntrusivePtr<GeoPhysVol>motherPhysical = 
new GeoPhysVol(motherLogical);
 
 1934     return motherPhysical;
 
 1939     std::string 
id = 
"FrontSupportMother";
 
 1941     GeoPcon *motherShape = 
getPcon(
id + 
"::Outer");
 
 1942     GeoLogVol *motherLogical = 
new GeoLogVol(
name, motherShape, 
m_LAr);
 
 1943     GeoIntrusivePtr<GeoPhysVol>motherPhysical= 
new GeoPhysVol(motherLogical);
 
 1952     return motherPhysical;
 
 1957     std::string 
id = 
"BackSupportMother";
 
 1959     GeoPcon *motherShape = 
getPcon(
id + 
"::Outer");
 
 1960     GeoLogVol *motherLogical = 
new GeoLogVol(
name, motherShape, 
m_LAr);
 
 1961     GeoIntrusivePtr<GeoPhysVol>motherPhysical= 
new GeoPhysVol(motherLogical);
 
 1969     return motherPhysical;