1 /////////////////////////////////////////////////////////////////////
3 // START ( T-zero) detector version 0 //
7 <img src="gif/AliSTARTv0Class.gif">
12 //////////////////////////////////////////////////////////////////////
15 #include <TGeometry.h>
19 #include "AliSTARTv0.h"
31 //--------------------------------------------------------------------
32 AliSTARTv1::AliSTARTv1(const char *name, const char *title):
36 // Standart constructor for START Detector version 0
39 // setBufferSize(128000);
41 //-------------------------------------------------------------------------
42 void AliSTARTv1::CreateGeometry()
45 // Create the geometry of START Detector version 0
49 <img src="gif/AliSTARTv0.gif">
53 AliMC* pMC = AliMC::GetMC();
55 Int_t *idtmed = gAlice->Idtmed();
61 Float_t pstart[3]={5.,10.2,5.3};
62 // Float_t pscin[3]={0.,2.54/2.,1.5};
63 Float_t ppmt[3]={0.,1.3,3.5};
64 Float_t pdivider[3]={0.,1.2,1.75};
65 Float_t pdiv2[3]={0.,1.2,1.25};
66 Float_t pdiv1[3]={0.6,1.2,0.5};
67 Float_t ptop[3]={0.,1.3,1.5};
68 Float_t pbot[3]={0.6,1.2,0.1};
69 Float_t pglass[3]={1.2,1.3,2.};
70 Float_t pcer[3]={0.9,1.1,0.09};
71 Float_t psteel[3]={0.9,1.1,0.01};
72 Float_t ppins[3]={0.6,1.2,0.014};
73 Float_t phole[3]={0.6,1.2,0.015};
74 Float_t pknob[3]={0.5,0.6,0.4};
75 Float_t pknob_vac[3]={0.,0.5,0.4};
76 Float_t pknob_bot[3]={0.,0.6,0.05};
77 Float_t pribber[3] = {0.,1.2,2.413/2.};
78 Float_t presist[3] = {0.,1.2,0.087/2.};
81 //-------------------------------------------------------------------
83 //-------------------------------------------------------------------
85 AliMatrix(idrotm[901], 90., 0., 90., 90., 180., 0.);
86 pMC->Gsvolu("STRT","TUBE",idtmed[2101-1],pstart,3);
87 pMC->Gspos("STRT",1,"ALIC",0.,0.,zdet,0,"ONLY");
88 pMC->Gspos("STRT",2,"ALIC",0.,0.,-zdet,idrotm[901],"ONLY");
91 // pMC->Gsvolu("SCIN","TUBE",idtmed[2102-1],pscin,3);
92 pMC->Gsvolu("PMT ","TUBE",idtmed[2103-1],ppmt,3);
93 pMC->Gsvolu("DIVI","TUBE",idtmed[2103-1],pdivider,3);
95 // first ring: 13 units of Scintillator+PMT+divider
96 for (is=1; is<=13; is++)
98 x=6*TMath::Sin(is*2*3.1415/13);
99 y=6*TMath::Cos(is*2*3.1415/13);
100 z=-pstart[2]+ppmt[2];
101 printf(" is %d, z PMT %f\n",is,z);
102 // pMC->Gspos("SCIN",is,"STRT",x,y,z,0,"ONLY");
103 // z=z+pscin[2]+ppmt[2];
104 pMC->Gspos("PMT ",is,"STRT",x,y,z,0,"ONLY");
105 z=ppmt[2]+pdivider[2];
106 printf(" is %d, z Divider %f\n",is,z);
107 pMC->Gspos("DIVI",is,"STRT",x,y,z,0,"ONLY");
109 //second ring: 20 units of Scintillator+PMT+divider
110 for (is=14; is<=33;is++)
112 x=8.8*TMath::Sin(2.*3.1415/26+(is-13)*2*3.1415/20);
113 y=8.8*TMath::Cos(2.*3.1315/26+(is-13)*2*3.1415/20);
114 z=-pstart[2]+ppmt[2];
115 // pMC->Gspos("SCIN",is,"STRT",x,y,z,0,"ONLY");
116 //z=z+pscin[2]+ppmt[2];
117 pMC->Gspos("PMT ",is,"STRT",x,y,z,0,"ONLY");
119 pMC->Gspos("DIVI",is,"STRT",x,y,z,0,"ONLY");
123 // Entry window (glass)
124 pMC->Gsvolu("PTOP","TUBE",idtmed[2106-1],ptop,3);
126 pMC->Gspos("PTOP",1,"PMT ",0,0,z,0,"ONLY");
127 printf("Z PTOP %f -ppmt[2] %f ptop[2] %f\n",z,-ppmt[2],ptop[2]);
129 pMC->Gsvolu("PBOT","TUBE",idtmed[2106-1],pbot,3);
131 printf("Z bottom %f\n",z);
132 pMC->Gspos("PBOT",1,"PMT ",0,0,z,0,"ONLY");
133 // Side cylinder glass
134 pMC->Gsvolu("POUT","TUBE",idtmed[2106-1],pglass,3);
136 printf("Z glass %f\n",z);
137 pMC->Gspos("POUT",1,"PMT ",0,0,z,0,"ONLY");
138 //PMT electrodes support structure
139 pMC->Gsvolu("PCER","TUBE",idtmed[2104-1],pcer,3);
140 pMC->Gsvolu("PSTE","TUBE",idtmed[2108-1],psteel,3);
141 z=-ppmt[2]+2*ptop[2]+0.3;;
142 printf("Z Cer 1 %f\n",z);
143 for (is=1; is<=15; is++)
145 z=z+psteel[2]+pcer[2];
146 pMC->Gspos("PCER",is,"PMT",0,0,z,0,"ONLY");
147 z=z+psteel[2]+pcer[2];
148 pMC->Gspos("PSTE",is,"PMT",0,0,z,0,"ONLY");
152 // Knob at the bottom of PMT baloon
153 pMC->Gsvolu("KNOB","TUBE",idtmed[2106-1],pknob,3);
154 z=-pdivider[2]+pknob[2];
155 // printf("zknob %f\n",z);
156 pMC->Gspos("KNOB",1,"DIVI",0,0,z,0,"ONLY");
157 pMC->Gsvolu("KNBO","TUBE",idtmed[2106-1],pknob_bot,3);
158 z=-pdivider[2]+2*pknob[2]+pknob_bot[2];
159 // printf("knobbot %f\n",z);
160 pMC->Gspos("KNBO",1,"DIVI ",0,0,z,0,"ONLY");
161 pMC->Gsvolu("KNVA","TUBE",idtmed[2106-1],pknob_vac,3);
162 z=-pdivider[2]+pknob_vac[2];
163 // printf("knobvac %f\n",z);
164 pMC->Gspos("KNVA",1,"DIVI",0,0,z,0,"ONLY");
165 //Steel pins + pin holes
166 pMC->Gsvolu("PINS","TUBE",idtmed[2108-1],ppins,3);
167 z=-pdivider[2]+ppins[2];
168 pMC->Gspos("PINS",1,"DIVI",0,0,z,0,"ONLY");
169 pMC->Gsvolu("HOLE","TUBE",idtmed[2111-1],phole,3);
170 z=-pdivider[2]+2*ppins[2]+phole[2];
171 pMC->Gspos("HOLE",1,"DIVI",0,0,z,0,"ONLY");
174 pMC->Gsvolu("DIV1","TUBE",idtmed[2104-1],pdiv1,3);
175 z=-pdivider[2]+pdiv1[2];
176 pMC->Gspos("DIV1",1,"DIVI",0,0,z,0,"ONLY");
178 pMC->Gsvolu("DIV2","TUBE",idtmed[2101-1],pdiv2,3);
179 z=pdivider[2]-pdiv2[2];
180 pMC->Gspos("DIV2",1,"DIVI",0,0,z,0,"ONLY");
181 pMC->Gsvolu("DRES","TUBE",idtmed[2104-1],presist,3);
182 z=-pdiv2[2]+presist[2];
183 pMC->Gspos("DRES",1,"DIV2",0,0,z,0,"ONLY");
184 pMC->Gsvolu("DRIB","TUBE",idtmed[2109-1],pribber,3);
185 z=pdiv2[2]-pribber[2];
186 pMC->Gspos("DRIB",1,"DIV2",0,0,z,0,"ONLY");
187 printf("z DRIB %f\n",z);
190 //------------------------------------------------------------------------
191 void AliSTARTv1::CreateMaterials()
193 Int_t ISXFLD = gAlice->Field()->Integ();
194 Float_t SXMGMX = gAlice->Field()->Max();
195 Float_t a,z,d,radl,absl,buf[1];
199 // Float_t ascin[2]={1.01,12.01};
200 // Float_t zscin[2]={1,6};
201 // Float_t wscin[2]={1,1};
202 // Float_t denscin=1.03;
204 Float_t aglass[2]={28.0855,15.9994};
205 Float_t zglass[2]={14.,8.};
206 Float_t wglass[2]={1.,2.};
208 // Ceramic 97.2% Al2O3 , 2.8% SiO2
209 Float_t acer[2],zcer[2],wcer[2]={0.972,0.028};
210 Float_t aal2o3[2] = { 26.981539,15.9994 };
211 Float_t zal2o3[2] = { 13.,8. };
212 Float_t wal2o3[2] = { 2.,3. };
213 Float_t denscer = 3.6;
215 // Brass 80% Cu, 20% Zn
216 Float_t abrass[2] = {63.546,65.39};
217 Float_t zbrass[2] = {29,30};
218 Float_t wbrass[2] = {0.8,0.2};
219 Float_t denbrass=8.96;
222 Float_t aribber[3] = {12.,1.,32.};
223 Float_t zribber[3] = {6.,1.,16.};
224 Float_t wribber[3] = {6.,12.,1.};
225 Float_t denribber=0.8;
228 AliMC* pMC = AliMC::GetMC();
230 Int_t *idtmed = gAlice->Idtmed();
233 //*** Definition Of avaible START materials ***
234 AliMaterial(0, "START Steel$", 55.850,26.,7.87,1.76,999);
235 AliMaterial(1, "START Vacuum$", 1.e-16,1.e-16,1.e-16,1.e16,999);
236 AliMaterial(2, "START Air$", 14.61, 7.3, .001205, 30423.,999);
238 AliMixture( 3, "Al2O3 $", aal2o3, zal2o3, denscer, -2, wcer);
239 AliMixture( 4, "PMT glass $",aglass,zglass,dglass,-2,wglass);
241 pMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
244 pMC->Gfmate((*fIdmate)[4], namate, a, z, d, radl, absl, buf, nbuf);
248 AliMixture( 9, "Ceramic $", acer, zcer, denscer, 2, wcer);
249 // AliMixture( 5, "Scintillator$",ascin,zscin,denscin,-2,wscin);
250 AliMixture( 6, "Brass $", abrass, zbrass, denbrass, 2, wbrass);
252 AliMixture( 7, "Ribber $",aribber,zribber,denribber,-3,wribber);
257 AliMedium(2101, "START Air$", 2, 0, ISXFLD, SXMGMX, 10., .1, 1., .003, .003);
258 // AliMedium(2102, "Scintillator$", 5, 1, ISXFLD, SXMGMX, 10., .01, 1., .003, .003);
259 AliMedium(2103, "Vacuum$", 1, 0, ISXFLD, SXMGMX, 10., .01, .1, .003, .003);
260 AliMedium(2104, "Ceramic$", 9, 0, ISXFLD, SXMGMX, 10., .01, .1, .003, .003);
261 AliMedium(2106, "Glass$", 4, 0, ISXFLD, SXMGMX, 10., .01, .1, .003, .003);
262 AliMedium(2108, "Steel$", 0, 0, ISXFLD, SXMGMX, 1., .001, 1., .001, .001);
263 AliMedium(2111, "Brass $", 6, 0, ISXFLD, SXMGMX, 10., .01, .1, .003, .003);
264 AliMedium(2109, "Ribber $", 7, 0, ISXFLD, SXMGMX, 10., .01, .1, .003, .003);
268 //---------------------------------------------------------------------
269 void AliSTARTv1::DrawDetector()
272 // Draw a shaded view of the Forward multiplicity detector version 0
275 AliMC* pMC = AliMC::GetMC();
277 //Set ALIC mother transparent
278 pMC->Gsatt("ALIC","SEEN",0);
280 //Set volumes visible
281 pMC->Gsatt("STRT","SEEN",0);
282 //pMC->Gsatt("SCIN","SEEN",1);
283 pMC->Gsatt("PMT ","SEEN",1);
284 pMC->Gsatt("DIVI","SEEN",1);
286 pMC->Gdopt("hide","on");
287 pMC->Gdopt("shad","on");
288 pMC->SetClipBox(".");
289 pMC->SetClipBox("*",0,1000,-1000,1000,-1000,1000);
291 pMC->Gdraw("alic",40,30,0,12,9.5,.2,0.2);
292 pMC->Gdhead(1111,"T-Zero detector");
293 pMC->Gdopt("hide","off");
295 //-------------------------------------------------------------------
296 void AliSTARTv1::Init()
298 // Initialises version 0 of the Forward Multiplicity Detector
300 AliMC* pMC=AliMC::GetMC();
301 //Int_t *idtmed = gAlice->Idtmed();
303 fIdSens1=pMC->VolId("PTOP");
304 printf("*** START version 0 initialized ***\n");
308 //-------------------------------------------------------------------
310 void AliSTARTv1::StepManager()
313 // Called for every step in the START Detector
315 Int_t id,copy,copy1,i;
316 static Float_t hits[7];
320 TClonesArray &lhits = *fHits;
321 AliMC* pMC=AliMC::GetMC();
322 TGeant3* geant3= (TGeant3*)pMC;
324 if(!pMC->TrackAlive()) return; // particle has disappeared
325 Float_t charge = pMC->TrackCharge();
326 if(TMath::Abs(charge)<=0.) return; //take only charged particles
328 id=pMC->CurrentVol(0,copy);
331 // printf("igauto %d\n",pMC->ctrak->igauto);
332 // printf("pMC->ckine->ipart %d",pMC->ckine->ipart);
333 // Check the sensetive volume
336 if(pMC->TrackEntering())
338 pMC->CurrentVolOff(2,0,copy);
340 pMC->CurrentVolOff(1,0,copy1);
342 pMC->TrackPosition(hits);
343 Float_t etot=pMC->Etot();
344 // printf("pMC->ctrak->ekin %f\n",pMC->ctrak->Ekin);
346 Int_t part= pMC->TrackPid();
348 Float_t ttime=geant3->Gctrak()->tofg;
351 // Float_t xV=geant3->Gckine()->vert[0];
352 //Float_t yV=geant3->Gckine()->vert[1];
353 //Float_t zV=geant3->Gckine()->vert[2];
354 //Float_t tl=pMC -> TrackLength();
356 // for (i=0; i<=6; i++){
357 // printf(" HITS on START entr %f\n",hits[i]);}
360 if(pMC->TrackInside())
362 Float_t de=pMC->Edep();
364 // printf ("E deposition %f\n",edep);
365 // for (i=0; i<=6; i++){
366 // printf(" HITS on START inside %f\n",hits[i]); }
368 if(pMC->TrackExiting())
370 Float_t de=pMC->Edep();
373 // for (i=0; i<=6; i++){
374 // printf(" HITS on START Exit %f\n",hits[i]); }
375 //for (i=0; i<=1; i++) { printf("START vol %d\n",vol[i]);}
377 new(lhits[fNhits++]) AliSTARThit(fIshunt,gAlice->CurrentTrack(),vol,hits); }
379 //---------------------------------------------------------------------