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