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