1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 /////////////////////////////////////////////////////////////////////
19 // START ( T-zero) detector version 1 //
23 <img src="gif/AliSTARTv1Class.gif">
28 //////////////////////////////////////////////////////////////////////
30 #include <Riostream.h>
33 #include <TGeometry.h>
34 #include <TLorentzVector.h>
38 #include <TVirtualMC.h>
42 #include "AliSTARThit.h"
43 #include "AliSTARTv1.h"
48 //--------------------------------------------------------------------
49 AliSTARTv1::AliSTARTv1(const char *name, const char *title):
53 // Standart constructor for START Detector version 0
56 // setBufferSize(128000);
58 //-------------------------------------------------------------------------
59 void AliSTARTv1::CreateGeometry()
62 // Create the geometry of START Detector version 0
66 <img src="gif/AliSTARTv0.gif">
71 Int_t *idtmed = fIdtmed->GetArray();
77 Float_t pstartR[18]={0., 360., 5.,
78 -76.5+0.00+69.7, 4.25, 10.,
79 -76.5+6.05+69.7, 4.5, 10.,
80 -76.5+8.05+69.7, 4.5, 10.,
81 -76.5+8.05+69.7, 5.1, 10.,
82 -62.9+0.00+69.7, 5.1, 10.};
84 Float_t pstart[3]={4.3, 10.,6.8};
85 Float_t pinstart[3]={0.,1.6,6.5};
86 Float_t ppmt[3]={0.,1.3,3.5};
87 Float_t pdivider[3]={0.,1.2,1.75};
88 Float_t pdiv2[3]={0.,1.2,1.25};
89 Float_t pdiv1[3]={0.6,1.2,0.5};
90 Float_t ptop[3]={0.,1.3,1.5};
91 Float_t pbot[3]={0.6,1.2,0.1};
92 Float_t pglass[3]={1.2,1.3,2.};
93 Float_t pcer[3]={0.9,1.1,0.09};
94 Float_t psteel[3]={0.9,1.1,0.01};
95 Float_t ppins[3]={0.6,1.2,0.014};
96 Float_t phole[3]={0.6,1.2,0.015};
97 Float_t pknob[3]={0.5,0.6,0.4};
98 Float_t pknob_vac[3]={0.,0.5,0.4};
99 Float_t pknob_bot[3]={0.,0.6,0.05};
100 Float_t pribber[3] = {0.,1.2,2.413/2.};
101 Float_t presist[3] = {0.,1.2,0.087/2.};
102 Float_t psupport1[3] = {4.51,4.6,4.0};//C kozhuh vnutri
103 Float_t psupport2[3] = {9.4,9.5,4.0};// snaruzhi C
104 Float_t psupport3[3] = {4.51,9.5,0.05};//kryshki C
105 Float_t psupport4[3] = {0,1.6,0.05};// dyrki dlia feu v zadnej kryshke Air
106 Float_t psupport5[3] = {1.44,1.5,6.5}; // stakanchik dlai feu C
107 Float_t psupport6[3] = {0,1.5,0.05}; //kryshechka stakanchika Al
108 Float_t psupport7[3] = {1.5,1.6,0.6}; //kolechko snaruzhu stakanchika Al
109 // Mother Volume katushka dlia krepezha vokrug truby k Absorbru
110 AliMatrix(idrotm[901], 90., 0., 90., 90., 180., 0.);
120 ppcon[6] = ppcon[3]+1.;
130 ppcon[12] = ppcon[9]+0.1;
135 ppcon[15] = ppcon[12];
140 ppcon[18] = ppcon[15]+7.05;
145 ppcon[21] = ppcon[18];
150 ppcon[24] = ppcon[21]+0.01;
155 ppcon[27] = ppcon[24];
160 ppcon[30] = ppcon[27]+4.5;
165 ppcon[33] = ppcon[30];
170 ppcon[36] = ppcon[33];
175 ppcon[39] = ppcon[33]+0.4;
180 // ppcon[39] = ppcon[36];
184 gMC->Gsvolu("0SUP", "PCON", idtmed[kAir], ppcon,42);
186 gMC->Gspos("0SUP",1,"ALIC",0.,0.,z,idrotm[901],"ONLY");
189 Float_t zdetRight=69.7,zdetLeft=350;
190 //-------------------------------------------------------------------
192 //-------------------------------------------------------------------
195 gMC->Gsvolu("0STR","PCON",idtmed[kAir],pstartR,18);
196 gMC->Gsvolu("0STL","TUBE",idtmed[kAir],pstart,3);
197 gMC->Gspos("0STR",1,"ALIC",0.,0.,-zdetRight-pstart[2],idrotm[901],"ONLY");
198 gMC->Gspos("0STL",1,"ALIC",0.,0.,zdetLeft+pstart[2],0,"ONLY");
201 gMC->Gsvolu("0INS","TUBE",idtmed[kAir],pinstart,3);
202 gMC->Gsvolu("0PMT","TUBE",idtmed[kVac],ppmt,3);
203 gMC->Gsvolu("0DIV","TUBE",idtmed[kVac],pdivider,3);
204 gMC->Gsvolu("0SU1","TUBE",idtmed[kC],psupport1,3);//C kozhuh vnutri
205 gMC->Gsvolu("0SU2","TUBE",idtmed[kC],psupport2,3);// snaruzhi C
206 gMC->Gsvolu("0SU3","TUBE",idtmed[kC],psupport3,3);//kryshka perednaiai C
207 gMC->Gsvolu("0SU4","TUBE",idtmed[kC],psupport3,3);//kryshka zadnaiai C
208 gMC->Gsvolu("0SU5","TUBE",idtmed[kAir],psupport4,3);// dyrki dlia feu v zadnej kryshke Air
209 cout<<" 0Su6 >> "<<psupport5[0]<<" "<<psupport5[1]<<" "<<psupport5[2]<<endl;
210 gMC->Gsvolu("0SU6","TUBE",idtmed[kC],psupport5,3);// stakanchik dlai feu C
211 gMC->Gsvolu("0SU7","TUBE",idtmed[kAl],psupport6,3);//kryshechka stakanchika Al
212 gMC->Gsvolu("0SU8","TUBE",idtmed[kAl],psupport7,3);//kolechko snaruzhu stakanchika Al
214 // first ring: 12 units of Scintillator+PMT+divider
215 Float_t theta = (180 / TMath::Pi()) * TMath::ATan(6.5 / zdetRight);
216 Float_t angel = 2 * TMath::Pi() / 12;
219 for (is=0; is<12; is++)
222 x = 6.5 * TMath::Sin(is * angel);
223 y = 6.5 * TMath::Cos(is * angel);
226 phi[1] = 90 - is * 30;
227 phi[2] = 90 - is * 30;
228 for (Int_t j = 0; j < 3; j++)
229 if (phi[j] < 0) phi[j] += 360;
231 AliMatrix (idrotm[902 + is], 90., phi[0],
234 z=-pstart[2]+pinstart[2]+0.2;
235 gMC->Gspos ("0INS", is + 1, "0STR", x, y, z, idrotm[902 + is], "ONLY");
236 gMC->Gspos ("0INS", is + 13, "0STL", x, y, z, 0, "ONLY");
242 z=-pinstart[2]+ppmt[2]+2.*psupport6[2]+0.1;
243 gMC->Gspos("0PMT",1,"0INS",x,y,z,0,"ONLY");
244 z=z+pdivider[2]+ppmt[2];
245 gMC->Gspos("0DIV",1,"0INS",x,y,z,0,"ONLY");
249 // Entry window (glass)
250 gMC->Gsvolu("0TOP","TUBE",idtmed[kGlass],ptop,3); //glass
251 // gMC->Gsvolu("0TOP","TUBE",idtmed[12],ptop,3); //lucite
253 gMC->Gspos("0TOP",1,"0PMT",0,0,z,0,"ONLY");
254 // printf("Z PTOP %f -ppmt[2] %f ptop[2] %f\n",z,-ppmt[2],ptop[2]);
257 gMC->Gsvolu("0BOT","TUBE",idtmed[kGlass],pbot,3);
259 if(fDebug) printf("%s: Z bottom %f\n",ClassName(),z);
260 gMC->Gspos("0BOT",1,"0PMT",0,0,z,0,"ONLY");
261 // Side cylinder glass
262 gMC->Gsvolu("0OUT","TUBE",idtmed[kGlass],pglass,3);
264 // printf("Z glass %f\n",z);
265 gMC->Gspos("0OUT",1,"0PMT",0,0,z,0,"ONLY");
266 //PMT electrodes support structure
267 gMC->Gsvolu("0CER","TUBE",idtmed[kCer],pcer,3);
268 gMC->Gsvolu("0STE","TUBE",idtmed[kSteel],psteel,3);
269 z=-ppmt[2]+2*ptop[2]+0.3;;
270 // printf("Z Cer 1 %f\n",z);
271 for (is=1; is<=15; is++)
273 z=z+psteel[2]+pcer[2];
274 gMC->Gspos("0CER",is,"0PMT",0,0,z,0,"ONLY");
275 z=z+psteel[2]+pcer[2];
276 gMC->Gspos("0STE",is,"0PMT",0,0,z,0,"ONLY");
280 // Knob at the bottom of PMT baloon
282 gMC->Gsvolu("0NB","TUBE",idtmed[6],pknob,3);
283 z=-pdivider[2]+pknob[2];
284 // printf("zknob %f\n",z);
285 gMC->Gspos("0NB",1,"0DIV",0,0,z,0,"ONLY");
286 gMC->Gsvolu("0KB","TUBE",idtmed[kGlass],pknob_bot,3);
287 z=-pdivider[2]+2*pknob[2]+pknob_bot[2];
288 // printf(knobbot %f\n",z);
289 gMC->Gspos("0KB",1,"0DIV ",0,0,z,0,"ONLY");
290 gMC->Gsvolu("0VAC","TUBE",idtmed[kVac],pknob_vac,3);
291 z=-pdivider[2]+pknob_vac[2];
292 // printf("knobvac %f\n",z);
293 gMC->Gspos("0VAC",1,"0DIV",0,0,z,0,"ONLY");
294 //Steel pins + pin holes
295 gMC->Gsvolu("0PIN","TUBE",idtmed[kSteel],ppins,3);
296 z=-pdivider[2]+ppins[2];
297 gMC->Gspos("0PIN",1,"0DIV",0,0,z,0,"ONLY");
298 gMC->Gsvolu("0HOL","TUBE",idtmed[kBrass],phole,3);
299 z=-pdivider[2]+2*ppins[2]+phole[2];
300 gMC->Gspos("0HOL",1,"0DIV",0,0,z,0,"ONLY");
303 gMC->Gsvolu("0V1","TUBE",idtmed[kCer],pdiv1,3);
304 z=-pdivider[2]+pdiv1[2];
305 gMC->Gspos("0V1",1,"0DIV",0,0,z,0,"ONLY");
307 gMC->Gsvolu("0V2","TUBE",idtmed[kAir],pdiv2,3);
308 z=pdivider[2]-pdiv2[2];
309 gMC->Gspos("0V2",1,"0DIV",0,0,z,0,"ONLY");
310 gMC->Gsvolu("0RS","TUBE",idtmed[kCer],presist,3);
311 z=-pdiv2[2]+presist[2];
312 gMC->Gspos("0RS",1,"0V2",0,0,z,0,"ONLY");
313 gMC->Gsvolu("0RB","TUBE",idtmed[kRibber],pribber,3);
314 z=pdiv2[2]-pribber[2];
315 gMC->Gspos("0RB",1,"0V2",0,0,z,0,"ONLY");
320 z=-pstart[2]+psupport1[2];
321 gMC->Gspos("0SU1",2,"0STL",0,0,z,0,"ONLY"); //C kozhuh snaruzhi
322 gMC->Gspos("0SU2",2,"0STL",0,0,z,0,"ONLY"); //C kozhuh vnutri
323 z=-pstart[2]+psupport3[2];
324 gMC->Gspos("0SU3",2,"0STL",0,0,z,0,"ONLY"); //peredniaia kryshka
325 z=-pstart[2]+2.*psupport1[2];
326 gMC->Gspos("0SU4",2,"0STL",0,0,z,0,"ONLY"); //zadnaiai kryshka
327 //Dyrki dlia feu v zadnej kryshke
330 for (is=1; is<=12; is++)
332 x=6.5*TMath::Sin(is*angel);
333 y=6.5 *TMath::Cos(is*angel);
334 gMC->Gspos("0SU5",is+12,"0SU4",x,y,z,0,"ONLY");
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,"ONLY"); //zadnaiai kryshka
347 //Dyrki dlia feu v zadnej kryshke
350 for (is=1; is<=12; is++)
352 x=(6.5+7.8*TMath::Tan(5.4*3.1415/180)) *TMath::Sin(is*angel);
353 y=(6.5+7.8*TMath::Tan(5.4*3.1415/180)) *TMath::Cos(is*angel);
354 gMC->Gspos("0SU5",is,"0SU4",x,y,z,0,"ONLY");
358 gMC->Gspos("0SU6",1,"0INS",0,0,0,0,"ONLY");//C stakanchik dlia feu
359 z=-pinstart[2]+psupport6[2];
360 gMC->Gspos("0SU7",1,"0INS",0,0,z,0,"ONLY"); //Al kryshechka
362 z=pinstart[2]-psupport7[2];
363 gMC->Gspos("0SU8",1,"0INS",0,0,z,0,"ONLY"); //Al kolechko
370 gMC->Gsvolu("0SC0","TUBE",idtmed[kC],par,3);
372 gMC->Gspos("0SC0",1,"0SUP",0,0,z,0,"ONLY");
377 gMC->Gsvolu("0SC1","TUBE",idtmed[kC],par,3);
379 gMC->Gspos("0SC1",1,"0SUP",0,0,z,0,"ONLY");
384 gMC->Gsvolu("0SC2","TUBE",idtmed[kC],par,3);
386 gMC->Gspos("0SC2",1,"0SUP",0,0,z,0,"ONLY");
395 gMC->Gsvolu("0SC3","CONE",idtmed[kC],parC,5);
397 gMC->Gspos("0SC3",1,"0SUP",0,0,z,0,"ONLY");
403 gMC->Gsvolu("0SC4","TUBE",idtmed[kC],par,3);
405 gMC->Gspos("0SC4",1,"0SUP",0,0,z,0,"ONLY");
409 gMC->Gsvolu("0SA0","TUBE",idtmed[kAl],par,3);
410 gMC->Gspos("0SA0",1,"0SUP",0,0,z,0,"ONLY");
411 //gvozdi dlia skruchivaniia Al i C parts
414 gMC->Gsvolu("0SN1","TUBE",idtmed[kSteel],par,3);
415 gMC->Gspos("0SN1",1,"0SUP",0,0,z,0,"ONLY");
421 gMC->Gsvolu("0SA1","TUBE",idtmed[kAl],par,3);
424 gMC->Gspos("0SA1",1,"0SUP",0,0,z,0,"ONLY");
429 gMC->Gsvolu("0SA2","TUBE",idtmed[kAl],par,3);
431 gMC->Gspos("0SA2",1,"0SUP",0,0,z,0,"ONLY");
433 par[0]=3.16; // eta chast' prikruchena k absorberu
436 gMC->Gsvolu("0SA3","TUBE",idtmed[kAl],par,3);
438 gMC->Gspos("0SA3",1,"0SUP",0,0,z,0,"ONLY");
439 par[0]=3.16; // gvozdi eta chast' prikruchena k absorberu
442 gMC->Gsvolu("0SN2","TUBE",idtmed[kSteel],par,3);
443 gMC->Gspos("0SN2",1,"0SUP",0,0,z,0,"ONLY");
447 //------------------------------------------------------------------------
448 void AliSTARTv1::CreateMaterials()
450 Int_t isxfld = gAlice->Field()->Integ();
451 Float_t sxmgmx = gAlice->Field()->Max();
452 Float_t a,z,d,radl,absl,buf[1];
456 Float_t ascin[2]={1.01,12.01};
457 Float_t zscin[2]={1,6};
458 Float_t wscin[2]={1,1};
459 Float_t denscin=1.03;
460 //Lucite C(CH3)CO2CH3
461 Float_t alucite[3]={1.01,12.01,15.999};
462 Float_t zlucite[3]={1,6,8};
463 Float_t wlucite[3]={8,5,2};
464 Float_t denlucite=1.16;
466 Float_t aglass[2]={28.0855,15.9994};
467 Float_t zglass[2]={14.,8.};
468 Float_t wglass[2]={1.,2.};
470 // Ceramic 97.2% Al2O3 , 2.8% SiO2
471 Float_t acer[2],zcer[2],wcer[2]={0.972,0.028};
472 Float_t aal2o3[2] = { 26.981539,15.9994 };
473 Float_t zal2o3[2] = { 13.,8. };
474 Float_t wal2o3[2] = { 2.,3. };
475 Float_t denscer = 3.6;
477 // Brass 80% Cu, 20% Zn
478 Float_t abrass[2] = {63.546,65.39};
479 Float_t zbrass[2] = {29,30};
480 Float_t wbrass[2] = {0.8,0.2};
481 Float_t denbrass=8.96;
484 Float_t aribber[3] = {12.,1.,32.};
485 Float_t zribber[3] = {6.,1.,16.};
486 Float_t wribber[3] = {6.,12.,1.};
487 Float_t denribber=0.8;
489 Float_t asupport[2] = {12.,1.};
490 Float_t zsupport[2] = {6.,1.};
491 Float_t wsupport[2] = {1.,1.};
492 Float_t densupport=0.1;
494 //*** Definition Of avaible START materials ***
495 AliMaterial(0, "START Steel$", 55.850,26.,7.87,1.76,999);
496 AliMaterial(1, "START Vacuum$", 1.e-16,1.e-16,1.e-16,1.e16,999);
497 AliMaterial(2, "START Air$", 14.61, 7.3, .001205, 30423.,999);
498 AliMaterial(10, "CarbonPlastic$", 12.01, 6.0, 2.26, 18.8,999);
499 AliMaterial(11, "Aliminium$", 26.98, 13.0, 2.7, 8.9,999);
501 AliMixture( 3, "Al2O3 $", aal2o3, zal2o3, denscer, -2, wal2o3);
502 AliMixture( 4, "PMT glass $",aglass,zglass,dglass,-2,wglass);
504 gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
507 gMC->Gfmate((*fIdmate)[4], namate, a, z, d, radl, absl, buf, nbuf);
511 AliMixture( 9, "Ceramic $", acer, zcer, denscer, 2, wcer);
512 AliMixture( 5, "Scintillator$",ascin,zscin,denscin,-2,wscin);
513 AliMixture( 6, "Brass $", abrass, zbrass, denbrass, 2, wbrass);
515 AliMixture( 7, "Ribber $",aribber,zribber,denribber,-3,wribber);
516 AliMixture( 8, "Lucite$",alucite,zlucite,denlucite,-3,wlucite);
517 AliMixture( 9, "Penoplast$",asupport,zsupport,densupport,-2,wsupport);
520 AliMedium(1, "START Air$", 2, 0, isxfld, sxmgmx, 10., .1, 1., .003, .003);
521 AliMedium(2, "Scintillator$", 5, 1, isxfld, sxmgmx, 10., .01, 1., .003, .003);
522 AliMedium(3, "Vacuum$", 1, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003);
523 AliMedium(4, "Ceramic$", 9, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003);
524 AliMedium(6, "Glass$", 4, 1, isxfld, sxmgmx, 10., .01, .1, .003, .003);
525 AliMedium(8, "Steel$", 0, 0, isxfld, sxmgmx, 1., .001, 1., .001, .001);
526 AliMedium(9, "Ribber $", 7, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003);
527 AliMedium(11, "Brass $", 6, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003);
528 AliMedium(12, "Lucite$", 8, 1, isxfld, sxmgmx, 10., .01, 1., .003, .003);
529 AliMedium(13, "CarbonPlastic$", 10, 0, isxfld, sxmgmx, 10., .01, 1., .003, .003);
530 AliMedium(14, "PenoPlast$", 9, 0, isxfld, sxmgmx, 10., .01, 1., .003, .003);
531 AliMedium(15, "Aluminium$", 11, 0, isxfld, sxmgmx, 10., .01, 1., .003, .003);
533 if(fDebug) cout<<ClassName()<<": ++++++++++++++Medium set++++++++++"<<endl;
536 //---------------------------------------------------------------------
537 void AliSTARTv1::DrawDetector()
540 // Draw a shaded view of the Forward multiplicity detector version 0
543 //Set ALIC mother transparent
544 gMC->Gsatt("ALIC","SEEN",0);
546 //Set volumes visible
547 // gMC->Gsatt("0ST","SEEN",0);
548 gMC->Gsatt("0INS","SEEN",0);
549 gMC->Gsatt("0PMT","SEEN",1);
550 gMC->Gsatt("0DIV","SEEN",1);
552 gMC->Gdopt("hide","off");
553 gMC->Gdopt("shad","on");
554 gMC->SetClipBox(".");
555 gMC->SetClipBox("*",0,1000,-1000,1000,-1000,1000);
557 gMC->Gdraw("alic",90,0,0,-35,9.5,.6,0.6);
558 gMC->Gdhead(1111,"T-Zero detector");
559 gMC->Gdopt("hide","off");
562 //-------------------------------------------------------------------
563 void AliSTARTv1::Init()
565 // Initialises version 0 of the Forward Multiplicity Detector
567 //Int_t *idtmed = gAlice->Idtmed();
569 fIdSens1=gMC->VolId("0TOP");
570 if(fDebug) printf("%s: *** START version 0 initialized ***\n",ClassName());
574 //-------------------------------------------------------------------
576 void AliSTARTv1::StepManager()
579 // Called for every step in the START Detector
582 static Float_t hits[7];
587 TClonesArray &lhits = *fHits;
589 if(!gMC->IsTrackAlive()) return; // particle has disappeared
590 // Float_t charge = gMC->TrackCharge();
591 // if(TMath::Abs(charge)<=0.) return; //take only charged particles
592 id=gMC->CurrentVolID(copy);
595 // Check the sensetive volume
597 if(gMC->IsTrackEntering()) {
598 gMC->CurrentVolOffID(2,copy);
600 gMC->CurrentVolOffID(3,copy1);
603 gMC->TrackPosition(pos);
607 if(pos[2]<0) vol[0]=2;
608 if(pos[2]>=0) vol[0]=1;
610 Float_t etot=gMC->Etot();
612 Int_t iPart= gMC->TrackPid();
613 Int_t partID=gMC->IdFromPDG(iPart);
615 Float_t ttime=gMC->TrackTime();
619 if(gMC->IsTrackInside()) {
620 Float_t de=gMC->Edep();
624 if(gMC->IsTrackExiting()) {
625 Float_t de=gMC->Edep();
628 new(lhits[fNhits++]) AliSTARThit(fIshunt,gAlice->GetMCApp()->GetCurrentTrackNumber(),vol,hits);
631 //---------------------------------------------------------------------