Several Changes:
[u/mrichter/AliRoot.git] / T0 / AliT0v0.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 // T0 ( T-zero) detector  version 0                        //
21 //
22 //Begin Html       
23 /*
24 <img src="gif/AliT0v0Class.gif">
25 */
26 //End Html
27 //                                                                  //
28 //                                                                  //
29 //////////////////////////////////////////////////////////////////////
30
31 #include <Riostream.h>
32 #include <stdlib.h>
33
34 #include <TLorentzVector.h>
35 #include <TMath.h>
36 #include <TVirtualMC.h>
37
38 #include "AliLog.h"
39 #include "AliMagF.h"
40 #include "AliRun.h"
41 #include "AliT0hit.h"
42 #include "AliT0v0.h"
43 #include "AliLog.h"
44
45 ClassImp(AliT0v0)
46
47 //--------------------------------------------------------------------
48 AliT0v0::AliT0v0(const char *name, const char *title):
49   AliT0(name,title),
50   fIdSens1(0)
51 {
52   //
53   // Standart constructor for T0 Detector version 0
54   //
55   //  fIdSens1=0;
56 //  setBufferSize(128000);
57 }
58 //-------------------------------------------------------------------------
59 void AliT0v0::CreateGeometry()
60 {
61   //
62   // Create the geometry of T0 Detector version 0
63   // Full geometry with support structure according T0 prototype
64   //
65   // begin Html
66   /*
67    <img src="gif/AliT0v0.gif">
68   */
69   //
70
71
72
73   Int_t *idtmed = fIdtmed->GetArray();
74   
75   Int_t is;
76   Int_t idrotm[999];
77   Float_t x,y,z;
78  Float_t pstartR[18]={0., 360., 5., 
79                        -76.5+0.00+69.7, 4.25, 10.,
80                        -76.5+6.05+69.7, 4.5, 10., 
81                        -76.5+8.05+69.7, 4.5, 10.,
82                        -76.5+8.05+69.7, 5.1, 10.,
83                        -62.9+0.00+69.7, 5.1, 10.};
84   
85   Float_t pstart[3]={4.3, 12.,6.8};
86   Float_t pinstart[3]={0.,1.6,6.5};
87   Float_t ppmt[3]={0.,1.5,3.5};
88
89   Float_t preg[3]={0.,0.875,0.005}; //dobavil bogdanov
90
91   Float_t pdivider[3]={0.,1.2,1.75};
92   Float_t pdiv2[3]={0.,1.2,1.25};
93   Float_t pdiv1[3]={0.6,1.2,0.5};
94   //  Float_t ptop[3]={0.,1.3,1.5};
95   Float_t ptop[3]={0.,1.0,1.5};
96   Float_t pbot[3]={0.6,1.2,0.1};
97   Float_t pglass[3]={1.2,1.3,2.};
98   Float_t pcer[3]={0.9,1.1,0.09};
99   Float_t psteel[3]={0.9,1.1,0.01};
100   Float_t ppins[3]={0.6,1.2,0.014};
101   Float_t phole[3]={0.6,1.2,0.015};
102   Float_t pknob[3]={0.5,0.6,0.4};
103   Float_t pknob_vac[3]={0.,0.5,0.4};
104   Float_t pknob_bot[3]={0.,0.6,0.05};
105   Float_t pribber[3] = {0.,1.2,2.413/2.};
106   Float_t presist[3] = {0.,1.2,0.087/2.};
107   Float_t psupport1[3] = {4.51,4.6,4.0};//C kozhuh vnutri
108   Float_t psupport2[3] = {9.4,9.5,4.0};// snaruzhi  C
109   Float_t psupport3[3] = {4.51,9.5,0.05};//kryshki  C
110    Float_t psupport5[3] = {1.44,1.5,6.5}; // stakanchik dlai feu  C
111   Float_t psupport6[3] = {0,1.5,0.05}; //kryshechka stakanchika  Al
112   Float_t psupport7[3] = {1.5,1.6,0.6}; //kolechko snaruzhu stakanchika Al
113   // Mother Volume katushka dlia krepezha vokrug truby k Absorbru
114     AliMatrix(idrotm[901], 90., 0., 90., 90., 180., 0.);
115   Float_t ppcon[70]; 
116     ppcon[0]  =   0;
117     ppcon[1]  = 360;
118     ppcon[2]  =  13;
119 //  1: 
120     ppcon[3]  =  14.1/2;
121     ppcon[4]  =   4.4;
122     ppcon[5]  =   4.5;
123 //  2
124     ppcon[6]  = ppcon[3]+1.;
125     ppcon[7]  =   4.4;
126     ppcon[8]  =   4.5;
127 //  3
128     ppcon[9]  = ppcon[6];
129     ppcon[10] =   4.4;
130     ppcon[11] =   5.1;
131
132 //  4
133
134     ppcon[12]  = ppcon[9]+0.1;
135     ppcon[13] =   4.4;
136     ppcon[14] =   5.1;
137 //  5
138
139     ppcon[15]  = ppcon[12];
140     ppcon[16] =   4.9;
141     ppcon[17] =   5.1;
142     
143 //  6
144     ppcon[18]  = ppcon[15]+7.05;
145     ppcon[19] =   4.9;
146     ppcon[20] =   5.1;
147     
148 //  7
149     ppcon[21]  = ppcon[18];
150     ppcon[22] =   4.9;
151     ppcon[23] =   5.1;
152
153 /// 8
154     ppcon[24]  = ppcon[21]+0.01;
155     ppcon[25] =   3.15;
156     ppcon[26] =   3.25;
157     
158 /// 9
159     ppcon[27]  = ppcon[24];
160     ppcon[28] =   3.15;
161     ppcon[29] =   3.25;
162     
163 //  10
164     ppcon[30]  = ppcon[27]+4.5;
165     ppcon[31] =   3.15;
166     ppcon[32] =   3.25;
167
168 //  11
169     ppcon[33] = ppcon[30];
170     ppcon[34] =   3.15;
171     ppcon[35] =   3.25;
172
173 //  12
174     ppcon[36]  = ppcon[33];
175     ppcon[37] =   3.15;
176     ppcon[38] =   7.6;
177
178 //  13
179     ppcon[39]  = ppcon[33]+0.4;
180     ppcon[40] =   3.15;
181     ppcon[41] =   7.6;
182
183 //  14
184 //    ppcon[39]  = ppcon[36];
185 //    ppcon[40] =   3.15;
186 //    ppcon[41] =   7.6;
187
188     gMC->Gsvolu("0SUP", "PCON", idtmed[kAir], ppcon,42);
189     z=-69.7;//-14.1/2;
190     gMC->Gspos("0SUP",1,"ALIC",0.,0.,z,idrotm[901],"ONLY");
191
192
193    Float_t zdetRight=69.7,zdetLeft=350;
194  //-------------------------------------------------------------------
195  //  T0 volume 
196  //-------------------------------------------------------------------
197   
198     
199     gMC->Gsvolu("0STR","PCON",idtmed[kAir],pstartR,18);
200     gMC->Gsvolu("0STL","TUBE",idtmed[kAir],pstart,3);
201     gMC->Gspos("0STR",1,"ALIC",0.,0.,-zdetRight-pstart[2],idrotm[901],"ONLY");
202     gMC->Gspos("0STL",1,"ALIC",0.,0.,zdetLeft+pstart[2],0,"ONLY");
203
204 //T0 interior
205     gMC->Gsvolu("0INS","TUBE",idtmed[kAir],pinstart,3);
206     gMC->Gsvolu("0PMT","TUBE",idtmed[kOpAir],ppmt,3);     
207     gMC->Gsvolu("0DIV","TUBE",idtmed[kVac],pdivider,3);     
208     gMC->Gsvolu("0SU1","TUBE",idtmed[kC],psupport1,3);//C kozhuh vnutri
209     gMC->Gsvolu("0SU2","TUBE",idtmed[kC],psupport2,3);// snaruzhi  C
210     gMC->Gsvolu("0SU3","TUBE",idtmed[kC],psupport3,3);//kryshka perednaiai  C
211     gMC->Gsvolu("0SU4","TUBE",idtmed[kC],psupport3,3);//kryshka zadnaiai  C
212     //    gMC->Gsvolu("0SU5","TUBE",idtmed[kAir],psupport4,3);// dyrki dlia feu v zadnej kryshke Air
213     gMC->Gsvolu("0SU6","TUBE",idtmed[kC],psupport5,3);// stakanchik dlai feu  C
214     gMC->Gsvolu("0SU7","TUBE",idtmed[kAl],psupport6,3);//kryshechka stakanchika  Al
215     gMC->Gsvolu("0SU8","TUBE",idtmed[kAl],psupport7,3);//kolechko snaruzhu stakanchika Al
216        
217 // first ring: 12 units of Scintillator+PMT+divider
218   Float_t  theta  = (180 / TMath::Pi()) * TMath::ATan(6.5 / zdetRight);
219   Float_t angle  = 2 * TMath::Pi() / 12;
220   Float_t phi[3];
221     
222    for (is=0; is<12; is++)
223       {  
224
225         x = 6.5 * TMath::Sin(is * angle);
226         y = 6.5 * TMath::Cos(is * angle);
227         
228         phi[0] = -30 * is;
229         phi[1] = 90 - is * 30;
230         phi[2] = 90 - is * 30;
231         for (Int_t j = 0; j < 3; j++)
232           if (phi[j] < 0)  phi[j] += 360;
233         
234         AliMatrix (idrotm[902 + is], 90.,         phi[0],
235                    90. + theta, phi[1],
236                    theta,       phi[2]);  
237         z=-pstart[2]+pinstart[2]+0.2;
238         gMC->Gspos ("0INS", is + 1, "0STR", x, y, z, idrotm[902 + is], "ONLY");
239         gMC->Gspos ("0INS", is + 13, "0STL", x, y, z, 0, "ONLY");
240         
241         x = 9 * TMath::Sin(angle/2+is * angle);
242         y = 9 * TMath::Cos(angle/2+is * angle);
243
244         gMC->Gspos ("0INS", is + 25, "0STL", x, y, z, 0, "ONLY");
245                 
246       } 
247    
248       
249    x=0;
250    y=0;
251    z=-pinstart[2]+ppmt[2]+2.*psupport6[2]+0.1;
252    gMC->Gspos("0PMT",1,"0INS",x,y,z,0,"ONLY");
253    z=z+pdivider[2]+ppmt[2];
254    gMC->Gspos("0DIV",1,"0INS",x,y,z,0,"ONLY");
255    
256    // PMT
257    
258    // Entry window (glass)
259    gMC->Gsvolu("0TOP","TUBE",idtmed[kOpGlass],ptop,3); //glass
260    //   gMC->Gsvolu("0TOP","TUBE",idtmed[12],ptop,3); //lucite
261    z=-ppmt[2]+ptop[2];
262    gMC->Gspos("0TOP",1,"0PMT",0,0,z,0,"ONLY");
263    
264    //Fotokatod
265    
266    gMC->Gsvolu ("0REG", "TUBE", idtmed[kOpGlass], preg, 3); //photocathode dobavil bogdanov(AliT0v2)
267    z = -ppmt[2] + 2 * ptop[2] + preg[2]; //photocathode dobavil bogdanov 
268    gMC->Gspos ("0REG", 1, "0PMT", 0, 0, z, 0, "ONLY"); //photocathode dobavil bogdanov(AliT0v2)
269    
270    // Bottom glass
271    gMC->Gsvolu("0BOT","TUBE",idtmed[kGlass],pbot,3);
272    z=ppmt[2]-pbot[2];
273    AliDebugClass(1,Form(" Z bottom %f\n",z));
274    gMC->Gspos("0BOT",1,"0PMT",0,0,z,0,"ONLY");
275    // Side cylinder glass
276    gMC->Gsvolu("0OUT","TUBE",idtmed[kGlass],pglass,3);
277    z=ppmt[2]-pglass[2];
278    gMC->Gspos("0OUT",1,"0PMT",0,0,z,0,"ONLY");
279    //PMT electrodes support structure
280    gMC->Gsvolu("0CER","TUBE",idtmed[kCer],pcer,3);
281    gMC->Gsvolu("0STE","TUBE",idtmed[kSteel],psteel,3);
282    z=-ppmt[2]+2*ptop[2]+0.3;;
283    for (is=1; is<=15; is++)
284      {
285        z=z+psteel[2]+pcer[2];
286        gMC->Gspos("0CER",is,"0PMT",0,0,z,0,"ONLY");
287        z=z+psteel[2]+pcer[2];
288        gMC->Gspos("0STE",is,"0PMT",0,0,z,0,"ONLY");
289      }
290    
291    // Divider
292    // Knob at the bottom of PMT baloon
293    
294    gMC->Gsvolu("0NB","TUBE",idtmed[6],pknob,3);
295    z=-pdivider[2]+pknob[2];
296    gMC->Gspos("0NB",1,"0DIV",0,0,z,0,"ONLY");
297    gMC->Gsvolu("0KB","TUBE",idtmed[kGlass],pknob_bot,3);
298    z=-pdivider[2]+2*pknob[2]+pknob_bot[2];
299    gMC->Gspos("0KB",1,"0DIV ",0,0,z,0,"ONLY");
300    gMC->Gsvolu("0VAC","TUBE",idtmed[kVac],pknob_vac,3);
301    z=-pdivider[2]+pknob_vac[2];
302    gMC->Gspos("0VAC",1,"0DIV",0,0,z,0,"ONLY");
303    //Steel pins + pin holes
304    gMC->Gsvolu("0PIN","TUBE",idtmed[kSteel],ppins,3);
305    z=-pdivider[2]+ppins[2];
306    gMC->Gspos("0PIN",1,"0DIV",0,0,z,0,"ONLY");
307    gMC->Gsvolu("0HOL","TUBE",idtmed[kBrass],phole,3);
308    z=-pdivider[2]+2*ppins[2]+phole[2];
309    gMC->Gspos("0HOL",1,"0DIV",0,0,z,0,"ONLY");
310    
311    //Socket
312    gMC->Gsvolu("0V1","TUBE",idtmed[kCer],pdiv1,3);
313    z=-pdivider[2]+pdiv1[2];
314    gMC->Gspos("0V1",1,"0DIV",0,0,z,0,"ONLY");
315    //Resistors
316    gMC->Gsvolu("0V2","TUBE",idtmed[kAir],pdiv2,3);
317    z=pdivider[2]-pdiv2[2];
318    gMC->Gspos("0V2",1,"0DIV",0,0,z,0,"ONLY");
319    gMC->Gsvolu("0RS","TUBE",idtmed[kCer],presist,3);
320    z=-pdiv2[2]+presist[2];
321    gMC->Gspos("0RS",1,"0V2",0,0,z,0,"ONLY");
322    gMC->Gsvolu("0RB","TUBE",idtmed[kRibber],pribber,3);
323    z=pdiv2[2]-pribber[2];
324    gMC->Gspos("0RB",1,"0V2",0,0,z,0,"ONLY");
325    
326    
327    //Support  left side
328    /*   
329    z=-pstart[2]+psupport1[2];
330    gMC->Gspos("0SU1",2,"0STL",0,0,z,0,"ONLY"); //C kozhuh snaruzhi
331    gMC->Gspos("0SU2",2,"0STL",0,0,z,0,"ONLY"); //C kozhuh vnutri
332    z=-pstart[2]+psupport3[2];
333    gMC->Gspos("0SU3",2,"0STL",0,0,z,0,"ONLY"); //peredniaia kryshka
334    z=-pstart[2]+2.*psupport1[2];
335    gMC->Gspos("0SU4",2,"0STL",0,0,z,0,"MANY"); //zadnaiai kryshka
336    */
337    z=-pstart[2]+psupport1[2]+0.1;
338    gMC->Gspos("0SU1",1,"0STR",0,0,z,0,"ONLY"); //C kozhuh snaruzhi
339    gMC->Gspos("0SU2",1,"0STR",0,0,z,0,"ONLY"); //C kozhuh vnutri
340    z=-pstart[2]+psupport3[2]+0.1;
341    gMC->Gspos("0SU3",1,"0STR",0,0,z,0,"ONLY"); //peredniaia kryshka
342    z=-pstart[2]+2.*psupport1[2]+0.1;
343    gMC->Gspos("0SU4",1,"0STR",0,0,z,0,"MANY"); //zadnaiai kryshka
344    gMC->Gspos("0SU6",1,"0INS",0,0,0,0,"ONLY");//C stakanchik dlia feu 
345    z=-pinstart[2]+psupport6[2];
346    gMC->Gspos("0SU7",1,"0INS",0,0,z,0,"ONLY"); //Al kryshechka 
347    
348    z=pinstart[2]-psupport7[2];
349    gMC->Gspos("0SU8",1,"0INS",0,0,z,0,"ONLY"); //Al kolechko
350    
351    
352    Float_t par[3];
353    par[0]=4.4;
354    par[1]=4.5;
355    par[2]=0.5;
356    gMC->Gsvolu("0SC0","TUBE",idtmed[kC],par,3);
357    z=ppcon[3]+par[2];
358    gMC->Gspos("0SC0",1,"0SUP",0,0,z,0,"ONLY"); 
359    z += par[2];
360    par[0]=4.4;
361    par[1]=5.1;
362    par[2]=0.05;
363    gMC->Gsvolu("0SC1","TUBE",idtmed[kC],par,3);
364    z += par[2];
365    gMC->Gspos("0SC1",1,"0SUP",0,0,z,0,"ONLY"); 
366    z=z+par[2];
367    par[0]=4.9;
368    par[1]=5.0;
369    par[2]=6.9/2;
370     gMC->Gsvolu("0SC2","TUBE",idtmed[kC],par,3);
371     z += par[2];
372     gMC->Gspos("0SC2",1,"0SUP",0,0,z,0,"ONLY"); 
373     z += par[2];
374     /*
375     Float_t parC[5];
376     parC[0]=0.25;
377     parC[1]=5.1;
378     parC[2]=5.2;
379     parC[3]=5.5;
380     parC[4]=5.6;
381     gMC->Gsvolu("0SC3","CONE",idtmed[kC],parC,5);
382     z += parC[0];
383     gMC->Gspos("0SC3",1,"0SUP",0,0,z,0,"ONLY"); 
384     z += parC[0];
385     par[0]=5.5;
386     par[1]=5.6;
387     par[2]=1.2/2;
388     gMC->Gsvolu("0SC4","TUBE",idtmed[kC],par,3);
389     z += par[2];
390     gMC->Gspos("0SC4",1,"0SUP",0,0,z,0,"ONLY"); 
391     par[0]=5.1;
392     par[1]=5.5;
393     par[2]=1.2/2;
394     gMC->Gsvolu("0SA0","TUBE",idtmed[kAl],par,3);
395     gMC->Gspos("0SA0",1,"0SUP",0,0,z,0,"ONLY"); 
396     //gvozdi dlia skruchivaniia Al i C parts
397     par[0]=5.75; 
398     par[1]=5.78;
399     gMC->Gsvolu("0SN1","TUBE",idtmed[kSteel],par,3);
400     gMC->Gspos("0SN1",1,"0SUP",0,0,z,0,"ONLY"); 
401     z += par[2];
402     */
403     par[0]=3.15;
404     par[1]=4.9;
405     par[2]=0.1/2;
406     gMC->Gsvolu("0SA1","TUBE",idtmed[kAl],par,3);
407     
408     z += par[2];
409     gMC->Gspos("0SA1",1,"0SUP",0,0,z,0,"ONLY"); 
410     z=z+par[2];
411     par[0]=3.15;
412     par[1]=3.16;
413     par[2]=4.5/2;
414     gMC->Gsvolu("0SA2","TUBE",idtmed[kAl],par,3);
415     z += par[2];
416     gMC->Gspos("0SA2",1,"0SUP",0,0,z,0,"ONLY"); 
417     z=z+par[2];
418     par[0]=3.16; // eta chast' prikruchena k absorberu
419     par[1]=7.5;
420     par[2]=0.2;
421     gMC->Gsvolu("0SA3","TUBE",idtmed[kAl],par,3);
422     z += par[2];
423     gMC->Gspos("0SA3",1,"0SUP",0,0,z,0,"ONLY"); 
424     par[0]=3.16; // gvozdi eta chast' prikruchena k absorberu
425     par[1]=7.5;
426     par[2]=0.01;
427     gMC->Gsvolu("0SN2","TUBE",idtmed[kSteel],par,3);
428     gMC->Gspos("0SN2",1,"0SUP",0,0,z,0,"ONLY"); 
429     
430  
431 }    
432
433 //------------------------------------------------------------------------
434 void AliT0v0::CreateMaterials()
435 {
436    Int_t isxfld   = gAlice->Field()->Integ();
437    Float_t sxmgmx = gAlice->Field()->Max();
438    Float_t a,z,d,radl,absl,buf[1];
439    Int_t nbuf;
440
441 // Scintillator CH
442    Float_t ascin[2]={1.01,12.01};
443    Float_t zscin[2]={1,6};
444    Float_t wscin[2]={1,1};
445    Float_t denscin=1.03;
446 //Lucite C(CH3)CO2CH3
447    Float_t alucite[3]={1.01,12.01,15.999};
448    Float_t zlucite[3]={1,6,8};
449    Float_t wlucite[3]={8,5,2};
450    Float_t denlucite=1.16;
451  // PMT glass SiO2
452    Float_t aglass[2]={28.0855,15.9994};
453    Float_t zglass[2]={14.,8.};
454    Float_t wglass[2]={1.,2.};
455    Float_t dglass=2.65;
456 // Ceramic   97.2% Al2O3 , 2.8% SiO2
457    Float_t acer[2],zcer[2],wcer[2]={0.972,0.028};
458    Float_t aal2o3[2]  = { 26.981539,15.9994 };
459    Float_t zal2o3[2]  = { 13.,8. };
460    Float_t wal2o3[2]  = { 2.,3. };
461    Float_t denscer  = 3.6;
462
463 // Brass 80% Cu, 20% Zn
464    Float_t abrass[2] = {63.546,65.39};
465    Float_t zbrass[2] = {29,30};
466    Float_t wbrass[2] = {0.8,0.2};
467    Float_t denbrass=8.96;
468
469 //Ribber C6H12S
470    Float_t aribber[3] = {12.,1.,32.};
471    Float_t zribber[3] = {6.,1.,16.};
472    Float_t wribber[3] = {6.,12.,1.};
473    Float_t denribber=0.8;
474 // Support inside 
475    Float_t asupport[2] = {12.,1.};
476    Float_t zsupport[2] = {6.,1.};
477    Float_t wsupport[2] = {1.,1.};
478    Float_t densupport=0.1;
479 // AIR
480    Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
481    Float_t zAir[4]={6.,7.,8.,18.};
482    Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
483    Float_t dAir = 1.20479E-3;
484      
485 //*** Definition Of avaible T0 materials ***
486    AliMaterial(0, "T0 Steel$", 55.850,26.,7.87,1.76,999);
487    AliMaterial(1, "T0 Vacuum$", 1.e-16,1.e-16,1.e-16,1.e16,999);
488    AliMixture(2, "T0 Air$", aAir, zAir, dAir,4,wAir);
489
490    AliMaterial(10, "CarbonPlastic$", 12.01, 6.0, 2.26, 18.8,999); 
491    AliMaterial(11, "Aliminium$", 26.98, 13.0, 2.7, 8.9,999); 
492
493    AliMixture( 3, "Al2O3   $", aal2o3, zal2o3, denscer, -2, wal2o3);
494    AliMixture( 4, "PMT glass   $",aglass,zglass,dglass,-2,wglass);
495    char namate[21]="";
496    gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
497    acer[0]=a;
498    zcer[0]=z;
499    gMC->Gfmate((*fIdmate)[4], namate, a, z, d, radl, absl, buf, nbuf);
500    acer[1]=a;
501    zcer[1]=z;
502    
503    AliMixture( 9, "Ceramic    $", acer, zcer, denscer, 2, wcer);
504    AliMixture( 5, "Scintillator$",ascin,zscin,denscin,-2,wscin);
505    AliMixture( 6, "Brass    $", abrass, zbrass, denbrass, 2, wbrass);
506    
507    AliMixture( 7, "Ribber $",aribber,zribber,denribber,-3,wribber);
508    AliMixture( 8, "Lucite$",alucite,zlucite,denlucite,-3,wlucite);
509    AliMixture( 9, "Penoplast$",asupport,zsupport,densupport,-2,wsupport);
510  
511    
512    AliMedium(1, "T0 Air$", 2, 0, isxfld, sxmgmx, 10., .1, 1., .003, .003);
513    AliMedium(2, "Scintillator$", 5, 1, isxfld, sxmgmx, 10., .01, 1., .003, .003);
514    AliMedium(3, "Vacuum$", 1, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003);
515    AliMedium(4, "Ceramic$", 9, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003);
516    AliMedium(6, "Glass$", 4, 1, isxfld, sxmgmx, 10., .01, .1, .003, .003);
517    AliMedium(8, "Steel$", 0, 0, isxfld, sxmgmx, 1., .001, 1., .001, .001);
518    AliMedium(9, "Ribber  $", 7, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003);
519    AliMedium(11, "Brass  $", 6, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003);
520    AliMedium(12, "Lucite$", 8, 1, isxfld, sxmgmx, 10., .01, 1., .003, .003);  
521    AliMedium(13, "CarbonPlastic$", 10, 0, isxfld, sxmgmx, 10., .01, 1., .003, .003);  
522    AliMedium(14, "PenoPlast$", 9, 0, isxfld, sxmgmx, 10., .01, 1., .003, .003);  
523    AliMedium(15, "Aluminium$", 11, 0, isxfld, sxmgmx, 10., .01, 1., .003, .003);  
524
525    AliDebugClass(1,": ++++++++++++++Medium set++++++++++");
526
527 }
528 //---------------------------------------------------------------------
529 void AliT0v0::DrawModule() const
530 {
531 //
532 // Draw a shaded view of the Forward multiplicity detector version 0
533 //
534   
535   //Set ALIC mother transparent
536   gMC->Gsatt("ALIC","SEEN",0);
537   //
538   //Set volumes visible
539   gMC->Gsatt("0STA","SEEN",0);
540   gMC->Gsatt("0PMT","SEEN",1);
541   gMC->Gsatt("0DIV","SEEN",1);
542   //
543   gMC->Gdopt("hide","on");
544   gMC->Gdopt("shad","on");
545   gMC->SetClipBox(".");
546   gMC->SetClipBox("*",0,1000,-1000,1000,-1000,1000);
547   gMC->DefaultRange();
548   gMC->Gdraw("alic",40,30,0,12,9.5,.7,0.7);
549   gMC->Gdhead(1111,"T-Zero detector");
550   gMC->Gdopt("hide","off");
551 }
552
553 //-------------------------------------------------------------------
554 void AliT0v0::Init()
555 {
556 // Initialises version 0 of the Forward Multiplicity Detector
557 //
558 //Int_t *idtmed  = gAlice->Idtmed();
559   AliT0::Init();
560   fIdSens1=gMC->VolId("0TOP");
561   AliDebug(1,Form("%s: *** T0 version 0 initialized ***\n",ClassName()));
562   
563 }
564
565 //-------------------------------------------------------------------
566
567 void AliT0v0::StepManager()
568 {
569   //
570   // Called for every step in the T0 Detector
571   // See AliT0v1
572
573 }
574 //---------------------------------------------------------------------
575
576
577
578
579
580
581
582
583
584