7 #include "GeoModelKernel/GeoElement.h"
8 #include "GeoModelKernel/GeoMaterial.h"
9 #include "GeoModelKernel/GeoFullPhysVol.h"
10 #include "GeoModelKernel/GeoPhysVol.h"
11 #include "GeoModelKernel/GeoVPhysVol.h"
12 #include "GeoModelKernel/GeoLogVol.h"
13 #include "GeoModelKernel/GeoTransform.h"
14 #include "GeoModelKernel/GeoAlignableTransform.h"
15 #include "GeoModelKernel/GeoIdentifierTag.h"
16 #include "GeoModelKernel/GeoNameTag.h"
17 #include "GeoModelKernel/GeoSerialTransformer.h"
18 #include "GeoModelKernel/GeoXF.h"
19 #include "GeoModelKernel/GeoTube.h"
20 #include "GeoModelKernel/GeoPcon.h"
21 #include "GeoModelKernel/GeoTubs.h"
22 #include "GeoModelKernel/GeoCons.h"
23 #include "GeoModelKernel/GeoBox.h"
24 #include "GeoModelKernel/GeoTrap.h"
25 #include "GeoModelKernel/GeoTrd.h"
26 #include "GeoModelKernel/GeoShape.h"
27 #include "GeoModelKernel/GeoShapeUnion.h"
28 #include "GeoModelKernel/GeoShapeShift.h"
29 #include "GeoModelKernel/GeoShapeSubtraction.h"
30 #include "GeoModelKernel/Units.h"
41 #include "GaudiKernel/PhysicalConstants.h"
42 #include "GaudiKernel/MsgStream.h"
43 #include "GaudiKernel/Bootstrap.h"
46 #include "GeoGenericFunctions/Variable.h"
49 using namespace GeoXF;
51 static const unsigned int NCrates=16;
53 static const double Enda=1155;
54 static const double Endb=1695.2;
55 static const double Endc=2771.6;
56 static const double DYa=1155*
tan(Alfa/2);
57 static const double DYb=1695.2*
tan(Alfa/2);
58 static const double DYc=2771.6*
tan(Alfa/2);
64 std::map<std::string, unsigned int>& trdMap,
66 std::map<std::string, unsigned int>& trapMap,
68 std::map<std::string, unsigned int>& boxMap,
73 unsigned int recordIndex = trdMap[
"SecE2"];
74 double SecE2xhlen1 = BarrelDMTrds[recordIndex]->getDouble(
"XHLEN1");
75 double SecE2xhlen2 = BarrelDMTrds[recordIndex]->getDouble(
"XHLEN2");
76 double SecE2ztr = BarrelDMTrds[recordIndex]->getDouble(
"ZTR");
78 recordIndex = trdMap[
"Spb0"];
79 double Spb0xhlen1 = BarrelDMTrds[recordIndex]->getDouble(
"XHLEN1");
80 double Spb0xhlen2 = BarrelDMTrds[recordIndex]->getDouble(
"XHLEN2");
81 double Spb0yhlen1 = BarrelDMTrds[recordIndex]->getDouble(
"YHLEN1");
82 double Spb0yhlen2 = BarrelDMTrds[recordIndex]->getDouble(
"YHLEN2");
83 double Spb0zhlen = BarrelDMTrds[recordIndex]->getDouble(
"ZHLEN");
84 double Spb0ytr = BarrelDMTrds[recordIndex]->getDouble(
"YTR");
85 double Spb0xrot = BarrelDMTrds[recordIndex]->getDouble(
"XROT");
87 recordIndex = boxMap[
"Box"];
91 double Boxxtr = BarrelDMBoxes[recordIndex]->getDouble(
"XTR");
92 double Boxytr = BarrelDMBoxes[recordIndex]->getDouble(
"YTR");
93 double Boxztr = BarrelDMBoxes[recordIndex]->getDouble(
"ZTR");
96 recordIndex = boxMap[
"SplBox"];
97 double SplBoxhlen = BarrelDMBoxes[recordIndex]->getDouble(
"HLEN");
98 double SplBoxhwdt = BarrelDMBoxes[recordIndex]->getDouble(
"HWDT");
99 double SplBoxhhgt = BarrelDMBoxes[recordIndex]->getDouble(
"HHGT");
100 double SplBoxytr = BarrelDMBoxes[recordIndex]->getDouble(
"YTR");
101 double SplBoxztr = BarrelDMBoxes[recordIndex]->getDouble(
"ZTR");
102 double SplBoxxrot = BarrelDMBoxes[recordIndex]->getDouble(
"XROT");
104 recordIndex = trapMap[
"Spb1"];
105 double Spb1zhlen = BarrelDMTraps[recordIndex]->getDouble(
"ZHLEN");
106 double Spb1theta = BarrelDMTraps[recordIndex]->getDouble(
"THETA");
107 double Spb1phi = BarrelDMTraps[recordIndex]->getDouble(
"PHI");
108 double Spb1yzn = BarrelDMTraps[recordIndex]->getDouble(
"YZN");
109 double Spb1xynzn = BarrelDMTraps[recordIndex]->getDouble(
"XYNZN");
110 double Spb1xypzn = BarrelDMTraps[recordIndex]->getDouble(
"XYPZN");
111 double Spb1angn = BarrelDMTraps[recordIndex]->getDouble(
"ANGN");
112 double Spb1yzp = BarrelDMTraps[recordIndex]->getDouble(
"YZP");
113 double Spb1xynzp = BarrelDMTraps[recordIndex]->getDouble(
"XYNZP");
114 double Spb1xypzp = BarrelDMTraps[recordIndex]->getDouble(
"XYPZP");
115 double Spb1angp = BarrelDMTraps[recordIndex]->getDouble(
"ANGP");
116 double Spb1xtr = BarrelDMTraps[recordIndex]->getDouble(
"XTR");
117 double Spb1ytr = BarrelDMTraps[recordIndex]->getDouble(
"YTR");
118 double Spb1ztr = BarrelDMTraps[recordIndex]->getDouble(
"ZTR");
119 double Spb1xrot = BarrelDMTraps[recordIndex]->getDouble(
"XROT");
121 recordIndex = trapMap[
"Spb3"];
122 double Spb3zhlen = BarrelDMTraps[recordIndex]->getDouble(
"ZHLEN");
123 double Spb3theta = BarrelDMTraps[recordIndex]->getDouble(
"THETA");
124 double Spb3phi = BarrelDMTraps[recordIndex]->getDouble(
"PHI");
125 double Spb3yzn = BarrelDMTraps[recordIndex]->getDouble(
"YZN");
126 double Spb3xynzn = BarrelDMTraps[recordIndex]->getDouble(
"XYNZN");
127 double Spb3xypzn = BarrelDMTraps[recordIndex]->getDouble(
"XYPZN");
128 double Spb3angn = BarrelDMTraps[recordIndex]->getDouble(
"ANGN");
129 double Spb3yzp = BarrelDMTraps[recordIndex]->getDouble(
"YZP");
130 double Spb3xynzp = BarrelDMTraps[recordIndex]->getDouble(
"XYNZP");
131 double Spb3xypzp = BarrelDMTraps[recordIndex]->getDouble(
"XYPZP");
132 double Spb3angp = BarrelDMTraps[recordIndex]->getDouble(
"ANGP");
133 double Spb3ztr = BarrelDMTraps[recordIndex]->getDouble(
"ZTR");
135 recordIndex = trapMap[
"Spb2"];
136 double Spb2zhlen = BarrelDMTraps[recordIndex]->getDouble(
"ZHLEN");
137 double Spb2theta = BarrelDMTraps[recordIndex]->getDouble(
"THETA");
138 double Spb2phi = BarrelDMTraps[recordIndex]->getDouble(
"PHI");
139 double Spb2yzn = BarrelDMTraps[recordIndex]->getDouble(
"YZN");
140 double Spb2xynzn = BarrelDMTraps[recordIndex]->getDouble(
"XYNZN");
141 double Spb2xypzn = BarrelDMTraps[recordIndex]->getDouble(
"XYPZN");
142 double Spb2angn = BarrelDMTraps[recordIndex]->getDouble(
"ANGN");
143 double Spb2yzp = BarrelDMTraps[recordIndex]->getDouble(
"YZP");
144 double Spb2xynzp = BarrelDMTraps[recordIndex]->getDouble(
"XYNZP");
145 double Spb2xypzp = BarrelDMTraps[recordIndex]->getDouble(
"XYPZP");
146 double Spb2angp = BarrelDMTraps[recordIndex]->getDouble(
"ANGP");
147 double Spb2ytr = BarrelDMTraps[recordIndex]->getDouble(
"YTR");
148 double Spb2ztr = BarrelDMTraps[recordIndex]->getDouble(
"ZTR");
150 const GeoMaterial* matLArServices17 = materialManager->
getMaterial(
"LAr::LArServices17");
151 const GeoMaterial* matLArServices18 = materialManager->
getMaterial(
"LAr::LArServices18");
152 const GeoMaterial* matLArServices19 = materialManager->
getMaterial(
"LAr::LArServices19");
153 const GeoMaterial* matLArServices20 = materialManager->
getMaterial(
"LAr::LArServices20");
154 const GeoMaterial *alu = materialManager->
getMaterial(
"std::Aluminium");
155 const GeoMaterial *air = materialManager->
getMaterial(
"std::Air");
161 GeoTrd *Trdair2 =
new GeoTrd(SecE2xhlen1, SecE2xhlen2, DYb, DYc, (Endc-Endb)/2);
162 const GeoShape & SectorEnvelope= ((*Trdair2).
166 const GeoShape & SectorEnvelopes= ((SectorEnvelope).
167 add(SectorEnvelope << GeoTrf::TranslateY3D(-(DYb+DYc)*
cos(Alfa/2)*
cos(Alfa/2))*GeoTrf::TranslateZ3D(-(DYb+DYc)*0.5*
sin(Alfa))*GeoTrf::RotateX3D(Alfa)));
169 GeoLogVol *lvse2r =
new GeoLogVol(
"LAr::DM::SectorEnvelopes2r",&SectorEnvelopes,matLArServices20);
170 GeoPhysVol *sectorenvelopes2r =
new GeoPhysVol(lvse2r);
172 GeoLogVol *lvse2l =
new GeoLogVol(
"LAr::DM::SectorEnvelopes2l",&SectorEnvelopes,matLArServices20);
173 GeoPhysVol *sectorenvelopes2l =
new GeoPhysVol(lvse2l);
175 GeoLogVol *lvse2h =
new GeoLogVol(
"LAr::DM::SectorEnvelopes2h",&SectorEnvelopes,matLArServices19);
176 GeoPhysVol *sectorenvelopes2h =
new GeoPhysVol(lvse2h);
178 GeoLogVol *lvse2vup =
new GeoLogVol(
"LAr::DM::SectorEnvelopes2vup",&SectorEnvelopes,matLArServices17);
179 GeoPhysVol *sectorenvelopes2vup =
new GeoPhysVol(lvse2vup);
181 GeoLogVol *lvse2vd =
new GeoLogVol(
"LAr::DM::SectorEnvelopes2Vd",&SectorEnvelopes,matLArServices18);
182 GeoPhysVol *sectorenvelopes2vd =
new GeoPhysVol(lvse2vd);
186 GeoTrap *GeoTrap1 =
new GeoTrap(Spb1zhlen, Spb1theta, Spb1phi, Spb1yzn, Spb1xynzn, Spb1xypzn, Spb1angn, Spb1yzp, Spb1xynzp, Spb1xypzp, Spb1angp);
187 GeoBox *Box1 =
new GeoBox(SplBoxhlen, SplBoxhwdt, SplBoxhhgt);
188 const GeoShape & SpliceBox = ((*GeoTrap1).
189 subtract(*Box1 << GeoTrf::TranslateZ3D(SplBoxztr)*GeoTrf::TranslateY3D(-SplBoxytr)*GeoTrf::RotateX3D(SplBoxxrot*
Gaudi::Units::deg)));
191 GeoTransform *xtr =
new GeoTransform (GeoTrf::TranslateZ3D(Spb1ztr)*GeoTrf::TranslateY3D(-Spb1ytr)*GeoTrf::TranslateX3D(Spb1xtr)*GeoTrf::RotateX3D(Spb1xrot*
Gaudi::Units::deg));
192 sectorenvelopes2r->add(xtr);
193 GeoLogVol *lvspbr =
new GeoLogVol(
"LAr::DM::SPliceBoxr",&SpliceBox,alu);
194 GeoPhysVol *spliceboxr =
new GeoPhysVol(lvspbr);
195 sectorenvelopes2r->add(spliceboxr);
197 GeoTransform *xtl =
new GeoTransform (GeoTrf::TranslateZ3D(Spb1ztr)*GeoTrf::TranslateY3D(-Spb1ytr)*GeoTrf::TranslateX3D(Spb1xtr)*GeoTrf::RotateY3D(-180*
Gaudi::Units::deg)*GeoTrf::RotateX3D(-(Alfa/2)));
198 sectorenvelopes2l->add(xtl);
199 GeoLogVol *lvspbl =
new GeoLogVol(
"LAr::DM::SpliceBoxl",&SpliceBox,alu);
200 GeoPhysVol *spliceboxl =
new GeoPhysVol(lvspbl);
201 sectorenvelopes2l->add(spliceboxl);
204 GeoTrd *Trd1 =
new GeoTrd(Spb0xhlen1, Spb0xhlen2, Spb0yhlen1, Spb0yhlen2, Spb0zhlen);
205 GeoTrap *GeoTrap2 =
new GeoTrap(Spb2zhlen, Spb2theta, Spb2phi, Spb2yzn, Spb2xynzn, Spb2xypzn, Spb2angn, Spb2yzp, Spb2xynzp, Spb2xypzp, Spb2angp);
206 GeoTrap *GeoTrap3 =
new GeoTrap(Spb3zhlen, Spb3theta, Spb3phi, Spb3yzn, Spb3xynzn, Spb3xypzn, Spb3angn, Spb3yzp, Spb3xynzp, Spb3xypzp, Spb3angp);
208 GeoTransform *xt1 =
new GeoTransform (GeoTrf::TranslateY3D(-Spb0ytr)*GeoTrf::RotateX3D(Spb0xrot*
Gaudi::Units::deg));
209 spliceboxr->add(xt1);
210 spliceboxl->add(xt1);
211 GeoLogVol *lt1 =
new GeoLogVol(
"LAr::DM::TBox1",Trd1,air);
212 GeoPhysVol *tbox1 =
new GeoPhysVol(lt1);
213 spliceboxr->add(tbox1);
214 spliceboxl->add(tbox1);
216 GeoTransform *xt2 =
new GeoTransform (GeoTrf::TranslateZ3D(Spb2ztr)*GeoTrf::TranslateY3D(Spb2ytr));
217 spliceboxr->add(xt2);
218 spliceboxl->add(xt2);
219 GeoLogVol *lt2 =
new GeoLogVol(
"LAr::DM::TBox2",GeoTrap2,air);
220 GeoPhysVol *tbox2 =
new GeoPhysVol(lt2);
221 spliceboxr->add(tbox2);
222 spliceboxl->add(tbox2);
224 GeoTransform *xt3 =
new GeoTransform (GeoTrf::TranslateZ3D(-Spb3ztr));
225 spliceboxr->add(xt3);
226 spliceboxl->add(xt3);
227 GeoLogVol *lt3 =
new GeoLogVol(
"LAr::DM::TBox3",GeoTrap3,air);
228 GeoPhysVol *tbox3 =
new GeoPhysVol(lt3);
229 spliceboxr->add(tbox3);
230 spliceboxl->add(tbox3);
234 TRANSFUNCTION seA2r = Pow(GeoTrf::RotateZ3D(1.0),8*
f-(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(SecE2ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
235 TRANSFUNCTION seA2l = Pow(GeoTrf::RotateZ3D(1.0),8*
f+(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(SecE2ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
236 TRANSFUNCTION seC2r = Pow(GeoTrf::RotateZ3D(1.0),8*
f-(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-SecE2ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
237 TRANSFUNCTION seC2l = Pow(GeoTrf::RotateZ3D(1.0),8*
f+(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-SecE2ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
238 TRANSFUNCTION seA2Vup = Pow(GeoTrf::RotateZ3D(1.0),
f+(9*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(SecE2ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
239 TRANSFUNCTION seA2Vd = Pow(GeoTrf::RotateZ3D(1.0),
f-(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(SecE2ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
240 TRANSFUNCTION seA2H = Pow(GeoTrf::RotateZ3D(1.0),8*
f+(Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(SecE2ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
241 TRANSFUNCTION seC2Vup = Pow(GeoTrf::RotateZ3D(1.0),
f+(9*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-SecE2ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
242 TRANSFUNCTION seC2Vd = Pow(GeoTrf::RotateZ3D(1.0),
f-(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-SecE2ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
243 TRANSFUNCTION seC2H = Pow(GeoTrf::RotateZ3D(1.0),8*
f+(Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-SecE2ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
245 GeoSerialTransformer *setA2r =
new GeoSerialTransformer(sectorenvelopes2r,&seA2r, 2);
246 GeoSerialTransformer *setA2l =
new GeoSerialTransformer(sectorenvelopes2l,&seA2l, 2);
247 GeoSerialTransformer *setC2r =
new GeoSerialTransformer(sectorenvelopes2r,&seC2r, 2);
248 GeoSerialTransformer *setC2l =
new GeoSerialTransformer(sectorenvelopes2l,&seC2l, 2);
249 GeoSerialTransformer *setA2Vup =
new GeoSerialTransformer(sectorenvelopes2vup,&seA2Vup, 1);
250 GeoSerialTransformer *setA2Vd =
new GeoSerialTransformer(sectorenvelopes2vd,&seA2Vd, 1);
251 GeoSerialTransformer *setA2H =
new GeoSerialTransformer(sectorenvelopes2h,&seA2H, 2);
252 GeoSerialTransformer *setC2Vup =
new GeoSerialTransformer(sectorenvelopes2vup,&seC2Vup, 1);
253 GeoSerialTransformer *setC2Vd =
new GeoSerialTransformer(sectorenvelopes2vd,&seC2Vd, 1);
254 GeoSerialTransformer *setC2H =
new GeoSerialTransformer(sectorenvelopes2h,&seC2H, 2);
256 envelope->add(setA2r);
257 envelope->add(setA2l);
258 envelope->add(setC2r);
259 envelope->add(setC2l);
260 envelope->add(setA2Vup);
261 envelope->add(setA2Vd);
262 envelope->add(setA2H);
263 envelope->add(setC2Vup);
264 envelope->add(setC2Vd);
265 envelope->add(setC2H);
271 std::map<std::string, unsigned int>& trapMap,
273 const GeoMaterial* matLArServices8,
276 unsigned int recordIndex = trapMap[
"BridgeE"];
278 double BridgeEzhlen =
r->getDouble(
"ZHLEN");
279 double BridgeEtheta =
r->getDouble(
"THETA");
280 double BridgeEphi =
r->getDouble(
"PHI");
281 double BridgeEyzn =
r->getDouble(
"YZN");
282 double BridgeExynzn =
r->getDouble(
"XYNZN");
283 double BridgeExypzn =
r->getDouble(
"XYPZN");
284 double BridgeEangn =
r->getDouble(
"ANGN");
285 double BridgeEyzp =
r->getDouble(
"YZP");
286 double BridgeExynzp =
r->getDouble(
"XYNZP");
287 double BridgeExypzp =
r->getDouble(
"XYPZP");
288 double BridgeEangp =
r->getDouble(
"ANGP");
289 double BridgeExtr =
r->getDouble(
"XTR");
290 double BridgeEztr =
r->getDouble(
"ZTR");
292 GeoTrap *Trapair =
new GeoTrap(BridgeEzhlen, BridgeEtheta*
Gaudi::Units::deg, BridgeEphi, BridgeEyzn, BridgeExynzn, BridgeExypzn, BridgeEangn, BridgeEyzp, BridgeExynzp, BridgeExypzp, BridgeEangp);
293 GeoLogVol *lvbre =
new GeoLogVol(
"LAr::DM::BridgeEnvelopes",Trapair,matLArServices8);
294 GeoPhysVol *bridgeenvelopes =
new GeoPhysVol(lvbre);
298 GeoSerialTransformer *bretA =
new GeoSerialTransformer(bridgeenvelopes,&breA, NCrates);
299 GeoSerialTransformer *bretC =
new GeoSerialTransformer(bridgeenvelopes,&breC, NCrates);
300 envelope->add(bretA);
301 envelope->add(bretC);
307 std::map<std::string, unsigned int>& trdMap,
309 const GeoMaterial* matLArServices8,
312 unsigned int recordIndex = trdMap[
"BaseE"];
314 double BaseExhlen1 =
r->getDouble(
"XHLEN1");
315 double BaseExhlen2 =
r->getDouble(
"XHLEN2");
316 double BaseEyhlen1 =
r->getDouble(
"YHLEN1");
317 double BaseEyhlen2 =
r->getDouble(
"YHLEN2");
318 double BaseEzhlen =
r->getDouble(
"ZHLEN");
319 double BaseExtr =
r->getDouble(
"XTR");
320 double BaseEztr =
r->getDouble(
"ZTR");
322 GeoTrd *Trd1air =
new GeoTrd(BaseExhlen1, BaseExhlen2, BaseEyhlen1, BaseEyhlen2, BaseEzhlen);
323 GeoLogVol *lvbe =
new GeoLogVol(
"LAr::DM::BaseEnvelopes",Trd1air,matLArServices8);
324 GeoPhysVol *baseenvelopes =
new GeoPhysVol(lvbe);
326 TRANSFUNCTION beA = Pow(GeoTrf::RotateZ3D(1.0),
f-(Alfa/2))*GeoTrf::TranslateX3D(BaseExtr)*GeoTrf::TranslateZ3D(BaseEztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
327 TRANSFUNCTION beC = Pow(GeoTrf::RotateZ3D(1.0),
f+(Alfa/2))*GeoTrf::TranslateX3D(BaseExtr)*GeoTrf::TranslateZ3D(-BaseEztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
328 GeoSerialTransformer *betA =
new GeoSerialTransformer(baseenvelopes,&beA, NCrates);
329 GeoSerialTransformer *betC =
new GeoSerialTransformer(baseenvelopes,&beC, NCrates);
346 std::map<std::string, unsigned int> tubeMap;
347 for (
unsigned int i=0;
i<BarrelDMTubes->size();
i++)
349 const std::string&
key = (*BarrelDMTubes)[
i]->getString(
"TUBENAME");
352 std::map<std::string, unsigned int> boxMap;
353 for (
unsigned int j=0; j<BarrelDMBoxes->size(); j++)
355 const std::string&
key = (*BarrelDMBoxes)[j]->getString(
"BOXNAME");
358 std::map<std::string, unsigned int> trdMap;
359 for (
unsigned int k=0;
k<BarrelDMTrds->size();
k++)
361 const std::string&
key = (*BarrelDMTrds)[
k]->getString(
"TRDNAME");
364 std::map<std::string, unsigned int> trapMap;
365 for (
unsigned int l=0;
l<BarrelDMTraps->size();
l++)
367 const std::string&
key = (*BarrelDMTraps)[
l]->getString(
"TRAPNAME");
371 unsigned int recordIndex;
374 const GeoMaterial *alu = materialManager->
getMaterial(
"std::Aluminium");
375 const GeoMaterial* matBoardsEnvelope = materialManager->
getMaterial(
"LAr::BoardsEnvelope");
376 const GeoMaterial* matLArServices1 = materialManager->
getMaterial(
"LAr::LArServices1");
377 const GeoMaterial* matLArServices2 = materialManager->
getMaterial(
"LAr::LArServices2");
378 const GeoMaterial* matLArServices3 = materialManager->
getMaterial(
"LAr::LArServices3");
379 const GeoMaterial* matLArServices4 = materialManager->
getMaterial(
"LAr::LArServices4");
380 const GeoMaterial* matLArServices5 = materialManager->
getMaterial(
"LAr::LArServices5");
381 const GeoMaterial* matLArServices6 = materialManager->
getMaterial(
"LAr::LArServices6");
382 const GeoMaterial* matLArServices7 = materialManager->
getMaterial(
"LAr::LArServices7");
383 const GeoMaterial* matLArServices8 = materialManager->
getMaterial(
"LAr::LArServices8");
384 const GeoMaterial* matLArServices9 = materialManager->
getMaterial(
"LAr::LArServices9");
385 const GeoMaterial* matLArServices10 = materialManager->
getMaterial(
"LAr::LArServices10");
386 const GeoMaterial* matLArServices11 = materialManager->
getMaterial(
"LAr::LArServices11");
387 const GeoMaterial* matLArServices12 = materialManager->
getMaterial(
"LAr::LArServices12");
388 const GeoMaterial* matLArServices13 = materialManager->
getMaterial(
"LAr::LArServices13");
389 const GeoMaterial* matLArServices14 = materialManager->
getMaterial(
"LAr::LArServices14");
390 const GeoMaterial* matLArServices15 = materialManager->
getMaterial(
"LAr::LArServices15");
391 const GeoMaterial* matLArServices16 = materialManager->
getMaterial(
"LAr::LArServices16");
393 const double inv_Endab = 1. / (Endb - Enda);
395 GENFUNCTION
f = Alfa*
i;
399 recordIndex = tubeMap[
"Ped2"];
400 double ped2zhlen = (*BarrelDMTubes)[recordIndex]->getDouble(
"ZHLEN");
401 double ped2minr = (*BarrelDMTubes)[recordIndex]->getDouble(
"MINR");
402 double ped2maxr = (*BarrelDMTubes)[recordIndex]->getDouble(
"MAXR");
403 double ped2ytr = (*BarrelDMTubes)[recordIndex]->getDouble(
"YTR");
404 recordIndex = tubeMap[
"Ped3"];
405 double ped3zhlen = (*BarrelDMTubes)[recordIndex]->getDouble(
"ZHLEN");
406 double ped3minr = (*BarrelDMTubes)[recordIndex]->getDouble(
"MINR");
407 double ped3maxr = (*BarrelDMTubes)[recordIndex]->getDouble(
"MAXR");
408 double ped3xtr = (*BarrelDMTubes)[recordIndex]->getDouble(
"XTR");
410 recordIndex = boxMap[
"Pedest"];
411 double pedesthlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
412 double pedesthwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
413 double pedesthhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
414 double pedestxtr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"XTR");
415 double pedestztr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"ZTR");
416 recordIndex = boxMap[
"Ped1"];
417 double ped1hlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
418 double ped1hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
419 double ped1hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
420 recordIndex = boxMap[
"Crate1"];
421 double crate1hlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
422 double crate1hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
423 double crate1hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
424 double crate1xtr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"XTR");
425 double crate1ztr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"ZTR");
426 recordIndex = boxMap[
"Crate2"];
427 double crate2hlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
428 double crate2hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
429 double crate2hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
430 recordIndex = boxMap[
"Crate3"];
431 double crate3hlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
432 double crate3hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
433 double crate3hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
434 double crate3xtr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"XTR");
435 recordIndex = boxMap[
"BoardE"];
436 double BoardEhlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
437 double BoardEhwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
438 double BoardEhhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
439 double BoardExtr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"XTR");
440 double BoardEytr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"YTR");
441 double BoardEztr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"ZTR");
442 recordIndex = boxMap[
"Box"];
443 double Boxhlen = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HLEN");
444 double Boxhwdt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HWDT");
445 double Boxhhgt = (*BarrelDMBoxes)[recordIndex]->getDouble(
"HHGT");
446 double Boxxtr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"XTR");
447 double Boxytr = (*BarrelDMBoxes)[recordIndex]->getDouble(
"YTR");
448 double Boxxrot = (*BarrelDMBoxes)[recordIndex]->getDouble(
"XROT");
451 GeoBox *Pedestal =
new GeoBox(pedesthlen, pedesthwdt, pedesthhgt);
452 GeoBox *Ped1 =
new GeoBox(ped1hlen, ped1hwdt, ped1hhgt);
453 GeoTube *Ped2 =
new GeoTube(ped2minr, ped2maxr, ped2zhlen);
454 GeoTube *Ped3 =
new GeoTube(ped3minr,ped3maxr , ped3zhlen);
455 const GeoShape & CratePed=((*Pedestal).subtract(*Ped1).
456 subtract((*Ped2) <<GeoTrf::TranslateY3D(-ped2ytr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg)).
457 subtract((*Ped3) <<GeoTrf::TranslateX3D(-ped3xtr)).
458 subtract((*Ped2) <<GeoTrf::TranslateY3D(ped2ytr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg)));
460 GeoLogVol *lvped =
new GeoLogVol(
"LAr::DM::Ped",&CratePed,alu);
461 GeoPhysVol *pedestal =
new GeoPhysVol(lvped);
464 GeoBox *Crate1 =
new GeoBox(crate1hlen, crate1hwdt, crate1hhgt);
465 GeoBox *Crate2 =
new GeoBox(crate2hlen, crate2hwdt, crate2hhgt);
466 GeoBox *Crate3 =
new GeoBox(crate3hlen, crate3hwdt, crate3hhgt);
467 const GeoShape & FEBCrate=(*Crate1).subtract(*Crate2).add((*Crate3) <<GeoTrf::TranslateX3D(-crate3xtr));
469 GeoLogVol *lvcrate =
new GeoLogVol(
"LAr::DM::Crate",&FEBCrate,alu);
470 GeoPhysVol *crate =
new GeoPhysVol(lvcrate);
473 GeoBox *BoardEnvelope =
new GeoBox(BoardEhlen, BoardEhwdt, BoardEhhgt);
474 GeoLogVol *lvbenv =
new GeoLogVol(
"LAr::DM::FEBoard",BoardEnvelope,matBoardsEnvelope);
475 GeoPhysVol *boardenvelope =
new GeoPhysVol(lvbenv);
480 TRANSFUNCTION crA = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateX3D(crate1xtr)*GeoTrf::TranslateZ3D(crate1ztr);
481 TRANSFUNCTION crC = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateX3D(crate1xtr)*GeoTrf::TranslateZ3D(-crate1ztr);
482 GeoSerialTransformer *crtA =
new GeoSerialTransformer(crate,&crA, NCrates);
483 GeoSerialTransformer *crtC =
new GeoSerialTransformer(crate,&crC, NCrates);
488 TRANSFUNCTION pedA = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateX3D(pedestxtr)*GeoTrf::TranslateZ3D(pedestztr);
489 TRANSFUNCTION pedC = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateX3D(pedestxtr)*GeoTrf::TranslateZ3D(-pedestztr);
490 GeoSerialTransformer *pedtA =
new GeoSerialTransformer(pedestal,&pedA, NCrates);
491 GeoSerialTransformer *pedtC =
new GeoSerialTransformer(pedestal,&pedC, NCrates);
492 envelope->add(pedtA);
493 envelope->add(pedtC);
496 TRANSFUNCTION feb1A = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateY3D(BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(BoardEztr);
497 TRANSFUNCTION feb2A = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateY3D(-BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(BoardEztr);
498 TRANSFUNCTION feb1C = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateY3D(BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(-BoardEztr);
499 TRANSFUNCTION feb2C = Pow(GeoTrf::RotateZ3D(1.0),
f)*GeoTrf::TranslateY3D(-BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(-BoardEztr);
500 GeoSerialTransformer *febt1A =
new GeoSerialTransformer(boardenvelope,&feb1A, NCrates);
501 GeoSerialTransformer *febt1C =
new GeoSerialTransformer(boardenvelope,&feb1C, NCrates);
502 GeoSerialTransformer *febt2A =
new GeoSerialTransformer(boardenvelope,&feb2A, NCrates);
503 GeoSerialTransformer *febt2C =
new GeoSerialTransformer(boardenvelope,&feb2C, NCrates);
504 envelope->add(febt1A);
505 envelope->add(febt1C);
506 envelope->add(febt2A);
507 envelope->add(febt2C);
510 recordIndex = trdMap[
"SecP"];
511 double SecPxhlen1 = (*BarrelDMTrds)[recordIndex]->getDouble(
"XHLEN1");
512 double SecPxhlen2 = (*BarrelDMTrds)[recordIndex]->getDouble(
"XHLEN2");
513 double SecPyhlen1 = (*BarrelDMTrds)[recordIndex]->getDouble(
"YHLEN1");
514 double SecPyhlen2 = (*BarrelDMTrds)[recordIndex]->getDouble(
"YHLEN2");
515 double SecPzhlen = (*BarrelDMTrds)[recordIndex]->getDouble(
"ZHLEN");
516 double SecPxtr = (*BarrelDMTrds)[recordIndex]->getDouble(
"XTR");
517 double SecPztr = (*BarrelDMTrds)[recordIndex]->getDouble(
"ZTR");
518 recordIndex = trdMap[
"BaseP"];
519 double BasePxhlen1 = (*BarrelDMTrds)[recordIndex]->getDouble(
"XHLEN1");
520 double BasePxhlen2 = (*BarrelDMTrds)[recordIndex]->getDouble(
"XHLEN2");
521 double BasePyhlen1 = (*BarrelDMTrds)[recordIndex]->getDouble(
"YHLEN1");
522 double BasePyhlen2 = (*BarrelDMTrds)[recordIndex]->getDouble(
"YHLEN2");
523 double BasePzhlen = (*BarrelDMTrds)[recordIndex]->getDouble(
"ZHLEN");
524 double BasePxtr = (*BarrelDMTrds)[recordIndex]->getDouble(
"XTR");
525 double BasePztr = (*BarrelDMTrds)[recordIndex]->getDouble(
"ZTR");
526 recordIndex = trdMap[
"SecE1"];
527 double SecE1xhlen1 = (*BarrelDMTrds)[recordIndex]->getDouble(
"XHLEN1");
528 double SecE1xhlen2 = (*BarrelDMTrds)[recordIndex]->getDouble(
"XHLEN2");
529 double SecE1ztr = (*BarrelDMTrds)[recordIndex]->getDouble(
"ZTR");
530 recordIndex = trapMap[
"BridgeP"];
531 double BridgePzhlen = (*BarrelDMTraps)[recordIndex]->getDouble(
"ZHLEN");
532 double BridgePtheta = (*BarrelDMTraps)[recordIndex]->getDouble(
"THETA");
533 double BridgePphi = (*BarrelDMTraps)[recordIndex]->getDouble(
"PHI");
534 double BridgePyzn = (*BarrelDMTraps)[recordIndex]->getDouble(
"YZN");
535 double BridgePxynzn = (*BarrelDMTraps)[recordIndex]->getDouble(
"XYNZN");
536 double BridgePxypzn = (*BarrelDMTraps)[recordIndex]->getDouble(
"XYPZN");
537 double BridgePangn = (*BarrelDMTraps)[recordIndex]->getDouble(
"ANGN");
538 double BridgePyzp = (*BarrelDMTraps)[recordIndex]->getDouble(
"YZP");
539 double BridgePxynzp = (*BarrelDMTraps)[recordIndex]->getDouble(
"XYNZP");
540 double BridgePxypzp = (*BarrelDMTraps)[recordIndex]->getDouble(
"XYPZP");
541 double BridgePangp = (*BarrelDMTraps)[recordIndex]->getDouble(
"ANGP");
542 double BridgePxtr = (*BarrelDMTraps)[recordIndex]->getDouble(
"XTR");
543 double BridgePztr = (*BarrelDMTraps)[recordIndex]->getDouble(
"ZTR");
546 GeoBox *
Box =
new GeoBox(Boxhlen, Boxhwdt, Boxhhgt);
553 GeoTrd *Trdair1 =
new GeoTrd(SecE1xhlen1, SecE1xhlen2, DYa, DYb, (Endb-Enda)/2);
555 GeoLogVol *lvse1g1 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g1",Trdair1,matLArServices1);
556 GeoPhysVol *sectorenvelopes1g1 =
new GeoPhysVol(lvse1g1);
558 GeoLogVol *lvse1g2 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g3",Trdair1,matLArServices2);
559 GeoPhysVol *sectorenvelopes1g2 =
new GeoPhysVol(lvse1g2);
561 GeoLogVol *lvse1g3 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g3",Trdair1,matLArServices3);
562 GeoPhysVol *sectorenvelopes1g3 =
new GeoPhysVol(lvse1g3);
564 GeoLogVol *lvse1g4 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g4",Trdair1,matLArServices4);
565 GeoPhysVol *sectorenvelopes1g4 =
new GeoPhysVol(lvse1g4);
567 GeoLogVol *lvse1g5 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g5",Trdair1,matLArServices5);
568 GeoPhysVol *sectorenvelopes1g5 =
new GeoPhysVol(lvse1g5);
570 GeoLogVol *lvse1g6 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g6",Trdair1,matLArServices6);
571 GeoPhysVol *sectorenvelopes1g6 =
new GeoPhysVol(lvse1g6);
573 GeoLogVol *lvse1g7 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g7",Trdair1,matLArServices7);
574 GeoPhysVol *sectorenvelopes1g7 =
new GeoPhysVol(lvse1g7);
576 GeoLogVol *lvse1g8 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g8",Trdair1,matLArServices8);
577 GeoPhysVol *sectorenvelopes1g8 =
new GeoPhysVol(lvse1g8);
579 GeoLogVol *lvse1g9 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g9",Trdair1,matLArServices9);
580 GeoPhysVol *sectorenvelopes1g9 =
new GeoPhysVol(lvse1g9);
582 GeoLogVol *lvse1g10 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g10",Trdair1,matLArServices10);
583 GeoPhysVol *sectorenvelopes1g10 =
new GeoPhysVol(lvse1g10);
585 GeoLogVol *lvse1g11 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g11",Trdair1,matLArServices11);
586 GeoPhysVol *sectorenvelopes1g11 =
new GeoPhysVol(lvse1g11);
588 GeoLogVol *lvse1g12 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g12",Trdair1,matLArServices12);
589 GeoPhysVol *sectorenvelopes1g12 =
new GeoPhysVol(lvse1g12);
591 GeoLogVol *lvse1g13 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g13",Trdair1,matLArServices13);
592 GeoPhysVol *sectorenvelopes1g13 =
new GeoPhysVol(lvse1g13);
594 GeoLogVol *lvse1g14 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g14",Trdair1,matLArServices14);
595 GeoPhysVol *sectorenvelopes1g14 =
new GeoPhysVol(lvse1g14);
597 GeoLogVol *lvse1g15 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g15",Trdair1,matLArServices15);
598 GeoPhysVol *sectorenvelopes1g15 =
new GeoPhysVol(lvse1g15);
600 GeoLogVol *lvse1g16 =
new GeoLogVol(
"LAr::DM::SectorEnvelopes1g16",Trdair1,matLArServices16);
601 GeoPhysVol *sectorenvelopes1g16 =
new GeoPhysVol(lvse1g16);
604 std::vector<GeoPhysVol*> se1List;
605 se1List.push_back(sectorenvelopes1g1);
606 se1List.push_back(sectorenvelopes1g2);
607 se1List.push_back(sectorenvelopes1g3);
608 se1List.push_back(sectorenvelopes1g4);
609 se1List.push_back(sectorenvelopes1g5);
610 se1List.push_back(sectorenvelopes1g6);
611 se1List.push_back(sectorenvelopes1g7);
612 se1List.push_back(sectorenvelopes1g8);
613 se1List.push_back(sectorenvelopes1g9);
614 se1List.push_back(sectorenvelopes1g10);
615 se1List.push_back(sectorenvelopes1g11);
616 se1List.push_back(sectorenvelopes1g12);
617 se1List.push_back(sectorenvelopes1g13);
618 se1List.push_back(sectorenvelopes1g14);
619 se1List.push_back(sectorenvelopes1g15);
620 se1List.push_back(sectorenvelopes1g16);
625 for (
unsigned int i=0;
i<BarrelDMRing->size();
i++) {
626 double etaMin=(*BarrelDMRing)[
i]->getDouble(
"ETAMIN");
627 double etaMax=(*BarrelDMRing)[
i]->getDouble(
"ETAMAX");
628 double thicknessExtra=(*BarrelDMRing)[
i]->getDouble(
"THICKNESS");
629 std::string ringName =
"LAr::DM::SectorEnvelopes1::"+(*BarrelDMRing)[
i]->getString(
"RINGNAME");
631 double radiusMin=SecE1ztr/sinh(
etaMax);
632 double radiusMax=SecE1ztr/sinh(
etaMin);
633 double dy1 = DYa + (DYb-DYa)*(radiusMin-Enda)*inv_Endab;
634 double dy2 = DYa + (DYb-DYa)*(radiusMax-Enda)*inv_Endab;
635 double zpos=0.5*(radiusMax+radiusMin - (Endb+Enda));
636 const GeoMaterial *matExtraTdr = materialManager->
getMaterial((*BarrelDMRing)[
i]->getString(
"MATERIAL"));
638 GeoTrd *extraMatTdr =
new GeoTrd(thicknessExtra/2., thicknessExtra/2., dy1, dy2, (radiusMax-radiusMin)/2);
639 GeoLogVol *extraMatLog =
new GeoLogVol(ringName,extraMatTdr,matExtraTdr);
640 GeoPhysVol *extraMatPhys =
new GeoPhysVol(extraMatLog);
641 for (
unsigned int isect=0;isect<se1List.size();isect++) {
642 se1List[isect]->add(
new GeoTransform(GeoTrf::TranslateZ3D(zpos)));
643 se1List[isect]->add(extraMatPhys);
649 for (
unsigned int i=0;
i<BarrelDMPhiBox->size();
i++) {
650 double eta=(*BarrelDMPhiBox)[
i]->getDouble(
"ETA");
651 double phi0=(*BarrelDMPhiBox)[
i]->getDouble(
"PHI0");
652 double deltaR=(*BarrelDMPhiBox)[
i]->getDouble(
"DELTAR");
653 double deltaRphi=(*BarrelDMPhiBox)[
i]->getDouble(
"DELTARPHI");
654 double thickness=(*BarrelDMPhiBox)[
i]->getDouble(
"THICKNESS");
655 int nphi=(*BarrelDMPhiBox)[
i]->getInt(
"NPHI");
656 int noHorizontal = (*BarrelDMPhiBox)[
i]->getInt(
"NOHORIZ");
658 const GeoMaterial* matExtraPPF1 = materialManager->
getMaterial((*BarrelDMPhiBox)[
i]->getString(
"MATERIAL"));
659 std::string boxName =
"LAr::DM::SectorEnvelopes1::"+(*BarrelDMPhiBox)[
i]->getString(
"BOXNAME");
661 GeoBox *ppf1Box =
new GeoBox(thickness/2.,deltaRphi/2.,
deltaR/2.);
662 GeoLogVol *ppf1Log =
new GeoLogVol(boxName,ppf1Box,matExtraPPF1);
663 GeoPhysVol *ppf1Phys =
new GeoPhysVol(ppf1Log);
665 int nPerEnv1 = nphi/NCrates;
667 double radius=SecE1ztr/sinh(eta);
668 for (
int iphi=0;iphi<nPerEnv1;iphi++) {
671 double zpos=
radius*
cos(
phi0+((
float)(iphi))*dphi) - (Endb+Enda)/2.;
672 for (
unsigned int isect=0;isect<se1List.size();isect++) {
674 if (noHorizontal>0 && ((isect==7 && iphi==1) || (isect==8 && iphi==0) || (isect==15 && iphi==1) || (isect==0 && iphi==0) ) )
continue;
675 se1List[isect]->add(
new GeoTransform(GeoTrf::Translate3D(xpos,ypos,zpos)));
676 se1List[isect]->add(ppf1Phys);
682 GeoTrd *Trd1alu =
new GeoTrd(BasePxhlen1, BasePxhlen2, BasePyhlen1, BasePyhlen2, BasePzhlen);
683 GeoLogVol *lvbp =
new GeoLogVol(
"LAr::DM::BasePlates",Trd1alu,alu);
684 GeoPhysVol *baseplates =
new GeoPhysVol(lvbp);
687 GeoTrap *Trapalu =
new GeoTrap(BridgePzhlen, BridgePtheta*
Gaudi::Units::deg, BridgePphi, BridgePyzn, BridgePxynzn, BridgePxypzn, BridgePangn, BridgePyzp, BridgePxynzp, BridgePxypzp, BridgePangp);
688 GeoLogVol *lvbrp =
new GeoLogVol(
"LAr::DM::BridgePlates",Trapalu,alu);
689 GeoPhysVol *bridgeplates =
new GeoPhysVol(lvbrp);
693 GeoTrd *Trd2alu =
new GeoTrd(SecPxhlen1, SecPxhlen2, SecPyhlen1, SecPyhlen2, SecPzhlen );
694 const GeoShape & SectorPlates= ((*Trd2alu).
697 GeoLogVol *lvsp =
new GeoLogVol(
"LAr::DM::SectorPlates",&SectorPlates,alu);
698 GeoPhysVol *sectorplates =
new GeoPhysVol(lvsp);
704 TRANSFUNCTION spA = Pow(GeoTrf::RotateZ3D(1.0),
f-(Alfa/2))*GeoTrf::TranslateX3D(SecPxtr)*GeoTrf::TranslateZ3D(SecPztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
705 TRANSFUNCTION spC = Pow(GeoTrf::RotateZ3D(1.0),
f+(Alfa/2))*GeoTrf::TranslateX3D(SecPxtr)*GeoTrf::TranslateZ3D(-SecPztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
706 GeoSerialTransformer *sptA =
new GeoSerialTransformer(sectorplates,&spA, NCrates);
707 GeoSerialTransformer *sptC =
new GeoSerialTransformer(sectorplates,&spC, NCrates);
715 TRANSFUNCTION brpC2 = Pow(GeoTrf::RotateZ3D(1.0),
f+(13*Alfa/2))*GeoTrf::TranslateX3D(BridgePxtr)*GeoTrf::TranslateZ3D(-BridgePztr)*GeoTrf::RotateZ3D(-90*
Gaudi::Units::deg)*GeoTrf::RotateY3D(-90*
Gaudi::Units::deg)*GeoTrf::RotateX3D(-90*
Gaudi::Units::deg); GeoSerialTransformer *brptA1 =
new GeoSerialTransformer(bridgeplates,&brpA1, 5);
716 GeoSerialTransformer *brptA2 =
new GeoSerialTransformer(bridgeplates,&brpA2, 5);
717 GeoSerialTransformer *brptC1 =
new GeoSerialTransformer(bridgeplates,&brpC1, 5);
718 GeoSerialTransformer *brptC2 =
new GeoSerialTransformer(bridgeplates,&brpC2, 5);
719 envelope->add(brptA1);
720 envelope->add(brptA2);
721 envelope->add(brptC1);
722 envelope->add(brptC2);
725 TRANSFUNCTION bpA = Pow(GeoTrf::RotateZ3D(1.0),
f-(Alfa/2))*GeoTrf::TranslateX3D(BasePxtr)*GeoTrf::TranslateZ3D(BasePztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
726 TRANSFUNCTION bpC = Pow(GeoTrf::RotateZ3D(1.0),
f+(Alfa/2))*GeoTrf::TranslateX3D(BasePxtr)*GeoTrf::TranslateZ3D(-BasePztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
727 GeoSerialTransformer *bptA =
new GeoSerialTransformer(baseplates,&bpA, NCrates);
728 GeoSerialTransformer *bptC =
new GeoSerialTransformer(baseplates,&bpC, NCrates);
734 TRANSFUNCTION seA1G5 = Pow(GeoTrf::RotateZ3D(1.0),
f+(9*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
735 TRANSFUNCTION seC1G5 = Pow(GeoTrf::RotateZ3D(1.0),
f+(9*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
736 TRANSFUNCTION seA1G6 = Pow(GeoTrf::RotateZ3D(1.0),
f+(11*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
737 TRANSFUNCTION seC1G6 = Pow(GeoTrf::RotateZ3D(1.0),
f+(11*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
738 TRANSFUNCTION seA1G7 = Pow(GeoTrf::RotateZ3D(1.0),
f+(13*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
739 TRANSFUNCTION seC1G7 = Pow(GeoTrf::RotateZ3D(1.0),
f+(13*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
740 TRANSFUNCTION seA1G8 = Pow(GeoTrf::RotateZ3D(1.0),
f+(15*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
741 TRANSFUNCTION seC1G8 = Pow(GeoTrf::RotateZ3D(1.0),
f+(15*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
742 TRANSFUNCTION seA1G9 = Pow(GeoTrf::RotateZ3D(1.0),
f+(17*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
743 TRANSFUNCTION seC1G9 = Pow(GeoTrf::RotateZ3D(1.0),
f+(17*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
744 TRANSFUNCTION seA1G10 = Pow(GeoTrf::RotateZ3D(1.0),
f+(19*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
745 TRANSFUNCTION seC1G10 = Pow(GeoTrf::RotateZ3D(1.0),
f+(19*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
746 TRANSFUNCTION seA1G11 = Pow(GeoTrf::RotateZ3D(1.0),
f+(21*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
747 TRANSFUNCTION seC1G11 = Pow(GeoTrf::RotateZ3D(1.0),
f+(21*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
748 TRANSFUNCTION seA1G12 = Pow(GeoTrf::RotateZ3D(1.0),
f+(23*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
749 TRANSFUNCTION seC1G12 = Pow(GeoTrf::RotateZ3D(1.0),
f+(23*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
751 TRANSFUNCTION seA1G4 = Pow(GeoTrf::RotateZ3D(1.0),
f+(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
752 TRANSFUNCTION seC1G4 = Pow(GeoTrf::RotateZ3D(1.0),
f+(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
753 TRANSFUNCTION seA1G3 = Pow(GeoTrf::RotateZ3D(1.0),
f+(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
754 TRANSFUNCTION seC1G3 = Pow(GeoTrf::RotateZ3D(1.0),
f+(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
755 TRANSFUNCTION seA1G2 = Pow(GeoTrf::RotateZ3D(1.0),
f+(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
756 TRANSFUNCTION seC1G2 = Pow(GeoTrf::RotateZ3D(1.0),
f+(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
757 TRANSFUNCTION seA1G1 = Pow(GeoTrf::RotateZ3D(1.0),
f+(1*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
758 TRANSFUNCTION seC1G1 = Pow(GeoTrf::RotateZ3D(1.0),
f+(1*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
759 TRANSFUNCTION seA1G16 = Pow(GeoTrf::RotateZ3D(1.0),
f-(1*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
760 TRANSFUNCTION seC1G16 = Pow(GeoTrf::RotateZ3D(1.0),
f-(1*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
761 TRANSFUNCTION seA1G15 = Pow(GeoTrf::RotateZ3D(1.0),
f-(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
762 TRANSFUNCTION seC1G15 = Pow(GeoTrf::RotateZ3D(1.0),
f-(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
763 TRANSFUNCTION seA1G14 = Pow(GeoTrf::RotateZ3D(1.0),
f-(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
764 TRANSFUNCTION seC1G14 = Pow(GeoTrf::RotateZ3D(1.0),
f-(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
765 TRANSFUNCTION seA1G13 = Pow(GeoTrf::RotateZ3D(1.0),
f-(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
766 TRANSFUNCTION seC1G13 = Pow(GeoTrf::RotateZ3D(1.0),
f-(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*
Gaudi::Units::deg);
768 GeoSerialTransformer *setA1G5 =
new GeoSerialTransformer(sectorenvelopes1g5,&seA1G5, 1);
769 GeoSerialTransformer *setC1G5 =
new GeoSerialTransformer(sectorenvelopes1g5,&seC1G5, 1);
770 GeoSerialTransformer *setA1G6 =
new GeoSerialTransformer(sectorenvelopes1g6,&seA1G6, 1);
771 GeoSerialTransformer *setC1G6 =
new GeoSerialTransformer(sectorenvelopes1g6,&seC1G6, 1);
772 GeoSerialTransformer *setA1G7 =
new GeoSerialTransformer(sectorenvelopes1g7,&seA1G7, 1);
773 GeoSerialTransformer *setC1G7 =
new GeoSerialTransformer(sectorenvelopes1g7,&seC1G7, 1);
774 GeoSerialTransformer *setA1G8 =
new GeoSerialTransformer(sectorenvelopes1g8,&seA1G8, 1);
775 GeoSerialTransformer *setC1G8 =
new GeoSerialTransformer(sectorenvelopes1g8,&seC1G8, 1);
776 GeoSerialTransformer *setA1G9 =
new GeoSerialTransformer(sectorenvelopes1g9,&seA1G9, 1);
777 GeoSerialTransformer *setC1G9 =
new GeoSerialTransformer(sectorenvelopes1g9,&seC1G9, 1);
778 GeoSerialTransformer *setA1G10 =
new GeoSerialTransformer(sectorenvelopes1g10,&seA1G10, 1);
779 GeoSerialTransformer *setC1G10 =
new GeoSerialTransformer(sectorenvelopes1g10,&seC1G10, 1);
780 GeoSerialTransformer *setA1G11 =
new GeoSerialTransformer(sectorenvelopes1g11,&seA1G11, 1);
781 GeoSerialTransformer *setC1G11 =
new GeoSerialTransformer(sectorenvelopes1g11,&seC1G11, 1);
782 GeoSerialTransformer *setA1G12 =
new GeoSerialTransformer(sectorenvelopes1g12,&seA1G12, 1);
783 GeoSerialTransformer *setC1G12 =
new GeoSerialTransformer(sectorenvelopes1g12,&seC1G12, 1);
785 GeoSerialTransformer *setA1G4 =
new GeoSerialTransformer(sectorenvelopes1g4,&seA1G4, 1);
786 GeoSerialTransformer *setC1G4 =
new GeoSerialTransformer(sectorenvelopes1g4,&seC1G4, 1);
787 GeoSerialTransformer *setA1G3 =
new GeoSerialTransformer(sectorenvelopes1g3,&seA1G3, 1);
788 GeoSerialTransformer *setC1G3 =
new GeoSerialTransformer(sectorenvelopes1g3,&seC1G3, 1);
789 GeoSerialTransformer *setA1G2 =
new GeoSerialTransformer(sectorenvelopes1g2,&seA1G2, 1);
790 GeoSerialTransformer *setC1G2 =
new GeoSerialTransformer(sectorenvelopes1g2,&seC1G2, 1);
791 GeoSerialTransformer *setA1G1 =
new GeoSerialTransformer(sectorenvelopes1g1,&seA1G1, 1);
792 GeoSerialTransformer *setC1G1 =
new GeoSerialTransformer(sectorenvelopes1g1,&seC1G1, 1);
793 GeoSerialTransformer *setA1G16 =
new GeoSerialTransformer(sectorenvelopes1g16,&seA1G16, 1);
794 GeoSerialTransformer *setC1G16 =
new GeoSerialTransformer(sectorenvelopes1g16,&seC1G16, 1);
795 GeoSerialTransformer *setA1G15 =
new GeoSerialTransformer(sectorenvelopes1g15,&seA1G15, 1);
796 GeoSerialTransformer *setC1G15 =
new GeoSerialTransformer(sectorenvelopes1g15,&seC1G15, 1);
797 GeoSerialTransformer *setA1G14 =
new GeoSerialTransformer(sectorenvelopes1g14,&seA1G14, 1);
798 GeoSerialTransformer *setC1G14 =
new GeoSerialTransformer(sectorenvelopes1g14,&seC1G14, 1);
799 GeoSerialTransformer *setA1G13 =
new GeoSerialTransformer(sectorenvelopes1g13,&seA1G13, 1);
800 GeoSerialTransformer *setC1G13 =
new GeoSerialTransformer(sectorenvelopes1g13,&seC1G13, 1);
802 envelope->add(setA1G5);
803 envelope->add(setC1G5);
804 envelope->add(setA1G6);
805 envelope->add(setC1G6);
806 envelope->add(setA1G7);
807 envelope->add(setC1G7);
808 envelope->add(setA1G8);
809 envelope->add(setC1G8);
810 envelope->add(setA1G9);
811 envelope->add(setC1G9);
812 envelope->add(setA1G10);
813 envelope->add(setC1G10);
814 envelope->add(setA1G11);
815 envelope->add(setC1G11);
816 envelope->add(setA1G12);
817 envelope->add(setC1G12);
819 envelope->add(setA1G4);
820 envelope->add(setC1G4);
821 envelope->add(setA1G3);
822 envelope->add(setC1G3);
823 envelope->add(setA1G2);
824 envelope->add(setC1G2);
825 envelope->add(setA1G1);
826 envelope->add(setC1G1);
827 envelope->add(setA1G16);
828 envelope->add(setC1G16);
829 envelope->add(setA1G15);
830 envelope->add(setC1G15);
831 envelope->add(setA1G14);
832 envelope->add(setC1G14);
833 envelope->add(setA1G13);
834 envelope->add(setC1G13);
837 trdMap, *BarrelDMTrds,
838 trapMap, *BarrelDMTraps,
839 boxMap, *BarrelDMBoxes,
853 , m_rdbAccess(rdbAccess)
854 , m_geoModel(geoModel)
855 , m_materialManager(materialManager)
856 , m_activateFT(activateFT)
868 std::string
name =
"LAr::Barrel::SignalFT::";
877 GeoShape* wflange =
new GeoTube(0., wflange_R, wflange_height/2);
878 GeoLogVol* wflangeLV =
new GeoLogVol(
name +
"WarmFlange", wflange, wflange_mat);
879 GeoPhysVol* wflangePV =
new GeoPhysVol(wflangeLV);
886 const double bellow_Rinner = bellow_Router - bellow_wall;
887 GeoShape* bellow =
new GeoTube(bellow_Rinner, bellow_Router, bellow_height/2);
888 GeoLogVol* bellowLV =
new GeoLogVol(
name +
"Bellow", bellow, bellow_mat);
889 GeoPhysVol* bellowPV =
new GeoPhysVol(bellowLV);
893 GeoShape* vcables =
new GeoTube(0., bellow_Rinner, bellow_height/2);
894 GeoLogVol* vcablesLV =
new GeoLogVol(
name +
"VacuumCables", vcables, vcables_mat);
895 GeoPhysVol* vcablesPV =
new GeoPhysVol(vcablesLV);
900 GeoShape* cflange =
new GeoTube(0., cflange_Router, cflange_height/2);
901 GeoLogVol* cflangeLV =
new GeoLogVol(
name +
"ColdFlange", cflange, cflange_mat);
902 GeoPhysVol* cflangePV =
new GeoPhysVol(cflangeLV);
904 const double coldbox1_Router = cflange_Router;
911 const double barrel_dist_from_outer_warm_wall_to_inner_cold_wall =
913 const double coldbox3_height =
914 barrel_dist_from_outer_warm_wall_to_inner_cold_wall
915 - bellow_height - coldbox1_height - coldbox2_height;
917 const GeoMaterial* coldbox_mat = iron;
918 GeoShape* coldbox1 =
new GeoTube(coldbox1_Router - coldbox1_wall, coldbox1_Router, coldbox1_height/2);
919 GeoShape* coldbox11 =
new GeoTube(0., coldbox1_Router, coldbox1_height/2);
920 GeoLogVol* coldbox1LV =
new GeoLogVol(
name +
"ColdBox1", coldbox1, coldbox_mat);
921 GeoPhysVol* coldbox1PV =
new GeoPhysVol(coldbox1LV);
922 GeoShape* coldbox21 =
new GeoTube(0., coldbox1_Router, coldbox2_height/2);
923 GeoShape* coldbox22 =
new GeoTube(0., hole_r, coldbox2_height);
924 const GeoShape& coldbox2 = coldbox21->subtract((*coldbox22) << GeoTrf::TranslateY3D(hole_shift));
925 GeoLogVol* coldbox2LV =
new GeoLogVol(
name +
"ColdBox2", &coldbox2, coldbox_mat);
926 GeoPhysVol* coldbox2PV =
new GeoPhysVol(coldbox2LV);
927 GeoShape* coldbox3 =
new GeoTube(hole_r, coldbox3_Router, coldbox3_height/2);
928 GeoShape* coldbox31 =
new GeoTube(0., coldbox3_Router, coldbox3_height/2);
929 GeoLogVol* coldbox3LV =
new GeoLogVol(
name +
"ColdBox3", coldbox3, coldbox_mat);
930 GeoPhysVol* coldbox3PV =
new GeoPhysVol(coldbox3LV);
932 GeoTrf::TranslateZ3D bellow_pos(-wflange_height/2 - bellow_height/2);
933 GeoTrf::TranslateZ3D cflange_pos(-wflange_height/2 - bellow_height - cflange_height/2);
934 GeoTrf::TranslateZ3D coldbox1_pos(-wflange_height/2 - bellow_height - cflange_height - coldbox1_height/2);
935 GeoTrf::TranslateZ3D coldbox2_pos(-wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height/2);
936 GeoTrf::Translate3D coldbox2hole_pos(
938 -wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height/2
940 GeoTrf::Translate3D coldbox3_pos(
942 -wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height - coldbox3_height/2
945 const GeoShape& FTenvelope = wflange->add(
946 (*bellow) << bellow_pos
948 (*cflange) << cflange_pos
950 (*coldbox11) << coldbox1_pos
952 (*coldbox21) << coldbox2_pos
954 (*coldbox31) << coldbox3_pos
957 GeoLogVol* FTLV =
new GeoLogVol(
name +
"Envelope",
961 GeoPhysVol* FTPV =
new GeoPhysVol(FTLV);
963 FTPV->add(wflangePV);
964 GeoTransform *bellow_trf =
new GeoTransform(bellow_pos);
965 FTPV->add(bellow_trf);
967 FTPV->add(bellow_trf);
968 FTPV->add(vcablesPV);
969 GeoTransform *cflange_trf =
new GeoTransform(cflange_pos);
970 FTPV->add(cflange_trf);
971 FTPV->add(cflangePV);
972 GeoTransform *coldbox1_trf =
new GeoTransform(coldbox1_pos);
973 FTPV->add(coldbox1_trf);
974 FTPV->add(coldbox1PV);
975 GeoTransform *coldbox2_trf =
new GeoTransform(coldbox2_pos);
976 FTPV->add(coldbox2_trf);
977 FTPV->add(coldbox2PV);
978 GeoTransform *coldbox3_trf =
new GeoTransform(coldbox3_pos);
979 FTPV->add(coldbox3_trf);
980 FTPV->add(coldbox3PV);
983 GeoShape* lar1 =
new GeoTube(0., coldbox1_Router - coldbox1_wall, coldbox1_height/2);
984 GeoShape* lar2 =
new GeoTube(0., hole_r, coldbox1_height);
985 const GeoShape& lar = lar1->subtract((*lar2) << GeoTrf::TranslateY3D(hole_shift));
986 GeoLogVol* larLV =
new GeoLogVol(
name +
"LAr", &lar, lar_mat);
987 GeoPhysVol* larPV =
new GeoPhysVol(larLV);
988 FTPV->add(coldbox1_trf);
993 const double pth = (coldbox1_height + coldbox2_height + coldbox3_height) / 2;
994 GeoTransform *pigtail_trf =
new GeoTransform(
995 GeoTrf::Translate3D(0, hole_shift,
996 -wflange_height/2 - bellow_height - cflange_height - pth
998 GeoShape* pigtail =
new GeoTube(0., hole_r, pth);
999 GeoLogVol* pigtailLV =
new GeoLogVol(
name +
"Pigtail", pigtail, pigtail_mat);
1000 GeoPhysVol* pigtailPV =
new GeoPhysVol(pigtailLV);
1001 FTPV->add(pigtail_trf);
1002 FTPV->add(pigtailPV);
1008 GeoShape* ocable =
new GeoTube(0., ocable_R, ocable_len / 2);
1009 GeoLogVol* ocableLV =
new GeoLogVol(
"LAr::Barrel::FTCables", ocable, ocable_mat);
1010 GeoPhysVol* ocablePV =
new GeoPhysVol(ocableLV);
1015 const double r2 =
r0 + wflange_height/2 + ocable_len/2;
1017 const int NCrates = 16;
1020 auto put1 = [&envelope](GeoPhysVol *
object,
double r,
double phi,
double z)
1022 envelope->add(
new GeoTransform(
1030 envelope->add(
object);
1033 auto put = [&put1, &FTPV, &ocablePV,
r0, r2](
double phi,
double z)
1036 put1(ocablePV, r2,
phi,
z);
1039 for(
int i = 0;
i < 16; ++
i){
1041 put(
phi - dphi, z_pos);
1042 put(
phi + dphi, z_pos);
1043 put(
phi - dphi, -z_pos);
1044 put(
phi + dphi, -z_pos);