9 #include "GeoModelKernel/GeoMaterial.h"
10 #include "GeoModelKernel/GeoTube.h"
11 #include "GeoModelKernel/GeoBox.h"
12 #include "GeoModelKernel/GeoTubs.h"
13 #include "GeoModelKernel/GeoLogVol.h"
14 #include "GeoModelKernel/GeoNameTag.h"
15 #include "GeoModelKernel/GeoPhysVol.h"
16 #include "GeoModelKernel/GeoShape.h"
17 #include "GeoModelKernel/GeoShapeShift.h"
18 #include "GeoModelKernel/GeoShapeUnion.h"
19 #include "GeoModelKernel/GeoShapeSubtraction.h"
20 #include "GeoModelKernel/GeoTransform.h"
21 #include "GaudiKernel/SystemOfUnits.h"
33 : m_detectorStore(std::move(
detStore))
34 , m_access(std::move(pAccess))
43 if (StatusCode::SUCCESS !=
m_detectorStore->retrieve(materialManager, std::string(
"MATERIALS"))) {
48 const GeoMaterial *air = materialManager->
getMaterial(
"std::Air");
49 const GeoMaterial *rock = materialManager->
getMaterial(
"std::Rock");
50 const GeoMaterial *conc = materialManager->
getMaterial(
"std::Concrete");
51 const GeoMaterial *shieldSteel = materialManager->
getMaterial(
"shield::ShieldSteel");
56 std::map<std::string, unsigned int> elementMap;
58 for (
unsigned int i=0;
i<cavernElements->size();
i++) {
59 std::string
key = (*cavernElements)[
i]->getString(
"ELEMENT");
63 unsigned int recordIndex;
71 recordIndex = elementMap[
"Point1"];
73 GeoNameTag *
tag =
new GeoNameTag(
"CavernInfra");
77 recordIndex = elementMap[
"SX1"];
78 double SX1Xpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::m;
79 double SX1Ypos = (*cavernElements)[recordIndex]->getDouble(
"YPOS")*
Gaudi::Units::m;
80 double SX1Zpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
81 double SX1HalfLength = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::m;
82 double SX1HalfWidth = (*cavernElements)[recordIndex]->getDouble(
"HALFWIDTH")*
Gaudi::Units::m;
83 double SX1HalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
85 recordIndex = elementMap[
"SX1Air"];
86 double SX1AirYpos = (*cavernElements)[recordIndex]->getDouble(
"YPOS")*
Gaudi::Units::m;
87 double SX1AirHalfLength = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::m;
88 double SX1AirHalfWidth = (*cavernElements)[recordIndex]->getDouble(
"HALFWIDTH")*
Gaudi::Units::m;
89 double SX1AirHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
91 GeoTransform *s1XYZt =
new GeoTransform(GeoTrf::Translate3D(SX1Xpos,SX1Ypos,SX1Zpos));
93 GeoBox *SX1 =
new GeoBox(SX1HalfWidth ,SX1HalfHeight, SX1HalfLength);
94 GeoLogVol *lvsx1s =
new GeoLogVol(
"SX1Steel",SX1,shieldSteel);
95 GeoPhysVol *sx1 =
new GeoPhysVol(lvsx1s);
100 GeoTransform *s1z =
new GeoTransform(GeoTrf::TranslateY3D(SX1AirYpos));
102 GeoBox *SX1Air =
new GeoBox( SX1AirHalfWidth, SX1AirHalfHeight, SX1AirHalfLength);
103 GeoLogVol *lvsx1a =
new GeoLogVol(
"SX1Air",SX1Air,air);
104 GeoPhysVol *sx1a =
new GeoPhysVol(lvsx1a);
110 recordIndex = elementMap[
"WallACConc"];
111 double WallACConcHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
112 double WallACConcMinR = (*cavernElements)[recordIndex]->getDouble(
"MINR")*
Gaudi::Units::m;
113 double WallACConcMaxR = (*cavernElements)[recordIndex]->getDouble(
"MAXR")*
Gaudi::Units::m;
114 double WallACConcSphi= (*cavernElements)[recordIndex]->getDouble(
"SPHI");
115 double WallACConcDphi= (*cavernElements)[recordIndex]->getDouble(
"DPHI");
117 recordIndex = elementMap[
"BoxConc"];
118 double BoxConcHalfLength = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::m;
119 double BoxConcHalfWidth = (*cavernElements)[recordIndex]->getDouble(
"HALFWIDTH")*
Gaudi::Units::m;
120 double BoxConcHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
122 recordIndex = elementMap[
"VaultConc"];
123 double VaultConcZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
124 double VaultConcYrotate = (*cavernElements)[recordIndex]->getDouble(
"YROTATE");
125 double VaultConcHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
126 double VaultConcMinR = (*cavernElements)[recordIndex]->getDouble(
"MINR")*
Gaudi::Units::m;
127 double VaultConcMaxR = (*cavernElements)[recordIndex]->getDouble(
"MAXR")*
Gaudi::Units::m;
128 double VaultConcSphi= (*cavernElements)[recordIndex]->getDouble(
"SPHI");
129 double VaultConcDphi= (*cavernElements)[recordIndex]->getDouble(
"DPHI");
131 recordIndex = elementMap[
"HallConc"];
132 double HallConcHalfLength = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::m;
133 double HallConcHalfWidth = (*cavernElements)[recordIndex]->getDouble(
"HALFWIDTH")*
Gaudi::Units::m;
134 double HallConcHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
136 recordIndex = elementMap[
"BoxConcW"];
137 double BoxConcWZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
138 double BoxConcWYrotate = (*cavernElements)[recordIndex]->getDouble(
"YROTATE");
140 recordIndex = elementMap[
"BoxConcVleft"];
141 double BoxConcVleftZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
142 double BoxConcVleftYrotate = (*cavernElements)[recordIndex]->getDouble(
"YROTATE");
144 recordIndex = elementMap[
"BoxConcVright"];
145 double BoxConcVrightZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
146 double BoxConcVrightYrotate = (*cavernElements)[recordIndex]->getDouble(
"YROTATE");
148 recordIndex = elementMap[
"SurfaceFloor"];
149 double SurfaceFloorXpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::m;
150 double SurfaceFloorZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
151 double SurfaceFloorHalfLength = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::m;
152 double SurfaceFloorHalfWidth = (*cavernElements)[recordIndex]->getDouble(
"HALFWIDTH")*
Gaudi::Units::m;
153 double SurfaceFloorHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
156 GeoTubs *WallACConcrete =
new GeoTubs(WallACConcMinR, WallACConcMaxR, WallACConcHalfHeight, WallACConcSphi, WallACConcDphi);
157 GeoBox *BoxConc =
new GeoBox(BoxConcHalfLength, BoxConcHalfWidth, BoxConcHalfHeight);
158 GeoTubs *VaultConcrete =
new GeoTubs(VaultConcMinR, VaultConcMaxR, VaultConcHalfHeight , VaultConcSphi, VaultConcDphi);
159 GeoBox *HallConcrete =
new GeoBox(HallConcHalfLength, HallConcHalfWidth, HallConcHalfHeight);
160 GeoBox *SurfaceFloor =
new GeoBox(SurfaceFloorHalfLength, SurfaceFloorHalfWidth, SurfaceFloorHalfHeight);
162 GeoTrf::Transform3D BoxCutWallConc = GeoTrf::TranslateZ3D(BoxConcWZpos)*GeoTrf::RotateY3D(BoxConcWYrotate);
163 GeoTrf::Transform3D BoxCutVaultLeftConc = GeoTrf::TranslateZ3D(BoxConcVleftZpos)*GeoTrf::RotateY3D(BoxConcVleftYrotate);
164 GeoTrf::Transform3D BoxCutVaulRightConc = GeoTrf::TranslateZ3D(BoxConcVrightZpos)*GeoTrf::RotateY3D(BoxConcVrightYrotate);
166 recordIndex = elementMap[
"HoleJN"];
167 double HoleJNrmin = (*cavernElements)[recordIndex]->getDouble(
"MINR")*
Gaudi::Units::mm;
168 double HoleJNrmax = (*cavernElements)[recordIndex]->getDouble(
"MAXR")*
Gaudi::Units::mm;
169 double HoleJNdz = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::mm;
170 GeoTubs *HoleJN =
new GeoTubs(HoleJNrmin,HoleJNrmax,HoleJNdz, 0.,2.*
M_PI);
172 recordIndex = elementMap[
"WallAAir"];
173 double WallAAirZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
174 double WallAAirXpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::m;
176 recordIndex = elementMap[
"WallCAir"];
177 double WallCAirZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
178 double WallCAirXpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::m;
179 double WallCAirZrotate = (*cavernElements)[recordIndex]->getDouble(
"ZROTATE");
182 const GeoShape & CutWallConc = (*WallACConcrete).subtract((*BoxConc) <<
GeoTrf::Transform3D(BoxCutWallConc)).
183 subtract((*HoleJN) << GeoTrf::RotateY3D(
M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) );
184 const GeoShape & CutVaultConc = (*VaultConcrete).subtract((*BoxConc) <<
GeoTrf::Transform3D(BoxCutVaultLeftConc)).
187 recordIndex = elementMap[
"ShaftCut"];
188 double ShaftCutZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
189 double ShaftCutYrotate = (*cavernElements)[recordIndex]->getDouble(
"YROTATE");
190 double ShaftCutHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
191 double ShaftCutMinR = (*cavernElements)[recordIndex]->getDouble(
"MINR")*
Gaudi::Units::m;
192 double ShaftCutMaxR = (*cavernElements)[recordIndex]->getDouble(
"MAXR")*
Gaudi::Units::m;
194 recordIndex = elementMap[
"PX14Conc"];
195 double PX14ConcXpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::m;
196 double PX14ConcYpos = (*cavernElements)[recordIndex]->getDouble(
"YPOS")*
Gaudi::Units::m;
197 double PX14ConcHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
198 double PX14ConcMinR = (*cavernElements)[recordIndex]->getDouble(
"MINR")*
Gaudi::Units::m;
199 double PX14ConcMaxR = (*cavernElements)[recordIndex]->getDouble(
"MAXR")*
Gaudi::Units::m;
201 recordIndex = elementMap[
"PX16Conc"];
202 double PX16ConcXpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::m;
203 double PX16ConcYpos = (*cavernElements)[recordIndex]->getDouble(
"YPOS")*
Gaudi::Units::m;
204 double PX16ConcHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
205 double PX16ConcMinR = (*cavernElements)[recordIndex]->getDouble(
"MINR")*
Gaudi::Units::m;
206 double PX16ConcMaxR = (*cavernElements)[recordIndex]->getDouble(
"MAXR")*
Gaudi::Units::m;
209 GeoTube *ShaftCut =
new GeoTube(ShaftCutMinR, ShaftCutMaxR, ShaftCutHalfHeight);
210 GeoTube *PX14Conc =
new GeoTube(PX14ConcMinR, PX14ConcMaxR, PX14ConcHalfHeight);
211 GeoTube *PX16Conc =
new GeoTube(PX16ConcMinR, PX16ConcMaxR, PX16ConcHalfHeight);
213 const GeoShape & ShaftsConc=
214 ((*PX14Conc) << GeoTrf::TranslateX3D(PX14ConcXpos)*GeoTrf::TranslateY3D(PX14ConcYpos)).
215 add((*PX16Conc) << GeoTrf::TranslateX3D(PX16ConcXpos)*GeoTrf::TranslateY3D(PX16ConcYpos)).
216 subtract((*ShaftCut) << GeoTrf::TranslateZ3D(ShaftCutZpos)*GeoTrf::RotateY3D(ShaftCutYrotate));
218 recordIndex = elementMap[
"WallCConc"];
219 double WallCConcZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
220 double WallCConcXpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::m;
221 double WallCConcZrotate = (*cavernElements)[recordIndex]->getDouble(
"ZROTATE");
223 recordIndex = elementMap[
"WallAConc"];
224 double WallAConcZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
225 double WallAConcXpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::m;
227 recordIndex = elementMap[
"ShaftsConc"];
228 double ShaftsConcZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
231 recordIndex =elementMap[
"BoxConcJN"];
232 double BoxConcJNDX = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::mm;
233 double BoxConcJNDY = (*cavernElements)[recordIndex]->getDouble(
"HALFWIDTH")*
Gaudi::Units::mm;
234 double BoxConcJNDZ = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::mm;
235 double BoxConcJNXpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::mm;
236 recordIndex =elementMap[
"BoxConcExtraJN"];
237 double BoxConcExtraJNDX = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::mm;
238 double BoxConcExtraJNDY = (*cavernElements)[recordIndex]->getDouble(
"HALFWIDTH")*
Gaudi::Units::mm;
239 double BoxConcExtraJNDZ = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::mm;
240 double BoxConcExtraJNXpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::mm;
241 double BoxConcExtraJNYpos = (*cavernElements)[recordIndex]->getDouble(
"YPOS");
242 recordIndex =elementMap[
"StrutConcJN"];
243 double StrutConcJNDX = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::mm;
244 double StrutConcJNDY = (*cavernElements)[recordIndex]->getDouble(
"HALFWIDTH")*
Gaudi::Units::mm;
245 double StrutConcJNDZ = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::mm;
246 double StrutConcJNXpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::mm;
247 double StrutConcJNYpos = (*cavernElements)[recordIndex]->getDouble(
"YPOS")*
Gaudi::Units::mm;
248 double StrutConcJNZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::mm;
250 GeoBox *BoxConcJNC =
new GeoBox(BoxConcJNDX,BoxConcJNDY,BoxConcJNDZ);
251 GeoBox *BoxConcJNA =
new GeoBox(BoxConcJNDX,BoxConcJNDY,BoxConcJNDZ);
252 GeoBox *BoxConcStupidExtraJNC =
new GeoBox(BoxConcExtraJNDX,BoxConcExtraJNDY,BoxConcExtraJNDZ);
253 GeoBox *BoxConcStupidExtraJNA =
new GeoBox(BoxConcExtraJNDX,BoxConcExtraJNDY,BoxConcExtraJNDZ);
254 const GeoBox *StrutConcJN =
new GeoBox(StrutConcJNDX,StrutConcJNDY,StrutConcJNDZ);
256 recordIndex = elementMap[
"CavernAir"];
257 double CavernAirZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
260 const GeoShape & Concrete= (*HallConcrete).
261 add((CutWallConc << GeoTrf::TranslateZ3D(WallCConcZpos)*GeoTrf::TranslateX3D(WallCConcXpos)*GeoTrf::RotateZ3D(WallCConcZrotate))).
262 add((ShaftsConc << GeoTrf::TranslateZ3D(ShaftsConcZpos))).
263 add((CutVaultConc << GeoTrf::TranslateZ3D(VaultConcZpos)*GeoTrf::RotateY3D(VaultConcYrotate))).
264 add((*SurfaceFloor) << GeoTrf::TranslateZ3D(SurfaceFloorZpos)*GeoTrf::TranslateX3D(SurfaceFloorXpos)).
265 add((CutWallConc << GeoTrf::TranslateZ3D(WallAConcZpos)*GeoTrf::TranslateX3D(WallAConcXpos))).
267 add((*BoxConcJNC) << GeoTrf::TranslateX3D(BoxConcJNXpos) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
268 add((*BoxConcStupidExtraJNC) << GeoTrf::TranslateX3D(BoxConcExtraJNXpos) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) * GeoTrf::TranslateY3D(-BoxConcExtraJNYpos) ).
269 add((*BoxConcJNA) << GeoTrf::TranslateX3D(-BoxConcJNXpos-15*
Gaudi::Units::mm) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
270 add((*BoxConcStupidExtraJNA) << GeoTrf::TranslateX3D(-BoxConcExtraJNXpos-15*
Gaudi::Units::mm) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) * GeoTrf::TranslateY3D(BoxConcExtraJNYpos) ).
272 add((*StrutConcJN) << GeoTrf::TranslateX3D(StrutConcJNXpos) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
273 add((*StrutConcJN) << GeoTrf::TranslateX3D(StrutConcJNXpos) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
274 add((*StrutConcJN) << GeoTrf::TranslateX3D(StrutConcJNXpos) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
275 add((*StrutConcJN) << GeoTrf::TranslateX3D(-StrutConcJNXpos-15.*
Gaudi::Units::mm) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
276 add((*StrutConcJN) << GeoTrf::TranslateX3D(-StrutConcJNXpos-15.*
Gaudi::Units::mm) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
277 add((*StrutConcJN) << GeoTrf::TranslateX3D(-StrutConcJNXpos-15.*
Gaudi::Units::mm) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) );
286 recordIndex = elementMap[
"WallACAir"];
287 double WallACAirHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
288 double WallACAirMinR = (*cavernElements)[recordIndex]->getDouble(
"MINR")*
Gaudi::Units::m;
289 double WallACAirMaxR = (*cavernElements)[recordIndex]->getDouble(
"MAXR")*
Gaudi::Units::m;
290 double WallACAirSphi= (*cavernElements)[recordIndex]->getDouble(
"SPHI");
291 double WallACAirDphi= (*cavernElements)[recordIndex]->getDouble(
"DPHI");
293 recordIndex = elementMap[
"BoxAir"];
294 double BoxAirHalfLength = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::m;
295 double BoxAirHalfWidth = (*cavernElements)[recordIndex]->getDouble(
"HALFWIDTH")*
Gaudi::Units::m;
296 double BoxAirHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
298 recordIndex = elementMap[
"VaultAir"];
299 double VaultAirZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
300 double VaultAirYrotate = (*cavernElements)[recordIndex]->getDouble(
"YROTATE");
301 double VaultAirHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
302 double VaultAirMinR = (*cavernElements)[recordIndex]->getDouble(
"MINR")*
Gaudi::Units::m;
303 double VaultAirMaxR = (*cavernElements)[recordIndex]->getDouble(
"MAXR")*
Gaudi::Units::m;
304 double VaultAirSphi= (*cavernElements)[recordIndex]->getDouble(
"SPHI");
305 double VaultAirDphi= (*cavernElements)[recordIndex]->getDouble(
"DPHI");
307 recordIndex = elementMap[
"HallAir"];
308 double HallAirHalfLength = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::m;
309 double HallAirHalfWidth = (*cavernElements)[recordIndex]->getDouble(
"HALFWIDTH")*
Gaudi::Units::m;
310 double HallAirHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
312 recordIndex = elementMap[
"BaseAir"];
313 double BaseAirZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
314 double BaseAirHalfLength = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::m;
315 double BaseAirHalfWidth = (*cavernElements)[recordIndex]->getDouble(
"HALFWIDTH")*
Gaudi::Units::m;
316 double BaseAirHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
318 recordIndex = elementMap[
"BoxAirW"];
319 double BoxAirWZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
320 double BoxAirWYrotate = (*cavernElements)[recordIndex]->getDouble(
"YROTATE");
322 recordIndex = elementMap[
"BoxAirVleft"];
323 double BoxAirVleftZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
324 double BoxAirVleftYrotate = (*cavernElements)[recordIndex]->getDouble(
"YROTATE");
326 recordIndex = elementMap[
"BoxAirVright"];
327 double BoxAirVrightZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
328 double BoxAirVrightYrotate = (*cavernElements)[recordIndex]->getDouble(
"YROTATE");
330 GeoTubs *WallACAir =
new GeoTubs(WallACAirMinR, WallACAirMaxR, WallACAirHalfHeight, WallACAirSphi, WallACAirDphi);
331 GeoBox *BoxAir =
new GeoBox(BoxAirHalfLength, BoxAirHalfWidth, BoxAirHalfHeight);
332 GeoTubs *VaultAir =
new GeoTubs(VaultAirMinR, VaultAirMaxR, VaultAirHalfHeight, VaultAirSphi, VaultAirDphi);
333 GeoBox *HallAir =
new GeoBox(HallAirHalfLength, HallAirHalfWidth, HallAirHalfHeight);
334 GeoBox *BaseAir =
new GeoBox(BaseAirHalfLength, BaseAirHalfWidth, BaseAirHalfHeight);
335 GeoTrf::Transform3D BoxCutWallAir = GeoTrf::TranslateZ3D(BoxAirWZpos)*GeoTrf::RotateY3D(BoxAirWYrotate);
336 GeoTrf::Transform3D BoxCutVaultLeftAir = GeoTrf::TranslateZ3D(BoxAirVleftZpos)*GeoTrf::RotateY3D(BoxAirVleftYrotate);
337 GeoTrf::Transform3D BoxCutVaulRightAir = GeoTrf::TranslateZ3D(BoxAirVrightZpos)*GeoTrf::RotateY3D(BoxAirVrightYrotate);
340 const GeoShape & CutWallAir = (*WallACAir).subtract((*BoxAir) <<
GeoTrf::Transform3D(BoxCutWallAir));
341 const GeoShape & CutVaultAir = (*VaultAir).subtract((*BoxAir) <<
GeoTrf::Transform3D(BoxCutVaultLeftAir)).
345 recordIndex = elementMap[
"PX14Air"];
346 double PX14AirXpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::m;
347 double PX14AirYpos = (*cavernElements)[recordIndex]->getDouble(
"YPOS")*
Gaudi::Units::m;
348 double PX14AirHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
349 double PX14AirMinR = (*cavernElements)[recordIndex]->getDouble(
"MINR")*
Gaudi::Units::m;
350 double PX14AirMaxR = (*cavernElements)[recordIndex]->getDouble(
"MAXR")*
Gaudi::Units::m;
352 recordIndex = elementMap[
"PX16Air"];
353 double PX16AirXpos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::m;
354 double PX16AirYpos = (*cavernElements)[recordIndex]->getDouble(
"YPOS")*
Gaudi::Units::m;
355 double PX16AirHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
356 double PX16AirMinR = (*cavernElements)[recordIndex]->getDouble(
"MINR")*
Gaudi::Units::m;
357 double PX16AirMaxR = (*cavernElements)[recordIndex]->getDouble(
"MAXR")*
Gaudi::Units::m;
359 GeoTube *PX14Air =
new GeoTube(PX14AirMinR, PX14AirMaxR, PX14AirHalfHeight);
360 GeoTube *PX16Air =
new GeoTube(PX16AirMinR, PX16AirMaxR, PX16AirHalfHeight);
362 recordIndex = elementMap[
"CavShaftsConc"];
363 double CavShaftsYPos = (*cavernElements)[recordIndex]->getDouble(
"YPOS")*
Gaudi::Units::m;
364 double CavShaftsXrotate = (*cavernElements)[recordIndex]->getDouble(
"XROTATE");
365 double CavShaftsYrotate = (*cavernElements)[recordIndex]->getDouble(
"YROTATE");
367 const GeoShape & ShaftsAir=
368 ((*PX14Air) << GeoTrf::TranslateX3D(PX14AirXpos)*GeoTrf::TranslateY3D(PX14AirYpos)).
369 add((*PX16Air) << GeoTrf::TranslateX3D(PX16AirXpos)*GeoTrf::TranslateY3D(PX16AirYpos));
372 const GeoShape & CavernAir = (*HallAir).
374 add(CutWallAir << GeoTrf::TranslateZ3D(WallAAirZpos)*GeoTrf::TranslateX3D(WallAAirXpos)).
375 add(CutWallAir << GeoTrf::TranslateZ3D(WallCAirZpos)*GeoTrf::TranslateX3D(WallCAirXpos)*GeoTrf::RotateZ3D(WallCAirZrotate)).
376 add(CutVaultAir << GeoTrf::TranslateZ3D(VaultAirZpos)*GeoTrf::RotateY3D(VaultAirYrotate)).
377 add((*BaseAir) << GeoTrf::TranslateZ3D(BaseAirZpos)).
379 subtract((*BoxConcJNC) << GeoTrf::TranslateX3D(BoxConcJNXpos) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
380 subtract((*BoxConcStupidExtraJNC) << GeoTrf::TranslateX3D(BoxConcExtraJNXpos) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) * GeoTrf::TranslateY3D(-BoxConcExtraJNYpos) ).
381 subtract((*BoxConcJNA) << GeoTrf::TranslateX3D(-BoxConcJNXpos-15*
Gaudi::Units::mm) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
382 subtract((*BoxConcStupidExtraJNA) << GeoTrf::TranslateX3D(-BoxConcExtraJNXpos-15*
Gaudi::Units::mm) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) * GeoTrf::TranslateY3D(BoxConcExtraJNYpos) ).
384 subtract((*StrutConcJN) << GeoTrf::TranslateX3D(StrutConcJNXpos) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
385 subtract((*StrutConcJN) << GeoTrf::TranslateX3D(StrutConcJNXpos) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
386 subtract((*StrutConcJN) << GeoTrf::TranslateX3D(StrutConcJNXpos) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
387 subtract((*StrutConcJN) << GeoTrf::TranslateX3D(-StrutConcJNXpos-15.*
Gaudi::Units::mm) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
388 subtract((*StrutConcJN) << GeoTrf::TranslateX3D(-StrutConcJNXpos-15.*
Gaudi::Units::mm) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
389 subtract((*StrutConcJN) << GeoTrf::TranslateX3D(-StrutConcJNXpos-15.*
Gaudi::Units::mm) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ).
390 add((*HoleJN) << GeoTrf::RotateY3D(
M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos+CavernAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) << GeoTrf::TranslateY3D(CavShaftsYPos)*GeoTrf::RotateY3D(CavShaftsYrotate)*GeoTrf::RotateX3D(CavShaftsXrotate) );
393 recordIndex = elementMap[
"ShaftsAir"];
394 double ShaftsAirZpos = (*cavernElements)[recordIndex]->getDouble(
"ZPOS")*
Gaudi::Units::m;
396 const GeoShape & AirHall=
397 ((CavernAir << GeoTrf::TranslateZ3D(CavernAirZpos))).
398 add((ShaftsAir << GeoTrf::TranslateZ3D(ShaftsAirZpos)));
402 recordIndex = elementMap[
"Rock"];
403 double RockHalfLength = (*cavernElements)[recordIndex]->getDouble(
"HALFLENGTH")*
Gaudi::Units::m;
404 double RockHalfWidth = (*cavernElements)[recordIndex]->getDouble(
"HALFWIDTH")*
Gaudi::Units::m;
405 double RockHalfHeight = (*cavernElements)[recordIndex]->getDouble(
"HALFHEIGHT")*
Gaudi::Units::m;
406 double RockXPos = (*cavernElements)[recordIndex]->getDouble(
"XPOS")*
Gaudi::Units::m;
407 double RockYPos = (*cavernElements)[recordIndex]->getDouble(
"YPOS")*
Gaudi::Units::m;
409 GeoBox *Rockbox =
new GeoBox( RockHalfWidth, RockHalfHeight, RockHalfLength);
410 const GeoShape & BedRock = ((*Rockbox) .
411 subtract((AirHall) <<GeoTrf::TranslateY3D(CavShaftsYPos)*GeoTrf::RotateY3D(CavShaftsYrotate)*GeoTrf::RotateX3D(CavShaftsXrotate))).
412 subtract((*HoleJN) << GeoTrf::RotateY3D(
M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos+CavernAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) << GeoTrf::TranslateY3D(CavShaftsYPos)*GeoTrf::RotateY3D(CavShaftsYrotate)*GeoTrf::RotateX3D(CavShaftsXrotate) );
414 GeoTransform *rZt =
new GeoTransform(GeoTrf::TranslateY3D(RockYPos)*GeoTrf::TranslateX3D(RockXPos));
416 GeoLogVol *lvr =
new GeoLogVol(
"BEDROCK",&BedRock,rock);
417 GeoPhysVol *bedrock =
new GeoPhysVol(lvr);
422 const GeoShape & CavConcrete = ((Concrete).
426 GeoTransform* xfTop =
new GeoTransform(GeoTrf::TranslateY3D(CavShaftsYPos)*GeoTrf::RotateY3D(CavShaftsYrotate)*GeoTrf::RotateX3D(CavShaftsXrotate));
428 GeoLogVol *lvcsc =
new GeoLogVol(
"CAV_SHAFTS_CONC",&CavConcrete,conc);
429 GeoPhysVol *CavShaftsConc =
new GeoPhysVol(lvcsc);
430 bedrock->add(CavShaftsConc);
445 const std::string&
node)