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