47{
48
50
51
52
53
54 double layerZshift =
m_gmt_mgr->PixelLayerGlobalShift();
55 int nSectors =
m_gmt_mgr->NPixelSectors();
56 double phiOfModuleZero =
m_gmt_mgr->PhiOfModuleZero();
57 double layerRadius =
m_gmt_mgr->PixelLayerRadius();
58
59
60 if(nSectors==0) return nullptr;
61 double angle=360./(
double)nSectors*Gaudi::Units::deg;
62
63
64 double innerRadius = 33.;
65 double outerRadius = 42.499;
66 double zMin = 834.607;
67 double zMax = 3290.795;
68
69 double zLength = zMax-zMin;
70 double halfLength = zLength*.5;
71 double zMiddle = (zMin+zMax)*.5;
72
73
74 std::ostringstream lnameA;
75 lnameA<<"Brl0A_FwdSvc";
76 std::ostringstream lnameC;
77 lnameC<<"Brl0C_FwdSvc";
78
79
80 const GeoTube* supportShapeA = new GeoTube(innerRadius,outerRadius,halfLength);
81 const GeoTube* supportShapeC = new GeoTube(innerRadius,outerRadius,halfLength);
82 const GeoMaterial* ether =
m_mat_mgr->getMaterial(
"special::Ether");
83
84 GeoLogVol* supportLogVol_A = new GeoLogVol(lnameA.str(),supportShapeA,ether);
85 GeoLogVol* supportLogVol_C = new GeoLogVol(lnameC.str(),supportShapeC,ether);
86
87
89
90
91
92 double devTotalLength = 2460.188;
93
94
95 double rminCable = 0.;
96 double rmaxCable = 8.*.5;
97 double surfCable = rmaxCable*rmaxCable*
pi;
98
99
100 double rminCooling = 0.;
101 double rmaxCooling = 1.75*.5;
102 double surfCooling = rmaxCooling*rmaxCooling*
pi;
103
104
105
106 double zpos = 0.;
107
108
109 double breakAngle = 11.*Gaudi::Units::deg;
110
111 double cooling_radius = 35.1;
112 double cooling_angle = -2.154*Gaudi::Units::deg;
113
115 {
116 cooling_radius = 34.7 + layerRadius-33.25;
117 cooling_angle = -.1*Gaudi::Units::deg;
118 }
119
120 double cable_radius = 36.501;
121
122
123
124 int nbSteps = 3;
125 double etaSteps[3] = {3.8, 4.3, 4.8 };
126
127
128
129 std::vector<double> zSteps;
130 bool bFirstLin = true;
131 for(
int i=0;
i<nbSteps;
i++){
134 double z = fabs(cable_radius/tmp2);
135
136 if(i==0) {
138 zSteps.push_back(zMin+0.001);
140 }
141 else {
142
143 zSteps.push_back(zMin+0.001);
144 zSteps.push_back(zMin+10.);
145 }
146 }
147 else
149
150
151 }
152 zSteps.push_back(zMax-0.001);
153 nbSteps+=1;
154 if(bFirstLin)nbSteps++;
155
156
157 const GeoShape * gblShapeCableA = nullptr;
158 const GeoShape * gblShapeCoolingA = nullptr;
159 const GeoShape * gblShapeCableC = nullptr;
160 const GeoShape * gblShapeCoolingC = nullptr;
161
162
163
164
165
166 double deltaMiddle_all = 18.;
167
168
169
170
171 zpos = zSteps[0];
172 int angleSign = 1;
173 for(int iStep=0; iStep<nbSteps-1; iStep++)
174 {
175 double zInit = zSteps[iStep];
176 double zFinal = zSteps[iStep+1];
177 double zMid = (zInit+zFinal)*.5;
178 double zHalfLength = zMid-zInit;
179 double zLength = zFinal-zInit;
180
181
182
183
184
185
186
187
188 double deltaPhiLoc = fabs(
atan(deltaMiddle_all/zLength));
189 double cableHalfLength = (zLength /
cos(deltaPhiLoc))*.5;
190 double deltaMiddleLoc = deltaMiddle_all*.5;
191
192
193
194 if((iStep==0&&bFirstLin)||iStep==nbSteps-2) {
195
196 zpos += zHalfLength;
197
198
199 const GeoTube* cableShape = new GeoTube(rminCable, rmaxCable, zHalfLength);
201 GeoTrf::Transform3D trfA1 = GeoTrf::RotateZ3D(
angle)*GeoTrf::TranslateZ3D(zpos-zMiddle);
202 gblShapeCableA =
addShape(gblShapeCableA, cableShape, trfA1 );
203 GeoTrf::Transform3D trfC1 = GeoTrf::RotateZ3D(
angle)*GeoTrf::TranslateZ3D(zMax-(zpos-zMin)-zMiddle);
204 gblShapeCableC =
addShape(gblShapeCableC, cableShape, trfC1 );
205
206
207 const GeoTube* coolingShape = new GeoTube(rminCooling, rmaxCooling, zHalfLength);
208 gblShapeCoolingA =
addShape(gblShapeCoolingA, coolingShape, trfA1 );
209 gblShapeCoolingC =
addShape(gblShapeCoolingC, coolingShape, trfC1 );
210
211 zpos += zHalfLength;
212 }
213 else {
214
215
216 zpos += zHalfLength;
217
218
219 const GeoTube* cableShape = new GeoTube(rminCable, rmaxCable, cableHalfLength);
221 GeoTrf::Transform3D trfA1 = GeoTrf::RotateZ3D(
angle)*GeoTrf::TranslateY3D(deltaMiddleLoc)* GeoTrf::TranslateZ3D(zpos-zMiddle)*GeoTrf::RotateX3D(-angleSign*deltaPhiLoc);
222 gblShapeCableA =
addShape(gblShapeCableA, cableShape, trfA1 );
223 GeoTrf::Transform3D trfC1 = GeoTrf::RotateZ3D(
angle)*GeoTrf::TranslateY3D(deltaMiddleLoc)* GeoTrf::TranslateZ3D(zMax-(zpos-zMin)-zMiddle)*GeoTrf::RotateX3D(angleSign*deltaPhiLoc);
224 gblShapeCableC =
addShape(gblShapeCableC, cableShape, trfC1 );
225
226
227 const GeoTube* coolingShape = new GeoTube(rminCooling, rmaxCooling, cableHalfLength);
228 gblShapeCoolingA =
addShape(gblShapeCoolingA, coolingShape, trfA1 );
229 gblShapeCoolingC =
addShape(gblShapeCoolingC, coolingShape, trfC1 );
230
231 zpos += zHalfLength;
232 angleSign*=-1;
233 }
234
235
236 }
237
238
239
240
241 const GeoMaterial* cableMat =
m_mat_mgr->getMaterialForVolume(
"pix::IBL_Fwd02_Cable_Wvy_M1",surfCable*devTotalLength);
242
243
244
245 GeoLogVol * cable_logA = new GeoLogVol("IBL_Fwd02_Cable_A",gblShapeCableA,cableMat);
246 GeoLogVol * cable_logC = new GeoLogVol("IBL_Fwd02_Cable_C",gblShapeCableC,cableMat);
247
248 const GeoMaterial* coolingMat =
m_mat_mgr->getMaterialForVolume(
"pix::IBL_Fwd02_Cooling_Wvy_M1",surfCooling*devTotalLength);
249
250 GeoLogVol * cooling_logA = new GeoLogVol("IBL_Fwd02_Cooling_A",gblShapeCoolingA,coolingMat);
251 GeoLogVol * cooling_logC = new GeoLogVol("IBL_Fwd02_Cooling_C",gblShapeCoolingC,coolingMat);
252
253
256
257
258 GeoPhysVol* cablePhysVolA = new GeoPhysVol(cable_logA);
259 GeoPhysVol* cablePhysVolC = new GeoPhysVol(cable_logC);
260 GeoPhysVol* coolingPhysVolA = new GeoPhysVol(cooling_logA);
261 GeoPhysVol* coolingPhysVolC = new GeoPhysVol(cooling_logC);
262
263
264
265
266
267
268 for(int ii=0; ii<nSectors; ii++)
269 {
271
272
273 double phiOfCooling = phiOfModuleZero+ cooling_angle + ii*
angle;
274
275 std::ostringstream tmp1;
276 tmp1 << "IBL_Fwd02_Cooling_AC" << ii;
277 GeoNameTag *
tag1 =
new GeoNameTag(tmp1.str());
278 GeoTransform* xformA1 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCooling)*GeoTrf::TranslateX3D(cooling_radius));
282
283 GeoTransform* xformC1 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCooling)*GeoTrf::TranslateX3D(cooling_radius));
287
288 double phiOfCable = phiOfCooling +
angle*.5;
289
290 std::ostringstream
tmp2;
291 tmp2 <<
"IBL_Fwd02_Cable_AC" << ii;
292 GeoNameTag *
tag2 =
new GeoNameTag(
tmp2.str());
293 GeoTransform* xformA2 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCable)*GeoTrf::TranslateX3D(cable_radius)*GeoTrf::RotateZ3D(breakAngle));
297
298 GeoTransform* xformC2 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCable)*GeoTrf::TranslateX3D(cable_radius)*GeoTrf::RotateZ3D(breakAngle));
302 }
303
304
305 double middleA = zMiddle+layerZshift;
306 double middleC = -zMiddle+layerZshift;
307
308 GeoTrf::Transform3D supportTrfA = GeoTrf::TranslateZ3D(middleA);
310
311 GeoTrf::Transform3D supportTrfC = GeoTrf::TranslateZ3D(middleC);
313
314 return nullptr;
315}
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
const GeoShape * addShape(const GeoShape *lastShape, const GeoShape *nextShape, const GeoTrf::Transform3D &trans)
PixelGeometryManager * m_gmt_mgr
InDetMaterialManager * m_mat_mgr