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