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