8d433671 |
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 | |
16 | |
17 | /////////////////////////////////////////////////////////////////////// |
18 | // // |
19 | // AliZDCv3 --- new ZDC geometry // |
20 | // with the both ZDC set geometry implemented // |
21 | // // |
22 | /////////////////////////////////////////////////////////////////////// |
23 | |
24 | // --- Standard libraries |
25 | #include "stdio.h" |
26 | |
27 | // --- ROOT system |
28 | #include <TBRIK.h> |
29 | #include <TLorentzVector.h> |
30 | #include <TMath.h> |
31 | #include <TNode.h> |
32 | #include <TRandom.h> |
33 | #include <TSystem.h> |
34 | #include <TTree.h> |
35 | #include <TVirtualMC.h> |
36 | #include <TGeoManager.h> |
37 | |
8d433671 |
38 | |
39 | // --- AliRoot classes |
40 | #include "AliConst.h" |
41 | #include "AliMagF.h" |
42 | #include "AliPDG.h" |
43 | #include "AliRun.h" |
44 | #include "AliZDCv3.h" |
45 | #include "AliMC.h" |
46 | |
47 | class AliZDCHit; |
48 | class AliPDG; |
49 | class AliDetector; |
50 | |
51 | |
52 | ClassImp(AliZDCv3) |
53 | |
54 | //_____________________________________________________________________________ |
55 | AliZDCv3::AliZDCv3() : AliZDC() |
56 | { |
57 | // |
58 | // Default constructor for Zero Degree Calorimeter |
59 | // |
60 | |
61 | fMedSensF1 = 0; |
62 | fMedSensF2 = 0; |
63 | fMedSensZN = 0; |
64 | fMedSensZP = 0; |
65 | fMedSensZEM = 0; |
66 | fMedSensGR = 0; |
67 | |
68 | } |
69 | |
70 | //_____________________________________________________________________________ |
71 | AliZDCv3::AliZDCv3(const char *name, const char *title) |
72 | : AliZDC(name,title) |
73 | { |
74 | // |
75 | // Standard constructor for Zero Degree Calorimeter |
76 | // |
77 | // |
78 | // Check that DIPO, ABSO, DIPO and SHIL is there (otherwise tracking is wrong!!!) |
79 | |
80 | AliModule* pipe=gAlice->GetModule("PIPE"); |
81 | AliModule* abso=gAlice->GetModule("ABSO"); |
82 | AliModule* dipo=gAlice->GetModule("DIPO"); |
83 | AliModule* shil=gAlice->GetModule("SHIL"); |
84 | if((!pipe) || (!abso) || (!dipo) || (!shil)) { |
85 | Error("Constructor","ZDC needs PIPE, ABSO, DIPO and SHIL!!!\n"); |
86 | exit(1); |
87 | } |
88 | |
89 | fMedSensF1 = 0; |
90 | fMedSensF2 = 0; |
91 | fMedSensZN = 0; |
92 | fMedSensZP = 0; |
93 | fMedSensZEM = 0; |
94 | fMedSensGR = 0; |
95 | fMedSensPI = 0; |
96 | fMedSensCu = 0; |
97 | |
98 | // Parameters for light tables |
99 | fNalfan = 90; // Number of Alfa (neutrons) |
100 | fNalfap = 90; // Number of Alfa (protons) |
101 | fNben = 18; // Number of beta (neutrons) |
102 | fNbep = 28; // Number of beta (protons) |
103 | Int_t ip,jp,kp; |
104 | for(ip=0; ip<4; ip++){ |
105 | for(kp=0; kp<fNalfap; kp++){ |
106 | for(jp=0; jp<fNbep; jp++){ |
107 | fTablep[ip][kp][jp] = 0; |
108 | } |
109 | } |
110 | } |
111 | Int_t in,jn,kn; |
112 | for(in=0; in<4; in++){ |
113 | for(kn=0; kn<fNalfan; kn++){ |
114 | for(jn=0; jn<fNben; jn++){ |
115 | fTablen[in][kn][jn] = 0; |
116 | } |
117 | } |
118 | } |
119 | |
120 | // Parameters for hadronic calorimeters geometry |
121 | fDimZN[0] = 3.52; |
122 | fDimZN[1] = 3.52; |
123 | fDimZN[2] = 50.; |
124 | fDimZP[0] = 11.2; |
125 | fDimZP[1] = 6.; |
126 | fDimZP[2] = 75.; |
127 | fPosZN1[0] = 0.; |
128 | fPosZN1[1] = 1.2; |
129 | fPosZN1[2] = -11650.; |
130 | fPosZP1[0] = 23.9; |
131 | fPosZP1[1] = 0.; |
132 | fPosZP1[2] = -11600.; |
133 | fPosZN2[0] = 0.; |
134 | fPosZN2[1] = 1.2; |
135 | fPosZN2[2] = 11620.; |
136 | fPosZP2[0] = 24.; |
137 | fPosZP2[1] = 0.; |
138 | fPosZP2[2] = 11620.; |
139 | fFibZN[0] = 0.; |
140 | fFibZN[1] = 0.01825; |
141 | fFibZN[2] = 50.; |
142 | fFibZP[0] = 0.; |
143 | fFibZP[1] = 0.0275; |
144 | fFibZP[2] = 75.; |
145 | |
146 | // Parameters for EM calorimeter geometry |
147 | fPosZEM[0] = 8.5; |
148 | fPosZEM[1] = 0.; |
149 | fPosZEM[2] = 735.; |
150 | |
151 | Float_t kDimZEMPb = 0.15*(TMath::Sqrt(2.)); // z-dimension of the Pb slice |
152 | Float_t kDimZEMAir = 0.001; // scotch |
153 | Float_t kFibRadZEM = 0.0315; // External fiber radius (including cladding) |
154 | Int_t kDivZEM[3] = {92, 0, 20}; // Divisions for EM detector |
155 | Float_t kDimZEM0 = 2*kDivZEM[2]*(kDimZEMPb+kDimZEMAir+kFibRadZEM*(TMath::Sqrt(2.))); |
156 | fZEMLength = kDimZEM0; |
157 | |
158 | } |
159 | |
160 | //_____________________________________________________________________________ |
161 | void AliZDCv3::CreateGeometry() |
162 | { |
163 | // |
164 | // Create the geometry for the Zero Degree Calorimeter version 2 |
165 | //* Initialize COMMON block ZDC_CGEOM |
166 | //* |
167 | |
168 | CreateBeamLine(); |
169 | CreateZDC(); |
170 | } |
171 | |
172 | //_____________________________________________________________________________ |
173 | void AliZDCv3::CreateBeamLine() |
174 | { |
175 | // |
176 | // Create the beam line elements |
177 | // |
178 | |
179 | Float_t zc, zq, zd1, zd2, zql, zd2l; |
180 | Float_t conpar[9], tubpar[3], tubspar[5], boxpar[3]; |
181 | Int_t im1, im2; |
182 | |
183 | Int_t *idtmed = fIdtmed->GetArray(); |
184 | |
185 | //////////////////////////////////////////////////////////////// |
186 | // // |
187 | // SIDE C - RB26 (dimuon side) // |
188 | // // |
189 | /////////////////////////////////////////////////////////////// |
190 | |
191 | |
192 | // -- Mother of the ZDCs (Vacuum PCON) |
193 | zd1 = 1921.6; |
194 | |
195 | conpar[0] = 0.; |
196 | conpar[1] = 360.; |
197 | conpar[2] = 2.; |
198 | conpar[3] = -13500.; |
199 | conpar[4] = 0.; |
200 | conpar[5] = 55.; |
201 | conpar[6] = -zd1; |
202 | conpar[7] = 0.; |
203 | conpar[8] = 55.; |
204 | gMC->Gsvolu("ZDC ", "PCON", idtmed[11], conpar, 9); |
205 | gMC->Gspos("ZDC ", 1, "ALIC", 0., 0., 0., 0, "ONLY"); |
206 | |
207 | |
208 | // -- FIRST SECTION OF THE BEAM PIPE (from compensator dipole to |
209 | // the beginning of D1) |
210 | tubpar[0] = 6.3/2.; |
211 | tubpar[1] = 6.7/2.; |
212 | // From beginning of ZDC volumes to beginning of D1 |
213 | tubpar[2] = (5838.3-zd1)/2.; |
214 | gMC->Gsvolu("QT01", "TUBE", idtmed[7], tubpar, 3); |
215 | gMC->Gspos("QT01", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
216 | // Ch.debug |
217 | //printf("\n QT01 TUBE pipe from z = %f to z= %f (D1 beg.)\n",-zd1,-2*tubpar[2]-zd1); |
218 | |
219 | //-- SECOND SECTION OF THE BEAM PIPE (from the end of D1 to the |
220 | // beginning of D2) |
221 | |
222 | //-- FROM MAGNETIC BEGINNING OF D1 TO MAGNETIC END OF D1 + 13.5 cm |
223 | //-- Cylindrical pipe (r = 3.47) + conical flare |
224 | |
225 | // -> Beginning of D1 |
226 | zd1 += 2.*tubpar[2]; |
227 | |
228 | tubpar[0] = 3.47; |
229 | tubpar[1] = 3.47+0.2; |
230 | tubpar[2] = 958.5/2.; |
231 | gMC->Gsvolu("QT02", "TUBE", idtmed[7], tubpar, 3); |
232 | gMC->Gspos("QT02", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
233 | // Ch.debug |
234 | //printf("\n QT02 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
235 | |
236 | zd1 += 2.*tubpar[2]; |
237 | |
238 | conpar[0] = 25./2.; |
239 | conpar[1] = 10./2.; |
240 | conpar[2] = 10.4/2.; |
241 | conpar[3] = 6.44/2.; |
242 | conpar[4] = 6.84/2.; |
243 | gMC->Gsvolu("QC01", "CONE", idtmed[7], conpar, 5); |
244 | gMC->Gspos("QC01", 1, "ZDC ", 0., 0., -conpar[0]-zd1, 0, "ONLY"); |
245 | // Ch.debug |
246 | //printf("\n QC01 CONE pipe from z = %f to z= %f\n",-zd1,-2*conpar[0]-zd1); |
247 | |
248 | zd1 += 2.*conpar[0]; |
249 | |
250 | tubpar[0] = 10./2.; |
251 | tubpar[1] = 10.4/2.; |
252 | tubpar[2] = 50./2.; |
253 | gMC->Gsvolu("QT03", "TUBE", idtmed[7], tubpar, 3); |
254 | gMC->Gspos("QT03", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
255 | // Ch.debug |
256 | //printf("\n QT03 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
257 | |
258 | zd1 += tubpar[2]*2.; |
259 | |
260 | tubpar[0] = 10./2.; |
261 | tubpar[1] = 10.4/2.; |
262 | tubpar[2] = 10./2.; |
263 | gMC->Gsvolu("QT04", "TUBE", idtmed[7], tubpar, 3); |
264 | gMC->Gspos("QT04", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
265 | // Ch.debug |
266 | //printf("\n QT04 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
267 | |
268 | zd1 += tubpar[2] * 2.; |
269 | |
270 | tubpar[0] = 10./2.; |
271 | tubpar[1] = 10.4/2.; |
272 | tubpar[2] = 3.16/2.; |
273 | gMC->Gsvolu("QT05", "TUBE", idtmed[7], tubpar, 3); |
274 | gMC->Gspos("QT05", 1, "ZDC ", 0., 0., -tubpar[0]-zd1, 0, "ONLY"); |
275 | // Ch.debug |
276 | //printf("\n QT05 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
277 | |
278 | zd1 += tubpar[2] * 2.; |
279 | |
280 | tubpar[0] = 10.0/2.; |
281 | tubpar[1] = 10.4/2; |
282 | tubpar[2] = 190./2.; |
283 | gMC->Gsvolu("QT06", "TUBE", idtmed[7], tubpar, 3); |
284 | gMC->Gspos("QT06", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
285 | // Ch.debug |
286 | //printf("\n QT06 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
287 | |
288 | zd1 += tubpar[2] * 2.; |
289 | |
290 | conpar[0] = 30./2.; |
291 | conpar[1] = 20.6/2.; |
292 | conpar[2] = 21./2.; |
293 | conpar[3] = 10./2.; |
294 | conpar[4] = 10.4/2.; |
295 | gMC->Gsvolu("QC02", "CONE", idtmed[7], conpar, 5); |
296 | gMC->Gspos("QC02", 1, "ZDC ", 0., 0., -conpar[0]-zd1, 0, "ONLY"); |
297 | // Ch.debug |
298 | //printf("\n QC02 CONE pipe from z = %f to z= %f\n",-zd1,-2*conpar[0]-zd1); |
299 | |
300 | zd1 += conpar[0] * 2.; |
301 | |
302 | tubpar[0] = 20.6/2.; |
303 | tubpar[1] = 21./2.; |
304 | tubpar[2] = 450./2.; |
305 | gMC->Gsvolu("QT07", "TUBE", idtmed[7], tubpar, 3); |
306 | gMC->Gspos("QT07", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
307 | // Ch.debug |
308 | //printf("\n QT07 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
309 | |
310 | zd1 += tubpar[2] * 2.; |
311 | |
312 | conpar[0] = 13.6/2.; |
313 | conpar[1] = 25.4/2.; |
314 | conpar[2] = 25.8/2.; |
315 | conpar[3] = 20.6/2.; |
316 | conpar[4] = 21./2.; |
317 | gMC->Gsvolu("QC03", "CONE", idtmed[7], conpar, 5); |
318 | gMC->Gspos("QC03", 1, "ZDC ", 0., 0., -conpar[0]-zd1, 0, "ONLY"); |
319 | // Ch.debug |
320 | //printf("\n QC03 CONE pipe from z = %f to z= %f\n",-zd1,-2*conpar[0]-zd1); |
321 | |
322 | zd1 += conpar[0] * 2.; |
323 | |
324 | tubpar[0] = 25.4/2.; |
325 | tubpar[1] = 25.8/2.; |
326 | tubpar[2] = 205.8/2.; |
327 | gMC->Gsvolu("QT08", "TUBE", idtmed[7], tubpar, 3); |
328 | gMC->Gspos("QT08", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
329 | // Ch.debug |
330 | //printf("\n QT08 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
331 | |
332 | zd1 += tubpar[2] * 2.; |
333 | |
334 | tubpar[0] = 50./2.; |
335 | tubpar[1] = 50.4/2.; |
336 | // QT09 is 10 cm longer to accomodate TDI |
337 | tubpar[2] = 515.4/2.; |
338 | gMC->Gsvolu("QT09", "TUBE", idtmed[7], tubpar, 3); |
339 | gMC->Gspos("QT09", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
340 | // Ch.debug |
341 | //printf("\n QT09 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
342 | |
343 | // The TDI has been moved to side C (RB24 side) where it is really placed |
344 | /* // --- Insert TDI (inside ZDC volume) |
345 | boxpar[0] = 5.6; |
346 | boxpar[1] = 5.6; |
347 | boxpar[2] = 400./2.; |
348 | gMC->Gsvolu("QTD1", "BOX ", idtmed[7], boxpar, 3); |
349 | gMC->Gspos("QTD1", 1, "ZDC ", -3., 10.6, -tubpar[2]-zd1-56.3, 0, "ONLY"); |
350 | gMC->Gspos("QTD1", 2, "ZDC ", -3., -10.6, -tubpar[2]-zd1-56.3, 0, "ONLY"); |
351 | |
352 | boxpar[0] = 0.2/2.; |
353 | boxpar[1] = 5.6; |
354 | boxpar[2] = 400./2.; |
355 | gMC->Gsvolu("QTD2", "BOX ", idtmed[6], boxpar, 3); |
356 | gMC->Gspos("QTD2", 1, "ZDC ", -8.6-boxpar[0], 0., -tubpar[2]-zd1-56.3, 0, "ONLY"); |
357 | |
358 | tubspar[0] = 10.5; // R = 10.5 cm------------------------------------------ |
359 | tubspar[1] = 10.7; |
360 | tubspar[2] = 400./2.; |
361 | tubspar[3] = 360.-75.5; |
362 | tubspar[4] = 75.5; |
363 | gMC->Gsvolu("QTD3", "TUBS", idtmed[6], tubspar, 5); |
364 | gMC->Gspos("QTD3", 1, "ZDC ", 0., 0., -tubpar[2]-zd1-56.3, 0, "ONLY"); |
365 | // Ch.debug |
366 | //printf("\n TDI volume from z = %f to z= %f\n",-tubpar[2]-zd1-56.3,-tubpar[2]-zd1-56.3-400.); |
367 | */ |
368 | zd1 += tubpar[2] * 2.; |
369 | |
370 | tubpar[0] = 50./2.; |
371 | tubpar[1] = 50.4/2.; |
372 | // QT10 is 10 cm shorter |
373 | tubpar[2] = 690./2.; |
374 | gMC->Gsvolu("QT10", "TUBE", idtmed[7], tubpar, 3); |
375 | gMC->Gspos("QT10", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
376 | // Ch.debug |
377 | //printf("\n QT10 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
378 | |
379 | zd1 += tubpar[2] * 2.; |
380 | |
381 | tubpar[0] = 50./2.; |
382 | tubpar[1] = 50.4/2.; |
383 | tubpar[2] = 778.5/2.; |
384 | gMC->Gsvolu("QT11", "TUBE", idtmed[7], tubpar, 3); |
385 | gMC->Gspos("QT11", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
386 | // Ch.debug |
387 | //printf("\n QT11 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
388 | |
389 | zd1 += tubpar[2] * 2.; |
390 | |
391 | conpar[0] = 14.18/2.; |
392 | conpar[1] = 55./2.; |
393 | conpar[2] = 55.4/2.; |
394 | conpar[3] = 50./2.; |
395 | conpar[4] = 50.4/2.; |
396 | gMC->Gsvolu("QC04", "CONE", idtmed[7], conpar, 5); |
397 | gMC->Gspos("QC04", 1, "ZDC ", 0., 0., -conpar[0]-zd1, 0, "ONLY"); |
398 | // Ch.debug |
399 | //printf("\n QC04 CONE pipe from z = %f to z= %f\n",-zd1,-2*conpar[0]-zd1); |
400 | |
401 | zd1 += conpar[0] * 2.; |
402 | |
403 | tubpar[0] = 55./2.; |
404 | tubpar[1] = 55.4/2.; |
405 | tubpar[2] = 730./2.; |
406 | gMC->Gsvolu("QT12", "TUBE", idtmed[7], tubpar, 3); |
407 | gMC->Gspos("QT12", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
408 | // Ch.debug |
409 | //printf("\n QT12 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
410 | |
411 | zd1 += tubpar[2] * 2.; |
412 | |
413 | conpar[0] = 36.86/2.; |
414 | conpar[1] = 68./2.; |
415 | conpar[2] = 68.4/2.; |
416 | conpar[3] = 55./2.; |
417 | conpar[4] = 55.4/2.; |
418 | gMC->Gsvolu("QC05", "CONE", idtmed[7], conpar, 5); |
419 | gMC->Gspos("QC05", 1, "ZDC ", 0., 0., -conpar[0]-zd1, 0, "ONLY"); |
420 | // Ch.debug |
421 | //printf("\n QC05 CONE pipe from z = %f to z= %f\n",-zd1,-2*conpar[0]-zd1); |
422 | |
423 | zd1 += conpar[0] * 2.; |
424 | |
425 | tubpar[0] = 68./2.; |
426 | tubpar[1] = 68.4/2.; |
427 | tubpar[2] = 927.3/2.; |
428 | gMC->Gsvolu("QT13", "TUBE", idtmed[7], tubpar, 3); |
429 | gMC->Gspos("QT13", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
430 | // Ch.debug |
431 | //printf("\n QT13 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
432 | |
433 | zd1 += tubpar[2] * 2.; |
434 | |
435 | tubpar[0] = 0./2.; |
436 | tubpar[1] = 68.4/2.; |
437 | tubpar[2] = 0.2/2.; |
438 | gMC->Gsvolu("QT14", "TUBE", idtmed[8], tubpar, 3); |
439 | gMC->Gspos("QT14", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
440 | // Ch.debug |
441 | //printf("\n QT14 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1); |
442 | |
443 | zd1 += tubpar[2] * 2.; |
444 | |
445 | tubpar[0] = 0./2.; |
446 | tubpar[1] = 6.4/2.; |
447 | tubpar[2] = 0.2/2.; |
448 | gMC->Gsvolu("QT15", "TUBE", idtmed[11], tubpar, 3); |
449 | //-- Position QT15 inside QT14 |
450 | gMC->Gspos("QT15", 1, "QT14", -7.7, 0., 0., 0, "ONLY"); |
451 | |
452 | gMC->Gsvolu("QT16", "TUBE", idtmed[11], tubpar, 3); |
453 | //-- Position QT16 inside QT14 |
454 | gMC->Gspos("QT16", 1, "QT14", 7.7, 0., 0., 0, "ONLY"); |
455 | |
456 | |
457 | //-- BEAM PIPE BETWEEN END OF CONICAL PIPE AND BEGINNING OF D2 |
458 | |
459 | tubpar[0] = 6.4/2.; |
460 | tubpar[1] = 6.8/2.; |
461 | tubpar[2] = 680.8/2.; |
462 | gMC->Gsvolu("QT17", "TUBE", idtmed[7], tubpar, 3); |
463 | |
464 | tubpar[0] = 6.4/2.; |
465 | tubpar[1] = 6.8/2.; |
466 | tubpar[2] = 680.8/2.; |
467 | gMC->Gsvolu("QT18", "TUBE", idtmed[7], tubpar, 3); |
468 | |
469 | // -- ROTATE PIPES |
470 | Float_t angle = 0.143*kDegrad; // Rotation angle |
471 | |
472 | //AliMatrix(im1, 90.+0.143, 0., 90., 90., 0.143, 0.); // x<0 |
473 | gMC->Matrix(im1, 90.+0.143, 0., 90., 90., 0.143, 0.); // x<0 |
474 | gMC->Gspos("QT17", 1, "ZDC ", TMath::Sin(angle) * 680.8/ 2. - 9.4, |
475 | 0., -tubpar[2]-zd1, im1, "ONLY"); |
476 | |
477 | //AliMatrix(im2, 90.-0.143, 0., 90., 90., 0.143, 180.); // x>0 (ZP) |
478 | gMC->Matrix(im2, 90.-0.143, 0., 90., 90., 0.143, 180.); // x>0 (ZP) |
479 | gMC->Gspos("QT18", 1, "ZDC ", 9.7 - TMath::Sin(angle) * 680.8 / 2., |
480 | 0., -tubpar[2]-zd1, im2, "ONLY"); |
481 | |
482 | // -- END OF BEAM PIPE VOLUME DEFINITION FOR SIDE C (RB26 SIDE) |
483 | // ---------------------------------------------------------------- |
484 | |
485 | //////////////////////////////////////////////////////////////// |
486 | // // |
487 | // SIDE A - RB24 // |
488 | // // |
489 | /////////////////////////////////////////////////////////////// |
490 | |
491 | // Rotation Matrices definition |
492 | Int_t irotpipe2, irotpipe1,irotpipe5, irotpipe6, irotpipe7, irotpipe8; |
493 | //-- rotation matrices for the tilted tube before and after the TDI |
494 | gMC->Matrix(irotpipe2,90.+6.3025,0.,90.,90.,6.3025,0.); |
495 | //-- rotation matrices for the tilted cone after the TDI to recenter vacuum chamber |
496 | gMC->Matrix(irotpipe1,90.-2.2918,0.,90.,90.,2.2918,180.); |
497 | //-- rotation matrices for the legs |
498 | gMC->Matrix(irotpipe5,90.-5.0109,0.,90.,90.,5.0109,180.); |
499 | gMC->Matrix(irotpipe6,90.+5.0109,0.,90.,90.,5.0109,0.); |
500 | gMC->Matrix(irotpipe7,90.-1.0027,0.,90.,90.,1.0027,180.); |
501 | gMC->Matrix(irotpipe8,90.+1.0027,0.,90.,90.,1.0027,0.); |
502 | |
503 | // -- Mother of the ZDCs (Vacuum PCON) |
504 | zd2 = 1910.;// zd2 initial value |
505 | |
506 | conpar[0] = 0.; |
507 | conpar[1] = 360.; |
508 | conpar[2] = 2.; |
509 | conpar[3] = zd2; |
510 | conpar[4] = 0.; |
511 | conpar[5] = 55.; |
512 | conpar[6] = 13500.; |
513 | conpar[7] = 0.; |
514 | conpar[8] = 55.; |
515 | gMC->Gsvolu("ZDC2", "PCON", idtmed[10], conpar, 9); |
516 | gMC->Gspos("ZDC2", 1, "ALIC", 0., 0., 0., 0, "ONLY"); |
517 | |
518 | // BEAM PIPE from 19.10 m to inner triplet beginning (22.965 m) |
519 | |
520 | tubpar[0] = 6.0/2.; |
521 | tubpar[1] = 6.4/2.; |
522 | tubpar[2] = 386.5/2.; |
523 | gMC->Gsvolu("QA01", "TUBE", idtmed[6], tubpar, 3); |
524 | gMC->Gspos("QA01", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
525 | // Ch.debug |
526 | printf("\n QA01 TUBE from z = %f to z= %f (Inner triplet beg.)\n",zd2,2*tubpar[2]+zd2); |
527 | |
528 | zd2 += 2.*tubpar[2]; |
529 | |
530 | // -- FIRST SECTION OF THE BEAM PIPE (from beginning of inner triplet to |
531 | // beginning of D1) |
532 | |
533 | tubpar[0] = 6.3/2.; |
534 | tubpar[1] = 6.7/2.; |
535 | tubpar[2] = 3541.8/2.; |
536 | gMC->Gsvolu("QA02", "TUBE", idtmed[6], tubpar, 3); |
537 | gMC->Gspos("QA02", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
538 | // Ch.debug |
539 | printf("\n QA02 TUBE from z = %f to z= %f (D1 beg.)\n",zd2,2*tubpar[2]+zd2); |
540 | |
541 | zd2 += 2.*tubpar[2]; |
542 | |
543 | |
544 | // -- SECOND SECTION OF THE BEAM PIPE (from the beginning of D1 to the beginning of D2) |
545 | // |
546 | // FROM (MAGNETIC) BEGINNING OF D1 TO THE (MAGNETIC) END OF D1 + 126.5 cm |
547 | // CYLINDRICAL PIPE of diameter increasing from 6.75 cm up to 8.0 cm |
548 | // from magnetic end : |
549 | // 1) 80.1 cm still with ID = 6.75 radial beam screen |
550 | // 2) 2.5 cm conical section from ID = 6.75 to ID = 8.0 cm |
551 | // 3) 43.9 cm straight section (tube) with ID = 8.0 cm |
552 | |
553 | printf("\n Beginning of D1 at z= %f\n",zd2); |
554 | |
555 | tubpar[0] = 6.75/2.; |
556 | tubpar[1] = 7.15/2.; |
557 | tubpar[2] = (945.0+80.1)/2.; |
558 | gMC->Gsvolu("QA03", "TUBE", idtmed[6], tubpar, 3); |
559 | gMC->Gspos("QA03", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
560 | // Ch.debug |
561 | printf("\n QA03 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
562 | |
563 | zd2 += 2.*tubpar[2]; |
564 | |
565 | // Transition Cone from ID=67.5 mm to ID=80 mm |
566 | |
567 | |
568 | conpar[0] = 2.5/2.; |
569 | conpar[1] = 6.75/2.; |
570 | conpar[2] = 7.15/2.; |
571 | conpar[3] = 8.0/2.; |
572 | conpar[4] = 8.4/2.; |
573 | gMC->Gsvolu("QA04", "CONE", idtmed[6], conpar, 5); |
574 | gMC->Gspos("QA04", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
575 | printf("\n Transition Cone from ID=67.5 mm to ID=80 mm \n"); |
576 | printf(" QA04 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
577 | |
578 | zd2 += 2.*conpar[0]; |
579 | |
580 | tubpar[0] = 8.0/2.; |
581 | tubpar[1] = 8.4/2.; |
582 | tubpar[2] = 43.9/2.; |
583 | gMC->Gsvolu("QA05", "TUBE", idtmed[6], tubpar, 3); |
584 | gMC->Gspos("QA05", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
585 | // Ch.debug |
586 | printf("\n QA05 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
587 | |
588 | zd2 += 2.*tubpar[2]; |
589 | printf("\n Exit of D1 at z = %f\n",zd2); |
590 | |
591 | // Bellow (ID=80 mm) - length = 0.2 m - VMAA |
592 | |
593 | tubpar[0] = 8.0/2.; |
594 | tubpar[1] = 8.4/2.; |
595 | tubpar[2] = 20./2.; |
596 | gMC->Gsvolu("QA06", "TUBE", idtmed[6], tubpar, 3); |
597 | gMC->Gspos("QA06", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
598 | // Ch.debug |
599 | printf("\n Bellow (ID=80 mm) - length = 0.2 m - VMAA \n"); |
600 | printf(" QA06 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
601 | |
602 | zd2 += 2.*tubpar[2]; |
603 | |
604 | |
605 | // Beam Position Monitor (ID=80 mm) Cu - BPMSX |
606 | |
607 | tubpar[0] = 8.0/2.; |
608 | tubpar[1] = 8.4/2.; |
609 | tubpar[2] = 28.5/2.; |
610 | gMC->Gsvolu("QA07", "TUBE", idtmed[6], tubpar, 3); |
611 | gMC->Gspos("QA07", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
612 | // Ch.debug |
613 | printf("\n Beam Position Monitor (ID=80 mm) Cu - BPMSX\n"); |
614 | printf(" QA07 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
615 | |
616 | zd2 += 2.*tubpar[2]; |
617 | |
618 | // First part of VAEHI (tube ID=80mm) |
619 | tubpar[0] = 8.0/2.; |
620 | tubpar[1] = 8.4/2.; |
621 | tubpar[2] = 28.5/2.; |
622 | gMC->Gsvolu("QAV1", "TUBE", idtmed[6], tubpar, 3); |
623 | gMC->Gspos("QAV1", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
624 | // Ch.debug |
625 | printf("\n First part of VAEHI\n"); |
626 | printf(" QAV1 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
627 | |
628 | zd2 += 2.*tubpar[2]; |
629 | |
630 | // Second part of VAEHI (transition cone from ID=80mm to ID=98mm) |
631 | conpar[0] = 4.0/2.; |
632 | conpar[1] = 8.0/2.; |
633 | conpar[2] = 8.4/2.; |
634 | conpar[3] = 9.8/2.; |
635 | conpar[4] = 10.2/2.; |
636 | gMC->Gsvolu("QAV2", "CONE", idtmed[6], conpar, 5); |
637 | gMC->Gspos("QAV2", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
638 | printf("\n Second part of VAEHI\n"); |
639 | printf(" QAV2 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
640 | |
641 | zd2 += 2.*conpar[0]; |
642 | |
643 | //Third part of VAEHI (transition cone from ID=98mm to ID=90mm) |
644 | conpar[0] = 1.0/2.; |
645 | conpar[1] = 9.8/2.; |
646 | conpar[2] = 10.2/2.; |
647 | conpar[3] = 9.0/2.; |
648 | conpar[4] = 9.4/2.; |
649 | gMC->Gsvolu("QAV3", "CONE", idtmed[6], conpar, 5); |
650 | gMC->Gspos("QAV3", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
651 | printf("\n Third part of VAEHI\n"); |
652 | printf(" QAV3 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
653 | |
654 | zd2 += 2.*conpar[0]; |
655 | |
656 | // Fourth part of VAEHI (tube ID=90mm) |
657 | tubpar[0] = 9.0/2.; |
658 | tubpar[1] = 9.4/2.; |
659 | tubpar[2] = 31.0/2.; |
660 | gMC->Gsvolu("QAV4", "TUBE", idtmed[6], tubpar, 3); |
661 | gMC->Gspos("QAV4", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
662 | // Ch.debug |
663 | printf("\n Fourth part of VAEHI\n"); |
664 | printf(" QAV4 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
665 | |
666 | zd2 += 2.*tubpar[2]; |
667 | |
668 | |
669 | //---------------------------- TCDD beginning ---------------------------------- |
670 | // space for the insertion of the collimator TCDD (2 m) |
671 | |
672 | // TCDD ZONE - 1st volume |
673 | conpar[0] = 1.3/2.; |
674 | conpar[1] = 9.0/2.; |
675 | conpar[2] = 13.0/2.; |
676 | conpar[3] = 9.6/2.; |
677 | conpar[4] = 13.0/2.; |
678 | gMC->Gsvolu("Q01T", "CONE", idtmed[6], conpar, 5); |
679 | gMC->Gspos("Q01T", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
680 | printf("\n TCDD ZONE - first volume\n"); |
681 | printf(" Q01T CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
682 | |
683 | zd2 += 2.*conpar[0]; |
684 | |
685 | // TCDD ZONE - 2nd volume |
686 | tubpar[0] = 9.6/2.; |
687 | tubpar[1] = 10.0/2.; |
688 | tubpar[2] = 1.0/2.; |
689 | gMC->Gsvolu("Q02T", "TUBE", idtmed[6], tubpar, 3); |
690 | gMC->Gspos("Q02T", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
691 | // Ch.debug |
692 | printf("\n TCDD ZONE - 2nd volume\n"); |
693 | printf(" Q02T TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
694 | |
695 | zd2 += 2.*tubpar[2]; |
696 | |
697 | // TCDD ZONE - third volume |
698 | conpar[0] = 9.04/2.; |
699 | conpar[1] = 9.6/2.; |
700 | conpar[2] = 10.0/2.; |
701 | conpar[3] = 13.8/2.; |
702 | conpar[4] = 14.2/2.; |
703 | gMC->Gsvolu("Q03T", "CONE", idtmed[6], conpar, 5); |
704 | gMC->Gspos("Q03T", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
705 | printf("\n TCDD ZONE - third volume\n"); |
706 | printf(" Q03T CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
707 | |
708 | zd2 += 2.*conpar[0]; |
709 | |
710 | // TCDD ZONE - 4th volume |
711 | tubpar[0] = 13.8/2.; |
712 | tubpar[1] = 14.2/2.; |
713 | tubpar[2] = 38.6/2.; |
714 | gMC->Gsvolu("Q04T", "TUBE", idtmed[6], tubpar, 3); |
715 | gMC->Gspos("Q04T", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
716 | // Ch.debug |
717 | printf("\n TCDD ZONE - 4th volume\n"); |
718 | printf(" Q04T TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
719 | |
720 | zd2 += 2.*tubpar[2]; |
721 | |
722 | // TCDD ZONE - 5th volume |
723 | tubpar[0] = 21.0/2.; |
724 | tubpar[1] = 21.4/2.; |
725 | tubpar[2] = 100.12/2.; |
726 | gMC->Gsvolu("Q05T", "TUBE", idtmed[6], tubpar, 3); |
727 | gMC->Gspos("Q05T", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
728 | // Ch.debug |
729 | printf("\n TCDD ZONE - 5th volume\n"); |
730 | printf(" Q05T TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
731 | |
732 | zd2 += 2.*tubpar[2]; |
733 | |
734 | // TCDD ZONE - 6th volume |
735 | tubpar[0] = 13.8/2.; |
736 | tubpar[1] = 14.2/2.; |
737 | tubpar[2] = 38.6/2.; |
738 | gMC->Gsvolu("Q06T", "TUBE", idtmed[6], tubpar, 3); |
739 | gMC->Gspos("Q06T", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
740 | // Ch.debug |
741 | printf("\n TCDD ZONE - 6th volume\n"); |
742 | printf(" Q06T TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
743 | |
744 | zd2 += 2.*tubpar[2]; |
745 | |
746 | // TCDD ZONE - 7th volume |
747 | conpar[0] = 11.34/2.; |
748 | conpar[1] = 13.8/2.; |
749 | conpar[2] = 14.2/2.; |
750 | conpar[3] = 18.0/2.; |
751 | conpar[4] = 18.4/2.; |
752 | gMC->Gsvolu("Q07T", "CONE", idtmed[6], conpar, 5); |
753 | gMC->Gspos("Q07T", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
754 | printf("\n TCDD ZONE - 7th volume\n"); |
755 | printf(" Q07T CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
756 | |
757 | zd2 += 2.*conpar[0]; |
758 | |
759 | // upper part : one single phi segment of a tube |
760 | // 5 parameters for tubs: |
761 | // inner radius = 0. |
762 | // outer radius = 7.5 cm |
763 | // half length = 50 cm |
764 | // phi1 = 0. |
765 | // phi2 = 180. |
766 | tubspar[0] = 0.0/2.; |
767 | tubspar[1] = 15.0/2.; |
768 | tubspar[2] = 100.0/2.; |
769 | tubspar[3] = 0.; |
770 | tubspar[4] = 180.; |
771 | gMC->Gsvolu("Q08T", "TUBS", idtmed[6], tubspar, 5); |
772 | // Ch.debug |
773 | printf("\n upper part : one single phi segment of a tube (Q08T)\n"); |
774 | // rectangular beam pipe inside TCDD upper part (Vacuum) |
775 | boxpar[0] = 7.0/2.; |
776 | boxpar[1] = 2.5/2.; |
777 | boxpar[2] = 100./2.; |
778 | gMC->Gsvolu("Q09T", "BOX ", idtmed[10], boxpar, 3); |
779 | // positioning vacuum box in the upper part of TCDD |
780 | gMC->Gspos("Q09T", 1, "Q08T", 0., 1.25, 0., 0, "ONLY"); |
781 | |
782 | // lower part : one single phi segment of a tube |
783 | tubspar[0] = 0.0/2.; |
784 | tubspar[1] = 15.0/2.; |
785 | tubspar[2] = 100.0/2.; |
786 | tubspar[3] = 180.; |
787 | tubspar[4] = 360.; |
788 | gMC->Gsvolu("Q10T", "TUBS", idtmed[6], tubspar, 5); |
789 | // Ch.debug |
790 | printf("\n lower part : one single phi segment of a tube (Q10T)\n"); |
791 | // rectangular beam pipe inside TCDD lower part (Vacuum) |
792 | boxpar[0] = 7.0/2.; |
793 | boxpar[1] = 2.5/2.; |
794 | boxpar[2] = 100./2.; |
795 | gMC->Gsvolu("Q11T", "BOX ", idtmed[10], boxpar, 3); |
796 | // positioning vacuum box in the lower part of TCDD |
797 | gMC->Gspos("Q11T", 1, "Q10T", 0., -1.25, 0., 0, "ONLY"); |
798 | |
799 | // positioning TCDD elements in ZDC2, (inside TCDD volume) |
800 | gMC->Gspos("Q08T", 1, "ZDC2", 0., 2.5, -100+zd2, 0, "ONLY"); |
801 | gMC->Gspos("Q10T", 1, "ZDC2", 0., -2.5, -100+zd2, 0, "ONLY"); |
802 | |
803 | // RF screen |
804 | boxpar[0] = 0.2/2.; |
805 | boxpar[1] = 5.0/2.; |
806 | boxpar[2] = 100./2.; |
807 | gMC->Gsvolu("Q12T", "BOX ", idtmed[6], boxpar, 3); |
808 | // positioning RF screen at both sides of TCDD |
809 | gMC->Gspos("Q12T", 1, "ZDC2", tubspar[1]+boxpar[0], 0., -100+zd2, 0, "ONLY"); |
810 | gMC->Gspos("Q12T", 2, "ZDC2", -tubspar[1]-boxpar[0], 0., -100+zd2, 0, "ONLY"); |
811 | printf("\n RF screen done\n"); |
812 | |
813 | //---------------------------- TCDD end --------------------------------------- |
814 | |
815 | // Bellow (ID=80 mm) - length = 0.3 m - VMAAB |
816 | tubpar[0] = 8.0/2.; |
817 | tubpar[1] = 8.4/2.; |
818 | tubpar[2] = 30.0/2.; |
819 | gMC->Gsvolu("QA08", "TUBE", idtmed[8], tubpar, 3); |
820 | gMC->Gspos("QA08", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
821 | // Ch.debug |
822 | printf("\n Bellow (ID=80 mm) - length = 0.3 m - VMAAB\n"); |
823 | printf(" QA08 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
824 | |
825 | zd2 += 2.*tubpar[2]; |
826 | |
827 | // Flange (ID=80 mm) Cu (first part of VCTCE) |
828 | tubpar[0] = 8.0/2.; |
829 | tubpar[1] = 8.4/2.; |
830 | tubpar[2] = 2.0/2.; |
831 | gMC->Gsvolu("QA09", "TUBE", idtmed[6], tubpar, 3); |
832 | gMC->Gspos("QA09", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
833 | // Ch.debug |
834 | printf("\n Flange (ID=80 mm) Cu (first part of VCTCE)\n"); |
835 | printf(" QA09 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
836 | |
837 | zd2 += 2.*tubpar[2]; |
838 | |
839 | // transition cone from ID=80 to ID=212 (second part of VCTCE) |
840 | |
841 | conpar[0] = 25.0/2.; |
842 | conpar[1] = 8.0/2.; |
843 | conpar[2] = 8.4/2.; |
844 | conpar[3] = 21.2/2.; |
845 | conpar[4] = 21.8/2.; |
846 | gMC->Gsvolu("QA10", "CONE", idtmed[6], conpar, 5); |
847 | gMC->Gspos("QA10", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
848 | printf("\n transition cone from ID=80 to ID=212 (second part of VCTCE) \n"); |
849 | printf(" QA10 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
850 | |
851 | zd2 += 2.*conpar[0]; |
852 | |
853 | // tube (ID=212 mm) Cu (third part of VCTCE) |
854 | |
855 | tubpar[0] = 21.2/2.; |
856 | tubpar[1] = 21.8/2.; |
857 | tubpar[2] = 403.54/2.; |
858 | gMC->Gsvolu("QA11", "TUBE", idtmed[6], tubpar, 3); |
859 | gMC->Gspos("QA11", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
860 | // Ch.debug |
861 | printf("\n tube (ID=212 mm) Cu (third part of VCTCE)\n"); |
862 | printf(" QA11 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
863 | |
864 | zd2 += 2.*tubpar[2]; |
865 | |
866 | // bellow (ID=212 mm) (VMBGA) |
867 | |
868 | tubpar[0] = 21.2/2.; |
869 | tubpar[1] = 21.8/2.; |
870 | tubpar[2] = 40.0/2.; |
871 | gMC->Gsvolu("QA12", "TUBE", idtmed[6], tubpar, 3); |
872 | gMC->Gspos("QA12", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
873 | // Ch.debug |
874 | printf("\n bellow (ID=212 mm) (VMBGA)\n"); |
875 | printf(" QA12 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
876 | |
877 | zd2 += 2.*tubpar[2]; |
878 | |
879 | // TDI valve assembly (ID=212 mm) |
880 | |
881 | tubpar[0] = 21.2/2.; |
882 | tubpar[1] = 21.8/2.; |
883 | tubpar[2] = 30.0/2.; |
884 | gMC->Gsvolu("QA13", "TUBE", idtmed[6], tubpar, 3); |
885 | gMC->Gspos("QA13", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
886 | // Ch.debug |
887 | printf("\n TDI valve assembly (ID=212 mm)\n"); |
888 | printf(" QA13 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
889 | |
890 | zd2 += 2.*tubpar[2]; |
891 | |
892 | // bellow (ID=212 mm) (VMBGA) |
893 | |
894 | tubpar[0] = 21.2/2.; |
895 | tubpar[1] = 21.8/2.; |
896 | tubpar[2] = 40.0/2.; |
897 | gMC->Gsvolu("QA14", "TUBE", idtmed[6], tubpar, 3); |
898 | gMC->Gspos("QA14", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
899 | // Ch.debug |
900 | printf("\n bellow (ID=212 mm) (VMBGA)\n"); |
901 | printf(" QA14 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
902 | |
903 | zd2 += 2.*tubpar[2]; |
904 | |
905 | // skewed transition piece (ID=212 mm) (before TDI) |
906 | |
907 | tubpar[0] = 21.2/2.; |
908 | tubpar[1] = 21.8/2.; |
909 | tubpar[2] = 20.0/2.; |
910 | gMC->Gsvolu("QA15", "TUBE", idtmed[6], tubpar, 3); |
911 | gMC->Gspos("QA15", 1, "ZDC2", 1.10446, 0., tubpar[2]+zd2, irotpipe2, "ONLY"); |
912 | // Ch.debug |
913 | printf("\n skewed transition piece (ID=212 mm) (before TDI)\n"); |
914 | printf(" QA15 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
915 | |
916 | zd2 += 2.*tubpar[2]; |
917 | |
918 | // Vacuum chamber containing TDI |
919 | |
920 | tubpar[0] = 54.0/2.; |
921 | tubpar[1] = 54.6/2.; |
922 | tubpar[2] = 540.0/2.; |
923 | gMC->Gsvolu("Q13T", "TUBE", idtmed[6], tubpar, 3); |
924 | gMC->Gspos("Q13T", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
925 | // Ch.debug |
926 | printf("\n Vacuum chamber containing TDI\n"); |
927 | printf(" Q13T TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
928 | |
929 | zd2 += 2.*tubpar[2]; |
930 | |
931 | //---------------- INSERT TDI INSIDE Q13T ----------------------------------- |
932 | |
933 | printf("\n START DEFINING TDI INSIDE Q13T\n"); |
934 | boxpar[0] = 11.0/2.; |
935 | boxpar[1] = 9.0/2.; |
936 | boxpar[2] = 540.0/2.; |
937 | gMC->Gsvolu("QTD1", "BOX ", idtmed[6], boxpar, 3); |
938 | gMC->Gspos("QTD1", 1, "Q13T", -3.8, 10.5, 0., 0, "ONLY"); |
939 | boxpar[0] = 11.0/2.; |
940 | boxpar[1] = 9.0/2.; |
941 | boxpar[2] = 540.0/2.; |
942 | gMC->Gsvolu("QTD2", "BOX ", idtmed[6], boxpar, 3); |
943 | gMC->Gspos("QTD2", 1, "Q13T", -3.8, -10.5, 0., 0, "ONLY"); |
944 | boxpar[0] = 5.1/2.; |
945 | boxpar[1] = 0.2/2.; |
946 | boxpar[2] = 540.0/2.; |
947 | gMC->Gsvolu("QTD3", "BOX ", idtmed[6], boxpar, 3); |
948 | gMC->Gspos("QTD3", 1, "Q13T", -3.8+5.5+boxpar[0], 6.1, 0., 0, "ONLY"); |
949 | gMC->Gspos("QTD3", 2, "Q13T", -3.8+5.5+boxpar[0], -6.1, 0., 0, "ONLY"); |
950 | gMC->Gspos("QTD3", 3, "Q13T", -3.8-5.5-boxpar[0], 6.1, 0., 0, "ONLY"); |
951 | gMC->Gspos("QTD3", 4, "Q13T", -3.8-5.5-boxpar[0], -6.1, 0., 0, "ONLY"); |
952 | |
953 | |
954 | tubspar[0] = 12.0/2.; |
955 | tubspar[1] = 12.4/2.; |
956 | tubspar[2] = 540.0/2.; |
957 | tubspar[3] = 90.; |
958 | tubspar[4] = 270.; |
959 | gMC->Gsvolu("QTD4", "TUBS", idtmed[6], tubspar, 5); |
960 | gMC->Gspos("QTD4", 1, "Q13T", -3.8-10.6, 0., 0., 0, "ONLY"); |
961 | tubspar[0] = 12.0/2.; |
962 | tubspar[1] = 12.4/2.; |
963 | tubspar[2] = 540.0/2.; |
964 | tubspar[3] = -90.; |
965 | tubspar[4] = 90.; |
966 | gMC->Gsvolu("QTD5", "TUBS", idtmed[6], tubspar, 5); |
967 | gMC->Gspos("QTD5", 1, "Q13T", -3.8+10.6, 0., 0., 0, "ONLY"); |
968 | printf("\n END DEFINING TDI INSIDE Q13T\n"); |
969 | |
970 | //---------------- END DEFINING TDI INSIDE Q13T ------------------------------- |
971 | |
972 | // skewed transition piece (ID=212 mm) (after TDI) |
973 | tubpar[0] = 21.2/2.; |
974 | tubpar[1] = 21.8/2.; |
975 | tubpar[2] = 20.0/2.; |
976 | gMC->Gsvolu("QA16", "TUBE", idtmed[6], tubpar, 3); |
977 | gMC->Gspos("QA16", 1, "ZDC2", 1.10446+2.2, 0., tubpar[2]+zd2, irotpipe2, "ONLY"); |
978 | // Ch.debug |
979 | printf("\n skewed transition piece (ID=212 mm) (after TDI)\n"); |
980 | printf(" QA16 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
981 | |
982 | zd2 += 2.*tubpar[2]; |
983 | |
984 | // bellow (ID=212 mm) (VMBGA) |
985 | tubpar[0] = 21.2/2.; |
986 | tubpar[1] = 21.8/2.; |
987 | tubpar[2] = 40.0/2.; |
988 | gMC->Gsvolu("QA17", "TUBE", idtmed[6], tubpar, 3); |
989 | gMC->Gspos("QA17", 1, "ZDC2", 4.4, 0., tubpar[2]+zd2, 0, "ONLY"); |
990 | // Ch.debug |
991 | printf("\n bellow (ID=212 mm) (VMBGA)\n"); |
992 | printf(" QA17 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
993 | |
994 | zd2 += 2.*tubpar[2]; |
995 | |
996 | // TDI valve assembly (ID=212 mm) |
997 | tubpar[0] = 21.2/2.; |
998 | tubpar[1] = 21.8/2.; |
999 | tubpar[2] = 30.0/2.; |
1000 | gMC->Gsvolu("QA18", "TUBE", idtmed[6], tubpar, 3); |
1001 | gMC->Gspos("QA18", 1, "ZDC2", 4.4, 0., tubpar[2]+zd2, 0, "ONLY"); |
1002 | // Ch.debug |
1003 | printf("\n TDI valve assembly (ID=212 mm)\n"); |
1004 | printf(" QA18 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1005 | |
1006 | zd2 += 2.*tubpar[2]; |
1007 | |
1008 | // bellow (ID=212 mm) (VMBGA) |
1009 | tubpar[0] = 21.2/2.; |
1010 | tubpar[1] = 21.8/2.; |
1011 | tubpar[2] = 40.0/2.; |
1012 | gMC->Gsvolu("QA19", "TUBE", idtmed[6], tubpar, 3); |
1013 | gMC->Gspos("QA19", 1, "ZDC2", 4.4, 0., tubpar[2]+zd2, 0, "ONLY"); |
1014 | // Ch.debug |
1015 | printf("\n bellow (ID=212 mm) (VMBGA)\n"); |
1016 | printf(" QA19 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1017 | |
1018 | zd2 += 2.*tubpar[2]; |
1019 | |
1020 | // vacuum chamber (ID=212 mm) (BTVST) |
1021 | tubpar[0] = 21.2/2.; |
1022 | tubpar[1] = 21.8/2.; |
1023 | tubpar[2] = 50.0/2.; |
1024 | gMC->Gsvolu("QA20", "TUBE", idtmed[6], tubpar, 3); |
1025 | gMC->Gspos("QA20", 1, "ZDC2", 4.4, 0., tubpar[2]+zd2, 0, "ONLY"); |
1026 | // Ch.debug |
1027 | printf("\n vacuum chamber (ID=212 mm) (BTVST)\n"); |
1028 | printf(" QA20 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1029 | |
1030 | zd2 += 2.*tubpar[2]; |
1031 | |
1032 | // bellow (ID=212 mm) (VMBGA) repeated 3 times |
1033 | tubpar[0] = 21.2/2.; |
1034 | tubpar[1] = 21.8/2.; |
1035 | tubpar[2] = 120.0/2.; |
1036 | gMC->Gsvolu("QA21", "TUBE", idtmed[6], tubpar, 3); |
1037 | gMC->Gspos("QA21", 1, "ZDC2", 4.4, 0., tubpar[2]+zd2, 0, "ONLY"); |
1038 | // Ch.debug |
1039 | printf("\n bellow (ID=212 mm) (VMBGA) repeated 3 times\n"); |
1040 | printf(" QA21 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1041 | |
1042 | zd2 += 2.*tubpar[2]; |
1043 | |
1044 | // skewed transition cone from ID=212 mm to ID=797 mm SS for the moment |
1045 | conpar[0] = 110.0/2.; |
1046 | conpar[1] = 21.2/2.; |
1047 | conpar[2] = 21.8/2.; |
1048 | conpar[3] = 79.7/2.; |
1049 | conpar[4] = 81.3/2.; |
1050 | gMC->Gsvolu("QA22", "CONE", idtmed[6], conpar, 5); |
1051 | gMC->Gspos("QA22", 1, "ZDC2", 4.4-2.201, 0., conpar[0]+zd2, irotpipe1, "ONLY"); |
1052 | printf("\n skewed transition cone from ID=212 mm to ID=797 mm\n"); |
1053 | printf(" QA22 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
1054 | |
1055 | zd2 += 2.*conpar[0]; |
1056 | |
1057 | // beam pipe (ID=797 mm) SS |
1058 | tubpar[0] = 79.7/2.; |
1059 | tubpar[1] = 81.3/2.; |
1060 | tubpar[2] = 2393.05/2.; |
1061 | gMC->Gsvolu("QA23", "TUBE", idtmed[6], tubpar, 3); |
1062 | gMC->Gspos("QA23", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
1063 | // Ch.debug |
1064 | printf("\n beam pipe (ID=797 mm) SS\n"); |
1065 | printf(" QA23 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1066 | |
1067 | zd2 += 2.*tubpar[2]; |
1068 | |
1069 | // Transition from ID=797 mm to ID=196 mm SS for the moment: |
1070 | // |
1071 | // in order to simulate the thin window opened in the transition cone |
1072 | // we divide the transition cone in three cones: |
1073 | // the first 8 mm thick |
1074 | // the second 3 mm thick |
1075 | // the third 8 mm thick |
1076 | |
1077 | // First part |
1078 | conpar[0] = 9.09/2.; // 15 degree |
1079 | conpar[1] = 79.7/2.; |
1080 | conpar[2] = 81.3/2.; // thickness 8 mm |
1081 | conpar[3] = 74.82868/2.; |
1082 | conpar[4] = 76.42868/2.; // thickness 8 mm |
1083 | gMC->Gsvolu("Q24A", "CONE", idtmed[6], conpar, 5); |
1084 | gMC->Gspos("Q24A", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
1085 | printf("\n Simulation of a window in the transition cone "); |
1086 | printf("\n from ID=797 mm to ID=196 mm\n"); |
1087 | printf("\n First part: a cone 8 mm thick\n"); |
1088 | printf(" Q24A CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
1089 | |
1090 | zd2 += 2.*conpar[0]; |
1091 | |
1092 | // Second part |
1093 | conpar[0] = 96.2/2.; // 15 degree |
1094 | conpar[1] = 74.82868/2.; |
1095 | conpar[2] = 75.42868/2.; // thickness 3 mm |
1096 | conpar[3] = 23.19588/2.; |
1097 | conpar[4] = 23.79588/2.; // thickness 3 mm |
1098 | gMC->Gsvolu("QA25", "CONE", idtmed[6], conpar, 5); |
1099 | gMC->Gspos("QA25", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
1100 | printf(" Second part: a cone 3 mm thick\n"); |
1101 | printf(" QA25 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
1102 | |
1103 | zd2 += 2.*conpar[0]; |
1104 | |
1105 | // Third part |
1106 | conpar[0] = 6.71/2.; // 15 degree |
1107 | conpar[1] = 23.19588/2.; |
1108 | conpar[2] = 24.79588/2.;// thickness 8 mm |
1109 | conpar[3] = 19.6/2.; |
1110 | conpar[4] = 21.2/2.;// thickness 8 mm |
1111 | gMC->Gsvolu("QA26", "CONE", idtmed[6], conpar, 5); |
1112 | gMC->Gspos("QA26", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
1113 | printf(" Third part: a cone 8 mm thick\n"); |
1114 | printf(" QA26 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
1115 | |
1116 | zd2 += 2.*conpar[0]; |
1117 | |
1118 | // beam pipe (ID=196 mm) |
1119 | tubpar[0] = 19.6/2.; |
1120 | tubpar[1] = 21.2/2.; |
1121 | tubpar[2] = 9.55/2.; |
1122 | gMC->Gsvolu("QA27", "TUBE", idtmed[6], tubpar, 3); |
1123 | gMC->Gspos("QA27", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
1124 | // Ch.debug |
1125 | printf("\n beam pipe (ID=196 mm)\n"); |
1126 | printf(" QA27 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1127 | |
1128 | zd2 += 2.*tubpar[2]; |
1129 | |
1130 | // Flange (ID=196 mm) |
1131 | tubpar[0] = 19.6/2.; |
1132 | tubpar[1] = 25.3/2.; |
1133 | tubpar[2] = 4.9/2.; |
1134 | gMC->Gsvolu("QF01", "TUBE", idtmed[6], tubpar, 3); |
1135 | gMC->Gspos("QF01", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
1136 | // Ch.debug |
1137 | printf("\n Flange (ID=196 mm)\n"); |
1138 | printf(" QF01 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1139 | |
1140 | zd2 += 2.*tubpar[2]; |
1141 | |
1142 | // Special Warm Module (made by 5 volumes) |
1143 | |
1144 | tubpar[0] = 20.2/2.; |
1145 | tubpar[1] = 20.6/2.; |
1146 | tubpar[2] = 2.15/2.; |
1147 | gMC->Gsvolu("QA28", "TUBE", idtmed[6], tubpar, 3); |
1148 | gMC->Gspos("QA28", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
1149 | // Ch.debug |
1150 | printf("\n Special Warm Module (made by 5 volumes)\n"); |
1151 | printf(" QA28 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1152 | |
1153 | zd2 += 2.*tubpar[2]; |
1154 | |
1155 | conpar[0] = 6.9/2.; |
1156 | conpar[1] = 20.2/2.; |
1157 | conpar[2] = 20.6/2.; |
1158 | conpar[3] = 23.9/2.; |
1159 | conpar[4] = 24.3/2.; |
1160 | gMC->Gsvolu("QA29", "CONE", idtmed[6], conpar, 5); |
1161 | gMC->Gspos("QA29", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
1162 | // Ch.debug |
1163 | printf(" QA29 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
1164 | |
1165 | zd2 += 2.*conpar[0]; |
1166 | |
1167 | tubpar[0] = 23.9/2.; |
1168 | tubpar[1] = 25.5/2.; |
1169 | tubpar[2] = 17.0/2.; |
1170 | gMC->Gsvolu("QA30", "TUBE", idtmed[6], tubpar, 3); |
1171 | gMC->Gspos("QA30", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
1172 | // Ch.debug |
1173 | printf(" QA30 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1174 | |
1175 | zd2 += 2.*tubpar[2]; |
1176 | |
1177 | conpar[0] = 6.9/2.; |
1178 | conpar[1] = 23.9/2.; |
1179 | conpar[2] = 24.3/2.; |
1180 | conpar[3] = 20.2/2.; |
1181 | conpar[4] = 20.6/2.; |
1182 | gMC->Gsvolu("QA31", "CONE", idtmed[6], conpar, 5); |
1183 | gMC->Gspos("QA31", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
1184 | // Ch.debug |
1185 | printf(" QA31 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
1186 | |
1187 | zd2 += 2.*conpar[0]; |
1188 | |
1189 | tubpar[0] = 20.2/2.; |
1190 | tubpar[1] = 20.6/2.; |
1191 | tubpar[2] = 2.15/2.; |
1192 | gMC->Gsvolu("QA32", "TUBE", idtmed[6], tubpar, 3); |
1193 | gMC->Gspos("QA32", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
1194 | // Ch.debug |
1195 | printf(" QA32 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1196 | |
1197 | zd2 += 2.*tubpar[2]; |
1198 | |
1199 | // Flange (ID=196 mm) |
1200 | tubpar[0] = 19.6/2.; |
1201 | tubpar[1] = 25.3/2.; |
1202 | tubpar[2] = 4.9/2.; |
1203 | gMC->Gsvolu("QF02", "TUBE", idtmed[6], tubpar, 3); |
1204 | gMC->Gspos("QF02", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
1205 | // Ch.debug |
1206 | printf("\n Flange (ID=196 mm)\n"); |
1207 | printf(" QF02 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1208 | |
1209 | zd2 += 2.*tubpar[2]; |
1210 | |
1211 | // simulation of the trousers (VCTYB) |
1212 | // (last design -mail 3/6/05) |
1213 | printf("\n *** START OF TROUSERS SECTION\n"); |
1214 | |
1215 | // pipe: a tube (ID = 196. OD = 200.) |
1216 | tubpar[0] = 19.6/2.; |
1217 | tubpar[1] = 20.0/2.; |
1218 | tubpar[2] = 3.9/2.; |
1219 | gMC->Gsvolu("QA33", "TUBE", idtmed[6], tubpar, 3); |
1220 | gMC->Gspos("QA33", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
1221 | // Ch.debug |
1222 | printf("\n pipe: a tube (ID = 196. OD = 200.)\n"); |
1223 | printf(" QA33 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1224 | |
1225 | zd2 += 2.*tubpar[2]; |
1226 | |
1227 | // transition cone from ID=196. to ID=216.6 |
1228 | conpar[0] = 32.55/2.; |
1229 | conpar[1] = 19.6/2.; |
1230 | conpar[2] = 20.0/2.; |
1231 | conpar[3] = 21.66/2.; |
1232 | conpar[4] = 22.06/2.; |
1233 | gMC->Gsvolu("QA34", "CONE", idtmed[6], conpar, 5); |
1234 | gMC->Gspos("QA34", 1, "ZDC2", 0., 0., conpar[0]+zd2, 0, "ONLY"); |
1235 | // Ch.debug |
1236 | printf(" QA34 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
1237 | |
1238 | zd2 += 2.*conpar[0]; |
1239 | |
1240 | // Flange: first support for the trousers |
1241 | boxpar[0] = 25.3/2.; |
1242 | boxpar[1] = 25.3/2.; |
1243 | boxpar[2] = 2.5/2.; |
1244 | gMC->Gsvolu("QF03", "BOX ", idtmed[6], boxpar, 3); |
1245 | tubpar[0] = 0.0/2.; |
1246 | tubpar[1] = 22.06/2.; |
1247 | tubpar[2] = 2.5/2.; |
1248 | gMC->Gsvolu("QFV1", "TUBE", idtmed[10], tubpar, 3); |
1249 | gMC->Gspos("QFV1", 1, "QF03", 0., 0., 0., 0, "MANY"); |
1250 | gMC->Gspos("QF03", 1, "ZDC2", 0., 0., 14.3+zd2, 0, "MANY"); |
1251 | // Ch.debug |
1252 | printf("\n Flange: first support for the trousers\n"); |
1253 | |
1254 | // tube |
1255 | tubpar[0] = 21.66/2.; |
1256 | tubpar[1] = 22.06/2.; |
1257 | tubpar[2] = 28.6/2.; |
1258 | gMC->Gsvolu("QA35", "TUBE", idtmed[6], tubpar, 3); |
1259 | gMC->Gspos("QA35", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
1260 | // Ch.debug |
1261 | printf("\n QA35 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1262 | |
1263 | zd2 += 2.*tubpar[2]; |
1264 | |
1265 | // legs of the trousers |
1266 | |
1267 | printf("\n legs of the trousers\n"); |
1268 | conpar[0] = (90.1+0.8)/2.; |
1269 | conpar[1] = 0.0/2.; |
1270 | conpar[2] = 21.6/2.; |
1271 | conpar[3] = 0.0/2.; |
1272 | conpar[4] = 5.8/2.; |
1273 | gMC->Gsvolu("QAL1", "CONE", idtmed[6], conpar, 5); |
1274 | gMC->Gsvolu("QAL2", "CONE", idtmed[6], conpar, 5); |
1275 | gMC->Gspos("QAL1", 1, "ZDC2", -3.45-0.52, 0., (90.1/2.)+zd2, irotpipe5, "MANY"); |
1276 | gMC->Gspos("QAL2", 1, "ZDC2", 3.45+0.52, 0., (90.1/2.)+zd2, irotpipe6, "MANY"); |
1277 | |
1278 | conpar[0] = (90.1+0.8)/2.; |
1279 | conpar[1] = 0.0/2.; |
1280 | conpar[2] = 21.2/2.; |
1281 | conpar[3] = 0.0/2.; |
1282 | conpar[4] = 5.4/2.; |
1283 | gMC->Gsvolu("QAL3", "CONE", idtmed[10], conpar, 5); |
1284 | gMC->Gsvolu("QAL4", "CONE", idtmed[10], conpar, 5); |
1285 | gMC->Gspos("QAL3", 1, "ZDC2", -3.45-0.52, 0., (90.1/2.)+zd2, irotpipe5, "ONLY"); |
1286 | gMC->Gspos("QAL4", 1, "ZDC2", 3.45+0.52, 0., (90.1/2.)+zd2, irotpipe6, "ONLY"); |
1287 | |
1288 | printf(" Trousers legs from z = %f to z= %f\n",zd2,90.1+zd2); |
1289 | |
1290 | zd2 += 90.1; |
1291 | |
1292 | // second part : 2 tubes (ID = 54. OD = 58.) |
1293 | tubpar[0] = 5.4/2.; |
1294 | tubpar[1] = 5.8/2.; |
1295 | tubpar[2] = 40.0/2.; |
1296 | gMC->Gsvolu("QA36", "TUBE", idtmed[6], tubpar, 3); |
1297 | gMC->Gspos("QA36", 1, "ZDC2", -15.8/2., 0., tubpar[2]+zd2, 0, "ONLY"); |
1298 | gMC->Gspos("QA36", 2, "ZDC2", 15.8/2., 0., tubpar[2]+zd2, 0, "ONLY"); |
1299 | // Ch.debug |
1300 | printf("\n second part : 2 copy of a tube (ID = 54. OD = 58.)\n"); |
1301 | printf(" QA36 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1302 | |
1303 | zd2 += 2.*tubpar[2]; |
1304 | |
1305 | // transition x2zdc to recombination chamber : skewed cone |
1306 | conpar[0] = 10./2.; |
1307 | conpar[1] = 5.4/2.; |
1308 | conpar[2] = 5.8/2.; |
1309 | conpar[3] = 6.3/2.; |
1310 | conpar[4] = 7.0/2.; |
1311 | gMC->Gsvolu("QA37", "CONE", idtmed[6], conpar, 5); |
1312 | gMC->Gspos("QA37", 1, "ZDC2", -7.9-0.175, 0., conpar[0]+zd2, irotpipe7, "ONLY"); |
1313 | gMC->Gspos("QA37", 2, "ZDC2", 7.9+0.175, 0., conpar[0]+zd2, irotpipe8, "ONLY"); |
1314 | printf("\n third part : 2 copy of a skewed cone (ID=54 --> 63 mm)\n"); |
1315 | printf(" QA37 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2); |
1316 | |
1317 | zd2 += 2.*conpar[0]; |
1318 | |
1319 | // Flange: second support for the trousers |
1320 | |
1321 | printf("\n Flange: second support for the trousers \n"); |
1322 | boxpar[0] = 25.9/2.; |
1323 | boxpar[1] = 9.4/2.; |
1324 | boxpar[2] = 1./2.; |
1325 | gMC->Gsvolu("QF04", "BOX ", idtmed[6], boxpar, 3); |
1326 | boxpar[0] = 16.5/2.; |
1327 | boxpar[1] = 7./2.; |
1328 | boxpar[2] = 1./2.; |
1329 | gMC->Gsvolu("QFV2", "BOX ", idtmed[10], boxpar, 3); |
1330 | gMC->Gspos("QFV2", 1, "QF04", 0., 0., 0., 0, "MANY"); |
1331 | tubspar[0] = 0.0/2.; |
1332 | tubspar[1] = 7./2.; |
1333 | tubspar[2] = 1./2.; |
1334 | tubspar[3] = 90.; |
1335 | tubspar[4] = 270.; |
1336 | gMC->Gsvolu("QFV3", "TUBS", idtmed[10], tubspar, 5); |
1337 | gMC->Gspos("QFV3", 1, "QF04", -16.5/2., 0., 0., 0, "MANY"); |
1338 | tubspar[0] = 0.0/2.; |
1339 | tubspar[1] = 7./2.; |
1340 | tubspar[2] = 1./2.; |
1341 | tubspar[3] = -90.; |
1342 | tubspar[4] = 90.; |
1343 | gMC->Gsvolu("QFV4", "TUBS", idtmed[10], tubspar, 5); |
1344 | gMC->Gspos("QFV4", 1, "QF04", 16.5/2., 0., 0., 0, "MANY"); |
1345 | gMC->Gspos("QF04", 1, "ZDC2", 0., 0., 18.5+zd2, 0, "MANY"); |
1346 | |
1347 | |
1348 | // 2 tubes (ID = 63 mm OD=70 mm) |
1349 | tubpar[0] = 6.3/2.; |
1350 | tubpar[1] = 7.0/2.; |
1351 | tubpar[2] = 512.9/2.; |
1352 | gMC->Gsvolu("QA38", "TUBE", idtmed[6], tubpar, 3); |
1353 | gMC->Gspos("QA38", 1, "ZDC2", -16.5/2., 0., tubpar[2]+zd2, 0, "ONLY"); |
1354 | gMC->Gspos("QA38", 2, "ZDC2", 16.5/2., 0., tubpar[2]+zd2, 0, "ONLY"); |
1355 | printf("\n 2 EQUAL TUBES (ID=63 mm)\n"); |
1356 | printf(" QA38 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2); |
1357 | |
1358 | zd2 += 2.*tubpar[2]; |
1359 | printf("\n END OF BEAM PIPE VOLUME DEFINITION AT z= %f\n",zd2); |
1360 | printf(" MAGNET DEFINITION FOLLOWS\n\n"); |
1361 | |
1362 | |
1363 | // ---------------------------------------------------------------- |
1364 | // -- MAGNET DEFINITION -> LHC OPTICS 6.5 |
1365 | // ---------------------------------------------------------------- |
1366 | // *************************************************************** |
1367 | // SIDE C - RB26 (dimuon side) |
1368 | // *************************************************************** |
1369 | // -- COMPENSATOR DIPOLE (MBXW) |
1370 | zc = 1921.6; |
1371 | |
1372 | // -- GAP (VACUUM WITH MAGNETIC FIELD) |
1373 | tubpar[0] = 0.; |
1374 | tubpar[1] = 4.5; |
1375 | tubpar[2] = 170./2.; |
1376 | gMC->Gsvolu("MBXW", "TUBE", idtmed[11], tubpar, 3); |
1377 | |
1378 | // -- YOKE |
1379 | tubpar[0] = 4.5; |
1380 | tubpar[1] = 55.; |
1381 | tubpar[2] = 170./2.; |
1382 | gMC->Gsvolu("YMBX", "TUBE", idtmed[7], tubpar, 3); |
1383 | |
1384 | gMC->Gspos("MBXW", 1, "ZDC ", 0., 0., -tubpar[2]-zc, 0, "ONLY"); |
1385 | gMC->Gspos("YMBX", 1, "ZDC ", 0., 0., -tubpar[2]-zc, 0, "ONLY"); |
1386 | |
1387 | |
1388 | // -- INNER TRIPLET |
1389 | zq = 2296.5; |
1390 | |
1391 | // -- DEFINE MQXL AND MQX QUADRUPOLE ELEMENT |
1392 | // -- MQXL |
1393 | // -- GAP (VACUUM WITH MAGNETIC FIELD) |
1394 | tubpar[0] = 0.; |
1395 | tubpar[1] = 3.5; |
1396 | tubpar[2] = 637./2.; |
1397 | gMC->Gsvolu("MQXL", "TUBE", idtmed[11], tubpar, 3); |
1398 | |
1399 | |
1400 | // -- YOKE |
1401 | tubpar[0] = 3.5; |
1402 | tubpar[1] = 22.; |
1403 | tubpar[2] = 637./2.; |
1404 | gMC->Gsvolu("YMQL", "TUBE", idtmed[7], tubpar, 3); |
1405 | |
1406 | gMC->Gspos("MQXL", 1, "ZDC ", 0., 0., -tubpar[2]-zq, 0, "ONLY"); |
1407 | gMC->Gspos("YMQL", 1, "ZDC ", 0., 0., -tubpar[2]-zq, 0, "ONLY"); |
1408 | |
1409 | gMC->Gspos("MQXL", 2, "ZDC ", 0., 0., -tubpar[2]-zq-2430., 0, "ONLY"); |
1410 | gMC->Gspos("YMQL", 2, "ZDC ", 0., 0., -tubpar[2]-zq-2430., 0, "ONLY"); |
1411 | |
1412 | // -- MQX |
1413 | // -- GAP (VACUUM WITH MAGNETIC FIELD) |
1414 | tubpar[0] = 0.; |
1415 | tubpar[1] = 3.5; |
1416 | tubpar[2] = 550./2.; |
1417 | gMC->Gsvolu("MQX ", "TUBE", idtmed[11], tubpar, 3); |
1418 | |
1419 | // -- YOKE |
1420 | tubpar[0] = 3.5; |
1421 | tubpar[1] = 22.; |
1422 | tubpar[2] = 550./2.; |
1423 | gMC->Gsvolu("YMQ ", "TUBE", idtmed[7], tubpar, 3); |
1424 | |
1425 | gMC->Gspos("MQX ", 1, "ZDC ", 0., 0., -tubpar[2]-zq-908.5, 0, "ONLY"); |
1426 | gMC->Gspos("YMQ ", 1, "ZDC ", 0., 0., -tubpar[2]-zq-908.5, 0, "ONLY"); |
1427 | |
1428 | gMC->Gspos("MQX ", 2, "ZDC ", 0., 0., -tubpar[2]-zq-1558.5, 0, "ONLY"); |
1429 | gMC->Gspos("YMQ ", 2, "ZDC ", 0., 0., -tubpar[2]-zq-1558.5, 0, "ONLY"); |
1430 | |
1431 | // -- SEPARATOR DIPOLE D1 |
1432 | zd1 = 5838.3; |
1433 | |
1434 | // -- GAP (VACUUM WITH MAGNETIC FIELD) |
1435 | tubpar[0] = 0.; |
1436 | tubpar[1] = 6.94/2.; |
1437 | tubpar[2] = 945./2.; |
1438 | gMC->Gsvolu("MD1 ", "TUBE", idtmed[11], tubpar, 3); |
1439 | |
1440 | // -- Insert horizontal Cu plates inside D1 |
1441 | // -- (to simulate the vacuum chamber) |
1442 | boxpar[0] = TMath::Sqrt(tubpar[1]*tubpar[1]-(2.98+0.2)*(2.98+0.2)) - 0.05; |
1443 | boxpar[1] = 0.2/2.; |
1444 | boxpar[2] =945./2.; |
1445 | gMC->Gsvolu("MD1V", "BOX ", idtmed[6], boxpar, 3); |
1446 | gMC->Gspos("MD1V", 1, "MD1 ", 0., 2.98+boxpar[1], 0., 0, "ONLY"); |
1447 | gMC->Gspos("MD1V", 2, "MD1 ", 0., -2.98-boxpar[1], 0., 0, "ONLY"); |
1448 | |
1449 | // -- YOKE |
1450 | tubpar[0] = 0.; |
1451 | tubpar[1] = 110./2; |
1452 | tubpar[2] = 945./2.; |
1453 | gMC->Gsvolu("YD1 ", "TUBE", idtmed[7], tubpar, 3); |
1454 | |
1455 | gMC->Gspos("YD1 ", 1, "ZDC ", 0., 0., -tubpar[2]-zd1, 0, "ONLY"); |
1456 | gMC->Gspos("MD1 ", 1, "YD1 ", 0., 0., 0., 0, "ONLY"); |
1457 | |
1458 | // -- DIPOLE D2 |
1459 | // --- LHC optics v6.4 |
1460 | zd2 = 12147.6; |
1461 | |
1462 | // -- GAP (VACUUM WITH MAGNETIC FIELD) |
1463 | tubpar[0] = 0.; |
1464 | tubpar[1] = 7.5/2.; |
1465 | tubpar[2] = 945./2.; |
1466 | gMC->Gsvolu("MD2 ", "TUBE", idtmed[11], tubpar, 3); |
1467 | |
1468 | // -- YOKE |
1469 | tubpar[0] = 0.; |
1470 | tubpar[1] = 55.; |
1471 | tubpar[2] = 945./2.; |
1472 | gMC->Gsvolu("YD2 ", "TUBE", idtmed[7], tubpar, 3); |
1473 | |
1474 | gMC->Gspos("YD2 ", 1, "ZDC ", 0., 0., -tubpar[2]-zd2, 0, "ONLY"); |
1475 | |
1476 | gMC->Gspos("MD2 ", 1, "YD2 ", -9.4, 0., 0., 0, "ONLY"); |
1477 | gMC->Gspos("MD2 ", 2, "YD2 ", 9.4, 0., 0., 0, "ONLY"); |
1478 | |
1479 | // *************************************************************** |
1480 | // SIDE A - RB24 |
1481 | // *************************************************************** |
1482 | |
1483 | // COMPENSATOR DIPOLE (MCBWA) (2nd compensator) |
1484 | // -- GAP (VACUUM WITH MAGNETIC FIELD) |
1485 | tubpar[0] = 0.; |
1486 | tubpar[1] = 4.5; |
1487 | tubpar[2] = 153./2.; |
1488 | gMC->Gsvolu("MCBW", "TUBE", idtmed[11], tubpar, 3); |
1489 | gMC->Gspos("MCBW", 1, "ZDC2", 0., 0., tubpar[2]+1972.5, 0, "ONLY"); |
1490 | |
1491 | // -- YOKE |
1492 | tubpar[0] = 4.5; |
1493 | tubpar[1] = 55.; |
1494 | tubpar[2] = 153./2.; |
1495 | gMC->Gsvolu("YMCB", "TUBE", idtmed[8], tubpar, 3); |
1496 | gMC->Gspos("YMCB", 1, "ZDC2", 0., 0., tubpar[2]+1972.5, 0, "ONLY"); |
1497 | |
1498 | |
1499 | // -- INNER TRIPLET |
1500 | zql = 2296.5; |
1501 | |
1502 | // -- DEFINE MQX1 AND MQX2 QUADRUPOLE ELEMENT |
1503 | // -- MQX1 |
1504 | // -- GAP (VACUUM WITH MAGNETIC FIELD) |
1505 | tubpar[0] = 0.; |
1506 | tubpar[1] = 3.5; |
1507 | tubpar[2] = 637./2.; |
1508 | gMC->Gsvolu("MQX1", "TUBE", idtmed[11], tubpar, 3); |
1509 | |
1510 | // -- YOKE |
1511 | tubpar[0] = 3.5; |
1512 | tubpar[1] = 22.; |
1513 | tubpar[2] = 637./2.; |
1514 | gMC->Gsvolu("YMQ1", "TUBE", idtmed[8], tubpar, 3); |
1515 | |
1516 | // -- BEAM SCREEN FOR Q1 |
1517 | tubpar[0] = 4.78/2.; |
1518 | tubpar[1] = 5.18/2.; |
1519 | tubpar[2] = 637./2.; |
1520 | gMC->Gsvolu("QBS1", "TUBE", idtmed[6], tubpar, 3); |
1521 | gMC->Gspos("QBS1", 1, "ZDC2", 0., 0., tubpar[2]+zql, 0, "ONLY"); |
1522 | // INSERT VERTICAL PLATE INSIDE Q1 |
1523 | boxpar[0] = 0.2/2.0; |
1524 | boxpar[1] = TMath::Sqrt(tubpar[0]*tubpar[0]-(1.9+0.2)*(1.9+0.2)); |
1525 | boxpar[2] =637./2.; |
1526 | gMC->Gsvolu("QBS2", "BOX ", idtmed[6], boxpar, 3); |
1527 | gMC->Gspos("QBS2", 1, "ZDC2", 1.9+boxpar[0], 0., boxpar[2]+zql, 0, "ONLY"); |
1528 | gMC->Gspos("QBS2", 2, "ZDC2", -1.9-boxpar[0], 0., boxpar[2]+zql, 0, "ONLY"); |
1529 | |
1530 | // -- BEAM SCREEN FOR Q3 |
1531 | tubpar[0] = 5.79/2.; |
1532 | tubpar[1] = 6.14/2.; |
1533 | tubpar[2] = 637./2.; |
1534 | gMC->Gsvolu("QBS3", "TUBE", idtmed[6], tubpar, 3); |
1535 | gMC->Gspos("QBS3", 1, "ZDC2", 0., 0., tubpar[2]+zql+2400., 0, "ONLY"); |
1536 | // INSERT VERTICAL PLATE INSIDE Q3 |
1537 | boxpar[0] = 0.2/2.0; |
1538 | boxpar[1] = TMath::Sqrt(tubpar[0]*tubpar[0]-(2.405+0.2)*(2.405+0.2)); |
1539 | boxpar[2] =637./2.; |
1540 | gMC->Gsvolu("QBS4", "BOX ", idtmed[6], boxpar, 3); |
1541 | gMC->Gspos("QBS4", 1, "ZDC2", 2.405+boxpar[0], 0., boxpar[2]+zql+2400., 0, "ONLY"); |
1542 | gMC->Gspos("QBS4", 2, "ZDC2", -2.405-boxpar[0], 0., boxpar[2]+zql+2400., 0, "ONLY"); |
1543 | |
1544 | // -- Q1 |
1545 | gMC->Gspos("MQX1", 1, "ZDC2", 0., 0., tubpar[2]+zql, 0, "MANY"); |
1546 | gMC->Gspos("YMQ1", 1, "ZDC2", 0., 0., tubpar[2]+zql, 0, "ONLY"); |
1547 | |
1548 | // -- Q3 |
1549 | gMC->Gspos("MQX1", 2, "ZDC2", 0., 0., tubpar[2]+zql+2400., 0, "MANY"); |
1550 | gMC->Gspos("YMQ1", 2, "ZDC2", 0., 0., tubpar[2]+zql+2400., 0, "ONLY"); |
1551 | |
1552 | |
1553 | // -- MQX2 |
1554 | // -- GAP (VACUUM WITH MAGNETIC FIELD) |
1555 | tubpar[0] = 0.; |
1556 | tubpar[1] = 3.5; |
1557 | tubpar[2] = 550./2.; |
1558 | gMC->Gsvolu("MQX2", "TUBE", idtmed[11], tubpar, 3); |
1559 | |
1560 | // -- YOKE |
1561 | tubpar[0] = 3.5; |
1562 | tubpar[1] = 22.; |
1563 | tubpar[2] = 550./2.; |
1564 | gMC->Gsvolu("YMQ2", "TUBE", idtmed[8], tubpar, 3); |
1565 | |
1566 | |
1567 | // -- BEAM SCREEN FOR Q2 |
1568 | tubpar[0] = 5.79/2.; |
1569 | tubpar[1] = 6.14/2.; |
1570 | tubpar[2] = 550./2.; |
1571 | gMC->Gsvolu("QBS5", "TUBE", idtmed[6], tubpar, 3); |
1572 | // VERTICAL PLATE INSIDE Q2 |
1573 | boxpar[0] = 0.2/2.0; |
1574 | boxpar[1] = TMath::Sqrt(tubpar[0]*tubpar[0]-(2.405+0.2)*(2.405+0.2)); |
1575 | boxpar[2] =550./2.; |
1576 | gMC->Gsvolu("QBS6", "BOX ", idtmed[6], boxpar, 3); |
1577 | |
1578 | // -- Q2A |
1579 | gMC->Gspos("MQX2", 1, "ZDC2", 0., 0., tubpar[2]+zql+908.5, 0, "MANY"); |
1580 | gMC->Gspos("QBS5", 1, "ZDC2", 0., 0., tubpar[2]+zql+908.5, 0, "ONLY"); |
1581 | gMC->Gspos("QBS6", 1, "ZDC2", 2.405+boxpar[0], 0., boxpar[2]+zql+908.5, 0, "ONLY"); |
1582 | gMC->Gspos("QBS6", 2, "ZDC2", -2.405-boxpar[0], 0., boxpar[2]+zql+908.5, 0, "ONLY"); |
1583 | gMC->Gspos("YMQ2", 1, "ZDC2", 0., 0., tubpar[2]+zql+908.5, 0, "ONLY"); |
1584 | |
1585 | |
1586 | // -- Q2B |
1587 | gMC->Gspos("MQX2", 2, "ZDC2", 0., 0., tubpar[2]+zql+1558.5, 0, "MANY"); |
1588 | gMC->Gspos("QBS5", 2, "ZDC2", 0., 0., tubpar[2]+zql+1558.5, 0, "ONLY"); |
1589 | gMC->Gspos("QBS6", 3, "ZDC2", 2.405+boxpar[0], 0., boxpar[2]+zql+1558.5, 0, "ONLY"); |
1590 | gMC->Gspos("QBS6", 4, "ZDC2", -2.405-boxpar[0], 0., boxpar[2]+zql+1558.5, 0, "ONLY"); |
1591 | gMC->Gspos("YMQ2", 2, "ZDC2", 0., 0., tubpar[2]+zql+1558.5, 0, "ONLY"); |
1592 | |
1593 | // -- SEPARATOR DIPOLE D1 |
1594 | zd2 = 5838.3; |
1595 | |
1596 | // -- GAP (VACUUM WITH MAGNETIC FIELD) |
1597 | tubpar[0] = 0.; |
1598 | tubpar[1] = 6.75/2.; |
1599 | tubpar[2] = 945./2.; |
1600 | gMC->Gsvolu("MD1L", "TUBE", idtmed[11], tubpar, 3); |
1601 | |
1602 | // -- The beam screen tube is provided by the beam pipe in D1 (QA03 volume) |
1603 | // -- Insert the beam screen horizontal Cu plates inside D1 |
1604 | // -- (to simulate the vacuum chamber) |
1605 | boxpar[0] = TMath::Sqrt(tubpar[1]*tubpar[1]-(2.885+0.2)*(2.885+0.2)); |
1606 | boxpar[1] = 0.2/2.; |
1607 | boxpar[2] =(945.+80.1)/2.; |
1608 | gMC->Gsvolu("QBS7", "BOX ", idtmed[6], boxpar, 3); |
1609 | gMC->Gspos("QBS7", 1, "ZDC2", 0., 2.885+boxpar[1],boxpar[2]+zd2, 0, "ONLY"); |
1610 | gMC->Gspos("QBS7", 2, "ZDC2", 0., -2.885-boxpar[1],boxpar[2]+zd2, 0, "ONLY"); |
1611 | |
1612 | // -- YOKE |
1613 | tubpar[0] = 7.34/2.; // to be checked |
1614 | tubpar[1] = 110./2; |
1615 | tubpar[2] = 945./2.; |
1616 | gMC->Gsvolu("YD1L", "TUBE", idtmed[8], tubpar, 3); |
1617 | |
1618 | gMC->Gspos("YD1L", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "ONLY"); |
1619 | gMC->Gspos("MD1L", 1, "ZDC2", 0., 0., tubpar[2]+zd2, 0, "MANY"); |
1620 | |
1621 | |
1622 | // -- DIPOLE D2 |
1623 | // --- LHC optics v6.5 |
1624 | zd2l = 12167.8; |
1625 | |
1626 | // -- GAP (VACUUM WITH MAGNETIC FIELD) |
1627 | tubpar[0] = 0.; |
1628 | tubpar[1] = 7.5/2.; // this has to be checked |
1629 | tubpar[2] = 945./2.; |
1630 | gMC->Gsvolu("MD2L", "TUBE", idtmed[11], tubpar, 3); |
1631 | |
1632 | // -- YOKE |
1633 | tubpar[0] = 0.; |
1634 | tubpar[1] = 55.; |
1635 | tubpar[2] = 945./2.; |
1636 | gMC->Gsvolu("YD2L", "TUBE", idtmed[8], tubpar, 3); |
1637 | |
1638 | gMC->Gspos("YD2L", 1, "ZDC2", 0., 0., tubpar[2]+zd2l, 0, "ONLY"); |
1639 | |
1640 | gMC->Gspos("MD2L", 1, "YD2L", -9.4, 0., 0., 0, "ONLY"); |
1641 | gMC->Gspos("MD2L", 2, "YD2L", 9.4, 0., 0., 0, "ONLY"); |
1642 | |
1643 | // -- END OF MAGNET DEFINITION |
1644 | } |
1645 | |
1646 | //_____________________________________________________________________________ |
1647 | void AliZDCv3::CreateZDC() |
1648 | { |
1649 | // |
1650 | // Create the various ZDCs (ZN + ZP) |
1651 | // |
1652 | |
1653 | Float_t dimPb[6], dimVoid[6]; |
1654 | |
1655 | Int_t *idtmed = fIdtmed->GetArray(); |
1656 | |
1657 | // Parameters for hadronic calorimeters geometry |
1658 | // NB -> parameters used ONLY in CreateZDC() |
1659 | Float_t fGrvZN[3] = {0.03, 0.03, 50.}; // Grooves for neutron detector |
1660 | Float_t fGrvZP[3] = {0.04, 0.04, 75.}; // Grooves for proton detector |
1661 | Int_t fDivZN[3] = {11, 11, 0}; // Division for neutron detector |
1662 | Int_t fDivZP[3] = {7, 15, 0}; // Division for proton detector |
1663 | Int_t fTowZN[2] = {2, 2}; // Tower for neutron detector |
1664 | Int_t fTowZP[2] = {4, 1}; // Tower for proton detector |
1665 | |
1666 | // Parameters for EM calorimeter geometry |
1667 | // NB -> parameters used ONLY in CreateZDC() |
1668 | Float_t kDimZEMPb = 0.15*(TMath::Sqrt(2.)); // z-dimension of the Pb slice |
1669 | Float_t kFibRadZEM = 0.0315; // External fiber radius (including cladding) |
1670 | Int_t fDivZEM[3] = {92, 0, 20}; // Divisions for EM detector |
1671 | Float_t fDimZEM[6] = {fZEMLength, 3.5, 3.5, 45., 0., 0.}; // Dimensions of EM detector |
1672 | Float_t fFibZEM2 = fDimZEM[2]/TMath::Sin(fDimZEM[3]*kDegrad)-kFibRadZEM; |
1673 | Float_t fFibZEM[3] = {0., 0.0275, fFibZEM2}; // Fibers for EM calorimeter |
1674 | |
1675 | |
1676 | //-- Create calorimeters geometry |
1677 | |
1678 | // ------------------------------------------------------------------------------- |
1679 | //--> Neutron calorimeter (ZN) |
1680 | |
1681 | gMC->Gsvolu("ZNEU", "BOX ", idtmed[1], fDimZN, 3); // Passive material |
1682 | gMC->Gsvolu("ZNF1", "TUBE", idtmed[3], fFibZN, 3); // Active material |
1683 | gMC->Gsvolu("ZNF2", "TUBE", idtmed[4], fFibZN, 3); |
1684 | gMC->Gsvolu("ZNF3", "TUBE", idtmed[4], fFibZN, 3); |
1685 | gMC->Gsvolu("ZNF4", "TUBE", idtmed[3], fFibZN, 3); |
1686 | gMC->Gsvolu("ZNG1", "BOX ", idtmed[12], fGrvZN, 3); // Empty grooves |
1687 | gMC->Gsvolu("ZNG2", "BOX ", idtmed[12], fGrvZN, 3); |
1688 | gMC->Gsvolu("ZNG3", "BOX ", idtmed[12], fGrvZN, 3); |
1689 | gMC->Gsvolu("ZNG4", "BOX ", idtmed[12], fGrvZN, 3); |
1690 | |
1691 | // Divide ZNEU in towers (for hits purposes) |
1692 | |
1693 | gMC->Gsdvn("ZNTX", "ZNEU", fTowZN[0], 1); // x-tower |
1694 | gMC->Gsdvn("ZN1 ", "ZNTX", fTowZN[1], 2); // y-tower |
1695 | |
1696 | //-- Divide ZN1 in minitowers |
1697 | // fDivZN[0]= NUMBER OF FIBERS PER TOWER ALONG X-AXIS, |
1698 | // fDivZN[1]= NUMBER OF FIBERS PER TOWER ALONG Y-AXIS |
1699 | // (4 fibres per minitower) |
1700 | |
1701 | gMC->Gsdvn("ZNSL", "ZN1 ", fDivZN[1], 2); // Slices |
1702 | gMC->Gsdvn("ZNST", "ZNSL", fDivZN[0], 1); // Sticks |
1703 | |
1704 | // --- Position the empty grooves in the sticks (4 grooves per stick) |
1705 | Float_t dx = fDimZN[0] / fDivZN[0] / 4.; |
1706 | Float_t dy = fDimZN[1] / fDivZN[1] / 4.; |
1707 | |
1708 | gMC->Gspos("ZNG1", 1, "ZNST", 0.-dx, 0.+dy, 0., 0, "ONLY"); |
1709 | gMC->Gspos("ZNG2", 1, "ZNST", 0.+dx, 0.+dy, 0., 0, "ONLY"); |
1710 | gMC->Gspos("ZNG3", 1, "ZNST", 0.-dx, 0.-dy, 0., 0, "ONLY"); |
1711 | gMC->Gspos("ZNG4", 1, "ZNST", 0.+dx, 0.-dy, 0., 0, "ONLY"); |
1712 | |
1713 | // --- Position the fibers in the grooves |
1714 | gMC->Gspos("ZNF1", 1, "ZNG1", 0., 0., 0., 0, "ONLY"); |
1715 | gMC->Gspos("ZNF2", 1, "ZNG2", 0., 0., 0., 0, "ONLY"); |
1716 | gMC->Gspos("ZNF3", 1, "ZNG3", 0., 0., 0., 0, "ONLY"); |
1717 | gMC->Gspos("ZNF4", 1, "ZNG4", 0., 0., 0., 0, "ONLY"); |
1718 | |
1719 | // --- Position the neutron calorimeter in ZDC |
1720 | // -- Rotation of ZDCs |
1721 | Int_t irotzdc; |
1722 | gMC->Matrix(irotzdc, 90., 180., 90., 90., 180., 0.); |
1723 | // |
1724 | gMC->Gspos("ZNEU", 1, "ZDC ", fPosZN1[0], fPosZN1[1], fPosZN1[2]-fDimZN[2], irotzdc, "ONLY"); |
1725 | //Ch debug |
1726 | //printf("\n ZN -> %f < z < %f cm\n",fPosZN[2],fPosZN[2]-2*fDimZN[2]); |
1727 | |
1728 | // --- Position the neutron calorimeter in ZDC2 (left line) |
1729 | // -- No Rotation of ZDCs |
1730 | gMC->Gspos("ZNEU", 2, "ZDC2", fPosZN2[0], fPosZN2[1], fPosZN2[2]+fDimZN[2], 0, "ONLY"); |
1731 | //Ch debug |
1732 | //printf("\n ZN left -> %f < z < %f cm\n",fPosZNl[2],fPosZNl[2]+2*fDimZN[2]); |
1733 | |
1734 | |
1735 | // ------------------------------------------------------------------------------- |
1736 | //--> Proton calorimeter (ZP) |
1737 | |
1738 | gMC->Gsvolu("ZPRO", "BOX ", idtmed[2], fDimZP, 3); // Passive material |
1739 | gMC->Gsvolu("ZPF1", "TUBE", idtmed[3], fFibZP, 3); // Active material |
1740 | gMC->Gsvolu("ZPF2", "TUBE", idtmed[4], fFibZP, 3); |
1741 | gMC->Gsvolu("ZPF3", "TUBE", idtmed[4], fFibZP, 3); |
1742 | gMC->Gsvolu("ZPF4", "TUBE", idtmed[3], fFibZP, 3); |
1743 | gMC->Gsvolu("ZPG1", "BOX ", idtmed[12], fGrvZP, 3); // Empty grooves |
1744 | gMC->Gsvolu("ZPG2", "BOX ", idtmed[12], fGrvZP, 3); |
1745 | gMC->Gsvolu("ZPG3", "BOX ", idtmed[12], fGrvZP, 3); |
1746 | gMC->Gsvolu("ZPG4", "BOX ", idtmed[12], fGrvZP, 3); |
1747 | |
1748 | //-- Divide ZPRO in towers(for hits purposes) |
1749 | |
1750 | gMC->Gsdvn("ZPTX", "ZPRO", fTowZP[0], 1); // x-tower |
1751 | gMC->Gsdvn("ZP1 ", "ZPTX", fTowZP[1], 2); // y-tower |
1752 | |
1753 | |
1754 | //-- Divide ZP1 in minitowers |
1755 | // fDivZP[0]= NUMBER OF FIBERS ALONG X-AXIS PER MINITOWER, |
1756 | // fDivZP[1]= NUMBER OF FIBERS ALONG Y-AXIS PER MINITOWER |
1757 | // (4 fiber per minitower) |
1758 | |
1759 | gMC->Gsdvn("ZPSL", "ZP1 ", fDivZP[1], 2); // Slices |
1760 | gMC->Gsdvn("ZPST", "ZPSL", fDivZP[0], 1); // Sticks |
1761 | |
1762 | // --- Position the empty grooves in the sticks (4 grooves per stick) |
1763 | dx = fDimZP[0] / fTowZP[0] / fDivZP[0] / 2.; |
1764 | dy = fDimZP[1] / fTowZP[1] / fDivZP[1] / 2.; |
1765 | |
1766 | gMC->Gspos("ZPG1", 1, "ZPST", 0.-dx, 0.+dy, 0., 0, "ONLY"); |
1767 | gMC->Gspos("ZPG2", 1, "ZPST", 0.+dx, 0.+dy, 0., 0, "ONLY"); |
1768 | gMC->Gspos("ZPG3", 1, "ZPST", 0.-dx, 0.-dy, 0., 0, "ONLY"); |
1769 | gMC->Gspos("ZPG4", 1, "ZPST", 0.+dx, 0.-dy, 0., 0, "ONLY"); |
1770 | |
1771 | // --- Position the fibers in the grooves |
1772 | gMC->Gspos("ZPF1", 1, "ZPG1", 0., 0., 0., 0, "ONLY"); |
1773 | gMC->Gspos("ZPF2", 1, "ZPG2", 0., 0., 0., 0, "ONLY"); |
1774 | gMC->Gspos("ZPF3", 1, "ZPG3", 0., 0., 0., 0, "ONLY"); |
1775 | gMC->Gspos("ZPF4", 1, "ZPG4", 0., 0., 0., 0, "ONLY"); |
1776 | |
1777 | |
1778 | // --- Position the proton calorimeter in ZDC |
1779 | gMC->Gspos("ZPRO", 1, "ZDC ", fPosZP1[0], fPosZP1[1], fPosZP1[2]-fDimZP[2], irotzdc, "ONLY"); |
1780 | //Ch debug |
1781 | //printf("\n ZP -> %f < z < %f cm\n",fPosZP[2],fPosZP[2]-2*fDimZP[2]); |
1782 | |
1783 | // --- Position the proton calorimeter in ZDC2 (left line) |
1784 | // --- No Rotation of ZDCs |
1785 | gMC->Gspos("ZPRO", 2, "ZDC2", fPosZP2[0], fPosZP2[1], fPosZP2[2]+fDimZP[2], 0, "ONLY"); |
1786 | //Ch debug |
1787 | //printf("\n ZP left -> %f < z < %f cm\n",fPosZPl[2],fPosZPl[2]+2*fDimZP[2]); |
1788 | |
1789 | |
1790 | // ------------------------------------------------------------------------------- |
1791 | // -> EM calorimeter (ZEM) |
1792 | |
1793 | gMC->Gsvolu("ZEM ", "PARA", idtmed[10], fDimZEM, 6); |
1794 | |
1795 | Int_t irot1, irot2; |
1796 | gMC->Matrix(irot1,0.,0.,90.,90.,-90.,0.); // Rotation matrix 1 |
1797 | gMC->Matrix(irot2,180.,0.,90.,fDimZEM[3]+90.,90.,fDimZEM[3]);// Rotation matrix 2 |
1798 | //printf("irot1 = %d, irot2 = %d \n", irot1, irot2); |
1799 | |
1800 | gMC->Gsvolu("ZEMF", "TUBE", idtmed[3], fFibZEM, 3); // Active material |
1801 | |
1802 | gMC->Gsdvn("ZETR", "ZEM ", fDivZEM[2], 1); // Tranches |
1803 | |
1804 | dimPb[0] = kDimZEMPb; // Lead slices |
1805 | dimPb[1] = fDimZEM[2]; |
1806 | dimPb[2] = fDimZEM[1]; |
1807 | //dimPb[3] = fDimZEM[3]; //controllare |
1808 | dimPb[3] = 90.-fDimZEM[3]; //originale |
1809 | dimPb[4] = 0.; |
1810 | dimPb[5] = 0.; |
1811 | gMC->Gsvolu("ZEL0", "PARA", idtmed[5], dimPb, 6); |
1812 | gMC->Gsvolu("ZEL1", "PARA", idtmed[5], dimPb, 6); |
1813 | gMC->Gsvolu("ZEL2", "PARA", idtmed[5], dimPb, 6); |
1814 | |
1815 | // --- Position the lead slices in the tranche |
1816 | Float_t zTran = fDimZEM[0]/fDivZEM[2]; |
1817 | Float_t zTrPb = -zTran+kDimZEMPb; |
1818 | gMC->Gspos("ZEL0", 1, "ZETR", zTrPb, 0., 0., 0, "ONLY"); |
1819 | gMC->Gspos("ZEL1", 1, "ZETR", kDimZEMPb, 0., 0., 0, "ONLY"); |
1820 | |
1821 | // --- Vacuum zone (to be filled with fibres) |
1822 | dimVoid[0] = (zTran-2*kDimZEMPb)/2.; |
1823 | dimVoid[1] = fDimZEM[2]; |
1824 | dimVoid[2] = fDimZEM[1]; |
1825 | dimVoid[3] = 90.-fDimZEM[3]; |
1826 | dimVoid[4] = 0.; |
1827 | dimVoid[5] = 0.; |
1828 | gMC->Gsvolu("ZEV0", "PARA", idtmed[10], dimVoid,6); |
1829 | gMC->Gsvolu("ZEV1", "PARA", idtmed[10], dimVoid,6); |
1830 | |
1831 | // --- Divide the vacuum slice into sticks along x axis |
1832 | gMC->Gsdvn("ZES0", "ZEV0", fDivZEM[0], 3); |
1833 | gMC->Gsdvn("ZES1", "ZEV1", fDivZEM[0], 3); |
1834 | |
1835 | // --- Positioning the fibers into the sticks |
1836 | gMC->Gspos("ZEMF", 1,"ZES0", 0., 0., 0., irot2, "ONLY"); |
1837 | gMC->Gspos("ZEMF", 1,"ZES1", 0., 0., 0., irot2, "ONLY"); |
1838 | |
1839 | // --- Positioning the vacuum slice into the tranche |
1840 | Float_t displFib = fDimZEM[1]/fDivZEM[0]; |
1841 | gMC->Gspos("ZEV0", 1,"ZETR", -dimVoid[0], 0., 0., 0, "ONLY"); |
1842 | gMC->Gspos("ZEV1", 1,"ZETR", -dimVoid[0]+zTran, 0., displFib, 0, "ONLY"); |
1843 | |
1844 | // --- Positioning the ZEM into the ZDC - rotation for 90 degrees |
1845 | // NB -> In AliZDCv3 ZEM is positioned in ALIC (instead of in ZDC) volume |
1846 | // beacause it's impossible to make a ZDC pcon volume to contain |
1847 | // both hadronics and EM calorimeters. |
1848 | gMC->Gspos("ZEM ", 1,"ALIC", -fPosZEM[0], fPosZEM[1], fPosZEM[2]+fDimZEM[0], irot1, "ONLY"); |
1849 | |
1850 | // Second EM ZDC (same side w.r.t. IP, just on the other side w.r.t. beam pipe) |
1851 | gMC->Gspos("ZEM ", 2,"ALIC", fPosZEM[0], fPosZEM[1], fPosZEM[2]+fDimZEM[0], irot1, "ONLY"); |
1852 | |
1853 | // --- Adding last slice at the end of the EM calorimeter |
1854 | Float_t zLastSlice = fPosZEM[2]+kDimZEMPb+2*fDimZEM[0]; |
1855 | gMC->Gspos("ZEL2", 1,"ALIC", fPosZEM[0], fPosZEM[1], zLastSlice, irot1, "ONLY"); |
1856 | //Ch debug |
1857 | //printf("\n ZEM lenght = %f cm\n",2*fZEMLength); |
1858 | //printf("\n ZEM -> %f < z < %f cm\n",fPosZEM[2],fPosZEM[2]+2*fZEMLength+zLastSlice+kDimZEMPb); |
1859 | |
1860 | } |
1861 | |
1862 | //_____________________________________________________________________________ |
1863 | void AliZDCv3::DrawModule() const |
1864 | { |
1865 | // |
1866 | // Draw a shaded view of the Zero Degree Calorimeter version 1 |
1867 | // |
1868 | |
1869 | // Set everything unseen |
1870 | gMC->Gsatt("*", "seen", -1); |
1871 | // |
1872 | // Set ALIC mother transparent |
1873 | gMC->Gsatt("ALIC","SEEN",0); |
1874 | // |
1875 | // Set the volumes visible |
1876 | gMC->Gsatt("ZDC ","SEEN",0); |
1877 | gMC->Gsatt("QT01","SEEN",1); |
1878 | gMC->Gsatt("QT02","SEEN",1); |
1879 | gMC->Gsatt("QT03","SEEN",1); |
1880 | gMC->Gsatt("QT04","SEEN",1); |
1881 | gMC->Gsatt("QT05","SEEN",1); |
1882 | gMC->Gsatt("QT06","SEEN",1); |
1883 | gMC->Gsatt("QT07","SEEN",1); |
1884 | gMC->Gsatt("QT08","SEEN",1); |
1885 | gMC->Gsatt("QT09","SEEN",1); |
1886 | gMC->Gsatt("QT10","SEEN",1); |
1887 | gMC->Gsatt("QT11","SEEN",1); |
1888 | gMC->Gsatt("QT12","SEEN",1); |
1889 | gMC->Gsatt("QT13","SEEN",1); |
1890 | gMC->Gsatt("QT14","SEEN",1); |
1891 | gMC->Gsatt("QT15","SEEN",1); |
1892 | gMC->Gsatt("QT16","SEEN",1); |
1893 | gMC->Gsatt("QT17","SEEN",1); |
1894 | gMC->Gsatt("QT18","SEEN",1); |
1895 | gMC->Gsatt("QC01","SEEN",1); |
1896 | gMC->Gsatt("QC02","SEEN",1); |
1897 | gMC->Gsatt("QC03","SEEN",1); |
1898 | gMC->Gsatt("QC04","SEEN",1); |
1899 | gMC->Gsatt("QC05","SEEN",1); |
1900 | gMC->Gsatt("QTD1","SEEN",1); |
1901 | gMC->Gsatt("QTD2","SEEN",1); |
1902 | gMC->Gsatt("QTD3","SEEN",1); |
1903 | gMC->Gsatt("MQXL","SEEN",1); |
1904 | gMC->Gsatt("YMQL","SEEN",1); |
1905 | gMC->Gsatt("MQX ","SEEN",1); |
1906 | gMC->Gsatt("YMQ ","SEEN",1); |
1907 | gMC->Gsatt("ZQYX","SEEN",1); |
1908 | gMC->Gsatt("MD1 ","SEEN",1); |
1909 | gMC->Gsatt("MD1V","SEEN",1); |
1910 | gMC->Gsatt("YD1 ","SEEN",1); |
1911 | gMC->Gsatt("MD2 ","SEEN",1); |
1912 | gMC->Gsatt("YD2 ","SEEN",1); |
1913 | gMC->Gsatt("ZNEU","SEEN",0); |
1914 | gMC->Gsatt("ZNF1","SEEN",0); |
1915 | gMC->Gsatt("ZNF2","SEEN",0); |
1916 | gMC->Gsatt("ZNF3","SEEN",0); |
1917 | gMC->Gsatt("ZNF4","SEEN",0); |
1918 | gMC->Gsatt("ZNG1","SEEN",0); |
1919 | gMC->Gsatt("ZNG2","SEEN",0); |
1920 | gMC->Gsatt("ZNG3","SEEN",0); |
1921 | gMC->Gsatt("ZNG4","SEEN",0); |
1922 | gMC->Gsatt("ZNTX","SEEN",0); |
1923 | gMC->Gsatt("ZN1 ","COLO",4); |
1924 | gMC->Gsatt("ZN1 ","SEEN",1); |
1925 | gMC->Gsatt("ZNSL","SEEN",0); |
1926 | gMC->Gsatt("ZNST","SEEN",0); |
1927 | gMC->Gsatt("ZPRO","SEEN",0); |
1928 | gMC->Gsatt("ZPF1","SEEN",0); |
1929 | gMC->Gsatt("ZPF2","SEEN",0); |
1930 | gMC->Gsatt("ZPF3","SEEN",0); |
1931 | gMC->Gsatt("ZPF4","SEEN",0); |
1932 | gMC->Gsatt("ZPG1","SEEN",0); |
1933 | gMC->Gsatt("ZPG2","SEEN",0); |
1934 | gMC->Gsatt("ZPG3","SEEN",0); |
1935 | gMC->Gsatt("ZPG4","SEEN",0); |
1936 | gMC->Gsatt("ZPTX","SEEN",0); |
1937 | gMC->Gsatt("ZP1 ","COLO",6); |
1938 | gMC->Gsatt("ZP1 ","SEEN",1); |
1939 | gMC->Gsatt("ZPSL","SEEN",0); |
1940 | gMC->Gsatt("ZPST","SEEN",0); |
1941 | gMC->Gsatt("ZEM ","COLO",7); |
1942 | gMC->Gsatt("ZEM ","SEEN",1); |
1943 | gMC->Gsatt("ZEMF","SEEN",0); |
1944 | gMC->Gsatt("ZETR","SEEN",0); |
1945 | gMC->Gsatt("ZEL0","SEEN",0); |
1946 | gMC->Gsatt("ZEL1","SEEN",0); |
1947 | gMC->Gsatt("ZEL2","SEEN",0); |
1948 | gMC->Gsatt("ZEV0","SEEN",0); |
1949 | gMC->Gsatt("ZEV1","SEEN",0); |
1950 | gMC->Gsatt("ZES0","SEEN",0); |
1951 | gMC->Gsatt("ZES1","SEEN",0); |
1952 | |
1953 | // |
1954 | gMC->Gdopt("hide", "on"); |
1955 | gMC->Gdopt("shad", "on"); |
1956 | gMC->Gsatt("*", "fill", 7); |
1957 | gMC->SetClipBox("."); |
1958 | gMC->SetClipBox("*", 0, 100, -100, 100, 12000, 16000); |
1959 | gMC->DefaultRange(); |
1960 | gMC->Gdraw("alic", 40, 30, 0, 488, 220, .07, .07); |
1961 | gMC->Gdhead(1111, "Zero Degree Calorimeter Version 1"); |
1962 | gMC->Gdman(18, 4, "MAN"); |
1963 | } |
1964 | |
1965 | //_____________________________________________________________________________ |
1966 | void AliZDCv3::CreateMaterials() |
1967 | { |
1968 | // |
1969 | // Create Materials for the Zero Degree Calorimeter |
1970 | // |
1971 | |
1972 | Int_t *idtmed = fIdtmed->GetArray(); |
1973 | |
1974 | Float_t dens, ubuf[1], wmat[2], a[2], z[2]; |
1975 | Int_t i; |
1976 | |
1977 | // --- Store in UBUF r0 for nuclear radius calculation R=r0*A**1/3 |
1978 | |
1979 | // --- Tantalum -> ZN passive material |
1980 | ubuf[0] = 1.1; |
1981 | AliMaterial(1, "TANT", 180.95, 73., 16.65, .4, 11.9, ubuf, 1); |
1982 | |
1983 | // --- Tungsten |
1984 | // ubuf[0] = 1.11; |
1985 | // AliMaterial(1, "TUNG", 183.85, 74., 19.3, .35, 10.3, ubuf, 1); |
1986 | |
1987 | // --- Brass (CuZn) -> ZP passive material |
1988 | dens = 8.48; |
1989 | a[0] = 63.546; |
1990 | a[1] = 65.39; |
1991 | z[0] = 29.; |
1992 | z[1] = 30.; |
1993 | wmat[0] = .63; |
1994 | wmat[1] = .37; |
1995 | AliMixture(2, "BRASS ", a, z, dens, 2, wmat); |
1996 | |
1997 | // --- SiO2 |
1998 | dens = 2.64; |
1999 | a[0] = 28.086; |
2000 | a[1] = 15.9994; |
2001 | z[0] = 14.; |
2002 | z[1] = 8.; |
2003 | wmat[0] = 1.; |
2004 | wmat[1] = 2.; |
2005 | AliMixture(3, "SIO2 ", a, z, dens, -2, wmat); |
2006 | |
2007 | // --- Lead |
2008 | ubuf[0] = 1.12; |
2009 | AliMaterial(5, "LEAD", 207.19, 82., 11.35, .56, 18.5, ubuf, 1); |
2010 | |
2011 | // --- Copper (energy loss taken into account) |
2012 | ubuf[0] = 1.10; |
2013 | AliMaterial(6, "COPP0", 63.54, 29., 8.96, 1.4, 0., ubuf, 1); |
2014 | |
2015 | // --- Copper (energy loss taken into account) *** For the left line |
2016 | ubuf[0] = 1.10; |
2017 | AliMaterial(13, "COPP1", 63.54, 29., 8.96, 1.4, 0., ubuf, 1); |
2018 | |
2019 | |
2020 | // --- Iron (energy loss taken into account) |
2021 | ubuf[0] = 1.1; |
2022 | AliMaterial(7, "IRON0", 55.85, 26., 7.87, 1.76, 0., ubuf, 1); |
2023 | |
2024 | // --- Iron (no energy loss) |
2025 | ubuf[0] = 1.1; |
2026 | AliMaterial(8, "IRON1", 55.85, 26., 7.87, 1.76, 0., ubuf, 1); |
2027 | |
2028 | // --- Iron (energy loss taken into account) *** For the left line |
2029 | ubuf[0] = 1.1; |
2030 | AliMaterial(14, "IRON2", 55.85, 26., 7.87, 1.76, 0., ubuf, 1); |
2031 | |
2032 | // --------------------------------------------------------- |
2033 | Float_t aResGas[3]={1.008,12.0107,15.9994}; |
2034 | Float_t zResGas[3]={1.,6.,8.}; |
2035 | Float_t wResGas[3]={0.28,0.28,0.44}; |
2036 | Float_t dResGas = 3.2E-14; |
2037 | |
2038 | // --- Vacuum (no magnetic field) |
2039 | AliMixture(10, "VOID", aResGas, zResGas, dResGas, 3, wResGas); |
2040 | //AliMaterial(10, "VOID", 1e-16, 1e-16, 1e-16, 1e16, 1e16, ubuf,0); |
2041 | |
2042 | // --- Vacuum (with magnetic field) |
2043 | AliMixture(11, "VOIM", aResGas, zResGas, dResGas, 3, wResGas); |
2044 | //AliMaterial(11, "VOIM", 1e-16, 1e-16, 1e-16, 1e16, 1e16, ubuf,0); |
2045 | |
2046 | // --- Air (no magnetic field) |
2047 | Float_t aAir[4]={12.0107,14.0067,15.9994,39.948}; |
2048 | Float_t zAir[4]={6.,7.,8.,18.}; |
2049 | Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827}; |
2050 | Float_t dAir = 1.20479E-3; |
2051 | // |
2052 | AliMixture(12, "Air $", aAir, zAir, dAir, 4, wAir); |
2053 | //AliMaterial(12, "Air $", 14.61, 7.3, .001205, 30420., 67500., ubuf, 0); |
2054 | |
2055 | // --- Definition of tracking media: |
2056 | |
2057 | // --- Tantalum = 1 ; |
2058 | // --- Brass = 2 ; |
2059 | // --- Fibers (SiO2) = 3 ; |
2060 | // --- Fibers (SiO2) = 4 ; |
2061 | // --- Lead = 5 ; |
2062 | // --- Copper (with energy loss)= 6 ; |
2063 | // --- Copper (with energy loss)= 13 ; |
2064 | // --- Iron (with energy loss) = 7 ; |
2065 | // --- Iron (without energy loss) = 8 ; |
2066 | // --- Vacuum (no field) = 10 |
2067 | // --- Vacuum (with field) = 11 |
2068 | // --- Air (no field) = 12 |
2069 | |
2070 | // **************************************************** |
2071 | // Tracking media parameters |
2072 | // |
2073 | Float_t epsil = 0.01; // Tracking precision, |
2074 | Float_t stmin = 0.01; // Min. value 4 max. step (cm) |
2075 | Float_t stemax = 1.; // Max. step permitted (cm) |
2076 | Float_t tmaxfd = 0.; // Maximum angle due to field (degrees) |
2077 | Float_t deemax = -1.; // Maximum fractional energy loss |
2078 | Float_t nofieldm = 0.; // Max. field value (no field) |
2079 | Float_t fieldm = 45.; // Max. field value (with field) |
2080 | Int_t isvol = 0; // ISVOL =0 -> not sensitive volume |
2081 | Int_t isvolActive = 1; // ISVOL =1 -> sensitive volume |
2082 | Int_t inofld = 0; // IFIELD=0 -> no magnetic field |
2083 | Int_t ifield =2; // IFIELD=2 -> magnetic field defined in AliMagFC.h |
2084 | // ***************************************************** |
2085 | |
2086 | AliMedium(1, "ZTANT", 1, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin); |
2087 | AliMedium(2, "ZBRASS",2, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin); |
2088 | AliMedium(3, "ZSIO2", 3, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin); |
2089 | AliMedium(4, "ZQUAR", 3, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin); |
2090 | AliMedium(5, "ZLEAD", 5, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin); |
2091 | AliMedium(6, "ZCOPP", 6, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin); |
2092 | AliMedium(7, "ZIRON", 7, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin); |
2093 | AliMedium(8, "ZIRONN",8, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin); |
2094 | AliMedium(10,"ZVOID",10, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin); |
2095 | AliMedium(12,"ZAIR", 12, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin); |
2096 | // |
2097 | AliMedium(11,"ZVOIM",11, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); |
2098 | |
2099 | // Thresholds for showering in the ZDCs |
2100 | i = 1; //tantalum |
2101 | gMC->Gstpar(idtmed[i], "CUTGAM", .001); |
2102 | gMC->Gstpar(idtmed[i], "CUTELE", .001); |
2103 | gMC->Gstpar(idtmed[i], "CUTNEU", .01); |
2104 | gMC->Gstpar(idtmed[i], "CUTHAD", .01); |
2105 | i = 2; //brass |
2106 | gMC->Gstpar(idtmed[i], "CUTGAM", .001); |
2107 | gMC->Gstpar(idtmed[i], "CUTELE", .001); |
2108 | gMC->Gstpar(idtmed[i], "CUTNEU", .01); |
2109 | gMC->Gstpar(idtmed[i], "CUTHAD", .01); |
2110 | i = 5; //lead |
2111 | gMC->Gstpar(idtmed[i], "CUTGAM", .001); |
2112 | gMC->Gstpar(idtmed[i], "CUTELE", .001); |
2113 | gMC->Gstpar(idtmed[i], "CUTNEU", .01); |
2114 | gMC->Gstpar(idtmed[i], "CUTHAD", .01); |
2115 | |
2116 | // Avoid too detailed showering in TDI |
2117 | i = 6; //copper (ZCOPP) |
2118 | gMC->Gstpar(idtmed[i], "CUTGAM", .1); |
2119 | gMC->Gstpar(idtmed[i], "CUTELE", .1); |
2120 | gMC->Gstpar(idtmed[i], "CUTNEU", 1.); |
2121 | gMC->Gstpar(idtmed[i], "CUTHAD", 1.); |
2122 | |
2123 | // Avoid too detailed showering along the left beam line |
2124 | i = 13; //copper (ZCOPPL) |
2125 | gMC->Gstpar(idtmed[i], "CUTGAM", .1); |
2126 | gMC->Gstpar(idtmed[i], "CUTELE", .1); |
2127 | gMC->Gstpar(idtmed[i], "CUTNEU", 1.); |
2128 | gMC->Gstpar(idtmed[i], "CUTHAD", 1.); |
2129 | |
2130 | // Avoid too detailed showering along the beam line |
2131 | i = 7; //iron with energy loss (ZIRON) |
2132 | gMC->Gstpar(idtmed[i], "CUTGAM", .1); |
2133 | gMC->Gstpar(idtmed[i], "CUTELE", .1); |
2134 | gMC->Gstpar(idtmed[i], "CUTNEU", 1.); |
2135 | gMC->Gstpar(idtmed[i], "CUTHAD", 1.); |
2136 | |
2137 | // Avoid too detailed showering along the beam line |
2138 | i = 8; //iron with energy loss (ZIRONN) |
2139 | gMC->Gstpar(idtmed[i], "CUTGAM", .1); |
2140 | gMC->Gstpar(idtmed[i], "CUTELE", .1); |
2141 | gMC->Gstpar(idtmed[i], "CUTNEU", 1.); |
2142 | gMC->Gstpar(idtmed[i], "CUTHAD", 1.); |
2143 | |
2144 | // Avoid too detailed showering along the beam line |
2145 | i = 14; //iron with energy loss (ZIRONL) |
2146 | gMC->Gstpar(idtmed[i], "CUTGAM", .1); |
2147 | gMC->Gstpar(idtmed[i], "CUTELE", .1); |
2148 | gMC->Gstpar(idtmed[i], "CUTNEU", 1.); |
2149 | gMC->Gstpar(idtmed[i], "CUTHAD", 1.); |
2150 | |
2151 | // Avoid interaction in fibers (only energy loss allowed) |
2152 | i = 3; //fibers (ZSI02) |
2153 | gMC->Gstpar(idtmed[i], "DCAY", 0.); |
2154 | gMC->Gstpar(idtmed[i], "MULS", 0.); |
2155 | gMC->Gstpar(idtmed[i], "PFIS", 0.); |
2156 | gMC->Gstpar(idtmed[i], "MUNU", 0.); |
2157 | gMC->Gstpar(idtmed[i], "LOSS", 1.); |
2158 | gMC->Gstpar(idtmed[i], "PHOT", 0.); |
2159 | gMC->Gstpar(idtmed[i], "COMP", 0.); |
2160 | gMC->Gstpar(idtmed[i], "PAIR", 0.); |
2161 | gMC->Gstpar(idtmed[i], "BREM", 0.); |
2162 | gMC->Gstpar(idtmed[i], "DRAY", 0.); |
2163 | gMC->Gstpar(idtmed[i], "ANNI", 0.); |
2164 | gMC->Gstpar(idtmed[i], "HADR", 0.); |
2165 | i = 4; //fibers (ZQUAR) |
2166 | gMC->Gstpar(idtmed[i], "DCAY", 0.); |
2167 | gMC->Gstpar(idtmed[i], "MULS", 0.); |
2168 | gMC->Gstpar(idtmed[i], "PFIS", 0.); |
2169 | gMC->Gstpar(idtmed[i], "MUNU", 0.); |
2170 | gMC->Gstpar(idtmed[i], "LOSS", 1.); |
2171 | gMC->Gstpar(idtmed[i], "PHOT", 0.); |
2172 | gMC->Gstpar(idtmed[i], "COMP", 0.); |
2173 | gMC->Gstpar(idtmed[i], "PAIR", 0.); |
2174 | gMC->Gstpar(idtmed[i], "BREM", 0.); |
2175 | gMC->Gstpar(idtmed[i], "DRAY", 0.); |
2176 | gMC->Gstpar(idtmed[i], "ANNI", 0.); |
2177 | gMC->Gstpar(idtmed[i], "HADR", 0.); |
2178 | |
2179 | // Avoid interaction in void |
2180 | i = 11; //void with field |
2181 | gMC->Gstpar(idtmed[i], "DCAY", 0.); |
2182 | gMC->Gstpar(idtmed[i], "MULS", 0.); |
2183 | gMC->Gstpar(idtmed[i], "PFIS", 0.); |
2184 | gMC->Gstpar(idtmed[i], "MUNU", 0.); |
2185 | gMC->Gstpar(idtmed[i], "LOSS", 0.); |
2186 | gMC->Gstpar(idtmed[i], "PHOT", 0.); |
2187 | gMC->Gstpar(idtmed[i], "COMP", 0.); |
2188 | gMC->Gstpar(idtmed[i], "PAIR", 0.); |
2189 | gMC->Gstpar(idtmed[i], "BREM", 0.); |
2190 | gMC->Gstpar(idtmed[i], "DRAY", 0.); |
2191 | gMC->Gstpar(idtmed[i], "ANNI", 0.); |
2192 | gMC->Gstpar(idtmed[i], "HADR", 0.); |
2193 | |
2194 | // |
2195 | fMedSensZN = idtmed[1]; // Sensitive volume: ZN passive material |
2196 | fMedSensZP = idtmed[2]; // Sensitive volume: ZP passive material |
2197 | fMedSensF1 = idtmed[3]; // Sensitive volume: fibres type 1 |
2198 | fMedSensF2 = idtmed[4]; // Sensitive volume: fibres type 2 |
2199 | fMedSensZEM = idtmed[5]; // Sensitive volume: ZEM passive material |
2200 | fMedSensCu = idtmed[6]; // Sensitive volume: TDI Cu shield |
2201 | fMedSensPI = idtmed[7]; // Sensitive volume: beam pipes |
2202 | fMedSensGR = idtmed[12]; // Sensitive volume: air into the grooves |
2203 | |
2204 | } |
2205 | |
2206 | //_____________________________________________________________________________ |
2207 | void AliZDCv3::Init() |
2208 | { |
2209 | InitTables(); |
2210 | } |
2211 | |
2212 | //_____________________________________________________________________________ |
2213 | void AliZDCv3::InitTables() |
2214 | { |
2215 | // |
2216 | // Read light tables for Cerenkov light production parameterization |
2217 | // |
2218 | |
2219 | Int_t k, j; |
2220 | |
2221 | char *lightfName1,*lightfName2,*lightfName3,*lightfName4, |
2222 | *lightfName5,*lightfName6,*lightfName7,*lightfName8; |
2223 | FILE *fp1, *fp2, *fp3, *fp4, *fp5, *fp6, *fp7, *fp8; |
2224 | |
2225 | // --- Reading light tables for ZN |
2226 | lightfName1 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620362207s"); |
2227 | if((fp1 = fopen(lightfName1,"r")) == NULL){ |
2228 | printf("Cannot open file fp1 \n"); |
2229 | return; |
2230 | } |
2231 | lightfName2 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620362208s"); |
2232 | if((fp2 = fopen(lightfName2,"r")) == NULL){ |
2233 | printf("Cannot open file fp2 \n"); |
2234 | return; |
2235 | } |
2236 | lightfName3 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620362209s"); |
2237 | if((fp3 = fopen(lightfName3,"r")) == NULL){ |
2238 | printf("Cannot open file fp3 \n"); |
2239 | return; |
2240 | } |
2241 | lightfName4 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620362210s"); |
2242 | if((fp4 = fopen(lightfName4,"r")) == NULL){ |
2243 | printf("Cannot open file fp4 \n"); |
2244 | return; |
2245 | } |
2246 | |
2247 | for(k=0; k<fNalfan; k++){ |
2248 | for(j=0; j<fNben; j++){ |
2249 | fscanf(fp1,"%f",&fTablen[0][k][j]); |
2250 | fscanf(fp2,"%f",&fTablen[1][k][j]); |
2251 | fscanf(fp3,"%f",&fTablen[2][k][j]); |
2252 | fscanf(fp4,"%f",&fTablen[3][k][j]); |
2253 | } |
2254 | } |
2255 | fclose(fp1); |
2256 | fclose(fp2); |
2257 | fclose(fp3); |
2258 | fclose(fp4); |
2259 | |
2260 | // --- Reading light tables for ZP and ZEM |
2261 | lightfName5 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620552207s"); |
2262 | if((fp5 = fopen(lightfName5,"r")) == NULL){ |
2263 | printf("Cannot open file fp5 \n"); |
2264 | return; |
2265 | } |
2266 | lightfName6 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620552208s"); |
2267 | if((fp6 = fopen(lightfName6,"r")) == NULL){ |
2268 | printf("Cannot open file fp6 \n"); |
2269 | return; |
2270 | } |
2271 | lightfName7 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620552209s"); |
2272 | if((fp7 = fopen(lightfName7,"r")) == NULL){ |
2273 | printf("Cannot open file fp7 \n"); |
2274 | return; |
2275 | } |
2276 | lightfName8 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620552210s"); |
2277 | if((fp8 = fopen(lightfName8,"r")) == NULL){ |
2278 | printf("Cannot open file fp8 \n"); |
2279 | return; |
2280 | } |
2281 | |
2282 | for(k=0; k<fNalfap; k++){ |
2283 | for(j=0; j<fNbep; j++){ |
2284 | fscanf(fp5,"%f",&fTablep[0][k][j]); |
2285 | fscanf(fp6,"%f",&fTablep[1][k][j]); |
2286 | fscanf(fp7,"%f",&fTablep[2][k][j]); |
2287 | fscanf(fp8,"%f",&fTablep[3][k][j]); |
2288 | } |
2289 | } |
2290 | fclose(fp5); |
2291 | fclose(fp6); |
2292 | fclose(fp7); |
2293 | fclose(fp8); |
2294 | } |
2295 | //_____________________________________________________________________________ |
2296 | void AliZDCv3::StepManager() |
2297 | { |
2298 | // |
2299 | // Routine called at every step in the Zero Degree Calorimeters |
2300 | // |
2301 | |
2302 | Int_t j, vol[2], ibeta=0, ialfa, ibe, nphe; |
2303 | Float_t x[3], xdet[3], destep, hits[10], m, ekin, um[3], ud[3], be, out; |
2304 | //Float_t radius; |
2305 | Float_t xalic[3], z, guiEff, guiPar[4]={0.31,-0.0004,0.0197,0.7958}; |
2306 | TLorentzVector s, p; |
2307 | const char *knamed; |
2308 | |
2309 | // ((TGeant3*)gMC)->Gpcxyz(); |
2310 | |
2311 | |
2312 | for (j=0;j<10;j++) hits[j]=-999.; |
2313 | |
2314 | // Right line |
2315 | // --- This part is for no shower developement in beam pipe and TDI |
2316 | // If particle interacts with beam pipe or TDI -> return |
2317 | if((gMC->CurrentMedium() == fMedSensPI) || (gMC->CurrentMedium() == fMedSensCu)){ |
2318 | // If option NoShower is set -> StopTrack |
2319 | if(fNoShower==1) { |
2320 | if(gMC->CurrentMedium() == fMedSensPI) { |
2321 | knamed = gMC->CurrentVolName(); |
2322 | if(!strncmp(knamed,"YMQ",3)) fpLostIT += 1; |
2323 | if(!strncmp(knamed,"YD1",3)) fpLostD1 += 1; |
2324 | } |
2325 | else if(gMC->CurrentMedium() == fMedSensCu){ // NB->Cu = TDI or D1 vacuum chamber |
2326 | knamed = gMC->CurrentVolName(); |
2327 | if(!strncmp(knamed,"MD1",3)) fpLostD1 += 1; |
2328 | if(!strncmp(knamed,"QTD",3)) fpLostTDI += 1; |
2329 | } |
2330 | printf("\n # of spectators lost in IT = %d\n",fpLostIT); |
2331 | printf("\n # of spectators lost in D1 = %d\n",fpLostD1); |
2332 | printf("\n # of spectators lost in TDI = %d\n\n",fpLostTDI); |
2333 | gMC->StopTrack(); |
2334 | } |
2335 | return; |
2336 | } |
2337 | |
2338 | |
2339 | if((gMC->CurrentMedium() == fMedSensZN) || (gMC->CurrentMedium() == fMedSensZP) || |
2340 | (gMC->CurrentMedium() == fMedSensGR) || (gMC->CurrentMedium() == fMedSensF1) || |
2341 | (gMC->CurrentMedium() == fMedSensF2) || (gMC->CurrentMedium() == fMedSensZEM)){ |
2342 | |
2343 | |
2344 | //Particle coordinates |
2345 | gMC->TrackPosition(s); |
2346 | for(j=0; j<=2; j++) x[j] = s[j]; |
2347 | hits[0] = x[0]; |
2348 | hits[1] = x[1]; |
2349 | hits[2] = x[2]; |
2350 | |
2351 | // Determine in which ZDC the particle is |
2352 | knamed = gMC->CurrentVolName(); |
2353 | if(!strncmp(knamed,"ZN",2)){ |
2354 | if(x[2]<0.) vol[0]=1; |
2355 | else if(x[2]>=0.) vol[0]=4; |
2356 | } |
2357 | else if(!strncmp(knamed,"ZP",2)){ |
2358 | if(x[2]<0.) vol[0]=2; |
2359 | else if(x[2]>=0.) vol[0]=5; |
2360 | } |
2361 | else if(!strncmp(knamed,"ZE",2)) vol[0]=3; |
2362 | |
2363 | // Determine in which quadrant the particle is |
2364 | if(vol[0]==1){ //Quadrant in ZN |
2365 | // Calculating particle coordinates inside ZN |
2366 | xdet[0] = x[0]-fPosZN1[0]; |
2367 | xdet[1] = x[1]-fPosZN1[1]; |
2368 | // Calculating quadrant in ZN |
2369 | if(xdet[0]<=0.){ |
2370 | if(xdet[1]>=0.) vol[1]=1; |
2371 | else if(xdet[1]<0.) vol[1]=3; |
2372 | } |
2373 | else if(xdet[0]>0.){ |
2374 | if(xdet[1]>=0.) vol[1]=2; |
2375 | else if(xdet[1]<0.) vol[1]=4; |
2376 | } |
2377 | if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4)) |
2378 | printf("\n ZDC StepManager->ERROR in ZN!!! vol[1] = %d, xdet[0] = %f," |
2379 | "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]); |
2380 | } |
2381 | |
2382 | else if(vol[0]==2){ //Quadrant in ZP |
2383 | // Calculating particle coordinates inside ZP |
2384 | xdet[0] = x[0]-fPosZP1[0]; |
2385 | xdet[1] = x[1]-fPosZP1[1]; |
2386 | if(xdet[0]>=fDimZP[0]) xdet[0]=fDimZP[0]-0.01; |
2387 | if(xdet[0]<=-fDimZP[0]) xdet[0]=-fDimZP[0]+0.01; |
2388 | // Calculating tower in ZP |
2389 | Float_t xqZP = xdet[0]/(fDimZP[0]/2.); |
2390 | for(int i=1; i<=4; i++){ |
2391 | if(xqZP>=(i-3) && xqZP<(i-2)){ |
2392 | vol[1] = i; |
2393 | break; |
2394 | } |
2395 | } |
2396 | if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4)) |
2397 | printf(" ZDC StepManager->ERROR in ZP!!! vol[1] = %d, xdet[0] = %f," |
2398 | "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]); |
2399 | } |
2400 | |
2401 | // Quadrant in ZEM: vol[1] = 1 -> particle in 1st ZEM (placed at x = 8.5 cm) |
2402 | // vol[1] = 2 -> particle in 2nd ZEM (placed at x = -8.5 cm) |
2403 | else if(vol[0] == 3){ |
2404 | if(x[0]>0.){ |
2405 | vol[1] = 1; |
2406 | // Particle x-coordinate inside ZEM1 |
2407 | xdet[0] = x[0]-fPosZEM[0]; |
2408 | } |
2409 | else{ |
2410 | vol[1] = 2; |
2411 | // Particle x-coordinate inside ZEM2 |
2412 | xdet[0] = x[0]+fPosZEM[0]; |
2413 | } |
2414 | xdet[1] = x[1]-fPosZEM[1]; |
2415 | } |
2416 | |
2417 | else if(vol[0]==4){ //Quadrant in ZN LEFT |
2418 | // Calculating particle coordinates inside ZN |
2419 | xdet[0] = x[0]-fPosZN2[0]; |
2420 | xdet[1] = x[1]-fPosZN2[1]; |
2421 | // Calculating quadrant in ZN |
2422 | if(xdet[0]<=0.){ |
2423 | if(xdet[1]>=0.) vol[1]=3; |
2424 | else if(xdet[1]<0.) vol[1]=1; |
2425 | } |
2426 | else if(xdet[0]>0.){ |
2427 | if(xdet[1]>=0.) vol[1]=4; |
2428 | else if(xdet[1]<0.) vol[1]=2; |
2429 | } |
2430 | if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4)) |
2431 | printf("\n ZDC StepManager->ERROR in ZN!!! vol[1] = %d, xdet[0] = %f," |
2432 | "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]); |
2433 | } |
2434 | |
2435 | else if(vol[0]==5){ //Quadrant in ZP LEFT |
2436 | // Calculating particle coordinates inside ZP |
2437 | xdet[0] = x[0]-fPosZP2[0]; |
2438 | xdet[1] = x[1]-fPosZP2[1]; |
2439 | if(xdet[0]>=fDimZP[0]) xdet[0]=fDimZP[0]-0.01; |
2440 | if(xdet[0]<=-fDimZP[0]) xdet[0]=-fDimZP[0]+0.01; |
2441 | // Calculating tower in ZP |
2442 | Float_t xqZP = xdet[0]/(fDimZP[0]/2.); |
2443 | for(int i=1; i<=4; i++){ |
2444 | if(xqZP>=(i-3) && xqZP<(i-2)){ |
2445 | vol[1] = i; |
2446 | break; |
2447 | } |
2448 | } |
2449 | if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4)) |
2450 | printf(" ZDC StepManager->ERROR in ZP!!! vol[1] = %d, xdet[0] = %f," |
2451 | "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]); |
2452 | } |
2453 | |
2454 | |
2455 | // Store impact point and kinetic energy of the ENTERING particle |
2456 | |
2457 | if(gMC->IsTrackEntering()){ |
2458 | //Particle energy |
2459 | gMC->TrackMomentum(p); |
2460 | hits[3] = p[3]; |
2461 | // Impact point on ZDC |
2462 | hits[4] = xdet[0]; |
2463 | hits[5] = xdet[1]; |
2464 | hits[6] = 0; |
2465 | hits[7] = 0; |
2466 | hits[8] = 0; |
2467 | hits[9] = 0; |
2468 | |
2469 | AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); |
2470 | |
2471 | if(fNoShower==1){ |
2472 | fpDetected += 1; |
2473 | gMC->StopTrack(); |
2474 | if(vol[0]==1) printf("\n # of detected neutrons (ZN right)= %d\n\n",fpDetected); |
2475 | if(vol[0]==2) printf("\n # of detected protons (ZP right)= %d\n\n",fpDetected); |
2476 | if(vol[0]==4) printf("\n # of detected neutrons (ZN left) = %d\n\n",fpDetected); |
2477 | if(vol[0]==5) printf("\n # of detected protons (ZP left) = %d\n\n",fpDetected); |
2478 | return; |
2479 | } |
2480 | } |
2481 | |
2482 | // Charged particles -> Energy loss |
2483 | if((destep=gMC->Edep())){ |
2484 | if(gMC->IsTrackStop()){ |
2485 | gMC->TrackMomentum(p); |
2486 | m = gMC->TrackMass(); |
2487 | ekin = p[3]-m; |
2488 | hits[9] = ekin; |
2489 | hits[7] = 0.; |
2490 | hits[8] = 0.; |
2491 | AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); |
2492 | } |
2493 | else{ |
2494 | hits[9] = destep; |
2495 | hits[7] = 0.; |
2496 | hits[8] = 0.; |
2497 | AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); |
2498 | } |
2499 | } |
2500 | } |
2501 | |
2502 | |
2503 | // *** Light production in fibres |
2504 | if((gMC->CurrentMedium() == fMedSensF1) || (gMC->CurrentMedium() == fMedSensF2)){ |
2505 | |
2506 | //Select charged particles |
2507 | if((destep=gMC->Edep())){ |
2508 | |
2509 | // Particle velocity |
2510 | Float_t beta = 0.; |
2511 | gMC->TrackMomentum(p); |
2512 | Float_t ptot=TMath::Sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]); |
2513 | if(p[3] > 0.00001) beta = ptot/p[3]; |
2514 | else return; |
2515 | if(beta<0.67)return; |
2516 | else if((beta>=0.67) && (beta<=0.75)) ibeta = 0; |
2517 | else if((beta>0.75) && (beta<=0.85)) ibeta = 1; |
2518 | else if((beta>0.85) && (beta<=0.95)) ibeta = 2; |
2519 | else if(beta>0.95) ibeta = 3; |
2520 | |
2521 | // Angle between particle trajectory and fibre axis |
2522 | // 1 -> Momentum directions |
2523 | um[0] = p[0]/ptot; |
2524 | um[1] = p[1]/ptot; |
2525 | um[2] = p[2]/ptot; |
2526 | gMC->Gmtod(um,ud,2); |
2527 | // 2 -> Angle < limit angle |
2528 | Double_t alfar = TMath::ACos(ud[2]); |
2529 | Double_t alfa = alfar*kRaddeg; |
2530 | if(alfa>=110.) return; |
2531 | // |
2532 | ialfa = Int_t(1.+alfa/2.); |
2533 | |
2534 | // Distance between particle trajectory and fibre axis |
2535 | gMC->TrackPosition(s); |
2536 | for(j=0; j<=2; j++){ |
2537 | x[j] = s[j]; |
2538 | } |
2539 | gMC->Gmtod(x,xdet,1); |
2540 | if(TMath::Abs(ud[0])>0.00001){ |
2541 | Float_t dcoeff = ud[1]/ud[0]; |
2542 | be = TMath::Abs((xdet[1]-dcoeff*xdet[0])/TMath::Sqrt(dcoeff*dcoeff+1.)); |
2543 | } |
2544 | else{ |
2545 | be = TMath::Abs(ud[0]); |
2546 | } |
2547 | |
2548 | ibe = Int_t(be*1000.+1); |
2549 | //if((vol[0]==1)) radius = fFibZN[1]; |
2550 | //else if((vol[0]==2)) radius = fFibZP[1]; |
2551 | |
2552 | //Looking into the light tables |
2553 | Float_t charge = gMC->TrackCharge(); |
2554 | |
2555 | if((vol[0]==1)) { // (1) ZN fibres |
2556 | if(ibe>fNben) ibe=fNben; |
2557 | out = charge*charge*fTablen[ibeta][ialfa][ibe]; |
2558 | nphe = gRandom->Poisson(out); |
2559 | // Ch. debug |
2560 | //if(ibeta==3) printf("\t %f \t %f \t %f\n",alfa, be, out); |
2561 | //printf("\t ibeta = %d, ialfa = %d, ibe = %d -> nphe = %d\n\n",ibeta,ialfa,ibe,nphe); |
2562 | if(gMC->CurrentMedium() == fMedSensF1){ |
2563 | hits[7] = nphe; //fLightPMQ |
2564 | hits[8] = 0; |
2565 | hits[9] = 0; |
2566 | AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); |
2567 | } |
2568 | else{ |
2569 | hits[7] = 0; |
2570 | hits[8] = nphe; //fLightPMC |
2571 | hits[9] = 0; |
2572 | AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); |
2573 | } |
2574 | } |
2575 | else if((vol[0]==2)) { // (2) ZP fibres |
2576 | if(ibe>fNbep) ibe=fNbep; |
2577 | out = charge*charge*fTablep[ibeta][ialfa][ibe]; |
2578 | nphe = gRandom->Poisson(out); |
2579 | if(gMC->CurrentMedium() == fMedSensF1){ |
2580 | hits[7] = nphe; //fLightPMQ |
2581 | hits[8] = 0; |
2582 | hits[9] = 0; |
2583 | AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); |
2584 | } |
2585 | else{ |
2586 | hits[7] = 0; |
2587 | hits[8] = nphe; //fLightPMC |
2588 | hits[9] = 0; |
2589 | AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); |
2590 | } |
2591 | } |
2592 | else if((vol[0]==3)) { // (3) ZEM fibres |
2593 | if(ibe>fNbep) ibe=fNbep; |
2594 | out = charge*charge*fTablep[ibeta][ialfa][ibe]; |
2595 | gMC->TrackPosition(s); |
2596 | for(j=0; j<=2; j++){ |
2597 | xalic[j] = s[j]; |
2598 | } |
2599 | // z-coordinate from ZEM front face |
2600 | // NB-> fPosZEM[2]+fZEMLength = -1000.+2*10.3 = 979.69 cm |
2601 | z = -xalic[2]+fPosZEM[2]+2*fZEMLength-xalic[1]; |
2602 | // z = xalic[2]-fPosZEM[2]-fZEMLength-xalic[1]*(TMath::Tan(45.*kDegrad)); |
2603 | // printf("\n fPosZEM[2]+2*fZEMLength = %f", fPosZEM[2]+2*fZEMLength); |
2604 | guiEff = guiPar[0]*(guiPar[1]*z*z+guiPar[2]*z+guiPar[3]); |
2605 | out = out*guiEff; |
2606 | nphe = gRandom->Poisson(out); |
2607 | // printf(" out*guiEff = %f nphe = %d", out, nphe); |
2608 | if(vol[1] == 1){ |
2609 | hits[7] = 0; |
2610 | hits[8] = nphe; //fLightPMC (ZEM1) |
2611 | hits[9] = 0; |
2612 | AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); |
2613 | } |
2614 | else{ |
2615 | hits[7] = nphe; //fLightPMQ (ZEM2) |
2616 | hits[8] = 0; |
2617 | hits[9] = 0; |
2618 | AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); |
2619 | } |
2620 | } |
2621 | } |
2622 | } |
2623 | } |