]> git.uio.no Git - u/mrichter/AliRoot.git/blame - START/AliSTARTv1.cxx
geometry 12 + 24 && recent media properties
[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
88cb7938 30#include <Riostream.h>
31#include <stdlib.h>
32
bc46b572 33#include <TGeometry.h>
0cc62300 34#include <TLorentzVector.h>
88cb7938 35#include <TMath.h>
36#include <TNode.h>
37#include <TTUBE.h>
38#include <TVirtualMC.h>
bc46b572 39
e4da63c2 40#include "AliLog.h"
94de3818 41#include "AliMagF.h"
88cb7938 42#include "AliRun.h"
bc46b572 43#include "AliSTARThit.h"
88cb7938 44#include "AliSTARTv1.h"
5d12ce38 45#include "AliMC.h"
bc46b572 46
47ClassImp(AliSTARTv1)
48
49//--------------------------------------------------------------------
50AliSTARTv1::AliSTARTv1(const char *name, const char *title):
51 AliSTART(name,title)
52{
53 //
54 // Standart constructor for START Detector version 0
55 //
56 fIdSens1=0;
e4da63c2 57 fIshunt = 2;
bc46b572 58// setBufferSize(128000);
59}
60//-------------------------------------------------------------------------
61void AliSTARTv1::CreateGeometry()
62{
63 //
64 // Create the geometry of START Detector version 0
65 //
66 // begin Html
67 /*
68 <img src="gif/AliSTARTv0.gif">
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
304618a5 79 Float_t pstartR[18]={0., 360., 5.,
80 -76.5+0.00+69.7, 4.25, 10.,
81 -76.5+6.05+69.7, 4.5, 10.,
82 -76.5+8.05+69.7, 4.5, 10.,
83 -76.5+8.05+69.7, 5.1, 10.,
84 -62.9+0.00+69.7, 5.1, 10.};
85
e4da63c2 86 Float_t pstart[3]={4.3, 12.,6.8};
d65c9254 87 Float_t pinstart[3]={0.,1.6,6.5};
e4da63c2 88 Float_t ppmt[3]={0.,1.5,3.5};
60b0465d 89
2303c85c 90 Float_t preg[3]={0., 1.0, 0.005}; //photcathode dobavil bogdanov
60b0465d 91
bc46b572 92 Float_t pdivider[3]={0.,1.2,1.75};
93 Float_t pdiv2[3]={0.,1.2,1.25};
94 Float_t pdiv1[3]={0.6,1.2,0.5};
2303c85c 95 // Float_t ptop[3]={0.,1.0,1.5};
96 Float_t ptop[3]={0., 1.0, 1.5};
bc46b572 97 Float_t pbot[3]={0.6,1.2,0.1};
98 Float_t pglass[3]={1.2,1.3,2.};
99 Float_t pcer[3]={0.9,1.1,0.09};
100 Float_t psteel[3]={0.9,1.1,0.01};
101 Float_t ppins[3]={0.6,1.2,0.014};
102 Float_t phole[3]={0.6,1.2,0.015};
103 Float_t pknob[3]={0.5,0.6,0.4};
104 Float_t pknob_vac[3]={0.,0.5,0.4};
105 Float_t pknob_bot[3]={0.,0.6,0.05};
106 Float_t pribber[3] = {0.,1.2,2.413/2.};
107 Float_t presist[3] = {0.,1.2,0.087/2.};
304618a5 108 Float_t psupport1[3] = {4.51,4.6,4.0};//C kozhuh vnutri
d65c9254 109 Float_t psupport2[3] = {9.4,9.5,4.0};// snaruzhi C
304618a5 110 Float_t psupport3[3] = {4.51,9.5,0.05};//kryshki C
2303c85c 111 Float_t psupport5[3] = {1.44,1.5,6.5}; // stakanchik dlai feu C
69b30e0f 112 Float_t psupport6[3] = {0,1.5,0.05}; //kryshechka stakanchika Al
d65c9254 113 Float_t psupport7[3] = {1.5,1.6,0.6}; //kolechko snaruzhu stakanchika Al
114 // Mother Volume katushka dlia krepezha vokrug truby k Absorbru
2ad713c4 115 AliMatrix(idrotm[901], 90., 0., 90., 90., 180., 0.);
d65c9254 116 Float_t ppcon[70];
117 ppcon[0] = 0;
118 ppcon[1] = 360;
304618a5 119 ppcon[2] = 13;
d65c9254 120// 1:
121 ppcon[3] = 14.1/2;
122 ppcon[4] = 4.4;
304618a5 123 ppcon[5] = 4.5;
d65c9254 124// 2
304618a5 125 ppcon[6] = ppcon[3]+1.;
d65c9254 126 ppcon[7] = 4.4;
304618a5 127 ppcon[8] = 4.5;
d65c9254 128// 3
129 ppcon[9] = ppcon[6];
130 ppcon[10] = 4.4;
304618a5 131 ppcon[11] = 5.1;
d65c9254 132
133// 4
134
135 ppcon[12] = ppcon[9]+0.1;
136 ppcon[13] = 4.4;
304618a5 137 ppcon[14] = 5.1;
d65c9254 138// 5
139
140 ppcon[15] = ppcon[12];
304618a5 141 ppcon[16] = 4.9;
142 ppcon[17] = 5.1;
d65c9254 143
144// 6
304618a5 145 ppcon[18] = ppcon[15]+7.05;
146 ppcon[19] = 4.9;
147 ppcon[20] = 5.1;
d65c9254 148
149// 7
150 ppcon[21] = ppcon[18];
304618a5 151 ppcon[22] = 4.9;
152 ppcon[23] = 5.1;
153
304618a5 154/// 8
affef71b 155 ppcon[24] = ppcon[21]+0.01;
304618a5 156 ppcon[25] = 3.15;
157 ppcon[26] = 3.25;
d65c9254 158
affef71b 159/// 9
160 ppcon[27] = ppcon[24];
50063378 161 ppcon[28] = 3.15;
304618a5 162 ppcon[29] = 3.25;
affef71b 163
d65c9254 164// 10
affef71b 165 ppcon[30] = ppcon[27]+4.5;
d65c9254 166 ppcon[31] = 3.15;
304618a5 167 ppcon[32] = 3.25;
168
d65c9254 169// 11
affef71b 170 ppcon[33] = ppcon[30];
d65c9254 171 ppcon[34] = 3.15;
affef71b 172 ppcon[35] = 3.25;
304618a5 173
d65c9254 174// 12
affef71b 175 ppcon[36] = ppcon[33];
d65c9254 176 ppcon[37] = 3.15;
304618a5 177 ppcon[38] = 7.6;
178
d65c9254 179// 13
affef71b 180 ppcon[39] = ppcon[33]+0.4;
d65c9254 181 ppcon[40] = 3.15;
304618a5 182 ppcon[41] = 7.6;
183
affef71b 184// 14
185// ppcon[39] = ppcon[36];
186// ppcon[40] = 3.15;
187// ppcon[41] = 7.6;
188
304618a5 189 gMC->Gsvolu("0SUP", "PCON", idtmed[kAir], ppcon,42);
2ad713c4 190 z=-69.7;//-14.1/2;
191 gMC->Gspos("0SUP",1,"ALIC",0.,0.,z,idrotm[901],"ONLY");
bc46b572 192
50063378 193
194 Float_t zdetRight=69.7,zdetLeft=350;
bc46b572 195 //-------------------------------------------------------------------
196 // START volume
197 //-------------------------------------------------------------------
198
bc46b572 199
304618a5 200 gMC->Gsvolu("0STR","PCON",idtmed[kAir],pstartR,18);
d65c9254 201 gMC->Gsvolu("0STL","TUBE",idtmed[kAir],pstart,3);
2ad713c4 202 gMC->Gspos("0STR",1,"ALIC",0.,0.,-zdetRight-pstart[2],idrotm[901],"ONLY");
203 gMC->Gspos("0STL",1,"ALIC",0.,0.,zdetLeft+pstart[2],0,"ONLY");
bc46b572 204
205//START interior
d65c9254 206 gMC->Gsvolu("0INS","TUBE",idtmed[kAir],pinstart,3);
e4da63c2 207 gMC->Gsvolu("0PMT","TUBE",idtmed[kOpAir],ppmt,3);
d65c9254 208 gMC->Gsvolu("0DIV","TUBE",idtmed[kVac],pdivider,3);
209 gMC->Gsvolu("0SU1","TUBE",idtmed[kC],psupport1,3);//C kozhuh vnutri
210 gMC->Gsvolu("0SU2","TUBE",idtmed[kC],psupport2,3);// snaruzhi C
211 gMC->Gsvolu("0SU3","TUBE",idtmed[kC],psupport3,3);//kryshka perednaiai C
212 gMC->Gsvolu("0SU4","TUBE",idtmed[kC],psupport3,3);//kryshka zadnaiai C
e4da63c2 213 // gMC->Gsvolu("0SU5","TUBE",idtmed[kAir],psupport4,3);// dyrki dlia feu v zadnej kryshke Air
d65c9254 214 gMC->Gsvolu("0SU6","TUBE",idtmed[kC],psupport5,3);// stakanchik dlai feu C
215 gMC->Gsvolu("0SU7","TUBE",idtmed[kAl],psupport6,3);//kryshechka stakanchika Al
216 gMC->Gsvolu("0SU8","TUBE",idtmed[kAl],psupport7,3);//kolechko snaruzhu stakanchika Al
217
bc46b572 218// first ring: 12 units of Scintillator+PMT+divider
d65c9254 219 Float_t theta = (180 / TMath::Pi()) * TMath::ATan(6.5 / zdetRight);
2303c85c 220 printf(" theta %f", theta);
e4da63c2 221 Float_t angle = 2 * TMath::Pi() / 12;
d65c9254 222 Float_t phi[3];
304618a5 223
d65c9254 224 for (is=0; is<12; is++)
bc46b572 225 {
ef51244a 226
e4da63c2 227 x = 6.5 * TMath::Sin(is * angle);
228 y = 6.5 * TMath::Cos(is * angle);
d65c9254 229
60b0465d 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;
d65c9254 235
60b0465d 236 AliMatrix (idrotm[902 + is], 90., phi[0],
237 90. + theta, phi[1],
238 theta, phi[2]);
d65c9254 239 z=-pstart[2]+pinstart[2]+0.2;
60b0465d 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");
2303c85c 242
243 x = 9. * TMath::Sin(angle/2+is * angle);
244 y = 9. * TMath::Cos(angle/2+is * angle);
e4da63c2 245
246 gMC->Gspos ("0INS", is + 25, "0STL", x, y, z, 0, "ONLY");
2303c85c 247
9436d88b 248 }
60b0465d 249
bc46b572 250
60b0465d 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");
304618a5 257
60b0465d 258 // PMT
259
260 // Entry window (glass)
e4da63c2 261 gMC->Gsvolu("0TOP","TUBE",idtmed[kOpGlass],ptop,3); //glass
60b0465d 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");
60b0465d 265
266 //Fotokatod
267
e4da63c2 268 gMC->Gsvolu ("0REG", "TUBE", idtmed[kOpGlass], preg, 3); //photocathode dobavil bogdanov(AliSTARTv2)
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(AliSTARTv2)
60b0465d 271
272 // Bottom glass
273 gMC->Gsvolu("0BOT","TUBE",idtmed[kGlass],pbot,3);
274 z=ppmt[2]-pbot[2];
275 if(fDebug) printf("%s: Z bottom %f\n",ClassName(),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];
60b0465d 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;;
60b0465d 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];
60b0465d 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];
60b0465d 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];
60b0465d 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
e4da63c2 330 /*
60b0465d 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];
e4da63c2 337 gMC->Gspos("0SU4",2,"0STL",0,0,z,0,"MANY"); //zadnaiai kryshka
338 */
60b0465d 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;
e4da63c2 345 gMC->Gspos("0SU4",1,"0STR",0,0,z,0,"MANY"); //zadnaiai kryshka
60b0465d 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;
d65c9254 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];
304618a5 376 /*
d65c9254 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];
e4da63c2 387 par[0]=5.5;
d65c9254 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];
304618a5 404 */
d65c9254 405 par[0]=3.15;
304618a5 406 par[1]=4.9;
407 par[2]=0.1/2;
d65c9254 408 gMC->Gsvolu("0SA1","TUBE",idtmed[kAl],par,3);
304618a5 409
d65c9254 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;
304618a5 415 par[2]=4.5/2;
d65c9254 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;
304618a5 422 par[2]=0.2;
d65c9254 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");
304618a5 431
d65c9254 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;
60b0465d 441 Int_t *idtmed = fIdtmed->GetArray();
442
443// AIR
444
445 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
446 Float_t zAir[4]={6.,7.,8.,18.};
447 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
448 Float_t dAir = 1.20479E-3;
449
bc46b572 450// Scintillator CH
451 Float_t ascin[2]={1.01,12.01};
452 Float_t zscin[2]={1,6};
453 Float_t wscin[2]={1,1};
454 Float_t denscin=1.03;
a94466c5 455//Lucite C(CH3)CO2CH3
456 Float_t alucite[3]={1.01,12.01,15.999};
457 Float_t zlucite[3]={1,6,8};
458 Float_t wlucite[3]={8,5,2};
459 Float_t denlucite=1.16;
460 // PMT glass SiO2
bc46b572 461 Float_t aglass[2]={28.0855,15.9994};
462 Float_t zglass[2]={14.,8.};
463 Float_t wglass[2]={1.,2.};
464 Float_t dglass=2.65;
465// Ceramic 97.2% Al2O3 , 2.8% SiO2
466 Float_t acer[2],zcer[2],wcer[2]={0.972,0.028};
e4da63c2 467 Float_t aCeramic[2] = { 26.981539,15.9994 };
468 Float_t zCeramic[2] = { 13.,8. };
469 Float_t wCeramic[2] = { 2.,3. };
bc46b572 470 Float_t denscer = 3.6;
471
472// Brass 80% Cu, 20% Zn
473 Float_t abrass[2] = {63.546,65.39};
474 Float_t zbrass[2] = {29,30};
475 Float_t wbrass[2] = {0.8,0.2};
476 Float_t denbrass=8.96;
477
478//Ribber C6H12S
479 Float_t aribber[3] = {12.,1.,32.};
480 Float_t zribber[3] = {6.,1.,16.};
481 Float_t wribber[3] = {6.,12.,1.};
482 Float_t denribber=0.8;
d65c9254 483// Support inside
484 Float_t asupport[2] = {12.,1.};
485 Float_t zsupport[2] = {6.,1.};
486 Float_t wsupport[2] = {1.,1.};
487 Float_t densupport=0.1;
bc46b572 488
489//*** Definition Of avaible START materials ***
490 AliMaterial(0, "START Steel$", 55.850,26.,7.87,1.76,999);
491 AliMaterial(1, "START Vacuum$", 1.e-16,1.e-16,1.e-16,1.e16,999);
60b0465d 492 AliMixture(2, "START Air$", aAir, zAir, dAir,4,wAir);
d65c9254 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);
bc46b572 495
e4da63c2 496 AliMixture( 3, "Ceramic $",aCeramic, zCeramic, denscer, -2, wCeramic);
bc46b572 497 AliMixture( 4, "PMT glass $",aglass,zglass,dglass,-2,wglass);
00d6d986 498 char namate[21]="";
bc46b572 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;
60b0465d 505
bc46b572 506
507 AliMixture( 9, "Ceramic $", acer, zcer, denscer, 2, wcer);
508 AliMixture( 5, "Scintillator$",ascin,zscin,denscin,-2,wscin);
509 AliMixture( 6, "Brass $", abrass, zbrass, denbrass, 2, wbrass);
bc46b572 510 AliMixture( 7, "Ribber $",aribber,zribber,denribber,-3,wribber);
a94466c5 511 AliMixture( 8, "Lucite$",alucite,zlucite,denlucite,-3,wlucite);
d65c9254 512 AliMixture( 9, "Penoplast$",asupport,zsupport,densupport,-2,wsupport);
bc46b572 513
ef51244a 514 AliMedium(1, "START 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);
d65c9254 518 AliMedium(6, "Glass$", 4, 1, isxfld, sxmgmx, 10., .01, .1, .003, .003);
ef51244a 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);
a94466c5 522 AliMedium(12, "Lucite$", 8, 1, isxfld, sxmgmx, 10., .01, 1., .003, .003);
d65c9254 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);
e4da63c2 526 AliMedium(16, "OpticalGlass$", 4, 1, isxfld, sxmgmx, 10., .01, .1, .003, .003);
527 AliMedium(17, "START OpAir$", 2, 0, isxfld, sxmgmx, 10., .1, 1., .003, .003);
528
a94466c5 529
e4da63c2 530// Definition Cherenkov parameters
531 int i;
2303c85c 532 // const Int_t kNbins=30;
533 const Int_t kNbins=27;
e4da63c2 534
2303c85c 535 // Float_t aPckov[kNbins];
e4da63c2 536 Float_t aRindexSiO2[kNbins], rindexAir[kNbins], efficAll[kNbins], absorAir[kNbins];
2303c85c 537
538 // quartz 20mm
539 Float_t aAbsSiO2[kNbins]={28.3, 27.7, 27.3, 26.7, 26.4,
540 25.9, 25.3, 24.9, 24.5, 23.7, 23.2,
541 22.8, 22.4, 21.8, 21.3, 22.8,
542 22.1, 21.7, 21.2, 20.5, 19.9,
543 19.3, 18.7, 18.0, 17.1, 16.3, 15.3 };
e4da63c2 544
2303c85c 545 Float_t aPckov[kNbins] ={4.02, 4.11, 4.19, 4.29, 4.38,
546 4.48, 4.58, 4.69, 4.81, 4.93,
547 5.05, 5.19, 5.33, 5.48, 5.63,
548 5.8, 5.97, 6.16, 6.36, 6.57,
549 6.8, 7.04, 7.3, 7.58, 7.89, 8.22, 8.57};
550
551 // Float_t aAbsSiO2[kNbins];
e4da63c2 552 for(i=0;i<kNbins;i++)
553 {
2303c85c 554 // aPckov[i]=(0.1*i+5.5)*1e-9;//Photons energy bins 5.5 eV - 8.5 eV step 0.1 eV
555 aPckov[i]=aPckov[i]*1e-9;//Photons energy bins 4 eV - 8.5 eV step 0.1 eV
e4da63c2 556 aRindexSiO2[i]=1.458; //refractive index for qwarts
557 rindexAir[i]=1.;
558 efficAll[i]=1.;
2303c85c 559 // aAbsSiO2[i]=28.5; //quartz 30mm
e4da63c2 560 absorAir[i]=1.e-5;
561 }
562
563 gMC->SetCerenkov (idtmed[kOpGlass], kNbins, aPckov, aAbsSiO2, efficAll, aRindexSiO2 );
2303c85c 564 gMC->SetCerenkov (idtmed[kOpAir], kNbins , aPckov, absorAir, efficAll, rindexAir);
9e1a0ddb 565 if(fDebug) cout<<ClassName()<<": ++++++++++++++Medium set++++++++++"<<endl;
bc46b572 566
bc46b572 567}
568//---------------------------------------------------------------------
569void AliSTARTv1::DrawDetector()
570{
571//
572// Draw a shaded view of the Forward multiplicity detector version 0
573//
574
575 //Set ALIC mother transparent
576 gMC->Gsatt("ALIC","SEEN",0);
577 //
578 //Set volumes visible
e4da63c2 579 // gMC->Gsatt("0STR","SEEN",0);
580 // gMC->Gsatt("0INS","SEEN",0);
581 // gMC->Gsatt("0PMT","SEEN",1);
582 // gMC->Gsatt("0DIV","SEEN",1);
bc46b572 583 //
d65c9254 584 gMC->Gdopt("hide","off");
bc46b572 585 gMC->Gdopt("shad","on");
586 gMC->SetClipBox(".");
587 gMC->SetClipBox("*",0,1000,-1000,1000,-1000,1000);
588 gMC->DefaultRange();
affef71b 589 gMC->Gdraw("alic",90,0,0,-35,9.5,.6,0.6);
60b0465d 590 //gMC->Gdraw("alic",0,0,0,10,9.5,.8,0.8); //other side view
bc46b572 591 gMC->Gdhead(1111,"T-Zero detector");
592 gMC->Gdopt("hide","off");
593}
594
595//-------------------------------------------------------------------
596void AliSTARTv1::Init()
597{
598// Initialises version 0 of the Forward Multiplicity Detector
599//
600//Int_t *idtmed = gAlice->Idtmed();
601 AliSTART::Init();
60b0465d 602 fIdSens1=gMC->VolId("0REG");
e4da63c2 603
604 AliDebug(1,Form("%s: *** START version 1 initialized ***\n",ClassName()));
605
bc46b572 606}
607
608//-------------------------------------------------------------------
609
610void AliSTARTv1::StepManager()
611{
612 //
613 // Called for every step in the START Detector
614 //
615 Int_t id,copy,copy1;
e4da63c2 616 static Float_t hits[6];
bc46b572 617 static Int_t vol[2];
618 TLorentzVector pos;
619
620 TClonesArray &lhits = *fHits;
621
622 if(!gMC->IsTrackAlive()) return; // particle has disappeared
60b0465d 623
624// If particles is photon then ...
625
626 if (gMC->TrackPid() == 50000050)
e4da63c2 627 {
628 id=gMC->CurrentVolID(copy);
629
630
631 // Check the sensetive volume
632 if(id==fIdSens1 ) {
633 if(gMC->IsTrackEntering()) {
634 gMC->CurrentVolOffID(2,copy);
635 vol[1]=copy;
636 gMC->CurrentVolOffID(3,copy1);
637 vol[0]=copy1;
e4da63c2 638 gMC->TrackPosition(pos);
639 hits[0] = pos[0];
640 hits[1] = pos[1];
641 hits[2] = pos[2];
2303c85c 642 // printf(" pmt %i ", vol[1]);
643 // printf(" x %f y %f z %f \n", pos[0],pos[1],pos[2]);
e4da63c2 644 if(pos[2]<0) vol[0]=2;
645 if(pos[2]>=0) vol[0]=1;
646
647 Float_t etot=gMC->Etot();
648 hits[3]=etot;
649 Int_t iPart= gMC->TrackPid();
650 Int_t partID=gMC->IdFromPDG(iPart);
651 hits[4]=partID;
2303c85c 652 // if (partID!=50) cout<<partID<<endl;
e4da63c2 653 Float_t ttime=gMC->TrackTime();
654 hits[5]=ttime*1e9;
655 }
656
657 if(gMC->IsTrackExiting())
658 new(lhits[fNhits++]) AliSTARThit(fIshunt,gAlice->GetMCApp()->GetCurrentTrackNumber(),vol,hits);
659
660 }
724699e1 661 }
bc46b572 662//---------------------------------------------------------------------
663}
664
665
666
667
668
669
670
671
672