12 #include "GeoModelKernel/GeoBox.h" 
   13 #include "GeoModelKernel/GeoTubs.h" 
   14 #include "GeoModelKernel/GeoTrap.h" 
   15 #include "GeoModelKernel/GeoLogVol.h" 
   16 #include "GeoModelKernel/GeoNameTag.h" 
   17 #include "GeoModelKernel/GeoIdentifierTag.h" 
   18 #include "GeoModelKernel/GeoPhysVol.h" 
   19 #include "GeoModelKernel/GeoMaterial.h" 
   21 #include "GeoModelKernel/GeoTransform.h" 
   22 #include "GeoModelKernel/GeoAlignableTransform.h" 
   23 #include "GeoModelKernel/GeoShapeShift.h" 
   24 #include "GeoModelKernel/GeoShapeUnion.h" 
   26 #include "GaudiKernel/PhysicalConstants.h" 
   32                    GeoModelIO::ReadGeoModel* sqliteReader,
 
   33                                std::shared_ptr<std::map<std::string, GeoFullPhysVol*>> mapFPV,
 
   34                                std::shared_ptr<std::map<std::string, GeoAlignableTransform*>> mapAX,
 
   38   , m_theLadder(nullptr)
 
   39   , m_theSensor(theSensor)
 
   40   , m_staveSupport(staveSupport)
 
   68   const GeoShape * ladderShape = 
nullptr;
 
   76       ladderShape = 
new GeoBox(halfThickness, 
m_width/2., 
length/2.);
 
   93       double shift = 0.5*BentStaveThickness;
 
   94       if (
angle > 0) shift *= -1.0;
 
   95       const GeoShape & shiftedBox = (*box) << GeoTrf::TranslateX3D(shift);
 
   96       ladderShape = &shiftedBox;
 
  103       GeoBox * box = 
new GeoBox(halfThickness, 
m_width/2., 
length/2.);
 
  104       const GeoShape & shiftedBox = (*box) << GeoTrf::TranslateX3D(shift);
 
  105       ladderShape = &shiftedBox;
 
  111       const GeoShape & staveShape = (*staveSupportShape);
 
  112       ladderShape = &staveShape;
 
  120     if(not ladderShape) {
 
  126       m_theLadder = 
new GeoLogVol(
"Ladder",ladderShape,air);
 
  172   bool isModule3D=
true;
 
  181   int nbPixelPlanarModule=0;
 
  182   int nbPixel3DModule=0;
 
  183   bool bDetailedStaveLayout=
false;
 
  185   double zNegStavePos= 0.0;
 
  186   double planarLength=0.0;
 
  187   double v3DHalfLength=0.0;
 
  188   double v3DLength=0.0;
 
  193   double Si3DRadialShift=0.;
 
  194   double Si3DLateralShift=0.;
 
  199       if(Si3DThick>SiPlThick) Si3DRadialShift=-(Si3DThick-SiPlThick);
 
  204       Si3DLateralShift= -(MechanicalStaveOffset3D-MechanicalStaveOffset);
 
  213       bDetailedStaveLayout=
true;
 
  214       nbPixelPlanarModule=nbPixelModule;
 
  217       else if(staveLayout==5||staveLayout==6)     
 
  219       bDetailedStaveLayout=
true;
 
  226           planarLength=nbPixelPlanarModule*pm.
Length()+(nbPixelPlanarModule-1)*pixelModuleGap;
 
  227           v3DHalfLength=(nbPixel3DModule/2)*pm3D.
Length()+(nbPixel3DModule/2)*pixelModuleGap;
 
  228           zNegStavePos=-planarLength*0.5-v3DHalfLength;
 
  232           planarLength=nbPixelPlanarModule*pm.
Length()+(nbPixelPlanarModule-1)*pixelModuleGap;
 
  233           v3DLength=(nbPixel3DModule)*pm3D.
Length()+(nbPixel3DModule-1)*pixelModuleGap+pixelModuleGap*0.5;
 
  234           zNegStavePos=-v3DLength;
 
  241   for(
int ii = 0; ii < nbPixelModule; ii++) {
 
  258     bool b3DModule=
false;
 
  274         if(ii<nbPixel3DModule/2) 
 
  279         xposShift=Si3DRadialShift;
 
  280         yposShift=Si3DLateralShift;
 
  283         else if(ii>nbPixelPlanarModule+nbPixel3DModule/2-1)  
 
  290         xposShift=Si3DRadialShift;
 
  291         yposShift=Si3DLateralShift;
 
  302         zpos=zNegStavePos+zpos;
 
  308         if(ii<nbPixel3DModule) 
 
  312         zpos=(pm3D.
Length()+pixelModuleGap) * moduleIndex;
 
  313         zpos=zNegStavePos+zpos+pm3D.
Length()*0.5;
 
  314         xposShift=Si3DRadialShift;
 
  315         yposShift=Si3DLateralShift;
 
  321         zpos+=pm.
Length()*0.5+pixelModuleGap*0.5;
 
  335     GeoVPhysVol* modulephys{
nullptr}; 
 
  338       modulephys = pm.
Build();
 
  340       modulephys = pm3D.
Build();
 
  346       else id = theSensor3D.
getID();
 
  350       std::ostringstream nameTag; 
 
  352       GeoNameTag * 
tag = 
new GeoNameTag(nameTag.str());
 
  353       GeoAlignableTransform* xform;
 
  356       ladderPhys->add(
tag);
 
  357       ladderPhys->add(
new GeoIdentifierTag(
m_gmt_mgr->
Eta() ) );
 
  358       ladderPhys->add(xform);
 
  359       ladderPhys->add(modulephys );
 
  364       else id = theSensor3D.
getID();
 
  388       GeoBox * shapeSupBent = 
new GeoBox(0.5*
thickness, 0.5*
width, bentStaveHalfLength);
 
  396       double xst = xOffset - (bentStaveHalfLength * 
sin(ang)); 
 
  399       GeoLogVol* logVolBentNeg = 
new GeoLogVol(
"StaveSupportBentNeg2",shapeSupBent,materialSup);
 
  400       GeoPhysVol* physVolBentNeg = 
new GeoPhysVol(logVolBentNeg);
 
  401       GeoTrf::RotateY3D rmNeg(ang);
 
  402       double zstneg = -
length/2.0 - (bentStaveHalfLength * 
cos(ang));
 
  405       ladderPhys->add(physVolBentNeg); 
 
  408       GeoLogVol* logVolBentPos = 
new GeoLogVol(
"StaveSupportBentPos2",shapeSupBent,materialSup);
 
  409       GeoPhysVol* physVolBentPos = 
new GeoPhysVol(logVolBentPos);
 
  410       GeoTrf::RotateY3D rmPos(-ang);
 
  411       double zstpos = 
length/2.0 + (bentStaveHalfLength * 
cos(ang));
 
  414       ladderPhys->add(physVolBentPos);       
 
  430   clearance = 
std::max(clearance, safety);
 
  434   double thick = 
std::max(thickn, thickp); 
 
  460   width += 2*clearanceRphi;