]>
Commit | Line | Data |
---|---|---|
68ca986e | 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 | ||
88cb7938 | 16 | /* $Id$ */ |
68ca986e | 17 | |
18 | /////////////////////////////////////////////////////////////////////////////// | |
19 | // // | |
47388856 | 20 | // AliZDCv1 --- ZDC geometry as designed in TDR (obsolete!) // |
21 | // with the EM ZDC at 116 m from IP // | |
22 | // Just one set of ZDC is inserted, on the same side of the dimuon arm // | |
68ca986e | 23 | // // |
24 | /////////////////////////////////////////////////////////////////////////////// | |
25 | ||
cc9c0243 | 26 | // --- Standard libraries |
27 | #include "stdio.h" | |
28 | ||
5ce39387 | 29 | // --- ROOT system |
68ca986e | 30 | #include <TBRIK.h> |
88cb7938 | 31 | #include <TLorentzVector.h> |
68ca986e | 32 | #include <TMath.h> |
88cb7938 | 33 | #include <TNode.h> |
5ce39387 | 34 | #include <TRandom.h> |
866ab5a2 | 35 | #include <TSystem.h> |
5ce39387 | 36 | #include <TTree.h> |
88cb7938 | 37 | #include <TVirtualMC.h> |
5ce39387 | 38 | |
39 | // --- AliRoot classes | |
88cb7938 | 40 | #include "AliConst.h" |
5ce39387 | 41 | #include "AliDetector.h" |
94de3818 | 42 | #include "AliMagF.h" |
68ca986e | 43 | #include "AliPDG.h" |
88cb7938 | 44 | #include "AliRun.h" |
45 | #include "AliZDCHit.h" | |
46 | #include "AliZDCv1.h" | |
68ca986e | 47 | |
48 | ||
49 | ClassImp(AliZDCv1) | |
50 | ||
68ca986e | 51 | //_____________________________________________________________________________ |
52 | AliZDCv1::AliZDCv1() : AliZDC() | |
53 | { | |
54 | // | |
55 | // Default constructor for Zero Degree Calorimeter | |
56 | // | |
5ce39387 | 57 | |
866ab5a2 | 58 | fMedSensF1 = 0; |
59 | fMedSensF2 = 0; | |
60 | fMedSensZN = 0; | |
61 | fMedSensZP = 0; | |
866ab5a2 | 62 | fMedSensZEM = 0; |
5a881c97 | 63 | fMedSensGR = 0; |
de28527d | 64 | // fMedSensPI = 0; |
65 | // fMedSensTDI = 0; | |
68ca986e | 66 | } |
67 | ||
68 | //_____________________________________________________________________________ | |
69 | AliZDCv1::AliZDCv1(const char *name, const char *title) | |
70 | : AliZDC(name,title) | |
71 | { | |
72 | // | |
73 | // Standard constructor for Zero Degree Calorimeter | |
74 | // | |
a2216698 | 75 | // |
76 | // Check that DIPO, ABSO, DIPO and SHIL is there (otherwise tracking is wrong!!!) | |
77 | ||
47388856 | 78 | AliModule *PIPE=gAlice->GetModule("PIPE"); |
79 | AliModule *ABSO=gAlice->GetModule("ABSO"); | |
80 | AliModule *DIPO=gAlice->GetModule("DIPO"); | |
81 | AliModule *SHIL=gAlice->GetModule("SHIL"); | |
a2216698 | 82 | if((!PIPE) || (!ABSO) || (!DIPO) || (!SHIL)) { |
83 | Error("Constructor","ZDC needs PIPE, ABSO, DIPO and SHIL!!!\n"); | |
84 | exit(1); | |
85 | } | |
5ce39387 | 86 | |
866ab5a2 | 87 | fMedSensF1 = 0; |
88 | fMedSensF2 = 0; | |
89 | fMedSensZN = 0; | |
90 | fMedSensZP = 0; | |
866ab5a2 | 91 | fMedSensZEM = 0; |
5a881c97 | 92 | fMedSensGR = 0; |
de28527d | 93 | // fMedSensPI = 0; |
94 | // fMedSensTDI = 0; | |
5a881c97 | 95 | |
96 | ||
97 | // Parameters for light tables | |
98 | fNalfan = 90; // Number of Alfa (neutrons) | |
99 | fNalfap = 90; // Number of Alfa (protons) | |
100 | fNben = 18; // Number of beta (neutrons) | |
101 | fNbep = 28; // Number of beta (protons) | |
102 | Int_t ip,jp,kp; | |
103 | for(ip=0; ip<4; ip++){ | |
104 | for(kp=0; kp<fNalfap; kp++){ | |
105 | for(jp=0; jp<fNbep; jp++){ | |
106 | fTablep[ip][kp][jp] = 0; | |
107 | } | |
108 | } | |
109 | } | |
110 | Int_t in,jn,kn; | |
111 | for(in=0; in<4; in++){ | |
112 | for(kn=0; kn<fNalfan; kn++){ | |
113 | for(jn=0; jn<fNben; jn++){ | |
114 | fTablen[in][kn][jn] = 0; | |
115 | } | |
116 | } | |
117 | } | |
118 | ||
119 | // Parameters for hadronic calorimeters geometry | |
120 | fDimZP[0] = 11.2; | |
121 | fDimZP[1] = 6.; | |
122 | fDimZP[2] = 75.; | |
123 | fPosZN[0] = 0.; | |
47388856 | 124 | fPosZN[1] = 1.2; |
5a881c97 | 125 | fPosZN[2] = 11650.; |
a2216698 | 126 | fPosZP[0] = -24.; |
5a881c97 | 127 | fPosZP[1] = 0.; |
128 | fPosZP[2] = 11600.; | |
129 | fFibZN[0] = 0.; | |
130 | fFibZN[1] = 0.01825; | |
131 | fFibZN[2] = 50.; | |
132 | fFibZP[0] = 0.; | |
133 | fFibZP[1] = 0.0275; | |
134 | fFibZP[2] = 75.; | |
135 | ||
136 | // Parameters for EM calorimeter geometry | |
137 | fPosZEM[0] = 0.; | |
138 | fPosZEM[1] = 5.8; | |
139 | fPosZEM[2] = 11600.; | |
140 | ||
68ca986e | 141 | } |
142 | ||
143 | //_____________________________________________________________________________ | |
144 | void AliZDCv1::CreateGeometry() | |
145 | { | |
146 | // | |
147 | // Create the geometry for the Zero Degree Calorimeter version 1 | |
148 | //* Initialize COMMON block ZDC_CGEOM | |
149 | //* | |
150 | ||
151 | CreateBeamLine(); | |
152 | CreateZDC(); | |
153 | } | |
154 | ||
155 | //_____________________________________________________________________________ | |
156 | void AliZDCv1::CreateBeamLine() | |
157 | { | |
158 | ||
a2216698 | 159 | Float_t zq, zd1, zd2; |
160 | Float_t conpar[9], tubpar[3], tubspar[5], boxpar[3]; | |
68ca986e | 161 | Int_t im1, im2; |
68ca986e | 162 | |
163 | Int_t *idtmed = fIdtmed->GetArray(); | |
164 | ||
a2216698 | 165 | // -- Mother of the ZDCs (Vacuum PCON) |
68ca986e | 166 | |
167 | conpar[0] = 0.; | |
168 | conpar[1] = 360.; | |
169 | conpar[2] = 2.; | |
0014adbc | 170 | conpar[3] = 2000.; |
68ca986e | 171 | conpar[4] = 0.; |
172 | conpar[5] = 55.; | |
173 | conpar[6] = 13060.; | |
174 | conpar[7] = 0.; | |
175 | conpar[8] = 55.; | |
a2216698 | 176 | gMC->Gsvolu("ZDC ", "PCON", idtmed[11], conpar, 9); |
68ca986e | 177 | gMC->Gspos("ZDC ", 1, "ALIC", 0., 0., 0., 0, "ONLY"); |
178 | ||
179 | // -- FIRST SECTION OF THE BEAM PIPE (from compensator dipole to | |
a2216698 | 180 | // the beginning of D1) |
68ca986e | 181 | |
0014adbc | 182 | zd1 = 2000.; |
68ca986e | 183 | |
184 | tubpar[0] = 6.3/2.; | |
185 | tubpar[1] = 6.7/2.; | |
0014adbc | 186 | tubpar[2] = 3838.3/2.; |
a2216698 | 187 | gMC->Gsvolu("QT01", "TUBE", idtmed[7], tubpar, 3); |
188 | gMC->Gspos("QT01", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
189 | ||
190 | //-- SECOND SECTION OF THE BEAM PIPE (from the end of D1 to the | |
191 | // beginning of D2) | |
192 | ||
193 | //-- FROM MAGNETIC BEGINNING OF D1 TO MAGNETIC END OF D1 + 13.5 cm | |
194 | //-- Cylindrical pipe (r = 3.47) + conical flare | |
195 | ||
196 | // -> Beginning of D1 | |
197 | zd1 += 2.*tubpar[2]; | |
198 | ||
199 | tubpar[0] = 3.47; | |
200 | tubpar[1] = 3.47+0.2; | |
201 | tubpar[2] = 958.5/2.; | |
202 | gMC->Gsvolu("QT02", "TUBE", idtmed[7], tubpar, 3); | |
203 | gMC->Gspos("QT02", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
204 | ||
205 | zd1 += 2.*tubpar[2]; | |
68ca986e | 206 | |
207 | conpar[0] = 25./2.; | |
208 | conpar[1] = 6.44/2.; | |
209 | conpar[2] = 6.84/2.; | |
210 | conpar[3] = 10./2.; | |
211 | conpar[4] = 10.4/2.; | |
a2216698 | 212 | gMC->Gsvolu("QC01", "CONE", idtmed[7], conpar, 5); |
213 | gMC->Gspos("QC01", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY"); | |
68ca986e | 214 | |
215 | zd1 += 2.*conpar[0]; | |
216 | ||
217 | tubpar[0] = 10./2.; | |
218 | tubpar[1] = 10.4/2.; | |
219 | tubpar[2] = 50./2.; | |
a2216698 | 220 | gMC->Gsvolu("QT03", "TUBE", idtmed[7], tubpar, 3); |
221 | gMC->Gspos("QT03", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
68ca986e | 222 | |
5a881c97 | 223 | zd1 += tubpar[2]*2.; |
68ca986e | 224 | |
225 | tubpar[0] = 10./2.; | |
226 | tubpar[1] = 10.4/2.; | |
227 | tubpar[2] = 10./2.; | |
a2216698 | 228 | gMC->Gsvolu("QT04", "TUBE", idtmed[7], tubpar, 3); |
229 | gMC->Gspos("QT04", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
68ca986e | 230 | |
231 | zd1 += tubpar[2] * 2.; | |
232 | ||
233 | tubpar[0] = 10./2.; | |
234 | tubpar[1] = 10.4/2.; | |
235 | tubpar[2] = 3.16/2.; | |
a2216698 | 236 | gMC->Gsvolu("QT05", "TUBE", idtmed[7], tubpar, 3); |
237 | gMC->Gspos("QT05", 1, "ZDC ", 0., 0., tubpar[0] + zd1, 0, "ONLY"); | |
68ca986e | 238 | |
239 | zd1 += tubpar[2] * 2.; | |
240 | ||
241 | tubpar[0] = 10.0/2.; | |
242 | tubpar[1] = 10.4/2; | |
243 | tubpar[2] = 190./2.; | |
a2216698 | 244 | gMC->Gsvolu("QT06", "TUBE", idtmed[7], tubpar, 3); |
245 | gMC->Gspos("QT06", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
68ca986e | 246 | |
247 | zd1 += tubpar[2] * 2.; | |
248 | ||
249 | conpar[0] = 30./2.; | |
250 | conpar[1] = 10./2.; | |
251 | conpar[2] = 10.4/2.; | |
252 | conpar[3] = 20.6/2.; | |
253 | conpar[4] = 21./2.; | |
a2216698 | 254 | gMC->Gsvolu("QC02", "CONE", idtmed[7], conpar, 5); |
255 | gMC->Gspos("QC02", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY"); | |
68ca986e | 256 | |
257 | zd1 += conpar[0] * 2.; | |
258 | ||
259 | tubpar[0] = 20.6/2.; | |
260 | tubpar[1] = 21./2.; | |
261 | tubpar[2] = 450./2.; | |
a2216698 | 262 | gMC->Gsvolu("QT07", "TUBE", idtmed[7], tubpar, 3); |
263 | gMC->Gspos("QT07", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
68ca986e | 264 | |
265 | zd1 += tubpar[2] * 2.; | |
266 | ||
267 | conpar[0] = 13.6/2.; | |
268 | conpar[1] = 20.6/2.; | |
269 | conpar[2] = 21./2.; | |
270 | conpar[3] = 25.4/2.; | |
271 | conpar[4] = 25.8/2.; | |
a2216698 | 272 | gMC->Gsvolu("QC03", "CONE", idtmed[7], conpar, 5); |
273 | gMC->Gspos("QC03", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY"); | |
68ca986e | 274 | |
275 | zd1 += conpar[0] * 2.; | |
276 | ||
277 | tubpar[0] = 25.4/2.; | |
278 | tubpar[1] = 25.8/2.; | |
279 | tubpar[2] = 205.8/2.; | |
a2216698 | 280 | gMC->Gsvolu("QT08", "TUBE", idtmed[7], tubpar, 3); |
281 | gMC->Gspos("QT08", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
68ca986e | 282 | |
283 | zd1 += tubpar[2] * 2.; | |
284 | ||
285 | tubpar[0] = 50./2.; | |
286 | tubpar[1] = 50.4/2.; | |
a2216698 | 287 | // QT09 is 10 cm longer to accomodate TDI |
288 | tubpar[2] = 515.4/2.; | |
289 | gMC->Gsvolu("QT09", "TUBE", idtmed[7], tubpar, 3); | |
47388856 | 290 | gMC->Gspos("QT09", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); |
7cc664ae | 291 | |
a2216698 | 292 | // --- Insert TDI (inside ZDC volume) |
293 | ||
294 | boxpar[0] = 5.6; | |
295 | boxpar[1] = 5.6; | |
296 | boxpar[2] = 400./2.; | |
297 | gMC->Gsvolu("QTD1", "BOX ", idtmed[7], boxpar, 3); | |
7cc664ae | 298 | gMC->Gspos("QTD1", 1, "ZDC ", 3., 10.6, tubpar[2] + zd1 + 56.3, 0, "ONLY"); |
299 | gMC->Gspos("QTD1", 2, "ZDC ", 3., -10.6, tubpar[2] + zd1 + 56.3, 0, "ONLY"); | |
a2216698 | 300 | |
301 | boxpar[0] = 0.2/2.; | |
302 | boxpar[1] = 5.6; | |
303 | boxpar[2] = 400./2.; | |
304 | gMC->Gsvolu("QTD2", "BOX ", idtmed[6], boxpar, 3); | |
7cc664ae | 305 | gMC->Gspos("QTD2", 1, "ZDC ", 8.6+boxpar[0], 0., tubpar[2] + zd1 + 56.3, 0, "ONLY"); |
a2216698 | 306 | |
6d5d9c06 | 307 | // tubspar[0] = 6.2; // R = 6.2 cm---------------------------------------- |
308 | // tubspar[1] = 6.4; | |
7cc664ae | 309 | // tubspar[2] = 400./2.; |
6d5d9c06 | 310 | // tubspar[3] = 180.-62.5; |
311 | // tubspar[4] = 180.+62.5; | |
312 | tubspar[0] = 10.5; // R = 10.5 cm------------------------------------------ | |
313 | tubspar[1] = 10.7; | |
314 | tubspar[2] = 400./2.; | |
315 | tubspar[3] = 180.-75.5; | |
316 | tubspar[4] = 180.+75.5; | |
a2216698 | 317 | gMC->Gsvolu("QTD3", "TUBS", idtmed[6], tubspar, 5); |
7cc664ae | 318 | gMC->Gspos("QTD3", 1, "ZDC ", 0., 0., tubpar[2] + zd1 + 56.3, 0, "ONLY"); |
a2216698 | 319 | |
68ca986e | 320 | zd1 += tubpar[2] * 2.; |
321 | ||
322 | tubpar[0] = 50./2.; | |
323 | tubpar[1] = 50.4/2.; | |
a2216698 | 324 | // QT10 is 10 cm shorter |
325 | tubpar[2] = 690./2.; | |
326 | gMC->Gsvolu("QT10", "TUBE", idtmed[7], tubpar, 3); | |
327 | gMC->Gspos("QT10", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
68ca986e | 328 | |
329 | zd1 += tubpar[2] * 2.; | |
330 | ||
331 | tubpar[0] = 50./2.; | |
332 | tubpar[1] = 50.4/2.; | |
333 | tubpar[2] = 778.5/2.; | |
a2216698 | 334 | gMC->Gsvolu("QT11", "TUBE", idtmed[7], tubpar, 3); |
335 | gMC->Gspos("QT11", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
68ca986e | 336 | |
337 | zd1 += tubpar[2] * 2.; | |
338 | ||
339 | conpar[0] = 14.18/2.; | |
340 | conpar[1] = 50./2.; | |
341 | conpar[2] = 50.4/2.; | |
342 | conpar[3] = 55./2.; | |
343 | conpar[4] = 55.4/2.; | |
a2216698 | 344 | gMC->Gsvolu("QC04", "CONE", idtmed[7], conpar, 5); |
345 | gMC->Gspos("QC04", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY"); | |
68ca986e | 346 | |
347 | zd1 += conpar[0] * 2.; | |
348 | ||
349 | tubpar[0] = 55./2.; | |
350 | tubpar[1] = 55.4/2.; | |
351 | tubpar[2] = 730./2.; | |
a2216698 | 352 | gMC->Gsvolu("QT12", "TUBE", idtmed[7], tubpar, 3); |
353 | gMC->Gspos("QT12", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
68ca986e | 354 | |
355 | zd1 += tubpar[2] * 2.; | |
356 | ||
357 | conpar[0] = 36.86/2.; | |
358 | conpar[1] = 55./2.; | |
359 | conpar[2] = 55.4/2.; | |
360 | conpar[3] = 68./2.; | |
361 | conpar[4] = 68.4/2.; | |
a2216698 | 362 | gMC->Gsvolu("QC05", "CONE", idtmed[7], conpar, 5); |
363 | gMC->Gspos("QC05", 1, "ZDC ", 0., 0., conpar[0] + zd1, 0, "ONLY"); | |
68ca986e | 364 | |
365 | zd1 += conpar[0] * 2.; | |
366 | ||
367 | tubpar[0] = 68./2.; | |
368 | tubpar[1] = 68.4/2.; | |
369 | tubpar[2] = 927.3/2.; | |
a2216698 | 370 | gMC->Gsvolu("QT13", "TUBE", idtmed[7], tubpar, 3); |
371 | gMC->Gspos("QT13", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
68ca986e | 372 | |
373 | zd1 += tubpar[2] * 2.; | |
374 | ||
375 | tubpar[0] = 0./2.; | |
376 | tubpar[1] = 68.4/2.; | |
377 | tubpar[2] = 0.2/2.; | |
a2216698 | 378 | gMC->Gsvolu("QT14", "TUBE", idtmed[8], tubpar, 3); |
379 | gMC->Gspos("QT14", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
68ca986e | 380 | |
381 | zd1 += tubpar[2] * 2.; | |
382 | ||
383 | tubpar[0] = 0./2.; | |
a2216698 | 384 | tubpar[1] = 6.4/2.; |
68ca986e | 385 | tubpar[2] = 0.2/2.; |
a2216698 | 386 | gMC->Gsvolu("QT15", "TUBE", idtmed[11], tubpar, 3); |
68ca986e | 387 | |
a2216698 | 388 | //-- Position QT15 inside QT14 |
389 | gMC->Gspos("QT15", 1, "QT14", -7.7, 0., 0., 0, "ONLY"); | |
68ca986e | 390 | |
391 | tubpar[0] = 0./2.; | |
a2216698 | 392 | tubpar[1] = 6.4/2.; |
68ca986e | 393 | tubpar[2] = 0.2/2.; |
a2216698 | 394 | gMC->Gsvolu("QT16", "TUBE", idtmed[11], tubpar, 3); |
395 | ||
396 | //-- Position QT16 inside QT14 | |
397 | gMC->Gspos("QT16", 1, "QT14", 7.7, 0., 0., 0, "ONLY"); | |
68ca986e | 398 | |
68ca986e | 399 | |
400 | //-- BEAM PIPE BETWEEN END OF CONICAL PIPE AND BEGINNING OF D2 | |
401 | ||
a2216698 | 402 | tubpar[0] = 6.4/2.; |
403 | tubpar[1] = 6.8/2.; | |
404 | tubpar[2] = 680.8/2.; | |
405 | gMC->Gsvolu("QT17", "TUBE", idtmed[7], tubpar, 3); | |
68ca986e | 406 | |
a2216698 | 407 | tubpar[0] = 6.4/2.; |
408 | tubpar[1] = 6.8/2.; | |
409 | tubpar[2] = 680.8/2.; | |
410 | gMC->Gsvolu("QT18", "TUBE", idtmed[7], tubpar, 3); | |
68ca986e | 411 | |
412 | // -- ROTATE PIPES | |
413 | ||
a2216698 | 414 | Float_t angle = 0.143*kDegrad; |
68ca986e | 415 | |
a2216698 | 416 | AliMatrix(im1, 90.-0.143, 0., 90., 90., 0.143, 180.); |
417 | gMC->Gspos("QT17", 1, "ZDC ", TMath::Sin(angle) * 680.8/ 2. - 9.4, | |
418 | 0., tubpar[2] + zd1, im1, "ONLY"); | |
419 | ||
420 | AliMatrix(im2, 90.+0.143, 0., 90., 90., 0.143, 0.); | |
421 | gMC->Gspos("QT18", 1, "ZDC ", 9.7 - TMath::Sin(angle) * 680.8 / 2., | |
422 | 0., tubpar[2] + zd1, im2, "ONLY"); | |
423 | ||
424 | ||
425 | // -- END OF BEAM PIPE VOLUME DEFINITION. | |
426 | // ---------------------------------------------------------------- | |
427 | ||
428 | // -- MAGNET DEFINITION -> LHC OPTICS 6.2 (preliminary version) | |
68ca986e | 429 | |
0014adbc | 430 | // ---------------------------------------------------------------- |
431 | // Replaced by the muon dipole | |
432 | // ---------------------------------------------------------------- | |
68ca986e | 433 | // -- COMPENSATOR DIPOLE (MBXW) |
434 | // GAP (VACUUM WITH MAGNETIC FIELD) | |
435 | ||
5ce39387 | 436 | // tubpar[0] = 0.; |
437 | // tubpar[1] = 4.5; | |
438 | // tubpar[2] = 340./2.; | |
439 | // gMC->Gsvolu("MBXW", "TUBE", idtmed[11], tubpar, 3); | |
440 | // gMC->Gspos("MBXW", 1, "ZDC ", 0., 0., tubpar[2] + 805., 0, "ONLY"); | |
68ca986e | 441 | |
442 | // -- YOKE (IRON WITHOUT MAGNETIC FIELD) | |
443 | ||
5ce39387 | 444 | // tubpar[0] = 4.5; |
445 | // tubpar[1] = 55.; | |
446 | // tubpar[2] = 340./2.; | |
a2216698 | 447 | // gMC->Gsvolu("YMBX", "TUBE", idtmed[7], tubpar, 3); |
5ce39387 | 448 | // gMC->Gspos("YMBX", 1, "ZDC ", 0., 0., tubpar[2] + 805., 0, "ONLY"); |
68ca986e | 449 | |
0014adbc | 450 | // ---------------------------------------------------------------- |
a2216698 | 451 | // Replaced by the second dipole |
0014adbc | 452 | // ---------------------------------------------------------------- |
68ca986e | 453 | // -- COMPENSATOR DIPOLE (MCBWA) |
454 | // GAP (VACUUM WITH MAGNETIC FIELD) | |
455 | ||
0014adbc | 456 | // tubpar[0] = 0.; |
457 | // tubpar[1] = 4.5; | |
458 | // tubpar[2] = 170./2.; | |
459 | // gMC->Gsvolu("MCBW", "TUBE", idtmed[11], tubpar, 3); | |
460 | // gMC->Gspos("MCBW", 1, "ZDC ", 0., 0., tubpar[2] + 1921.6, 0, "ONLY"); | |
68ca986e | 461 | |
462 | // -- YOKE (IRON WITHOUT MAGNETIC FIELD) | |
463 | ||
0014adbc | 464 | // tubpar[0] = 4.5; |
465 | // tubpar[1] = 55.; | |
466 | // tubpar[2] = 170./2.; | |
a2216698 | 467 | // gMC->Gsvolu("YMCB", "TUBE", idtmed[7], tubpar, 3); |
0014adbc | 468 | // gMC->Gspos("YMCB", 1, "ZDC ", 0., 0., tubpar[2] + 1921.6, 0, "ONLY"); |
68ca986e | 469 | |
470 | // -- INNER TRIPLET | |
471 | ||
a2216698 | 472 | zq = 2296.5; |
68ca986e | 473 | |
474 | // -- DEFINE MQXL AND MQX QUADRUPOLE ELEMENT | |
475 | ||
476 | // MQXL | |
477 | // -- GAP (VACUUM WITH MAGNETIC FIELD) | |
478 | ||
479 | tubpar[0] = 0.; | |
480 | tubpar[1] = 3.5; | |
a2216698 | 481 | tubpar[2] = 637./2.; |
68ca986e | 482 | gMC->Gsvolu("MQXL", "TUBE", idtmed[11], tubpar, 3); |
483 | ||
484 | // -- YOKE | |
485 | ||
486 | tubpar[0] = 3.5; | |
487 | tubpar[1] = 22.; | |
a2216698 | 488 | tubpar[2] = 637./2.; |
489 | gMC->Gsvolu("YMQL", "TUBE", idtmed[7], tubpar, 3); | |
68ca986e | 490 | |
491 | gMC->Gspos("MQXL", 1, "ZDC ", 0., 0., tubpar[2] + zq, 0, "ONLY"); | |
492 | gMC->Gspos("YMQL", 1, "ZDC ", 0., 0., tubpar[2] + zq, 0, "ONLY"); | |
493 | ||
494 | gMC->Gspos("MQXL", 2, "ZDC ", 0., 0., tubpar[2] + zq + 2430., 0, "ONLY"); | |
495 | gMC->Gspos("YMQL", 2, "ZDC ", 0., 0., tubpar[2] + zq + 2430., 0, "ONLY"); | |
496 | ||
497 | // -- MQX | |
498 | // -- GAP (VACUUM WITH MAGNETIC FIELD) | |
499 | ||
500 | tubpar[0] = 0.; | |
501 | tubpar[1] = 3.5; | |
502 | tubpar[2] = 550./2.; | |
503 | gMC->Gsvolu("MQX ", "TUBE", idtmed[11], tubpar, 3); | |
504 | ||
505 | // -- YOKE | |
506 | ||
507 | tubpar[0] = 3.5; | |
508 | tubpar[1] = 22.; | |
509 | tubpar[2] = 550./2.; | |
a2216698 | 510 | gMC->Gsvolu("YMQ ", "TUBE", idtmed[7], tubpar, 3); |
68ca986e | 511 | |
a2216698 | 512 | gMC->Gspos("MQX ", 1, "ZDC ", 0., 0., tubpar[2] + zq + 883.5, 0, "ONLY"); |
513 | gMC->Gspos("YMQ ", 1, "ZDC ", 0., 0., tubpar[2] + zq + 883.5, 0, "ONLY"); | |
68ca986e | 514 | |
a2216698 | 515 | gMC->Gspos("MQX ", 2, "ZDC ", 0., 0., tubpar[2] + zq + 1533.5, 0, "ONLY"); |
516 | gMC->Gspos("YMQ ", 2, "ZDC ", 0., 0., tubpar[2] + zq + 1533.5, 0, "ONLY"); | |
68ca986e | 517 | |
518 | // -- SEPARATOR DIPOLE D1 | |
519 | ||
520 | zd1 = 5838.3; | |
521 | ||
522 | // -- GAP (VACUUM WITH MAGNETIC FIELD) | |
523 | ||
524 | tubpar[0] = 0.; | |
a2216698 | 525 | tubpar[1] = 6.94/2.; |
68ca986e | 526 | tubpar[2] = 945./2.; |
a2216698 | 527 | gMC->Gsvolu("MD1 ", "TUBE", idtmed[11], tubpar, 3); |
528 | ||
529 | // -- Insert horizontal Cu plates inside D1 | |
530 | // -- (to simulate the vacuum chamber) | |
68ca986e | 531 | |
a2216698 | 532 | boxpar[0] = TMath::Sqrt(tubpar[1]*tubpar[1]-(2.98+0.2)*(2.98+0.2)); |
533 | boxpar[1] = 0.2/2.; | |
534 | boxpar[2] =945./2.; | |
535 | gMC->Gsvolu("MD1V", "BOX ", idtmed[6], boxpar, 3); | |
536 | gMC->Gspos("MD1V", 1, "MD1 ", 0., 2.98+boxpar[1], 0., 0, "ONLY"); | |
537 | gMC->Gspos("MD1V", 2, "MD1 ", 0., -2.98-boxpar[1], 0., 0, "ONLY"); | |
538 | ||
68ca986e | 539 | // -- YOKE |
540 | ||
541 | tubpar[0] = 0.; | |
542 | tubpar[1] = 110./2; | |
543 | tubpar[2] = 945./2.; | |
a2216698 | 544 | gMC->Gsvolu("YD1 ", "TUBE", idtmed[7], tubpar, 3); |
68ca986e | 545 | |
546 | gMC->Gspos("YD1 ", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY"); | |
a2216698 | 547 | gMC->Gspos("MD1 ", 1, "YD1 ", 0., 0., 0., 0, "ONLY"); |
68ca986e | 548 | |
549 | // -- DIPOLE D2 | |
550 | ||
551 | zd2 = 12147.6; | |
552 | ||
553 | // -- GAP (VACUUM WITH MAGNETIC FIELD) | |
554 | ||
555 | tubpar[0] = 0.; | |
556 | tubpar[1] = 7.5/2.; | |
557 | tubpar[2] = 945./2.; | |
a2216698 | 558 | gMC->Gsvolu("MD2 ", "TUBE", idtmed[11], tubpar, 3); |
68ca986e | 559 | |
560 | // -- YOKE | |
561 | ||
562 | tubpar[0] = 0.; | |
563 | tubpar[1] = 55.; | |
564 | tubpar[2] = 945./2.; | |
a2216698 | 565 | gMC->Gsvolu("YD2 ", "TUBE", idtmed[7], tubpar, 3); |
68ca986e | 566 | |
567 | gMC->Gspos("YD2 ", 1, "ZDC ", 0., 0., tubpar[2] + zd2, 0, "ONLY"); | |
568 | ||
a2216698 | 569 | gMC->Gspos("MD2 ", 1, "YD2 ", -9.4, 0., 0., 0, "ONLY"); |
570 | gMC->Gspos("MD2 ", 2, "YD2 ", 9.4, 0., 0., 0, "ONLY"); | |
68ca986e | 571 | |
572 | // -- END OF MAGNET DEFINITION | |
573 | } | |
574 | ||
575 | //_____________________________________________________________________________ | |
576 | void AliZDCv1::CreateZDC() | |
577 | { | |
578 | ||
866ab5a2 | 579 | Float_t DimPb[6], DimVoid[6]; |
5a881c97 | 580 | |
581 | Int_t *idtmed = fIdtmed->GetArray(); | |
582 | ||
583 | // Parameters for hadronic calorimeters geometry | |
584 | // NB -> parameters used ONLY in CreateZDC() | |
585 | Float_t fDimZN[3] = {3.52, 3.52, 50.}; // Dimensions of neutron detector | |
586 | Float_t fGrvZN[3] = {0.03, 0.03, 50.}; // Grooves for neutron detector | |
587 | Float_t fGrvZP[3] = {0.04, 0.04, 75.}; // Grooves for proton detector | |
588 | Int_t fDivZN[3] = {11, 11, 0}; // Division for neutron detector | |
589 | Int_t fDivZP[3] = {7, 15, 0}; // Division for proton detector | |
590 | Int_t fTowZN[2] = {2, 2}; // Tower for neutron detector | |
591 | Int_t fTowZP[2] = {4, 1}; // Tower for proton detector | |
592 | ||
593 | // Parameters for EM calorimeter geometry | |
594 | // NB -> parameters used ONLY in CreateZDC() | |
595 | Float_t fDimZEMPb = 0.15*(TMath::Sqrt(2.)); // z-dimension of the Pb slice | |
596 | Float_t fDimZEMAir = 0.001; // scotch | |
597 | Float_t fFibRadZEM = 0.0315; // External fiber radius (including cladding) | |
598 | Int_t fDivZEM[3] = {92, 0, 20}; // Divisions for EM detector | |
599 | Float_t fDimZEM0 = 2*fDivZEM[2]*(fDimZEMPb+fDimZEMAir+fFibRadZEM*(TMath::Sqrt(2.))); | |
600 | Float_t fDimZEM[6] = {fDimZEM0, 3.5, 3.5, 45., 0., 0.}; // Dimensions of EM detector | |
601 | Float_t fFibZEM2 = fDimZEM[2]/TMath::Sin(fDimZEM[3]*kDegrad)-fFibRadZEM; | |
602 | Float_t fFibZEM[3] = {0., 0.0275, fFibZEM2}; // Fibers for EM calorimeter | |
866ab5a2 | 603 | |
68ca986e | 604 | |
605 | //-- Create calorimeters geometry | |
606 | ||
a2216698 | 607 | // ------------------------------------------------------------------------------- |
68ca986e | 608 | //--> Neutron calorimeter (ZN) |
609 | ||
610 | gMC->Gsvolu("ZNEU", "BOX ", idtmed[1], fDimZN, 3); // Passive material | |
611 | gMC->Gsvolu("ZNF1", "TUBE", idtmed[3], fFibZN, 3); // Active material | |
612 | gMC->Gsvolu("ZNF2", "TUBE", idtmed[4], fFibZN, 3); | |
613 | gMC->Gsvolu("ZNF3", "TUBE", idtmed[4], fFibZN, 3); | |
614 | gMC->Gsvolu("ZNF4", "TUBE", idtmed[3], fFibZN, 3); | |
615 | gMC->Gsvolu("ZNG1", "BOX ", idtmed[12], fGrvZN, 3); // Empty grooves | |
616 | gMC->Gsvolu("ZNG2", "BOX ", idtmed[12], fGrvZN, 3); | |
617 | gMC->Gsvolu("ZNG3", "BOX ", idtmed[12], fGrvZN, 3); | |
618 | gMC->Gsvolu("ZNG4", "BOX ", idtmed[12], fGrvZN, 3); | |
619 | ||
620 | // Divide ZNEU in towers (for hits purposes) | |
621 | ||
622 | gMC->Gsdvn("ZNTX", "ZNEU", fTowZN[0], 1); // x-tower | |
623 | gMC->Gsdvn("ZN1 ", "ZNTX", fTowZN[1], 2); // y-tower | |
624 | ||
625 | //-- Divide ZN1 in minitowers | |
626 | // fDivZN[0]= NUMBER OF FIBERS PER TOWER ALONG X-AXIS, | |
627 | // fDivZN[1]= NUMBER OF FIBERS PER TOWER ALONG Y-AXIS | |
628 | // (4 fibres per minitower) | |
629 | ||
630 | gMC->Gsdvn("ZNSL", "ZN1 ", fDivZN[1], 2); // Slices | |
631 | gMC->Gsdvn("ZNST", "ZNSL", fDivZN[0], 1); // Sticks | |
632 | ||
633 | // --- Position the empty grooves in the sticks (4 grooves per stick) | |
634 | Float_t dx = fDimZN[0] / fDivZN[0] / 4.; | |
635 | Float_t dy = fDimZN[1] / fDivZN[1] / 4.; | |
636 | ||
637 | gMC->Gspos("ZNG1", 1, "ZNST", 0.-dx, 0.+dy, 0., 0, "ONLY"); | |
638 | gMC->Gspos("ZNG2", 1, "ZNST", 0.+dx, 0.+dy, 0., 0, "ONLY"); | |
639 | gMC->Gspos("ZNG3", 1, "ZNST", 0.-dx, 0.-dy, 0., 0, "ONLY"); | |
640 | gMC->Gspos("ZNG4", 1, "ZNST", 0.+dx, 0.-dy, 0., 0, "ONLY"); | |
641 | ||
642 | // --- Position the fibers in the grooves | |
643 | gMC->Gspos("ZNF1", 1, "ZNG1", 0., 0., 0., 0, "ONLY"); | |
644 | gMC->Gspos("ZNF2", 1, "ZNG2", 0., 0., 0., 0, "ONLY"); | |
645 | gMC->Gspos("ZNF3", 1, "ZNG3", 0., 0., 0., 0, "ONLY"); | |
646 | gMC->Gspos("ZNF4", 1, "ZNG4", 0., 0., 0., 0, "ONLY"); | |
647 | ||
648 | // --- Position the neutron calorimeter in ZDC | |
649 | gMC->Gspos("ZNEU", 1, "ZDC ", fPosZN[0], fPosZN[1], fPosZN[2] + fDimZN[2], 0, "ONLY"); | |
650 | ||
866ab5a2 | 651 | |
a2216698 | 652 | // ------------------------------------------------------------------------------- |
866ab5a2 | 653 | //--> Proton calorimeter (ZP) |
68ca986e | 654 | |
655 | gMC->Gsvolu("ZPRO", "BOX ", idtmed[2], fDimZP, 3); // Passive material | |
656 | gMC->Gsvolu("ZPF1", "TUBE", idtmed[3], fFibZP, 3); // Active material | |
657 | gMC->Gsvolu("ZPF2", "TUBE", idtmed[4], fFibZP, 3); | |
658 | gMC->Gsvolu("ZPF3", "TUBE", idtmed[4], fFibZP, 3); | |
659 | gMC->Gsvolu("ZPF4", "TUBE", idtmed[3], fFibZP, 3); | |
660 | gMC->Gsvolu("ZPG1", "BOX ", idtmed[12], fGrvZP, 3); // Empty grooves | |
661 | gMC->Gsvolu("ZPG2", "BOX ", idtmed[12], fGrvZP, 3); | |
662 | gMC->Gsvolu("ZPG3", "BOX ", idtmed[12], fGrvZP, 3); | |
663 | gMC->Gsvolu("ZPG4", "BOX ", idtmed[12], fGrvZP, 3); | |
664 | ||
665 | //-- Divide ZPRO in towers(for hits purposes) | |
666 | ||
667 | gMC->Gsdvn("ZPTX", "ZPRO", fTowZP[0], 1); // x-tower | |
668 | gMC->Gsdvn("ZP1 ", "ZPTX", fTowZP[1], 2); // y-tower | |
669 | ||
670 | ||
671 | //-- Divide ZP1 in minitowers | |
672 | // fDivZP[0]= NUMBER OF FIBERS ALONG X-AXIS PER MINITOWER, | |
673 | // fDivZP[1]= NUMBER OF FIBERS ALONG Y-AXIS PER MINITOWER | |
674 | // (4 fiber per minitower) | |
675 | ||
676 | gMC->Gsdvn("ZPSL", "ZP1 ", fDivZP[1], 2); // Slices | |
677 | gMC->Gsdvn("ZPST", "ZPSL", fDivZP[0], 1); // Sticks | |
678 | ||
679 | // --- Position the empty grooves in the sticks (4 grooves per stick) | |
680 | dx = fDimZP[0] / fTowZP[0] / fDivZP[0] / 2.; | |
681 | dy = fDimZP[1] / fTowZP[1] / fDivZP[1] / 2.; | |
682 | ||
683 | gMC->Gspos("ZPG1", 1, "ZPST", 0.-dx, 0.+dy, 0., 0, "ONLY"); | |
684 | gMC->Gspos("ZPG2", 1, "ZPST", 0.+dx, 0.+dy, 0., 0, "ONLY"); | |
685 | gMC->Gspos("ZPG3", 1, "ZPST", 0.-dx, 0.-dy, 0., 0, "ONLY"); | |
686 | gMC->Gspos("ZPG4", 1, "ZPST", 0.+dx, 0.-dy, 0., 0, "ONLY"); | |
687 | ||
688 | // --- Position the fibers in the grooves | |
689 | gMC->Gspos("ZPF1", 1, "ZPG1", 0., 0., 0., 0, "ONLY"); | |
690 | gMC->Gspos("ZPF2", 1, "ZPG2", 0., 0., 0., 0, "ONLY"); | |
691 | gMC->Gspos("ZPF3", 1, "ZPG3", 0., 0., 0., 0, "ONLY"); | |
692 | gMC->Gspos("ZPF4", 1, "ZPG4", 0., 0., 0., 0, "ONLY"); | |
693 | ||
694 | ||
695 | // --- Position the proton calorimeter in ZDC | |
696 | gMC->Gspos("ZPRO", 1, "ZDC ", fPosZP[0], fPosZP[1], fPosZP[2] + fDimZP[2], 0, "ONLY"); | |
866ab5a2 | 697 | |
698 | ||
a2216698 | 699 | // ------------------------------------------------------------------------------- |
700 | // -> EM calorimeter (ZEM) | |
866ab5a2 | 701 | |
702 | gMC->Gsvolu("ZEM ", "PARA", idtmed[10], fDimZEM, 6); | |
a2216698 | 703 | |
704 | Int_t irot1, irot2; | |
866ab5a2 | 705 | |
a2216698 | 706 | gMC->Matrix(irot1,0.,0.,90.,90.,90.,180.); // Rotation matrix 1 |
866ab5a2 | 707 | gMC->Matrix(irot2,180.,0.,90.,fDimZEM[3]+90.,90.,fDimZEM[3]); // Rotation matrix 2 |
708 | // printf("irot1 = %d, irot2 = %d \n", irot1, irot2); | |
709 | ||
710 | gMC->Gsvolu("ZEMF", "TUBE", idtmed[3], fFibZEM, 3); // Active material | |
711 | ||
712 | gMC->Gsdvn("ZETR", "ZEM ", fDivZEM[2], 1); // Tranches | |
713 | ||
714 | DimPb[0] = fDimZEMPb; // Lead slices | |
715 | DimPb[1] = fDimZEM[2]; | |
716 | DimPb[2] = fDimZEM[1]; | |
717 | DimPb[3] = 90.-fDimZEM[3]; | |
718 | DimPb[4] = 0.; | |
719 | DimPb[5] = 0.; | |
a2216698 | 720 | gMC->Gsvolu("ZEL0", "PARA", idtmed[5], DimPb, 6); |
721 | gMC->Gsvolu("ZEL1", "PARA", idtmed[5], DimPb, 6); | |
722 | gMC->Gsvolu("ZEL2", "PARA", idtmed[5], DimPb, 6); | |
866ab5a2 | 723 | |
724 | // --- Position the lead slices in the tranche | |
725 | Float_t zTran = fDimZEM[0]/fDivZEM[2]; | |
726 | Float_t zTrPb = -zTran+fDimZEMPb; | |
727 | gMC->Gspos("ZEL0", 1, "ZETR", zTrPb, 0., 0., 0, "ONLY"); | |
728 | gMC->Gspos("ZEL1", 1, "ZETR", fDimZEMPb, 0., 0., 0, "ONLY"); | |
729 | ||
730 | // --- Vacuum zone (to be filled with fibres) | |
731 | DimVoid[0] = (zTran-2*fDimZEMPb)/2.; | |
732 | DimVoid[1] = fDimZEM[2]; | |
733 | DimVoid[2] = fDimZEM[1]; | |
734 | DimVoid[3] = 90.-fDimZEM[3]; | |
735 | DimVoid[4] = 0.; | |
736 | DimVoid[5] = 0.; | |
737 | gMC->Gsvolu("ZEV0", "PARA", idtmed[10], DimVoid,6); | |
738 | gMC->Gsvolu("ZEV1", "PARA", idtmed[10], DimVoid,6); | |
739 | ||
740 | // --- Divide the vacuum slice into sticks along x axis | |
741 | gMC->Gsdvn("ZES0", "ZEV0", fDivZEM[0], 3); | |
742 | gMC->Gsdvn("ZES1", "ZEV1", fDivZEM[0], 3); | |
743 | ||
744 | // --- Positioning the fibers into the sticks | |
745 | gMC->Gspos("ZEMF", 1,"ZES0", 0., 0., 0., irot2, "ONLY"); | |
746 | gMC->Gspos("ZEMF", 1,"ZES1", 0., 0., 0., irot2, "ONLY"); | |
747 | ||
748 | // --- Positioning the vacuum slice into the tranche | |
749 | Float_t DisplFib = fDimZEM[1]/fDivZEM[0]; | |
750 | gMC->Gspos("ZEV0", 1,"ZETR", -DimVoid[0], 0., 0., 0, "ONLY"); | |
751 | gMC->Gspos("ZEV1", 1,"ZETR", -DimVoid[0]+zTran, 0., DisplFib, 0, "ONLY"); | |
752 | ||
753 | // --- Positioning the ZEM into the ZDC - rotation for 90 degrees | |
754 | gMC->Gspos("ZEM ", 1,"ZDC ", fPosZEM[0], fPosZEM[1], fPosZEM[2], irot1, "ONLY"); | |
755 | ||
756 | // --- Adding last slice at the end of the EM calorimeter | |
757 | Float_t zLastSlice = fPosZEM[2]+fDimZEMPb+fDimZEM[0]; | |
758 | gMC->Gspos("ZEL2", 1,"ZDC ", fPosZEM[0], fPosZEM[1], zLastSlice, irot1, "ONLY"); | |
68ca986e | 759 | |
760 | } | |
761 | ||
762 | //_____________________________________________________________________________ | |
763 | void AliZDCv1::DrawModule() | |
764 | { | |
765 | // | |
766 | // Draw a shaded view of the Zero Degree Calorimeter version 1 | |
767 | // | |
768 | ||
769 | // Set everything unseen | |
770 | gMC->Gsatt("*", "seen", -1); | |
771 | // | |
772 | // Set ALIC mother transparent | |
773 | gMC->Gsatt("ALIC","SEEN",0); | |
774 | // | |
775 | // Set the volumes visible | |
776 | gMC->Gsatt("ZDC ","SEEN",0); | |
a2216698 | 777 | gMC->Gsatt("QT01","SEEN",1); |
778 | gMC->Gsatt("QT02","SEEN",1); | |
779 | gMC->Gsatt("QT03","SEEN",1); | |
780 | gMC->Gsatt("QT04","SEEN",1); | |
781 | gMC->Gsatt("QT05","SEEN",1); | |
782 | gMC->Gsatt("QT06","SEEN",1); | |
783 | gMC->Gsatt("QT07","SEEN",1); | |
784 | gMC->Gsatt("QT08","SEEN",1); | |
785 | gMC->Gsatt("QT09","SEEN",1); | |
786 | gMC->Gsatt("QT10","SEEN",1); | |
787 | gMC->Gsatt("QT11","SEEN",1); | |
788 | gMC->Gsatt("QT12","SEEN",1); | |
789 | gMC->Gsatt("QT13","SEEN",1); | |
790 | gMC->Gsatt("QT14","SEEN",1); | |
791 | gMC->Gsatt("QT15","SEEN",1); | |
792 | gMC->Gsatt("QT16","SEEN",1); | |
793 | gMC->Gsatt("QT17","SEEN",1); | |
794 | gMC->Gsatt("QT18","SEEN",1); | |
795 | gMC->Gsatt("QC01","SEEN",1); | |
796 | gMC->Gsatt("QC02","SEEN",1); | |
797 | gMC->Gsatt("QC03","SEEN",1); | |
798 | gMC->Gsatt("QC04","SEEN",1); | |
799 | gMC->Gsatt("QC05","SEEN",1); | |
800 | gMC->Gsatt("QTD1","SEEN",1); | |
801 | gMC->Gsatt("QTD2","SEEN",1); | |
802 | gMC->Gsatt("QTD3","SEEN",1); | |
68ca986e | 803 | gMC->Gsatt("MQXL","SEEN",1); |
804 | gMC->Gsatt("YMQL","SEEN",1); | |
805 | gMC->Gsatt("MQX ","SEEN",1); | |
806 | gMC->Gsatt("YMQ ","SEEN",1); | |
a2216698 | 807 | gMC->Gsatt("ZQYX","SEEN",1); |
808 | gMC->Gsatt("MD1 ","SEEN",1); | |
809 | gMC->Gsatt("MD1V","SEEN",1); | |
68ca986e | 810 | gMC->Gsatt("YD1 ","SEEN",1); |
a2216698 | 811 | gMC->Gsatt("MD2 ","SEEN",1); |
68ca986e | 812 | gMC->Gsatt("YD2 ","SEEN",1); |
813 | gMC->Gsatt("ZNEU","SEEN",0); | |
814 | gMC->Gsatt("ZNF1","SEEN",0); | |
815 | gMC->Gsatt("ZNF2","SEEN",0); | |
816 | gMC->Gsatt("ZNF3","SEEN",0); | |
817 | gMC->Gsatt("ZNF4","SEEN",0); | |
818 | gMC->Gsatt("ZNG1","SEEN",0); | |
819 | gMC->Gsatt("ZNG2","SEEN",0); | |
820 | gMC->Gsatt("ZNG3","SEEN",0); | |
821 | gMC->Gsatt("ZNG4","SEEN",0); | |
822 | gMC->Gsatt("ZNTX","SEEN",0); | |
a2216698 | 823 | gMC->Gsatt("ZN1 ","COLO",4); |
68ca986e | 824 | gMC->Gsatt("ZN1 ","SEEN",1); |
825 | gMC->Gsatt("ZNSL","SEEN",0); | |
826 | gMC->Gsatt("ZNST","SEEN",0); | |
827 | gMC->Gsatt("ZPRO","SEEN",0); | |
828 | gMC->Gsatt("ZPF1","SEEN",0); | |
829 | gMC->Gsatt("ZPF2","SEEN",0); | |
830 | gMC->Gsatt("ZPF3","SEEN",0); | |
831 | gMC->Gsatt("ZPF4","SEEN",0); | |
832 | gMC->Gsatt("ZPG1","SEEN",0); | |
833 | gMC->Gsatt("ZPG2","SEEN",0); | |
834 | gMC->Gsatt("ZPG3","SEEN",0); | |
835 | gMC->Gsatt("ZPG4","SEEN",0); | |
836 | gMC->Gsatt("ZPTX","SEEN",0); | |
a2216698 | 837 | gMC->Gsatt("ZP1 ","COLO",6); |
68ca986e | 838 | gMC->Gsatt("ZP1 ","SEEN",1); |
839 | gMC->Gsatt("ZPSL","SEEN",0); | |
840 | gMC->Gsatt("ZPST","SEEN",0); | |
a2216698 | 841 | gMC->Gsatt("ZEM ","COLO",7); |
866ab5a2 | 842 | gMC->Gsatt("ZEM ","SEEN",1); |
843 | gMC->Gsatt("ZEMF","SEEN",0); | |
844 | gMC->Gsatt("ZETR","SEEN",0); | |
845 | gMC->Gsatt("ZEL0","SEEN",0); | |
846 | gMC->Gsatt("ZEL1","SEEN",0); | |
847 | gMC->Gsatt("ZEL2","SEEN",0); | |
848 | gMC->Gsatt("ZEV0","SEEN",0); | |
849 | gMC->Gsatt("ZEV1","SEEN",0); | |
850 | gMC->Gsatt("ZES0","SEEN",0); | |
851 | gMC->Gsatt("ZES1","SEEN",0); | |
68ca986e | 852 | |
853 | // | |
854 | gMC->Gdopt("hide", "on"); | |
855 | gMC->Gdopt("shad", "on"); | |
856 | gMC->Gsatt("*", "fill", 7); | |
857 | gMC->SetClipBox("."); | |
858 | gMC->SetClipBox("*", 0, 100, -100, 100, 12000, 16000); | |
859 | gMC->DefaultRange(); | |
860 | gMC->Gdraw("alic", 40, 30, 0, 488, 220, .07, .07); | |
861 | gMC->Gdhead(1111, "Zero Degree Calorimeter Version 1"); | |
862 | gMC->Gdman(18, 4, "MAN"); | |
863 | } | |
864 | ||
865 | //_____________________________________________________________________________ | |
866 | void AliZDCv1::CreateMaterials() | |
867 | { | |
868 | // | |
869 | // Create Materials for the Zero Degree Calorimeter | |
870 | // | |
68ca986e | 871 | |
872 | Int_t *idtmed = fIdtmed->GetArray(); | |
873 | ||
a2216698 | 874 | Float_t dens, ubuf[1], wmat[2], a[2], z[2], deemax = -1; |
875 | Int_t i; | |
68ca986e | 876 | |
877 | // --- Store in UBUF r0 for nuclear radius calculation R=r0*A**1/3 | |
878 | ||
879 | // --- Tantalum -> ZN passive material | |
880 | ubuf[0] = 1.1; | |
881 | AliMaterial(1, "TANT", 180.95, 73., 16.65, .4, 11.9, ubuf, 1); | |
882 | ||
883 | // --- Tungsten | |
884 | // ubuf[0] = 1.11; | |
885 | // AliMaterial(1, "TUNG", 183.85, 74., 19.3, .35, 10.3, ubuf, 1); | |
886 | ||
887 | // --- Brass (CuZn) -> ZP passive material | |
888 | dens = 8.48; | |
889 | a[0] = 63.546; | |
890 | a[1] = 65.39; | |
891 | z[0] = 29.; | |
892 | z[1] = 30.; | |
893 | wmat[0] = .63; | |
894 | wmat[1] = .37; | |
895 | AliMixture(2, "BRASS ", a, z, dens, 2, wmat); | |
896 | ||
897 | // --- SiO2 | |
898 | dens = 2.64; | |
899 | a[0] = 28.086; | |
900 | a[1] = 15.9994; | |
901 | z[0] = 14.; | |
902 | z[1] = 8.; | |
903 | wmat[0] = 1.; | |
904 | wmat[1] = 2.; | |
a2216698 | 905 | AliMixture(3, "SIO2 ", a, z, dens, -2, wmat); |
866ab5a2 | 906 | |
907 | // --- Lead | |
908 | ubuf[0] = 1.12; | |
909 | AliMaterial(5, "LEAD", 207.19, 82., 11.35, .56, 18.5, ubuf, 1); | |
68ca986e | 910 | |
911 | // --- Copper | |
a2216698 | 912 | ubuf[0] = 1.10; |
913 | AliMaterial(6, "COPP", 63.54, 29., 8.96, 1.4, 0., ubuf, 1); | |
68ca986e | 914 | |
866ab5a2 | 915 | // --- Iron (energy loss taken into account) |
916 | ubuf[0] = 1.1; | |
a2216698 | 917 | AliMaterial(7, "IRON", 55.85, 26., 7.87, 1.76, 0., ubuf, 1); |
68ca986e | 918 | |
866ab5a2 | 919 | // --- Iron (no energy loss) |
68ca986e | 920 | ubuf[0] = 1.1; |
a2216698 | 921 | AliMaterial(8, "IRON", 55.85, 26., 7.87, 1.76, 0., ubuf, 1); |
68ca986e | 922 | |
923 | // --- Vacuum (no magnetic field) | |
924 | AliMaterial(10, "VOID", 1e-16, 1e-16, 1e-16, 1e16, 1e16, ubuf,0); | |
925 | ||
926 | // --- Vacuum (with magnetic field) | |
927 | AliMaterial(11, "VOIM", 1e-16, 1e-16, 1e-16, 1e16, 1e16, ubuf,0); | |
928 | ||
929 | // --- Air (no magnetic field) | |
930 | AliMaterial(12, "Air $", 14.61, 7.3, .001205, 30420., 67500., ubuf, 0); | |
931 | ||
932 | // --- Definition of tracking media: | |
933 | ||
934 | // --- Tantalum = 1 ; | |
935 | // --- Brass = 2 ; | |
936 | // --- Fibers (SiO2) = 3 ; | |
937 | // --- Fibers (SiO2) = 4 ; | |
866ab5a2 | 938 | // --- Lead = 5 ; |
a2216698 | 939 | // --- Copper = 6 ; |
940 | // --- Iron (with energy loss) = 7 ; | |
941 | // --- Iron (without energy loss) = 8 ; | |
68ca986e | 942 | // --- Vacuum (no field) = 10 |
943 | // --- Vacuum (with field) = 11 | |
944 | // --- Air (no field) = 12 | |
945 | ||
946 | ||
947 | // --- Tracking media parameters | |
a2216698 | 948 | Float_t epsil = .01, stmin=0.01, stemax = 1.; |
7cc664ae | 949 | // Int_t isxfld = gAlice->Field()->Integ(); |
d213f1fa | 950 | // Float_t fieldm = gAlice->Field()->Max(); |
de28527d | 951 | Float_t fieldm = 0., tmaxfd = 0.; |
a2216698 | 952 | Int_t ifield = 0, isvolActive = 1, isvol = 0, inofld = 0; |
68ca986e | 953 | |
954 | AliMedium(1, "ZTANT", 1, isvolActive, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin); | |
955 | // AliMedium(1, "ZW", 1, isvolActive, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin); | |
a2216698 | 956 | AliMedium(2, "ZBRASS",2, isvolActive, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin); |
68ca986e | 957 | AliMedium(3, "ZSIO2", 3, isvolActive, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin); |
958 | AliMedium(4, "ZQUAR", 3, isvolActive, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin); | |
a2216698 | 959 | AliMedium(5, "ZLEAD", 5, isvolActive, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin); |
de28527d | 960 | // AliMedium(6, "ZCOPP", 6, isvolActive, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin); |
961 | // AliMedium(7, "ZIRON", 7, isvolActive, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin); | |
962 | AliMedium(6, "ZCOPP", 6, isvol, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin); | |
963 | AliMedium(7, "ZIRON", 7, isvol, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin); | |
a2216698 | 964 | AliMedium(8, "ZIRONN",8, isvol, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin); |
965 | AliMedium(10,"ZVOID",10, isvol, inofld, fieldm, tmaxfd, stemax, deemax, epsil, stmin); | |
966 | AliMedium(12,"ZAIR", 12, 0, inofld, fieldm, tmaxfd, stemax,deemax, epsil, stmin); | |
967 | ||
968 | ifield =2; | |
68ca986e | 969 | fieldm = 45.; |
7cc664ae | 970 | AliMedium(11, "ZVOIM", 11, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); |
68ca986e | 971 | |
972 | // Thresholds for showering in the ZDCs | |
a2216698 | 973 | i = 1; //tantalum |
68ca986e | 974 | gMC->Gstpar(idtmed[i], "CUTGAM", .001); |
975 | gMC->Gstpar(idtmed[i], "CUTELE", .001); | |
976 | gMC->Gstpar(idtmed[i], "CUTNEU", .01); | |
977 | gMC->Gstpar(idtmed[i], "CUTHAD", .01); | |
a2216698 | 978 | i = 2; //brass |
68ca986e | 979 | gMC->Gstpar(idtmed[i], "CUTGAM", .001); |
980 | gMC->Gstpar(idtmed[i], "CUTELE", .001); | |
981 | gMC->Gstpar(idtmed[i], "CUTNEU", .01); | |
982 | gMC->Gstpar(idtmed[i], "CUTHAD", .01); | |
a2216698 | 983 | i = 5; //lead |
866ab5a2 | 984 | gMC->Gstpar(idtmed[i], "CUTGAM", .001); |
985 | gMC->Gstpar(idtmed[i], "CUTELE", .001); | |
986 | gMC->Gstpar(idtmed[i], "CUTNEU", .01); | |
987 | gMC->Gstpar(idtmed[i], "CUTHAD", .01); | |
68ca986e | 988 | |
d213f1fa | 989 | // Avoid too detailed showering in TDI |
990 | i = 6; //copper | |
991 | gMC->Gstpar(idtmed[i], "CUTGAM", .1); | |
992 | gMC->Gstpar(idtmed[i], "CUTELE", .1); | |
993 | gMC->Gstpar(idtmed[i], "CUTNEU", 1.); | |
994 | gMC->Gstpar(idtmed[i], "CUTHAD", 1.); | |
995 | ||
68ca986e | 996 | // Avoid too detailed showering along the beam line |
a2216698 | 997 | i = 7; //iron with energy loss (ZIRON) |
68ca986e | 998 | gMC->Gstpar(idtmed[i], "CUTGAM", .1); |
999 | gMC->Gstpar(idtmed[i], "CUTELE", .1); | |
1000 | gMC->Gstpar(idtmed[i], "CUTNEU", 1.); | |
1001 | gMC->Gstpar(idtmed[i], "CUTHAD", 1.); | |
1002 | ||
d213f1fa | 1003 | // Avoid too detailed showering along the beam line |
1004 | i = 8; //iron with energy loss (ZIRONN) | |
1005 | gMC->Gstpar(idtmed[i], "CUTGAM", .1); | |
1006 | gMC->Gstpar(idtmed[i], "CUTELE", .1); | |
1007 | gMC->Gstpar(idtmed[i], "CUTNEU", 1.); | |
1008 | gMC->Gstpar(idtmed[i], "CUTHAD", 1.); | |
1009 | ||
68ca986e | 1010 | // Avoid interaction in fibers (only energy loss allowed) |
a2216698 | 1011 | i = 3; //fibers (ZSI02) |
68ca986e | 1012 | gMC->Gstpar(idtmed[i], "DCAY", 0.); |
1013 | gMC->Gstpar(idtmed[i], "MULS", 0.); | |
1014 | gMC->Gstpar(idtmed[i], "PFIS", 0.); | |
1015 | gMC->Gstpar(idtmed[i], "MUNU", 0.); | |
1016 | gMC->Gstpar(idtmed[i], "LOSS", 1.); | |
1017 | gMC->Gstpar(idtmed[i], "PHOT", 0.); | |
1018 | gMC->Gstpar(idtmed[i], "COMP", 0.); | |
1019 | gMC->Gstpar(idtmed[i], "PAIR", 0.); | |
1020 | gMC->Gstpar(idtmed[i], "BREM", 0.); | |
1021 | gMC->Gstpar(idtmed[i], "DRAY", 0.); | |
1022 | gMC->Gstpar(idtmed[i], "ANNI", 0.); | |
1023 | gMC->Gstpar(idtmed[i], "HADR", 0.); | |
a2216698 | 1024 | i = 4; //fibers (ZQUAR) |
68ca986e | 1025 | gMC->Gstpar(idtmed[i], "DCAY", 0.); |
1026 | gMC->Gstpar(idtmed[i], "MULS", 0.); | |
1027 | gMC->Gstpar(idtmed[i], "PFIS", 0.); | |
1028 | gMC->Gstpar(idtmed[i], "MUNU", 0.); | |
1029 | gMC->Gstpar(idtmed[i], "LOSS", 1.); | |
1030 | gMC->Gstpar(idtmed[i], "PHOT", 0.); | |
1031 | gMC->Gstpar(idtmed[i], "COMP", 0.); | |
1032 | gMC->Gstpar(idtmed[i], "PAIR", 0.); | |
1033 | gMC->Gstpar(idtmed[i], "BREM", 0.); | |
1034 | gMC->Gstpar(idtmed[i], "DRAY", 0.); | |
1035 | gMC->Gstpar(idtmed[i], "ANNI", 0.); | |
1036 | gMC->Gstpar(idtmed[i], "HADR", 0.); | |
866ab5a2 | 1037 | |
1038 | // Avoid interaction in void | |
d213f1fa | 1039 | i = 11; //void with field |
1040 | gMC->Gstpar(idtmed[i], "DCAY", 0.); | |
1041 | gMC->Gstpar(idtmed[i], "MULS", 0.); | |
1042 | gMC->Gstpar(idtmed[i], "PFIS", 0.); | |
1043 | gMC->Gstpar(idtmed[i], "MUNU", 0.); | |
1044 | gMC->Gstpar(idtmed[i], "LOSS", 0.); | |
1045 | gMC->Gstpar(idtmed[i], "PHOT", 0.); | |
1046 | gMC->Gstpar(idtmed[i], "COMP", 0.); | |
1047 | gMC->Gstpar(idtmed[i], "PAIR", 0.); | |
1048 | gMC->Gstpar(idtmed[i], "BREM", 0.); | |
1049 | gMC->Gstpar(idtmed[i], "DRAY", 0.); | |
1050 | gMC->Gstpar(idtmed[i], "ANNI", 0.); | |
1051 | gMC->Gstpar(idtmed[i], "HADR", 0.); | |
866ab5a2 | 1052 | |
68ca986e | 1053 | // |
866ab5a2 | 1054 | fMedSensZN = idtmed[1]; // Sensitive volume: ZN passive material |
1055 | fMedSensZP = idtmed[2]; // Sensitive volume: ZP passive material | |
a2216698 | 1056 | fMedSensF1 = idtmed[3]; // Sensitive volume: fibres type 1 |
1057 | fMedSensF2 = idtmed[4]; // Sensitive volume: fibres type 2 | |
1058 | fMedSensZEM = idtmed[5]; // Sensitive volume: ZEM passive material | |
de28527d | 1059 | // fMedSensTDI = idtmed[6]; // Sensitive volume: TDI Cu shield |
1060 | // fMedSensPI = idtmed[7]; // Sensitive volume: beam pipes | |
866ab5a2 | 1061 | fMedSensGR = idtmed[12]; // Sensitive volume: air into the grooves |
68ca986e | 1062 | } |
1063 | ||
1064 | //_____________________________________________________________________________ | |
1065 | void AliZDCv1::Init() | |
1066 | { | |
1067 | InitTables(); | |
68ca986e | 1068 | } |
1069 | ||
1070 | //_____________________________________________________________________________ | |
1071 | void AliZDCv1::InitTables() | |
1072 | { | |
c0ceba4c | 1073 | Int_t k, j; |
5a881c97 | 1074 | |
866ab5a2 | 1075 | char *lightfName1,*lightfName2,*lightfName3,*lightfName4, |
1076 | *lightfName5,*lightfName6,*lightfName7,*lightfName8; | |
68ca986e | 1077 | FILE *fp1, *fp2, *fp3, *fp4, *fp5, *fp6, *fp7, *fp8; |
1078 | ||
a2216698 | 1079 | // --- Reading light tables for ZN |
866ab5a2 | 1080 | lightfName1 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620362207s"); |
1081 | if((fp1 = fopen(lightfName1,"r")) == NULL){ | |
68ca986e | 1082 | printf("Cannot open file fp1 \n"); |
1083 | return; | |
1084 | } | |
866ab5a2 | 1085 | lightfName2 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620362208s"); |
1086 | if((fp2 = fopen(lightfName2,"r")) == NULL){ | |
68ca986e | 1087 | printf("Cannot open file fp2 \n"); |
1088 | return; | |
1089 | } | |
866ab5a2 | 1090 | lightfName3 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620362209s"); |
1091 | if((fp3 = fopen(lightfName3,"r")) == NULL){ | |
68ca986e | 1092 | printf("Cannot open file fp3 \n"); |
1093 | return; | |
1094 | } | |
866ab5a2 | 1095 | lightfName4 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620362210s"); |
1096 | if((fp4 = fopen(lightfName4,"r")) == NULL){ | |
68ca986e | 1097 | printf("Cannot open file fp4 \n"); |
1098 | return; | |
1099 | } | |
a2216698 | 1100 | |
c0ceba4c | 1101 | for(k=0; k<fNalfan; k++){ |
1102 | for(j=0; j<fNben; j++){ | |
68ca986e | 1103 | fscanf(fp1,"%f",&fTablen[0][k][j]); |
1104 | fscanf(fp2,"%f",&fTablen[1][k][j]); | |
1105 | fscanf(fp3,"%f",&fTablen[2][k][j]); | |
1106 | fscanf(fp4,"%f",&fTablen[3][k][j]); | |
1107 | } | |
1108 | } | |
1109 | fclose(fp1); | |
1110 | fclose(fp2); | |
1111 | fclose(fp3); | |
1112 | fclose(fp4); | |
1113 | ||
a2216698 | 1114 | // --- Reading light tables for ZP and ZEM |
866ab5a2 | 1115 | lightfName5 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620552207s"); |
1116 | if((fp5 = fopen(lightfName5,"r")) == NULL){ | |
68ca986e | 1117 | printf("Cannot open file fp5 \n"); |
1118 | return; | |
1119 | } | |
866ab5a2 | 1120 | lightfName6 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620552208s"); |
1121 | if((fp6 = fopen(lightfName6,"r")) == NULL){ | |
68ca986e | 1122 | printf("Cannot open file fp6 \n"); |
1123 | return; | |
1124 | } | |
866ab5a2 | 1125 | lightfName7 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620552209s"); |
1126 | if((fp7 = fopen(lightfName7,"r")) == NULL){ | |
68ca986e | 1127 | printf("Cannot open file fp7 \n"); |
1128 | return; | |
1129 | } | |
866ab5a2 | 1130 | lightfName8 = gSystem->ExpandPathName("$ALICE/$ALICE_LEVEL/ZDC/light22620552210s"); |
1131 | if((fp8 = fopen(lightfName8,"r")) == NULL){ | |
68ca986e | 1132 | printf("Cannot open file fp8 \n"); |
1133 | return; | |
1134 | } | |
a2216698 | 1135 | |
c0ceba4c | 1136 | for(k=0; k<fNalfap; k++){ |
1137 | for(j=0; j<fNbep; j++){ | |
68ca986e | 1138 | fscanf(fp5,"%f",&fTablep[0][k][j]); |
1139 | fscanf(fp6,"%f",&fTablep[1][k][j]); | |
1140 | fscanf(fp7,"%f",&fTablep[2][k][j]); | |
1141 | fscanf(fp8,"%f",&fTablep[3][k][j]); | |
1142 | } | |
1143 | } | |
1144 | fclose(fp5); | |
1145 | fclose(fp6); | |
1146 | fclose(fp7); | |
1147 | fclose(fp8); | |
1148 | } | |
68ca986e | 1149 | //_____________________________________________________________________________ |
1150 | void AliZDCv1::StepManager() | |
1151 | { | |
1152 | // | |
1153 | // Routine called at every step in the Zero Degree Calorimeters | |
1154 | // | |
1155 | ||
a2216698 | 1156 | Int_t j, vol[2], ibeta=0, ialfa, ibe, nphe; |
366ff5c2 | 1157 | Float_t x[3], xdet[3], destep, hits[10], m, ekin, um[3], ud[3], be, radius, out; |
47388856 | 1158 | Float_t xalic[3], z, GuiEff, GuiPar[4]={0.31,-0.0004,0.0197,0.7958}; |
68ca986e | 1159 | TLorentzVector s, p; |
1160 | const char *knamed; | |
866ab5a2 | 1161 | |
de6bc247 | 1162 | for (j=0;j<10;j++) hits[j]=0; |
866ab5a2 | 1163 | |
68ca986e | 1164 | if((gMC->GetMedium() == fMedSensZN) || (gMC->GetMedium() == fMedSensZP) || |
1165 | (gMC->GetMedium() == fMedSensGR) || (gMC->GetMedium() == fMedSensF1) || | |
d213f1fa | 1166 | (gMC->GetMedium() == fMedSensF2) || (gMC->GetMedium() == fMedSensZEM)){ |
47388856 | 1167 | |
1168 | // --- This part is for no shower developement in beam pipe and TDI | |
d213f1fa | 1169 | // (gMC->GetMedium() == fMedSensPI) || (gMC->GetMedium() == fMedSensTDI)){ |
cc9c0243 | 1170 | |
866ab5a2 | 1171 | // If particle interacts with beam pipe -> return |
d213f1fa | 1172 | // if((gMC->GetMedium() == fMedSensPI) || (gMC->GetMedium() == fMedSensTDI)){ |
a2216698 | 1173 | // If option NoShower is set -> StopTrack |
d213f1fa | 1174 | // if(fNoShower==1) { |
4f9ca16e | 1175 | // if(gMC->GetMedium() == fMedSensPI) { |
1176 | // knamed = gMC->CurrentVolName(); | |
1177 | // if((!strncmp(knamed,"MQ",2)) || (!strncmp(knamed,"YM",2))) fpLostIT += 1; | |
1178 | // if((!strncmp(knamed,"MD1",3))|| (!strncmp(knamed,"YD1",2))) fpLostD1 += 1; | |
1179 | // } | |
1180 | // if(gMC->GetMedium() == fMedSensTDI) fpLostTDI += 1; | |
d213f1fa | 1181 | // gMC->StopTrack(); |
a2216698 | 1182 | // printf("\n # of p lost in Inner Triplet = %d\n",fpLostIT); |
1183 | // printf("\n # of p lost in D1 = %d\n",fpLostD1); | |
1184 | // printf("\n # of p lost in TDI = %d\n",fpLostTDI); | |
d213f1fa | 1185 | // } |
7cc664ae | 1186 | // return; |
d213f1fa | 1187 | // } |
866ab5a2 | 1188 | |
68ca986e | 1189 | //Particle coordinates |
1190 | gMC->TrackPosition(s); | |
c0ceba4c | 1191 | for(j=0; j<=2; j++){ |
68ca986e | 1192 | x[j] = s[j]; |
1193 | } | |
1194 | hits[0] = x[0]; | |
1195 | hits[1] = x[1]; | |
1196 | hits[2] = x[2]; | |
1197 | ||
1198 | // Determine in which ZDC the particle is | |
1199 | knamed = gMC->CurrentVolName(); | |
47388856 | 1200 | if(!strncmp(knamed,"ZN",2)){ |
1201 | vol[0]=1; | |
1202 | } | |
1203 | else if(!strncmp(knamed,"ZP",2)){ | |
1204 | vol[0]=2; | |
1205 | } | |
1206 | else if(!strncmp(knamed,"ZE",2)){ | |
1207 | vol[0]=3; | |
1208 | } | |
68ca986e | 1209 | |
1210 | // Determine in which quadrant the particle is | |
47388856 | 1211 | |
1212 | if(vol[0]==1){ //Quadrant in ZN | |
866ab5a2 | 1213 | xdet[0] = x[0]-fPosZN[0]; |
1214 | xdet[1] = x[1]-fPosZN[1]; | |
5a881c97 | 1215 | if((xdet[0]<=0.) && (xdet[1]>=0.)) vol[1]=1; |
1216 | if((xdet[0]>0.) && (xdet[1]>0.)) vol[1]=2; | |
1217 | if((xdet[0]<0.) && (xdet[1]<0.)) vol[1]=3; | |
1218 | if((xdet[0]>0.) && (xdet[1]<0.)) vol[1]=4; | |
68ca986e | 1219 | } |
47388856 | 1220 | else if(vol[0]==2){ //Quadrant in ZP |
866ab5a2 | 1221 | xdet[0] = x[0]-fPosZP[0]; |
1222 | xdet[1] = x[1]-fPosZP[1]; | |
1223 | if(xdet[0]>fDimZP[0])xdet[0]=fDimZP[0]-0.01; | |
1224 | if(xdet[0]<-fDimZP[0])xdet[0]=-fDimZP[0]+0.01; | |
68ca986e | 1225 | Float_t xqZP = xdet[0]/(fDimZP[0]/2); |
1226 | for(int i=1; i<=4; i++){ | |
866ab5a2 | 1227 | if(xqZP>=(i-3) && xqZP<(i-2)){ |
68ca986e | 1228 | vol[1] = i; |
1229 | break; | |
5a881c97 | 1230 | } |
1231 | } | |
68ca986e | 1232 | } |
47388856 | 1233 | else if(vol[0] == 3){ //ZEM has only 1 quadrant |
866ab5a2 | 1234 | vol[1] = 1; |
1235 | xdet[0] = x[0]-fPosZEM[0]; | |
1236 | xdet[1] = x[1]-fPosZEM[1]; | |
866ab5a2 | 1237 | } |
1238 | ||
68ca986e | 1239 | // Store impact point and kinetic energy of the ENTERING particle |
1240 | ||
68ca986e | 1241 | // if(Curtrack==Prim){ |
1242 | if(gMC->IsTrackEntering()){ | |
1243 | //Particle energy | |
1244 | gMC->TrackMomentum(p); | |
68ca986e | 1245 | hits[3] = p[3]; |
866ab5a2 | 1246 | // Impact point on ZDC |
68ca986e | 1247 | hits[4] = xdet[0]; |
1248 | hits[5] = xdet[1]; | |
866ab5a2 | 1249 | hits[6] = 0; |
68ca986e | 1250 | hits[7] = 0; |
1251 | hits[8] = 0; | |
1252 | hits[9] = 0; | |
1253 | ||
866ab5a2 | 1254 | // Int_t PcID = gMC->TrackPid(); |
1255 | // printf("Pc ID -> %d\n",PcID); | |
642f15cf | 1256 | AddHit(gAlice->GetCurrentTrackNumber(), vol, hits); |
866ab5a2 | 1257 | |
1258 | if(fNoShower==1){ | |
4f9ca16e | 1259 | // fpDetected += 1; |
a2216698 | 1260 | gMC->StopTrack(); |
1261 | // printf("\n # of detected p = %d\n",fpDetected); | |
1262 | return; | |
866ab5a2 | 1263 | } |
68ca986e | 1264 | } |
a2216698 | 1265 | // } // Curtrack IF |
68ca986e | 1266 | |
1267 | // Charged particles -> Energy loss | |
1268 | if((destep=gMC->Edep())){ | |
1269 | if(gMC->IsTrackStop()){ | |
1270 | gMC->TrackMomentum(p); | |
1271 | m = gMC->TrackMass(); | |
1272 | ekin = p[3]-m; | |
68ca986e | 1273 | hits[9] = ekin; |
1274 | hits[7] = 0.; | |
1275 | hits[8] = 0.; | |
642f15cf | 1276 | AddHit(gAlice->GetCurrentTrackNumber(), vol, hits); |
68ca986e | 1277 | } |
1278 | else{ | |
1279 | hits[9] = destep; | |
1280 | hits[7] = 0.; | |
1281 | hits[8] = 0.; | |
642f15cf | 1282 | AddHit(gAlice->GetCurrentTrackNumber(), vol, hits); |
68ca986e | 1283 | } |
a2216698 | 1284 | // printf(" Dep. E = %f \n",hits[9]); |
1285 | } | |
1286 | }// NB -> Questa parentesi (chiude il primo IF) io la sposterei al fondo!??? | |
68ca986e | 1287 | |
1288 | ||
1289 | // *** Light production in fibres | |
1290 | if((gMC->GetMedium() == fMedSensF1) || (gMC->GetMedium() == fMedSensF2)){ | |
68ca986e | 1291 | |
1292 | //Select charged particles | |
1293 | if((destep=gMC->Edep())){ | |
68ca986e | 1294 | |
1295 | // Particle velocity | |
1296 | gMC->TrackMomentum(p); | |
1297 | Float_t ptot=TMath::Sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]); | |
1298 | Float_t beta = ptot/p[3]; | |
47388856 | 1299 | if(beta<0.67){ |
1300 | return; | |
1301 | } | |
1302 | else if((beta>=0.67) && (beta<=0.75)){ | |
1303 | ibeta = 0; | |
1304 | } | |
1305 | if((beta>0.75) && (beta<=0.85)){ | |
1306 | ibeta = 1; | |
1307 | } | |
1308 | if((beta>0.85) && (beta<=0.95)){ | |
1309 | ibeta = 2; | |
1310 | } | |
1311 | if(beta>0.95){ | |
1312 | ibeta = 3; | |
1313 | } | |
68ca986e | 1314 | |
1315 | // Angle between particle trajectory and fibre axis | |
1316 | // 1 -> Momentum directions | |
1317 | um[0] = p[0]/ptot; | |
1318 | um[1] = p[1]/ptot; | |
1319 | um[2] = p[2]/ptot; | |
1320 | gMC->Gmtod(um,ud,2); | |
1321 | // 2 -> Angle < limit angle | |
1322 | Double_t alfar = TMath::ACos(ud[2]); | |
1323 | Double_t alfa = alfar*kRaddeg; | |
866ab5a2 | 1324 | if(alfa>=110.) return; |
68ca986e | 1325 | ialfa = Int_t(1.+alfa/2.); |
1326 | ||
1327 | // Distance between particle trajectory and fibre axis | |
1328 | gMC->TrackPosition(s); | |
c0ceba4c | 1329 | for(j=0; j<=2; j++){ |
68ca986e | 1330 | x[j] = s[j]; |
1331 | } | |
1332 | gMC->Gmtod(x,xdet,1); | |
1333 | if(TMath::Abs(ud[0])>0.00001){ | |
1334 | Float_t dcoeff = ud[1]/ud[0]; | |
1335 | be = TMath::Abs((xdet[1]-dcoeff*xdet[0])/TMath::Sqrt(dcoeff*dcoeff+1.)); | |
1336 | } | |
1337 | else{ | |
1338 | be = TMath::Abs(ud[0]); | |
1339 | } | |
1340 | ||
47388856 | 1341 | if((vol[0]==1)){ |
1342 | radius = fFibZN[1]; | |
1343 | } | |
1344 | else if((vol[0]==2)){ | |
1345 | radius = fFibZP[1]; | |
1346 | } | |
68ca986e | 1347 | ibe = Int_t(be*1000.+1); |
1348 | ||
1349 | //Looking into the light tables | |
1350 | Float_t charge = gMC->TrackCharge(); | |
1351 | ||
47388856 | 1352 | if((vol[0]==1)) { // (1) ZN fibres |
68ca986e | 1353 | if(ibe>fNben) ibe=fNben; |
1354 | out = charge*charge*fTablen[ibeta][ialfa][ibe]; | |
5ce39387 | 1355 | nphe = gRandom->Poisson(out); |
a2216698 | 1356 | // printf("ZN --- ibeta = %d, ialfa = %d, ibe = %d" |
1357 | // " -> out = %f, nphe = %d\n", ibeta, ialfa, ibe, out, nphe); | |
68ca986e | 1358 | if(gMC->GetMedium() == fMedSensF1){ |
5ce39387 | 1359 | hits[7] = nphe; //fLightPMQ |
68ca986e | 1360 | hits[8] = 0; |
1361 | hits[9] = 0; | |
642f15cf | 1362 | AddHit(gAlice->GetCurrentTrackNumber(), vol, hits); |
68ca986e | 1363 | } |
1364 | else{ | |
1365 | hits[7] = 0; | |
5ce39387 | 1366 | hits[8] = nphe; //fLightPMC |
68ca986e | 1367 | hits[9] = 0; |
642f15cf | 1368 | AddHit(gAlice->GetCurrentTrackNumber(), vol, hits); |
68ca986e | 1369 | } |
1370 | } | |
47388856 | 1371 | else if((vol[0]==2)) { // (2) ZP fibres |
68ca986e | 1372 | if(ibe>fNbep) ibe=fNbep; |
1373 | out = charge*charge*fTablep[ibeta][ialfa][ibe]; | |
5ce39387 | 1374 | nphe = gRandom->Poisson(out); |
a2216698 | 1375 | // printf("ZP --- ibeta = %d, ialfa = %d, ibe = %d" |
1376 | // " -> out = %f, nphe = %d\n", ibeta, ialfa, ibe, out, nphe); | |
68ca986e | 1377 | if(gMC->GetMedium() == fMedSensF1){ |
5ce39387 | 1378 | hits[7] = nphe; //fLightPMQ |
68ca986e | 1379 | hits[8] = 0; |
1380 | hits[9] = 0; | |
642f15cf | 1381 | AddHit(gAlice->GetCurrentTrackNumber(), vol, hits); |
68ca986e | 1382 | } |
1383 | else{ | |
1384 | hits[7] = 0; | |
5ce39387 | 1385 | hits[8] = nphe; //fLightPMC |
68ca986e | 1386 | hits[9] = 0; |
642f15cf | 1387 | AddHit(gAlice->GetCurrentTrackNumber(), vol, hits); |
68ca986e | 1388 | } |
1389 | } | |
47388856 | 1390 | else if((vol[0]==3)) { // (3) ZEM fibres |
866ab5a2 | 1391 | if(ibe>fNbep) ibe=fNbep; |
1392 | out = charge*charge*fTablep[ibeta][ialfa][ibe]; | |
47388856 | 1393 | gMC->TrackPosition(s); |
1394 | for(j=0; j<=2; j++){ | |
1395 | xalic[j] = s[j]; | |
1396 | } | |
1397 | // z-coordinate from ZEM front face | |
1398 | // NB-> fPosZEM[2]+fZEMLength = -1000.+2*10.3 = 979.69 cm | |
1399 | z = -xalic[2]+fPosZEM[2]+2*fZEMLength-xalic[1]; | |
1400 | // z = xalic[2]-fPosZEM[2]-fZEMLength-xalic[1]*(TMath::Tan(45.*kDegrad)); | |
1401 | // printf("\n fPosZEM[2]+2*fZEMLength = %f", fPosZEM[2]+2*fZEMLength); | |
1402 | GuiEff = GuiPar[0]*(GuiPar[1]*z*z+GuiPar[2]*z+GuiPar[3]); | |
1403 | // printf("\n xalic[0] = %f xalic[1] = %f xalic[2] = %f z = %f \n", | |
1404 | // xalic[0],xalic[1],xalic[2],z); | |
1405 | out = out*GuiEff; | |
5ce39387 | 1406 | nphe = gRandom->Poisson(out); |
47388856 | 1407 | // printf(" out*GuiEff = %f nphe = %d", out, nphe); |
a2216698 | 1408 | // printf("ZEM --- ibeta = %d, ialfa = %d, ibe = %d" |
1409 | // " -> out = %f, nphe = %d\n", ibeta, ialfa, ibe, out, nphe); | |
0c9b76ab | 1410 | hits[7] = 0; |
1411 | hits[8] = nphe; //fLightPMC | |
5ce39387 | 1412 | hits[9] = 0; |
642f15cf | 1413 | AddHit(gAlice->GetCurrentTrackNumber(), vol, hits); |
a2216698 | 1414 | } |
68ca986e | 1415 | } |
68ca986e | 1416 | } |
1417 | } |