]>
Commit | Line | Data |
---|---|---|
47890cd3 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
88cb7938 | 16 | /* $Id$ */ |
47890cd3 | 17 | |
47890cd3 | 18 | ////////////////////////////////////////////////////////////////////// |
19 | // // | |
20 | // (V-zero) detector version 0 as designed by the Lyon group // | |
21 | // All comments should be sent to Brigitte CHEYNIS : // | |
22 | // b.cheynis@ipnl.in2p3.fr // | |
61874e87 | 23 | // Geometrie du 25/02/2002 // |
47890cd3 | 24 | // // |
25 | ////////////////////////////////////////////////////////////////////// | |
26 | ||
88cb7938 | 27 | #include <stdlib.h> |
28 | #include <string.h> | |
29 | #include <Riostream.h> | |
30 | ||
47890cd3 | 31 | #include <TBRIK.h> |
32 | #include <TBox.h> | |
88cb7938 | 33 | #include <TCONE.h> |
47890cd3 | 34 | #include <TClonesArray.h> |
88cb7938 | 35 | #include <TGeometry.h> |
47890cd3 | 36 | #include <TH1.h> |
88cb7938 | 37 | #include <TLorentzVector.h> |
38 | #include <TMath.h> | |
39 | #include <TNode.h> | |
40 | #include <TObjectTable.h> | |
41 | #include <TPCON.h> | |
42 | #include <TPGON.h> | |
43 | #include <TSPHE.h> | |
44 | #include <TShape.h> | |
45 | #include <TTRAP.h> | |
46 | #include <TTRD2.h> | |
47 | #include <TVirtualMC.h> | |
47890cd3 | 48 | |
88cb7938 | 49 | #include "ABSOConst.h" |
50 | #include "ABSOSHILConst.h" | |
61874e87 | 51 | #include "AliMagF.h" |
88cb7938 | 52 | #include "AliRun.h" |
47890cd3 | 53 | #include "AliVZEROdigit.h" |
88cb7938 | 54 | #include "AliVZEROhit.h" |
55 | #include "AliVZEROv0.h" | |
5d12ce38 | 56 | #include "AliMC.h" |
47890cd3 | 57 | |
58 | ClassImp(AliVZEROv0) | |
59 | ||
60 | //-------------------------------------------------------------------- | |
61 | AliVZEROv0:: AliVZEROv0():AliVZERO() | |
62 | { | |
61874e87 | 63 | |
64 | ||
47890cd3 | 65 | } |
66 | //-------------------------------------------------------------------- | |
67 | AliVZEROv0::AliVZEROv0(const char *name, const char *title): | |
68 | AliVZERO(name,title) | |
69 | { | |
70 | ||
71 | // Standard constructor for V-zeroR Detector (right part) version 0 | |
72 | ||
73 | ||
74 | Int_t i; | |
75 | ||
76 | printf("\n"); | |
61874e87 | 77 | for(i=0;i<30;i++) printf("*"); |
78 | printf(" Create VZERO object "); | |
79 | for(i=0;i<30;i++) printf("*"); | |
47890cd3 | 80 | printf("\n"); |
81 | ||
82 | } | |
61874e87 | 83 | |
47890cd3 | 84 | //------------------------------------------------------------------------- |
85 | void AliVZEROv0::CreateGeometry() | |
86 | { | |
87 | ||
61874e87 | 88 | // Creates the Geant geometry of the V-zero Detector version 0 |
47890cd3 | 89 | |
90 | ||
91 | Int_t i; | |
92 | ||
93 | printf("\n"); | |
61874e87 | 94 | for(i=0;i<30;i++) printf("*"); |
95 | printf(" Create VZERO Geometry "); | |
96 | for(i=0;i<30;i++) printf("*"); | |
47890cd3 | 97 | printf("\n"); |
98 | ||
99 | ||
100 | Int_t *idtmed = fIdtmed->GetArray()-2999; | |
101 | ||
61874e87 | 102 | Int_t n_detec_R = 1; |
103 | Int_t n_detec_L = 1; | |
104 | ||
105 | Int_t n_cells_R = 1; | |
106 | Int_t n_cells_L = 1; | |
107 | ||
47890cd3 | 108 | Int_t idrotm[999]; |
109 | ||
110 | Float_t height1, height2, height3, height4, height5; | |
111 | Float_t height; | |
112 | Float_t theta; | |
113 | Float_t half_thick_alu; | |
114 | Float_t half_thick_qua1,half_thick_qua2,half_thick_qua3; | |
115 | Float_t half_thick_qua4,half_thick_qua5; | |
116 | Float_t zdet; | |
117 | Float_t r0, r5; | |
118 | Float_t pi = TMath::Pi(); | |
119 | Float_t thick_alu; | |
120 | ||
61874e87 | 121 | height1 = 2.0; // height of cell 1, in cm |
122 | height2 = 3.2; // height of cell 2, in cm | |
123 | height3 = 4.9; // height of cell 3, in cm | |
124 | height4 = 7.5; // height of cell 4, in cm | |
125 | height5 = 12.0; // height of cell 5, in cm | |
47890cd3 | 126 | |
61874e87 | 127 | theta = pi/6.0/2.0; // half angular opening = 15 degrees |
47890cd3 | 128 | half_thick_alu = 0.0025; // half thickness of aluminum foil, in cm |
129 | thick_alu = 2.0 * half_thick_alu; | |
61874e87 | 130 | fThickness1 = 2.5; |
47890cd3 | 131 | half_thick_qua1 = fThickness1/2.0; // half thickness of WRAPPED quartz cell (inner ring) |
132 | half_thick_qua2 = half_thick_qua1 - 0.25; | |
133 | half_thick_qua3 = half_thick_qua2 - 0.25; | |
134 | half_thick_qua4 = half_thick_qua3 - 0.25; | |
135 | half_thick_qua5 = half_thick_qua4 - 0.25; | |
136 | ||
137 | zdet = 86.9 +fThickness/2.0; // distance to vertex (along Z axis) | |
61874e87 | 138 | r0 = 4.0; // closest distance to center of the beam pipe |
47890cd3 | 139 | height = height1 + height2 + height3 + height4 + height5; |
140 | r5 = r0 + height; | |
141 | ||
61874e87 | 142 | //............................................................................ |
143 | ||
144 | // Here I add the flange which is sitting on beam line | |
145 | // right in front of V0R detector, and which I found on CERN drawing | |
146 | // entitled : ALICE BEAM VACCUM CHAMBER - RB26 version III : | |
147 | ||
148 | // Float_t pflange[3]; | |
149 | // | |
150 | // pflange[0] = 3.0; | |
151 | // pflange[1] = 5.675; | |
152 | // pflange[2] = 0.9; | |
153 | // | |
154 | // gMC->Gsvolu("QFA0","TUBE", idtmed[3003], pflange, 3); | |
a35deab8 | 155 | // gMC->Gspos("QFA0", 1 ,"ALIC", 0.0, 0.0, 85.0+0.9, 0, "ONLY"); |
61874e87 | 156 | |
157 | //............................................................................ | |
158 | ||
47890cd3 | 159 | |
61874e87 | 160 | // Creation of mother volume V0LE - left part - : |
161 | // Face entree a -350.0 cm ... | |
162 | ||
163 | Float_t partube[3]; | |
164 | ||
165 | partube[0] = 4.3; | |
166 | partube[1] = 45.0; | |
167 | partube[2] = fThickness1/2.0; | |
168 | ||
169 | gMC->Gsvolu("V0LE","TUBE",idtmed[3002],partube,3); | |
170 | ||
171 | ||
172 | // Creation of five rings - left part - : | |
173 | // Face entree a -350.0 cm ... | |
174 | ||
175 | // Mother volume V0L0 in which will be set 5 quartz cells | |
176 | ||
177 | ||
178 | Float_t par[11]; | |
179 | ||
180 | Float_t dist0_left; | |
181 | Float_t r0_left = 4.3; | |
182 | Float_t height1_left = 2.6; | |
183 | Float_t height2_left = 4.1; | |
184 | Float_t height3_left = 6.4; | |
185 | Float_t height4_left = 10.2; | |
186 | Float_t height5_left = 16.9; | |
187 | Float_t height_left = height1_left + height2_left + height3_left | |
188 | + height4_left + height5_left; | |
189 | Float_t r5_left = r0_left + height_left; | |
190 | ||
191 | ||
192 | dist0_left = r0_left + height_left / 2.0; | |
193 | thick_alu = 2.0*half_thick_alu; | |
194 | ||
195 | par[0] = half_thick_qua1; | |
196 | par[1] = 0.0; | |
197 | par[2] = 0.0; | |
198 | par[3] = height_left / 2.0 ; | |
199 | par[4] = TMath::Tan(theta) * r0_left; | |
200 | par[5] = TMath::Tan(theta) * r5_left; | |
201 | par[6] = 0.0; | |
202 | par[7] = height_left / 2.0 ; | |
203 | par[8] = TMath::Tan(theta) * r0_left; | |
204 | par[9] = TMath::Tan(theta) * r5_left; | |
205 | par[10] = 0.0; | |
206 | ||
207 | ||
208 | gMC->Gsvolu("V0L0","TRAP",idtmed[3010],par,11); // air volume | |
209 | ||
210 | Float_t dist1_left; | |
211 | Float_t r1_left; | |
212 | Float_t offset_left; | |
213 | ||
214 | dist1_left = (- height_left + height1_left) /2.0; | |
215 | r1_left = r0_left + height1_left; | |
216 | offset_left = - fThickness1/2.0 + 0.1; | |
217 | ||
218 | par[0] = half_thick_qua1 - thick_alu; | |
219 | par[3] = height1_left / 2.0 - thick_alu; | |
220 | par[4] = TMath::Tan(theta) * r0_left - thick_alu; | |
221 | par[5] = TMath::Tan(theta) * r1_left- thick_alu; | |
222 | par[7] = height1_left / 2.0 - thick_alu; | |
223 | par[8] = TMath::Tan(theta) * r0_left - thick_alu; | |
224 | par[9] = TMath::Tan(theta) * r1_left - thick_alu; | |
225 | ||
226 | ||
227 | gMC->Gsvolu("V0L1","TRAP",idtmed[3002],par,11); // quartz volume | |
228 | gMC->Gspos("V0L1",1,"V0L0", 0.0, dist1_left , 0.0, 0,"ONLY"); | |
229 | ||
230 | Float_t dist2_left; | |
231 | Float_t r2_left; | |
232 | ||
233 | dist2_left = (- height_left + height2_left) /2.0 + height1_left; | |
234 | r2_left = r1_left + height2_left; | |
235 | ||
236 | par[0] = half_thick_qua1 - thick_alu; | |
237 | par[3] = height2_left / 2.0 - thick_alu; | |
238 | par[4] = TMath::Tan(theta) * r1_left - thick_alu; | |
239 | par[5] = TMath::Tan(theta) * r2_left - thick_alu; | |
240 | par[7] = height2_left / 2.0 - thick_alu; | |
241 | par[8] = TMath::Tan(theta) * r1_left - thick_alu; | |
242 | par[9] = TMath::Tan(theta) * r2_left - thick_alu; | |
243 | ||
244 | gMC->Gsvolu("V0L2","TRAP",idtmed[3002],par,11); // quartz volume | |
245 | gMC->Gspos("V0L2",1,"V0L0", 0.0, dist2_left , 0.0, 0,"ONLY"); | |
246 | ||
247 | ||
248 | Float_t dist3_left; | |
249 | Float_t r3_left; | |
250 | ||
251 | dist3_left = (- height_left + height3_left) /2.0 + height1_left + height2_left; | |
252 | r3_left = r2_left + height3_left; | |
253 | ||
254 | par[0] = half_thick_qua1 - thick_alu; | |
255 | par[3] = height3_left / 2.0 - thick_alu; | |
256 | par[4] = TMath::Tan(theta) * r2_left - thick_alu; | |
257 | par[5] = TMath::Tan(theta) * r3_left - thick_alu; | |
258 | par[7] = height3_left / 2.0 - thick_alu; | |
259 | par[8] = TMath::Tan(theta) * r2_left - thick_alu; | |
260 | par[9] = TMath::Tan(theta) * r3_left - thick_alu; | |
261 | ||
262 | gMC->Gsvolu("V0L3","TRAP",idtmed[3002],par,11); // quartz volume | |
263 | gMC->Gspos("V0L3",1,"V0L0", 0.0, dist3_left , 0.0, 0,"ONLY"); | |
264 | ||
265 | Float_t dist4_left; | |
266 | Float_t r4_left; | |
267 | ||
268 | dist4_left = (- height_left + height4_left) /2.0 + height1_left | |
269 | + height2_left + height3_left; | |
270 | r4_left = r3_left + height4_left; | |
271 | ||
272 | par[0] = half_thick_qua1 - thick_alu; | |
273 | par[3] = height4_left / 2.0 - thick_alu; | |
274 | par[4] = TMath::Tan(theta) * r3_left - thick_alu; | |
275 | par[5] = TMath::Tan(theta) * r4_left - thick_alu; | |
276 | par[7] = height4_left / 2.0 - thick_alu; | |
277 | par[8] = TMath::Tan(theta) * r3_left - thick_alu; | |
278 | par[9] = TMath::Tan(theta) * r4_left - thick_alu; | |
279 | ||
280 | gMC->Gsvolu("V0L4","TRAP",idtmed[3002],par,11); // quartz volume | |
281 | gMC->Gspos("V0L4",1,"V0L0", 0.0, dist4_left , 0.0, 0,"ONLY"); | |
282 | ||
283 | ||
284 | Float_t dist5_left; | |
285 | ||
286 | ||
287 | dist5_left = (- height_left + height5_left) /2.0 + height1_left | |
288 | + height2_left + height3_left + height4_left; | |
289 | ||
290 | ||
291 | par[0] = half_thick_qua1 - thick_alu; | |
292 | par[3] = height5_left / 2.0 - thick_alu; | |
293 | par[4] = TMath::Tan(theta) * r4_left - thick_alu; | |
294 | par[5] = TMath::Tan(theta) * r5_left - thick_alu; | |
295 | par[7] = height5_left / 2.0 - thick_alu; | |
296 | par[8] = TMath::Tan(theta) * r4_left - thick_alu; | |
297 | par[9] = TMath::Tan(theta) * r5_left - thick_alu; | |
298 | ||
299 | gMC->Gsvolu("V0L5","TRAP",idtmed[3002],par,11); // quartz volume | |
300 | gMC->Gspos("V0L5",1,"V0L0", 0.0, dist5_left , 0.0, 0,"ONLY"); | |
301 | ||
302 | ||
303 | //............................................................................ | |
304 | ||
305 | // Creation of mother volume V0RI - right part - : | |
47890cd3 | 306 | |
47890cd3 | 307 | |
308 | partube[0] = r0 - 0.2; | |
309 | partube[1] = (r5 + 1.0) / TMath::Cos(theta); | |
310 | partube[2] = fThickness/2.0; | |
311 | ||
312 | ||
313 | gMC->Gsvolu("V0RI","TUBE",idtmed[3010],partube,3); | |
314 | ||
315 | // Creation of carbon lids (1 mm thick) to keep V0RI box shut... | |
316 | ||
317 | Float_t parbox[10]; | |
318 | ||
319 | parbox[0] = 0.; | |
320 | parbox[1] = 360.; | |
61874e87 | 321 | parbox[2] = 12; |
47890cd3 | 322 | parbox[3] = 2; |
323 | parbox[4] = -0.1/2.0; | |
324 | parbox[5] = r0; | |
325 | parbox[6] = r5; | |
326 | parbox[7] = +0.1/2.0; | |
327 | parbox[8] = r0; | |
328 | parbox[9] = r5; | |
329 | ||
330 | ||
331 | gMC->Gsvolu("V0CA","PGON",idtmed[3001],parbox,10); | |
332 | gMC->Gspos("V0CA",1,"V0RI",0.0,0.0, fThickness/2.0-parbox[7],0,"ONLY"); | |
333 | gMC->Gspos("V0CA",2,"V0RI",0.0,0.0,-fThickness/2.0+parbox[7],0,"ONLY"); | |
334 | ||
335 | // Creation of aluminum rings to maintain the V0RI pieces ... | |
336 | ||
337 | parbox[4] = -fThickness/2.0; | |
338 | parbox[5] = r0 -0.2; | |
339 | parbox[6] = r0; | |
340 | parbox[7] = +fThickness/2.0; | |
341 | parbox[8] = r0 -0.2; | |
342 | parbox[9] = r0; | |
343 | ||
344 | gMC->Gsvolu("V0IR","PGON",idtmed[3003],parbox,10); | |
345 | gMC->Gspos("V0IR",1,"V0RI",0.0,0.0,0.0,0,"ONLY"); | |
346 | ||
347 | parbox[4] = -fThickness/2.0; | |
348 | parbox[5] = r5; | |
349 | parbox[6] = r5 + 1.0; | |
350 | parbox[7] = +fThickness/2.0; | |
351 | parbox[8] = r5; | |
352 | parbox[9] = r5 + 1.0; | |
353 | ||
354 | gMC->Gsvolu("V0ER","PGON",idtmed[3003],parbox,10); | |
355 | gMC->Gspos("V0ER",1,"V0RI",0.0,0.0,0.0,0,"ONLY"); | |
356 | ||
357 | // Mother volume V0R0 in which will be set 5 quartz cells | |
358 | // each one WRAPPED in reflecting aluminum : | |
359 | ||
61874e87 | 360 | Float_t dist0; |
47890cd3 | 361 | |
362 | dist0 = r0 + height / 2.0; | |
363 | thick_alu = 2.0*half_thick_alu; | |
364 | ||
365 | par[0] = half_thick_qua1; | |
366 | par[1] = 0.0; | |
367 | par[2] = 0.0; | |
368 | par[3] = height / 2.0 ; | |
369 | par[4] = TMath::Tan(theta) * r0; | |
370 | par[5] = TMath::Tan(theta) * r5; | |
371 | par[6] = 0.0; | |
372 | par[7] = height / 2.0 ; | |
373 | par[8] = TMath::Tan(theta) * r0; | |
374 | par[9] = TMath::Tan(theta) * r5; | |
375 | par[10] = 0.0; | |
376 | ||
377 | ||
378 | gMC->Gsvolu("V0R0","TRAP",idtmed[3010],par,11); // air volume | |
379 | ||
380 | // Elementary cell of ring 1 : | |
381 | ||
382 | Float_t dist1; | |
383 | Float_t r1; | |
384 | Float_t offset; | |
385 | ||
386 | dist1 = (- height + height1) /2.0; | |
387 | r1 = r0 + height1; | |
388 | offset = - fThickness/2.0 + 0.1; | |
389 | ||
390 | par[0] = half_thick_qua1 - thick_alu; | |
391 | par[3] = height1 / 2.0 - thick_alu; | |
392 | par[4] = TMath::Tan(theta) * r0 - thick_alu; | |
393 | par[5] = TMath::Tan(theta) * r1- thick_alu; | |
394 | par[7] = height1 / 2.0 - thick_alu; | |
395 | par[8] = TMath::Tan(theta) * r0 - thick_alu; | |
396 | par[9] = TMath::Tan(theta) * r1 - thick_alu; | |
397 | ||
398 | ||
399 | gMC->Gsvolu("V0R1","TRAP",idtmed[3002],par,11); // quartz volume | |
400 | gMC->Gspos("V0R1",1,"V0R0", 0.0, dist1 , 0.0, 0,"ONLY"); | |
401 | ||
402 | par[0] = half_thick_alu; | |
403 | ||
404 | gMC->Gsvolu("V0A1","TRAP",idtmed[3004],par,11); // aluminum trap-shaped foil | |
405 | gMC->Gspos("V0A1",1,"V0R1",0.0,0.0, - half_thick_qua1 + half_thick_alu,0,"ONLY"); | |
406 | gMC->Gspos("V0A1",2,"V0R1",0.0,0.0, + half_thick_qua1 - half_thick_alu,0,"ONLY"); | |
407 | ||
408 | parbox[0] = half_thick_alu; | |
409 | parbox[1] = height1 / TMath::Cos(theta)/ 2.0; | |
410 | parbox[2] = half_thick_qua1; | |
411 | ||
412 | gMC->Gsvolu("V0A2","BOX",idtmed[3004],parbox,3); // aluminum rectangular foil | |
61874e87 | 413 | Float_t theta_deg = 180./6./2.0; |
47890cd3 | 414 | Float_t h1; |
415 | h1 = TMath::Tan(theta) * (r0 + height1/2.0); | |
416 | AliMatrix(idrotm[911],90.0,+theta_deg,90.0,90.+theta_deg,0.0,0.); | |
417 | gMC->Gspos("V0A2",1,"V0R1",-h1 + half_thick_alu,0.0,0.0,idrotm[911],"ONLY"); | |
418 | AliMatrix(idrotm[912],90.0,-theta_deg,90.0,90.-theta_deg,0.0,0.); | |
419 | gMC->Gspos("V0A2",2,"V0R1",+h1 - half_thick_alu,0.0,0.0,idrotm[912],"ONLY"); | |
420 | ||
421 | parbox[0] = TMath::Tan(theta) * r0; | |
422 | parbox[1] = half_thick_alu; | |
423 | parbox[2] = half_thick_qua1; | |
424 | gMC->Gsvolu("V0A3","BOX",idtmed[3004],parbox,3); | |
425 | gMC->Gspos("V0A3",1,"V0R1",0.0, - (height1/2.0) + half_thick_alu ,0.0,0,"ONLY"); | |
426 | ||
427 | ||
428 | parbox[0] = TMath::Tan(theta) * (r0 + height1); | |
429 | parbox[1] = half_thick_alu; | |
430 | parbox[2] = half_thick_qua1; | |
431 | gMC->Gsvolu("V0A4","BOX",idtmed[3004],parbox,3); | |
432 | gMC->Gspos("V0A4",1,"V0R1",0.0, (height1/2.0) - half_thick_alu,0.0,0,"ONLY"); | |
433 | ||
434 | ||
435 | // Elementary cell of ring 2 : | |
436 | ||
437 | Float_t dist2; | |
438 | Float_t r2; | |
439 | ||
440 | dist2 = (- height + height2) /2.0 + height1; | |
441 | r2 = r1 + height2; | |
442 | ||
443 | par[0] = half_thick_qua2 - thick_alu; | |
444 | par[3] = height2 / 2.0 - thick_alu; | |
445 | par[4] = TMath::Tan(theta) * r1 - thick_alu; | |
446 | par[5] = TMath::Tan(theta) * r2 - thick_alu; | |
447 | par[7] = height2 / 2.0 - thick_alu; | |
448 | par[8] = TMath::Tan(theta) * r1 - thick_alu; | |
449 | par[9] = TMath::Tan(theta) * r2 - thick_alu; | |
450 | ||
451 | gMC->Gsvolu("V0R2","TRAP",idtmed[3002],par,11); // quartz volume | |
452 | gMC->Gspos("V0R2",1,"V0R0", 0.0, dist2 , - half_thick_qua1 + half_thick_qua2, 0,"ONLY"); | |
453 | ||
454 | par[0] = half_thick_alu; | |
455 | ||
456 | gMC->Gsvolu("V0B1","TRAP",idtmed[3004],par,11); // aluminum trap-shaped foil | |
457 | gMC->Gspos("V0B1",1,"V0R2",0.0,0.0, - half_thick_qua2 + half_thick_alu,0,"ONLY"); | |
458 | gMC->Gspos("V0B1",2,"V0R2",0.0,0.0, + half_thick_qua2 - half_thick_alu,0,"ONLY"); | |
459 | ||
460 | parbox[0] = half_thick_alu; | |
461 | parbox[1] = height2 / TMath::Cos(theta)/ 2.0; | |
462 | parbox[2] = half_thick_qua2; | |
463 | ||
464 | gMC->Gsvolu("V0B2","BOX",idtmed[3004],parbox,3); // aluminum rectangular foil | |
465 | Float_t h2; | |
466 | h2 = TMath::Tan(theta) * (r0 + height1 + height2/2.0); | |
467 | gMC->Gspos("V0B2",1,"V0R2",-h2 + half_thick_alu,0.0,0.0,idrotm[911],"ONLY"); | |
468 | gMC->Gspos("V0B2",2,"V0R2",+h2 - half_thick_alu,0.0,0.0,idrotm[912],"ONLY"); | |
469 | ||
470 | parbox[0] = TMath::Tan(theta) * (r0 + height1); | |
471 | parbox[1] = half_thick_alu; | |
472 | parbox[2] = half_thick_qua2; | |
473 | gMC->Gsvolu("V0B3","BOX",idtmed[3004],parbox,3); | |
474 | gMC->Gspos("V0B3",1,"V0R2",0.0, - (height2/2.0) + half_thick_alu ,0.0,0,"ONLY"); | |
475 | ||
476 | ||
477 | parbox[0] = TMath::Tan(theta) * (r0 + height1 + height2); | |
478 | parbox[1] = half_thick_alu; | |
479 | parbox[2] = half_thick_qua2; | |
480 | gMC->Gsvolu("V0B4","BOX",idtmed[3004],parbox,3); | |
481 | gMC->Gspos("V0B4",1,"V0R2",0.0, (height2/2.0) - half_thick_alu,0.0,0,"ONLY"); | |
482 | ||
483 | ||
484 | // Elementary cell ring 3 : | |
485 | ||
486 | Float_t dist3; | |
487 | Float_t r3; | |
488 | ||
489 | dist3 = (- height + height3) /2.0 + height1 + height2; | |
490 | r3 = r2 + height3; | |
491 | ||
492 | par[0] = half_thick_qua3 - thick_alu; | |
493 | par[3] = height3 / 2.0 - thick_alu; | |
494 | par[4] = TMath::Tan(theta) * r2 - thick_alu; | |
495 | par[5] = TMath::Tan(theta) * r3 - thick_alu; | |
496 | par[7] = height3 / 2.0 - thick_alu; | |
497 | par[8] = TMath::Tan(theta) * r2 - thick_alu; | |
498 | par[9] = TMath::Tan(theta) * r3 - thick_alu; | |
499 | ||
500 | gMC->Gsvolu("V0R3","TRAP",idtmed[3002],par,11); // quartz volume | |
501 | gMC->Gspos("V0R3",1,"V0R0", 0.0, dist3 , - half_thick_qua1 + half_thick_qua3, 0,"ONLY"); | |
502 | ||
503 | ||
504 | par[0] = half_thick_alu; | |
505 | ||
506 | gMC->Gsvolu("V0C1","TRAP",idtmed[3004],par,11); // aluminum trap-shaped foil | |
507 | gMC->Gspos("V0C1",1,"V0R3",0.0,0.0, - half_thick_qua3 + half_thick_alu,0,"ONLY"); | |
508 | gMC->Gspos("V0C1",2,"V0R3",0.0,0.0, + half_thick_qua3 - half_thick_alu,0,"ONLY"); | |
509 | ||
510 | parbox[0] = half_thick_alu; | |
511 | parbox[1] = height3 / TMath::Cos(theta)/ 2.0; | |
512 | parbox[2] = half_thick_qua3; | |
513 | ||
514 | gMC->Gsvolu("V0C2","BOX",idtmed[3004],parbox,3); // aluminum rectangular foil | |
515 | Float_t h3; | |
516 | h3 = TMath::Tan(theta) * (r0 + height1 + height2 + height3/2.0); | |
517 | gMC->Gspos("V0C2",1,"V0R3",-h3 + half_thick_alu,0.0,0.0,idrotm[911],"ONLY"); | |
518 | gMC->Gspos("V0C2",2,"V0R3",+h3 - half_thick_alu,0.0,0.0,idrotm[912],"ONLY"); | |
519 | ||
520 | parbox[0] = TMath::Tan(theta) * (r0 + height1 + height2); | |
521 | parbox[1] = half_thick_alu; | |
522 | parbox[2] = half_thick_qua3; | |
523 | gMC->Gsvolu("V0C3","BOX",idtmed[3004],parbox,3); | |
524 | gMC->Gspos("V0C3",1,"V0R3",0.0, - (height3/2.0) + half_thick_alu ,0.0,0,"ONLY"); | |
525 | ||
526 | ||
527 | parbox[0] = TMath::Tan(theta) * (r0 + height1 + height2 + height3); | |
528 | parbox[1] = half_thick_alu; | |
529 | parbox[2] = half_thick_qua3; | |
530 | gMC->Gsvolu("V0C4","BOX",idtmed[3004],parbox,3); | |
531 | gMC->Gspos("V0C4",1,"V0R3",0.0, (height3/2.0) - half_thick_alu,0.0,0,"ONLY"); | |
532 | ||
533 | ||
534 | // Elementary cell ring 4 : | |
535 | ||
536 | Float_t dist4; | |
537 | Float_t r4; | |
538 | ||
539 | dist4 = (- height + height4) /2.0 + height1 + height2 + height3; | |
540 | r4 = r3 + height4; | |
541 | ||
542 | par[0] = half_thick_qua4 - thick_alu; | |
543 | par[3] = height4 / 2.0 - thick_alu; | |
544 | par[4] = TMath::Tan(theta) * r3 - thick_alu; | |
545 | par[5] = TMath::Tan(theta) * r4 - thick_alu; | |
546 | par[7] = height4 / 2.0 - thick_alu; | |
547 | par[8] = TMath::Tan(theta) * r3 - thick_alu; | |
548 | par[9] = TMath::Tan(theta) * r4 - thick_alu; | |
549 | ||
550 | gMC->Gsvolu("V0R4","TRAP",idtmed[3002],par,11); // quartz volume | |
551 | gMC->Gspos("V0R4",1,"V0R0", 0.0, dist4 , - half_thick_qua1 + half_thick_qua4, 0,"ONLY"); | |
552 | ||
553 | ||
554 | par[0] = half_thick_alu; | |
555 | ||
556 | gMC->Gsvolu("V0D1","TRAP",idtmed[3004],par,11); // aluminum trap-shaped foil | |
557 | gMC->Gspos("V0D1",1,"V0R4",0.0,0.0, - half_thick_qua4 + half_thick_alu,0,"ONLY"); | |
558 | gMC->Gspos("V0D1",2,"V0R4",0.0,0.0, + half_thick_qua4 - half_thick_alu,0,"ONLY"); | |
559 | ||
560 | parbox[0] = half_thick_alu; | |
561 | parbox[1] = height4 / TMath::Cos(theta)/ 2.0; | |
562 | parbox[2] = half_thick_qua4; | |
563 | ||
564 | gMC->Gsvolu("V0D2","BOX",idtmed[3004],parbox,3); // aluminum rectangular foil | |
565 | Float_t h4; | |
566 | h4 = TMath::Tan(theta) * (r0 + height1 + height2 + height3 + height4/2.0); | |
567 | gMC->Gspos("V0D2",1,"V0R4",-h4 + half_thick_alu,0.0,0.0,idrotm[911],"ONLY"); | |
568 | gMC->Gspos("V0D2",2,"V0R4",+h4 - half_thick_alu,0.0,0.0,idrotm[912],"ONLY"); | |
569 | ||
570 | parbox[0] = TMath::Tan(theta) * (r0 + height1 + height2 + height3); | |
571 | parbox[1] = half_thick_alu; | |
572 | parbox[2] = half_thick_qua4; | |
573 | gMC->Gsvolu("V0D3","BOX",idtmed[3004],parbox,3); | |
574 | gMC->Gspos("V0D3",1,"V0R4",0.0, - (height4/2.0) + half_thick_alu ,0.0,0,"ONLY"); | |
575 | ||
576 | ||
577 | parbox[0] = TMath::Tan(theta) * (r0 + height1 + height2 + height3 + height4); | |
578 | parbox[1] = half_thick_alu; | |
579 | parbox[2] = half_thick_qua4; | |
580 | gMC->Gsvolu("V0D4","BOX",idtmed[3004],parbox,3); | |
581 | gMC->Gspos("V0D4",1,"V0R4",0.0, (height4/2.0) - half_thick_alu,0.0,0,"ONLY"); | |
582 | ||
583 | ||
584 | // Elementary cell ring 5 : | |
585 | ||
586 | Float_t dist5; | |
587 | ||
588 | dist5 = (- height + height5) /2.0 + height1 + height2 + height3 + height4; | |
589 | ||
590 | par[0] = half_thick_qua5 - thick_alu; | |
591 | par[3] = height5 / 2.0 - thick_alu; | |
592 | par[4] = TMath::Tan(theta) * r4 - thick_alu; | |
593 | par[5] = TMath::Tan(theta) * r5 - thick_alu; | |
594 | par[7] = height5 / 2.0 - thick_alu; | |
595 | par[8] = TMath::Tan(theta) * r4 - thick_alu; | |
596 | par[9] = TMath::Tan(theta) * r5 - thick_alu; | |
597 | ||
598 | gMC->Gsvolu("V0R5","TRAP",idtmed[3002],par,11); // quartz volume | |
599 | gMC->Gspos("V0R5",1,"V0R0", 0.0, dist5 , - half_thick_qua1 + half_thick_qua5, 0,"ONLY"); | |
600 | ||
601 | ||
602 | par[0] = half_thick_alu; | |
603 | ||
604 | gMC->Gsvolu("V0E1","TRAP",idtmed[3004],par,11); // aluminum trap-shaped foil | |
605 | gMC->Gspos("V0E1",1,"V0R5",0.0,0.0, - half_thick_qua5 + half_thick_alu,0,"ONLY"); | |
606 | gMC->Gspos("V0E1",2,"V0R5",0.0,0.0, + half_thick_qua5 - half_thick_alu,0,"ONLY"); | |
607 | ||
608 | parbox[0] = half_thick_alu; | |
609 | parbox[1] = height5 / TMath::Cos(theta)/ 2.0; | |
610 | parbox[2] = half_thick_qua5; | |
611 | ||
612 | gMC->Gsvolu("V0E2","BOX",idtmed[3004],parbox,3); // aluminum rectangular foil | |
613 | Float_t h5; | |
614 | h5 = TMath::Tan(theta) * (r0 + height1 + height2 + height3 + height4 + height5/2.0); | |
615 | gMC->Gspos("V0E2",1,"V0R5",-h5 + half_thick_alu,0.0,0.0,idrotm[911],"ONLY"); | |
616 | gMC->Gspos("V0E2",2,"V0R5",+h5 - half_thick_alu,0.0,0.0,idrotm[912],"ONLY"); | |
617 | ||
618 | parbox[0] = TMath::Tan(theta) * (r0 + height1 + height2 + height3 + height4); | |
619 | parbox[1] = half_thick_alu; | |
620 | parbox[2] = half_thick_qua5; | |
621 | gMC->Gsvolu("V0E3","BOX",idtmed[3004],parbox,3); | |
622 | gMC->Gspos("V0E3",1,"V0R5",0.0, - (height5/2.0) + half_thick_alu ,0.0,0,"ONLY"); | |
623 | ||
624 | ||
625 | parbox[0] = TMath::Tan(theta) * r5; | |
626 | parbox[1] = half_thick_alu; | |
627 | parbox[2] = half_thick_qua5; | |
628 | gMC->Gsvolu("V0E4","BOX",idtmed[3004],parbox,3); | |
629 | gMC->Gspos("V0E4",1,"V0R5",0.0, (height5/2.0) - half_thick_alu,0.0,0,"ONLY"); | |
630 | ||
631 | ||
632 | Float_t phi_rad ; | |
61874e87 | 633 | Float_t phi_deg = 180./6.; |
47890cd3 | 634 | |
61874e87 | 635 | // Partie de droite : |
636 | ||
637 | for(Float_t phi = 15.0; phi < 360.0; phi = phi + phi_deg) | |
47890cd3 | 638 | { |
639 | phi_rad = phi*pi/180.; | |
640 | AliMatrix(idrotm[902], 90.0, phi, 90.0, 90.0 +phi, 0.0 , 0.0); | |
61874e87 | 641 | gMC->Gspos("V0R0",n_detec_R,"V0RI",-dist0*TMath::Sin(phi_rad), |
47890cd3 | 642 | dist0*TMath::Cos(phi_rad),offset + half_thick_qua1,idrotm[902],"ONLY"); |
61874e87 | 643 | n_detec_R++; |
47890cd3 | 644 | } |
645 | ||
a35deab8 | 646 | gMC->Gspos("V0RI",1,"ALIC",0.0,0.0,zdet,0,"ONLY"); |
47890cd3 | 647 | |
61874e87 | 648 | n_cells_R = (n_detec_R - 1) * 5; |
47890cd3 | 649 | printf(" \n\n\n"); |
61874e87 | 650 | printf(" Number of cells on Right side = %d\n", n_cells_R); |
651 | ||
652 | // Partie de gauche : | |
653 | ||
654 | for(Float_t phi = 15.0; phi < 360.0; phi = phi + phi_deg) | |
655 | { | |
656 | phi_rad = phi*pi/180.; | |
657 | AliMatrix(idrotm[902], 90.0, phi, 90.0, 90.0 +phi, 0.0 , 0.0); | |
658 | gMC->Gspos("V0L0",n_detec_L,"V0LE",-dist0_left*TMath::Sin(phi_rad), | |
659 | dist0_left*TMath::Cos(phi_rad),offset_left + half_thick_qua1,idrotm[902],"ONLY"); | |
660 | n_detec_L++; | |
661 | } | |
662 | ||
663 | ||
a35deab8 | 664 | gMC->Gspos("V0LE",1,"ALIC",0.0,0.0,-350.0-fThickness1/2.0,0,"ONLY"); |
61874e87 | 665 | |
666 | n_cells_L = (n_detec_L - 1) * 5; | |
667 | printf(" \n\n\n"); | |
668 | printf(" Number of cells on Left side = %d\n\n", n_cells_L); | |
669 | ||
47890cd3 | 670 | |
671 | } | |
672 | ||
673 | ||
61874e87 | 674 | |
47890cd3 | 675 | //_____________________________________________________________________________ |
676 | void AliVZEROv0::BuildGeometry() | |
677 | { | |
678 | ||
679 | // Builds simple ROOT TNode geometry for event display | |
61874e87 | 680 | |
47890cd3 | 681 | |
682 | Int_t i; | |
683 | ||
684 | printf("\n"); | |
61874e87 | 685 | for(i=0;i<30;i++) printf("*"); |
47890cd3 | 686 | printf(" VZERO BuildGeometry "); |
61874e87 | 687 | for(i=0;i<30;i++) printf("*"); |
47890cd3 | 688 | printf("\n"); |
689 | ||
61874e87 | 690 | TNode *Top; |
691 | ||
47890cd3 | 692 | TNode *V0Rnode, *V0Rnode0, *V0Rnode6 , *V0Rnode7, *V0Rnode8, *V0Rnode9; |
693 | TNode *V0Rnode1, *V0Rnode2, *V0Rnode3, *V0Rnode4, *V0Rnode5; | |
61874e87 | 694 | TNode *V0Lnode, *V0Lnode0; |
695 | TNode *V0Lnode1, *V0Lnode2, *V0Lnode3, *V0Lnode4, *V0Lnode5; | |
696 | ||
47890cd3 | 697 | const int kColorVZERO = kGreen; |
61874e87 | 698 | |
47890cd3 | 699 | Top = gAlice->GetGeometry()->GetNode("alice"); |
700 | ||
701 | Float_t height1, height2, height3, height4, height5; | |
702 | Float_t height; | |
703 | Float_t theta; | |
704 | Float_t half_thick_alu; | |
705 | Float_t half_thick_qua1,half_thick_qua2,half_thick_qua3; | |
706 | Float_t half_thick_qua4,half_thick_qua5; | |
707 | Float_t zdet; | |
708 | Float_t r0, r5; | |
709 | Float_t pi = TMath::Pi(); | |
710 | Float_t thick_alu; | |
711 | ||
61874e87 | 712 | // height1 = 1.9; |
713 | // height2 = 3.7; | |
714 | // height3 = 6.2; | |
715 | // height4 = 10.5; | |
716 | // height5 = 10.5; | |
717 | ||
718 | height1 = 2.0; // height of cell 1, in cm | |
719 | height2 = 3.2; // height of cell 2, in cm | |
720 | height3 = 4.9; // height of cell 3, in cm | |
721 | height4 = 7.5; // height of cell 4, in cm | |
722 | height5 = 12.0; // height of cell 5, in cm | |
47890cd3 | 723 | |
61874e87 | 724 | theta = pi/6.0/2.0; |
47890cd3 | 725 | half_thick_alu = 0.0025; |
726 | thick_alu = 2.0 * half_thick_alu; | |
727 | half_thick_qua1 = fThickness1/2.0; | |
728 | half_thick_qua2 = half_thick_qua1 - 0.25; | |
729 | half_thick_qua3 = half_thick_qua2 - 0.25; | |
730 | half_thick_qua4 = half_thick_qua3 - 0.25; | |
731 | half_thick_qua5 = half_thick_qua4 - 0.25; | |
732 | ||
733 | zdet = 86.9 +fThickness/2.0; | |
61874e87 | 734 | r0 = 4.0; |
47890cd3 | 735 | height = height1 + height2 + height3 + height4 + height5; |
736 | r5 = r0 + height; | |
737 | ||
738 | Float_t partube[3]; | |
739 | ||
740 | partube[0] = r0 - 0.2; | |
741 | partube[1] = (r5 + 1.0) / TMath::Cos(theta); | |
742 | partube[2] = fThickness/2.0; | |
743 | ||
744 | TTUBE *V0RI = new TTUBE("V0RI", "V0RI", "void", partube[0], partube[1], partube[2]); | |
745 | ||
746 | Top->cd(); | |
747 | ||
748 | V0Rnode = new TNode("V0RI","V0RI",V0RI,0.0,0.0,+zdet,0); | |
749 | ||
750 | V0Rnode->SetLineColor(kBlue); | |
751 | fNodes->Add(V0Rnode); | |
752 | ||
753 | V0Rnode->SetVisibility(2); | |
61874e87 | 754 | |
47890cd3 | 755 | |
756 | // Rondelles de carbone (epaisseur 1 mm) de maintien des cellules ... | |
757 | ||
758 | ||
759 | Float_t parbox[10]; | |
760 | ||
761 | parbox[0] = 0.; | |
762 | parbox[1] = 360.; | |
c288a388 | 763 | parbox[2] = 12.; |
764 | parbox[3] = 2.; | |
47890cd3 | 765 | parbox[4] = -0.1/2.0; |
766 | parbox[5] = r0; | |
767 | parbox[6] = r5; | |
768 | parbox[7] = +0.1/2.0; | |
769 | parbox[8] = r0; | |
770 | parbox[9] = r5; | |
771 | ||
772 | ||
773 | TPGON *V0CA = new TPGON("V0CA", "V0CA", "void",parbox[0], parbox[1], | |
88cb7938 | 774 | static_cast<Int_t>(parbox[2]), |
775 | static_cast<Int_t>(parbox[3])); | |
47890cd3 | 776 | |
777 | V0CA->DefineSection( 0, parbox[4], parbox[5], parbox[6] ); | |
778 | V0CA->DefineSection( 1, parbox[7], parbox[8], parbox[9] ); | |
779 | ||
780 | V0Rnode->cd(); | |
781 | V0Rnode6 = new TNode("V0CA", "V0CA",V0CA,0.0,0.0, fThickness/2.0-parbox[7],0); | |
782 | V0Rnode6->SetLineColor(kYellow); | |
783 | fNodes->Add(V0Rnode6); | |
784 | V0Rnode->cd(); | |
785 | V0Rnode7 = new TNode("V0CA", "V0CA",V0CA,0.0,0.0,-fThickness/2.0+parbox[7],0); | |
786 | V0Rnode7->SetLineColor(kYellow); | |
787 | fNodes->Add(V0Rnode7); | |
788 | ||
789 | parbox[4] = -fThickness/2.0; | |
790 | parbox[5] = r0 - 0.2; | |
791 | parbox[6] = r0; | |
792 | parbox[7] = +fThickness/2.0; | |
793 | parbox[8] = r0 - 0.2; | |
794 | parbox[9] = r0; | |
795 | ||
796 | TPGON *V0IR = new TPGON("V0IR","V0IR","void", parbox[0], parbox[1], | |
88cb7938 | 797 | static_cast<Int_t>(parbox[2]), |
798 | static_cast<Int_t>(parbox[3])); | |
47890cd3 | 799 | V0IR->DefineSection( 0, parbox[4], parbox[5], parbox[6] ); |
800 | V0IR->DefineSection( 1, parbox[7], parbox[8], parbox[9] ); | |
801 | ||
802 | V0Rnode->cd(); | |
803 | V0Rnode8 = new TNode("V0IR", "V0IR",V0IR,0.0,0.0,0.0,0); | |
804 | V0Rnode8->SetLineColor(kYellow); | |
805 | fNodes->Add(V0Rnode8); | |
806 | ||
807 | parbox[4] = -fThickness/2.0; | |
808 | parbox[5] = r5; | |
809 | parbox[6] = r5 + 1.0; | |
810 | parbox[7] = +fThickness/2.0; | |
811 | parbox[8] = r5; | |
812 | parbox[9] = r5 + 1.0; | |
813 | ||
814 | TPGON *V0ER = new TPGON("V0ER","V0ER","void", parbox[0], parbox[1], | |
88cb7938 | 815 | static_cast<Int_t>(parbox[2]), |
816 | static_cast<Int_t>(parbox[3])); | |
817 | ||
47890cd3 | 818 | V0ER->DefineSection( 0, parbox[4], parbox[5], parbox[6] ); |
819 | V0ER->DefineSection( 1, parbox[7], parbox[8], parbox[9] ); | |
820 | ||
821 | V0Rnode->cd(); | |
822 | V0Rnode9 = new TNode("V0ER", "V0ER",V0ER,0.0,0.0,0.0,0); | |
823 | V0Rnode9->SetLineColor(kYellow); | |
824 | fNodes->Add(V0Rnode9); | |
825 | ||
826 | Float_t dist0; | |
827 | Float_t par[11]; | |
828 | ||
829 | dist0 = r0 + height / 2.0; | |
830 | thick_alu = 2.0*half_thick_alu; | |
831 | ||
832 | par[0] = half_thick_qua1; | |
833 | par[1] = 0.0; | |
834 | par[2] = 0.0; | |
835 | par[3] = height / 2.0 ; | |
836 | par[4] = TMath::Tan(theta) * r0; | |
837 | par[5] = TMath::Tan(theta) * r5; | |
838 | par[6] = 0.0; | |
839 | par[7] = height / 2.0 ; | |
840 | par[8] = TMath::Tan(theta) * r0; | |
841 | par[9] = TMath::Tan(theta) * r5; | |
842 | par[10] = 0.0; | |
843 | ||
844 | TTRAP *V0R0 = new TTRAP("V0R0", "V0R0", "void", par[0], par[1], par[2], par[3], | |
845 | par[4], par[5], par[6], par[7], par[8], par[9], par[10]); | |
846 | ||
847 | Float_t dist1; | |
848 | Float_t r1; | |
849 | Float_t offset; | |
850 | ||
851 | dist1 = (- height + height1) /2.0; | |
852 | r1 = r0 + height1; | |
853 | offset = - fThickness/2.0 + 0.1; | |
854 | ||
855 | par[0] = half_thick_qua1 - thick_alu; | |
856 | par[3] = height1 / 2.0 - thick_alu; | |
857 | par[4] = TMath::Tan(theta) * r0 - thick_alu; | |
858 | par[5] = TMath::Tan(theta) * r1- thick_alu; | |
859 | par[7] = height1 / 2.0 - thick_alu; | |
860 | par[8] = TMath::Tan(theta) * r0 - thick_alu; | |
861 | par[9] = TMath::Tan(theta) * r1 - thick_alu; | |
862 | ||
863 | TTRAP *V0R1 = new TTRAP("V0R1", "V0R1", "void", par[0], par[1], par[2], par[3], | |
864 | par[4], par[5], par[6], par[7], par[8], par[9], par[10]); | |
865 | ||
866 | ||
867 | Float_t dist2; | |
868 | Float_t r2; | |
869 | ||
870 | dist2 = (- height + height2) /2.0 + height1; | |
871 | r2 = r1 + height2; | |
872 | ||
873 | par[0] = half_thick_qua2 - thick_alu; | |
874 | par[3] = height2 / 2.0 - thick_alu; | |
875 | par[4] = TMath::Tan(theta) * r1 - thick_alu; | |
876 | par[5] = TMath::Tan(theta) * r2 - thick_alu; | |
877 | par[7] = height2 / 2.0 - thick_alu; | |
878 | par[8] = TMath::Tan(theta) * r1 - thick_alu; | |
879 | par[9] = TMath::Tan(theta) * r2 - thick_alu; | |
880 | ||
881 | ||
882 | TTRAP *V0R2 = new TTRAP("V0R2", "V0R2", "void", par[0], par[1], par[2], par[3], | |
883 | par[4], par[5], par[6], par[7], par[8], par[9], par[10]); | |
884 | ||
885 | ||
886 | Float_t dist3; | |
887 | Float_t r3; | |
888 | ||
889 | dist3 = (- height + height3) /2.0 + height1 + height2; | |
890 | r3 = r2 + height3; | |
891 | ||
892 | par[0] = half_thick_qua3 - thick_alu; | |
893 | par[3] = height3 / 2.0 - thick_alu; | |
894 | par[4] = TMath::Tan(theta) * r2 - thick_alu; | |
895 | par[5] = TMath::Tan(theta) * r3 - thick_alu; | |
896 | par[7] = height3 / 2.0 - thick_alu; | |
897 | par[8] = TMath::Tan(theta) * r2 - thick_alu; | |
898 | par[9] = TMath::Tan(theta) * r3 - thick_alu; | |
899 | ||
900 | ||
901 | TTRAP *V0R3 = new TTRAP("V0R3", "V0R3", "void", par[0], par[1], par[2], par[3], | |
902 | par[4], par[5], par[6], par[7], par[8], par[9], par[10]); | |
903 | ||
904 | ||
905 | Float_t dist4; | |
906 | Float_t r4; | |
907 | ||
908 | dist4 = (- height + height4) /2.0 + height1 + height2 + height3; | |
909 | r4 = r3 + height4; | |
910 | ||
911 | par[0] = half_thick_qua4 - thick_alu; | |
912 | par[3] = height4 / 2.0 - thick_alu; | |
913 | par[4] = TMath::Tan(theta) * r3 - thick_alu; | |
914 | par[5] = TMath::Tan(theta) * r4 - thick_alu; | |
915 | par[7] = height4 / 2.0 - thick_alu; | |
916 | par[8] = TMath::Tan(theta) * r3 - thick_alu; | |
917 | par[9] = TMath::Tan(theta) * r4 - thick_alu; | |
918 | ||
919 | ||
920 | TTRAP *V0R4 = new TTRAP("V0R4", "V0R4", "void", par[0], par[1], par[2], par[3], | |
921 | par[4], par[5], par[6], par[7], par[8], par[9], par[10]); | |
922 | ||
923 | ||
924 | Float_t dist5; | |
925 | ||
926 | dist5 = (- height + height5) /2.0 + height1 + height2 + height3 + height4; | |
927 | ||
928 | par[0] = half_thick_qua5 - thick_alu; | |
929 | par[3] = height5 / 2.0 - thick_alu; | |
930 | par[4] = TMath::Tan(theta) * r4 - thick_alu; | |
931 | par[5] = TMath::Tan(theta) * r5 - thick_alu; | |
932 | par[7] = height5 / 2.0 - thick_alu; | |
933 | par[8] = TMath::Tan(theta) * r4 - thick_alu; | |
934 | par[9] = TMath::Tan(theta) * r5 - thick_alu; | |
935 | ||
936 | ||
937 | TTRAP *V0R5 = new TTRAP("V0R5", "V0R5", "void", par[0], par[1], par[2], par[3], | |
938 | par[4], par[5], par[6], par[7], par[8], par[9], par[10]); | |
939 | ||
940 | ||
941 | Float_t phi; | |
61874e87 | 942 | Float_t phi_deg= 180./6.; |
47890cd3 | 943 | Float_t phi_rad; |
944 | Float_t xdet,ydet; | |
61874e87 | 945 | Int_t n_detec_R = 1; |
946 | ||
47890cd3 | 947 | char NameNode[12]; |
948 | ||
949 | ||
61874e87 | 950 | for (phi = 15.0; phi < 360.0; phi = phi + phi_deg) |
47890cd3 | 951 | { |
952 | ||
953 | TRotMatrix* mat920 = new TRotMatrix("rot920","rot920", 90.0, +phi, 90., 90.+phi, 0.0, 0.0 ); | |
954 | ||
955 | phi_rad = phi*pi/180.; | |
956 | xdet = dist0*TMath::Sin(phi_rad); | |
957 | ydet = dist0*TMath::Cos(phi_rad); | |
958 | ||
959 | ||
61874e87 | 960 | sprintf(NameNode,"SUBDER%d",n_detec_R); |
47890cd3 | 961 | |
962 | V0Rnode->cd(); | |
963 | V0Rnode0 = new TNode(NameNode,NameNode,V0R0,-xdet,ydet, offset + half_thick_qua1,mat920); | |
964 | V0Rnode0->SetLineColor(kColorVZERO); | |
965 | fNodes->Add(V0Rnode0); | |
61874e87 | 966 | n_detec_R++; |
47890cd3 | 967 | |
61874e87 | 968 | sprintf(NameNode,"SUBDER%d",n_detec_R); |
47890cd3 | 969 | V0Rnode0->cd(); |
970 | V0Rnode1 = new TNode(NameNode,NameNode,V0R1,0.0,dist1, 0.0,0); | |
971 | V0Rnode1->SetLineColor(kColorVZERO); | |
972 | fNodes->Add(V0Rnode1); | |
61874e87 | 973 | n_detec_R++; |
47890cd3 | 974 | |
61874e87 | 975 | sprintf(NameNode,"SUBDER%d",n_detec_R); |
47890cd3 | 976 | V0Rnode0->cd(); |
977 | V0Rnode2 = new TNode(NameNode,NameNode,V0R2,0.0,dist2, - half_thick_qua1 + half_thick_qua2,0); | |
978 | V0Rnode2->SetLineColor(kColorVZERO); | |
979 | fNodes->Add(V0Rnode2); | |
61874e87 | 980 | n_detec_R++; |
47890cd3 | 981 | |
982 | ||
61874e87 | 983 | sprintf(NameNode,"SUBDER%d",n_detec_R); |
47890cd3 | 984 | V0Rnode0->cd(); |
985 | V0Rnode3 = new TNode(NameNode,NameNode,V0R3,0.0,dist3, - half_thick_qua1 + half_thick_qua3,0); | |
986 | V0Rnode3->SetLineColor(kColorVZERO); | |
987 | fNodes->Add(V0Rnode3); | |
61874e87 | 988 | n_detec_R++; |
47890cd3 | 989 | |
61874e87 | 990 | sprintf(NameNode,"SUBDER%d",n_detec_R); |
47890cd3 | 991 | V0Rnode0->cd(); |
992 | V0Rnode4 = new TNode(NameNode,NameNode,V0R4,0.0,dist4, - half_thick_qua1 + half_thick_qua4,0); | |
993 | V0Rnode4->SetLineColor(kColorVZERO); | |
994 | fNodes->Add(V0Rnode4); | |
61874e87 | 995 | n_detec_R++; |
47890cd3 | 996 | |
61874e87 | 997 | sprintf(NameNode,"SUBDER%d",n_detec_R); |
47890cd3 | 998 | V0Rnode0->cd(); |
999 | V0Rnode5 = new TNode(NameNode,NameNode,V0R5,0.0,dist5, - half_thick_qua1 + half_thick_qua5,0); | |
1000 | V0Rnode5->SetLineColor(kColorVZERO); | |
1001 | fNodes->Add(V0Rnode5); | |
61874e87 | 1002 | n_detec_R++; |
47890cd3 | 1003 | |
1004 | V0Rnode0->SetVisibility(2); | |
1005 | ||
1006 | } | |
47890cd3 | 1007 | |
47890cd3 | 1008 | |
61874e87 | 1009 | // Left side of VZERO : |
47890cd3 | 1010 | |
47890cd3 | 1011 | |
61874e87 | 1012 | Float_t dist0_left; |
1013 | Float_t r0_left = 4.3; | |
1014 | Float_t height1_left = 2.6; | |
1015 | Float_t height2_left = 4.1; | |
1016 | Float_t height3_left = 6.4; | |
1017 | Float_t height4_left = 10.2; | |
1018 | Float_t height5_left = 16.9; | |
1019 | Float_t height_left = height1_left + height2_left + height3_left | |
1020 | + height4_left + height5_left; | |
1021 | Float_t r5_left = r0_left + height_left; | |
47890cd3 | 1022 | |
61874e87 | 1023 | partube[0] = r0_left; |
1024 | partube[1] = (r5_left) / TMath::Cos(theta); | |
1025 | partube[2] = fThickness1/2.0; | |
47890cd3 | 1026 | |
61874e87 | 1027 | TTUBE *V0LE = new TTUBE("V0LE", "V0LE", "void", partube[0], partube[1], partube[2]); |
1028 | ||
1029 | Top->cd(); | |
1030 | ||
1031 | V0Lnode = new TNode("V0LE","V0LE",V0LE,0.0,0.0,-350.0-fThickness1/2.0,0); | |
1032 | ||
1033 | V0Lnode->SetLineColor(kBlue); | |
1034 | fNodes->Add(V0Lnode); | |
1035 | ||
1036 | V0Lnode->SetVisibility(2); | |
1037 | ||
1038 | dist0_left = r0_left + height_left / 2.0; | |
1039 | thick_alu = 2.0*half_thick_alu; | |
1040 | ||
1041 | par[0] = half_thick_qua1; | |
1042 | par[1] = 0.0; | |
1043 | par[2] = 0.0; | |
1044 | par[3] = height_left / 2.0 ; | |
1045 | par[4] = TMath::Tan(theta) * r0_left; | |
1046 | par[5] = TMath::Tan(theta) * r5_left; | |
1047 | par[6] = 0.0; | |
1048 | par[7] = height_left / 2.0 ; | |
1049 | par[8] = TMath::Tan(theta) * r0_left; | |
1050 | par[9] = TMath::Tan(theta) * r5_left; | |
1051 | par[10] = 0.0; | |
1052 | ||
1053 | TTRAP *V0L0 = new TTRAP("V0L0", "V0L0", "void", par[0], par[1], par[2], par[3], | |
1054 | par[4], par[5], par[6], par[7], par[8], par[9], par[10]); | |
1055 | ||
1056 | ||
1057 | Float_t dist1_left; | |
1058 | Float_t r1_left; | |
1059 | Float_t offset_left; | |
1060 | ||
1061 | dist1_left = (- height_left + height1_left) /2.0; | |
1062 | r1_left = r0_left + height1_left; | |
1063 | offset_left = - fThickness1/2.0 + 0.1; | |
1064 | ||
1065 | par[0] = half_thick_qua1 - thick_alu; | |
1066 | par[3] = height1_left / 2.0 - thick_alu; | |
1067 | par[4] = TMath::Tan(theta) * r0_left - thick_alu; | |
1068 | par[5] = TMath::Tan(theta) * r1_left- thick_alu; | |
1069 | par[7] = height1_left / 2.0 - thick_alu; | |
1070 | par[8] = TMath::Tan(theta) * r0_left - thick_alu; | |
1071 | par[9] = TMath::Tan(theta) * r1_left - thick_alu; | |
1072 | ||
1073 | TTRAP *V0L1 = new TTRAP("V0L1", "V0L1", "void", par[0], par[1], par[2], par[3], | |
1074 | par[4], par[5], par[6], par[7], par[8], par[9], par[10]); | |
47890cd3 | 1075 | |
61874e87 | 1076 | Float_t dist2_left; |
1077 | Float_t r2_left; | |
47890cd3 | 1078 | |
61874e87 | 1079 | dist2_left = (- height_left + height2_left) /2.0 + height1_left; |
1080 | r2_left = r1_left + height2_left; | |
1081 | ||
1082 | par[0] = half_thick_qua1 - thick_alu; | |
1083 | par[3] = height2_left / 2.0 - thick_alu; | |
1084 | par[4] = TMath::Tan(theta) * r1_left - thick_alu; | |
1085 | par[5] = TMath::Tan(theta) * r2_left - thick_alu; | |
1086 | par[7] = height2_left / 2.0 - thick_alu; | |
1087 | par[8] = TMath::Tan(theta) * r1_left - thick_alu; | |
1088 | par[9] = TMath::Tan(theta) * r2_left - thick_alu; | |
47890cd3 | 1089 | |
61874e87 | 1090 | TTRAP *V0L2 = new TTRAP("V0L2", "V0L2", "void", par[0], par[1], par[2], par[3], |
1091 | par[4], par[5], par[6], par[7], par[8], par[9], par[10]); | |
47890cd3 | 1092 | |
47890cd3 | 1093 | |
61874e87 | 1094 | |
1095 | Float_t dist3_left; | |
1096 | Float_t r3_left; | |
1097 | ||
1098 | dist3_left = (- height_left + height3_left) /2.0 + height1_left + height2_left; | |
1099 | r3_left = r2_left + height3_left; | |
1100 | ||
1101 | par[0] = half_thick_qua1 - thick_alu; | |
1102 | par[3] = height3_left / 2.0 - thick_alu; | |
1103 | par[4] = TMath::Tan(theta) * r2_left - thick_alu; | |
1104 | par[5] = TMath::Tan(theta) * r3_left - thick_alu; | |
1105 | par[7] = height3_left / 2.0 - thick_alu; | |
1106 | par[8] = TMath::Tan(theta) * r2_left - thick_alu; | |
1107 | par[9] = TMath::Tan(theta) * r3_left - thick_alu; | |
1108 | ||
1109 | TTRAP *V0L3 = new TTRAP("V0L3", "V0L3", "void", par[0], par[1], par[2], par[3], | |
1110 | par[4], par[5], par[6], par[7], par[8], par[9], par[10]); | |
1111 | ||
1112 | ||
1113 | Float_t dist4_left; | |
1114 | Float_t r4_left; | |
1115 | ||
1116 | dist4_left = (- height_left + height4_left) /2.0 + height1_left | |
1117 | + height2_left + height3_left; | |
1118 | r4_left = r3_left + height4_left; | |
1119 | ||
1120 | par[0] = half_thick_qua1 - thick_alu; | |
1121 | par[3] = height4_left / 2.0 - thick_alu; | |
1122 | par[4] = TMath::Tan(theta) * r3_left - thick_alu; | |
1123 | par[5] = TMath::Tan(theta) * r4_left - thick_alu; | |
1124 | par[7] = height4_left / 2.0 - thick_alu; | |
1125 | par[8] = TMath::Tan(theta) * r3_left - thick_alu; | |
1126 | par[9] = TMath::Tan(theta) * r4_left - thick_alu; | |
1127 | ||
1128 | TTRAP *V0L4 = new TTRAP("V0L4", "V0L4", "void", par[0], par[1], par[2], par[3], | |
1129 | par[4], par[5], par[6], par[7], par[8], par[9], par[10]); | |
1130 | ||
47890cd3 | 1131 | |
61874e87 | 1132 | Float_t dist5_left; |
47890cd3 | 1133 | |
61874e87 | 1134 | |
1135 | dist5_left = (- height_left + height5_left) /2.0 + height1_left | |
1136 | + height2_left + height3_left + height4_left; | |
47890cd3 | 1137 | |
61874e87 | 1138 | |
1139 | par[0] = half_thick_qua1 - thick_alu; | |
1140 | par[3] = height5_left / 2.0 - thick_alu; | |
1141 | par[4] = TMath::Tan(theta) * r4_left - thick_alu; | |
1142 | par[5] = TMath::Tan(theta) * r5_left - thick_alu; | |
1143 | par[7] = height5_left / 2.0 - thick_alu; | |
1144 | par[8] = TMath::Tan(theta) * r4_left - thick_alu; | |
1145 | par[9] = TMath::Tan(theta) * r5_left - thick_alu; | |
1146 | ||
1147 | TTRAP *V0L5 = new TTRAP("V0L5", "V0L5", "void", par[0], par[1], par[2], par[3], | |
1148 | par[4], par[5], par[6], par[7], par[8], par[9], par[10]); | |
47890cd3 | 1149 | |
47890cd3 | 1150 | |
61874e87 | 1151 | Int_t n_detec_L = 1; |
1152 | ||
1153 | for (phi = 15.0; phi < 360.0; phi = phi + phi_deg) | |
1154 | { | |
47890cd3 | 1155 | |
61874e87 | 1156 | TRotMatrix* mat920 = new TRotMatrix("rot920","rot920", 90.0, +phi, 90., 90.+phi, 0.0, 0.0 ); |
47890cd3 | 1157 | |
61874e87 | 1158 | phi_rad = phi*pi/180.; |
1159 | xdet = dist0_left*TMath::Sin(phi_rad); | |
1160 | ydet = dist0_left*TMath::Cos(phi_rad); | |
1161 | ||
1162 | ||
1163 | sprintf(NameNode,"SUBDEL%d",n_detec_L); | |
1164 | ||
1165 | V0Lnode->cd(); | |
1166 | V0Lnode0 = new TNode(NameNode,NameNode,V0L0,-xdet,ydet, offset_left + half_thick_qua1,mat920); | |
1167 | V0Lnode0->SetLineColor(kColorVZERO); | |
1168 | fNodes->Add(V0Lnode0); | |
1169 | n_detec_L++; | |
1170 | ||
1171 | sprintf(NameNode,"SUBDEL%d",n_detec_L); | |
1172 | V0Lnode0->cd(); | |
1173 | V0Lnode1 = new TNode(NameNode,NameNode,V0L1,0.0,dist1_left, 0.0,0); | |
1174 | V0Lnode1->SetLineColor(kColorVZERO); | |
1175 | fNodes->Add(V0Lnode1); | |
1176 | n_detec_L++; | |
1177 | ||
1178 | sprintf(NameNode,"SUBDEL%d",n_detec_L); | |
1179 | V0Lnode0->cd(); | |
1180 | V0Lnode2 = new TNode(NameNode,NameNode,V0L2,0.0,dist2_left, 0.0,0); | |
1181 | V0Lnode2->SetLineColor(kColorVZERO); | |
1182 | fNodes->Add(V0Lnode2); | |
1183 | n_detec_L++; | |
1184 | ||
1185 | ||
1186 | sprintf(NameNode,"SUBDEL%d",n_detec_L); | |
1187 | V0Lnode0->cd(); | |
1188 | V0Lnode3 = new TNode(NameNode,NameNode,V0L3,0.0,dist3_left, 0.0,0); | |
1189 | V0Lnode3->SetLineColor(kColorVZERO); | |
1190 | fNodes->Add(V0Lnode3); | |
1191 | n_detec_L++; | |
1192 | ||
1193 | sprintf(NameNode,"SUBDEL%d",n_detec_L); | |
1194 | V0Lnode0->cd(); | |
1195 | V0Lnode4 = new TNode(NameNode,NameNode,V0L4,0.0,dist4_left, 0.0,0); | |
1196 | V0Lnode4->SetLineColor(kColorVZERO); | |
1197 | fNodes->Add(V0Lnode4); | |
1198 | n_detec_L++; | |
47890cd3 | 1199 | |
61874e87 | 1200 | sprintf(NameNode,"SUBDEL%d",n_detec_L); |
1201 | V0Lnode0->cd(); | |
1202 | V0Lnode5 = new TNode(NameNode,NameNode,V0L5,0.0,dist5_left, 0.0,0); | |
1203 | V0Lnode5->SetLineColor(kColorVZERO); | |
1204 | fNodes->Add(V0Lnode5); | |
1205 | n_detec_L++; | |
47890cd3 | 1206 | |
61874e87 | 1207 | V0Lnode0->SetVisibility(2); |
47890cd3 | 1208 | |
61874e87 | 1209 | } |
47890cd3 | 1210 | |
61874e87 | 1211 | |
1212 | } | |
47890cd3 | 1213 | |
1214 | ||
1215 | //------------------------------------------------------------------------ | |
1216 | void AliVZEROv0::CreateMaterials() | |
1217 | { | |
61874e87 | 1218 | Int_t i; |
47890cd3 | 1219 | |
61874e87 | 1220 | printf("\n"); |
1221 | for(i=0;i<30;i++) printf("*"); | |
1222 | printf(" VZERO create materials "); | |
1223 | for(i=0;i<30;i++) printf("*"); | |
1224 | printf("\n"); | |
1225 | ||
47890cd3 | 1226 | |
47890cd3 | 1227 | Float_t ppckov[14] = { 5.5e-9, 5.7e-9, 5.9e-9, 6.1e-9, 6.3e-9, 6.5e-9, 6.7e-9, |
1228 | 6.9e-9, 7.1e-9, 7.3e-9, 7.5e-9, 7.7e-9, 7.9e-9, 8.1e-9 }; | |
61874e87 | 1229 | |
1230 | ||
1231 | Float_t ppckov_alu[14] = { 5.5e-9, 5.7e-9, 5.9e-9, 6.1e-9, 6.3e-9, 6.5e-9, 6.7e-9, | |
1232 | 6.9e-9, 7.1e-9, 7.3e-9, 7.5e-9, 7.7e-9, 7.9e-9, 8.1e-9 }; | |
47890cd3 | 1233 | |
1234 | Float_t rindex_quarz[14] = { 1.52398, 1.53090, 1.53835, 1.54641, 1.55513, 1.56458, | |
1235 | 1.57488, 1.58611, 1.59842, 1.61197, 1.62696, 1.64362, | |
61874e87 | 1236 | 1.662295, 1.68337 }; |
47890cd3 | 1237 | |
1238 | Float_t absco_quarz[14] = { 105.8, 45.656, 35.665, 28.598, 25.007, 21.04, 17.525, | |
1239 | 14.177, 9.282, 4.0925, 1.149, 0.3627, 0.1497, 0.05 }; | |
1240 | ||
1241 | Float_t effic_all[14] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. }; | |
1242 | ||
1243 | ||
1244 | Float_t rindex_alu[14] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. }; | |
61874e87 | 1245 | |
1246 | ||
47890cd3 | 1247 | Float_t absco_alu[14] = { 1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4, |
1248 | 1e-4,1e-4,1e-4,1e-4 }; | |
1249 | Float_t effic_alu[14] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. }; | |
61874e87 | 1250 | |
47890cd3 | 1251 | |
1252 | Int_t *idtmed = fIdtmed->GetArray()-2999; | |
1253 | ||
47890cd3 | 1254 | |
1255 | // Parameters related to Quarz (SiO2) : | |
1256 | ||
1257 | Float_t aqua[2], zqua[2], densqua, wmatqua[2]; | |
1258 | Int_t nlmatqua; | |
1259 | ||
1260 | aqua[0] = 28.09; | |
1261 | aqua[1] = 16.; | |
1262 | zqua[0] = 14.; | |
1263 | zqua[1] = 8.; | |
1264 | densqua = 2.64; | |
1265 | nlmatqua = -2; | |
1266 | wmatqua[0] = 1.; | |
1267 | wmatqua[1] = 2.; | |
1268 | ||
1269 | // Parameters related to aluminum sheets : | |
1270 | ||
1271 | Float_t aal = 26.98; | |
1272 | Float_t zal = 13.00; | |
1273 | Float_t densal= 2.7; | |
1274 | Float_t radlal= 8.9; | |
1275 | ||
1276 | // Parameters related to scintillator CH : | |
1277 | ||
1278 | Float_t ascin[2] = {1.01,12.01}; | |
1279 | Float_t zscin[2] = {1,6}; | |
1280 | Float_t wscin[2] = {1,1}; | |
1281 | Float_t denscin = 1.03; | |
1282 | ||
1283 | // Definition of materials : | |
1284 | ||
61874e87 | 1285 | AliMaterial( 1, "AIR A$", 14.61, 7.3, .001205, 30420., 67500, 0, 0); |
1286 | AliMaterial(11, "AIR I$", 14.61, 7.3, .001205, 30420., 67500, 0, 0); | |
1287 | AliMaterial( 2, "CARBON$" , 12.01, 6.0, 2.265, 18.8, 49.9, 0, 0); | |
47890cd3 | 1288 | AliMixture( 3, "QUA", aqua, zqua, densqua, nlmatqua, wmatqua); |
61874e87 | 1289 | AliMaterial( 4, "ALUMINIUM1$", 26.98, 13., 2.7, 8.9, 37.2, 0, 0); |
1290 | AliMaterial( 5, "ALUMINIUM2$", aal, zal, densal, radlal, 0, 0, 0); | |
47890cd3 | 1291 | |
1292 | ||
1293 | AliMixture( 6, "Scintillator$",ascin,zscin,denscin,-2,wscin); | |
1294 | ||
1295 | ||
1296 | Int_t ISXFLD = gAlice->Field()->Integ(); | |
1297 | Float_t SXMGMX = gAlice->Field()->Max(); | |
1298 | ||
1299 | Float_t tmaxfd, stemax, deemax, epsil, stmin; | |
1300 | ||
61874e87 | 1301 | tmaxfd = 10.; |
1302 | stemax = 0.1; | |
1303 | deemax = 0.1; | |
1304 | epsil = 0.001; | |
1305 | stmin = 0.001; | |
1306 | ||
1307 | printf(" \n"); | |
1308 | printf(" StepQua, StepAlu = %f %f \n",fMaxStepQua,fMaxStepAlu); | |
1309 | printf(" DeStepQua, DeStepAlu = %f %f \n",fMaxDestepQua,fMaxDestepAlu); | |
1310 | printf(" \n"); | |
1311 | ||
47890cd3 | 1312 | |
1313 | // Active Air : | |
61874e87 | 1314 | AliMedium(1, "ACTIVE AIR$", 1, 1, ISXFLD, SXMGMX, |
1315 | 10.0, 1.0, 0.1, 0.1, 10.0, 0, 0) ; | |
47890cd3 | 1316 | |
1317 | // Inactive air : | |
1318 | ||
61874e87 | 1319 | AliMedium(11, "INACTIVE AIR$", 11, 0, ISXFLD, SXMGMX, |
1320 | 10.0, 1.0, 0.1, 0.1, 10.0, 0, 0) ; | |
47890cd3 | 1321 | |
61874e87 | 1322 | AliMedium(2, "CARBON$ ", 2, 1, ISXFLD, SXMGMX, |
1323 | tmaxfd, stemax, deemax, epsil, stmin, 0, 0); | |
47890cd3 | 1324 | |
61874e87 | 1325 | AliMedium(3, "QUARZ$", 3, 1, ISXFLD, SXMGMX, |
1326 | tmaxfd, fMaxStepQua, fMaxDestepQua, epsil, stmin, 0, 0); | |
47890cd3 | 1327 | |
61874e87 | 1328 | AliMedium(4,"ALUMINUM1$",4, 1, ISXFLD, SXMGMX, |
1329 | tmaxfd, fMaxStepAlu, fMaxDestepAlu, epsil, stmin, 0, 0); | |
1330 | ||
1331 | ||
1332 | AliMedium(5,"ALUMINUM2$",5, 1, ISXFLD, SXMGMX, | |
1333 | tmaxfd, fMaxStepAlu, fMaxDestepAlu, epsil, stmin, 0, 0); | |
1334 | ||
1335 | AliMedium(6,"SCINTILLATOR$",6, 1, ISXFLD, SXMGMX, 10., .01, 1., .003, .003, 0, 0); | |
47890cd3 | 1336 | |
1337 | gMC->Gstpar(idtmed[3000], "LOSS", 1.); // [3000] = air ACTIF [3010] = air INACTIF | |
1338 | gMC->Gstpar(idtmed[3000], "HADR", 1.); | |
1339 | gMC->Gstpar(idtmed[3000], "DCAY", 1.); | |
1340 | gMC->Gstpar(idtmed[3000], "DRAY", 1.); | |
1341 | ||
1342 | gMC->Gstpar(idtmed[3001], "LOSS", 1.); // [3001] = carbon | |
1343 | gMC->Gstpar(idtmed[3001], "HADR", 1.); | |
1344 | gMC->Gstpar(idtmed[3001], "DCAY", 1.); | |
1345 | gMC->Gstpar(idtmed[3001], "DRAY", 1.); | |
1346 | ||
1347 | gMC->Gstpar(idtmed[3002], "LOSS", 1.); // [3002] = quartz | |
1348 | gMC->Gstpar(idtmed[3002], "HADR", 1.); | |
1349 | gMC->Gstpar(idtmed[3002], "DCAY", 1.); | |
61874e87 | 1350 | gMC->Gstpar(idtmed[3002], "DRAY", 1.); |
1351 | gMC->Gstpar(idtmed[3002], "CUTGAM",0.5E-4) ; | |
1352 | gMC->Gstpar(idtmed[3002], "CUTELE",1.0E-4) ; | |
47890cd3 | 1353 | |
1354 | gMC->Gstpar(idtmed[3003], "LOSS", 1.); // [3003] = normal aluminum | |
1355 | gMC->Gstpar(idtmed[3003], "HADR", 1.); | |
1356 | gMC->Gstpar(idtmed[3003], "DCAY", 1.); | |
1357 | gMC->Gstpar(idtmed[3003], "DRAY", 1.); | |
1358 | ||
1359 | gMC->Gstpar(idtmed[3004], "LOSS", 1.); // [3004] = reflecting aluminum | |
1360 | gMC->Gstpar(idtmed[3004], "HADR", 1.); | |
1361 | gMC->Gstpar(idtmed[3004], "DCAY", 1.); | |
1362 | gMC->Gstpar(idtmed[3004], "DRAY", 1.); | |
61874e87 | 1363 | gMC->Gstpar(idtmed[3004], "CUTGAM",0.5E-4) ; |
1364 | gMC->Gstpar(idtmed[3004], "CUTELE",1.0E-4) ; | |
47890cd3 | 1365 | |
1366 | gMC->Gstpar(idtmed[3005], "LOSS", 1.); // [3005] = scintillator | |
1367 | gMC->Gstpar(idtmed[3005], "HADR", 1.); | |
1368 | gMC->Gstpar(idtmed[3005], "DCAY", 1.); | |
1369 | gMC->Gstpar(idtmed[3005], "DRAY", 1.); | |
1370 | ||
7f40b0b2 | 1371 | gMC->SetCerenkov(idtmed[3002], 14, ppckov, absco_quarz, effic_all,rindex_quarz); |
1372 | gMC->SetCerenkov(idtmed[3004], 14, ppckov_alu, absco_alu, effic_alu, rindex_alu); | |
47890cd3 | 1373 | |
61874e87 | 1374 | |
47890cd3 | 1375 | } |
1376 | //--------------------------------------------------------------------- | |
1377 | void AliVZEROv0::DrawModule() | |
1378 | { | |
1379 | ||
1380 | // Drawing is done in DrawVZERO.C | |
1381 | ||
1382 | Int_t i; | |
1383 | ||
1384 | printf("\n"); | |
61874e87 | 1385 | for(i=0;i<30;i++) printf("*"); |
47890cd3 | 1386 | printf(" VZERO DrawModule "); |
61874e87 | 1387 | for(i=0;i<30;i++) printf("*"); |
47890cd3 | 1388 | printf("\n"); |
1389 | ||
1390 | ||
1391 | } | |
1392 | ||
1393 | //------------------------------------------------------------------- | |
1394 | void AliVZEROv0::Init() | |
1395 | { | |
1396 | // Initialises version 0 of the VZERO Detector | |
1397 | // Just prints an information message | |
1398 | ||
61874e87 | 1399 | printf(" VZERO version %d initialized \n",IsVersion()); |
47890cd3 | 1400 | |
61874e87 | 1401 | // gMC->SetMaxStep(fMaxStepAlu); |
1402 | // gMC->SetMaxStep(fMaxStepQua); | |
1403 | ||
1404 | // AliVZERO::Init(); | |
1405 | ||
47890cd3 | 1406 | } |
1407 | ||
1408 | //------------------------------------------------------------------- | |
1409 | ||
1410 | void AliVZEROv0::StepManager() | |
1411 | { | |
1412 | ||
61874e87 | 1413 | // (Very)Minimal version of StepManager |
1414 | ||
1415 | ||
1416 | Int_t copy; | |
1417 | static Int_t vol[4]; | |
1418 | static Float_t hits[15]; | |
47890cd3 | 1419 | |
1420 | TLorentzVector pos; | |
47890cd3 | 1421 | |
61874e87 | 1422 | TLorentzVector mom; |
47890cd3 | 1423 | Float_t theta; |
1424 | Float_t phi; | |
47890cd3 | 1425 | Float_t kRaddeg = 180/TMath::Pi(); |
61874e87 | 1426 | Float_t RingNumber; |
1427 | ||
1428 | Int_t ipart; | |
47890cd3 | 1429 | |
61874e87 | 1430 | |
1431 | // TGeant3 *geant3 = (TGeant3*) gMC; | |
1432 | // Int_t Nphot = geant3->Gckin2()->ngphot; | |
47890cd3 | 1433 | |
61874e87 | 1434 | |
1435 | // Only charged tracks : | |
47890cd3 | 1436 | |
61874e87 | 1437 | if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return; |
1438 | ||
1439 | ||
47890cd3 | 1440 | vol[0] = gMC->CurrentVolOffID(1, vol[1]); |
1441 | vol[2] = gMC->CurrentVolID(copy); | |
1442 | vol[3] = copy; | |
1443 | ||
61874e87 | 1444 | if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R1") || |
1445 | gMC->CurrentVolID(copy) == gMC->VolId("V0L1") ) | |
1446 | RingNumber = 1.0; | |
1447 | else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R2") || | |
1448 | gMC->CurrentVolID(copy) == gMC->VolId("V0L2") ) | |
1449 | RingNumber = 2.0; | |
1450 | else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R3") || | |
1451 | gMC->CurrentVolID(copy) == gMC->VolId("V0L3") ) | |
1452 | RingNumber = 3.0; | |
1453 | else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R4") || | |
1454 | gMC->CurrentVolID(copy) == gMC->VolId("V0L4") ) | |
1455 | RingNumber = 4.0; | |
1456 | else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R5") || | |
1457 | gMC->CurrentVolID(copy) == gMC->VolId("V0L5") ) | |
1458 | RingNumber = 5.0; | |
1459 | else | |
1460 | RingNumber = 0.0; | |
1461 | ||
1462 | if (gMC->IsTrackEntering() && RingNumber > 0.5) { | |
1463 | ||
1464 | gMC->TrackPosition(pos); | |
1465 | ||
1466 | gMC->TrackMomentum(mom); | |
1467 | Double_t tc = mom[0]*mom[0]+mom[1]*mom[1]; | |
1468 | Double_t Pt = TMath::Sqrt(tc); | |
1469 | Double_t Pmom = TMath::Sqrt(tc+mom[2]*mom[2]); | |
47890cd3 | 1470 | |
61874e87 | 1471 | theta = Float_t(TMath::ATan2(Pt,Double_t(mom[2])))*kRaddeg; |
1472 | phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg; | |
1473 | ||
1474 | ipart = gMC->TrackPid(); | |
1475 | ||
1476 | hits[0] = pos[0]; | |
1477 | hits[1] = pos[1]; | |
1478 | hits[2] = pos[2]; | |
1479 | hits[3] = ipart; | |
1480 | ||
1481 | // Float_t ttime = gMC->TrackTime(); | |
1482 | // hits[4] = ttime*1e9; | |
1483 | ||
1484 | hits[4] = gMC->TrackTime(); | |
1485 | hits[5] = gMC->TrackCharge(); | |
1486 | hits[6] = theta; | |
1487 | hits[7] = phi; | |
1488 | hits[8] = RingNumber; | |
1489 | ||
1490 | hits[9] = Pt; | |
1491 | hits[10] = Pmom; | |
1492 | hits[11] = mom[0]; | |
1493 | hits[12] = mom[1]; | |
1494 | hits[13] = mom[2]; | |
1495 | ||
1496 | ||
5d12ce38 | 1497 | AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); |
61874e87 | 1498 | |
1499 | } | |
1500 | ||
47890cd3 | 1501 | } |
1502 | ||
61874e87 | 1503 | //_____________________________________________________________________________ |
1504 | void AliVZEROv0::AddHit(Int_t track, Int_t *vol, Float_t *hits) | |
47890cd3 | 1505 | { |
61874e87 | 1506 | // |
1507 | // Add a VZERO hit | |
1508 | // | |
47890cd3 | 1509 | |
61874e87 | 1510 | TClonesArray &lhits = *fHits; |
1511 | new(lhits[fNhits++]) AliVZEROhit(fIshunt,track,vol,hits); | |
47890cd3 | 1512 | } |
1513 | ||
1514 | //--------------------------------------------------------------------- | |
61874e87 | 1515 | void AliVZEROv0::AddDigits(Int_t *tracks, Int_t* digits) |
47890cd3 | 1516 | { |
1517 | ||
1518 | TClonesArray &ldigits = *fDigits; | |
47890cd3 | 1519 | new(ldigits[fNdigits++]) AliVZEROdigit(tracks, digits); |
47890cd3 | 1520 | } |
1521 | ||
47890cd3 | 1522 | //--------------------------------------------------------------------- |
1523 | void AliVZEROv0::MakeBranch(Option_t *option) | |
1524 | { | |
1525 | ||
1526 | // Creates new branches in the current Root Tree | |
1527 | ||
1528 | ||
1529 | char branchname[10]; | |
1530 | sprintf(branchname,"%s",GetName()); | |
61874e87 | 1531 | printf(" fBufferSize = %d \n",fBufferSize); |
47890cd3 | 1532 | |
660318ca | 1533 | const char *H = strstr(option,"H"); |
47890cd3 | 1534 | |
88cb7938 | 1535 | if (fHits && TreeH() && H) { |
1536 | TreeH()->Branch(branchname,&fHits, fBufferSize); | |
47890cd3 | 1537 | printf("* AliDetector::MakeBranch * Making Branch %s for hits\n",branchname); |
1538 | } | |
1539 | ||
660318ca | 1540 | const char *D = strstr(option,"D"); |
47890cd3 | 1541 | // |
1542 | if (fDigits && gAlice->TreeD() && D) { | |
1543 | gAlice->TreeD()->Branch(branchname,&fDigits, fBufferSize); | |
1544 | printf("* AliDetector::MakeBranch * Making Branch %s for digits\n",branchname); | |
61874e87 | 1545 | } |
1546 | ||
47890cd3 | 1547 | } |