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