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