55 if(nSectors==0)
return nullptr;
59 double deltaLength = 0.;
62 zmax=barrelZmax-0.001;
63 deltaLength=layerZshift;
66 zmin = barrelZmax+0.001;
68 deltaLength=-layerZshift;
79 double zStartPosA =
zmin+layerZshift;
80 double zStartPosC = -
zmax+layerZshift;
92 double halfLengthA = (
zmax-
zmin)*0.5-deltaLength*.5;
93 double halfLengthC = (
zmax-
zmin)*0.5+deltaLength*.5;
96 std::ostringstream lnameA;
98 std::ostringstream lnameC;
102 const GeoTube* supportShapeA =
new GeoTube(innerRadius,outerRadius,halfLengthA);
103 const GeoTube* supportShapeC =
new GeoTube(innerRadius,outerRadius,halfLengthC);
107 GeoLogVol* supportLogVol_A =
new GeoLogVol(lnameA.str(),supportShapeA,ether);
108 GeoLogVol* supportLogVol_C =
new GeoLogVol(lnameC.str(),supportShapeC,ether);
116 double cooling_radius = 35.1;
123 cooling_radius = 34.7 + layerRadius-33.25;
127 const GeoTube* service_coolingPipeA =
new GeoTube(0.0,TubeOuterDiam*0.5,halfLengthA);
128 const GeoTube* service_coolingPipeC =
new GeoTube(0.0,TubeOuterDiam*0.5,halfLengthC);
131 GeoLogVol * cp_service_logA =
new GeoLogVol(
"PP0CoolingPipe",service_coolingPipeA,cp_service_material);
132 GeoLogVol * cp_service_logC =
new GeoLogVol(
"PP0CoolingPipe",service_coolingPipeC,cp_service_material);
133 GeoPhysVol* cpPhysVolA =
new GeoPhysVol(cp_service_logA);
134 GeoPhysVol* cpPhysVolC =
new GeoPhysVol(cp_service_logC);
136 const GeoTube* service_coolingPipeInnerA =
new GeoTube(0.0,TubeInnerDiam*0.5,halfLengthA);
137 const GeoTube* service_coolingPipeInnerC =
new GeoTube(0.0,TubeInnerDiam*0.5,halfLengthC);
139 GeoLogVol * cp_service_inner_logA =
new GeoLogVol(
"PP0CoolingPipeInner",service_coolingPipeInnerA,cp_service_inner_material);
140 GeoLogVol * cp_service_inner_logC =
new GeoLogVol(
"PP0CoolingPipeInner",service_coolingPipeInnerC,cp_service_inner_material);
141 GeoPhysVol * cp_service_inner_logPVA =
new GeoPhysVol(cp_service_inner_logA);
142 GeoPhysVol * cp_service_inner_logPVC =
new GeoPhysVol(cp_service_inner_logC);
144 GeoNameTag* cp_service_inner_tag =
new GeoNameTag(
"PP0CoolingPipeInner");
145 GeoTransform* cp_service_inner_xform =
new GeoTransform(GeoTrf::Transform3D::Identity());
146 cpPhysVolA->add(cp_service_inner_tag);
147 cpPhysVolA->add(cp_service_inner_xform);
148 cpPhysVolA->add(cp_service_inner_logPVA);
149 cpPhysVolC->add(cp_service_inner_tag);
150 cpPhysVolC->add(cp_service_inner_xform);
151 cpPhysVolC->add(cp_service_inner_logPVC);
153 GeoLogVol* flex_logVolA =
nullptr;
154 GeoLogVol* flex_logVolC =
nullptr;
160 double flex_rot=0.30265;
161 flex_rot=-0.30265*.5;
162 double flex_rmin=0, flex_rmax=0;
163 double flexYmidPos=0;
174 std::string flexMatName=
"noFlexMatDefined";
182 GeoBox * flex_shapeA =
new GeoBox((flex_rmax-flex_rmin)*.5, flex_width*.5, halfLengthA);
183 GeoBox * flex_shapeC =
new GeoBox((flex_rmax-flex_rmin)*.5, flex_width*.5, halfLengthC);
185 if(flex_material==
nullptr)
187 m_gmt_mgr->
msg(MSG::ERROR)<<
"-> error while reading material "<<flexMatName<<__FILE__<<
":"<< __LINE__<<
endmsg;
190 flex_logVolA =
new GeoLogVol(
"Flex",flex_shapeA,flex_material);
191 flex_logVolC =
new GeoLogVol(
"Flex",flex_shapeC,flex_material);
198 unsigned int nbFlexPoint=59;
199 double xFlex[59]={-18.029,-15.546,-14.108,-12.832,-12.530,-11.770,-10.522,-9.285,-7.727,-6.132,-4.856,-3.906,-3.183,-1.643,-0.371,1.163,2.590,3.591,4.489,4.933,5.691,6.912,8.018,9.560,10.830,11.159,12.048,12.768,13.982,15.317,18.029,18.029,15.191,13.449,12.742,11.838,10.729,9.181,7.643,6.087,4.643,3.877,3.027,1.953,1.480,-0.071,-1.925,-3.102,-3.864,-5.065,-6.524,-7.999,-9.447,-10.867,-12.305,-13.289,-13.816,-15.377,-18.029};
200 double yFlex[59]={32.768,32.749,32.997,34.143,34.552,35.888,36.844,37.204,37.260,36.858,35.875,34.396,32.984,31.517,31.110,31.364,32.348,33.602,35.204,36.151,37.422,38.466,38.761,38.453,37.521,37.182,35.860,34.828,33.877,33.653,33.668,34.589,34.566,35.449,36.501,37.805,38.814,39.571,39.665,39.034,37.597,36.057,34.440,33.014,32.612,32.021,32.858,34.847,36.074,37.383,37.962,38.205,38.111,37.698,36.831,35.075,34.406,33.655,33.689};
202 flexYmidPos=(yFlex[0]+yFlex[nbFlexPoint-1])*.5;
204 std::vector<double> xShape, yShape;
205 xShape.clear(); yShape.clear();
206 GeoSimplePolygonBrep* Iflex_shape =
new GeoSimplePolygonBrep(flex_width*0.5);
207 for(
unsigned int iPt=0; iPt<nbFlexPoint; iPt++) Iflex_shape->addVertex(xFlex[iPt],yFlex[iPt]-flexYmidPos);
213 if(Iflex_material==
nullptr)
215 m_gmt_mgr->
msg(MSG::ERROR)<<
"-> error while reading material "<<IflexMatName<<__FILE__<<
":"<< __LINE__<<
endmsg;
218 flex_logVolA =
new GeoLogVol(
"IFlex",Iflex_shape,Iflex_material);
219 flex_logVolC =
new GeoLogVol(
"IFlex",Iflex_shape,Iflex_material);
223 GeoPhysVol * flexPhysVolA =
new GeoPhysVol(flex_logVolA);
224 GeoPhysVol * flexPhysVolC =
new GeoPhysVol(flex_logVolC);
227 for(
int ii = 0; ii < nSectors; ii++) {
232 double phiOfCooling = phiOfModuleZero+ cooling_angle + ii*
angle;
233 std::ostringstream tmp1;
235 GeoNameTag *
tag1 =
new GeoNameTag(tmp1.str());
236 GeoTransform* xform1 =
new GeoTransform(GeoTrf::RotateZ3D(phiOfCooling)*GeoTrf::TranslateX3D(cooling_radius));
247 double phiOfFlex = phiOfModuleZero+ flex_angle + ii*
angle;
248 std::ostringstream
tmp2;
250 GeoNameTag *
tag2 =
new GeoNameTag(
tmp2.str());
255 GeoTransform* xformA2 =
new GeoTransform(GeoTrf::RotateZ3D(phiOfFlex)*GeoTrf::TranslateX3D(flexYmidPos)*GeoTrf::RotateZ3D(-90.*
Gaudi::Units::deg)*GeoTrf::RotateY3D(-90.*
Gaudi::Units::deg)*GeoTrf::RotateX3D(flex_rot));
260 GeoTransform* xformC2 =
new GeoTransform(GeoTrf::RotateZ3D(phiOfFlex)*GeoTrf::TranslateX3D(flexYmidPos)*GeoTrf::RotateZ3D(-90.*
Gaudi::Units::deg)*GeoTrf::RotateY3D(90.*
Gaudi::Units::deg)*GeoTrf::RotateX3D(-flex_rot));
270 GeoTransform* xform2 =
new GeoTransform(GeoTrf::RotateZ3D(phiOfFlex)*GeoTrf::TranslateX3D((flex_rmin+flex_rmax)*.5)*GeoTrf::RotateZ3D(flex_rot));
284 double middleA = zStartPosA+halfLengthA;
285 double middleC = zStartPosC+halfLengthC;