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