]>
Commit | Line | Data |
---|---|---|
f7336fa3 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
afc51ac2 | 16 | /* $Id$ */ |
f7336fa3 | 17 | |
18 | /////////////////////////////////////////////////////////////////////////////// | |
19 | // // | |
20 | // TRD geometry class // | |
21 | // // | |
22 | /////////////////////////////////////////////////////////////////////////////// | |
23 | ||
b4a9cd27 | 24 | #include <TGeoManager.h> |
25 | #include <TGeoPhysicalNode.h> | |
2d0eca96 | 26 | #include <TVirtualMC.h> |
e74d6d1b | 27 | #include <TMath.h> |
b4a9cd27 | 28 | |
0d83b3a5 | 29 | #include "AliLog.h" |
90dbf5fb | 30 | #include "AliAlignObjParams.h" |
030b4415 | 31 | |
2745a409 | 32 | #include "AliTRDgeometry.h" |
33 | #include "AliTRDpadPlane.h" | |
ecb36af7 | 34 | |
f7336fa3 | 35 | ClassImp(AliTRDgeometry) |
36 | ||
793ff80c | 37 | //_____________________________________________________________________________ |
38 | ||
39 | // | |
40 | // The geometry constants | |
41 | // | |
053767a4 | 42 | const Int_t AliTRDgeometry::fgkNsector = kNsector; |
43 | const Int_t AliTRDgeometry::fgkNlayer = kNlayer; | |
44 | const Int_t AliTRDgeometry::fgkNstack = kNstack; | |
7925de54 | 45 | const Int_t AliTRDgeometry::fgkNdet = kNdet; |
793ff80c | 46 | |
47 | // | |
48 | // Dimensions of the detector | |
49 | // | |
0a770ac9 | 50 | |
b640260a | 51 | // Total length of the TRD mother volume |
52 | const Float_t AliTRDgeometry::fgkTlength = 751.0; | |
53 | ||
54 | // Parameter of the super module mother volumes | |
7925de54 | 55 | const Float_t AliTRDgeometry::fgkSheight = 77.9; |
56 | const Float_t AliTRDgeometry::fgkSwidth1 = 94.881; | |
57 | const Float_t AliTRDgeometry::fgkSwidth2 = 122.353; | |
b640260a | 58 | const Float_t AliTRDgeometry::fgkSlength = 702.0; |
59 | ||
60 | // Length of the additional space in front of the supermodule | |
61 | // used for services | |
62 | const Float_t AliTRDgeometry::fgkFlength = (AliTRDgeometry::fgkTlength | |
63 | - AliTRDgeometry::fgkSlength) / 2.0; | |
793ff80c | 64 | |
73ae7b59 | 65 | // The super module side plates |
7925de54 | 66 | const Float_t AliTRDgeometry::fgkSMpltT = 0.2; |
73ae7b59 | 67 | |
053a5ea0 | 68 | // Vertical spacing of the chambers |
69 | const Float_t AliTRDgeometry::fgkVspace = 1.784; | |
70 | // Horizontal spacing of the chambers | |
71 | const Float_t AliTRDgeometry::fgkHspace = 2.0; | |
72 | // Radial distance of the first ROC to the outer plates of the SM | |
73 | const Float_t AliTRDgeometry::fgkVrocsm = 1.2; | |
74 | ||
0a770ac9 | 75 | // Height of different chamber parts |
76 | // Radiator | |
7925de54 | 77 | const Float_t AliTRDgeometry::fgkCraH = 4.8; |
0a770ac9 | 78 | // Drift region |
7925de54 | 79 | const Float_t AliTRDgeometry::fgkCdrH = 3.0; |
0a770ac9 | 80 | // Amplification region |
7925de54 | 81 | const Float_t AliTRDgeometry::fgkCamH = 0.7; |
0a770ac9 | 82 | // Readout |
7925de54 | 83 | const Float_t AliTRDgeometry::fgkCroH = 2.316; |
053a5ea0 | 84 | // Additional width of the readout chamber frames |
85 | const Float_t AliTRDgeometry::fgkCroW = 0.9; | |
86 | // Services on top of ROC | |
87 | const Float_t AliTRDgeometry::fgkCsvH = AliTRDgeometry::fgkVspace | |
88 | - 0.742; | |
89 | // Total height (w/o services) | |
7925de54 | 90 | const Float_t AliTRDgeometry::fgkCH = AliTRDgeometry::fgkCraH |
91 | + AliTRDgeometry::fgkCdrH | |
92 | + AliTRDgeometry::fgkCamH | |
25ca55ce | 93 | + AliTRDgeometry::fgkCroH; |
053a5ea0 | 94 | // Total height (with services) |
95 | ||
96 | const Float_t AliTRDgeometry::fgkCHsv = AliTRDgeometry::fgkCH | |
97 | + AliTRDgeometry::fgkCsvH; | |
0a770ac9 | 98 | |
a72494bb | 99 | // Distance of anode wire plane relative to middle of alignable volume |
100 | const Float_t AliTRDgeometry::fgkAnodePos = AliTRDgeometry::fgkCraH | |
101 | + AliTRDgeometry::fgkCdrH | |
102 | + AliTRDgeometry::fgkCamH/2.0 | |
053a5ea0 | 103 | - AliTRDgeometry::fgkCHsv/2.0; |
a797f961 | 104 | |
0a770ac9 | 105 | // Thicknesses of different parts of the chamber frame |
106 | // Lower aluminum frame | |
7925de54 | 107 | const Float_t AliTRDgeometry::fgkCalT = 0.4; |
0a5f3331 | 108 | // Lower Wacosit frame sides |
7925de54 | 109 | const Float_t AliTRDgeometry::fgkCclsT = 0.21; |
0a5f3331 | 110 | // Lower Wacosit frame front |
7925de54 | 111 | const Float_t AliTRDgeometry::fgkCclfT = 1.0; |
0a5f3331 | 112 | // Thickness of glue around radiator |
7925de54 | 113 | const Float_t AliTRDgeometry::fgkCglT = 0.25; |
053a5ea0 | 114 | // Upper Wacosit frame around amplification region |
115 | const Float_t AliTRDgeometry::fgkCcuTa = 1.0; | |
116 | const Float_t AliTRDgeometry::fgkCcuTb = 0.8; | |
0a5f3331 | 117 | // Al frame of back panel |
7925de54 | 118 | const Float_t AliTRDgeometry::fgkCauT = 1.5; |
053a5ea0 | 119 | // Additional Al ledge at the lower chamber frame |
120 | // Actually the dimensions are not realistic, but | |
121 | // modified in order to allow to mis-alignment. | |
122 | // The amount of material is, however, correct | |
123 | const Float_t AliTRDgeometry::fgkCalW = 2.5; | |
124 | const Float_t AliTRDgeometry::fgkCalH = 0.4; | |
125 | const Float_t AliTRDgeometry::fgkCalWmod = 0.4; | |
126 | const Float_t AliTRDgeometry::fgkCalHmod = 2.5; | |
127 | // Additional Wacosit ledge at the lower chamber frame | |
128 | const Float_t AliTRDgeometry::fgkCwsW = 1.2; | |
129 | const Float_t AliTRDgeometry::fgkCwsH = 0.3; | |
0a770ac9 | 130 | |
131 | // Difference of outer chamber width and pad plane width | |
7925de54 | 132 | const Float_t AliTRDgeometry::fgkCpadW = 0.0; |
133 | const Float_t AliTRDgeometry::fgkRpadW = 1.0; | |
793ff80c | 134 | |
135 | // | |
136 | // Thickness of the the material layers | |
137 | // | |
7925de54 | 138 | const Float_t AliTRDgeometry::fgkDrThick = AliTRDgeometry::fgkCdrH; |
139 | const Float_t AliTRDgeometry::fgkAmThick = AliTRDgeometry::fgkCamH; | |
140 | const Float_t AliTRDgeometry::fgkXeThick = AliTRDgeometry::fgkDrThick | |
141 | + AliTRDgeometry::fgkAmThick; | |
053a5ea0 | 142 | const Float_t AliTRDgeometry::fgkWrThick = 0.00011; |
143 | ||
144 | const Float_t AliTRDgeometry::fgkRMyThick = 0.0015; | |
145 | const Float_t AliTRDgeometry::fgkRCbThick = 0.0055; | |
146 | const Float_t AliTRDgeometry::fgkRGlThick = 0.0065; | |
147 | const Float_t AliTRDgeometry::fgkRRhThick = 0.8; | |
148 | const Float_t AliTRDgeometry::fgkRFbThick = fgkCraH - 2.0 * (fgkRMyThick | |
149 | + fgkRCbThick | |
150 | + fgkRRhThick); | |
151 | ||
152 | const Float_t AliTRDgeometry::fgkPPdThick = 0.0025; | |
153 | const Float_t AliTRDgeometry::fgkPPpThick = 0.0356; | |
154 | const Float_t AliTRDgeometry::fgkPGlThick = 0.1428; | |
155 | const Float_t AliTRDgeometry::fgkPCbThick = 0.019; | |
156 | const Float_t AliTRDgeometry::fgkPPcThick = 0.0486; | |
157 | const Float_t AliTRDgeometry::fgkPRbThick = 0.0057; | |
158 | const Float_t AliTRDgeometry::fgkPElThick = 0.0029; | |
159 | const Float_t AliTRDgeometry::fgkPHcThick = fgkCroH - fgkPPdThick | |
160 | - fgkPPpThick | |
161 | - fgkPGlThick | |
162 | - fgkPCbThick * 2.0 | |
163 | - fgkPPcThick | |
164 | - fgkPRbThick | |
165 | - fgkPElThick; | |
793ff80c | 166 | |
167 | // | |
168 | // Position of the material layers | |
169 | // | |
7925de54 | 170 | const Float_t AliTRDgeometry::fgkDrZpos = 2.4; |
171 | const Float_t AliTRDgeometry::fgkAmZpos = 0.0; | |
053a5ea0 | 172 | const Float_t AliTRDgeometry::fgkWrZposA = 0.0; |
173 | const Float_t AliTRDgeometry::fgkWrZposB = -fgkAmThick/2.0 + 0.001; | |
174 | const Float_t AliTRDgeometry::fgkCalZpos = 0.3; | |
7925de54 | 175 | |
25ca55ce | 176 | const Int_t AliTRDgeometry::fgkMCMmax = 16; |
177 | const Int_t AliTRDgeometry::fgkMCMrow = 4; | |
178 | const Int_t AliTRDgeometry::fgkROBmaxC0 = 6; | |
179 | const Int_t AliTRDgeometry::fgkROBmaxC1 = 8; | |
7925de54 | 180 | const Int_t AliTRDgeometry::fgkADCmax = 21; |
181 | const Int_t AliTRDgeometry::fgkTBmax = 60; | |
25ca55ce | 182 | const Int_t AliTRDgeometry::fgkPadmax = 18; |
7925de54 | 183 | const Int_t AliTRDgeometry::fgkColmax = 144; |
184 | const Int_t AliTRDgeometry::fgkRowmaxC0 = 12; | |
185 | const Int_t AliTRDgeometry::fgkRowmaxC1 = 16; | |
0a5f3331 | 186 | |
ca06fab2 | 187 | const Double_t AliTRDgeometry::fgkTime0Base = 300.65; |
7925de54 | 188 | const Float_t AliTRDgeometry::fgkTime0[6] = { fgkTime0Base + 0 * (Cheight() + Cspace()) |
189 | , fgkTime0Base + 1 * (Cheight() + Cspace()) | |
190 | , fgkTime0Base + 2 * (Cheight() + Cspace()) | |
191 | , fgkTime0Base + 3 * (Cheight() + Cspace()) | |
192 | , fgkTime0Base + 4 * (Cheight() + Cspace()) | |
193 | , fgkTime0Base + 5 * (Cheight() + Cspace())}; | |
793ff80c | 194 | |
cff68175 | 195 | const Double_t AliTRDgeometry::fgkXtrdBeg = 288.43; // Values depend on position of TRD |
196 | const Double_t AliTRDgeometry::fgkXtrdEnd = 366.33; // mother volume inside space frame !!! | |
197 | ||
f7336fa3 | 198 | //_____________________________________________________________________________ |
2745a409 | 199 | AliTRDgeometry::AliTRDgeometry() |
200 | :AliGeometry() | |
9a96f175 | 201 | ,fClusterMatrixArray(0) |
f162af62 | 202 | ,fPadPlaneArray(0) |
f7336fa3 | 203 | { |
204 | // | |
205 | // AliTRDgeometry default constructor | |
206 | // | |
bd0f8685 | 207 | |
2745a409 | 208 | Init(); |
209 | ||
210 | } | |
211 | ||
212 | //_____________________________________________________________________________ | |
213 | AliTRDgeometry::AliTRDgeometry(const AliTRDgeometry &g) | |
214 | :AliGeometry(g) | |
9a96f175 | 215 | ,fClusterMatrixArray(0) |
f162af62 | 216 | ,fPadPlaneArray(0) |
2745a409 | 217 | { |
218 | // | |
219 | // AliTRDgeometry copy constructor | |
220 | // | |
bd0f8685 | 221 | |
f7336fa3 | 222 | Init(); |
bd0f8685 | 223 | |
f7336fa3 | 224 | } |
225 | ||
226 | //_____________________________________________________________________________ | |
227 | AliTRDgeometry::~AliTRDgeometry() | |
228 | { | |
8230f242 | 229 | // |
230 | // AliTRDgeometry destructor | |
231 | // | |
bd0f8685 | 232 | |
9a96f175 | 233 | if (fClusterMatrixArray) { |
234 | fClusterMatrixArray->Delete(); | |
235 | delete fClusterMatrixArray; | |
236 | fClusterMatrixArray = 0; | |
4d18f746 | 237 | } |
238 | ||
f162af62 | 239 | if (fPadPlaneArray) { |
240 | fPadPlaneArray->Delete(); | |
241 | delete fPadPlaneArray; | |
242 | fPadPlaneArray = 0; | |
243 | } | |
244 | ||
f7336fa3 | 245 | } |
246 | ||
2745a409 | 247 | //_____________________________________________________________________________ |
248 | AliTRDgeometry &AliTRDgeometry::operator=(const AliTRDgeometry &g) | |
249 | { | |
250 | // | |
251 | // Assignment operator | |
252 | // | |
253 | ||
0a5f3331 | 254 | if (this != &g) { |
255 | Init(); | |
256 | } | |
030b4415 | 257 | |
2745a409 | 258 | return *this; |
259 | ||
260 | } | |
261 | ||
f7336fa3 | 262 | //_____________________________________________________________________________ |
263 | void AliTRDgeometry::Init() | |
264 | { | |
265 | // | |
266 | // Initializes the geometry parameter | |
267 | // | |
f7336fa3 | 268 | |
053767a4 | 269 | Int_t istack; |
270 | Int_t ilayer; | |
271 | Int_t isector; | |
0a770ac9 | 272 | |
273 | // The outer width of the chambers | |
287c5d50 | 274 | fCwidth[0] = 90.4; |
e0d47c25 | 275 | fCwidth[1] = 94.8; |
276 | fCwidth[2] = 99.3; | |
277 | fCwidth[3] = 103.7; | |
278 | fCwidth[4] = 108.1; | |
279 | fCwidth[5] = 112.6; | |
0a770ac9 | 280 | |
281 | // The outer lengths of the chambers | |
73ae7b59 | 282 | // Includes the spacings between the chambers! |
053767a4 | 283 | Float_t length[kNlayer][kNstack] = { { 124.0, 124.0, 110.0, 124.0, 124.0 } |
284 | , { 124.0, 124.0, 110.0, 124.0, 124.0 } | |
285 | , { 131.0, 131.0, 110.0, 131.0, 131.0 } | |
286 | , { 138.0, 138.0, 110.0, 138.0, 138.0 } | |
287 | , { 145.0, 145.0, 110.0, 145.0, 145.0 } | |
288 | , { 147.0, 147.0, 110.0, 147.0, 147.0 } }; | |
289 | ||
290 | for (istack = 0; istack < kNstack; istack++) { | |
291 | for (ilayer = 0; ilayer < kNlayer; ilayer++) { | |
292 | fClength[ilayer][istack] = length[ilayer][istack]; | |
0a770ac9 | 293 | } |
294 | } | |
295 | ||
793ff80c | 296 | // The rotation matrix elements |
030b4415 | 297 | Float_t phi = 0.0; |
053767a4 | 298 | for (isector = 0; isector < fgkNsector; isector++) { |
299 | phi = 2.0 * TMath::Pi() / (Float_t) fgkNsector * ((Float_t) isector + 0.5); | |
300 | fRotB11[isector] = TMath::Cos(phi); | |
301 | fRotB12[isector] = TMath::Sin(phi); | |
302 | fRotB21[isector] = TMath::Sin(phi); | |
303 | fRotB22[isector] = TMath::Cos(phi); | |
793ff80c | 304 | } |
305 | ||
18c05eb3 | 306 | // SM status |
307 | for (Int_t i = 0; i < kNsector; i++) { | |
308 | fSMstatus[i] = 1; | |
309 | } | |
5f6f5c22 | 310 | |
311 | } | |
312 | ||
f162af62 | 313 | //_____________________________________________________________________________ |
314 | void AliTRDgeometry::CreatePadPlaneArray() | |
315 | { | |
316 | // | |
317 | // Creates the array of AliTRDpadPlane objects | |
318 | // | |
319 | ||
320 | if (fPadPlaneArray) { | |
321 | fPadPlaneArray->Delete(); | |
322 | delete fPadPlaneArray; | |
323 | } | |
324 | ||
053767a4 | 325 | fPadPlaneArray = new TObjArray(fgkNlayer * fgkNstack); |
326 | for (Int_t ilayer = 0; ilayer < fgkNlayer; ilayer++) { | |
327 | for (Int_t istack = 0; istack < fgkNstack; istack++) { | |
328 | Int_t ipp = GetDetectorSec(ilayer,istack); | |
329 | fPadPlaneArray->AddAt(CreatePadPlane(ilayer,istack),ipp); | |
f162af62 | 330 | } |
331 | } | |
332 | ||
333 | } | |
334 | ||
335 | //_____________________________________________________________________________ | |
053767a4 | 336 | AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack) |
f162af62 | 337 | { |
338 | // | |
339 | // Creates an AliTRDpadPlane object | |
340 | // | |
341 | ||
342 | AliTRDpadPlane *padPlane = new AliTRDpadPlane(); | |
343 | ||
053767a4 | 344 | padPlane->SetLayer(ilayer); |
345 | padPlane->SetStack(istack); | |
f162af62 | 346 | |
347 | padPlane->SetRowSpacing(0.0); | |
348 | padPlane->SetColSpacing(0.0); | |
349 | ||
350 | padPlane->SetLengthRim(1.0); | |
351 | padPlane->SetWidthRim(0.5); | |
352 | ||
353 | padPlane->SetNcols(144); | |
354 | ||
58897a75 | 355 | padPlane->SetAnodeWireOffset(0.25); |
356 | ||
f162af62 | 357 | // |
358 | // The pad plane parameter | |
359 | // | |
053767a4 | 360 | switch (ilayer) { |
f162af62 | 361 | case 0: |
053767a4 | 362 | if (istack == 2) { |
f162af62 | 363 | // L0C0 type |
364 | padPlane->SetNrows(12); | |
365 | padPlane->SetLength(108.0); | |
366 | padPlane->SetWidth(92.2); | |
367 | padPlane->SetLengthOPad(8.0); | |
368 | padPlane->SetWidthOPad(0.515); | |
369 | padPlane->SetLengthIPad(9.0); | |
370 | padPlane->SetWidthIPad(0.635); | |
023b669c | 371 | padPlane->SetTiltingAngle(2.0); |
f162af62 | 372 | } |
373 | else { | |
374 | // L0C1 type | |
375 | padPlane->SetNrows(16); | |
376 | padPlane->SetLength(122.0); | |
377 | padPlane->SetWidth(92.2); | |
378 | padPlane->SetLengthOPad(7.5); | |
379 | padPlane->SetWidthOPad(0.515); | |
380 | padPlane->SetLengthIPad(7.5); | |
381 | padPlane->SetWidthIPad(0.635); | |
023b669c | 382 | padPlane->SetTiltingAngle(2.0); |
f162af62 | 383 | } |
384 | break; | |
385 | case 1: | |
053767a4 | 386 | if (istack == 2) { |
f162af62 | 387 | // L1C0 type |
388 | padPlane->SetNrows(12); | |
389 | padPlane->SetLength(108.0); | |
390 | padPlane->SetWidth(96.6); | |
391 | padPlane->SetLengthOPad(8.0); | |
392 | padPlane->SetWidthOPad(0.585); | |
393 | padPlane->SetLengthIPad(9.0); | |
394 | padPlane->SetWidthIPad(0.665); | |
023b669c | 395 | padPlane->SetTiltingAngle(-2.0); |
f162af62 | 396 | } |
397 | else { | |
398 | // L1C1 type | |
399 | padPlane->SetNrows(16); | |
400 | padPlane->SetLength(122.0); | |
401 | padPlane->SetWidth(96.6); | |
402 | padPlane->SetLengthOPad(7.5); | |
403 | padPlane->SetWidthOPad(0.585); | |
404 | padPlane->SetLengthIPad(7.5); | |
405 | padPlane->SetWidthIPad(0.665); | |
023b669c | 406 | padPlane->SetTiltingAngle(-2.0); |
f162af62 | 407 | } |
408 | break; | |
409 | case 2: | |
053767a4 | 410 | if (istack == 2) { |
f162af62 | 411 | // L2C0 type |
412 | padPlane->SetNrows(12); | |
413 | padPlane->SetLength(108.0); | |
414 | padPlane->SetWidth(101.1); | |
415 | padPlane->SetLengthOPad(8.0); | |
416 | padPlane->SetWidthOPad(0.705); | |
417 | padPlane->SetLengthIPad(9.0); | |
418 | padPlane->SetWidthIPad(0.695); | |
023b669c | 419 | padPlane->SetTiltingAngle(2.0); |
f162af62 | 420 | } |
421 | else { | |
422 | // L2C1 type | |
423 | padPlane->SetNrows(16); | |
424 | padPlane->SetLength(129.0); | |
425 | padPlane->SetWidth(101.1); | |
426 | padPlane->SetLengthOPad(7.5); | |
427 | padPlane->SetWidthOPad(0.705); | |
428 | padPlane->SetLengthIPad(8.0); | |
429 | padPlane->SetWidthIPad(0.695); | |
023b669c | 430 | padPlane->SetTiltingAngle(2.0); |
f162af62 | 431 | } |
432 | break; | |
433 | case 3: | |
053767a4 | 434 | if (istack == 2) { |
f162af62 | 435 | // L3C0 type |
436 | padPlane->SetNrows(12); | |
437 | padPlane->SetLength(108.0); | |
438 | padPlane->SetWidth(105.5); | |
439 | padPlane->SetLengthOPad(8.0); | |
440 | padPlane->SetWidthOPad(0.775); | |
441 | padPlane->SetLengthIPad(9.0); | |
442 | padPlane->SetWidthIPad(0.725); | |
023b669c | 443 | padPlane->SetTiltingAngle(-2.0); |
f162af62 | 444 | } |
445 | else { | |
446 | // L3C1 type | |
447 | padPlane->SetNrows(16); | |
448 | padPlane->SetLength(136.0); | |
449 | padPlane->SetWidth(105.5); | |
450 | padPlane->SetLengthOPad(7.5); | |
451 | padPlane->SetWidthOPad(0.775); | |
452 | padPlane->SetLengthIPad(8.5); | |
453 | padPlane->SetWidthIPad(0.725); | |
023b669c | 454 | padPlane->SetTiltingAngle(-2.0); |
f162af62 | 455 | } |
456 | break; | |
457 | case 4: | |
053767a4 | 458 | if (istack == 2) { |
f162af62 | 459 | // L4C0 type |
460 | padPlane->SetNrows(12); | |
461 | padPlane->SetLength(108.0); | |
462 | padPlane->SetWidth(109.9); | |
463 | padPlane->SetLengthOPad(8.0); | |
464 | padPlane->SetWidthOPad(0.845); | |
465 | padPlane->SetLengthIPad(9.0); | |
466 | padPlane->SetWidthIPad(0.755); | |
023b669c | 467 | padPlane->SetTiltingAngle(2.0); |
f162af62 | 468 | } |
469 | else { | |
470 | // L4C1 type | |
471 | padPlane->SetNrows(16); | |
472 | padPlane->SetLength(143.0); | |
473 | padPlane->SetWidth(109.9); | |
474 | padPlane->SetLengthOPad(7.5); | |
475 | padPlane->SetWidthOPad(0.845); | |
476 | padPlane->SetLengthIPad(9.0); | |
477 | padPlane->SetWidthIPad(0.755); | |
023b669c | 478 | padPlane->SetTiltingAngle(2.0); |
f162af62 | 479 | } |
480 | break; | |
481 | case 5: | |
053767a4 | 482 | if (istack == 2) { |
f162af62 | 483 | // L5C0 type |
484 | padPlane->SetNrows(12); | |
485 | padPlane->SetLength(108.0); | |
486 | padPlane->SetWidth(114.4); | |
487 | padPlane->SetLengthOPad(8.0); | |
488 | padPlane->SetWidthOPad(0.965); | |
489 | padPlane->SetLengthIPad(9.0); | |
490 | padPlane->SetWidthIPad(0.785); | |
023b669c | 491 | padPlane->SetTiltingAngle(-2.0); |
f162af62 | 492 | } |
493 | else { | |
494 | // L5C1 type | |
495 | padPlane->SetNrows(16); | |
496 | padPlane->SetLength(145.0); | |
497 | padPlane->SetWidth(114.4); | |
498 | padPlane->SetLengthOPad(8.5); | |
499 | padPlane->SetWidthOPad(0.965); | |
500 | padPlane->SetLengthIPad(9.0); | |
501 | padPlane->SetWidthIPad(0.785); | |
023b669c | 502 | padPlane->SetTiltingAngle(-2.0); |
f162af62 | 503 | } |
504 | break; | |
505 | }; | |
506 | ||
507 | // | |
508 | // The positions of the borders of the pads | |
509 | // | |
510 | // Row direction | |
511 | // | |
053767a4 | 512 | Double_t row = fClength[ilayer][istack] / 2.0 |
f162af62 | 513 | - fgkRpadW |
514 | - padPlane->GetLengthRim(); | |
515 | for (Int_t ir = 0; ir < padPlane->GetNrows(); ir++) { | |
516 | padPlane->SetPadRow(ir,row); | |
517 | row -= padPlane->GetRowSpacing(); | |
518 | if (ir == 0) { | |
519 | row -= padPlane->GetLengthOPad(); | |
520 | } | |
521 | else { | |
522 | row -= padPlane->GetLengthIPad(); | |
523 | } | |
524 | } | |
525 | // | |
526 | // Column direction | |
527 | // | |
023b669c | 528 | Double_t col = - fCwidth[ilayer] / 2.0 |
529 | - fgkCroW | |
530 | + padPlane->GetWidthRim(); | |
f162af62 | 531 | for (Int_t ic = 0; ic < padPlane->GetNcols(); ic++) { |
532 | padPlane->SetPadCol(ic,col); | |
023b669c | 533 | col += padPlane->GetColSpacing(); |
f162af62 | 534 | if (ic == 0) { |
023b669c | 535 | col += padPlane->GetWidthOPad(); |
f162af62 | 536 | } |
537 | else { | |
023b669c | 538 | col += padPlane->GetWidthIPad(); |
f162af62 | 539 | } |
540 | } | |
541 | // Calculate the offset to translate from the local ROC system into | |
542 | // the local supermodule system, which is used for clusters | |
053767a4 | 543 | Double_t rowTmp = fClength[ilayer][0] |
544 | + fClength[ilayer][1] | |
545 | + fClength[ilayer][2] / 2.0; | |
546 | for (Int_t jstack = 0; jstack < istack; jstack++) { | |
547 | rowTmp -= fClength[ilayer][jstack]; | |
f162af62 | 548 | } |
053767a4 | 549 | padPlane->SetPadRowSMOffset(rowTmp - fClength[ilayer][istack]/2.0); |
f162af62 | 550 | |
551 | return padPlane; | |
552 | ||
553 | } | |
554 | ||
f7336fa3 | 555 | //_____________________________________________________________________________ |
bd0f8685 | 556 | void AliTRDgeometry::CreateGeometry(Int_t *idtmed) |
557 | { | |
558 | // | |
053a5ea0 | 559 | // Create the TRD geometry |
bd0f8685 | 560 | // |
561 | // | |
562 | // Names of the TRD volumina (xx = detector number): | |
563 | // | |
053a5ea0 | 564 | // Volume (Air) wrapping the readout chamber components |
565 | // UTxx includes: UAxx, UDxx, UFxx, UUxx | |
566 | // | |
567 | // Lower part of the readout chambers (drift volume + radiator) | |
568 | // UAxx Aluminum frames (Al) | |
569 | // | |
570 | // Upper part of the readout chambers (readout plane + fee) | |
571 | // UDxx Wacosit frames of amp. region (Wacosit) | |
572 | // UFxx Aluminum frame of back panel (Al) | |
573 | // | |
574 | // Services on chambers (cooling, cables, MCMs, DCS boards, ...) | |
575 | // UUxx Volume containing the services (Air) | |
576 | // | |
577 | // Material layers inside sensitive area: | |
578 | // Name Description Mat. Thick. Dens. Radl. X/X_0 | |
579 | // | |
580 | // URMYxx Mylar layers (x2) Mylar 0.0015 1.39 28.5464 0.005% | |
581 | // URCBxx Carbon layer (x2) Carbon 0.0055 1.75 24.2824 0.023% | |
582 | // URGLxx Glue on the carbon layers (x2) Araldite 0.0065 1.12 37.0664 0.018% | |
583 | // URRHxx Rohacell layer (x2) Rohacell 0.8 0.075 536.005 0.149% | |
584 | // URFBxx Fiber mat layer PP 3.186 0.068 649.727 0.490% | |
585 | // | |
586 | // UJxx Drift region Xe/CO2 3.0 0.00495 1792.37 0.167% | |
587 | // UKxx Amplification region Xe/CO2 0.7 0.00495 1792.37 0.039% | |
588 | // UWxx Wire planes (x2) Copper 0.00011 8.96 1.43503 0.008% | |
589 | // | |
590 | // UPPDxx Copper of pad plane Copper 0.0025 8.96 1.43503 0.174% | |
591 | // UPPPxx PCB of pad plane G10 0.0356 2.0 14.9013 0.239% | |
592 | // UPGLxx Glue on pad planes Araldite 0.0923 1.12 37.0664 0.249% | |
593 | // + add. glue (ca. 600g) Araldite 0.0505 1.12 37.0663 0.107% | |
594 | // UPCBxx Carbon fiber mats (x2) Carbon 0.019 1.75 24.2824 0.078% | |
595 | // UPHCxx Honeycomb structure Aramide 2.0299 0.032 1198.84 0.169% | |
596 | // UPPCxx PCB of readout board G10 0.0486 2.0 14.9013 0.326% | |
597 | // UPRDxx Copper of readout board Copper 0.0057 8.96 1.43503 0.404% | |
598 | // UPELxx Electronics + cables Copper 0.0029 8.96 1.43503 0.202% | |
bd0f8685 | 599 | // |
600 | ||
601 | const Int_t kNparTrd = 4; | |
602 | const Int_t kNparCha = 3; | |
603 | ||
030b4415 | 604 | Float_t xpos; |
605 | Float_t ypos; | |
606 | Float_t zpos; | |
bd0f8685 | 607 | |
608 | Float_t parTrd[kNparTrd]; | |
609 | Float_t parCha[kNparCha]; | |
610 | ||
a3f8715e | 611 | Char_t cTagV[100]; |
612 | Char_t cTagM[100]; | |
bd0f8685 | 613 | |
e7014565 | 614 | // There are three TRD volumes for the supermodules in order to accomodate |
615 | // the different arrangements in front of PHOS | |
616 | // UTR1: Default supermodule | |
617 | // UTR2: Supermodule in front of PHOS with double carbon cover | |
618 | // UTR3: As UTR2, but w/o middle stack | |
b640260a | 619 | // |
620 | // The mother volume for one sector (Air), full length in z-direction | |
bd0f8685 | 621 | // Provides material for side plates of super module |
030b4415 | 622 | parTrd[0] = fgkSwidth1/2.0; |
623 | parTrd[1] = fgkSwidth2/2.0; | |
0a5f3331 | 624 | parTrd[2] = fgkSlength/2.0; |
030b4415 | 625 | parTrd[3] = fgkSheight/2.0; |
bd0f8685 | 626 | gMC->Gsvolu("UTR1","TRD1",idtmed[1302-1],parTrd,kNparTrd); |
e7014565 | 627 | gMC->Gsvolu("UTR2","TRD1",idtmed[1302-1],parTrd,kNparTrd); |
628 | gMC->Gsvolu("UTR3","TRD1",idtmed[1302-1],parTrd,kNparTrd); | |
a797f961 | 629 | // The outer aluminum plates of the super module (Al) |
030b4415 | 630 | parTrd[0] = fgkSwidth1/2.0; |
631 | parTrd[1] = fgkSwidth2/2.0; | |
0a5f3331 | 632 | parTrd[2] = fgkSlength/2.0; |
030b4415 | 633 | parTrd[3] = fgkSheight/2.0; |
bd0f8685 | 634 | gMC->Gsvolu("UTS1","TRD1",idtmed[1301-1],parTrd,kNparTrd); |
e7014565 | 635 | gMC->Gsvolu("UTS2","TRD1",idtmed[1301-1],parTrd,kNparTrd); |
636 | gMC->Gsvolu("UTS3","TRD1",idtmed[1301-1],parTrd,kNparTrd); | |
bd0f8685 | 637 | // The inner part of the TRD mother volume for one sector (Air), |
638 | // full length in z-direction | |
030b4415 | 639 | parTrd[0] = fgkSwidth1/2.0 - fgkSMpltT; |
640 | parTrd[1] = fgkSwidth2/2.0 - fgkSMpltT; | |
0a5f3331 | 641 | parTrd[2] = fgkSlength/2.0; |
030b4415 | 642 | parTrd[3] = fgkSheight/2.0 - fgkSMpltT; |
bd0f8685 | 643 | gMC->Gsvolu("UTI1","TRD1",idtmed[1302-1],parTrd,kNparTrd); |
e7014565 | 644 | gMC->Gsvolu("UTI2","TRD1",idtmed[1302-1],parTrd,kNparTrd); |
645 | gMC->Gsvolu("UTI3","TRD1",idtmed[1302-1],parTrd,kNparTrd); | |
bd0f8685 | 646 | |
b640260a | 647 | // The inner part of the TRD mother volume for services in front |
648 | // of the supermodules (Air), | |
649 | parTrd[0] = fgkSwidth1/2.0; | |
650 | parTrd[1] = fgkSwidth2/2.0; | |
651 | parTrd[2] = fgkFlength/2.0; | |
652 | parTrd[3] = fgkSheight/2.0; | |
653 | gMC->Gsvolu("UTF1","TRD1",idtmed[1302-1],parTrd,kNparTrd); | |
654 | gMC->Gsvolu("UTF2","TRD1",idtmed[1302-1],parTrd,kNparTrd); | |
655 | ||
053767a4 | 656 | for (Int_t istack = 0; istack < kNstack; istack++) { |
657 | for (Int_t ilayer = 0; ilayer < kNlayer; ilayer++) { | |
bd0f8685 | 658 | |
053767a4 | 659 | Int_t iDet = GetDetectorSec(ilayer,istack); |
bd0f8685 | 660 | |
0a5f3331 | 661 | // The lower part of the readout chambers (drift volume + radiator) |
bd0f8685 | 662 | // The aluminum frames |
663 | sprintf(cTagV,"UA%02d",iDet); | |
053767a4 | 664 | parCha[0] = fCwidth[ilayer]/2.0; |
665 | parCha[1] = fClength[ilayer][istack]/2.0 - fgkHspace/2.0; | |
030b4415 | 666 | parCha[2] = fgkCraH/2.0 + fgkCdrH/2.0; |
bd0f8685 | 667 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha); |
0a5f3331 | 668 | // The additional aluminum on the frames |
053a5ea0 | 669 | // This part has not the correct shape but is just supposed to |
b640260a | 670 | // represent the missing material. The correct form of the L-shaped |
0a5f3331 | 671 | // profile would not fit into the alignable volume. |
672 | sprintf(cTagV,"UZ%02d",iDet); | |
053a5ea0 | 673 | parCha[0] = fgkCalWmod/2.0; |
053767a4 | 674 | parCha[1] = fClength[ilayer][istack]/2.0 - fgkHspace/2.0; |
053a5ea0 | 675 | parCha[2] = fgkCalHmod/2.0; |
0a5f3331 | 676 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha); |
053a5ea0 | 677 | // The additional Wacosit on the frames |
678 | sprintf(cTagV,"UP%02d",iDet); | |
679 | parCha[0] = fgkCwsW/2.0; | |
680 | parCha[1] = fClength[ilayer][istack]/2.0 - fgkHspace/2.0; | |
681 | parCha[2] = fgkCwsH/2.0; | |
682 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha); | |
0a5f3331 | 683 | // The Wacosit frames |
bd0f8685 | 684 | sprintf(cTagV,"UB%02d",iDet); |
053767a4 | 685 | parCha[0] = fCwidth[ilayer]/2.0 - fgkCalT; |
030b4415 | 686 | parCha[1] = -1.0; |
687 | parCha[2] = -1.0; | |
bd0f8685 | 688 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha); |
0a5f3331 | 689 | // The glue around the radiator |
690 | sprintf(cTagV,"UX%02d",iDet); | |
053767a4 | 691 | parCha[0] = fCwidth[ilayer]/2.0 - fgkCalT - fgkCclsT; |
692 | parCha[1] = fClength[ilayer][istack]/2.0 - fgkHspace/2.0 - fgkCclfT; | |
0a5f3331 | 693 | parCha[2] = fgkCraH/2.0; |
694 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1311-1],parCha,kNparCha); | |
695 | // The inner part of radiator (air) | |
696 | sprintf(cTagV,"UC%02d",iDet); | |
053767a4 | 697 | parCha[0] = fCwidth[ilayer]/2.0 - fgkCalT - fgkCclsT - fgkCglT; |
698 | parCha[1] = fClength[ilayer][istack]/2.0 - fgkHspace/2.0 - fgkCclfT - fgkCglT; | |
030b4415 | 699 | parCha[2] = -1.0; |
bd0f8685 | 700 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha); |
701 | ||
0a5f3331 | 702 | // The upper part of the readout chambers (amplification volume) |
703 | // The Wacosit frames | |
bd0f8685 | 704 | sprintf(cTagV,"UD%02d",iDet); |
053767a4 | 705 | parCha[0] = fCwidth[ilayer]/2.0 + fgkCroW; |
706 | parCha[1] = fClength[ilayer][istack]/2.0 - fgkHspace/2.0; | |
030b4415 | 707 | parCha[2] = fgkCamH/2.0; |
bd0f8685 | 708 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1307-1],parCha,kNparCha); |
0a5f3331 | 709 | // The inner part of the Wacosit frame (air) |
bd0f8685 | 710 | sprintf(cTagV,"UE%02d",iDet); |
053a5ea0 | 711 | parCha[0] = fCwidth[ilayer]/2.0 + fgkCroW - fgkCcuTb; |
712 | parCha[1] = fClength[ilayer][istack]/2.0 - fgkHspace/2.0 - fgkCcuTa; | |
bd0f8685 | 713 | parCha[2] = -1.; |
714 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha); | |
0a5f3331 | 715 | |
053a5ea0 | 716 | // The back panel, including pad plane and readout boards |
bd0f8685 | 717 | // The aluminum frames |
718 | sprintf(cTagV,"UF%02d",iDet); | |
053767a4 | 719 | parCha[0] = fCwidth[ilayer]/2.0 + fgkCroW; |
720 | parCha[1] = fClength[ilayer][istack]/2.0 - fgkHspace/2.0; | |
030b4415 | 721 | parCha[2] = fgkCroH/2.0; |
bd0f8685 | 722 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parCha,kNparCha); |
723 | // The inner part of the aluminum frames | |
724 | sprintf(cTagV,"UG%02d",iDet); | |
053767a4 | 725 | parCha[0] = fCwidth[ilayer]/2.0 + fgkCroW - fgkCauT; |
726 | parCha[1] = fClength[ilayer][istack]/2.0 - fgkHspace/2.0 - fgkCauT; | |
030b4415 | 727 | parCha[2] = -1.0; |
bd0f8685 | 728 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parCha,kNparCha); |
729 | ||
053a5ea0 | 730 | // |
bd0f8685 | 731 | // The material layers inside the chambers |
053a5ea0 | 732 | // |
733 | ||
734 | // Mylar layer (radiator) | |
735 | parCha[0] = -1.0; | |
736 | parCha[1] = -1.0; | |
737 | parCha[2] = fgkRMyThick/2.0; | |
738 | sprintf(cTagV,"URMY%02d",iDet); | |
739 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1327-1],parCha,kNparCha); | |
740 | // Carbon layer (radiator) | |
741 | parCha[0] = -1.0; | |
742 | parCha[1] = -1.0; | |
743 | parCha[2] = fgkRCbThick/2.0; | |
744 | sprintf(cTagV,"URCB%02d",iDet); | |
745 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1326-1],parCha,kNparCha); | |
746 | // Araldite layer (radiator) | |
747 | parCha[0] = -1.0; | |
748 | parCha[1] = -1.0; | |
749 | parCha[2] = fgkRGlThick/2.0; | |
750 | sprintf(cTagV,"URGL%02d",iDet); | |
751 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1311-1],parCha,kNparCha); | |
0a5f3331 | 752 | // Rohacell layer (radiator) |
030b4415 | 753 | parCha[0] = -1.0; |
754 | parCha[1] = -1.0; | |
053a5ea0 | 755 | parCha[2] = fgkRRhThick/2.0; |
756 | sprintf(cTagV,"URRH%02d",iDet); | |
bd0f8685 | 757 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1315-1],parCha,kNparCha); |
053a5ea0 | 758 | // Fiber layer (radiator) |
759 | parCha[0] = -1.0; | |
760 | parCha[1] = -1.0; | |
761 | parCha[2] = fgkRFbThick/2.0; | |
762 | sprintf(cTagV,"URFB%02d",iDet); | |
763 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1328-1],parCha,kNparCha); | |
764 | ||
bd0f8685 | 765 | // Xe/Isobutane layer (drift volume) |
053767a4 | 766 | parCha[0] = fCwidth[ilayer]/2.0 - fgkCalT - fgkCclsT; |
767 | parCha[1] = fClength[ilayer][istack]/2.0 - fgkHspace/2.0 - fgkCclfT; | |
030b4415 | 768 | parCha[2] = fgkDrThick/2.0; |
bd0f8685 | 769 | sprintf(cTagV,"UJ%02d",iDet); |
770 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha); | |
053a5ea0 | 771 | |
bd0f8685 | 772 | // Xe/Isobutane layer (amplification volume) |
0a5f3331 | 773 | parCha[0] = -1.0; |
774 | parCha[1] = -1.0; | |
030b4415 | 775 | parCha[2] = fgkAmThick/2.0; |
bd0f8685 | 776 | sprintf(cTagV,"UK%02d",iDet); |
777 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1309-1],parCha,kNparCha); | |
0a5f3331 | 778 | // Cu layer (wire plane) |
779 | parCha[0] = -1.0; | |
780 | parCha[1] = -1.0; | |
781 | parCha[2] = fgkWrThick/2.0; | |
782 | sprintf(cTagV,"UW%02d",iDet); | |
783 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1303-1],parCha,kNparCha); | |
053a5ea0 | 784 | |
bd0f8685 | 785 | // Cu layer (pad plane) |
0a5f3331 | 786 | parCha[0] = -1.0; |
787 | parCha[1] = -1.0; | |
053a5ea0 | 788 | parCha[2] = fgkPPdThick/2.0; |
789 | sprintf(cTagV,"UPPD%02d",iDet); | |
bd0f8685 | 790 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1305-1],parCha,kNparCha); |
053a5ea0 | 791 | // G10 layer (pad plane) |
0a5f3331 | 792 | parCha[0] = -1.0; |
793 | parCha[1] = -1.0; | |
053a5ea0 | 794 | parCha[2] = fgkPPpThick/2.0; |
795 | sprintf(cTagV,"UPPP%02d",iDet); | |
796 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha); | |
797 | // Araldite layer (glue) | |
798 | parCha[0] = -1.0; | |
799 | parCha[1] = -1.0; | |
800 | parCha[2] = fgkPGlThick/2.0; | |
801 | sprintf(cTagV,"UPGL%02d",iDet); | |
0a5f3331 | 802 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1311-1],parCha,kNparCha); |
053a5ea0 | 803 | // Carbon layer (carbon fiber mats) |
804 | parCha[0] = -1.0; | |
805 | parCha[1] = -1.0; | |
806 | parCha[2] = fgkPCbThick/2.0; | |
807 | sprintf(cTagV,"UPCB%02d",iDet); | |
808 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1326-1],parCha,kNparCha); | |
809 | // Aramide layer (honeycomb) | |
0a5f3331 | 810 | parCha[0] = -1.0; |
811 | parCha[1] = -1.0; | |
053a5ea0 | 812 | parCha[2] = fgkPHcThick/2.0; |
813 | sprintf(cTagV,"UPHC%02d",iDet); | |
0a5f3331 | 814 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1310-1],parCha,kNparCha); |
815 | // G10 layer (PCB readout board) | |
816 | parCha[0] = -1.0; | |
817 | parCha[1] = -1.0; | |
053a5ea0 | 818 | parCha[2] = fgkPPcThick/2; |
819 | sprintf(cTagV,"UPPC%02d",iDet); | |
a797f961 | 820 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1313-1],parCha,kNparCha); |
0a5f3331 | 821 | // Cu layer (traces in readout board) |
822 | parCha[0] = -1.0; | |
823 | parCha[1] = -1.0; | |
053a5ea0 | 824 | parCha[2] = fgkPRbThick/2.0; |
825 | sprintf(cTagV,"UPRB%02d",iDet); | |
a797f961 | 826 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1306-1],parCha,kNparCha); |
053a5ea0 | 827 | // Cu layer (other material on in readout board, incl. screws) |
0a5f3331 | 828 | parCha[0] = -1.0; |
829 | parCha[1] = -1.0; | |
053a5ea0 | 830 | parCha[2] = fgkPElThick/2.0; |
831 | sprintf(cTagV,"UPEL%02d",iDet); | |
0a5f3331 | 832 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1304-1],parCha,kNparCha); |
bd0f8685 | 833 | |
053a5ea0 | 834 | // |
bd0f8685 | 835 | // Position the layers in the chambers |
053a5ea0 | 836 | // |
030b4415 | 837 | xpos = 0.0; |
838 | ypos = 0.0; | |
053a5ea0 | 839 | |
bd0f8685 | 840 | // Lower part |
053a5ea0 | 841 | // Mylar layers (radiator) |
842 | zpos = fgkRMyThick/2.0 - fgkCraH/2.0; | |
843 | sprintf(cTagV,"URMY%02d",iDet); | |
844 | sprintf(cTagM,"UC%02d",iDet); | |
845 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
846 | zpos = -fgkRMyThick/2.0 + fgkCraH/2.0; | |
847 | sprintf(cTagV,"URMY%02d",iDet); | |
848 | sprintf(cTagM,"UC%02d",iDet); | |
849 | gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
850 | // Carbon layers (radiator) | |
851 | zpos = fgkRCbThick/2.0 + fgkRMyThick - fgkCraH/2.0; | |
852 | sprintf(cTagV,"URCB%02d",iDet); | |
853 | sprintf(cTagM,"UC%02d",iDet); | |
854 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
855 | zpos = -fgkRCbThick/2.0 - fgkRMyThick + fgkCraH/2.0; | |
856 | sprintf(cTagV,"URCB%02d",iDet); | |
857 | sprintf(cTagM,"UC%02d",iDet); | |
858 | gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
859 | // Carbon layers (radiator) | |
860 | zpos = fgkRGlThick/2.0 + fgkRCbThick + fgkRMyThick - fgkCraH/2.0; | |
861 | sprintf(cTagV,"URGL%02d",iDet); | |
bd0f8685 | 862 | sprintf(cTagM,"UC%02d",iDet); |
863 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
053a5ea0 | 864 | zpos = -fgkRGlThick/2.0 - fgkRCbThick - fgkRMyThick + fgkCraH/2.0; |
865 | sprintf(cTagV,"URGL%02d",iDet); | |
866 | sprintf(cTagM,"UC%02d",iDet); | |
867 | gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
868 | // Rohacell layers (radiator) | |
869 | zpos = fgkRRhThick/2.0 + fgkRGlThick + fgkRCbThick + fgkRMyThick - fgkCraH/2.0; | |
870 | sprintf(cTagV,"URRH%02d",iDet); | |
871 | sprintf(cTagM,"UC%02d",iDet); | |
872 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
873 | zpos = -fgkRRhThick/2.0 - fgkRGlThick - fgkRCbThick - fgkRMyThick + fgkCraH/2.0; | |
874 | sprintf(cTagV,"URRH%02d",iDet); | |
875 | sprintf(cTagM,"UC%02d",iDet); | |
876 | gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
877 | // Fiber layers (radiator) | |
878 | zpos = 0.0; | |
879 | sprintf(cTagV,"URFB%02d",iDet); | |
880 | sprintf(cTagM,"UC%02d",iDet); | |
881 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
882 | ||
bd0f8685 | 883 | // Xe/Isobutane layer (drift volume) |
884 | zpos = fgkDrZpos; | |
885 | sprintf(cTagV,"UJ%02d",iDet); | |
0a5f3331 | 886 | sprintf(cTagM,"UB%02d",iDet); |
bd0f8685 | 887 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); |
053a5ea0 | 888 | |
bd0f8685 | 889 | // Upper part |
890 | // Xe/Isobutane layer (amplification volume) | |
891 | zpos = fgkAmZpos; | |
892 | sprintf(cTagV,"UK%02d",iDet); | |
893 | sprintf(cTagM,"UE%02d",iDet); | |
894 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
053a5ea0 | 895 | // Cu layer (wire planes inside amplification volume) |
896 | zpos = fgkWrZposA; | |
0a5f3331 | 897 | sprintf(cTagV,"UW%02d",iDet); |
898 | sprintf(cTagM,"UK%02d",iDet); | |
899 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
053a5ea0 | 900 | zpos = fgkWrZposB; |
901 | sprintf(cTagV,"UW%02d",iDet); | |
902 | sprintf(cTagM,"UK%02d",iDet); | |
903 | gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
904 | ||
905 | // Back panel + pad plane + readout part | |
bd0f8685 | 906 | // Cu layer (pad plane) |
053a5ea0 | 907 | zpos = fgkPPdThick/2.0 - fgkCroH/2.0; |
908 | sprintf(cTagV,"UPPD%02d",iDet); | |
909 | sprintf(cTagM,"UG%02d",iDet); | |
910 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
911 | // G10 layer (pad plane) | |
912 | zpos = fgkPPpThick/2.0 + fgkPPdThick - fgkCroH/2.0; | |
913 | sprintf(cTagV,"UPPP%02d",iDet); | |
bd0f8685 | 914 | sprintf(cTagM,"UG%02d",iDet); |
915 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
053a5ea0 | 916 | // Araldite layer (glue) |
917 | zpos = fgkPGlThick/2.0 + fgkPPpThick + fgkPPdThick - fgkCroH/2.0; | |
918 | sprintf(cTagV,"UPGL%02d",iDet); | |
0a5f3331 | 919 | sprintf(cTagM,"UG%02d",iDet); |
920 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
053a5ea0 | 921 | // Carbon layers (carbon fiber mats) |
922 | zpos = fgkPCbThick/2.0 + fgkPGlThick + fgkPPpThick + fgkPPdThick - fgkCroH/2.0; | |
923 | sprintf(cTagV,"UPCB%02d",iDet); | |
924 | sprintf(cTagM,"UG%02d",iDet); | |
925 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
926 | zpos = -fgkPCbThick/2.0 - fgkPPcThick - fgkPRbThick - fgkPElThick + fgkCroH/2.0; | |
927 | sprintf(cTagV,"UPCB%02d",iDet); | |
928 | sprintf(cTagM,"UG%02d",iDet); | |
929 | gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
930 | // Aramide layer (honeycomb) | |
931 | zpos = fgkPHcThick/2.0 + fgkPCbThick + fgkPGlThick + fgkPPpThick + fgkPPdThick - fgkCroH/2.0; | |
932 | sprintf(cTagV,"UPHC%02d",iDet); | |
bd0f8685 | 933 | sprintf(cTagM,"UG%02d",iDet); |
934 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
0a5f3331 | 935 | // G10 layer (PCB readout board) |
053a5ea0 | 936 | zpos = -fgkPPcThick/2.0 - fgkPRbThick - fgkPElThick + fgkCroH/2.0; |
937 | sprintf(cTagV,"UPPC%02d",iDet); | |
a797f961 | 938 | sprintf(cTagM,"UG%02d",iDet); |
939 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
0a5f3331 | 940 | // Cu layer (traces in readout board) |
053a5ea0 | 941 | zpos = -fgkPRbThick/2.0 - fgkPElThick + fgkCroH/2.0; |
942 | sprintf(cTagV,"UPRB%02d",iDet); | |
a797f961 | 943 | sprintf(cTagM,"UG%02d",iDet); |
944 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
053a5ea0 | 945 | // Cu layer (other materials on readout board, incl. screws) |
946 | zpos = -fgkPElThick/2.0 + fgkCroH/2.0; | |
947 | sprintf(cTagV,"UPEL%02d",iDet); | |
0a5f3331 | 948 | sprintf(cTagM,"UG%02d",iDet); |
949 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
bd0f8685 | 950 | |
951 | // Position the inner volumes of the chambers in the frames | |
030b4415 | 952 | xpos = 0.0; |
953 | ypos = 0.0; | |
053a5ea0 | 954 | |
955 | // The inner part of the radiator (air) | |
030b4415 | 956 | zpos = 0.0; |
bd0f8685 | 957 | sprintf(cTagV,"UC%02d",iDet); |
0a5f3331 | 958 | sprintf(cTagM,"UX%02d",iDet); |
959 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
960 | // The glue around the radiator | |
961 | zpos = fgkCraH/2.0 - fgkCdrH/2.0 - fgkCraH/2.0; | |
962 | sprintf(cTagV,"UX%02d",iDet); | |
bd0f8685 | 963 | sprintf(cTagM,"UB%02d",iDet); |
964 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
0a5f3331 | 965 | // The lower Wacosit frame inside the aluminum frame |
966 | zpos = 0.0; | |
bd0f8685 | 967 | sprintf(cTagV,"UB%02d",iDet); |
968 | sprintf(cTagM,"UA%02d",iDet); | |
969 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
053a5ea0 | 970 | |
0a5f3331 | 971 | // The inside of the upper Wacosit frame |
972 | zpos = 0.0; | |
bd0f8685 | 973 | sprintf(cTagV,"UE%02d",iDet); |
974 | sprintf(cTagM,"UD%02d",iDet); | |
975 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
053a5ea0 | 976 | |
bd0f8685 | 977 | // The inside of the upper aluminum frame |
0a5f3331 | 978 | zpos = 0.0; |
bd0f8685 | 979 | sprintf(cTagV,"UG%02d",iDet); |
980 | sprintf(cTagM,"UF%02d",iDet); | |
981 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
982 | ||
bd0f8685 | 983 | } |
984 | } | |
985 | ||
986 | // Create the volumes of the super module frame | |
987 | CreateFrame(idtmed); | |
988 | ||
989 | // Create the volumes of the services | |
990 | CreateServices(idtmed); | |
991 | ||
053767a4 | 992 | for (Int_t istack = 0; istack < kNstack; istack++) { |
993 | for (Int_t ilayer = 0; ilayer < kNlayer; ilayer++) { | |
053a5ea0 | 994 | AssembleChamber(ilayer,istack); |
bd0f8685 | 995 | } |
996 | } | |
997 | ||
030b4415 | 998 | xpos = 0.0; |
999 | ypos = 0.0; | |
1000 | zpos = 0.0; | |
bd0f8685 | 1001 | gMC->Gspos("UTI1",1,"UTS1",xpos,ypos,zpos,0,"ONLY"); |
e7014565 | 1002 | gMC->Gspos("UTI2",1,"UTS2",xpos,ypos,zpos,0,"ONLY"); |
1003 | gMC->Gspos("UTI3",1,"UTS3",xpos,ypos,zpos,0,"ONLY"); | |
bd0f8685 | 1004 | |
030b4415 | 1005 | xpos = 0.0; |
1006 | ypos = 0.0; | |
1007 | zpos = 0.0; | |
bd0f8685 | 1008 | gMC->Gspos("UTS1",1,"UTR1",xpos,ypos,zpos,0,"ONLY"); |
e7014565 | 1009 | gMC->Gspos("UTS2",1,"UTR2",xpos,ypos,zpos,0,"ONLY"); |
1010 | gMC->Gspos("UTS3",1,"UTR3",xpos,ypos,zpos,0,"ONLY"); | |
bd0f8685 | 1011 | |
1012 | // Put the TRD volumes into the space frame mother volumes | |
1013 | // if enabled via status flag | |
030b4415 | 1014 | xpos = 0.0; |
1015 | ypos = 0.0; | |
1016 | zpos = 0.0; | |
053767a4 | 1017 | for (Int_t isector = 0; isector < kNsector; isector++) { |
5f6f5c22 | 1018 | if (GetSMstatus(isector)) { |
053767a4 | 1019 | sprintf(cTagV,"BTRD%d",isector); |
1020 | switch (isector) { | |
e7014565 | 1021 | case 13: |
1022 | case 14: | |
1023 | case 15: | |
1024 | // Double carbon, w/o middle stack | |
1025 | gMC->Gspos("UTR3",1,cTagV,xpos,ypos,zpos,0,"ONLY"); | |
1026 | break; | |
1027 | case 11: | |
1028 | case 12: | |
1029 | // Double carbon, all stacks | |
1030 | gMC->Gspos("UTR2",1,cTagV,xpos,ypos,zpos,0,"ONLY"); | |
1031 | break; | |
1032 | default: | |
1033 | // Standard supermodule | |
1034 | gMC->Gspos("UTR1",1,cTagV,xpos,ypos,zpos,0,"ONLY"); | |
1035 | }; | |
bd0f8685 | 1036 | } |
1037 | } | |
1038 | ||
b640260a | 1039 | // Put the TRD volumes into the space frame mother volumes |
1040 | // if enabled via status flag | |
1041 | xpos = 0.0; | |
1042 | ypos = 0.5*fgkSlength + 0.5*fgkFlength; | |
1043 | zpos = 0.0; | |
053767a4 | 1044 | for (Int_t isector = 0; isector < kNsector; isector++) { |
5f6f5c22 | 1045 | if (GetSMstatus(isector)) { |
053767a4 | 1046 | sprintf(cTagV,"BTRD%d",isector); |
b640260a | 1047 | gMC->Gspos("UTF1",1,cTagV,xpos, ypos,zpos,0,"ONLY"); |
1048 | gMC->Gspos("UTF2",1,cTagV,xpos,-ypos,zpos,0,"ONLY"); | |
1049 | } | |
1050 | } | |
1051 | ||
bd0f8685 | 1052 | } |
1053 | ||
1054 | //_____________________________________________________________________________ | |
1055 | void AliTRDgeometry::CreateFrame(Int_t *idtmed) | |
1056 | { | |
1057 | // | |
1058 | // Create the geometry of the frame of the supermodule | |
1059 | // | |
1060 | // Names of the TRD services volumina | |
1061 | // | |
1062 | // USRL Support rails for the chambers (Al) | |
1063 | // USxx Support cross bars between the chambers (Al) | |
0a5f3331 | 1064 | // USHx Horizontal connection between the cross bars (Al) |
1065 | // USLx Long corner ledges (Al) | |
bd0f8685 | 1066 | // |
1067 | ||
053767a4 | 1068 | Int_t ilayer = 0; |
bd0f8685 | 1069 | |
1070 | Float_t xpos = 0.0; | |
1071 | Float_t ypos = 0.0; | |
1072 | Float_t zpos = 0.0; | |
1073 | ||
a3f8715e | 1074 | Char_t cTagV[100]; |
1075 | Char_t cTagM[100]; | |
0a5f3331 | 1076 | |
b640260a | 1077 | const Int_t kNparTRD = 4; |
1078 | Float_t parTRD[kNparTRD]; | |
1079 | const Int_t kNparBOX = 3; | |
1080 | Float_t parBOX[kNparBOX]; | |
1081 | const Int_t kNparTRP = 11; | |
1082 | Float_t parTRP[kNparTRP]; | |
1083 | ||
0a5f3331 | 1084 | // The rotation matrices |
7c0ec5ca | 1085 | const Int_t kNmatrix = 7; |
0a5f3331 | 1086 | Int_t matrix[kNmatrix]; |
1087 | gMC->Matrix(matrix[0], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0); | |
1088 | gMC->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0, 180.0); | |
1089 | gMC->Matrix(matrix[2], 90.0, 0.0, 0.0, 0.0, 90.0, 90.0); | |
1090 | gMC->Matrix(matrix[3], 90.0, 180.0, 0.0, 180.0, 90.0, 90.0); | |
b640260a | 1091 | gMC->Matrix(matrix[4], 170.0, 0.0, 80.0, 0.0, 90.0, 90.0); |
1092 | gMC->Matrix(matrix[5], 170.0, 180.0, 80.0, 180.0, 90.0, 90.0); | |
1093 | gMC->Matrix(matrix[6], 180.0, 180.0, 90.0, 180.0, 90.0, 90.0); | |
1094 | ||
1095 | // | |
1096 | // The carbon inserts in the top/bottom aluminum plates | |
1097 | // | |
1098 | ||
1099 | const Int_t kNparCrb = 3; | |
1100 | Float_t parCrb[kNparCrb]; | |
1101 | parCrb[0] = 0.0; | |
1102 | parCrb[1] = 0.0; | |
1103 | parCrb[2] = 0.0; | |
053a5ea0 | 1104 | gMC->Gsvolu("USCR","BOX ",idtmed[1326-1],parCrb,0); |
b640260a | 1105 | // Bottom 1 (all sectors) |
1106 | parCrb[0] = 77.49/2.0; | |
1107 | parCrb[1] = 104.60/2.0; | |
1108 | parCrb[2] = fgkSMpltT/2.0; | |
1109 | xpos = 0.0; | |
1110 | ypos = 0.0; | |
1111 | zpos = fgkSMpltT/2.0 - fgkSheight/2.0; | |
1112 | gMC->Gsposp("USCR", 1,"UTS1", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1113 | gMC->Gsposp("USCR", 2,"UTS2", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1114 | gMC->Gsposp("USCR", 3,"UTS3", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1115 | // Bottom 2 (all sectors) | |
1116 | parCrb[0] = 77.49/2.0; | |
1117 | parCrb[1] = 55.80/2.0; | |
1118 | parCrb[2] = fgkSMpltT/2.0; | |
1119 | xpos = 0.0; | |
1120 | ypos = 85.6; | |
1121 | zpos = fgkSMpltT/2.0 - fgkSheight/2.0; | |
1122 | gMC->Gsposp("USCR", 4,"UTS1", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1123 | gMC->Gsposp("USCR", 5,"UTS2", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1124 | gMC->Gsposp("USCR", 6,"UTS3", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1125 | gMC->Gsposp("USCR", 7,"UTS1", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1126 | gMC->Gsposp("USCR", 8,"UTS2", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1127 | gMC->Gsposp("USCR", 9,"UTS3", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1128 | // Bottom 3 (all sectors) | |
1129 | parCrb[0] = 77.49/2.0; | |
1130 | parCrb[1] = 56.00/2.0; | |
1131 | parCrb[2] = fgkSMpltT/2.0; | |
1132 | xpos = 0.0; | |
1133 | ypos = 148.5; | |
1134 | zpos = fgkSMpltT/2.0 - fgkSheight/2.0; | |
1135 | gMC->Gsposp("USCR",10,"UTS1", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1136 | gMC->Gsposp("USCR",11,"UTS2", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1137 | gMC->Gsposp("USCR",12,"UTS3", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1138 | gMC->Gsposp("USCR",13,"UTS1", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1139 | gMC->Gsposp("USCR",14,"UTS2", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1140 | gMC->Gsposp("USCR",15,"UTS3", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1141 | // Bottom 4 (all sectors) | |
1142 | parCrb[0] = 77.49/2.0; | |
1143 | parCrb[1] = 118.00/2.0; | |
1144 | parCrb[2] = fgkSMpltT/2.0; | |
1145 | xpos = 0.0; | |
1146 | ypos = 240.5; | |
1147 | zpos = fgkSMpltT/2.0 - fgkSheight/2.0; | |
1148 | gMC->Gsposp("USCR",16,"UTS1", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1149 | gMC->Gsposp("USCR",17,"UTS2", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1150 | gMC->Gsposp("USCR",18,"UTS3", xpos, ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1151 | gMC->Gsposp("USCR",19,"UTS1", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1152 | gMC->Gsposp("USCR",20,"UTS2", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1153 | gMC->Gsposp("USCR",21,"UTS3", xpos,-ypos, zpos,0,"ONLY",parCrb,kNparCrb); | |
1154 | // Top 1 (only in front of PHOS) | |
1155 | parCrb[0] = 111.48/2.0; | |
1156 | parCrb[1] = 105.00/2.0; | |
1157 | parCrb[2] = fgkSMpltT/2.0; | |
1158 | xpos = 0.0; | |
1159 | ypos = 0.0; | |
1160 | zpos = fgkSMpltT/2.0 - fgkSheight/2.0; | |
1161 | gMC->Gsposp("USCR",22,"UTS2", xpos, ypos,-zpos,0,"ONLY",parCrb,kNparCrb); | |
1162 | gMC->Gsposp("USCR",23,"UTS3", xpos, ypos,-zpos,0,"ONLY",parCrb,kNparCrb); | |
1163 | // Top 2 (only in front of PHOS) | |
1164 | parCrb[0] = 111.48/2.0; | |
1165 | parCrb[1] = 56.00/2.0; | |
1166 | parCrb[2] = fgkSMpltT/2.0; | |
1167 | xpos = 0.0; | |
1168 | ypos = 85.5; | |
1169 | zpos = fgkSMpltT/2.0 - fgkSheight/2.0; | |
1170 | gMC->Gsposp("USCR",24,"UTS2", xpos, ypos,-zpos,0,"ONLY",parCrb,kNparCrb); | |
1171 | gMC->Gsposp("USCR",25,"UTS3", xpos, ypos,-zpos,0,"ONLY",parCrb,kNparCrb); | |
1172 | gMC->Gsposp("USCR",26,"UTS2", xpos,-ypos,-zpos,0,"ONLY",parCrb,kNparCrb); | |
1173 | gMC->Gsposp("USCR",27,"UTS3", xpos,-ypos,-zpos,0,"ONLY",parCrb,kNparCrb); | |
bd0f8685 | 1174 | |
1175 | // | |
1176 | // The chamber support rails | |
1177 | // | |
1178 | ||
053a5ea0 | 1179 | const Float_t kSRLhgt = 2.00; |
1180 | const Float_t kSRLwidA = 2.3; | |
1181 | const Float_t kSRLwidB = 1.947; | |
1182 | const Float_t kSRLdst = 1.135; | |
1183 | const Int_t kNparSRL = 11; | |
bd0f8685 | 1184 | Float_t parSRL[kNparSRL]; |
053a5ea0 | 1185 | // Trapezoidal shape |
1186 | parSRL[ 0] = fgkSlength/2.0; | |
1187 | parSRL[ 1] = 0.0; | |
1188 | parSRL[ 2] = 0.0; | |
1189 | parSRL[ 3] = kSRLhgt /2.0; | |
1190 | parSRL[ 4] = kSRLwidB /2.0; | |
1191 | parSRL[ 5] = kSRLwidA /2.0; | |
1192 | parSRL[ 6] = 5.0; | |
1193 | parSRL[ 7] = kSRLhgt /2.0; | |
1194 | parSRL[ 8] = kSRLwidB /2.0; | |
1195 | parSRL[ 9] = kSRLwidA /2.0; | |
1196 | parSRL[10] = 5.0; | |
1197 | gMC->Gsvolu("USRL","TRAP",idtmed[1301-1],parSRL,kNparSRL); | |
bd0f8685 | 1198 | |
1199 | xpos = 0.0; | |
1200 | ypos = 0.0; | |
1201 | zpos = 0.0; | |
053a5ea0 | 1202 | for (ilayer = 1; ilayer < kNlayer; ilayer++) { |
1203 | xpos = fCwidth[ilayer]/2.0 + kSRLwidA/2.0 + kSRLdst; | |
bd0f8685 | 1204 | ypos = 0.0; |
053a5ea0 | 1205 | zpos = fgkVrocsm + fgkSMpltT - fgkCalZpos - fgkSheight/2.0 |
1206 | + fgkCraH + fgkCdrH - fgkCalH - kSRLhgt/2.0 | |
053767a4 | 1207 | + ilayer * (fgkCH + fgkVspace); |
053a5ea0 | 1208 | gMC->Gspos("USRL",ilayer+1 ,"UTI1", xpos,ypos,zpos,matrix[2],"ONLY"); |
1209 | gMC->Gspos("USRL",ilayer+1+ kNlayer,"UTI1",-xpos,ypos,zpos,matrix[3],"ONLY"); | |
1210 | gMC->Gspos("USRL",ilayer+1+2*kNlayer,"UTI2", xpos,ypos,zpos,matrix[2],"ONLY"); | |
1211 | gMC->Gspos("USRL",ilayer+1+3*kNlayer,"UTI2",-xpos,ypos,zpos,matrix[3],"ONLY"); | |
1212 | gMC->Gspos("USRL",ilayer+1+4*kNlayer,"UTI3", xpos,ypos,zpos,matrix[2],"ONLY"); | |
1213 | gMC->Gspos("USRL",ilayer+1+5*kNlayer,"UTI3",-xpos,ypos,zpos,matrix[3],"ONLY"); | |
bd0f8685 | 1214 | } |
1215 | ||
1216 | // | |
1217 | // The cross bars between the chambers | |
1218 | // | |
1219 | ||
1220 | const Float_t kSCBwid = 1.0; | |
0a5f3331 | 1221 | const Float_t kSCBthk = 2.0; |
1222 | const Float_t kSCHhgt = 0.3; | |
1223 | ||
bd0f8685 | 1224 | const Int_t kNparSCB = 3; |
1225 | Float_t parSCB[kNparSCB]; | |
030b4415 | 1226 | parSCB[1] = kSCBwid/2.0; |
0a5f3331 | 1227 | parSCB[2] = fgkCH /2.0 + fgkVspace/2.0 - kSCHhgt; |
1228 | ||
1229 | const Int_t kNparSCI = 3; | |
1230 | Float_t parSCI[kNparSCI]; | |
1231 | parSCI[1] = -1; | |
bd0f8685 | 1232 | |
1233 | xpos = 0.0; | |
1234 | ypos = 0.0; | |
1235 | zpos = 0.0; | |
053767a4 | 1236 | for (ilayer = 0; ilayer < kNlayer; ilayer++) { |
bd0f8685 | 1237 | |
0a5f3331 | 1238 | // The aluminum of the cross bars |
053767a4 | 1239 | parSCB[0] = fCwidth[ilayer]/2.0 + kSRLdst/2.0; |
1240 | sprintf(cTagV,"USF%01d",ilayer); | |
bd0f8685 | 1241 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCB,kNparSCB); |
bd0f8685 | 1242 | |
0a5f3331 | 1243 | // The empty regions in the cross bars |
1244 | Float_t thkSCB = kSCBthk; | |
053767a4 | 1245 | if (ilayer < 2) { |
0a5f3331 | 1246 | thkSCB *= 1.5; |
1247 | } | |
1248 | parSCI[2] = parSCB[2] - thkSCB; | |
1249 | parSCI[0] = parSCB[0]/4.0 - kSCBthk; | |
053767a4 | 1250 | sprintf(cTagV,"USI%01d",ilayer); |
0a5f3331 | 1251 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1302-1],parSCI,kNparSCI); |
bd0f8685 | 1252 | |
053767a4 | 1253 | sprintf(cTagV,"USI%01d",ilayer); |
1254 | sprintf(cTagM,"USF%01d",ilayer); | |
0a5f3331 | 1255 | ypos = 0.0; |
1256 | zpos = 0.0; | |
1257 | xpos = parSCI[0] + thkSCB/2.0; | |
1258 | gMC->Gspos(cTagV,1,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
1259 | xpos = - parSCI[0] - thkSCB/2.0; | |
1260 | gMC->Gspos(cTagV,2,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
1261 | xpos = 3.0 * parSCI[0] + 1.5 * thkSCB; | |
1262 | gMC->Gspos(cTagV,3,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
1263 | xpos = - 3.0 * parSCI[0] - 1.5 * thkSCB; | |
1264 | gMC->Gspos(cTagV,4,cTagM,xpos,ypos,zpos,0,"ONLY"); | |
1265 | ||
053767a4 | 1266 | sprintf(cTagV,"USF%01d",ilayer); |
bd0f8685 | 1267 | xpos = 0.0; |
0a5f3331 | 1268 | zpos = fgkVrocsm + fgkSMpltT + parSCB[2] - fgkSheight/2.0 |
053767a4 | 1269 | + ilayer * (fgkCH + fgkVspace); |
0a5f3331 | 1270 | |
053767a4 | 1271 | ypos = fClength[ilayer][2]/2.0 + fClength[ilayer][1]; |
b640260a | 1272 | gMC->Gspos(cTagV, 1,"UTI1", xpos,ypos,zpos,0,"ONLY"); |
1273 | gMC->Gspos(cTagV, 3,"UTI2", xpos,ypos,zpos,0,"ONLY"); | |
1274 | gMC->Gspos(cTagV, 5,"UTI3", xpos,ypos,zpos,0,"ONLY"); | |
bd0f8685 | 1275 | |
053767a4 | 1276 | ypos = - fClength[ilayer][2]/2.0 - fClength[ilayer][1]; |
b640260a | 1277 | gMC->Gspos(cTagV, 2,"UTI1", xpos,ypos,zpos,0,"ONLY"); |
1278 | gMC->Gspos(cTagV, 4,"UTI2", xpos,ypos,zpos,0,"ONLY"); | |
1279 | gMC->Gspos(cTagV, 6,"UTI3", xpos,ypos,zpos,0,"ONLY"); | |
0a5f3331 | 1280 | |
1281 | } | |
1282 | ||
1283 | // | |
1284 | // The horizontal connections between the cross bars | |
1285 | // | |
1286 | ||
1287 | const Int_t kNparSCH = 3; | |
1288 | Float_t parSCH[kNparSCH]; | |
1289 | ||
053767a4 | 1290 | for (ilayer = 1; ilayer < kNlayer-1; ilayer++) { |
0a5f3331 | 1291 | |
053767a4 | 1292 | parSCH[0] = fCwidth[ilayer]/2.0; |
1293 | parSCH[1] = (fClength[ilayer+1][2]/2.0 + fClength[ilayer+1][1] | |
1294 | - fClength[ilayer ][2]/2.0 - fClength[ilayer ][1])/2.0; | |
0a5f3331 | 1295 | parSCH[2] = kSCHhgt/2.0; |
1296 | ||
053767a4 | 1297 | sprintf(cTagV,"USH%01d",ilayer); |
0a5f3331 | 1298 | gMC->Gsvolu(cTagV,"BOX ",idtmed[1301-1],parSCH,kNparSCH); |
bd0f8685 | 1299 | xpos = 0.0; |
053767a4 | 1300 | ypos = fClength[ilayer][2]/2.0 + fClength[ilayer][1] + parSCH[1]; |
0a5f3331 | 1301 | zpos = fgkVrocsm + fgkSMpltT - kSCHhgt/2.0 - fgkSheight/2.0 |
053767a4 | 1302 | + (ilayer+1) * (fgkCH + fgkVspace); |
bd0f8685 | 1303 | gMC->Gspos(cTagV,1,"UTI1", xpos,ypos,zpos,0,"ONLY"); |
b640260a | 1304 | gMC->Gspos(cTagV,3,"UTI2", xpos,ypos,zpos,0,"ONLY"); |
1305 | gMC->Gspos(cTagV,5,"UTI3", xpos,ypos,zpos,0,"ONLY"); | |
0a5f3331 | 1306 | ypos = -ypos; |
1307 | gMC->Gspos(cTagV,2,"UTI1", xpos,ypos,zpos,0,"ONLY"); | |
b640260a | 1308 | gMC->Gspos(cTagV,4,"UTI2", xpos,ypos,zpos,0,"ONLY"); |
1309 | gMC->Gspos(cTagV,6,"UTI3", xpos,ypos,zpos,0,"ONLY"); | |
bd0f8685 | 1310 | |
1311 | } | |
1312 | ||
b640260a | 1313 | // |
1314 | // The aymmetric flat frame in the middle | |
1315 | // | |
1316 | ||
1317 | // The envelope volume (aluminum) | |
1318 | parTRD[0] = 87.60/2.0; | |
1319 | parTRD[1] = 114.00/2.0; | |
1320 | parTRD[2] = 1.20/2.0; | |
1321 | parTRD[3] = 71.30/2.0; | |
1322 | gMC->Gsvolu("USDB","TRD1",idtmed[1301-1],parTRD,kNparTRD); | |
1323 | // Empty spaces (air) | |
1324 | parTRP[ 0] = 1.20/2.0; | |
1325 | parTRP[ 1] = 0.0; | |
1326 | parTRP[ 2] = 0.0; | |
1327 | parTRP[ 3] = 27.00/2.0; | |
1328 | parTRP[ 4] = 50.60/2.0; | |
1329 | parTRP[ 5] = 5.00/2.0; | |
1330 | parTRP[ 6] = 3.5; | |
1331 | parTRP[ 7] = 27.00/2.0; | |
1332 | parTRP[ 8] = 50.60/2.0; | |
1333 | parTRP[ 9] = 5.00/2.0; | |
1334 | parTRP[10] = 3.5; | |
1335 | gMC->Gsvolu("USD1","TRAP",idtmed[1302-1],parTRP,kNparTRP); | |
1336 | xpos = 18.0; | |
1337 | ypos = 0.0; | |
1338 | zpos = 27.00/2.0 - 71.3/2.0; | |
1339 | gMC->Gspos("USD1",1,"USDB", xpos, ypos, zpos,matrix[2],"ONLY"); | |
1340 | // Empty spaces (air) | |
1341 | parTRP[ 0] = 1.20/2.0; | |
1342 | parTRP[ 1] = 0.0; | |
1343 | parTRP[ 2] = 0.0; | |
1344 | parTRP[ 3] = 33.00/2.0; | |
1345 | parTRP[ 4] = 5.00/2.0; | |
1346 | parTRP[ 5] = 62.10/2.0; | |
1347 | parTRP[ 6] = 3.5; | |
1348 | parTRP[ 7] = 33.00/2.0; | |
1349 | parTRP[ 8] = 5.00/2.0; | |
1350 | parTRP[ 9] = 62.10/2.0; | |
1351 | parTRP[10] = 3.5; | |
1352 | gMC->Gsvolu("USD2","TRAP",idtmed[1302-1],parTRP,kNparTRP); | |
1353 | xpos = 21.0; | |
1354 | ypos = 0.0; | |
1355 | zpos = 71.3/2.0 - 33.0/2.0; | |
1356 | gMC->Gspos("USD2",1,"USDB", xpos, ypos, zpos,matrix[2],"ONLY"); | |
1357 | // Empty spaces (air) | |
1358 | parBOX[ 0] = 22.50/2.0; | |
1359 | parBOX[ 1] = 1.20/2.0; | |
1360 | parBOX[ 2] = 70.50/2.0; | |
1361 | gMC->Gsvolu("USD3","BOX ",idtmed[1302-1],parBOX,kNparBOX); | |
1362 | xpos = -25.75; | |
1363 | ypos = 0.0; | |
1364 | zpos = 0.4; | |
1365 | gMC->Gspos("USD3",1,"USDB", xpos, ypos, zpos, 0,"ONLY"); | |
1366 | // Empty spaces (air) | |
1367 | parTRP[ 0] = 1.20/2.0; | |
1368 | parTRP[ 1] = 0.0; | |
1369 | parTRP[ 2] = 0.0; | |
1370 | parTRP[ 3] = 25.50/2.0; | |
1371 | parTRP[ 4] = 5.00/2.0; | |
1372 | parTRP[ 5] = 65.00/2.0; | |
1373 | parTRP[ 6] = -1.0; | |
1374 | parTRP[ 7] = 25.50/2.0; | |
1375 | parTRP[ 8] = 5.00/2.0; | |
1376 | parTRP[ 9] = 65.00/2.0; | |
1377 | parTRP[10] = -1.0; | |
1378 | gMC->Gsvolu("USD4","TRAP",idtmed[1302-1],parTRP,kNparTRP); | |
1379 | xpos = 2.0; | |
1380 | ypos = 0.0; | |
1381 | zpos = -1.6; | |
1382 | gMC->Gspos("USD4",1,"USDB", xpos, ypos, zpos,matrix[6],"ONLY"); | |
1383 | // Empty spaces (air) | |
1384 | parTRP[ 0] = 1.20/2.0; | |
1385 | parTRP[ 1] = 0.0; | |
1386 | parTRP[ 2] = 0.0; | |
1387 | parTRP[ 3] = 23.50/2.0; | |
1388 | parTRP[ 4] = 63.50/2.0; | |
1389 | parTRP[ 5] = 5.00/2.0; | |
1390 | parTRP[ 6] = 16.0; | |
1391 | parTRP[ 7] = 23.50/2.0; | |
1392 | parTRP[ 8] = 63.50/2.0; | |
1393 | parTRP[ 9] = 5.00/2.0; | |
1394 | parTRP[10] = 16.0; | |
1395 | gMC->Gsvolu("USD5","TRAP",idtmed[1302-1],parTRP,kNparTRP); | |
1396 | xpos = 36.5; | |
1397 | ypos = 0.0; | |
1398 | zpos = -1.5; | |
1399 | gMC->Gspos("USD5",1,"USDB", xpos, ypos, zpos,matrix[5],"ONLY"); | |
1400 | // Empty spaces (air) | |
1401 | parTRP[ 0] = 1.20/2.0; | |
1402 | parTRP[ 1] = 0.0; | |
1403 | parTRP[ 2] = 0.0; | |
1404 | parTRP[ 3] = 70.50/2.0; | |
1405 | parTRP[ 4] = 4.50/2.0; | |
1406 | parTRP[ 5] = 16.50/2.0; | |
1407 | parTRP[ 6] = -5.0; | |
1408 | parTRP[ 7] = 70.50/2.0; | |
1409 | parTRP[ 8] = 4.50/2.0; | |
1410 | parTRP[ 9] = 16.50/2.0; | |
1411 | parTRP[10] = -5.0; | |
1412 | gMC->Gsvolu("USD6","TRAP",idtmed[1302-1],parTRP,kNparTRP); | |
1413 | xpos = -43.7; | |
1414 | ypos = 0.0; | |
1415 | zpos = 0.4; | |
1416 | gMC->Gspos("USD6",1,"USDB", xpos, ypos, zpos,matrix[2],"ONLY"); | |
1417 | xpos = 0.0; | |
1418 | ypos = fClength[5][2]/2.0; | |
1e9dad22 | 1419 | zpos = 0.04; |
b640260a | 1420 | gMC->Gspos("USDB",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); |
1421 | gMC->Gspos("USDB",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); | |
1422 | gMC->Gspos("USDB",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); | |
1423 | gMC->Gspos("USDB",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); | |
1424 | gMC->Gspos("USDB",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); | |
1425 | gMC->Gspos("USDB",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); | |
1426 | // Upper bar (aluminum) | |
1427 | parBOX[0] = 95.00/2.0; | |
1428 | parBOX[1] = 1.20/2.0; | |
1429 | parBOX[2] = 3.00/2.0; | |
1430 | gMC->Gsvolu("USD7","BOX ",idtmed[1301-1],parBOX,kNparBOX); | |
1431 | xpos = 0.0; | |
1432 | ypos = fClength[5][2]/2.0; | |
83dd8891 | 1433 | zpos = fgkSheight/2.0 - fgkSMpltT - 3.00/2.0; |
b640260a | 1434 | gMC->Gspos("USD7",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); |
1435 | gMC->Gspos("USD7",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); | |
1436 | gMC->Gspos("USD7",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); | |
1437 | gMC->Gspos("USD7",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); | |
1438 | gMC->Gspos("USD7",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); | |
1439 | gMC->Gspos("USD7",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); | |
1440 | // Lower bar (aluminum) | |
1441 | parBOX[0] = 90.22/2.0; | |
1442 | parBOX[1] = 1.20/2.0; | |
9e020f1e | 1443 | parBOX[2] = 1.74/2.0; |
b640260a | 1444 | gMC->Gsvolu("USD8","BOX ",idtmed[1301-1],parBOX,kNparBOX); |
1445 | xpos = 0.0; | |
9e020f1e | 1446 | ypos = fClength[5][2]/2.0 - 0.1; |
1447 | zpos = -fgkSheight/2.0 + fgkSMpltT + 2.27; | |
b640260a | 1448 | gMC->Gspos("USD8",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); |
1449 | gMC->Gspos("USD8",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); | |
1450 | gMC->Gspos("USD8",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); | |
1451 | gMC->Gspos("USD8",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); | |
1452 | gMC->Gspos("USD8",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); | |
1453 | gMC->Gspos("USD8",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); | |
1454 | // Lower bar (aluminum) | |
1455 | parBOX[0] = 82.60/2.0; | |
1456 | parBOX[1] = 1.20/2.0; | |
1457 | parBOX[2] = 1.40/2.0; | |
1458 | gMC->Gsvolu("USD9","BOX ",idtmed[1301-1],parBOX,kNparBOX); | |
1459 | xpos = 0.0; | |
1460 | ypos = fClength[5][2]/2.0; | |
83dd8891 | 1461 | zpos = -fgkSheight/2.0 + fgkSMpltT + 1.40/2.0; |
b640260a | 1462 | gMC->Gspos("USD9",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); |
1463 | gMC->Gspos("USD9",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); | |
1464 | gMC->Gspos("USD9",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); | |
1465 | gMC->Gspos("USD9",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); | |
1466 | gMC->Gspos("USD9",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); | |
1467 | gMC->Gspos("USD9",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); | |
1468 | // Front sheet (aluminum) | |
1469 | parTRP[ 0] = 0.10/2.0; | |
1470 | parTRP[ 1] = 0.0; | |
1471 | parTRP[ 2] = 0.0; | |
1472 | parTRP[ 3] = 74.50/2.0; | |
1473 | parTRP[ 4] = 31.70/2.0; | |
1474 | parTRP[ 5] = 44.00/2.0; | |
1475 | parTRP[ 6] = -5.0; | |
1476 | parTRP[ 7] = 74.50/2.0; | |
1477 | parTRP[ 8] = 31.70/2.0; | |
1478 | parTRP[ 9] = 44.00/2.0; | |
1479 | parTRP[10] = -5.0; | |
1480 | gMC->Gsvolu("USDF","TRAP",idtmed[1302-1],parTRP,kNparTRP); | |
1481 | xpos = -32.0; | |
1482 | ypos = fClength[5][2]/2.0 + 1.20/2.0 + 0.10/2.0; | |
1483 | zpos = 0.0; | |
1484 | gMC->Gspos("USDF",1,"UTI1", xpos, ypos, zpos,matrix[2],"ONLY"); | |
1485 | gMC->Gspos("USDF",2,"UTI1", xpos,-ypos, zpos,matrix[2],"ONLY"); | |
1486 | gMC->Gspos("USDF",3,"UTI2", xpos, ypos, zpos,matrix[2],"ONLY"); | |
1487 | gMC->Gspos("USDF",4,"UTI2", xpos,-ypos, zpos,matrix[2],"ONLY"); | |
1488 | gMC->Gspos("USDF",5,"UTI3", xpos, ypos, zpos,matrix[2],"ONLY"); | |
1489 | gMC->Gspos("USDF",6,"UTI3", xpos,-ypos, zpos,matrix[2],"ONLY"); | |
1490 | ||
1491 | // | |
1492 | // The flat frame in front of the chambers | |
1493 | // | |
1494 | ||
1495 | // The envelope volume (aluminum) | |
24eb93fd | 1496 | parTRD[0] = 90.00/2.0 - 0.1; |
1497 | parTRD[1] = 114.00/2.0 - 0.1; | |
b640260a | 1498 | parTRD[2] = 1.50/2.0; |
1499 | parTRD[3] = 70.30/2.0; | |
1500 | gMC->Gsvolu("USCB","TRD1",idtmed[1301-1],parTRD,kNparTRD); | |
1501 | // Empty spaces (air) | |
1502 | parTRD[0] = 87.00/2.0; | |
1503 | parTRD[1] = 10.00/2.0; | |
1504 | parTRD[2] = 1.50/2.0; | |
1505 | parTRD[3] = 26.35/2.0; | |
1506 | gMC->Gsvolu("USC1","TRD1",idtmed[1302-1],parTRD,kNparTRD); | |
1507 | xpos = 0.0; | |
1508 | ypos = 0.0; | |
1509 | zpos = 26.35/2.0 - 70.3/2.0; | |
1510 | gMC->Gspos("USC1",1,"USCB",xpos,ypos,zpos,0,"ONLY"); | |
1511 | // Empty spaces (air) | |
1512 | parTRD[0] = 10.00/2.0; | |
1513 | parTRD[1] = 111.00/2.0; | |
1514 | parTRD[2] = 1.50/2.0; | |
1515 | parTRD[3] = 35.05/2.0; | |
1516 | gMC->Gsvolu("USC2","TRD1",idtmed[1302-1],parTRD,kNparTRD); | |
1517 | xpos = 0.0; | |
1518 | ypos = 0.0; | |
1519 | zpos = 70.3/2.0 - 35.05/2.0; | |
1520 | gMC->Gspos("USC2",1,"USCB",xpos,ypos,zpos,0,"ONLY"); | |
1521 | // Empty spaces (air) | |
1522 | parTRP[ 0] = 1.50/2.0; | |
1523 | parTRP[ 1] = 0.0; | |
1524 | parTRP[ 2] = 0.0; | |
1525 | parTRP[ 3] = 37.60/2.0; | |
1526 | parTRP[ 4] = 63.90/2.0; | |
1527 | parTRP[ 5] = 8.86/2.0; | |
1528 | parTRP[ 6] = 16.0; | |
1529 | parTRP[ 7] = 37.60/2.0; | |
1530 | parTRP[ 8] = 63.90/2.0; | |
1531 | parTRP[ 9] = 8.86/2.0; | |
1532 | parTRP[10] = 16.0; | |
1533 | gMC->Gsvolu("USC3","TRAP",idtmed[1302-1],parTRP,kNparTRP); | |
1534 | xpos = -30.5; | |
1535 | ypos = 0.0; | |
1536 | zpos = -2.0; | |
1537 | gMC->Gspos("USC3",1,"USCB", xpos, ypos, zpos,matrix[4],"ONLY"); | |
1538 | gMC->Gspos("USC3",2,"USCB",-xpos, ypos, zpos,matrix[5],"ONLY"); | |
1539 | xpos = 0.0; | |
1540 | ypos = fClength[5][2]/2.0 + fClength[5][1] + fClength[5][0]; | |
1541 | zpos = 0.0; | |
1542 | gMC->Gspos("USCB",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); | |
1543 | gMC->Gspos("USCB",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); | |
1544 | gMC->Gspos("USCB",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); | |
1545 | gMC->Gspos("USCB",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); | |
1546 | gMC->Gspos("USCB",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); | |
1547 | gMC->Gspos("USCB",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); | |
1548 | // Upper bar (aluminum) | |
1549 | parBOX[0] = 95.00/2.0; | |
1550 | parBOX[1] = 1.50/2.0; | |
1551 | parBOX[2] = 3.00/2.0; | |
1552 | gMC->Gsvolu("USC4","BOX ",idtmed[1301-1],parBOX,kNparBOX); | |
1553 | xpos = 0.0; | |
1554 | ypos = fClength[5][2]/2.0 + fClength[5][1] + fClength[5][0]; | |
83dd8891 | 1555 | zpos = fgkSheight/2.0 - fgkSMpltT - 3.00/2.0; |
b640260a | 1556 | gMC->Gspos("USC4",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); |
1557 | gMC->Gspos("USC4",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); | |
1558 | gMC->Gspos("USC4",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); | |
1559 | gMC->Gspos("USC4",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); | |
1560 | gMC->Gspos("USC4",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); | |
1561 | gMC->Gspos("USC4",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); | |
1562 | // Lower bar (aluminum) | |
1563 | parBOX[0] = 90.22/2.0; | |
1564 | parBOX[1] = 1.50/2.0; | |
9e020f1e | 1565 | parBOX[2] = 2.00/2.0; |
b640260a | 1566 | gMC->Gsvolu("USC5","BOX ",idtmed[1301-1],parBOX,kNparBOX); |
1567 | xpos = 0.0; | |
1568 | ypos = fClength[5][2]/2.0 + fClength[5][1] + fClength[5][0]; | |
9e020f1e | 1569 | zpos = -fgkSheight/2.0 + fgkSMpltT + 2.60; |
b640260a | 1570 | gMC->Gspos("USC5",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); |
1571 | gMC->Gspos("USC5",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); | |
1572 | gMC->Gspos("USC5",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); | |
1573 | gMC->Gspos("USC5",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); | |
1574 | gMC->Gspos("USC5",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); | |
1575 | gMC->Gspos("USC5",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); | |
1576 | // Lower bar (aluminum) | |
1577 | parBOX[0] = 82.60/2.0; | |
1578 | parBOX[1] = 1.50/2.0; | |
1579 | parBOX[2] = 1.60/2.0; | |
1580 | gMC->Gsvolu("USC6","BOX ",idtmed[1301-1],parBOX,kNparBOX); | |
1581 | xpos = 0.0; | |
1582 | ypos = fClength[5][2]/2.0 + fClength[5][1] + fClength[5][0]; | |
83dd8891 | 1583 | zpos = -fgkSheight/2.0 + fgkSMpltT + 1.60/2.0; |
b640260a | 1584 | gMC->Gspos("USC6",1,"UTI1", xpos, ypos, zpos, 0,"ONLY"); |
1585 | gMC->Gspos("USC6",2,"UTI1", xpos,-ypos, zpos, 0,"ONLY"); | |
1586 | gMC->Gspos("USC6",3,"UTI2", xpos, ypos, zpos, 0,"ONLY"); | |
1587 | gMC->Gspos("USC6",4,"UTI2", xpos,-ypos, zpos, 0,"ONLY"); | |
1588 | gMC->Gspos("USC6",5,"UTI3", xpos, ypos, zpos, 0,"ONLY"); | |
1589 | gMC->Gspos("USC6",6,"UTI3", xpos,-ypos, zpos, 0,"ONLY"); | |
1590 | ||
0a5f3331 | 1591 | // |
1592 | // The long corner ledges | |
1593 | // | |
1594 | ||
1595 | const Int_t kNparSCL = 3; | |
1596 | Float_t parSCL[kNparSCL]; | |
1597 | const Int_t kNparSCLb = 11; | |
1598 | Float_t parSCLb[kNparSCLb]; | |
1599 | ||
1600 | // Upper ledges | |
1601 | // Thickness of the corner ledges | |
1602 | const Float_t kSCLthkUa = 0.6; | |
1603 | const Float_t kSCLthkUb = 0.6; | |
1604 | // Width of the corner ledges | |
1605 | const Float_t kSCLwidUa = 3.2; | |
1606 | const Float_t kSCLwidUb = 4.8; | |
1607 | // Position of the corner ledges | |
1608 | const Float_t kSCLposxUa = 0.7; | |
1609 | const Float_t kSCLposxUb = 3.3; | |
dc9d308d | 1610 | const Float_t kSCLposzUa = 1.65; |
0a5f3331 | 1611 | const Float_t kSCLposzUb = 0.3; |
1612 | // Vertical | |
1613 | parSCL[0] = kSCLthkUa /2.0; | |
1614 | parSCL[1] = fgkSlength/2.0; | |
1615 | parSCL[2] = kSCLwidUa /2.0; | |
1616 | gMC->Gsvolu("USL1","BOX ",idtmed[1301-1],parSCL,kNparSCL); | |
1617 | xpos = fgkSwidth2/2.0 - fgkSMpltT - kSCLposxUa; | |
1618 | ypos = 0.0; | |
1619 | zpos = fgkSheight/2.0 - fgkSMpltT - kSCLposzUa; | |
1620 | gMC->Gspos("USL1",1,"UTI1", xpos,ypos,zpos,matrix[0],"ONLY"); | |
1621 | xpos = -xpos; | |
1622 | gMC->Gspos("USL1",2,"UTI1", xpos,ypos,zpos,matrix[1],"ONLY"); | |
1623 | // Horizontal | |
1624 | parSCL[0] = kSCLwidUb /2.0; | |
1625 | parSCL[1] = fgkSlength/2.0; | |
1626 | parSCL[2] = kSCLthkUb /2.0; | |
1627 | gMC->Gsvolu("USL2","BOX ",idtmed[1301-1],parSCL,kNparSCL); | |
1628 | xpos = fgkSwidth2/2.0 - fgkSMpltT - kSCLposxUb; | |
1629 | ypos = 0.0; | |
1630 | zpos = fgkSheight/2.0 - fgkSMpltT - kSCLposzUb; | |
1631 | gMC->Gspos("USL2",1,"UTI1", xpos,ypos,zpos, 0,"ONLY"); | |
b640260a | 1632 | gMC->Gspos("USL2",3,"UTI2", xpos,ypos,zpos, 0,"ONLY"); |
1633 | gMC->Gspos("USL2",5,"UTI3", xpos,ypos,zpos, 0,"ONLY"); | |
0a5f3331 | 1634 | xpos = -xpos; |
1635 | gMC->Gspos("USL2",2,"UTI1", xpos,ypos,zpos, 0,"ONLY"); | |
b640260a | 1636 | gMC->Gspos("USL2",4,"UTI2", xpos,ypos,zpos, 0,"ONLY"); |
1637 | gMC->Gspos("USL2",6,"UTI3", xpos,ypos,zpos, 0,"ONLY"); | |
0a5f3331 | 1638 | |
1639 | // Lower ledges | |
1640 | // Thickness of the corner ledges | |
1641 | const Float_t kSCLthkLa = 2.464; | |
1642 | const Float_t kSCLthkLb = 1.0; | |
1643 | // Width of the corner ledges | |
053a5ea0 | 1644 | const Float_t kSCLwidLa = 8.3; |
1645 | const Float_t kSCLwidLb = 4.0; | |
0a5f3331 | 1646 | // Position of the corner ledges |
053a5ea0 | 1647 | const Float_t kSCLposxLa = (3.0 * kSCLthkLb - kSCLthkLa) / 4.0 + 0.05; |
1648 | const Float_t kSCLposxLb = kSCLthkLb + kSCLwidLb/2.0 + 0.05; | |
1649 | const Float_t kSCLposzLa = kSCLwidLa/2.0; | |
1650 | const Float_t kSCLposzLb = kSCLthkLb/2.0; | |
0a5f3331 | 1651 | // Vertical |
1652 | // Trapezoidal shape | |
1653 | parSCLb[ 0] = fgkSlength/2.0; | |
1654 | parSCLb[ 1] = 0.0; | |
1655 | parSCLb[ 2] = 0.0; | |
1656 | parSCLb[ 3] = kSCLwidLa /2.0; | |
1657 | parSCLb[ 4] = kSCLthkLb /2.0; | |
1658 | parSCLb[ 5] = kSCLthkLa /2.0; | |
1659 | parSCLb[ 6] = 5.0; | |
1660 | parSCLb[ 7] = kSCLwidLa /2.0; | |
1661 | parSCLb[ 8] = kSCLthkLb /2.0; | |
1662 | parSCLb[ 9] = kSCLthkLa /2.0; | |
1663 | parSCLb[10] = 5.0; | |
1664 | gMC->Gsvolu("USL3","TRAP",idtmed[1301-1],parSCLb,kNparSCLb); | |
1665 | xpos = fgkSwidth1/2.0 - fgkSMpltT - kSCLposxLa; | |
1666 | ypos = 0.0; | |
053a5ea0 | 1667 | zpos = - fgkSheight/2.0 + fgkSMpltT + kSCLposzLa; |
0a5f3331 | 1668 | gMC->Gspos("USL3",1,"UTI1", xpos,ypos,zpos,matrix[2],"ONLY"); |
b640260a | 1669 | gMC->Gspos("USL3",3,"UTI2", xpos,ypos,zpos,matrix[2],"ONLY"); |
1670 | gMC->Gspos("USL3",5,"UTI3", xpos,ypos,zpos,matrix[2],"ONLY"); | |
0a5f3331 | 1671 | xpos = -xpos; |
1672 | gMC->Gspos("USL3",2,"UTI1", xpos,ypos,zpos,matrix[3],"ONLY"); | |
b640260a | 1673 | gMC->Gspos("USL3",4,"UTI2", xpos,ypos,zpos,matrix[3],"ONLY"); |
1674 | gMC->Gspos("USL3",6,"UTI3", xpos,ypos,zpos,matrix[3],"ONLY"); | |
053a5ea0 | 1675 | // Horizontal part |
0a5f3331 | 1676 | parSCL[0] = kSCLwidLb /2.0; |
1677 | parSCL[1] = fgkSlength/2.0; | |
1678 | parSCL[2] = kSCLthkLb /2.0; | |
1679 | gMC->Gsvolu("USL4","BOX ",idtmed[1301-1],parSCL,kNparSCL); | |
1680 | xpos = fgkSwidth1/2.0 - fgkSMpltT - kSCLposxLb; | |
1681 | ypos = 0.0; | |
053a5ea0 | 1682 | zpos = - fgkSheight/2.0 + fgkSMpltT + kSCLposzLb; |
0a5f3331 | 1683 | gMC->Gspos("USL4",1,"UTI1", xpos,ypos,zpos, 0,"ONLY"); |
b640260a | 1684 | gMC->Gspos("USL4",3,"UTI2", xpos,ypos,zpos, 0,"ONLY"); |
1685 | gMC->Gspos("USL4",5,"UTI3", xpos,ypos,zpos, 0,"ONLY"); | |
0a5f3331 | 1686 | xpos = -xpos; |
1687 | gMC->Gspos("USL4",2,"UTI1", xpos,ypos,zpos, 0,"ONLY"); | |
b640260a | 1688 | gMC->Gspos("USL4",4,"UTI2", xpos,ypos,zpos, 0,"ONLY"); |
1689 | gMC->Gspos("USL4",6,"UTI3", xpos,ypos,zpos, 0,"ONLY"); | |
1690 | ||
1691 | // | |
1692 | // Aluminum plates in the front part of the super modules | |
1693 | // | |
1694 | ||
1695 | const Int_t kNparTrd = 4; | |
1696 | Float_t parTrd[kNparTrd]; | |
1697 | parTrd[0] = fgkSwidth1/2.0 - 2.5; | |
1698 | parTrd[1] = fgkSwidth2/2.0 - 2.5; | |
1699 | parTrd[2] = fgkSMpltT /2.0; | |
1700 | parTrd[3] = fgkSheight/2.0 - 1.0; | |
1701 | gMC->Gsvolu("UTA1","TRD1",idtmed[1301-1],parTrd,kNparTrd); | |
1702 | xpos = 0.0; | |
1703 | ypos = fgkSMpltT/2.0 - fgkFlength/2.0; | |
1704 | zpos = -0.5; | |
1705 | gMC->Gspos("UTA1",1,"UTF1",xpos, ypos,zpos, 0,"ONLY"); | |
1706 | gMC->Gspos("UTA1",2,"UTF2",xpos,-ypos,zpos, 0,"ONLY"); | |
1707 | ||
1708 | const Int_t kNparPlt = 3; | |
1709 | Float_t parPlt[kNparPlt]; | |
1710 | parPlt[0] = 0.0; | |
1711 | parPlt[1] = 0.0; | |
1712 | parPlt[2] = 0.0; | |
1713 | gMC->Gsvolu("UTA2","BOX ",idtmed[1301-1],parPlt,0); | |
1714 | xpos = 0.0; | |
1715 | ypos = 0.0; | |
1716 | zpos = fgkSheight/2.0 - fgkSMpltT/2.0; | |
dc9d308d | 1717 | parPlt[0] = fgkSwidth2/2.0 - 0.2; |
b640260a | 1718 | parPlt[1] = fgkFlength/2.0; |
1719 | parPlt[2] = fgkSMpltT /2.0; | |
1720 | gMC->Gsposp("UTA2",1,"UTF2",xpos,ypos,zpos | |
1721 | , 0,"ONLY",parPlt,kNparPlt); | |
babcf76e | 1722 | xpos = (fgkSwidth1 + fgkSwidth2)/4.0 - fgkSMpltT/2.0 - 0.0016; |
b640260a | 1723 | ypos = 0.0; |
1724 | zpos = 0.0; | |
1725 | parPlt[0] = fgkSMpltT /2.0; | |
1726 | parPlt[1] = fgkFlength/2.0; | |
1727 | parPlt[2] = fgkSheight/2.0; | |
1728 | gMC->Gsposp("UTA2",2,"UTF2", xpos,ypos,zpos | |
1729 | ,matrix[0],"ONLY",parPlt,kNparPlt); | |
1730 | gMC->Gsposp("UTA2",3,"UTF2",-xpos,ypos,zpos | |
1731 | ,matrix[1],"ONLY",parPlt,kNparPlt); | |
0a5f3331 | 1732 | |
9bf8c575 | 1733 | // Additional aluminum bar |
1734 | parBOX[0] = 80.0/2.0; | |
1735 | parBOX[1] = 1.0/2.0; | |
1736 | parBOX[2] = 10.0/2.0; | |
1737 | gMC->Gsvolu("UTA3","BOX ",idtmed[1301-1],parBOX,kNparBOX); | |
1738 | xpos = 0.0; | |
1739 | ypos = 1.0/2.0 + fgkSMpltT - fgkFlength/2.0; | |
1740 | zpos = fgkSheight/2.0 - 1.5 - 10.0/2.0; | |
1741 | gMC->Gspos("UTA3",1,"UTF1", xpos, ypos, zpos, 0,"ONLY"); | |
1742 | gMC->Gspos("UTA3",2,"UTF2", xpos,-ypos, zpos, 0,"ONLY"); | |
1743 | ||
bd0f8685 | 1744 | } |
1745 | ||
1746 | //_____________________________________________________________________________ | |
1747 | void AliTRDgeometry::CreateServices(Int_t *idtmed) | |
1748 | { | |
1749 | // | |
1750 | // Create the geometry of the services | |
1751 | // | |
1752 | // Names of the TRD services volumina | |
1753 | // | |
b640260a | 1754 | // UTC1 Cooling arterias (Al) |
1755 | // UTC2 Cooling arterias (Water) | |
bd0f8685 | 1756 | // UUxx Volumes for the services at the chambers (Air) |
053a5ea0 | 1757 | // UMCM Readout MCMs (G10/Cu/Si) |
1758 | // UDCS DCSs boards (G10/Cu) | |
b640260a | 1759 | // UTP1 Power bars (Cu) |
0a5f3331 | 1760 | // UTCP Cooling pipes (Fe) |
bd0f8685 | 1761 | // UTCH Cooling pipes (Water) |
1762 | // UTPL Power lines (Cu) | |
b640260a | 1763 | // UTGD Gas distribution box (V2A) |
bd0f8685 | 1764 | // |
1765 | ||
053767a4 | 1766 | Int_t ilayer = 0; |
1767 | Int_t istack = 0; | |
bd0f8685 | 1768 | |
1769 | Float_t xpos = 0.0; | |
1770 | Float_t ypos = 0.0; | |
1771 | Float_t zpos = 0.0; | |
1772 | ||
a3f8715e | 1773 | Char_t cTagV[100]; |
bd0f8685 | 1774 | |
b640260a | 1775 | const Int_t kNparBox = 3; |
1776 | Float_t parBox[kNparBox]; | |
1777 | ||
1778 | const Int_t kNparTube = 3; | |
1779 | Float_t parTube[kNparTube]; | |
1780 | ||
10df4d39 | 1781 | // Services inside the baby frame |
1782 | const Float_t kBBMdz = 223.0; | |
1783 | const Float_t kBBSdz = 8.5; | |
1784 | ||
1785 | // Services inside the back frame | |
1786 | const Float_t kBFMdz = 118.0; | |
1787 | const Float_t kBFSdz = 8.5; | |
1788 | ||
bd0f8685 | 1789 | // The rotation matrices |
10df4d39 | 1790 | const Int_t kNmatrix = 10; |
bd0f8685 | 1791 | Int_t matrix[kNmatrix]; |
10df4d39 | 1792 | gMC->Matrix(matrix[0], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0); // rotation around y-axis |
1793 | gMC->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0, 180.0); // rotation around y-axis | |
030b4415 | 1794 | gMC->Matrix(matrix[2], 0.0, 0.0, 90.0, 90.0, 90.0, 0.0); |
99ed5146 | 1795 | gMC->Matrix(matrix[3], 180.0, 0.0, 90.0, 90.0, 90.0, 180.0); |
b640260a | 1796 | gMC->Matrix(matrix[4], 90.0, 0.0, 0.0, 0.0, 90.0, 90.0); |
1797 | gMC->Matrix(matrix[5], 100.0, 0.0, 90.0, 270.0, 10.0, 0.0); | |
1798 | gMC->Matrix(matrix[6], 80.0, 0.0, 90.0, 270.0, 10.0, 180.0); | |
10df4d39 | 1799 | gMC->Matrix(matrix[7], 90.0, 10.0, 90.0, 100.0, 0.0, 0.0); // rotation around z-axis |
1800 | gMC->Matrix(matrix[8], 90.0, 350.0, 90.0, 80.0, 0.0, 0.0); // rotation around z-axis | |
1801 | gMC->Matrix(matrix[9], 90.0, 90.0, 90.0, 180.0, 0.0, 0.0); // rotation around z-axis | |
bd0f8685 | 1802 | |
1803 | // | |
1804 | // The cooling arterias | |
1805 | // | |
1806 | ||
1807 | // Width of the cooling arterias | |
0a5f3331 | 1808 | const Float_t kCOLwid = 0.8; |
bd0f8685 | 1809 | // Height of the cooling arterias |
0a5f3331 | 1810 | const Float_t kCOLhgt = 6.5; |
bd0f8685 | 1811 | // Positioning of the cooling |
053a5ea0 | 1812 | const Float_t kCOLposx = 1.0; |
1813 | const Float_t kCOLposz = -1.2; | |
bd0f8685 | 1814 | // Thickness of the walls of the cooling arterias |
1815 | const Float_t kCOLthk = 0.1; | |
030b4415 | 1816 | const Int_t kNparCOL = 3; |
bd0f8685 | 1817 | Float_t parCOL[kNparCOL]; |
b640260a | 1818 | parCOL[0] = 0.0; |
1819 | parCOL[1] = 0.0; | |
1820 | parCOL[2] = 0.0; | |
1821 | gMC->Gsvolu("UTC1","BOX ",idtmed[1308-1],parCOL,0); | |
1822 | gMC->Gsvolu("UTC3","BOX ",idtmed[1308-1],parCOL,0); | |
1823 | parCOL[0] = kCOLwid/2.0 - kCOLthk; | |
1824 | parCOL[1] = -1.0; | |
1825 | parCOL[2] = kCOLhgt/2.0 - kCOLthk; | |
1826 | gMC->Gsvolu("UTC2","BOX ",idtmed[1314-1],parCOL,kNparCOL); | |
1827 | gMC->Gsvolu("UTC4","BOX ",idtmed[1314-1],parCOL,kNparCOL); | |
bd0f8685 | 1828 | |
1829 | xpos = 0.0; | |
1830 | ypos = 0.0; | |
1831 | zpos = 0.0; | |
b640260a | 1832 | gMC->Gspos("UTC2",1,"UTC1", xpos,ypos,zpos,0,"ONLY"); |
1833 | gMC->Gspos("UTC4",1,"UTC3", xpos,ypos,zpos,0,"ONLY"); | |
bd0f8685 | 1834 | |
053767a4 | 1835 | for (ilayer = 1; ilayer < kNlayer; ilayer++) { |
99ed5146 | 1836 | |
b640260a | 1837 | // Along the chambers |
053767a4 | 1838 | xpos = fCwidth[ilayer]/2.0 + kCOLwid/2.0 + kCOLposx; |
b640260a | 1839 | ypos = 0.0; |
053a5ea0 | 1840 | zpos = fgkVrocsm + fgkSMpltT - fgkCalZpos |
1841 | + kCOLhgt/2.0 - fgkSheight/2.0 + kCOLposz | |
053767a4 | 1842 | + ilayer * (fgkCH + fgkVspace); |
b640260a | 1843 | parCOL[0] = kCOLwid /2.0; |
1844 | parCOL[1] = fgkSlength/2.0; | |
1845 | parCOL[2] = kCOLhgt /2.0; | |
053767a4 | 1846 | gMC->Gsposp("UTC1",ilayer ,"UTI1", xpos,ypos,zpos |
b640260a | 1847 | ,matrix[0],"ONLY",parCOL,kNparCOL); |
053767a4 | 1848 | gMC->Gsposp("UTC1",ilayer+ kNlayer,"UTI1",-xpos,ypos,zpos |
b640260a | 1849 | ,matrix[1],"ONLY",parCOL,kNparCOL); |
053767a4 | 1850 | gMC->Gsposp("UTC1",ilayer+6*kNlayer,"UTI2", xpos,ypos,zpos |
b640260a | 1851 | ,matrix[0],"ONLY",parCOL,kNparCOL); |
053767a4 | 1852 | gMC->Gsposp("UTC1",ilayer+7*kNlayer,"UTI2",-xpos,ypos,zpos |
b640260a | 1853 | ,matrix[1],"ONLY",parCOL,kNparCOL); |
053767a4 | 1854 | gMC->Gsposp("UTC1",ilayer+8*kNlayer ,"UTI3", xpos,ypos,zpos |
b640260a | 1855 | ,matrix[0],"ONLY",parCOL,kNparCOL); |
053767a4 | 1856 | gMC->Gsposp("UTC1",ilayer+9*kNlayer,"UTI3",-xpos,ypos,zpos |
b640260a | 1857 | ,matrix[1],"ONLY",parCOL,kNparCOL); |
1858 | ||
1859 | // Front of supermodules | |
053767a4 | 1860 | xpos = fCwidth[ilayer]/2.0 + kCOLwid/2.0 + kCOLposx; |
b640260a | 1861 | ypos = 0.0; |
053a5ea0 | 1862 | zpos = fgkVrocsm + fgkSMpltT - fgkCalZpos |
1863 | + kCOLhgt/2.0 - fgkSheight/2.0 + kCOLposz | |
053767a4 | 1864 | + ilayer * (fgkCH + fgkVspace); |
b640260a | 1865 | parCOL[0] = kCOLwid /2.0; |
1866 | parCOL[1] = fgkFlength/2.0; | |
1867 | parCOL[2] = kCOLhgt /2.0; | |
053767a4 | 1868 | gMC->Gsposp("UTC3",ilayer+2*kNlayer,"UTF1", xpos,ypos,zpos |
b640260a | 1869 | ,matrix[0],"ONLY",parCOL,kNparCOL); |
053767a4 | 1870 | gMC->Gsposp("UTC3",ilayer+3*kNlayer,"UTF1",-xpos,ypos,zpos |
b640260a | 1871 | ,matrix[1],"ONLY",parCOL,kNparCOL); |
053767a4 | 1872 | gMC->Gsposp("UTC3",ilayer+4*kNlayer,"UTF2", xpos,ypos,zpos |
b640260a | 1873 | ,matrix[0],"ONLY",parCOL,kNparCOL); |
053767a4 | 1874 | gMC->Gsposp("UTC3",ilayer+5*kNlayer,"UTF2",-xpos,ypos,zpos |
b640260a | 1875 | ,matrix[1],"ONLY",parCOL,kNparCOL); |
99ed5146 | 1876 | |
bd0f8685 | 1877 | } |
1878 | ||
053767a4 | 1879 | for (ilayer = 1; ilayer < kNlayer; ilayer++) { |
10df4d39 | 1880 | |
1881 | // In baby frame | |
053a5ea0 | 1882 | xpos = fCwidth[ilayer]/2.0 + kCOLwid/2.0 + kCOLposx - 2.5; |
10df4d39 | 1883 | ypos = kBBSdz/2.0 - kBBMdz/2.0; |
053a5ea0 | 1884 | zpos = fgkVrocsm + fgkSMpltT - fgkCalZpos |
1885 | + kCOLhgt/2.0 - fgkSheight/2.0 + kCOLposz | |
053767a4 | 1886 | + ilayer * (fgkCH + fgkVspace); |
10df4d39 | 1887 | parCOL[0] = kCOLwid/2.0; |
1888 | parCOL[1] = kBBSdz /2.0; | |
1889 | parCOL[2] = kCOLhgt/2.0; | |
053767a4 | 1890 | gMC->Gsposp("UTC3",ilayer+6*kNlayer,"BBTRD", xpos, ypos, zpos |
10df4d39 | 1891 | ,matrix[0],"ONLY",parCOL,kNparCOL); |
053767a4 | 1892 | gMC->Gsposp("UTC3",ilayer+7*kNlayer,"BBTRD",-xpos, ypos, zpos |
10df4d39 | 1893 | ,matrix[1],"ONLY",parCOL,kNparCOL); |
1894 | ||
1895 | } | |
1896 | ||
053767a4 | 1897 | for (ilayer = 1; ilayer < kNlayer; ilayer++) { |
10df4d39 | 1898 | |
1899 | // In back frame | |
053a5ea0 | 1900 | xpos = fCwidth[ilayer]/2.0 + kCOLwid/2.0 + kCOLposx - 0.3; |
10df4d39 | 1901 | ypos = -kBFSdz/2.0 + kBFMdz/2.0; |
053a5ea0 | 1902 | zpos = fgkVrocsm + fgkSMpltT - fgkCalZpos |
1903 | + kCOLhgt/2.0 - fgkSheight/2.0 + kCOLposz | |
053767a4 | 1904 | + ilayer * (fgkCH + fgkVspace); |
10df4d39 | 1905 | parCOL[0] = kCOLwid/2.0; |
1906 | parCOL[1] = kBFSdz /2.0; | |
1907 | parCOL[2] = kCOLhgt/2.0; | |
053767a4 | 1908 | gMC->Gsposp("UTC3",ilayer+6*kNlayer,"BFTRD", xpos,ypos,zpos |
10df4d39 | 1909 | ,matrix[0],"ONLY",parCOL,kNparCOL); |
053767a4 | 1910 | gMC->Gsposp("UTC3",ilayer+7*kNlayer,"BFTRD",-xpos,ypos,zpos |
10df4d39 | 1911 | ,matrix[1],"ONLY",parCOL,kNparCOL); |
1912 | ||
1913 | } | |
1914 | ||
053a5ea0 | 1915 | // The upper most layer |
b640260a | 1916 | // Along the chambers |
1917 | xpos = fCwidth[5]/2.0 - kCOLhgt/2.0 - 1.3; | |
1918 | ypos = 0.0; | |
1919 | zpos = fgkSheight/2.0 - fgkSMpltT - 0.4 - kCOLwid/2.0; | |
1920 | parCOL[0] = kCOLwid /2.0; | |
1921 | parCOL[1] = fgkSlength/2.0; | |
1922 | parCOL[2] = kCOLhgt /2.0; | |
053767a4 | 1923 | gMC->Gsposp("UTC1",6 ,"UTI1", xpos,ypos,zpos |
b640260a | 1924 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
053767a4 | 1925 | gMC->Gsposp("UTC1",6+ kNlayer,"UTI1",-xpos,ypos,zpos |
b640260a | 1926 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
053767a4 | 1927 | gMC->Gsposp("UTC1",6+6*kNlayer,"UTI2", xpos,ypos,zpos |
b640260a | 1928 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
053767a4 | 1929 | gMC->Gsposp("UTC1",6+7*kNlayer,"UTI2",-xpos,ypos,zpos |
b640260a | 1930 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
053767a4 | 1931 | gMC->Gsposp("UTC1",6+8*kNlayer,"UTI3", xpos,ypos,zpos |
b640260a | 1932 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
053767a4 | 1933 | gMC->Gsposp("UTC1",6+9*kNlayer,"UTI3",-xpos,ypos,zpos |
b640260a | 1934 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
1935 | // Front of supermodules | |
1936 | xpos = fCwidth[5]/2.0 - kCOLhgt/2.0 - 1.3; | |
1937 | ypos = 0.0; | |
1938 | zpos = fgkSheight/2.0 - fgkSMpltT - 0.4 - kCOLwid/2.0; | |
1939 | parCOL[0] = kCOLwid /2.0; | |
1940 | parCOL[1] = fgkFlength/2.0; | |
1941 | parCOL[2] = kCOLhgt /2.0; | |
053767a4 | 1942 | gMC->Gsposp("UTC3",6+2*kNlayer,"UTF1", xpos,ypos,zpos |
b640260a | 1943 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
053767a4 | 1944 | gMC->Gsposp("UTC3",6+3*kNlayer,"UTF1",-xpos,ypos,zpos |
b640260a | 1945 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
053767a4 | 1946 | gMC->Gsposp("UTC3",6+4*kNlayer,"UTF2", xpos,ypos,zpos |
b640260a | 1947 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
053767a4 | 1948 | gMC->Gsposp("UTC3",6+5*kNlayer,"UTF2",-xpos,ypos,zpos |
b640260a | 1949 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
10df4d39 | 1950 | // In baby frame |
f9004197 | 1951 | xpos = fCwidth[5]/2.0 - kCOLhgt/2.0 - 3.1; |
10df4d39 | 1952 | ypos = kBBSdz/2.0 - kBBMdz/2.0; |
1953 | zpos = fgkSheight/2.0 - fgkSMpltT - 0.4 - kCOLwid/2.0; | |
1954 | parCOL[0] = kCOLwid/2.0; | |
1955 | parCOL[1] = kBBSdz /2.0; | |
1956 | parCOL[2] = kCOLhgt/2.0; | |
053767a4 | 1957 | gMC->Gsposp("UTC3",6+6*kNlayer,"BBTRD", xpos, ypos, zpos |
10df4d39 | 1958 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
053767a4 | 1959 | gMC->Gsposp("UTC3",6+7*kNlayer,"BBTRD",-xpos, ypos, zpos |
10df4d39 | 1960 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
1961 | // In back frame | |
1962 | xpos = fCwidth[5]/2.0 - kCOLhgt/2.0 - 1.3; | |
1963 | ypos = -kBFSdz/2.0 + kBFMdz/2.0; | |
1964 | zpos = fgkSheight/2.0 - fgkSMpltT - 0.4 - kCOLwid/2.0; | |
1965 | parCOL[0] = kCOLwid/2.0; | |
1966 | parCOL[1] = kBFSdz /2.0; | |
1967 | parCOL[2] = kCOLhgt/2.0; | |
053767a4 | 1968 | gMC->Gsposp("UTC3",6+6*kNlayer,"BFTRD", xpos,ypos,zpos |
10df4d39 | 1969 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
053767a4 | 1970 | gMC->Gsposp("UTC3",6+7*kNlayer,"BFTRD",-xpos,ypos,zpos |
10df4d39 | 1971 | ,matrix[3],"ONLY",parCOL,kNparCOL); |
99ed5146 | 1972 | |
bd0f8685 | 1973 | // |
053a5ea0 | 1974 | // The power bus bars |
bd0f8685 | 1975 | // |
1976 | ||
1977 | const Float_t kPWRwid = 0.6; | |
053a5ea0 | 1978 | // Increase the height of the power bus bars to take into |
1979 | // account the material of additional cables, etc. | |
1980 | const Float_t kPWRhgtA = 5.0 + 0.2; | |
1981 | const Float_t kPWRhgtB = 5.0; | |
1982 | const Float_t kPWRposx = 2.0; | |
1983 | const Float_t kPWRposz = 0.1; | |
030b4415 | 1984 | const Int_t kNparPWR = 3; |
bd0f8685 | 1985 | Float_t parPWR[kNparPWR]; |
b640260a | 1986 | parPWR[0] = 0.0; |
1987 | parPWR[1] = 0.0; | |
1988 | parPWR[2] = 0.0; | |
1989 | gMC->Gsvolu("UTP1","BOX ",idtmed[1325-1],parPWR,0); | |
1990 | gMC->Gsvolu("UTP3","BOX ",idtmed[1325-1],parPWR,0); | |
bd0f8685 | 1991 | |
053767a4 | 1992 | for (ilayer = 1; ilayer < kNlayer; ilayer++) { |
b640260a | 1993 | |
1994 | // Along the chambers | |
053767a4 | 1995 | xpos = fCwidth[ilayer]/2.0 + kPWRwid/2.0 + kPWRposx; |
b640260a | 1996 | ypos = 0.0; |
053a5ea0 | 1997 | zpos = fgkVrocsm + fgkSMpltT - fgkCalZpos |
1998 | + kPWRhgtA/2.0 - fgkSheight/2.0 + kPWRposz | |
053767a4 | 1999 | + ilayer * (fgkCH + fgkVspace); |
b640260a | 2000 | parPWR[0] = kPWRwid /2.0; |
2001 | parPWR[1] = fgkSlength/2.0; | |
053a5ea0 | 2002 | parPWR[2] = kPWRhgtA /2.0; |
053767a4 | 2003 | gMC->Gsposp("UTP1",ilayer ,"UTI1", xpos,ypos,zpos |
b640260a | 2004 | ,matrix[0],"ONLY",parPWR,kNparPWR); |
053767a4 | 2005 | gMC->Gsposp("UTP1",ilayer+ kNlayer,"UTI1",-xpos,ypos,zpos |
b640260a | 2006 | ,matrix[1],"ONLY",parPWR,kNparPWR); |
053767a4 | 2007 | gMC->Gsposp("UTP1",ilayer+6*kNlayer,"UTI2", xpos,ypos,zpos |
b640260a | 2008 | ,matrix[0],"ONLY",parPWR,kNparPWR); |
053767a4 | 2009 | gMC->Gsposp("UTP1",ilayer+7*kNlayer,"UTI2",-xpos,ypos,zpos |
b640260a | 2010 | ,matrix[1],"ONLY",parPWR,kNparPWR); |
053767a4 | 2011 | gMC->Gsposp("UTP1",ilayer+8*kNlayer,"UTI3", xpos,ypos,zpos |
b640260a | 2012 | ,matrix[0],"ONLY",parPWR,kNparPWR); |
053767a4 | 2013 | gMC->Gsposp("UTP1",ilayer+9*kNlayer,"UTI3",-xpos,ypos,zpos |
b640260a | 2014 | ,matrix[1],"ONLY",parPWR,kNparPWR); |
2015 | ||
2016 | // Front of supermodule | |
053767a4 | 2017 | xpos = fCwidth[ilayer]/2.0 + kPWRwid/2.0 + kPWRposx; |
b640260a | 2018 | ypos = 0.0; |
053a5ea0 | 2019 | zpos = fgkVrocsm + fgkSMpltT - fgkCalZpos |
2020 | + kPWRhgtA/2.0 - fgkSheight/2.0 + kPWRposz | |
053767a4 | 2021 | + ilayer * (fgkCH + fgkVspace); |
b640260a | 2022 | parPWR[0] = kPWRwid /2.0; |
2023 | parPWR[1] = fgkFlength/2.0; | |
053a5ea0 | 2024 | parPWR[2] = kPWRhgtA /2.0; |
053767a4 | 2025 | gMC->Gsposp("UTP3",ilayer+2*kNlayer,"UTF1", xpos,ypos,zpos |
b640260a | 2026 | ,matrix[0],"ONLY",parPWR,kNparPWR); |
053767a4 | 2027 | gMC->Gsposp("UTP3",ilayer+3*kNlayer,"UTF1",-xpos,ypos,zpos |
b640260a | 2028 | ,matrix[1],"ONLY",parPWR,kNparPWR); |
053767a4 | 2029 | gMC->Gsposp("UTP3",ilayer+4*kNlayer,"UTF2", xpos,ypos,zpos |
b640260a | 2030 | ,matrix[0],"ONLY",parPWR,kNparPWR); |
053767a4 | 2031 | gMC->Gsposp("UTP3",ilayer+5*kNlayer,"UTF2",-xpos,ypos,zpos |
b640260a | 2032 | ,matrix[1],"ONLY",parPWR,kNparPWR); |
bd0f8685 | 2033 | |
2034 | } | |
2035 | ||
053767a4 | 2036 | for (ilayer = 1; ilayer < kNlayer; ilayer++) { |
10df4d39 | 2037 | |
2038 | // In baby frame | |
053a5ea0 | 2039 | xpos = fCwidth[ilayer]/2.0 + kPWRwid/2.0 + kPWRposx - 2.5; |
10df4d39 | 2040 | ypos = kBBSdz/2.0 - kBBMdz/2.0; |
053a5ea0 | 2041 | zpos = fgkVrocsm + fgkSMpltT - fgkCalZpos |
2042 | + kPWRhgtB/2.0 - fgkSheight/2.0 + kPWRposz | |
053767a4 | 2043 | + ilayer * (fgkCH + fgkVspace); |
053a5ea0 | 2044 | parPWR[0] = kPWRwid /2.0; |
2045 | parPWR[1] = kBBSdz /2.0; | |
2046 | parPWR[2] = kPWRhgtB/2.0; | |
053767a4 | 2047 | gMC->Gsposp("UTP3",ilayer+6*kNlayer,"BBTRD", xpos, ypos, zpos |
10df4d39 | 2048 | ,matrix[0],"ONLY",parPWR,kNparPWR); |
053767a4 | 2049 | gMC->Gsposp("UTP3",ilayer+7*kNlayer,"BBTRD",-xpos, ypos, zpos |
10df4d39 | 2050 | ,matrix[1],"ONLY",parPWR,kNparPWR); |
2051 | ||
2052 | } | |
2053 | ||
053767a4 | 2054 | for (ilayer = 1; ilayer < kNlayer; ilayer++) { |
10df4d39 | 2055 | |
2056 | // In back frame | |
053a5ea0 | 2057 | xpos = fCwidth[ilayer]/2.0 + kPWRwid/2.0 + kPWRposx - 0.3; |
10df4d39 | 2058 | ypos = -kBFSdz/2.0 + kBFMdz/2.0; |
053a5ea0 | 2059 | zpos = fgkVrocsm + fgkSMpltT - fgkCalZpos |
2060 | + kPWRhgtB/2.0 - fgkSheight/2.0 + kPWRposz | |
053767a4 | 2061 | + ilayer * (fgkCH + fgkVspace); |
053a5ea0 | 2062 | parPWR[0] = kPWRwid /2.0; |
2063 | parPWR[1] = kBFSdz /2.0; | |
2064 | parPWR[2] = kPWRhgtB/2.0; | |
053767a4 | 2065 | gMC->Gsposp("UTP3",ilayer+8*kNlayer,"BFTRD", xpos,ypos,zpos |
10df4d39 | 2066 | ,matrix[0],"ONLY",parPWR,kNparPWR); |
053767a4 | 2067 | gMC->Gsposp("UTP3",ilayer+9*kNlayer,"BFTRD",-xpos,ypos,zpos |
10df4d39 | 2068 | ,matrix[1],"ONLY",parPWR,kNparPWR); |
2069 | ||
2070 | } | |
2071 | ||
2072 | // The upper most layer | |
b640260a | 2073 | // Along the chambers |
053a5ea0 | 2074 | xpos = fCwidth[5]/2.0 + kPWRhgtB/2.0 - 1.3; |
4ba1d6ae | 2075 | ypos = 0.0; |
2076 | zpos = fgkSheight/2.0 - fgkSMpltT - 0.6 - kPWRwid/2.0; | |
b640260a | 2077 | parPWR[0] = kPWRwid /2.0; |
2078 | parPWR[1] = fgkSlength/2.0; | |
053a5ea0 | 2079 | parPWR[2] = kPWRhgtB /2.0 ; |
053767a4 | 2080 | gMC->Gsposp("UTP1",6 ,"UTI1", xpos,ypos,zpos |
b640260a | 2081 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
053767a4 | 2082 | gMC->Gsposp("UTP1",6+ kNlayer,"UTI1",-xpos,ypos,zpos |
b640260a | 2083 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
053767a4 | 2084 | gMC->Gsposp("UTP1",6+6*kNlayer,"UTI2", xpos,ypos,zpos |
b640260a | 2085 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
053767a4 | 2086 | gMC->Gsposp("UTP1",6+7*kNlayer,"UTI2",-xpos,ypos,zpos |
b640260a | 2087 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
053767a4 | 2088 | gMC->Gsposp("UTP1",6+8*kNlayer,"UTI3", xpos,ypos,zpos |
b640260a | 2089 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
053767a4 | 2090 | gMC->Gsposp("UTP1",6+9*kNlayer,"UTI3",-xpos,ypos,zpos |
b640260a | 2091 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
2092 | // Front of supermodules | |
053a5ea0 | 2093 | xpos = fCwidth[5]/2.0 + kPWRhgtB/2.0 - 1.3; |
b640260a | 2094 | ypos = 0.0; |
2095 | zpos = fgkSheight/2.0 - fgkSMpltT - 0.6 - kPWRwid/2.0; | |
2096 | parPWR[0] = kPWRwid /2.0; | |
2097 | parPWR[1] = fgkFlength/2.0; | |
053a5ea0 | 2098 | parPWR[2] = kPWRhgtB /2.0; |
053767a4 | 2099 | gMC->Gsposp("UTP3",6+2*kNlayer,"UTF1", xpos,ypos,zpos |
b640260a | 2100 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
053767a4 | 2101 | gMC->Gsposp("UTP3",6+3*kNlayer,"UTF1",-xpos,ypos,zpos |
b640260a | 2102 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
053767a4 | 2103 | gMC->Gsposp("UTP3",6+4*kNlayer,"UTF2", xpos,ypos,zpos |
b640260a | 2104 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
053767a4 | 2105 | gMC->Gsposp("UTP3",6+5*kNlayer,"UTF2",-xpos,ypos,zpos |
b640260a | 2106 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
10df4d39 | 2107 | // In baby frame |
053a5ea0 | 2108 | xpos = fCwidth[5]/2.0 + kPWRhgtB/2.0 - 3.0; |
10df4d39 | 2109 | ypos = kBBSdz/2.0 - kBBMdz/2.0; |
2110 | zpos = fgkSheight/2.0 - fgkSMpltT - 0.6 - kPWRwid/2.0; | |
053a5ea0 | 2111 | parPWR[0] = kPWRwid /2.0; |
2112 | parPWR[1] = kBBSdz /2.0; | |
2113 | parPWR[2] = kPWRhgtB/2.0; | |
053767a4 | 2114 | gMC->Gsposp("UTP3",6+6*kNlayer,"BBTRD", xpos, ypos, zpos |
10df4d39 | 2115 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
053767a4 | 2116 | gMC->Gsposp("UTP3",6+7*kNlayer,"BBTRD",-xpos, ypos, zpos |
10df4d39 | 2117 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
2118 | // In back frame | |
053a5ea0 | 2119 | xpos = fCwidth[5]/2.0 + kPWRhgtB/2.0 - 1.3; |
10df4d39 | 2120 | ypos = -kBFSdz/2.0 + kBFMdz/2.0; |
2121 | zpos = fgkSheight/2.0 - fgkSMpltT - 0.6 - kPWRwid/2.0; | |
053a5ea0 | 2122 | parPWR[0] = kPWRwid /2.0; |
2123 | parPWR[1] = kBFSdz /2.0; | |
2124 | parPWR[2] = kPWRhgtB/2.0; | |
053767a4 | 2125 | gMC->Gsposp("UTP3",6+8*kNlayer,"BFTRD", xpos,ypos,zpos |
10df4d39 | 2126 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
053767a4 | 2127 | gMC->Gsposp("UTP3",6+9*kNlayer,"BFTRD",-xpos,ypos,zpos |
10df4d39 | 2128 | ,matrix[3],"ONLY",parPWR,kNparPWR); |
b640260a | 2129 | |
2130 | // | |
2131 | // The gas tubes connecting the chambers in the super modules with holes | |
f73d8692 | 2132 | // Material: Stainless steel |
b640260a | 2133 | // |
2134 | ||
2135 | parTube[0] = 0.0; | |
2136 | parTube[1] = 2.2/2.0; | |
2137 | parTube[2] = fClength[5][2]/2.0 - fgkHspace/2.0; | |
f73d8692 | 2138 | gMC->Gsvolu("UTG1","TUBE",idtmed[1308-1],parTube,kNparTube); |
b640260a | 2139 | parTube[0] = 0.0; |
f73d8692 | 2140 | parTube[1] = 2.1/2.0; |
b640260a | 2141 | parTube[2] = fClength[5][2]/2.0 - fgkHspace/2.0; |
2142 | gMC->Gsvolu("UTG2","TUBE",idtmed[1309-1],parTube,kNparTube); | |
2143 | xpos = 0.0; | |
99ed5146 | 2144 | ypos = 0.0; |
b640260a | 2145 | zpos = 0.0; |
2146 | gMC->Gspos("UTG2",1,"UTG1",xpos,ypos,zpos,0,"ONLY"); | |
053767a4 | 2147 | for (ilayer = 0; ilayer < kNlayer; ilayer++) { |
2148 | xpos = fCwidth[ilayer]/2.0 + kCOLwid/2.0 - 1.5; | |
b640260a | 2149 | ypos = 0.0; |
2150 | zpos = fgkVrocsm + fgkSMpltT + kCOLhgt/2.0 - fgkSheight/2.0 + 5.0 | |
053767a4 | 2151 | + ilayer * (fgkCH + fgkVspace); |
2152 | gMC->Gspos("UTG1",1+ilayer,"UTI3", xpos, ypos, zpos,matrix[4],"ONLY"); | |
2153 | gMC->Gspos("UTG1",7+ilayer,"UTI3",-xpos, ypos, zpos,matrix[4],"ONLY"); | |
b640260a | 2154 | } |
99ed5146 | 2155 | |
bd0f8685 | 2156 | // |
2157 | // The volumes for the services at the chambers | |
2158 | // | |
2159 | ||
2160 | const Int_t kNparServ = 3; | |
2161 | Float_t parServ[kNparServ]; | |
2162 | ||
053767a4 | 2163 | for (istack = 0; istack < kNstack; istack++) { |
2164 | for (ilayer = 0; ilayer < kNlayer; ilayer++) { | |
bd0f8685 | 2165 | |
053767a4 | 2166 | Int_t iDet = GetDetectorSec(ilayer,istack); |
bd0f8685 | 2167 | |
2168 | sprintf(cTagV,"UU%02d",iDet); | |
053767a4 | 2169 | parServ[0] = fCwidth[ilayer] /2.0; |
2170 | parServ[1] = fClength[ilayer][istack]/2.0 - fgkHspace/2.0; | |
053a5ea0 | 2171 | parServ[2] = fgkCsvH /2.0; |
bd0f8685 | 2172 | gMC->Gsvolu(cTagV,"BOX",idtmed[1302-1],parServ,kNparServ); |
a797f961 | 2173 | |
bd0f8685 | 2174 | } |
2175 | } | |
2176 | ||
2177 | // | |
2178 | // The cooling pipes inside the service volumes | |
2179 | // | |
2180 | ||
0a5f3331 | 2181 | // The cooling pipes |
e7014565 | 2182 | parTube[0] = 0.0; |
2183 | parTube[1] = 0.0; | |
2184 | parTube[2] = 0.0; | |
bd0f8685 | 2185 | gMC->Gsvolu("UTCP","TUBE",idtmed[1324-1],parTube,0); |
2186 | // The cooling water | |
2187 | parTube[0] = 0.0; | |
030b4415 | 2188 | parTube[1] = 0.2/2.0; |
e7014565 | 2189 | parTube[2] = -1.0; |
bd0f8685 | 2190 | gMC->Gsvolu("UTCH","TUBE",idtmed[1314-1],parTube,kNparTube); |
2191 | // Water inside the cooling pipe | |
2192 | xpos = 0.0; | |
2193 | ypos = 0.0; | |
2194 | zpos = 0.0; | |
2195 | gMC->Gspos("UTCH",1,"UTCP",xpos,ypos,zpos,0,"ONLY"); | |
2196 | ||
2197 | // Position the cooling pipes in the mother volume | |
053767a4 | 2198 | for (istack = 0; istack < kNstack; istack++) { |
2199 | for (ilayer = 0; ilayer < kNlayer; ilayer++) { | |
2200 | Int_t iDet = GetDetectorSec(ilayer,istack); | |
2201 | Int_t iCopy = GetDetector(ilayer,istack,0) * 100; | |
2202 | Int_t nMCMrow = GetRowMax(ilayer,istack,0); | |
2203 | Float_t ySize = (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW) | |
bd0f8685 | 2204 | / ((Float_t) nMCMrow); |
2205 | sprintf(cTagV,"UU%02d",iDet); | |
2206 | for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) { | |
2207 | xpos = 0.0; | |
053a5ea0 | 2208 | ypos = (0.5 + iMCMrow) * ySize |
053767a4 | 2209 | - fClength[ilayer][istack]/2.0 + fgkHspace/2.0; |
030b4415 | 2210 | zpos = 0.0 + 0.742/2.0; |
e7014565 | 2211 | // The cooling pipes |
b640260a | 2212 | parTube[0] = 0.0; |
2213 | parTube[1] = 0.3/2.0; // Thickness of the cooling pipes | |
053767a4 | 2214 | parTube[2] = fCwidth[ilayer]/2.0; |
bd0f8685 | 2215 | gMC->Gsposp("UTCP",iCopy+iMCMrow,cTagV,xpos,ypos,zpos |
b640260a | 2216 | ,matrix[2],"ONLY",parTube,kNparTube); |
bd0f8685 | 2217 | } |
2218 | } | |
2219 | } | |
2220 | ||
2221 | // | |
2222 | // The power lines | |
2223 | // | |
2224 | ||
2225 | // The copper power lines | |
2226 | parTube[0] = 0.0; | |
2227 | parTube[1] = 0.0; | |
2228 | parTube[2] = 0.0; | |
2229 | gMC->Gsvolu("UTPL","TUBE",idtmed[1305-1],parTube,0); | |
2230 | ||
2231 | // Position the power lines in the mother volume | |
053767a4 | 2232 | for (istack = 0; istack < kNstack; istack++) { |
2233 | for (ilayer = 0; ilayer < kNlayer; ilayer++) { | |
2234 | Int_t iDet = GetDetectorSec(ilayer,istack); | |
2235 | Int_t iCopy = GetDetector(ilayer,istack,0) * 100; | |
2236 | Int_t nMCMrow = GetRowMax(ilayer,istack,0); | |
2237 | Float_t ySize = (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW) | |
bd0f8685 | 2238 | / ((Float_t) nMCMrow); |
2239 | sprintf(cTagV,"UU%02d",iDet); | |
2240 | for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) { | |
b640260a | 2241 | xpos = 0.0; |
2242 | ypos = (0.5 + iMCMrow) * ySize - 1.0 | |
053767a4 | 2243 | - fClength[ilayer][istack]/2.0 + fgkHspace/2.0; |
b640260a | 2244 | zpos = -0.4 + 0.742/2.0; |
2245 | parTube[0] = 0.0; | |
2246 | parTube[1] = 0.2/2.0; // Thickness of the power lines | |
053767a4 | 2247 | parTube[2] = fCwidth[ilayer]/2.0; |
bd0f8685 | 2248 | gMC->Gsposp("UTPL",iCopy+iMCMrow,cTagV,xpos,ypos,zpos |
b640260a | 2249 | ,matrix[2],"ONLY",parTube,kNparTube); |
bd0f8685 | 2250 | } |
2251 | } | |
2252 | } | |
2253 | ||
2254 | // | |
2255 | // The MCMs | |
2256 | // | |
2257 | ||
1f766e4b | 2258 | const Float_t kMCMx = 3.0; |
2259 | const Float_t kMCMy = 3.0; | |
2260 | const Float_t kMCMz = 0.3; | |
2261 | ||
2262 | const Float_t kMCMpcTh = 0.1; | |
2263 | const Float_t kMCMcuTh = 0.0025; | |
2264 | const Float_t kMCMsiTh = 0.03; | |
2265 | const Float_t kMCMcoTh = 0.04; | |
0a5f3331 | 2266 | |
bd0f8685 | 2267 | // The mother volume for the MCMs (air) |
2268 | const Int_t kNparMCM = 3; | |
2269 | Float_t parMCM[kNparMCM]; | |
0a5f3331 | 2270 | parMCM[0] = kMCMx /2.0; |
2271 | parMCM[1] = kMCMy /2.0; | |
2272 | parMCM[2] = kMCMz /2.0; | |
bd0f8685 | 2273 | gMC->Gsvolu("UMCM","BOX",idtmed[1302-1],parMCM,kNparMCM); |
2274 | ||
2275 | // The MCM carrier G10 layer | |
0a5f3331 | 2276 | parMCM[0] = kMCMx /2.0; |
2277 | parMCM[1] = kMCMy /2.0; | |
2278 | parMCM[2] = kMCMpcTh/2.0; | |
bd0f8685 | 2279 | gMC->Gsvolu("UMC1","BOX",idtmed[1319-1],parMCM,kNparMCM); |
2280 | // The MCM carrier Cu layer | |
0a5f3331 | 2281 | parMCM[0] = kMCMx /2.0; |
2282 | parMCM[1] = kMCMy /2.0; | |
2283 | parMCM[2] = kMCMcuTh/2.0; | |
bd0f8685 | 2284 | gMC->Gsvolu("UMC2","BOX",idtmed[1318-1],parMCM,kNparMCM); |
2285 | // The silicon of the chips | |
0a5f3331 | 2286 | parMCM[0] = kMCMx /2.0; |
2287 | parMCM[1] = kMCMy /2.0; | |
2288 | parMCM[2] = kMCMsiTh/2.0; | |
bd0f8685 | 2289 | gMC->Gsvolu("UMC3","BOX",idtmed[1320-1],parMCM,kNparMCM); |
0a5f3331 | 2290 | // The aluminum of the cooling plates |
2291 | parMCM[0] = kMCMx /2.0; | |
2292 | parMCM[1] = kMCMy /2.0; | |
2293 | parMCM[2] = kMCMcoTh/2.0; | |
2294 | gMC->Gsvolu("UMC4","BOX",idtmed[1324-1],parMCM,kNparMCM); | |
bd0f8685 | 2295 | |
2296 | // Put the MCM material inside the MCM mother volume | |
2297 | xpos = 0.0; | |
2298 | ypos = 0.0; | |
0a5f3331 | 2299 | zpos = -kMCMz /2.0 + kMCMpcTh/2.0; |
bd0f8685 | 2300 | gMC->Gspos("UMC1",1,"UMCM",xpos,ypos,zpos,0,"ONLY"); |
0a5f3331 | 2301 | zpos += kMCMpcTh/2.0 + kMCMcuTh/2.0; |
bd0f8685 | 2302 | gMC->Gspos("UMC2",1,"UMCM",xpos,ypos,zpos,0,"ONLY"); |
0a5f3331 | 2303 | zpos += kMCMcuTh/2.0 + kMCMsiTh/2.0; |
bd0f8685 | 2304 | gMC->Gspos("UMC3",1,"UMCM",xpos,ypos,zpos,0,"ONLY"); |
0a5f3331 | 2305 | zpos += kMCMsiTh/2.0 + kMCMcoTh/2.0; |
2306 | gMC->Gspos("UMC4",1,"UMCM",xpos,ypos,zpos,0,"ONLY"); | |
bd0f8685 | 2307 | |
2308 | // Position the MCMs in the mother volume | |
053767a4 | 2309 | for (istack = 0; istack < kNstack; istack++) { |
2310 | for (ilayer = 0; ilayer < kNlayer; ilayer++) { | |
2311 | Int_t iDet = GetDetectorSec(ilayer,istack); | |
2312 | Int_t iCopy = GetDetector(ilayer,istack,0) * 1000; | |
2313 | Int_t nMCMrow = GetRowMax(ilayer,istack,0); | |
023b669c | 2314 | Float_t ySize = (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW) |
bd0f8685 | 2315 | / ((Float_t) nMCMrow); |
2316 | Int_t nMCMcol = 8; | |
053767a4 | 2317 | Float_t xSize = (GetChamberWidth(ilayer) - 2.0*fgkCpadW) |
023b669c | 2318 | / ((Float_t) nMCMcol + 6); // Introduce 6 gaps |
2319 | Int_t iMCM[8] = { 1, 2, 3, 5, 8, 9, 10, 12 }; // 0..7 MCM + 6 gap structure | |
bd0f8685 | 2320 | sprintf(cTagV,"UU%02d",iDet); |
2321 | for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) { | |
2322 | for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) { | |
023b669c | 2323 | xpos = (0.5 + iMCM[iMCMcol]) * xSize + 1.0 |
053767a4 | 2324 | - fCwidth[ilayer]/2.0; |
023b669c | 2325 | ypos = (0.5 + iMCMrow) * ySize + 1.0 |
053767a4 | 2326 | - fClength[ilayer][istack]/2.0 + fgkHspace/2.0; |
b640260a | 2327 | zpos = -0.4 + 0.742/2.0; |
bd0f8685 | 2328 | gMC->Gspos("UMCM",iCopy+iMCMrow*10+iMCMcol,cTagV |
2329 | ,xpos,ypos,zpos,0,"ONLY"); | |
053a5ea0 | 2330 | // Add two additional smaller cooling pipes on top of the MCMs |
2331 | // to mimic the meandering structure | |
2332 | xpos = (0.5 + iMCM[iMCMcol]) * xSize + 1.0 | |
2333 | - fCwidth[ilayer]/2.0; | |
2334 | ypos = (0.5 + iMCMrow) * ySize | |
2335 | - fClength[ilayer][istack]/2.0 + fgkHspace/2.0; | |
2336 | zpos = 0.0 + 0.742/2.0; | |
2337 | parTube[0] = 0.0; | |
2338 | parTube[1] = 0.3/2.0; // Thickness of the cooling pipes | |
2339 | parTube[2] = kMCMx/2.0; | |
2340 | gMC->Gsposp("UTCP",iCopy+iMCMrow*10+iMCMcol+ 50,cTagV | |
2341 | ,xpos,ypos+1.0,zpos | |
2342 | ,matrix[2],"ONLY",parTube,kNparTube); | |
2343 | gMC->Gsposp("UTCP",iCopy+iMCMrow*10+iMCMcol+500,cTagV | |
2344 | ,xpos,ypos+2.0,zpos | |
2345 | ,matrix[2],"ONLY",parTube,kNparTube); | |
2346 | ||
023b669c | 2347 | } |
bd0f8685 | 2348 | } |
2349 | ||
2350 | } | |
2351 | } | |
2352 | ||
053a5ea0 | 2353 | // |
2354 | // The DCS boards | |
2355 | // | |
2356 | ||
2357 | const Float_t kDCSx = 9.0; | |
2358 | const Float_t kDCSy = 14.5; | |
2359 | const Float_t kDCSz = 0.3; | |
2360 | ||
2361 | const Float_t kDCSpcTh = 0.15; | |
2362 | const Float_t kDCScuTh = 0.01; | |
2363 | const Float_t kDCScoTh = 0.04; | |
2364 | ||
2365 | // The mother volume for the DCSs (air) | |
2366 | const Int_t kNparDCS = 3; | |
2367 | Float_t parDCS[kNparDCS]; | |
2368 | parDCS[0] = kDCSx /2.0; | |
2369 | parDCS[1] = kDCSy /2.0; | |
2370 | parDCS[2] = kDCSz /2.0; | |
2371 | gMC->Gsvolu("UDCS","BOX",idtmed[1302-1],parDCS,kNparDCS); | |
2372 | ||
2373 | // The DCS carrier G10 layer | |
2374 | parDCS[0] = kDCSx /2.0; | |
2375 | parDCS[1] = kDCSy /2.0; | |
2376 | parDCS[2] = kDCSpcTh/2.0; | |
2377 | gMC->Gsvolu("UDC1","BOX",idtmed[1319-1],parDCS,kNparDCS); | |
2378 | // The DCS carrier Cu layer | |
2379 | parDCS[0] = kDCSx /2.0; | |
2380 | parDCS[1] = kDCSy /2.0; | |
2381 | parDCS[2] = kDCScuTh/2.0; | |
2382 | gMC->Gsvolu("UDC2","BOX",idtmed[1318-1],parDCS,kNparDCS); | |
2383 | // The aluminum of the cooling plates | |
075abeb7 | 2384 | parDCS[0] = 5.0 /2.0; |
2385 | parDCS[1] = 5.0 /2.0; | |
053a5ea0 | 2386 | parDCS[2] = kDCScoTh/2.0; |
2387 | gMC->Gsvolu("UDC3","BOX",idtmed[1324-1],parDCS,kNparDCS); | |
2388 | ||
2389 | // Put the DCS material inside the DCS mother volume | |
2390 | xpos = 0.0; | |
2391 | ypos = 0.0; | |
2392 | zpos = -kDCSz /2.0 + kDCSpcTh/2.0; | |
2393 | gMC->Gspos("UDC1",1,"UDCS",xpos,ypos,zpos,0,"ONLY"); | |
2394 | zpos += kDCSpcTh/2.0 + kDCScuTh/2.0; | |
2395 | gMC->Gspos("UDC2",1,"UDCS",xpos,ypos,zpos,0,"ONLY"); | |
2396 | zpos += kDCScuTh/2.0 + kDCScoTh/2.0; | |
2397 | gMC->Gspos("UDC3",1,"UDCS",xpos,ypos,zpos,0,"ONLY"); | |
2398 | ||
2399 | // Put the DCS board in the chamber services mother volume | |
2400 | for (istack = 0; istack < kNstack; istack++) { | |
2401 | for (ilayer = 0; ilayer < kNlayer; ilayer++) { | |
2402 | Int_t iDet = GetDetectorSec(ilayer,istack); | |
2403 | Int_t iCopy = iDet + 1; | |
2404 | xpos = fCwidth[ilayer]/2.0 - 1.9 * (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW) | |
2405 | / ((Float_t) GetRowMax(ilayer,istack,0)); | |
075abeb7 | 2406 | ypos = 0.05 * fClength[ilayer][istack]; |
053a5ea0 | 2407 | zpos = kDCSz/2.0 - fgkCsvH/2.0; |
2408 | sprintf(cTagV,"UU%02d",iDet); | |
2409 | gMC->Gspos("UDCS",iCopy,cTagV,xpos,ypos,zpos,0,"ONLY"); | |
2410 | } | |
2411 | } | |
2412 | ||
2413 | // | |
2414 | // The ORI boards | |
2415 | // | |
2416 | ||
2417 | const Float_t kORIx = 4.2; | |
2418 | const Float_t kORIy = 13.5; | |
2419 | const Float_t kORIz = 0.3; | |
2420 | ||
2421 | const Float_t kORIpcTh = 0.15; | |
2422 | const Float_t kORIcuTh = 0.01; | |
2423 | const Float_t kORIcoTh = 0.04; | |
2424 | ||
2425 | // The mother volume for the ORIs (air) | |
2426 | const Int_t kNparORI = 3; | |
2427 | Float_t parORI[kNparORI]; | |
2428 | parORI[0] = kORIx /2.0; | |
2429 | parORI[1] = kORIy /2.0; | |
2430 | parORI[2] = kORIz /2.0; | |
2431 | gMC->Gsvolu("UORI","BOX",idtmed[1302-1],parORI,kNparORI); | |
2432 | ||
2433 | // The ORI carrier G10 layer | |
2434 | parORI[0] = kORIx /2.0; | |
2435 | parORI[1] = kORIy /2.0; | |
2436 | parORI[2] = kORIpcTh/2.0; | |
2437 | gMC->Gsvolu("UOR1","BOX",idtmed[1319-1],parORI,kNparORI); | |
2438 | // The ORI carrier Cu layer | |
2439 | parORI[0] = kORIx /2.0; | |
2440 | parORI[1] = kORIy /2.0; | |
2441 | parORI[2] = kORIcuTh/2.0; | |
2442 | gMC->Gsvolu("UOR2","BOX",idtmed[1318-1],parORI,kNparORI); | |
2443 | // The aluminum of the cooling plates | |
2444 | parORI[0] = kORIx /2.0; | |
2445 | parORI[1] = kORIy /2.0; | |
2446 | parORI[2] = kORIcoTh/2.0; | |
2447 | gMC->Gsvolu("UOR3","BOX",idtmed[1324-1],parORI,kNparORI); | |
2448 | ||
2449 | // Put the ORI material inside the ORI mother volume | |
2450 | xpos = 0.0; | |
2451 | ypos = 0.0; | |
2452 | zpos = -kORIz /2.0 + kORIpcTh/2.0; | |
2453 | gMC->Gspos("UOR1",1,"UORI",xpos,ypos,zpos,0,"ONLY"); | |
2454 | zpos += kORIpcTh/2.0 + kORIcuTh/2.0; | |
2455 | gMC->Gspos("UOR2",1,"UORI",xpos,ypos,zpos,0,"ONLY"); | |
2456 | zpos += kORIcuTh/2.0 + kORIcoTh/2.0; | |
2457 | gMC->Gspos("UOR3",1,"UORI",xpos,ypos,zpos,0,"ONLY"); | |
2458 | ||
2459 | // Put the ORI board in the chamber services mother volume | |
2460 | for (istack = 0; istack < kNstack; istack++) { | |
2461 | for (ilayer = 0; ilayer < kNlayer; ilayer++) { | |
2462 | Int_t iDet = GetDetectorSec(ilayer,istack); | |
2463 | Int_t iCopy = iDet + 1; | |
2464 | xpos = fCwidth[ilayer]/2.0 - 1.92 * (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW) | |
2465 | / ((Float_t) GetRowMax(ilayer,istack,0)); | |
2466 | ypos = -16.0; | |
2467 | zpos = kORIz/2.0 - fgkCsvH/2.0; | |
2468 | sprintf(cTagV,"UU%02d",iDet); | |
2469 | gMC->Gspos("UORI",iCopy ,cTagV,xpos,ypos,zpos,0,"ONLY"); | |
2470 | xpos = -fCwidth[ilayer]/2.0 + 3.8 * (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW) | |
2471 | / ((Float_t) GetRowMax(ilayer,istack,0)); | |
2472 | ypos = -16.0; | |
2473 | zpos = kORIz/2.0 - fgkCsvH/2.0; | |
2474 | sprintf(cTagV,"UU%02d",iDet); | |
2475 | gMC->Gspos("UORI",iCopy+kNdet,cTagV,xpos,ypos,zpos,0,"ONLY"); | |
2476 | } | |
2477 | } | |
2478 | ||
b640260a | 2479 | // |
2480 | // Services in front of the super module | |
2481 | // | |
2482 | ||
9bf8c575 | 2483 | // Gas in-/outlet pipes (INOX) |
2484 | parTube[0] = 0.0; | |
2485 | parTube[1] = 0.0; | |
2486 | parTube[2] = 0.0; | |
2487 | gMC->Gsvolu("UTG3","TUBE",idtmed[1308-1],parTube,0); | |
2488 | // The gas inside the in-/outlet pipes (Xe) | |
2489 | parTube[0] = 0.0; | |
2490 | parTube[1] = 1.2/2.0; | |
2491 | parTube[2] = -1.0; | |
2492 | gMC->Gsvolu("UTG4","TUBE",idtmed[1309-1],parTube,kNparTube); | |
2493 | xpos = 0.0; | |
2494 | ypos = 0.0; | |
2495 | zpos = 0.0; | |
2496 | gMC->Gspos("UTG4",1,"UTG3",xpos,ypos,zpos,0,"ONLY"); | |
053767a4 | 2497 | for (ilayer = 0; ilayer < kNlayer-1; ilayer++) { |
9bf8c575 | 2498 | xpos = 0.0; |
053767a4 | 2499 | ypos = fClength[ilayer][2]/2.0 |
2500 | + fClength[ilayer][1] | |
2501 | + fClength[ilayer][0]; | |
9bf8c575 | 2502 | zpos = 9.0 - fgkSheight/2.0 |
053767a4 | 2503 | + ilayer * (fgkCH + fgkVspace); |
9bf8c575 | 2504 | parTube[0] = 0.0; |
2505 | parTube[1] = 1.5/2.0; | |
053767a4 | 2506 | parTube[2] = fCwidth[ilayer]/2.0 - 2.5; |
2507 | gMC->Gsposp("UTG3",ilayer+1 ,"UTI1", xpos, ypos, zpos | |
9bf8c575 | 2508 | ,matrix[2],"ONLY",parTube,kNparTube); |
053767a4 | 2509 | gMC->Gsposp("UTG3",ilayer+1+1*kNlayer,"UTI1", xpos,-ypos, zpos |
9bf8c575 | 2510 | ,matrix[2],"ONLY",parTube,kNparTube); |
053767a4 | 2511 | gMC->Gsposp("UTG3",ilayer+1+2*kNlayer,"UTI2", xpos, ypos, zpos |
9bf8c575 | 2512 | ,matrix[2],"ONLY",parTube,kNparTube); |
053767a4 | 2513 | gMC->Gsposp("UTG3",ilayer+1+3*kNlayer,"UTI2", xpos,-ypos, zpos |
9bf8c575 | 2514 | ,matrix[2],"ONLY",parTube,kNparTube); |
053767a4 | 2515 | gMC->Gsposp("UTG3",ilayer+1+4*kNlayer,"UTI3", xpos, ypos, zpos |
9bf8c575 | 2516 | ,matrix[2],"ONLY",parTube,kNparTube); |
053767a4 | 2517 | gMC->Gsposp("UTG3",ilayer+1+5*kNlayer,"UTI3", xpos,-ypos, zpos |
9bf8c575 | 2518 | ,matrix[2],"ONLY",parTube,kNparTube); |
2519 | } | |
2520 | ||
b640260a | 2521 | // Gas distribution box |
2522 | parBox[0] = 14.50/2.0; | |
2523 | parBox[1] = 4.52/2.0; | |
2524 | parBox[2] = 5.00/2.0; | |
2525 | gMC->Gsvolu("UTGD","BOX ",idtmed[1308-1],parBox,kNparBox); | |
2526 | parBox[0] = 14.50/2.0; | |
2527 | parBox[1] = 4.00/2.0; | |
2528 | parBox[2] = 4.40/2.0; | |
2529 | gMC->Gsvolu("UTGI","BOX ",idtmed[1309-1],parBox,kNparBox); | |
2530 | parTube[0] = 0.0; | |
2531 | parTube[1] = 4.0/2.0; | |
2532 | parTube[2] = 8.0/2.0; | |
2533 | gMC->Gsvolu("UTGT","TUBE",idtmed[1308-1],parTube,kNparTube); | |
2534 | parTube[0] = 0.0; | |
2535 | parTube[1] = 3.4/2.0; | |
2536 | parTube[2] = 8.0/2.0; | |
2537 | gMC->Gsvolu("UTGG","TUBE",idtmed[1309-1],parTube,kNparTube); | |
2538 | xpos = 0.0; | |
2539 | ypos = 0.0; | |
2540 | zpos = 0.0; | |
2541 | gMC->Gspos("UTGI",1,"UTGD",xpos,ypos,zpos, 0,"ONLY"); | |
2542 | gMC->Gspos("UTGG",1,"UTGT",xpos,ypos,zpos, 0,"ONLY"); | |
2543 | xpos = 0.0; | |
2544 | ypos = 0.0; | |
2545 | zpos = 0.0; | |
2546 | gMC->Gspos("UTGD",1,"UTF1",xpos,ypos,zpos, 0,"ONLY"); | |
b640260a | 2547 | xpos = -3.0; |
2548 | ypos = 0.0; | |
2549 | zpos = 6.5; | |
2550 | gMC->Gspos("UTGT",1,"UTF1",xpos,ypos,zpos, 0,"ONLY"); | |
b640260a | 2551 | xpos = -11.25; |
2552 | ypos = 0.0; | |
2553 | zpos = 0.5; | |
2554 | gMC->Gspos("UTGT",3,"UTF1",xpos,ypos,zpos,matrix[2],"ONLY"); | |
b640260a | 2555 | xpos = 11.25; |
2556 | ypos = 0.0; | |
2557 | zpos = 0.5; | |
2558 | gMC->Gspos("UTGT",5,"UTF1",xpos,ypos,zpos,matrix[2],"ONLY"); | |
b640260a | 2559 | |
2560 | // Cooling manifolds | |
2561 | parBox[0] = 5.0/2.0; | |
2562 | parBox[1] = 23.0/2.0; | |
2563 | parBox[2] = 70.0/2.0; | |
2564 | gMC->Gsvolu("UTCM","BOX ",idtmed[1302-1],parBox,kNparBox); | |
2565 | parBox[0] = 5.0/2.0; | |
2566 | parBox[1] = 5.0/2.0; | |
2567 | parBox[2] = 70.0/2.0; | |
2568 | gMC->Gsvolu("UTCA","BOX ",idtmed[1308-1],parBox,kNparBox); | |
2569 | parBox[0] = 5.0/2.0 - 0.3; | |
2570 | parBox[1] = 5.0/2.0 - 0.3; | |
2571 | parBox[2] = 70.0/2.0 - 0.3; | |
2572 | gMC->Gsvolu("UTCW","BOX ",idtmed[1314-1],parBox,kNparBox); | |
2573 | xpos = 0.0; | |
2574 | ypos = 0.0; | |
2575 | zpos = 0.0; | |
2576 | gMC->Gspos("UTCW",1,"UTCA", xpos, ypos, zpos, 0,"ONLY"); | |
2577 | xpos = 0.0; | |
2578 | ypos = 5.0/2.0 - 23.0/2.0; | |
2579 | zpos = 0.0; | |
2580 | gMC->Gspos("UTCA",1,"UTCM", xpos, ypos, zpos, 0,"ONLY"); | |
2581 | parTube[0] = 0.0; | |
2582 | parTube[1] = 3.0/2.0; | |
2583 | parTube[2] = 18.0/2.0; | |
9bf8c575 | 2584 | gMC->Gsvolu("UTCO","TUBE",idtmed[1308-1],parTube,kNparTube); |
b640260a | 2585 | parTube[0] = 0.0; |
2586 | parTube[1] = 3.0/2.0 - 0.3; | |
2587 | parTube[2] = 18.0/2.0; | |
2588 | gMC->Gsvolu("UTCL","TUBE",idtmed[1314-1],parTube,kNparTube); | |
2589 | xpos = 0.0; | |
2590 | ypos = 0.0; | |
2591 | zpos = 0.0; | |
9bf8c575 | 2592 | gMC->Gspos("UTCL",1,"UTCO", xpos, ypos, zpos, 0,"ONLY"); |
b640260a | 2593 | xpos = 0.0; |
2594 | ypos = 2.5; | |
2595 | zpos = -70.0/2.0 + 7.0; | |
9bf8c575 | 2596 | gMC->Gspos("UTCO",1,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); |
b640260a | 2597 | zpos += 7.0; |
9bf8c575 | 2598 | gMC->Gspos("UTCO",2,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); |
b640260a | 2599 | zpos += 7.0; |
9bf8c575 | 2600 | gMC->Gspos("UTCO",3,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); |
b640260a | 2601 | zpos += 7.0; |
9bf8c575 | 2602 | gMC->Gspos("UTCO",4,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); |
b640260a | 2603 | zpos += 7.0; |
9bf8c575 | 2604 | gMC->Gspos("UTCO",5,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); |
b640260a | 2605 | zpos += 7.0; |
9bf8c575 | 2606 | gMC->Gspos("UTCO",6,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); |
b640260a | 2607 | zpos += 7.0; |
9bf8c575 | 2608 | gMC->Gspos("UTCO",7,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); |
b640260a | 2609 | zpos += 7.0; |
9bf8c575 | 2610 | gMC->Gspos("UTCO",8,"UTCM", xpos, ypos, zpos,matrix[4],"ONLY"); |
b640260a | 2611 | |
2612 | xpos = 40.0; | |
2613 | ypos = fgkFlength/2.0 - 23.0/2.0; | |
2614 | zpos = 0.0; | |
2615 | gMC->Gspos("UTCM",1,"UTF1", xpos, ypos, zpos,matrix[0],"ONLY"); | |
2616 | gMC->Gspos("UTCM",2,"UTF1",-xpos, ypos, zpos,matrix[1],"ONLY"); | |
2617 | gMC->Gspos("UTCM",3,"UTF2", xpos,-ypos, zpos,matrix[5],"ONLY"); | |
2618 | gMC->Gspos("UTCM",4,"UTF2",-xpos,-ypos, zpos,matrix[6],"ONLY"); | |
2619 | ||
f73d8692 | 2620 | // Power connection boards (Cu) |
2621 | parBox[0] = 0.5/2.0; | |
2622 | parBox[1] = 15.0/2.0; | |
2623 | parBox[2] = 7.0/2.0; | |
2624 | gMC->Gsvolu("UTPC","BOX ",idtmed[1325-1],parBox,kNparBox); | |
053767a4 | 2625 | for (ilayer = 0; ilayer < kNlayer-1; ilayer++) { |
2626 | xpos = fCwidth[ilayer]/2.0 + kPWRwid/2.0; | |
f73d8692 | 2627 | ypos = 0.0; |
053a5ea0 | 2628 | zpos = fgkVrocsm + fgkSMpltT + kPWRhgtA/2.0 - fgkSheight/2.0 + kPWRposz |
053767a4 | 2629 | + (ilayer+1) * (fgkCH + fgkVspace); |
2630 | gMC->Gspos("UTPC",ilayer ,"UTF1", xpos,ypos,zpos,matrix[0],"ONLY"); | |
2631 | gMC->Gspos("UTPC",ilayer+kNlayer,"UTF1",-xpos,ypos,zpos,matrix[1],"ONLY"); | |
f73d8692 | 2632 | } |
053a5ea0 | 2633 | xpos = fCwidth[5]/2.0 + kPWRhgtA/2.0 - 2.0; |
f73d8692 | 2634 | ypos = 0.0; |
2635 | zpos = fgkSheight/2.0 - fgkSMpltT - 2.0; | |
053767a4 | 2636 | gMC->Gspos("UTPC",5 ,"UTF1", xpos,ypos,zpos,matrix[3],"ONLY"); |
2637 | gMC->Gspos("UTPC",5+kNlayer,"UTF1",-xpos,ypos,zpos,matrix[3],"ONLY"); | |
f73d8692 | 2638 | |
2639 | // Power connection panel (Al) | |
2640 | parBox[0] = 60.0/2.0; | |
2641 | parBox[1] = 10.0/2.0; | |
2642 | parBox[2] = 3.0/2.0; | |
2643 | gMC->Gsvolu("UTPP","BOX ",idtmed[1301-1],parBox,kNparBox); | |
2644 | xpos = 0.0; | |
2645 | ypos = 0.0; | |
2646 | zpos = 18.0; | |
2647 | gMC->Gspos("UTPP",1,"UTF1", xpos,ypos,zpos,0,"ONLY"); | |
2648 | ||
2649 | // | |
2650 | // Electronics boxes | |
2651 | // | |
2652 | ||
2653 | // Casing (INOX) | |
2654 | parBox[0] = 60.0/2.0; | |
2655 | parBox[1] = 10.0/2.0; | |
2656 | parBox[2] = 6.0/2.0; | |
2657 | gMC->Gsvolu("UTE1","BOX ",idtmed[1308-1],parBox,kNparBox); | |
2658 | // Interior (air) | |
2659 | parBox[0] = parBox[0] - 0.5; | |
2660 | parBox[1] = parBox[1] - 0.5; | |
2661 | parBox[2] = parBox[2] - 0.5; | |
2662 | gMC->Gsvolu("UTE2","BOX ",idtmed[1302-1],parBox,kNparBox); | |
2663 | xpos = 0.0; | |
2664 | ypos = 0.0; | |
2665 | zpos = 0.0; | |
2666 | gMC->Gspos("UTE2",1,"UTE1",xpos,ypos,zpos,0,"ONLY"); | |
2667 | xpos = 0.0; | |
2668 | ypos = fgkSlength/2.0 - 10.0/2.0 - 3.0; | |
2669 | zpos = -fgkSheight/2.0 + 6.0/2.0 + 1.0; | |
2670 | gMC->Gspos("UTE1",1,"UTI1", xpos,ypos,zpos,0,"ONLY"); | |
2671 | gMC->Gspos("UTE1",2,"UTI2", xpos,ypos,zpos,0,"ONLY"); | |
2672 | gMC->Gspos("UTE1",3,"UTI3", xpos,ypos,zpos,0,"ONLY"); | |
2673 | ||
2674 | // Casing (INOX) | |
2675 | parBox[0] = 50.0/2.0; | |
2676 | parBox[1] = 15.0/2.0; | |
2677 | parBox[2] = 20.0/2.0; | |
2678 | gMC->Gsvolu("UTE3","BOX ",idtmed[1308-1],parBox,kNparBox); | |
2679 | // Interior (air) | |
2680 | parBox[0] = parBox[0] - 0.5; | |
2681 | parBox[1] = parBox[1] - 0.5; | |
2682 | parBox[2] = parBox[2] - 0.5; | |
2683 | gMC->Gsvolu("UTE4","BOX ",idtmed[1302-1],parBox,kNparBox); | |
2684 | xpos = 0.0; | |
2685 | ypos = 0.0; | |
2686 | zpos = 0.0; | |
2687 | gMC->Gspos("UTE4",1,"UTE3",xpos,ypos,zpos,0,"ONLY"); | |
2688 | xpos = 0.0; | |
2689 | ypos = -fgkSlength/2.0 + 15.0/2.0 + 3.0; | |
2690 | zpos = -fgkSheight/2.0 + 20.0/2.0 + 1.0; | |
2691 | gMC->Gspos("UTE3",1,"UTI1", xpos,ypos,zpos,0,"ONLY"); | |
2692 | gMC->Gspos("UTE3",2,"UTI2", xpos,ypos,zpos,0,"ONLY"); | |
2693 | gMC->Gspos("UTE3",3,"UTI3", xpos,ypos,zpos,0,"ONLY"); | |
2694 | ||
2695 | // Casing (INOX) | |
2696 | parBox[0] = 20.0/2.0; | |
2697 | parBox[1] = 7.0/2.0; | |
2698 | parBox[2] = 20.0/2.0; | |
2699 | gMC->Gsvolu("UTE5","BOX ",idtmed[1308-1],parBox,kNparBox); | |
2700 | // Interior (air) | |
2701 | parBox[0] = parBox[0] - 0.5; | |
2702 | parBox[1] = parBox[1] - 0.5; | |
2703 | parBox[2] = parBox[2] - 0.5; | |
2704 | gMC->Gsvolu("UTE6","BOX ",idtmed[1302-1],parBox,kNparBox); | |
2705 | xpos = 0.0; | |
2706 | ypos = 0.0; | |
2707 | zpos = 0.0; | |
2708 | gMC->Gspos("UTE6",1,"UTE5",xpos,ypos,zpos,0,"ONLY"); | |
2709 | xpos = 20.0; | |
2710 | ypos = -fgkSlength/2.0 + 7.0/2.0 + 3.0; | |
2711 | zpos = 0.0; | |
2712 | gMC->Gspos("UTE5",1,"UTI1", xpos,ypos,zpos,0,"ONLY"); | |
2713 | gMC->Gspos("UTE5",2,"UTI2", xpos,ypos,zpos,0,"ONLY"); | |
2714 | gMC->Gspos("UTE5",3,"UTI3", xpos,ypos,zpos,0,"ONLY"); | |
2715 | xpos = -xpos; | |
2716 | gMC->Gspos("UTE5",4,"UTI1", xpos,ypos,zpos,0,"ONLY"); | |
2717 | gMC->Gspos("UTE5",5,"UTI2", xpos,ypos,zpos,0,"ONLY"); | |
2718 | gMC->Gspos("UTE5",6,"UTI3", xpos,ypos,zpos,0,"ONLY"); | |
2719 | ||
bd0f8685 | 2720 | } |
2721 | ||
2722 | //_____________________________________________________________________________ | |
053a5ea0 | 2723 | void AliTRDgeometry::AssembleChamber(Int_t ilayer, Int_t istack) |
f7336fa3 | 2724 | { |
2725 | // | |
053a5ea0 | 2726 | // Group volumes UA, UD, UF, UU into an assembly that defines the |
2727 | // alignable volume of a single readout chamber | |
0a770ac9 | 2728 | // |
bd0f8685 | 2729 | |
a3f8715e | 2730 | Char_t cTagM[100]; |
053a5ea0 | 2731 | Char_t cTagV[100]; |
bd0f8685 | 2732 | |
053a5ea0 | 2733 | Double_t xpos = 0.0; |
2734 | Double_t ypos = 0.0; | |
2735 | Double_t zpos = 0.0; | |
bd0f8685 | 2736 | |
053a5ea0 | 2737 | Int_t idet = GetDetectorSec(ilayer,istack); |
bd0f8685 | 2738 | |
053a5ea0 | 2739 | // Create the assembly for a given ROC |
2740 | sprintf(cTagM,"UT%02d",idet); | |
2741 | TGeoVolume *roc = new TGeoVolumeAssembly(cTagM); | |
bd0f8685 | 2742 | |
053a5ea0 | 2743 | // Add the lower part of the chamber (aluminum frame), |
2744 | // including radiator and drift region | |
2745 | xpos = 0.0; | |
2746 | ypos = 0.0; | |
2747 | zpos = fgkCraH/2.0 + fgkCdrH/2.0 - fgkCHsv/2.0; | |
2748 | sprintf(cTagV,"UA%02d",idet); | |
2749 | TGeoVolume *rocA = gGeoManager->GetVolume(cTagV); | |
2750 | roc->AddNode(rocA,1,new TGeoTranslation(xpos,ypos,zpos)); | |
bd0f8685 | 2751 | |
053a5ea0 | 2752 | // Add the additional aluminum ledges |
2753 | xpos = fCwidth[ilayer]/2.0 + fgkCalWmod/2.0; | |
2754 | ypos = 0.0; | |
2755 | zpos = fgkCraH + fgkCdrH - fgkCalZpos - fgkCalHmod/2.0 - fgkCHsv/2.0; | |
2756 | sprintf(cTagV,"UZ%02d",idet); | |
2757 | TGeoVolume *rocZ = gGeoManager->GetVolume(cTagV); | |
2758 | roc->AddNode(rocZ,1,new TGeoTranslation( xpos,ypos,zpos)); | |
2759 | roc->AddNode(rocZ,2,new TGeoTranslation(-xpos,ypos,zpos)); | |
2760 | ||
2761 | // Add the additional wacosit ledges | |
2762 | xpos = fCwidth[ilayer]/2.0 + fgkCwsW/2.0; | |
2763 | ypos = 0.0; | |
2764 | zpos = fgkCraH + fgkCdrH - fgkCwsH/2.0 - fgkCHsv/2.0; | |
2765 | sprintf(cTagV,"UP%02d",idet); | |
2766 | TGeoVolume *rocP = gGeoManager->GetVolume(cTagV); | |
2767 | roc->AddNode(rocP,1,new TGeoTranslation( xpos,ypos,zpos)); | |
2768 | roc->AddNode(rocP,2,new TGeoTranslation(-xpos,ypos,zpos)); | |
2769 | ||
2770 | // Add the middle part of the chamber (G10 frame), | |
2771 | // including amplification region | |
2772 | xpos = 0.0; | |
2773 | ypos = 0.0; | |
2774 | zpos = fgkCamH/2.0 + fgkCraH + fgkCdrH - fgkCHsv/2.0; | |
2775 | sprintf(cTagV,"UD%02d",idet); | |
2776 | TGeoVolume *rocD = gGeoManager->GetVolume(cTagV); | |
2777 | roc->AddNode(rocD,1,new TGeoTranslation(xpos,ypos,zpos)); | |
bd0f8685 | 2778 | |
053a5ea0 | 2779 | // Add the upper part of the chamber (aluminum frame), |
2780 | // including back panel and FEE | |
2781 | xpos = 0.0; | |
2782 | ypos = 0.0; | |
2783 | zpos = fgkCroH/2.0 + fgkCamH + fgkCraH + fgkCdrH - fgkCHsv/2.0; | |
2784 | sprintf(cTagV,"UF%02d",idet); | |
2785 | TGeoVolume *rocF = gGeoManager->GetVolume(cTagV); | |
2786 | roc->AddNode(rocF,1,new TGeoTranslation(xpos,ypos,zpos)); | |
bd0f8685 | 2787 | |
053a5ea0 | 2788 | // Add the volume with services on top of the back panel |
2789 | xpos = 0.0; | |
2790 | ypos = 0.0; | |
2791 | zpos = fgkCsvH/2.0 + fgkCroH + fgkCamH + fgkCraH + fgkCdrH - fgkCHsv/2.0; | |
2792 | sprintf(cTagV,"UU%02d",idet); | |
2793 | TGeoVolume *rocU = gGeoManager->GetVolume(cTagV); | |
2794 | roc->AddNode(rocU,1,new TGeoTranslation(xpos,ypos,zpos)); | |
bd0f8685 | 2795 | |
053a5ea0 | 2796 | // Place the ROC assembly into the super modules |
2797 | xpos = 0.0; | |
2798 | ypos = 0.0; | |
2799 | ypos = fClength[ilayer][0] + fClength[ilayer][1] + fClength[ilayer][2]/2.0; | |
2800 | for (Int_t ic = 0; ic < istack; ic++) { | |
2801 | ypos -= fClength[ilayer][ic]; | |
bd0f8685 | 2802 | } |
053a5ea0 | 2803 | ypos -= fClength[ilayer][istack]/2.0; |
2804 | zpos = fgkVrocsm + fgkSMpltT + fgkCHsv/2.0 - fgkSheight/2.0 | |
2805 | + ilayer * (fgkCH + fgkVspace); | |
2806 | TGeoVolume *sm1 = gGeoManager->GetVolume("UTI1"); | |
2807 | TGeoVolume *sm2 = gGeoManager->GetVolume("UTI2"); | |
2808 | TGeoVolume *sm3 = gGeoManager->GetVolume("UTI3"); | |
2809 | sm1->AddNode(roc,1,new TGeoTranslation(xpos,ypos,zpos)); | |
2810 | sm2->AddNode(roc,1,new TGeoTranslation(xpos,ypos,zpos)); | |
053767a4 | 2811 | if (istack != 2) { |
053a5ea0 | 2812 | // w/o middle stack |
2813 | sm3->AddNode(roc,1,new TGeoTranslation(xpos,ypos,zpos)); | |
e7014565 | 2814 | } |
f7336fa3 | 2815 | |
2816 | } | |
2817 | ||
25ca55ce | 2818 | //_____________________________________________________________________________ |
e74d6d1b | 2819 | Bool_t AliTRDgeometry::RotateBack(Int_t det |
2820 | , const Double_t * const loc | |
2821 | , Double_t *glb) const | |
25ca55ce | 2822 | { |
2823 | // | |
2669905c | 2824 | // Rotates a chambers to transform the corresponding local frame |
2825 | // coordinates <loc> into the coordinates of the ALICE restframe <glb>. | |
25ca55ce | 2826 | // |
2827 | ||
2669905c | 2828 | Int_t sector = GetSector(det); |
25ca55ce | 2829 | |
2669905c | 2830 | glb[0] = loc[0] * fRotB11[sector] - loc[1] * fRotB12[sector]; |
2831 | glb[1] = loc[0] * fRotB21[sector] + loc[1] * fRotB22[sector]; | |
2832 | glb[2] = loc[2]; | |
f7336fa3 | 2833 | |
2834 | return kTRUE; | |
2835 | ||
2836 | } | |
2837 | ||
2838 | //_____________________________________________________________________________ | |
053767a4 | 2839 | Int_t AliTRDgeometry::GetDetectorSec(Int_t layer, Int_t stack) |
0a770ac9 | 2840 | { |
2841 | // | |
053767a4 | 2842 | // Convert plane / stack into detector number for one single sector |
0a770ac9 | 2843 | // |
2844 | ||
053767a4 | 2845 | return (layer + stack * fgkNlayer); |
0a770ac9 | 2846 | |
2847 | } | |
2848 | ||
2849 | //_____________________________________________________________________________ | |
053767a4 | 2850 | Int_t AliTRDgeometry::GetDetector(Int_t layer, Int_t stack, Int_t sector) |
f7336fa3 | 2851 | { |
2852 | // | |
053767a4 | 2853 | // Convert layer / stack / sector into detector number |
f7336fa3 | 2854 | // |
2855 | ||
053767a4 | 2856 | return (layer + stack * fgkNlayer + sector * fgkNlayer * fgkNstack); |
f7336fa3 | 2857 | |
2858 | } | |
2859 | ||
2860 | //_____________________________________________________________________________ | |
053767a4 | 2861 | Int_t AliTRDgeometry::GetLayer(Int_t det) |
f7336fa3 | 2862 | { |
2863 | // | |
053767a4 | 2864 | // Reconstruct the layer number from the detector number |
f7336fa3 | 2865 | // |
2866 | ||
053767a4 | 2867 | return ((Int_t) (det % fgkNlayer)); |
f7336fa3 | 2868 | |
2869 | } | |
2870 | ||
2871 | //_____________________________________________________________________________ | |
44024ed3 | 2872 | Int_t AliTRDgeometry::GetStack(Int_t det) |
f7336fa3 | 2873 | { |
2874 | // | |
053767a4 | 2875 | // Reconstruct the stack number from the detector number |
f7336fa3 | 2876 | // |
2877 | ||
053767a4 | 2878 | return ((Int_t) (det % (fgkNlayer * fgkNstack)) / fgkNlayer); |
f7336fa3 | 2879 | |
2880 | } | |
2881 | ||
d9950a5a | 2882 | //_____________________________________________________________________________ |
053767a4 | 2883 | Int_t AliTRDgeometry::GetStack(Double_t z, Int_t layer) |
d9950a5a | 2884 | { |
2885 | // | |
053767a4 | 2886 | // Reconstruct the chamber number from the z position and layer number |
d9950a5a | 2887 | // |
f73d8692 | 2888 | // The return function has to be protected for positiveness !! |
2889 | // | |
d9950a5a | 2890 | |
053767a4 | 2891 | if ((layer < 0) || |
2892 | (layer >= fgkNlayer)) return -1; | |
d9950a5a | 2893 | |
053767a4 | 2894 | Int_t istck = fgkNstack; |
f73d8692 | 2895 | Double_t zmin; |
2896 | Double_t zmax; | |
2897 | ||
2898 | do { | |
053767a4 | 2899 | istck--; |
2900 | if (istck < 0) break; | |
2901 | AliTRDpadPlane *pp = GetPadPlane(layer,istck); | |
0906e73e | 2902 | zmax = pp->GetRow0(); |
f73d8692 | 2903 | Int_t nrows = pp->GetNrows(); |
2904 | zmin = zmax - 2 * pp->GetLengthOPad() | |
2905 | - (nrows-2) * pp->GetLengthIPad() | |
2906 | - (nrows-1) * pp->GetRowSpacing(); | |
2907 | } while((z < zmin) || (z > zmax)); | |
d9950a5a | 2908 | |
053767a4 | 2909 | return istck; |
d9950a5a | 2910 | |
f73d8692 | 2911 | } |
0906e73e | 2912 | |
f7336fa3 | 2913 | //_____________________________________________________________________________ |
44024ed3 | 2914 | Int_t AliTRDgeometry::GetSector(Int_t det) |
f7336fa3 | 2915 | { |
2916 | // | |
2917 | // Reconstruct the sector number from the detector number | |
2918 | // | |
2919 | ||
053767a4 | 2920 | return ((Int_t) (det / (fgkNlayer * fgkNstack))); |
f7336fa3 | 2921 | |
2922 | } | |
2923 | ||
7925de54 | 2924 | //_____________________________________________________________________________ |
053767a4 | 2925 | AliTRDpadPlane *AliTRDgeometry::GetPadPlane(Int_t layer, Int_t stack) |
7925de54 | 2926 | { |
f162af62 | 2927 | // |
053767a4 | 2928 | // Returns the pad plane for a given plane <pl> and stack <st> number |
f162af62 | 2929 | // |
7925de54 | 2930 | |
f162af62 | 2931 | if (!fPadPlaneArray) { |
2932 | CreatePadPlaneArray(); | |
2933 | } | |
2934 | ||
053767a4 | 2935 | Int_t ipp = GetDetectorSec(layer,stack); |
f162af62 | 2936 | return ((AliTRDpadPlane *) fPadPlaneArray->At(ipp)); |
2937 | ||
2938 | } | |
2939 | ||
2940 | //_____________________________________________________________________________ | |
053767a4 | 2941 | Int_t AliTRDgeometry::GetRowMax(Int_t layer, Int_t stack, Int_t /*sector*/) |
f162af62 | 2942 | { |
2943 | // | |
2944 | // Returns the number of rows on the pad plane | |
2945 | // | |
2946 | ||
053767a4 | 2947 | return GetPadPlane(layer,stack)->GetNrows(); |
f162af62 | 2948 | |
2949 | } | |
2950 | ||
2951 | //_____________________________________________________________________________ | |
053767a4 | 2952 | Int_t AliTRDgeometry::GetColMax(Int_t layer) |
f162af62 | 2953 | { |
2954 | // | |
2955 | // Returns the number of rows on the pad plane | |
2956 | // | |
2957 | ||
053767a4 | 2958 | return GetPadPlane(layer,0)->GetNcols(); |
f162af62 | 2959 | |
2960 | } | |
2961 | ||
2962 | //_____________________________________________________________________________ | |
053767a4 | 2963 | Double_t AliTRDgeometry::GetRow0(Int_t layer, Int_t stack, Int_t /*sector*/) |
f162af62 | 2964 | { |
2965 | // | |
2966 | // Returns the position of the border of the first pad in a row | |
2967 | // | |
2968 | ||
053767a4 | 2969 | return GetPadPlane(layer,stack)->GetRow0(); |
f162af62 | 2970 | |
2971 | } | |
2972 | ||
2973 | //_____________________________________________________________________________ | |
053767a4 | 2974 | Double_t AliTRDgeometry::GetCol0(Int_t layer) |
f162af62 | 2975 | { |
2976 | // | |
2977 | // Returns the position of the border of the first pad in a column | |
2978 | // | |
2979 | ||
053767a4 | 2980 | return GetPadPlane(layer,0)->GetCol0(); |
f162af62 | 2981 | |
2982 | } | |
2983 | ||
b4a9cd27 | 2984 | //_____________________________________________________________________________ |
9a96f175 | 2985 | Bool_t AliTRDgeometry::CreateClusterMatrixArray() |
bd0f8685 | 2986 | { |
b4a9cd27 | 2987 | // |
9a96f175 | 2988 | // Create the matrices to transform cluster coordinates from the |
2989 | // local chamber system to the tracking coordinate system | |
b4a9cd27 | 2990 | // |
2991 | ||
030b4415 | 2992 | if (!gGeoManager) { |
2993 | return kFALSE; | |
2994 | } | |
0a5f3331 | 2995 | |
18c05eb3 | 2996 | TString volPath; |
2997 | TString vpStr = "ALIC_1/B077_1/BSEGMO"; | |
2998 | TString vpApp1 = "_1/BTRD"; | |
2999 | TString vpApp2 = "_1"; | |
3000 | TString vpApp3a = "/UTR1_1/UTS1_1/UTI1_1"; | |
3001 | TString vpApp3b = "/UTR2_1/UTS2_1/UTI2_1"; | |
3002 | TString vpApp3c = "/UTR3_1/UTS3_1/UTI3_1"; | |
3003 | ||
9a96f175 | 3004 | fClusterMatrixArray = new TObjArray(kNdet); |
90dbf5fb | 3005 | AliAlignObjParams o; |
bd0f8685 | 3006 | |
ae079791 | 3007 | for (Int_t iLayer = AliGeomManager::kTRD1; iLayer <= AliGeomManager::kTRD6; iLayer++) { |
3008 | for (Int_t iModule = 0; iModule < AliGeomManager::LayerSize(iLayer); iModule++) { | |
02cb65d6 | 3009 | |
053767a4 | 3010 | Int_t isector = iModule/Nstack(); |
3011 | Int_t istack = iModule%Nstack(); | |
02cb65d6 | 3012 | Int_t iLayerTRD = iLayer - AliGeomManager::kTRD1; |
053767a4 | 3013 | Int_t lid = GetDetector(iLayerTRD,istack,isector); |
02cb65d6 | 3014 | |
18c05eb3 | 3015 | // Check for disabled supermodules |
3016 | volPath = vpStr; | |
3017 | volPath += isector; | |
3018 | volPath += vpApp1; | |
3019 | volPath += isector; | |
3020 | volPath += vpApp2; | |
3021 | switch (isector) { | |
3022 | case 13: | |
3023 | case 14: | |
3024 | case 15: | |
3025 | if (istack == 2) { | |
3026 | continue; | |
3027 | } | |
3028 | volPath += vpApp3c; | |
3029 | break; | |
3030 | case 11: | |
3031 | case 12: | |
3032 | volPath += vpApp3b; | |
3033 | break; | |
3034 | default: | |
3035 | volPath += vpApp3a; | |
3036 | }; | |
3037 | if (!gGeoManager->CheckPath(volPath)) { | |
3038 | continue; | |
3039 | } | |
030b4415 | 3040 | |
18c05eb3 | 3041 | // Check for holes in from of PHOS |
3042 | if (((isector == 13) || (isector == 14) || (isector == 15)) && | |
3043 | (istack == 2)) { | |
3044 | continue; | |
3045 | } | |
5f6f5c22 | 3046 | |
ae079791 | 3047 | UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,iModule); |
3048 | const char *symname = AliGeomManager::SymName(volid); | |
0a5f3331 | 3049 | TGeoPNEntry *pne = gGeoManager->GetAlignableEntry(symname); |
3050 | const char *path = symname; | |
3051 | if (pne) { | |
3052 | path = pne->GetTitle(); | |
3053 | } | |
0453d10c | 3054 | else { |
3055 | continue; | |
3056 | } | |
9a96f175 | 3057 | if (!strstr(path,"ALIC")) { |
3058 | AliDebug(1,Form("Not a valid path: %s\n",path)); | |
3059 | continue; | |
3060 | } | |
0a5f3331 | 3061 | if (!gGeoManager->cd(path)) { |
b640260a | 3062 | AliError(Form("Cannot go to path: %s\n",path)); |
9a96f175 | 3063 | continue; |
0a5f3331 | 3064 | } |
c127f13a | 3065 | TGeoHMatrix *m = gGeoManager->GetCurrentMatrix(); |
25ca55ce | 3066 | |
3067 | TGeoRotation mchange; | |
3068 | mchange.RotateY(90); | |
c127f13a | 3069 | mchange.RotateX(90); |
3070 | ||
c127f13a | 3071 | // |
3072 | // Cluster transformation matrix | |
3073 | // | |
3074 | TGeoHMatrix rotMatrix(mchange.Inverse()); | |
3075 | rotMatrix.MultiplyLeft(m); | |
030b4415 | 3076 | Double_t sectorAngle = 20.0 * (isector % 18) + 10.0; |
c127f13a | 3077 | TGeoHMatrix rotSector; |
b4a9cd27 | 3078 | rotSector.RotateZ(sectorAngle); |
8a497c18 | 3079 | rotMatrix.MultiplyLeft(&rotSector.Inverse()); |
c127f13a | 3080 | |
9a96f175 | 3081 | fClusterMatrixArray->AddAt(new TGeoHMatrix(rotMatrix),lid); |
bd0f8685 | 3082 | |
25ca55ce | 3083 | } |
b4a9cd27 | 3084 | } |
bd0f8685 | 3085 | |
b4a9cd27 | 3086 | return kTRUE; |
b4a9cd27 | 3087 | |
bd0f8685 | 3088 | } |
25ca55ce | 3089 | |
9bf8c575 | 3090 | //_____________________________________________________________________________ |
3091 | Bool_t AliTRDgeometry::ChamberInGeometry(Int_t det) | |
3092 | { | |
3093 | // | |
3094 | // Checks whether the given detector is part of the current geometry | |
3095 | // | |
3096 | ||
3097 | if (!fClusterMatrixArray) { | |
3098 | CreateClusterMatrixArray(); | |
3099 | } | |
3100 | ||
3101 | if (!GetClusterMatrix(det)) { | |
3102 | return kFALSE; | |
3103 | } | |
3104 | else { | |
3105 | return kTRUE; | |
3106 | } | |
3107 | ||
3108 | } | |
2f504fcc | 3109 | |
3110 | //_____________________________________________________________________________ | |
3111 | Bool_t AliTRDgeometry::IsHole(Int_t /*la*/, Int_t st, Int_t se) const | |
3112 | { | |
3113 | // | |
3114 | // Checks for holes in front of PHOS | |
3115 | // | |
3116 | ||
3117 | if (((se == 13) || (se == 14) || (se == 15)) && | |
3118 | (st == 2)) { | |
3119 | return kTRUE; | |
3120 | } | |
053a5ea0 | 3121 | |
2f504fcc | 3122 | return kFALSE; |
053a5ea0 | 3123 | |
eb2b4f91 | 3124 | } |
2f504fcc | 3125 | |
eb2b4f91 | 3126 | //_____________________________________________________________________________ |
3127 | Bool_t AliTRDgeometry::IsOnBoundary(Int_t det, Float_t y, Float_t z, Float_t eps) const | |
3128 | { | |
053a5ea0 | 3129 | // |
3130 | // Checks whether position is at the boundary of the sensitive volume | |
3131 | // | |
3132 | ||
eb2b4f91 | 3133 | Int_t ly = GetLayer(det); |
3134 | if ((ly < 0) || | |
3135 | (ly >= fgkNlayer)) return kTRUE; | |
3136 | ||
3137 | Int_t stk = GetStack(det); | |
3138 | if ((stk < 0) || | |
3139 | (stk >= fgkNstack)) return kTRUE; | |
3140 | ||
3141 | AliTRDpadPlane *pp = (AliTRDpadPlane*) fPadPlaneArray->At(GetDetectorSec(ly, stk)); | |
3142 | if(!pp) return kTRUE; | |
3143 | ||
3144 | Double_t max = pp->GetRow0(); | |
3145 | Int_t n = pp->GetNrows(); | |
3146 | Double_t min = max - 2 * pp->GetLengthOPad() | |
3147 | - (n-2) * pp->GetLengthIPad() | |
3148 | - (n-1) * pp->GetRowSpacing(); | |
3149 | if(z < min+eps || z > max-eps){ | |
3150 | //printf("z : min[%7.2f (%7.2f)] %7.2f max[(%7.2f) %7.2f]\n", min, min+eps, z, max-eps, max); | |
3151 | return kTRUE; | |
3152 | } | |
3153 | min = pp->GetCol0(); | |
3154 | n = pp->GetNcols(); | |
3155 | max = min +2 * pp->GetWidthOPad() | |
3156 | + (n-2) * pp->GetWidthIPad() | |
3157 | + (n-1) * pp->GetColSpacing(); | |
3158 | if(y < min+eps || y > max-eps){ | |
3159 | //printf("y : min[%7.2f (%7.2f)] %7.2f max[(%7.2f) %7.2f]\n", min, min+eps, y, max-eps, max); | |
3160 | return kTRUE; | |
3161 | } | |
053a5ea0 | 3162 | |
eb2b4f91 | 3163 | return kFALSE; |
053a5ea0 | 3164 | |
2f504fcc | 3165 | } |