]> git.uio.no Git - u/mrichter/AliRoot.git/blob - VZERO/AliVZEROv2.cxx
Updated for new classes and cleand (a bit).
[u/mrichter/AliRoot.git] / VZERO / AliVZEROv2.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 /* $Id$ */
17
18 //////////////////////////////////////////////////////////////////////
19 //                                                                  //
20 //  (V-zero) detector  version 2  as designed by the Lyon group     //
21 //   All comments should be sent to Brigitte CHEYNIS :              //
22 //                                  b.cheynis@ipnl.in2p3.fr         // 
23 //   Geometry of the  26th of november 2003                         //
24 //  (circular instead of trapezoidal shapes as in previous versions //
25 //   plus changes in cell dimensions and offsets) :                 // 
26 //   Scintillating cells are now 2 cm thick instead of 0.7 cm       //
27 //   V0R sits between Z values  -89.4 and  -85.0 cm                 //
28 //   V0L sits between Z values +350.0 and +352.0 cm                 //
29 //   New coordinate system has been implemented in october 2003     //
30 //                                                                  //
31 //////////////////////////////////////////////////////////////////////
32
33 // --- Standard libraries ---
34 #include <Riostream.h>
35 #include <stdlib.h>
36 #include <string.h>
37
38 // --- ROOT libraries ---
39 #include <TClonesArray.h>
40 #include <TGeant3.h>
41 #include <TGeometry.h>
42 #include <TLorentzVector.h>
43 #include <TMath.h>
44 #include <TNode.h>
45 #include <TObjectTable.h>
46 #include <TTUBE.h>
47 #include <TTUBS.h>
48 #include <TVirtualMC.h>
49 #include <TParticle.h>
50
51 // --- AliRoot header files ---
52 #include "AliRun.h"
53 #include "AliMC.h"
54 #include "AliConst.h"
55 #include "AliMagF.h"
56 #include "AliVZEROLoader.h"
57 #include "AliVZEROdigit.h"
58 #include "AliVZEROhit.h"
59 #include "AliVZEROv2.h"
60
61 ClassImp(AliVZEROv2)
62
63 //_____________________________________________________________________________
64 AliVZEROv2:: AliVZEROv2():AliVZERO()
65 {
66 // Standard default constructor 
67 }
68
69 //_____________________________________________________________________________
70 AliVZEROv2::AliVZEROv2(const char *name, const char *title):
71  AliVZERO(name,title)
72 {
73
74 // Standard constructor for V-zero Detector  version 2
75
76   Int_t i;
77
78   printf("\n");
79   for(i=0;i<26;i++) printf("*");
80   printf(" Create VZERO object ");
81   for(i=0;i<26;i++) printf("*");
82   printf("\n");
83   
84 }
85
86 //_____________________________________________________________________________
87 void AliVZEROv2::CreateGeometry()
88 {
89
90 // Creates the GEANT geometry of the V-zero Detector  version 2
91   
92   Int_t i;
93   
94   printf("\n");
95   for(i=0;i<26;i++) printf("*");
96   printf(" Create VZERO Geometry ");
97   for(i=0;i<26;i++) printf("*");
98   printf("\n");
99       
100   Int_t    *idtmed = fIdtmed->GetArray()-2999;
101
102   Int_t    ndetR = 1;
103   Int_t    ndetL = 1;
104  
105   Int_t    ncellsR = 1;
106   Int_t    ncellsL = 1;
107   
108   Int_t    idrotm[999];
109  
110   Float_t  height1, height2, height3, height4, height5; 
111   Float_t  height;
112   Float_t  theta;  
113   
114   Float_t  halfThickQua;
115   
116   Float_t  zdet;
117   Float_t  r0, r5;
118   Float_t  pi = TMath::Pi();
119     
120   height1     =     1.82;         // height of cell 1, in cm
121   height2     =     3.81;         // height of cell 2, in cm
122   height3     =     4.72;         // height of cell 3, in cm
123   height4     =     7.12;         // height of cell 4, in cm
124   height5     =    10.83;         // height of cell 5, in cm
125   
126   theta       = pi/6.0/2.0;       // half angular opening = 15 degrees
127     
128   halfThickQua= fThickness1/2.0;  // half thickness of elementary cell (inner ring)
129   
130 // distance 0.6 cm in zdet accounts for the fact V0R box back lid sits 0.6 away from 
131 // absorber nose sitting at 90 cm. Will use -zdet later...
132    
133   zdet        =    90.0 - 0.6 -fThickness/2.0;  // distance to vertex (along Z axis)   
134   r0          =    4.05;          // closest distance to center of the beam pipe
135   height      =    height1 + height2 + height3 + height4 + height5;
136   r5          =    r0 + height;
137
138 // Creation of mother volume v0LE - left part - :
139 // Entrance face at  +350.0 cm  (new coordinate system) ...
140
141    Float_t   partube[3];
142    
143    partube[0] =  4.3;
144    partube[1] = 45.0;
145    partube[2] = fThickness1/2.0;   
146     
147    gMC->Gsvolu("V0LE","TUBE",idtmed[3005],partube,3);
148      
149 // Creation of five rings - left part - :
150 // Entrance face at +350.0 cm  (new coordinate system) ... 
151
152 // Mother volume v0L0 in which will be set 5 scintillator cells 
153
154   Float_t   partubs[5];  
155     
156   Float_t   r0Left      =   4.3;   
157   Float_t   height1Left =   2.6; 
158   Float_t   height2Left =   4.1;
159   Float_t   height3Left =   6.4;
160   Float_t   height4Left =  10.2;
161   Float_t   height5Left =  16.9;
162   Float_t   heightLeft  = height1Left + height2Left + height3Left 
163                                       + height4Left + height5Left;
164   Float_t   r5Left      = r0Left  + heightLeft; 
165   
166   partubs[0]      =  r0Left;
167   partubs[1]      =  r5Left;
168   partubs[2]      =  fThickness1/2.0;
169   partubs[3]      =  90.0-15.0;
170   partubs[4]      = 120.0-15.0;
171
172   gMC->Gsvolu("V0L0","TUBS",idtmed[3010],partubs,5);  // air volume
173   
174   Float_t  r1Left =  r0Left + height1Left;        
175      
176   partubs[0]     =  r0Left;
177   partubs[1]     =  r1Left;
178
179   gMC->Gsvolu("V0L1","TUBS",idtmed[3005],partubs,5);  // quartz volume
180   gMC->Gspos("V0L1",1,"V0L0", 0.0, 0.0 , 0.0, 0,"ONLY"); 
181
182   Float_t   r2Left  =   r1Left + height2Left;       
183   
184   partubs[0]     =  r1Left;
185   partubs[1]     =  r2Left;
186
187   gMC->Gsvolu("V0L2","TUBS",idtmed[3005],partubs,5);  // quartz volume
188   gMC->Gspos("V0L2",1,"V0L0", 0.0, 0.0 , 0.0, 0,"ONLY"); 
189   
190   Float_t   r3Left =   r2Left + height3Left;
191    
192   partubs[0]     =  r2Left;
193   partubs[1]     =  r3Left;
194
195   gMC->Gsvolu("V0L3","TUBS",idtmed[3005],partubs,5);  // quartz volume
196   gMC->Gspos("V0L3",1,"V0L0", 0.0, 0.0 , 0.0, 0,"ONLY");
197   
198   Float_t   r4Left =  r3Left + height4Left;
199    
200   partubs[0]     =  r3Left;
201   partubs[1]     =  r4Left;
202
203   gMC->Gsvolu("V0L4","TUBS",idtmed[3005],partubs,5);  // quartz volume
204   gMC->Gspos("V0L4",1,"V0L0", 0.0, 0.0 , 0.0, 0,"ONLY");
205
206   partubs[0]     =  r4Left;
207   partubs[1]     =  r5Left;
208   partubs[3]     =  90.0-15.0;
209   partubs[4]     = 120.0-30.0;
210   
211   gMC->Gsvolu("V0L5","TUBS",idtmed[3005],partubs,5);  // quartz volume
212   gMC->Gspos("V0L5",1,"V0L0", 0.0, 0.0 , 0.0, 0,"ONLY");
213   
214   partubs[3]     = 120.0-30.0;
215   partubs[4]     = 120.0-15.0;
216   
217   gMC->Gsvolu("V0L6","TUBS",idtmed[3005],partubs,5);  // quartz volume
218   gMC->Gspos("V0L6",1,"V0L0", 0.0, 0.0 , 0.0, 0,"ONLY");
219   
220
221 // Creation of mother volume v0RI - right part - :
222   
223   partube[0] = r0 - 0.2;
224   partube[1] = r5 + 1.0;
225   partube[2] = fThickness/2.0; 
226       
227   gMC->Gsvolu("V0RI","TUBE",idtmed[3010],partube,3);
228   
229 // Creation of  carbon lids (2 mm thick) to keep v0RI box shut...
230
231   Float_t  lidThickness = 0.2;
232  
233   partube[0] =   r0;
234   partube[1] =   r5;
235   partube[2] =   +lidThickness/2.0;
236     
237   gMC->Gsvolu("V0CA","TUBE",idtmed[3001],partube,3); 
238   gMC->Gspos("V0CA",1,"V0RI",0.0,0.0, fThickness/2.0-partube[2],0,"ONLY");
239   gMC->Gspos("V0CA",2,"V0RI",0.0,0.0,-fThickness/2.0+partube[2],0,"ONLY");
240   
241 // Creation of aluminum rings to maintain the v0RI pieces ...
242
243   partube[0] =   r0 - 0.2;
244   partube[1] =   r0;
245   partube[2] =   +fThickness/2.0;
246    
247   gMC->Gsvolu("V0IR","TUBE",idtmed[3003],partube,3);    
248   gMC->Gspos("V0IR",1,"V0RI",0.0,0.0,0.0,0,"ONLY");
249
250   partube[0] =   r5;
251   partube[1] =   r5 + 1.0;
252   partube[2] =   +fThickness/2.0;
253  
254   gMC->Gsvolu("V0ER","TUBE",idtmed[3003],partube,3);    
255   gMC->Gspos("V0ER",1,"V0RI",0.0,0.0,0.0,0,"ONLY");
256   
257 // Mother volume v0R0 in which will be set 5  scintillator cells 
258   
259   partubs[0]      =  r0;
260   partubs[1]      =  r5;
261   partubs[2]      =  fThickness/2.0;
262   partubs[3]      =  90.0-15.0;
263   partubs[4]      = 120.0-15.0;
264
265   gMC->Gsvolu("V0R0","TUBS",idtmed[3010],partubs,5);  // air volume 
266
267 // Elementary cell of ring 1 :
268 // (cells 2 and 3  will be shifted by 1 cm to output fibers) 
269    
270   Float_t   offsetFibers  =  1.0;
271   Float_t   offset        =  fThickness/2.0 - lidThickness - fThickness1/2.0; 
272   Float_t   r1            =  r0 + height1;
273       
274   partubs[0]     =  r0;
275   partubs[1]     =  r1;
276   partubs[2]     =  fThickness1/2.0;
277   
278   gMC->Gsvolu("V0R1","TUBS",idtmed[3005],partubs,5);  // scintillator volume
279   gMC->Gspos("V0R1",1,"V0R0", 0.0, 0.0 , -offset, 0,"ONLY"); 
280
281 // Elementary cell of ring 2 :
282
283   Float_t   r2   =  r1 + height2;       
284   
285   partubs[0]     =  r1;
286   partubs[1]     =  r2;
287
288   gMC->Gsvolu("V0R2","TUBS",idtmed[3005],partubs,5);  // scintillator volume
289   gMC->Gspos("V0R2",1,"V0R0", 0.0, 0.0 , -offset + offsetFibers, 0,"ONLY"); 
290
291
292 // Elementary cell of ring 3 :
293   
294   Float_t   r3   =  r2 + height3;
295    
296   partubs[0]     =  r2;
297   partubs[1]     =  r3;
298
299   gMC->Gsvolu("V0R3","TUBS",idtmed[3005],partubs,5);  // scintillator volume
300   gMC->Gspos("V0R3",1,"V0R0", 0.0, 0.0 , -offset + 2.0 * offsetFibers, 0,"ONLY");
301
302 // Elementary cell of ring 4 :
303   
304   Float_t   r4   =  r3 + height4 ;
305   
306   partubs[0]     =  r3;
307   partubs[1]     =  r4;
308
309   gMC->Gsvolu("V0R4","TUBS",idtmed[3005],partubs,5);  // scintillator volume
310   gMC->Gspos("V0R4",1,"V0R0", 0.0, 0.0 ,  -offset + 2.0 * offsetFibers, 0,"ONLY");
311
312 // Elementary cells of ring 5 :
313
314   partubs[0]     =  r4;
315   partubs[1]     =  r5;
316   partubs[3]     =  90.0-15.0;
317   partubs[4]     = 120.0-30.0;
318   
319   gMC->Gsvolu("V0R5","TUBS",idtmed[3005],partubs,5);  // scintillator volume
320   gMC->Gspos("V0R5",1,"V0R0", 0.0, 0.0 , -offset + 2.0 * offsetFibers, 0,"ONLY");  
321
322   partubs[3]     = 120.0-30.0;
323   partubs[4]     = 120.0-15.0;
324   
325   gMC->Gsvolu("V0R6","TUBS",idtmed[3005],partubs,5);  // scintillator volume
326   gMC->Gspos("V0R6",1,"V0R0", 0.0, 0.0 ,  -offset + 2.0 * offsetFibers, 0,"ONLY");
327    
328   Float_t  phiDeg = 180./6.; 
329
330 // Right part : 
331  
332   for(Float_t  phi = 15.0; phi < 360.0; phi = phi + phiDeg)
333       {        
334         AliMatrix(idrotm[902], 90.0, phi, 90.0, 90.0 +phi, 0.0 , 0.0);
335         gMC->Gspos("V0R0",ndetR,"V0RI",0.0,
336                           0.0,0.0,idrotm[902],"ONLY");
337         ndetR++;
338        }
339
340   gMC->Gspos("V0RI",1,"ALIC",0.0,0.0,-zdet,0,"ONLY");
341  
342   ncellsR = (ndetR - 1) * 6;  
343   printf("    Number of cells on Right side =   %d\n",  ncellsR);    
344
345 // Left part :
346
347   for(Float_t  phi = 15.0; phi < 360.0; phi = phi + phiDeg)
348       {       
349         AliMatrix(idrotm[902], 90.0, phi, 90.0, 90.0 +phi, 0.0 , 0.0);
350         gMC->Gspos("V0L0",ndetL,"V0LE",0.0,
351                           0.0,0.0,idrotm[902],"ONLY");
352         ndetL++;
353        }
354
355   gMC->Gspos("V0LE",1,"ALIC",0.0,0.0,350.0+fThickness1/2.0,0,"ONLY");
356  
357   ncellsL = (ndetL - 1) * 6;
358   printf("    Number of cells on Left side  =   %d\n",  ncellsL);    
359   for(i=0;i<75;i++) printf("*");
360   printf("\n");
361            
362 }
363             
364 //_____________________________________________________________________________
365 void AliVZEROv2::BuildGeometry()
366 {
367   
368 // Builds simple ROOT TNode geometry for event display
369
370   Int_t i;
371
372   printf("\n");
373   for(i=0;i<30;i++) printf("*");
374   printf(" VZERO BuildGeometry ");
375   for(i=0;i<30;i++) printf("*");
376   printf("\n");
377
378   TNode *top; 
379
380   TNode *v0Rnode, *v0Rnode0, *v0Rnode6 , *v0Rnode7, *v0Rnode8, *v0Rnode9;
381   TNode *v0Rnode1, *v0Rnode2, *v0Rnode3, *v0Rnode4, *v0Rnode5;
382   TNode *v0Lnode, *v0Lnode0;
383   TNode *v0Lnode1, *v0Lnode2, *v0Lnode3, *v0Lnode4, *v0Lnode5, *v0Lnode6;
384    
385   const int kColorVZERO  = kGreen;
386  
387   top = gAlice->GetGeometry()->GetNode("alice");
388
389   Float_t  height1, height2, height3, height4, height5; 
390   Float_t  height;
391   Float_t  theta;  
392   
393   Float_t  halfThickQua;
394   Float_t  zdet;
395   Float_t  r0, r5;
396   Float_t  pi = TMath::Pi();
397
398   height1           =     1.82;           // height of cell 1, in cm
399   height2           =     3.81;           // height of cell 2, in cm
400   height3           =     4.72;           // height of cell 3, in cm
401   height4           =     7.12;           // height of cell 4, in cm
402   height5           =    10.83;           // height of cell 5, in cm  
403
404   theta             =    pi/6.0/2.0;    
405    
406   halfThickQua    =    fThickness1/2.0; 
407   
408   zdet              =    90.0 - 0.6 - fThickness/2.0;   
409   r0                =    4.05;         
410   height            =    height1 + height2 + height3 + height4 + height5;
411   r5                =    r0 + height;
412   
413   Int_t     ndiv    =     1;  
414
415   Float_t   partube[3];
416
417   partube[0] =  r0 - 0.2;
418   partube[1] =  r5 + 1.0;
419   partube[2] = fThickness/2.0;   
420   
421   TTUBE *v0RI = new TTUBE("V0RI", "V0RI", "void", partube[0], partube[1], partube[2]);
422                 
423   top->cd();
424   
425   v0Rnode = new TNode("V0RI","V0RI",v0RI,0.0,0.0,-zdet,0);
426   
427   v0Rnode->SetLineColor(kYellow);
428   fNodes->Add(v0Rnode);  
429   v0Rnode->SetVisibility(2);     
430  
431 // Rondelles de carbone (epaisseur 2 mm) de maintien des cellules ...
432
433   Float_t  lidThickness = 0.2;
434   
435   partube[0] =   r0;
436   partube[1] =   r5;
437   partube[2] =   +lidThickness/2.0;
438   
439   TTUBE  *v0CA = new TTUBE("V0CA", "V0CA", "void",partube[0], partube[1], partube[2]);
440   
441   v0Rnode->cd();
442   v0Rnode6 = new TNode("V0CA", "V0CA",v0CA,0.0,0.0, fThickness/2.0-partube[2],0);        
443   v0Rnode6->SetLineColor(kYellow);
444   fNodes->Add(v0Rnode6); 
445   v0Rnode->cd();
446   v0Rnode7 = new TNode("V0CA", "V0CA",v0CA,0.0,0.0,-fThickness/2.0+partube[2],0);        
447   v0Rnode7->SetLineColor(kYellow);
448   fNodes->Add(v0Rnode7);
449   
450   partube[0] =   r0 - 0.2;
451   partube[1] =   r0;
452   partube[2] =   +fThickness/2.0;
453   
454   TTUBE *v0IR = new TTUBE("V0IR","V0IR","void", partube[0], partube[1], partube[2]);
455  
456   v0Rnode->cd();
457   v0Rnode8 = new TNode("V0IR", "V0IR",v0IR,0.0,0.0,0.0,0);
458   v0Rnode8->SetLineColor(kYellow);
459   fNodes->Add(v0Rnode8);
460
461   partube[0] =   r5;
462   partube[1] =   r5 + 1.0; 
463   partube[2] =   +fThickness/2.0;
464
465   TTUBE  *v0ER = new TTUBE("V0ER","V0ER","void", partube[0], partube[1], partube[2]);
466   
467   v0Rnode->cd();
468   v0Rnode9 = new TNode("V0ER", "V0ER",v0ER,0.0,0.0,0.0,0);
469   v0Rnode9->SetLineColor(kYellow);
470   fNodes->Add(v0Rnode9);
471   
472   Float_t   partubs[5];
473  
474   partubs[0]      =  r0;
475   partubs[1]      =  r5;
476   partubs[2]      =  fThickness/2.0;
477   partubs[3]      =  90.0-15.0;
478   partubs[4]      = 120.0-15.0;
479
480   TTUBS  *v0R0 = new TTUBS("V0R0", "V0R0", "void",partubs[0], partubs[1], partubs[2], 
481                                                   partubs[3], partubs[4]); 
482                                                   
483   v0R0->SetNumberOfDivisions(ndiv);                                               
484
485   Float_t   r1     =  r0 + height1;
486   Float_t   offset = fThickness/2.0 - lidThickness - fThickness1/2.0; 
487   Float_t   offsetFibers = 1.0;
488     
489   partubs[0]     =  r0;
490   partubs[1]     =  r1;
491   partubs[2]     =  fThickness1/2.0;
492
493   TTUBS *v0R1 = new TTUBS("V0R1", "V0R1", "void", partubs[0], partubs[1], partubs[2], 
494                                                   partubs[3], partubs[4]);
495
496   v0R1->SetNumberOfDivisions(ndiv);
497   
498   Float_t   r2   =  r1 + height2;       
499   
500   partubs[0]     =  r1;
501   partubs[1]     =  r2;
502
503   TTUBS *v0R2 = new TTUBS("V0R2", "V0R2", "void", partubs[0], partubs[1], partubs[2], 
504                                                   partubs[3], partubs[4]);
505
506   v0R2->SetNumberOfDivisions(ndiv);
507   
508   Float_t   r3   =  r2 + height3;
509    
510   partubs[0]     =  r2;
511   partubs[1]     =  r3;
512   
513   TTUBS *v0R3 = new TTUBS("V0R3", "V0R3", "void", partubs[0], partubs[1], partubs[2], 
514                                                   partubs[3], partubs[4]);
515   v0R3->SetNumberOfDivisions(ndiv);
516  
517   Float_t   r4   =  r3 + height4;
518    
519   partubs[0]     =  r3;
520   partubs[1]     =  r4;
521
522   TTUBS *v0R4 = new TTUBS("V0R4", "V0R4", "void", partubs[0], partubs[1], partubs[2], 
523                                                   partubs[3], partubs[4]);
524
525   v0R4->SetNumberOfDivisions(ndiv);
526
527   partubs[0]     =  r4;
528   partubs[1]     =  r5;
529   partubs[3]     =  90.0-15.0;
530   partubs[4]     = 120.0-30.0;
531   
532   TTUBS *v0R5 = new TTUBS("V0R5", "V0R5", "void", partubs[0], partubs[1], partubs[2], 
533                                                   partubs[3], partubs[4]);
534
535   v0R5->SetNumberOfDivisions(ndiv);
536
537   partubs[3]     = 120.0-30.0;
538   partubs[4]     = 120.0-15.0;
539   
540   TTUBS *v0R6 = new TTUBS("V0R6", "V0R6", "void", partubs[0], partubs[1], partubs[2], 
541                                                   partubs[3], partubs[4]);
542                                                   
543   v0R6->SetNumberOfDivisions(ndiv);
544                 
545   Float_t  phi;
546   Float_t  phiDeg= 180./6.;
547     
548   Int_t    ndetR = 1; 
549
550   char     nameNode[12];  
551  
552   for (phi = 15.0; phi < 360.0; phi = phi + phiDeg)
553   
554   {
555      
556     TRotMatrix* mat920 = new TRotMatrix("rot920","rot920", 90.0, +phi, 90., 90.+phi, 0.0, 0.0 );        
557      
558     sprintf(nameNode,"SUBDER%d",ndetR);
559     
560     v0Rnode->cd();
561     v0Rnode0 = new TNode(nameNode,nameNode,v0R0,0.0,0.0, 0.0,mat920);    
562     v0Rnode0->SetLineColor(kYellow);
563     fNodes->Add(v0Rnode0);
564     ndetR++;
565     
566     sprintf(nameNode,"SUBDER%d",ndetR);
567     v0Rnode0->cd();    
568     v0Rnode1 = new TNode(nameNode,nameNode,v0R1,0.0,0.0, -offset,0);     
569     v0Rnode1->SetLineColor(kColorVZERO);
570     fNodes->Add(v0Rnode1);
571     ndetR++;
572     
573     sprintf(nameNode,"SUBDER%d",ndetR);
574     v0Rnode0->cd();    
575     v0Rnode2 = new TNode(nameNode,nameNode,v0R2,0.0,0.0, -offset + offsetFibers,0);      
576     v0Rnode2->SetLineColor(kColorVZERO);
577     fNodes->Add(v0Rnode2);
578     ndetR++;
579
580     sprintf(nameNode,"SUBDER%d",ndetR);
581     v0Rnode0->cd();    
582     v0Rnode3 = new TNode(nameNode,nameNode,v0R3,0.0,0.0, -offset + 2.0*offsetFibers,0);  
583     v0Rnode3->SetLineColor(kColorVZERO);
584     fNodes->Add(v0Rnode3);
585     ndetR++;
586
587     sprintf(nameNode,"SUBDER%d",ndetR);
588     v0Rnode0->cd();    
589     v0Rnode4 = new TNode(nameNode,nameNode,v0R4,0.0,0.0, -offset + 2.0*offsetFibers,0);  
590     v0Rnode4->SetLineColor(kColorVZERO);
591     fNodes->Add(v0Rnode4);
592     ndetR++;
593      
594     sprintf(nameNode,"SUBDER%d",ndetR);
595     v0Rnode0->cd();    
596     v0Rnode5 = new TNode(nameNode,nameNode,v0R5,0.0,0.0, -offset + 2.0*offsetFibers,0);  
597     v0Rnode5->SetLineColor(kColorVZERO);
598     fNodes->Add(v0Rnode5);
599     ndetR++;
600     
601     sprintf(nameNode,"SUBDER%d",ndetR);
602     v0Rnode0->cd();    
603     v0Rnode6 = new TNode(nameNode,nameNode,v0R6,0.0,0.0, -offset + 2.0*offsetFibers,0);  
604     v0Rnode6->SetLineColor(kColorVZERO);
605     fNodes->Add(v0Rnode6);
606     ndetR++;
607        
608     v0Rnode0->SetVisibility(2);
609     
610   }    
611
612 // Left side of VZERO :
613      
614   Float_t   r0Left      =   4.3;   
615   Float_t   height1Left =   2.6; 
616   Float_t   height2Left =   4.1;
617   Float_t   height3Left =   6.4;
618   Float_t   height4Left =  10.2;
619   Float_t   height5Left =  16.9;
620   Float_t   heightLeft  = height1Left + height2Left + height3Left 
621                                         + height4Left + height5Left;
622   Float_t   r5Left      = r0Left  + heightLeft; 
623
624   partube[0] =  r0Left;
625   partube[1] =  r5Left;
626   partube[2] =  fThickness1/2.0; 
627   
628   TTUBE *v0LE = new TTUBE("V0LE", "V0LE", "void", partube[0], partube[1], partube[2]);
629                 
630   top->cd();
631   
632   v0Lnode = new TNode("V0LE","V0LE",v0LE,0.0,0.0,350.0+fThickness1/2.0,0);
633   
634   v0Lnode->SetLineColor(kBlue);
635   fNodes->Add(v0Lnode);
636   
637   v0Lnode->SetVisibility(2);
638
639   partubs[0]      =  r0Left;
640   partubs[1]      =  r5Left;
641   partubs[2]      =  fThickness1/2.0;
642   partubs[3]      =  90.0-15.0;
643   partubs[4]      = 120.0-15.0;
644   
645   TTUBS *v0L0 = new TTUBS("V0L0", "V0L0", "void", partubs[0], partubs[1], partubs[2], 
646                                                   partubs[3], partubs[4]);
647
648   v0L0->SetNumberOfDivisions(ndiv); 
649   v0L0->SetLineColor(7);
650   
651   Float_t   offsetLeft;
652   offsetLeft    = - fThickness1/2.0; 
653
654   Float_t   r1Left =  r0Left + height1Left;        
655       
656   partubs[0]     =  r0Left;
657   partubs[1]     =  r1Left;
658
659   TTUBS *v0L1 = new TTUBS("V0L1", "V0L1", "void", partubs[0], partubs[1], partubs[2], 
660                                                   partubs[3], partubs[4]);
661
662   v0L1->SetNumberOfDivisions(ndiv);
663   
664   Float_t   r2Left =  r1Left + height2Left;       
665   
666   partubs[0]     =  r1Left;
667   partubs[1]     =  r2Left;
668
669   TTUBS *v0L2 = new TTUBS("V0L2", "V0L2", "void", partubs[0], partubs[1], partubs[2], 
670                                                   partubs[3], partubs[4]);
671
672   v0L2->SetNumberOfDivisions(ndiv);
673   
674   Float_t   r3Left  =  r2Left + height3Left;
675   
676   partubs[0]     =  r2Left;
677   partubs[1]     =  r3Left;
678   
679   TTUBS *v0L3 = new TTUBS("V0L3", "V0L3", "void", partubs[0], partubs[1], partubs[2], 
680                                                   partubs[3], partubs[4]);
681   v0L3->SetNumberOfDivisions(ndiv);
682  
683   Float_t   r4Left  =   r3Left + height4Left;
684   
685   partubs[0]     =  r3Left;
686   partubs[1]     =  r4Left;
687
688   TTUBS *v0L4 = new TTUBS("V0L4", "V0L4", "void", partubs[0], partubs[1], partubs[2], 
689                                                   partubs[3], partubs[4]);
690
691   v0L4->SetNumberOfDivisions(ndiv);
692
693   partubs[0]     =  r4Left;
694   partubs[1]     =  r5Left;
695   partubs[3]     =  90.0-15.0;
696   partubs[4]     = 120.0-30.0;
697   
698   TTUBS *v0L5 = new TTUBS("V0L5", "V0L5", "void", partubs[0], partubs[1], partubs[2], 
699                                                   partubs[3], partubs[4]);
700
701
702   v0L5->SetNumberOfDivisions(ndiv);
703
704   partubs[3]     = 120.0-30.0;
705   partubs[4]     = 120.0-15.0;
706   
707   TTUBS *v0L6 = new TTUBS("V0L6", "V0L6", "void", partubs[0], partubs[1], partubs[2], 
708                                                   partubs[3], partubs[4]);
709                                                   
710   v0L6->SetNumberOfDivisions(ndiv);
711
712   Int_t    ndetL   = 1;
713  
714   for (phi = 15.0; phi < 360.0; phi = phi + phiDeg)
715   
716   {
717      
718     TRotMatrix* mat920 = new TRotMatrix("rot920","rot920", 90.0, +phi, 90., 90.+phi, 0.0, 0.0 );        
719     
720  
721     sprintf(nameNode,"SUBDEL%d",ndetL);
722     
723     v0Lnode->cd();
724     v0Lnode0 = new TNode(nameNode,nameNode,v0L0,0.0,0.0, offsetLeft + halfThickQua,mat920);      
725     v0Lnode0->SetLineColor(kColorVZERO);
726     fNodes->Add(v0Lnode0);
727     ndetL++;
728     
729     sprintf(nameNode,"SUBDEL%d",ndetL);
730     v0Lnode0->cd();    
731     v0Lnode1 = new TNode(nameNode,nameNode,v0L1,0.0,0.0, 0.0,0);         
732     v0Lnode1->SetLineColor(kColorVZERO);
733     fNodes->Add(v0Lnode1);
734     ndetL++;
735     
736     sprintf(nameNode,"SUBDEL%d",ndetL);
737     v0Lnode0->cd();    
738     v0Lnode2 = new TNode(nameNode,nameNode,v0L2,0.0,0.0, 0.0,0);         
739     v0Lnode2->SetLineColor(kColorVZERO);
740     fNodes->Add(v0Lnode2);
741     ndetL++;
742
743
744     sprintf(nameNode,"SUBDEL%d",ndetL);
745     v0Lnode0->cd();    
746     v0Lnode3 = new TNode(nameNode,nameNode,v0L3,0.0,0.0, 0.0,0);         
747     v0Lnode3->SetLineColor(kColorVZERO);
748     fNodes->Add(v0Lnode3);
749     ndetL++;
750
751     sprintf(nameNode,"SUBDEL%d",ndetL);
752     v0Lnode0->cd();    
753     v0Lnode4 = new TNode(nameNode,nameNode,v0L4,0.0,0.0, 0.0,0);         
754     v0Lnode4->SetLineColor(kColorVZERO);
755     fNodes->Add(v0Lnode4);
756     ndetL++;
757      
758     sprintf(nameNode,"SUBDEL%d",ndetL);
759     v0Lnode0->cd();    
760     v0Lnode5 = new TNode(nameNode,nameNode,v0L5,0.0,0.0, 0.0,0);         
761     v0Lnode5->SetLineColor(kColorVZERO);
762     fNodes->Add(v0Lnode5);
763     ndetL++;
764     
765     sprintf(nameNode,"SUBDEL%d",ndetL);
766     v0Lnode0->cd();    
767     v0Lnode6 = new TNode(nameNode,nameNode,v0L6,0.0,0.0, 0.0,0);         
768     v0Lnode6->SetLineColor(kColorVZERO);
769     fNodes->Add(v0Lnode6);
770     ndetL++;
771        
772     v0Lnode0->SetVisibility(2);
773     
774   }    
775      
776 }  
777     
778 //_____________________________________________________________________________
779 void AliVZEROv2::CreateMaterials()
780 {
781
782 // Creates materials used for geometry 
783
784     Int_t i;
785
786     printf("\n");
787     for(i=0;i<25;i++) printf("*");
788     printf(" VZERO create materials ");
789     for(i=0;i<26;i++) printf("*");
790     printf("\n");
791     
792 /*
793     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, 
794                            6.9e-9, 7.1e-9, 7.3e-9, 7.5e-9, 7.7e-9, 7.9e-9, 8.1e-9 };
795
796            
797     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, 
798                                6.9e-9, 7.1e-9, 7.3e-9, 7.5e-9, 7.7e-9, 7.9e-9, 8.1e-9 };
799                            
800     Float_t rindex_quarz[14] = { 1.52398,  1.53090, 1.53835, 1.54641, 1.55513, 1.56458, 
801                                  1.57488,  1.58611, 1.59842, 1.61197, 1.62696, 1.64362, 
802                                  1.662295, 1.68337 };
803                                  
804     Float_t absco_quarz[14] = { 105.8,  45.656, 35.665, 28.598, 25.007, 21.04, 17.525, 
805                                 14.177, 9.282, 4.0925, 1.149, 0.3627, 0.1497, 0.05 };   
806                                                                                         
807     Float_t effic_all[14]   = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. };
808     
809         
810     Float_t rindex_alu[14] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. }; 
811     
812     
813     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,
814                                1e-4,1e-4,1e-4,1e-4 };
815     Float_t effic_alu[14]  = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. };
816
817 */        
818
819     Int_t *idtmed = fIdtmed->GetArray()-2999;
820     
821 //    TGeant3 *geant3 = (TGeant3*) gMC;
822     
823 //  Parameters related to Quarz (SiO2) :
824  
825     Float_t aqua[2], zqua[2], densqua, wmatqua[2];
826     Int_t nlmatqua;
827     
828     aqua[0]    = 28.09;
829     aqua[1]    = 16.;
830     zqua[0]    = 14.;
831     zqua[1]    = 8.;
832     densqua    = 2.64;
833     nlmatqua   = -2;
834     wmatqua[0] = 1.;
835     wmatqua[1] = 2.;
836
837 // Parameters  related to aluminum sheets :
838     
839     Float_t  aal   = 26.98;
840     Float_t  zal   = 13.00; 
841     Float_t  densal=   2.7; 
842     Float_t  radlal=   8.9;
843        
844 // Parameters  related to scintillator CH :
845     
846     Float_t ascin[2] = {1.00794,12.011};
847     Float_t zscin[2] = {1.,6.};
848     Float_t wscin[2] = {1.,1.};
849     Float_t denscin  = 1.032;
850     
851 //  Definition of materials :
852        
853     AliMaterial( 1, "AIR A$", 14.61, 7.3, .001205, 30420., 67500, 0, 0);
854     AliMaterial(11, "AIR I$", 14.61, 7.3, .001205, 30420., 67500, 0, 0);
855     AliMaterial( 2, "CARBON$"  , 12.01, 6.0, 2.265, 18.8, 49.9, 0, 0);
856     AliMixture(  3, "QUA", aqua, zqua, densqua, nlmatqua, wmatqua);
857     AliMaterial( 4, "ALUMINIUM1$", 26.98, 13., 2.7, 8.9, 37.2, 0, 0);
858     AliMaterial( 5, "ALUMINIUM2$", aal, zal, densal, radlal, 0, 0, 0);
859  
860     AliMixture( 6, "Scintillator$",ascin,zscin,denscin,-2,wscin);
861     
862      
863     Int_t   iSXFLD = gAlice->Field()->Integ();
864     Float_t sXMGMX = gAlice->Field()->Max();
865     
866     Float_t tmaxfd, stemax, deemax, epsil, stmin;
867         
868     tmaxfd = 10.;
869     stemax = 0.1;
870     deemax = 0.1;     
871     epsil  = 0.001;
872     stmin  = 0.001;
873   
874 //  Active Air :    
875     AliMedium(1, "ACTIVE AIR$", 1, 1, iSXFLD, sXMGMX,
876               10.0, 1.0, 0.1, 0.1, 10.0, 0, 0) ;
877
878 //  Inactive air : 
879   
880     AliMedium(11, "INACTIVE AIR$", 11, 0, iSXFLD, sXMGMX,
881               10.0, 1.0, 0.1, 0.1, 10.0, 0, 0) ;
882     
883     AliMedium(2, "CARBON$ ", 2,  1, iSXFLD, sXMGMX,
884               tmaxfd, stemax, deemax, epsil, stmin, 0, 0);   
885
886     AliMedium(3, "QUARZ$", 3, 1, iSXFLD, sXMGMX,
887               tmaxfd, fMaxStepQua, fMaxDestepQua, epsil, stmin, 0, 0);
888     
889     AliMedium(4,"ALUMINUM1$",4, 1, iSXFLD, sXMGMX,
890               tmaxfd, fMaxStepAlu, fMaxDestepAlu, epsil, stmin, 0, 0);
891               
892
893     AliMedium(5,"ALUMINUM2$",5, 1, iSXFLD, sXMGMX,
894               tmaxfd, fMaxStepAlu, fMaxDestepAlu, epsil, stmin, 0, 0);    
895
896     AliMedium(6,"SCINTILLATOR$",6, 1, iSXFLD, sXMGMX, 10.0, 0.1, 0.1, 0.003, 0.003, 0, 0);
897
898     gMC->Gstpar(idtmed[3000], "LOSS", 1.);  //  [3000] = air ACTIF  [3010] = air INACTIF
899     gMC->Gstpar(idtmed[3000], "HADR", 1.);
900     gMC->Gstpar(idtmed[3000], "DCAY", 1.);
901     gMC->Gstpar(idtmed[3000], "DRAY", 1.);
902     
903     gMC->Gstpar(idtmed[3001], "LOSS", 1.);  //  [3001] = carbon
904     gMC->Gstpar(idtmed[3001], "HADR", 1.);
905     gMC->Gstpar(idtmed[3001], "DCAY", 1.);
906     gMC->Gstpar(idtmed[3001], "DRAY", 1.);
907
908     gMC->Gstpar(idtmed[3002], "LOSS", 1.);  //  [3002] = quartz
909     gMC->Gstpar(idtmed[3002], "HADR", 1.);
910     gMC->Gstpar(idtmed[3002], "DCAY", 1.);
911     gMC->Gstpar(idtmed[3002], "DRAY", 1.);  
912     gMC->Gstpar(idtmed[3002], "CUTGAM",0.5E-4) ; 
913     gMC->Gstpar(idtmed[3002], "CUTELE",1.0E-4) ;
914     
915     gMC->Gstpar(idtmed[3003], "LOSS", 1.);  //  [3003] = normal aluminum
916     gMC->Gstpar(idtmed[3003], "HADR", 1.);
917     gMC->Gstpar(idtmed[3003], "DCAY", 1.);
918     gMC->Gstpar(idtmed[3003], "DRAY", 1.);
919     
920     gMC->Gstpar(idtmed[3004], "LOSS", 1.);  //  [3004] = reflecting aluminum
921     gMC->Gstpar(idtmed[3004], "HADR", 1.);
922     gMC->Gstpar(idtmed[3004], "DCAY", 1.);
923     gMC->Gstpar(idtmed[3004], "DRAY", 1.);
924     gMC->Gstpar(idtmed[3004], "CUTGAM",0.5E-4) ; 
925     gMC->Gstpar(idtmed[3004], "CUTELE",1.0E-4) ;
926     
927     gMC->Gstpar(idtmed[3005], "LOSS", 1.);  //  [3005] = scintillator
928     gMC->Gstpar(idtmed[3005], "HADR", 1.);
929     gMC->Gstpar(idtmed[3005], "DCAY", 1.);
930     gMC->Gstpar(idtmed[3005], "DRAY", 1.); 
931     gMC->Gstpar(idtmed[3005], "CUTGAM",0.5E-4) ; 
932     gMC->Gstpar(idtmed[3005], "CUTELE",1.0E-4) ;
933       
934     
935 //    geant3->Gsckov(idtmed[3002], 14, ppckov, absco_quarz, effic_all,rindex_quarz);    
936 //    geant3->Gsckov(idtmed[3004], 14, ppckov_alu, absco_alu, effic_alu, rindex_alu);
937
938 //    gMC->SetCerenkov(idtmed[3002], 14, ppckov, absco_quarz, effic_all,rindex_quarz);    
939 //    gMC->SetCerenkov(idtmed[3004], 14, ppckov_alu, absco_alu, effic_alu, rindex_alu);
940                                        
941 }
942
943 //_____________________________________________________________________________
944 void AliVZEROv2::DrawModule()
945 {
946
947 //  Drawing is done in DrawVZERO.C
948
949    Int_t i;
950
951    printf("\n");
952    for(i=0;i<30;i++) printf("*");
953    printf(" VZERO DrawModule ");
954    for(i=0;i<30;i++) printf("*");
955    printf("\n");
956
957
958 }
959
960 //_____________________________________________________________________________
961 void AliVZEROv2::Init()
962 {
963 // Initialises version 2 of the VZERO Detector
964 // Just prints an information message
965   
966    printf(" VZERO version %d initialized \n",IsVersion());
967    
968 //   gMC->SetMaxStep(fMaxStepAlu);
969 //   gMC->SetMaxStep(fMaxStepQua);
970    
971     AliVZERO::Init();
972   
973 }
974
975
976 //_____________________________________________________________________________
977 void AliVZEROv2::StepManager()
978 {
979  
980 // Step Manager, called at each step 
981    
982      Int_t     copy;
983      static    Int_t   vol[4];
984      static    Float_t hits[19];
985      static    Float_t eloss, tlength;
986      
987      TLorentzVector pos;     
988      TLorentzVector mom;
989      
990      Float_t        theta;
991      Float_t        phi;
992      Float_t        kRaddeg = 180.0/TMath::Pi();
993      Float_t        ringNumber;
994
995      Int_t          ipart;
996      Float_t        destep, step;
997           
998
999 //   We keep only charged tracks :
1000      
1001      if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return; 
1002
1003
1004      vol[0]    = gMC->CurrentVolOffID(1, vol[1]);
1005      vol[2]    = gMC->CurrentVolID(copy);
1006      vol[3]    = copy;
1007      
1008
1009      if      ( gMC->CurrentVolID(copy) == gMC->VolId("V0R1") ||
1010                gMC->CurrentVolID(copy) == gMC->VolId("V0L1") )
1011                ringNumber = 1.0;
1012      else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R2") ||
1013                gMC->CurrentVolID(copy) == gMC->VolId("V0L2") ) 
1014                ringNumber = 2.0;  
1015      else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R3") ||
1016                gMC->CurrentVolID(copy) == gMC->VolId("V0L3") )
1017                ringNumber = 3.0;
1018      else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R4") ||
1019                gMC->CurrentVolID(copy) == gMC->VolId("V0L4") )   
1020                ringNumber = 4.0; 
1021      else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R5") ||
1022                gMC->CurrentVolID(copy) == gMC->VolId("V0L5") ||
1023                gMC->CurrentVolID(copy) == gMC->VolId("V0L6") ||
1024                gMC->CurrentVolID(copy) == gMC->VolId("V0R6") )    
1025                ringNumber = 5.0; 
1026      else
1027                ringNumber = 0.0;
1028
1029      if  (  ringNumber > 0.5  ) { 
1030      
1031         destep    = gMC->Edep();
1032         step      = gMC->TrackStep();
1033         eloss    += destep;
1034         tlength  += step; 
1035         
1036                  
1037         if  ( gMC->IsTrackEntering()  )  {  
1038        
1039             gMC->TrackPosition(pos);
1040      
1041             gMC->TrackMomentum(mom);      
1042             Double_t tc   = mom[0]*mom[0]+mom[1]*mom[1];
1043             Double_t pt   = TMath::Sqrt(tc);
1044             Double_t pmom = TMath::Sqrt(tc+mom[2]*mom[2]);
1045             theta   = Float_t(TMath::ATan2(pt,Double_t(mom[2])))*kRaddeg;
1046             phi     = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg;
1047      
1048             ipart  = gMC->TrackPid();
1049
1050             hits[0]  = pos[0];
1051             hits[1]  = pos[1];
1052             hits[2]  = pos[2];           
1053             hits[3]  =  Float_t (ipart); 
1054
1055             hits[4]  = gMC->TrackTime();
1056             hits[5]  = gMC->TrackCharge();
1057             hits[6]  = theta;
1058             hits[7]  = phi;
1059             hits[8]  = ringNumber;
1060          
1061             hits[9]  = pt;
1062             hits[10] = pmom;
1063             hits[11] = mom[0];
1064             hits[12] = mom[1];
1065             hits[13] = mom[2];
1066             
1067             TParticle *par = gAlice->GetMCApp()->Particle(gAlice->GetMCApp()->GetCurrentTrackNumber());
1068             hits[14] = par->Vx();
1069             hits[15] = par->Vy();
1070             hits[16] = par->Vz();
1071             
1072             tlength  = 0.0;
1073             eloss    = 0.0;
1074             
1075          }
1076          
1077          if( gMC->IsTrackExiting() || gMC->IsTrackStop() || gMC->IsTrackDisappeared()){
1078          
1079          hits[17] =   eloss;
1080          hits[18] = tlength;
1081          
1082          AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
1083                  
1084          tlength  = 0.0;
1085          eloss    = 0.0; 
1086           
1087          } 
1088     }
1089       
1090 }
1091
1092 //_____________________________________________________________________________
1093 void AliVZEROv2::AddHit(Int_t track, Int_t *vol, Float_t *hits)
1094 {
1095   
1096 //  Adds a VZERO hit
1097   
1098   TClonesArray &lhits = *fHits;
1099   new(lhits[fNhits++]) AliVZEROhit(fIshunt,track,vol,hits);
1100 }
1101
1102 //_____________________________________________________________________________
1103 void AliVZEROv2::AddDigits(Int_t *tracks, Int_t* digits) 
1104 {
1105
1106 //  Adds a VZERO digit
1107
1108    TClonesArray  &ldigits = *fDigits;
1109    new(ldigits[fNdigits++]) AliVZEROdigit(tracks, digits);
1110 }
1111
1112 //_____________________________________________________________________________
1113 void AliVZEROv2::MakeBranch(Option_t *option)
1114 {
1115   
1116 // Creates new branches in the current Root Tree
1117     
1118   char branchname[10];
1119   sprintf(branchname,"%s",GetName());
1120   printf(" fBufferSize = %d \n",fBufferSize);
1121   
1122   const char *cH = strstr(option,"H");
1123   
1124   if (fHits   && TreeH() && cH) {
1125     TreeH()->Branch(branchname,&fHits, fBufferSize);
1126     printf("* AliDetector::MakeBranch * Making Branch %s for hits\n",branchname);
1127   }     
1128
1129   const char *cD = strstr(option,"D");
1130   
1131   if (fDigits   && fLoader->TreeD() && cD) {
1132     fLoader->TreeD()->Branch(branchname,&fDigits, fBufferSize);
1133     printf("* AliDetector::MakeBranch * Making Branch %s for digits\n",branchname);
1134   }  
1135    
1136 }