1 /////////////////////////////////////////////////////////////////////
3 // START ( T-zero) detector version 0 //
7 <img src="gif/AliSTARTv0Class.gif">
12 //////////////////////////////////////////////////////////////////////
15 #include <TGeometry.h>
19 #include "AliSTARTv0.h"
26 //#include "TGeant3.h"
31 //--------------------------------------------------------------------
32 AliSTARTv0::AliSTARTv0(const char *name, const char *title):
36 // Standart constructor for START Detector version 0
39 // setBufferSize(128000);
41 //-------------------------------------------------------------------------
42 void AliSTARTv0::CreateGeometry()
45 // Create the geometry of START Detector version 0
49 <img src="gif/AliSTARTv0.gif">
54 Int_t *idtmed = fIdtmed->GetArray()-2099;
60 Float_t pstart[3]={4.5,10.7,5.3};
61 // Float_t pscin[3]={0.,2.54/2.,1.5};
62 Float_t ppmt[3]={0.,1.3,3.5};
63 Float_t pdivider[3]={0.,1.2,1.75};
64 Float_t pdiv2[3]={0.,1.2,1.25};
65 Float_t pdiv1[3]={0.6,1.2,0.5};
66 Float_t ptop[3]={0.,1.3,1.5};
67 Float_t pbot[3]={0.6,1.2,0.1};
68 Float_t pglass[3]={1.2,1.3,2.};
69 Float_t pcer[3]={0.9,1.1,0.09};
70 Float_t psteel[3]={0.9,1.1,0.01};
71 Float_t ppins[3]={0.6,1.2,0.014};
72 Float_t phole[3]={0.6,1.2,0.015};
73 Float_t pknob[3]={0.5,0.6,0.4};
74 Float_t pknob_vac[3]={0.,0.5,0.4};
75 Float_t pknob_bot[3]={0.,0.6,0.05};
76 Float_t pribber[3] = {0.,1.2,2.413/2.};
77 Float_t presist[3] = {0.,1.2,0.087/2.};
80 //-------------------------------------------------------------------
82 //-------------------------------------------------------------------
84 AliMatrix(idrotm[901], 90., 0., 90., 90., 180., 0.);
85 gMC->Gsvolu("STRT","TUBE",idtmed[2101-1],pstart,3);
86 gMC->Gspos("STRT",1,"ALIC",0.,0.,zdet,0,"ONLY");
87 gMC->Gspos("STRT",2,"ALIC",0.,0.,-zdet,idrotm[901],"ONLY");
90 // gMC->Gsvolu("SCIN","TUBE",idtmed[2102-1],pscin,3);
91 gMC->Gsvolu("PMT ","TUBE",idtmed[2103-1],ppmt,3);
92 gMC->Gsvolu("DIVI","TUBE",idtmed[2103-1],pdivider,3);
94 // first ring: 13 units of Scintillator+PMT+divider
95 for (is=1; is<=13; is++)
97 x=6.5*TMath::Sin(is*2*3.1415/13);
98 y=6.5*TMath::Cos(is*2*3.1415/13);
100 printf(" is %d x %f y %f r%f\n",is,x,y,sqrt(x*x+y*y));
101 // gMC->Gspos("SCIN",is,"STRT",x,y,z,0,"ONLY");
102 // z=z+pscin[2]+ppmt[2];
103 gMC->Gspos("PMT ",is,"STRT",x,y,z,0,"ONLY");
104 z=ppmt[2]+pdivider[2];
105 printf(" is %d, z Divider %f\n",is,z);
106 gMC->Gspos("DIVI",is,"STRT",x,y,z,0,"ONLY");
108 //second ring: 20 units of Scintillator+PMT+divider
109 for (is=14; is<=33;is++)
111 x=9.3*TMath::Sin(2.*3.1415/26+(is-13)*2*3.1415/20);
112 y=9.3*TMath::Cos(2.*3.1315/26+(is-13)*2*3.1415/20);
113 z=-pstart[2]+ppmt[2];
114 // gMC->Gspos("SCIN",is,"STRT",x,y,z,0,"ONLY");
115 //z=z+pscin[2]+ppmt[2];
116 gMC->Gspos("PMT ",is,"STRT",x,y,z,0,"ONLY");
118 gMC->Gspos("DIVI",is,"STRT",x,y,z,0,"ONLY");
122 // Entry window (glass)
123 gMC->Gsvolu("PTOP","TUBE",idtmed[2106-1],ptop,3);
125 gMC->Gspos("PTOP",1,"PMT ",0,0,z,0,"ONLY");
126 // printf("Z PTOP %f -ppmt[2] %f ptop[2] %f\n",z,-ppmt[2],ptop[2]);
128 gMC->Gsvolu("PBOT","TUBE",idtmed[2106-1],pbot,3);
130 printf("Z bottom %f\n",z);
131 gMC->Gspos("PBOT",1,"PMT ",0,0,z,0,"ONLY");
132 // Side cylinder glass
133 gMC->Gsvolu("POUT","TUBE",idtmed[2106-1],pglass,3);
135 // printf("Z glass %f\n",z);
136 gMC->Gspos("POUT",1,"PMT ",0,0,z,0,"ONLY");
137 //PMT electrodes support structure
138 gMC->Gsvolu("PCER","TUBE",idtmed[2104-1],pcer,3);
139 gMC->Gsvolu("PSTE","TUBE",idtmed[2108-1],psteel,3);
140 z=-ppmt[2]+2*ptop[2]+0.3;;
141 // printf("Z Cer 1 %f\n",z);
142 for (is=1; is<=15; is++)
144 z=z+psteel[2]+pcer[2];
145 gMC->Gspos("PCER",is,"PMT",0,0,z,0,"ONLY");
146 z=z+psteel[2]+pcer[2];
147 gMC->Gspos("PSTE",is,"PMT",0,0,z,0,"ONLY");
151 // Knob at the bottom of PMT baloon
152 gMC->Gsvolu("KNOB","TUBE",idtmed[2106-1],pknob,3);
153 z=-pdivider[2]+pknob[2];
154 // printf("zknob %f\n",z);
155 gMC->Gspos("KNOB",1,"DIVI",0,0,z,0,"ONLY");
156 gMC->Gsvolu("KNBO","TUBE",idtmed[2106-1],pknob_bot,3);
157 z=-pdivider[2]+2*pknob[2]+pknob_bot[2];
158 // printf("knobbot %f\n",z);
159 gMC->Gspos("KNBO",1,"DIVI ",0,0,z,0,"ONLY");
160 gMC->Gsvolu("KNVA","TUBE",idtmed[2106-1],pknob_vac,3);
161 z=-pdivider[2]+pknob_vac[2];
162 // printf("knobvac %f\n",z);
163 gMC->Gspos("KNVA",1,"DIVI",0,0,z,0,"ONLY");
164 //Steel pins + pin holes
165 gMC->Gsvolu("PINS","TUBE",idtmed[2108-1],ppins,3);
166 z=-pdivider[2]+ppins[2];
167 gMC->Gspos("PINS",1,"DIVI",0,0,z,0,"ONLY");
168 gMC->Gsvolu("HOLE","TUBE",idtmed[2111-1],phole,3);
169 z=-pdivider[2]+2*ppins[2]+phole[2];
170 gMC->Gspos("HOLE",1,"DIVI",0,0,z,0,"ONLY");
173 gMC->Gsvolu("DIV1","TUBE",idtmed[2104-1],pdiv1,3);
174 z=-pdivider[2]+pdiv1[2];
175 gMC->Gspos("DIV1",1,"DIVI",0,0,z,0,"ONLY");
177 gMC->Gsvolu("DIV2","TUBE",idtmed[2101-1],pdiv2,3);
178 z=pdivider[2]-pdiv2[2];
179 gMC->Gspos("DIV2",1,"DIVI",0,0,z,0,"ONLY");
180 gMC->Gsvolu("DRES","TUBE",idtmed[2104-1],presist,3);
181 z=-pdiv2[2]+presist[2];
182 gMC->Gspos("DRES",1,"DIV2",0,0,z,0,"ONLY");
183 gMC->Gsvolu("DRIB","TUBE",idtmed[2109-1],pribber,3);
184 z=pdiv2[2]-pribber[2];
185 gMC->Gspos("DRIB",1,"DIV2",0,0,z,0,"ONLY");
186 // printf("z DRIB %f\n",z);
189 //------------------------------------------------------------------------
190 void AliSTARTv0::CreateMaterials()
192 Int_t ISXFLD = gAlice->Field()->Integ();
193 Float_t SXMGMX = gAlice->Field()->Max();
194 Float_t a,z,d,radl,absl,buf[1];
198 // Float_t ascin[2]={1.01,12.01};
199 // Float_t zscin[2]={1,6};
200 // Float_t wscin[2]={1,1};
201 // Float_t denscin=1.03;
203 Float_t aglass[2]={28.0855,15.9994};
204 Float_t zglass[2]={14.,8.};
205 Float_t wglass[2]={1.,2.};
207 // Ceramic 97.2% Al2O3 , 2.8% SiO2
208 Float_t acer[2],zcer[2],wcer[2]={0.972,0.028};
209 Float_t aal2o3[2] = { 26.981539,15.9994 };
210 Float_t zal2o3[2] = { 13.,8. };
211 Float_t wal2o3[2] = { 2.,3. };
212 Float_t denscer = 3.6;
214 // Brass 80% Cu, 20% Zn
215 Float_t abrass[2] = {63.546,65.39};
216 Float_t zbrass[2] = {29,30};
217 Float_t wbrass[2] = {0.8,0.2};
218 Float_t denbrass=8.96;
221 Float_t aribber[3] = {12.,1.,32.};
222 Float_t zribber[3] = {6.,1.,16.};
223 Float_t wribber[3] = {6.,12.,1.};
224 Float_t denribber=0.8;
227 // AliMC* gMC = AliMC::GetMC();
229 // Int_t *idtmed = gAlice->Idtmed();
232 //*** Definition Of avaible START materials ***
233 AliMaterial(0, "START Steel$", 55.850,26.,7.87,1.76,999);
234 AliMaterial(1, "START Vacuum$", 1.e-16,1.e-16,1.e-16,1.e16,999);
235 AliMaterial(2, "START Air$", 14.61, 7.3, .001205, 30423.,999);
237 AliMixture( 3, "Al2O3 $", aal2o3, zal2o3, denscer, -2, wal2o3);
238 AliMixture( 4, "PMT glass $",aglass,zglass,dglass,-2,wglass);
240 gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
243 gMC->Gfmate((*fIdmate)[4], namate, a, z, d, radl, absl, buf, nbuf);
247 AliMixture( 9, "Ceramic $", acer, zcer, denscer, 2, wcer);
248 // AliMixture( 5, "Scintillator$",ascin,zscin,denscin,-2,wscin);
249 AliMixture( 6, "Brass $", abrass, zbrass, denbrass, 2, wbrass);
251 AliMixture( 7, "Ribber $",aribber,zribber,denribber,-3,wribber);
256 AliMedium(1, "START Air$", 2, 0, ISXFLD, SXMGMX, 10., .1, 1., .003, .003);
257 // AliMedium(2102, "Scintillator$", 5, 1, ISXFLD, SXMGMX, 10., .01, 1., .003, .003);
258 AliMedium(3, "Vacuum$", 1, 0, ISXFLD, SXMGMX, 10., .01, .1, .003, .003);
259 AliMedium(4, "Ceramic$", 9, 0, ISXFLD, SXMGMX, 10., .01, .1, .003, .003);
260 AliMedium(6, "Glass$", 4, 0, ISXFLD, SXMGMX, 10., .01, .1, .003, .003);
261 AliMedium(8, "Steel$", 0, 0, ISXFLD, SXMGMX, 1., .001, 1., .001, .001);
262 AliMedium(11, "Brass $", 6, 0, ISXFLD, SXMGMX, 10., .01, .1, .003, .003);
263 AliMedium(9, "Ribber $", 7, 0, ISXFLD, SXMGMX, 10., .01, .1, .003, .003);
267 //---------------------------------------------------------------------
268 void AliSTARTv0::DrawDetector()
271 // Draw a shaded view of the Forward multiplicity detector version 0
274 //Set ALIC mother transparent
275 gMC->Gsatt("ALIC","SEEN",0);
277 //Set volumes visible
278 gMC->Gsatt("STRT","SEEN",0);
279 //gMC->Gsatt("SCIN","SEEN",1);
280 gMC->Gsatt("PMT ","SEEN",1);
281 gMC->Gsatt("DIVI","SEEN",1);
283 gMC->Gdopt("hide","on");
284 gMC->Gdopt("shad","on");
285 gMC->SetClipBox(".");
286 gMC->SetClipBox("*",0,1000,-1000,1000,-1000,1000);
288 gMC->Gdraw("alic",40,30,0,12,9.5,.2,0.2);
289 gMC->Gdhead(1111,"T-Zero detector");
290 gMC->Gdopt("hide","off");
292 //-------------------------------------------------------------------
293 void AliSTARTv0::Init()
295 // Initialises version 0 of the Forward Multiplicity Detector
298 //Int_t *idtmed = gAlice->Idtmed();
300 fIdSens1=gMC->VolId("PTOP");
301 printf("*** START version 0 initialized ***\n");
305 //-------------------------------------------------------------------
307 void AliSTARTv0::StepManager()
310 // Called for every step in the START Detector
313 static Float_t hits[7];
318 TClonesArray &lhits = *fHits;
319 //AliMC* gMC=AliMC::GetMC();
320 // TGeant3* geant3= (TGeant3*)gMC;
322 if(!gMC->IsTrackAlive()) return; // particle has disappeared
323 Float_t charge = gMC->TrackCharge();
324 if(TMath::Abs(charge)<=0.) return; //take only charged particles
326 id=gMC->CurrentVolID(copy);
329 // printf("igauto %d\n",gMC->ctrak->igauto);
330 // printf("gMC->ckine->ipart %d",gMC->ckine->ipart);
331 // Check the sensetive volume
334 if(gMC->IsTrackEntering())
336 gMC->CurrentVolOffID(2,copy);
338 gMC->CurrentVolOffID(1,copy1);
340 gMC->TrackPosition(pos);
344 Float_t etot=gMC->Etot();
346 Int_t part= gMC->TrackPid();
348 Float_t ttime=gMC->TrackTime();
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=gMC -> TrackLength();
356 // for (i=0; i<=6; i++){
357 // printf(" HITS on START entr %f\n",hits[i]);}
360 if(gMC->IsTrackInside())
362 Float_t de=gMC->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(gMC->IsTrackExiting())
370 Float_t de=gMC->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 //---------------------------------------------------------------------