9 #include "GeoModelKernel/GeoBox.h"
10 #include "GeoModelKernel/GeoLogVol.h"
11 #include "GeoModelKernel/GeoTransform.h"
12 #include "GeoModelKernel/GeoNameTag.h"
13 #include "GeoModelKernel/GeoIdentifierTag.h"
14 #include "GeoModelKernel/GeoSimplePolygonBrep.h"
16 #include "GaudiKernel/SystemOfUnits.h"
22 double ModLength = 132.969 - 0.4 +
parameters->BackWallThickness();
23 double ModWidth = 33.02;
24 double ModHeight = 21.717;
25 double ModTailHeight = 7.747;
26 double ModHeadLength = 49.657;
28 double CuThick = 0.035;
29 double G10Thick = 0.4;
30 double WallThick = CuThick + G10Thick;
31 double ReducedModWidth = ModWidth - 2 * WallThick;
32 double MainWallCuThick = 0.035;
33 double MainWallBackCuThick = 0.035;
34 double MainWallG10Thick = 1.4;
35 double MainWallThick = MainWallCuThick + MainWallG10Thick;
37 double LamelHoffset =
parameters->LamelOffset_H();
38 double LamelIoffset =
parameters->LamelOffset_I();
39 double LamelJoffset =
parameters->LamelOffset_J();
40 double LamelG10Thick = 1.4;
41 double LamelCuThick = 0.035;
42 double LamelHThick = LamelG10Thick + 2*LamelCuThick;
44 double diamondThick = 0.5;
45 double diamondSize = 10;
46 double safety = 0.001;
49 const GeoMaterial* air = mat_mgr->
getMaterial(
"std::Air");
50 const GeoMaterial* ether = mat_mgr->
getMaterial(
"special::Ether");
51 const GeoMaterial* copper = mat_mgr->
getMaterial(
"std::Copper");
52 const GeoMaterial* g10 = mat_mgr->
getMaterial(
"std::G10");
54 const GeoMaterial* diamond = mat_mgr->
getMaterial(
"pix::Diamond");
55 if(diamond ==
nullptr)
82 GeoSimplePolygonBrep* complexEnvShape =
new GeoSimplePolygonBrep(ModWidth/2+safety);
83 std::vector<double> xShape, yShape;
85 double width = ModHeight*.5+safety;
86 double length = ModLength*.5+safety;
89 xShape.push_back(-
length); yShape.push_back(-
width+10.);
90 xShape.push_back(-
length+10.); yShape.push_back(-
width);
93 for(
unsigned int iPt=0; iPt<xShape.size(); iPt++)
94 complexEnvShape->addVertex(xShape[iPt],yShape[iPt]);
96 const GeoLogVol* bcmModLog=
new GeoLogVol(
"bcmModLog", complexEnvShape, air);
97 GeoPhysVol* bcmModPhys =
new GeoPhysVol(bcmModLog);
104 const GeoBox* bcmModBox =
new GeoBox(ModHeight/2+safety, ModWidth/2+safety, ModLength/2+safety);
105 const GeoLogVol* env_bcmModLog=
new GeoLogVol(
"EnvBcmModLog", bcmModBox, ether);
106 GeoPhysVol* env_bcmModPhys =
new GeoPhysVol(env_bcmModLog);
112 GeoPhysVol* WallC = wall.
Build(ModLength/2, ReducedModWidth/2, G10Thick, CuThick, g10, copper, mat_mgr);
117 GeoNameTag*
tag =
new GeoNameTag(
"Wall C");
118 env_bcmModPhys->add(
tag);
119 env_bcmModPhys->add(xform);
120 env_bcmModPhys->add(WallC);
123 GeoPhysVol* WallD = wall.
Build((ModTailHeight - WallThick - MainWallThick)/2, ReducedModWidth/2, CuThick, G10Thick, copper, g10, mat_mgr);
125 GeoTrf::Translate3D WallDPos(ModHeight/2 - WallThick - (ModTailHeight - WallThick - MainWallThick)/2, 0, WallThick/2 - ModLength/2);
126 xform =
new GeoTransform(WallDPos);
127 tag =
new GeoNameTag(
"Wall D");
128 env_bcmModPhys->add(
tag);
129 env_bcmModPhys->add(xform);
130 env_bcmModPhys->add(WallD);
133 GeoPhysVol* WallH = wall.
Build((ModTailHeight - WallThick - MainWallThick)/2, ReducedModWidth/2, LamelCuThick, LamelG10Thick, LamelCuThick, copper, g10, copper, mat_mgr);
135 GeoTrf::Translate3D WallHPos(ModHeight/2 -WallThick - (ModTailHeight - WallThick - MainWallThick)/2, 0, ModLength/2 - LamelHoffset);
136 xform =
new GeoTransform(WallHPos);
137 tag =
new GeoNameTag(
"Wall H");
138 env_bcmModPhys->add(
tag);
139 env_bcmModPhys->add(xform);
140 env_bcmModPhys->add(WallH);
143 GeoPhysVol* WallJ = wall.
Build((ModTailHeight - WallThick - MainWallThick - MainWallBackCuThick)/2, ReducedModWidth/2, LamelCuThick, LamelG10Thick, LamelCuThick, copper, g10, copper, mat_mgr);
145 GeoTrf::Translate3D WallJPos(ModHeight/2 -WallThick - (ModTailHeight - WallThick - MainWallThick - MainWallBackCuThick)/2, 0, ModLength/2 - LamelJoffset);
146 xform =
new GeoTransform(WallJPos);
147 tag =
new GeoNameTag(
"Wall J");
148 env_bcmModPhys->add(
tag);
149 env_bcmModPhys->add(xform);
150 env_bcmModPhys->add(WallJ);
153 GeoPhysVol* WallE = wall.
Build(ModHeight/2 - WallThick, ReducedModWidth/2,
parameters->BackWallThickness(), CuThick, g10, copper, mat_mgr);
155 GeoTrf::Translate3D WallEPos(0, 0,ModLength/2 - (
parameters->BackWallThickness()+CuThick)/2);
156 xform =
new GeoTransform(WallEPos);
157 tag =
new GeoNameTag(
"Wall E");
158 env_bcmModPhys->add(
tag);
159 env_bcmModPhys->add(xform);
160 env_bcmModPhys->add(WallE);
163 double heightI = ModHeight - ModTailHeight - WallThick;
164 GeoPhysVol* WallI = wall.
Build(heightI/2, ReducedModWidth/2, LamelG10Thick,
"bcmWallLog", g10);
166 GeoTrf::Translate3D WallIPos(WallThick + heightI/2 - ModHeight/2, 0, ModLength/2 - LamelIoffset);
167 xform =
new GeoTransform(WallIPos);
168 tag =
new GeoNameTag(
"Wall I");
169 env_bcmModPhys->add(
tag);
170 env_bcmModPhys->add(xform);
171 env_bcmModPhys->add(WallI);
174 GeoPhysVol* WallF = wall.
Build(heightI/2, ReducedModWidth/2, CuThick, G10Thick, copper, g10, mat_mgr);
176 GeoTrf::Translate3D WallFPos(WallThick + heightI/2 - ModHeight/2, 0, ModLength/2 - ModHeadLength + WallThick/2);
177 xform =
new GeoTransform(WallFPos);
178 tag =
new GeoNameTag(
"Wall F");
179 env_bcmModPhys->add(
tag);
180 env_bcmModPhys->add(xform);
181 env_bcmModPhys->add(WallF);
184 GeoPhysVol* WallG = wall.
Build(ModHeadLength/2, ReducedModWidth/2, CuThick, G10Thick, copper, g10, mat_mgr);
188 tag =
new GeoNameTag(
"Wall G");
189 env_bcmModPhys->add(
tag);
190 env_bcmModPhys->add(xform);
191 env_bcmModPhys->add(WallG);
194 GeoPhysVol* WallMain = wall.
Build((ModLength -
parameters->BackWallThickness() - CuThick)/2, ReducedModWidth/2, MainWallCuThick, MainWallG10Thick, copper, g10, mat_mgr);
198 tag =
new GeoNameTag(
"Wall Main");
199 env_bcmModPhys->add(
tag);
200 env_bcmModPhys->add(xform);
201 env_bcmModPhys->add(WallMain);
205 double lengthK = LamelHoffset - LamelHThick/2 - (
parameters->BackWallThickness() + CuThick);
206 GeoPhysVol* WallK = wall.
Build(lengthK/2, ReducedModWidth/2, CuThick,
"bcmWallLog",copper);
208 GeoTrf::Translation3D WallKPos(ModHeight/2 + MainWallThick + CuThick/2 - ModTailHeight, 0, ModLength/2 - lengthK/2 - (
parameters->BackWallThickness() + CuThick));
210 tag =
new GeoNameTag(
"Wall extra cupper");
211 env_bcmModPhys->add(
tag);
212 env_bcmModPhys->add(xform);
213 env_bcmModPhys->add(WallK);
216 GeoPhysVol* DiamondVolA = wall.
Build(diamondSize/2, diamondSize/2, diamondThick,
"bcmDiamondLog", diamond);
218 double diamond_x = ModHeight/2 + MainWallThick + diamondThick/2 - ModTailHeight;
221 tag =
new GeoNameTag(
"Diamond");
222 env_bcmModPhys->add(
tag);
223 env_bcmModPhys->add(
new GeoIdentifierTag(11950));
224 env_bcmModPhys->add(xform);
225 env_bcmModPhys->add(DiamondVolA);
227 GeoPhysVol* DiamondVolB = wall.
Build(diamondSize/2, diamondSize/2, diamondThick,
"bcmDiamondLog", diamond);
231 tag =
new GeoNameTag(
"Diamond");
232 env_bcmModPhys->add(
tag);
233 env_bcmModPhys->add(
new GeoIdentifierTag(11951));
234 env_bcmModPhys->add(xform);
235 env_bcmModPhys->add(DiamondVolB);
238 GeoPhysVol* WallA = wall.
Build(ModTailHeight/2, (ModLength - ModHeadLength)/2, CuThick, G10Thick, copper, g10, mat_mgr);
240 GeoTrf::Translation3D WallAPos((ModHeight - ModTailHeight)/2 , (ReducedModWidth + WallThick)/2, -ModHeadLength/2);
243 tag =
new GeoNameTag(
"Wall A");
244 env_bcmModPhys->add(
tag);
245 env_bcmModPhys->add(xform);
246 env_bcmModPhys->add(WallA);
249 GeoPhysVol* WallAA = wall.
Build(ModTailHeight/2, (ModLength - ModHeadLength)/2, G10Thick, CuThick, g10, copper, mat_mgr);
251 GeoTrf::Translation3D WallAAPos((ModHeight - ModTailHeight)/2 , -(ReducedModWidth + WallThick)/2, -ModHeadLength/2);
253 tag =
new GeoNameTag(
"Wall AA");
254 env_bcmModPhys->add(
tag);
255 env_bcmModPhys->add(xform);
256 env_bcmModPhys->add(WallAA);
259 GeoPhysVol* WallB = wall.
Build(ModHeight/2, ModHeadLength/2, CuThick, G10Thick, copper, g10, mat_mgr);
263 tag =
new GeoNameTag(
"Wall B");
264 env_bcmModPhys->add(
tag);
265 env_bcmModPhys->add(xform);
266 env_bcmModPhys->add(WallB);
269 GeoPhysVol* WallBB = wall.
Build(ModHeight/2, ModHeadLength/2, G10Thick, CuThick, g10, copper, mat_mgr);
273 tag =
new GeoNameTag(
"Wall BB");
274 env_bcmModPhys->add(
tag);
275 env_bcmModPhys->add(xform);
276 env_bcmModPhys->add(WallBB);
284 xform =
new GeoTransform(rmEnv);
285 tag =
new GeoNameTag(
"EnvBcmWallLog");
286 bcmModPhys->add(
tag);
287 bcmModPhys->add(xform);
288 bcmModPhys->add(env_bcmModPhys);