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