]>
Commit | Line | Data |
---|---|---|
4c039060 | 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 | $Log$ | |
2ca99a7f | 18 | Revision 1.10 2000/12/04 08:48:19 alibrary |
19 | Fixing problems in the HEAD | |
20 | ||
0cc62300 | 21 | Revision 1.9 2000/10/02 21:28:13 fca |
22 | Removal of useless dependecies via forward declarations | |
23 | ||
94de3818 | 24 | Revision 1.8 2000/07/13 16:41:29 fca |
25 | New START corrected for coding conventions | |
26 | ||
ef51244a | 27 | Revision 1.7 2000/01/21 15:45:23 fca |
28 | New Version from Alla | |
29 | ||
971579f6 | 30 | Revision 1.6 1999/11/12 15:04:00 fca |
31 | Modifications from A.Maevskaya | |
32 | ||
82fc3fb3 | 33 | Revision 1.5 1999/09/29 09:24:29 fca |
34 | Introduction of the Copyright and cvs Log | |
35 | ||
971579f6 | 36 | */ |
4c039060 | 37 | |
6ca40650 | 38 | ///////////////////////////////////////////////////////////////////// |
39 | // // | |
40 | // START ( T-zero) detector version 0 // | |
41 | // | |
42 | //Begin Html | |
43 | /* | |
44 | <img src="gif/AliSTARTv0Class.gif"> | |
45 | */ | |
46 | //End Html | |
47 | // // | |
48 | // // | |
49 | ////////////////////////////////////////////////////////////////////// | |
50 | ||
51 | #include <TMath.h> | |
52 | #include <TGeometry.h> | |
53 | #include <TTUBE.h> | |
54 | #include <TNode.h> | |
0cc62300 | 55 | #include <TLorentzVector.h> |
6ca40650 | 56 | |
57 | #include "AliSTARTv0.h" | |
58 | #include "AliRun.h" | |
59 | #include "AliMC.h" | |
94de3818 | 60 | #include "AliMagF.h" |
971579f6 | 61 | #include "AliSTARThit.h" |
6ca40650 | 62 | |
63 | #include <iostream.h> | |
64 | #include <fstream.h> | |
65 | ||
66 | //#include "TGeant3.h" | |
67 | #include <stdlib.h> | |
68 | ||
69 | ClassImp(AliSTARTv0) | |
70 | ||
71 | //-------------------------------------------------------------------- | |
72 | AliSTARTv0::AliSTARTv0(const char *name, const char *title): | |
73 | AliSTART(name,title) | |
74 | { | |
75 | // | |
76 | // Standart constructor for START Detector version 0 | |
77 | // | |
78 | fIdSens1=0; | |
79 | // setBufferSize(128000); | |
80 | } | |
81 | //------------------------------------------------------------------------- | |
82 | void AliSTARTv0::CreateGeometry() | |
83 | { | |
84 | // | |
85 | // Create the geometry of START Detector version 0 | |
86 | // | |
87 | // begin Html | |
88 | /* | |
89 | <img src="gif/AliSTARTv0.gif"> | |
90 | */ | |
91 | // | |
92 | ||
93 | ||
971579f6 | 94 | Int_t *idtmed = fIdtmed->GetArray(); |
6ca40650 | 95 | |
96 | Int_t is; | |
97 | Int_t idrotm[999]; | |
98 | Float_t x,y,z; | |
99 | ||
100 | Float_t pstart[3]={4.5,10.7,5.3}; | |
6ca40650 | 101 | Float_t ppmt[3]={0.,1.3,3.5}; |
102 | Float_t pdivider[3]={0.,1.2,1.75}; | |
103 | Float_t pdiv2[3]={0.,1.2,1.25}; | |
104 | Float_t pdiv1[3]={0.6,1.2,0.5}; | |
105 | Float_t ptop[3]={0.,1.3,1.5}; | |
106 | Float_t pbot[3]={0.6,1.2,0.1}; | |
107 | Float_t pglass[3]={1.2,1.3,2.}; | |
108 | Float_t pcer[3]={0.9,1.1,0.09}; | |
109 | Float_t psteel[3]={0.9,1.1,0.01}; | |
110 | Float_t ppins[3]={0.6,1.2,0.014}; | |
111 | Float_t phole[3]={0.6,1.2,0.015}; | |
112 | Float_t pknob[3]={0.5,0.6,0.4}; | |
113 | Float_t pknob_vac[3]={0.,0.5,0.4}; | |
114 | Float_t pknob_bot[3]={0.,0.6,0.05}; | |
115 | Float_t pribber[3] = {0.,1.2,2.413/2.}; | |
116 | Float_t presist[3] = {0.,1.2,0.087/2.}; | |
117 | ||
118 | Float_t zdet=75.; | |
119 | //------------------------------------------------------------------- | |
120 | // START volume | |
121 | //------------------------------------------------------------------- | |
971579f6 | 122 | |
6ca40650 | 123 | AliMatrix(idrotm[901], 90., 0., 90., 90., 180., 0.); |
2ca99a7f | 124 | gMC->Gsvolu("0STA","TUBE",idtmed[1],pstart,3); |
125 | gMC->Gspos("0STA",1,"ALIC",0.,0.,zdet,0,"ONLY"); | |
126 | gMC->Gspos("0STA",2,"ALIC",0.,0.,-zdet,idrotm[901],"ONLY"); | |
6ca40650 | 127 | |
128 | //START interior | |
2ca99a7f | 129 | gMC->Gsvolu("0PMT","TUBE",idtmed[3],ppmt,3); |
130 | gMC->Gsvolu("0DIV","TUBE",idtmed[3],pdivider,3); | |
6ca40650 | 131 | |
ef51244a | 132 | // first ring: 12 units of Scintillator+PMT+divider |
971579f6 | 133 | Double_t dang1 = 2*TMath::Pi()/12; |
134 | for (is=1; is<=12; is++) | |
135 | { | |
136 | x=6.5*TMath::Sin(is*dang1); | |
137 | y=6.5*TMath::Cos(is*dang1); | |
138 | z=-pstart[2]+ppmt[2]; | |
2ca99a7f | 139 | gMC->Gspos("0PMT",is,"0STA",x,y,z,0,"ONLY"); |
971579f6 | 140 | printf("z PMT %f\n",z); |
141 | z=z+ppmt[2]+pdiv2[2]; | |
142 | printf(" is %d, z Divider %f\n",is,z); | |
2ca99a7f | 143 | gMC->Gspos("0DIV",is,"0STA",x,y,z,0,"ONLY"); |
971579f6 | 144 | } |
145 | /* | |
6ca40650 | 146 | //second ring: 20 units of Scintillator+PMT+divider |
971579f6 | 147 | Double_t dang2 = 2*TMath::Pi()/26; |
148 | Double_t dang3 = 2*TMath::Pi()/20; | |
149 | for (is=14; is<=33;is++) | |
150 | { | |
151 | x=9.3*TMath::Sin(dang2+(is-13)*dang3); | |
152 | y=9.3*TMath::Cos(dang2+(is-13)*dang3); | |
6ca40650 | 153 | z=-pstart[2]+ppmt[2]; |
2ca99a7f | 154 | gMC->Gspos("0PMT",is,"0ST",x,y,z,0,"ONLY"); |
971579f6 | 155 | z=z+ppmt[2]+pdiv2[2]; |
2ca99a7f | 156 | gMC->Gspos("0DI",is,"0ST",x,y,z,0,"ONLY"); |
971579f6 | 157 | } |
158 | */ | |
6ca40650 | 159 | // PMT |
160 | ||
971579f6 | 161 | // Entry window (glass) |
2ca99a7f | 162 | gMC->Gsvolu("0TOP","TUBE",idtmed[6],ptop,3); |
971579f6 | 163 | z=-ppmt[2]+ptop[2]; |
2ca99a7f | 164 | gMC->Gspos("0TOP",1,"0PMT",0,0,z,0,"ONLY"); |
971579f6 | 165 | // printf("Z PTOP %f -ppmt[2] %f ptop[2] %f\n",z,-ppmt[2],ptop[2]); |
166 | // Bottom glass | |
2ca99a7f | 167 | gMC->Gsvolu("0BO","TUBE",idtmed[6],pbot,3); |
971579f6 | 168 | z=ppmt[2]-pbot[2]; |
169 | printf("Z bottom %f\n",z); | |
2ca99a7f | 170 | gMC->Gspos("0BO",1,"0PMT",0,0,z,0,"ONLY"); |
971579f6 | 171 | // Side cylinder glass |
2ca99a7f | 172 | gMC->Gsvolu("0UO","TUBE",idtmed[6],pglass,3); |
971579f6 | 173 | z=ppmt[2]-pglass[2]; |
174 | // printf("Z glass %f\n",z); | |
2ca99a7f | 175 | gMC->Gspos("0OU",1,"0PMT",0,0,z,0,"ONLY"); |
971579f6 | 176 | //PMT electrodes support structure |
2ca99a7f | 177 | gMC->Gsvolu("0CE","TUBE",idtmed[4],pcer,3); |
178 | gMC->Gsvolu("0IR","TUBE",idtmed[8],psteel,3); | |
971579f6 | 179 | z=-ppmt[2]+2*ptop[2]+0.3;; |
180 | // printf("Z Cer 1 %f\n",z); | |
181 | for (is=1; is<=15; is++) | |
6ca40650 | 182 | { |
971579f6 | 183 | z=z+psteel[2]+pcer[2]; |
2ca99a7f | 184 | gMC->Gspos("0CE",is,"0PMT",0,0,z,0,"ONLY"); |
971579f6 | 185 | z=z+psteel[2]+pcer[2]; |
2ca99a7f | 186 | gMC->Gspos("0IR",is,"0PMT",0,0,z,0,"ONLY"); |
971579f6 | 187 | } |
188 | ||
189 | // Divider | |
190 | // Knob at the bottom of PMT baloon | |
191 | ||
2ca99a7f | 192 | gMC->Gsvolu("0OB","TUBE",idtmed[6],pknob,3); |
971579f6 | 193 | z=-pdivider[2]+pknob[2]; |
194 | // printf("zknob %f\n",z); | |
2ca99a7f | 195 | gMC->Gspos("0OB",1,"0DIV",0,0,z,0,"ONLY"); |
196 | gMC->Gsvolu("0KB","TUBE",idtmed[6],pknob_bot,3); | |
971579f6 | 197 | z=-pdivider[2]+2*pknob[2]+pknob_bot[2]; |
198 | // printf("knobbot %f\n",z); | |
2ca99a7f | 199 | gMC->Gspos("0KB",1,"0DIV",0,0,z,0,"ONLY"); |
200 | gMC->Gsvolu("0VA","TUBE",idtmed[6],pknob_vac,3); | |
971579f6 | 201 | z=-pdivider[2]+pknob_vac[2]; |
202 | // printf("knobvac %f\n",z); | |
2ca99a7f | 203 | gMC->Gspos("0VA",1,"0DIV",0,0,z,0,"ONLY"); |
971579f6 | 204 | //Steel pins + pin holes |
2ca99a7f | 205 | gMC->Gsvolu("0PI","TUBE",idtmed[8],ppins,3); |
971579f6 | 206 | z=-pdivider[2]+ppins[2]; |
2ca99a7f | 207 | gMC->Gspos("0PI",1,"0DIV",0,0,z,0,"ONLY"); |
208 | gMC->Gsvolu("0HO","TUBE",idtmed[11],phole,3); | |
971579f6 | 209 | z=-pdivider[2]+2*ppins[2]+phole[2]; |
2ca99a7f | 210 | gMC->Gspos("0HO",1,"0DIV",0,0,z,0,"ONLY"); |
971579f6 | 211 | |
212 | //Socket | |
2ca99a7f | 213 | gMC->Gsvolu("0V1","TUBE",idtmed[4],pdiv1,3); |
971579f6 | 214 | z=-pdivider[2]+pdiv1[2]; |
2ca99a7f | 215 | gMC->Gspos("0V1",1,"0DIV",0,0,z,0,"ONLY"); |
971579f6 | 216 | //Resistors |
2ca99a7f | 217 | gMC->Gsvolu("0V2","TUBE",idtmed[1],pdiv2,3); |
971579f6 | 218 | z=pdivider[2]-pdiv2[2]; |
2ca99a7f | 219 | gMC->Gspos("0V2",1,"0DIV",0,0,z,0,"ONLY"); |
220 | gMC->Gsvolu("0DR","TUBE",idtmed[4],presist,3); | |
971579f6 | 221 | z=-pdiv2[2]+presist[2]; |
2ca99a7f | 222 | gMC->Gspos("0DR",1,"0V2",0,0,z,0,"ONLY"); |
223 | gMC->Gsvolu("0RB","TUBE",idtmed[9],pribber,3); | |
971579f6 | 224 | z=pdiv2[2]-pribber[2]; |
2ca99a7f | 225 | gMC->Gspos("0RB",1,"0V2",0,0,z,0,"ONLY"); |
971579f6 | 226 | // printf("z DRIB %f\n",z); |
227 | ||
228 | ||
6ca40650 | 229 | } |
230 | //------------------------------------------------------------------------ | |
231 | void AliSTARTv0::CreateMaterials() | |
232 | { | |
ef51244a | 233 | Int_t isxfld = gAlice->Field()->Integ(); |
234 | Float_t sxmgmx = gAlice->Field()->Max(); | |
6ca40650 | 235 | Float_t a,z,d,radl,absl,buf[1]; |
236 | Int_t nbuf; | |
237 | ||
238 | // Scintillator CH | |
82fc3fb3 | 239 | Float_t ascin[2]={1.01,12.01}; |
240 | Float_t zscin[2]={1,6}; | |
241 | Float_t wscin[2]={1,1}; | |
242 | Float_t denscin=1.03; | |
6ca40650 | 243 | // PMT glass SiO2 |
971579f6 | 244 | Float_t aglass[2]={28.0855,15.9994}; |
245 | Float_t zglass[2]={14.,8.}; | |
246 | Float_t wglass[2]={1.,2.}; | |
247 | Float_t dglass=2.65; | |
6ca40650 | 248 | // Ceramic 97.2% Al2O3 , 2.8% SiO2 |
971579f6 | 249 | Float_t acer[2],zcer[2],wcer[2]={0.972,0.028}; |
250 | Float_t aal2o3[2] = { 26.981539,15.9994 }; | |
251 | Float_t zal2o3[2] = { 13.,8. }; | |
252 | Float_t wal2o3[2] = { 2.,3. }; | |
253 | Float_t denscer = 3.6; | |
6ca40650 | 254 | |
255 | // Brass 80% Cu, 20% Zn | |
256 | Float_t abrass[2] = {63.546,65.39}; | |
257 | Float_t zbrass[2] = {29,30}; | |
258 | Float_t wbrass[2] = {0.8,0.2}; | |
259 | Float_t denbrass=8.96; | |
260 | ||
261 | //Ribber C6H12S | |
262 | Float_t aribber[3] = {12.,1.,32.}; | |
263 | Float_t zribber[3] = {6.,1.,16.}; | |
264 | Float_t wribber[3] = {6.,12.,1.}; | |
265 | Float_t denribber=0.8; | |
971579f6 | 266 | /* |
267 | // Definition Cherenkov parameters | |
268 | Float_t ppckov[14] = { 5.63e-9,5.77e-9,5.9e-9,6.05e-9,6.2e-9,6.36e-9,6.52e-9,6.7e-9,6.88e-9,7.08e-9,7.3e-9,7.51e-9,7.74e-9,8e-9 }; | |
269 | Float_t rindex_quarz[14] = { 1.528309,1.533333, | |
270 | 1.538243,1.544223,1.550568,1.55777, | |
271 | 1.565463,1.574765,1.584831,1.597027, | |
272 | 1.611858,1.6277,1.6472,1.6724 }; | |
6ca40650 | 273 | |
971579f6 | 274 | Float_t absco_quarz[14] = { 20.126,16.27,13.49,11.728,9.224,8.38,7.44,7.17, |
275 | 6.324,4.483,1.6,.323,.073,0. }; | |
276 | */ | |
277 | // Int_t *idtmed = fIdtmed->GetArray()-999; | |
278 | ||
279 | // TGeant3 *geant3 = (TGeant3*) gMC; | |
280 | ||
6ca40650 | 281 | //*** Definition Of avaible START materials *** |
971579f6 | 282 | AliMaterial(0, "START Steel$", 55.850,26.,7.87,1.76,999); |
283 | AliMaterial(1, "START Vacuum$", 1.e-16,1.e-16,1.e-16,1.e16,999); | |
284 | AliMaterial(2, "START Air$", 14.61, 7.3, .001205, 30423.,999); | |
285 | ||
286 | AliMixture( 3, "Al2O3 $", aal2o3, zal2o3, denscer, -2, wal2o3); | |
287 | AliMixture( 4, "PMT glass $",aglass,zglass,dglass,-2,wglass); | |
288 | char namate[21]; | |
289 | gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf); | |
290 | acer[0]=a; | |
291 | zcer[0]=z; | |
292 | gMC->Gfmate((*fIdmate)[4], namate, a, z, d, radl, absl, buf, nbuf); | |
293 | acer[1]=a; | |
294 | zcer[1]=z; | |
295 | ||
296 | AliMixture( 9, "Ceramic $", acer, zcer, denscer, 2, wcer); | |
297 | AliMixture( 5, "Scintillator$",ascin,zscin,denscin,-2,wscin); | |
298 | AliMixture( 6, "Brass $", abrass, zbrass, denbrass, 2, wbrass); | |
299 | ||
300 | AliMixture( 7, "Ribber $",aribber,zribber,denribber,-3,wribber); | |
301 | ||
302 | ||
ef51244a | 303 | AliMedium(1, "START Air$", 2, 0, isxfld, sxmgmx, 10., .1, 1., .003, .003); |
304 | AliMedium(2, "Scintillator$", 5, 1, isxfld, sxmgmx, 10., .01, 1., .003, .003); | |
305 | AliMedium(3, "Vacuum$", 1, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003); | |
306 | AliMedium(4, "Ceramic$", 9, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003); | |
307 | AliMedium(6, "Glass$", 4, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003); | |
308 | AliMedium(8, "Steel$", 0, 0, isxfld, sxmgmx, 1., .001, 1., .001, .001); | |
309 | AliMedium(11, "Brass $", 6, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003); | |
310 | AliMedium(9, "Ribber $", 7, 0, isxfld, sxmgmx, 10., .01, .1, .003, .003); | |
6ca40650 | 311 | |
971579f6 | 312 | // geant3->Gsckov(idtmed[2105], 14, ppckov, absco_quarz, effic_all,rindex_quarz); |
6ca40650 | 313 | |
314 | } | |
315 | //--------------------------------------------------------------------- | |
77ee006c | 316 | void AliSTARTv0::DrawModule() |
6ca40650 | 317 | { |
318 | // | |
319 | // Draw a shaded view of the Forward multiplicity detector version 0 | |
320 | // | |
971579f6 | 321 | |
322 | //Set ALIC mother transparent | |
323 | gMC->Gsatt("ALIC","SEEN",0); | |
324 | // | |
325 | //Set volumes visible | |
2ca99a7f | 326 | gMC->Gsatt("0STA","SEEN",0); |
327 | gMC->Gsatt("0PMT","SEEN",1); | |
328 | gMC->Gsatt("0DIV","SEEN",1); | |
971579f6 | 329 | // |
330 | gMC->Gdopt("hide","on"); | |
331 | gMC->Gdopt("shad","on"); | |
332 | gMC->SetClipBox("."); | |
333 | gMC->SetClipBox("*",0,1000,-1000,1000,-1000,1000); | |
334 | gMC->DefaultRange(); | |
335 | gMC->Gdraw("alic",40,30,0,12,9.5,.7,0.7); | |
336 | gMC->Gdhead(1111,"T-Zero detector"); | |
337 | gMC->Gdopt("hide","off"); | |
6ca40650 | 338 | } |
971579f6 | 339 | |
6ca40650 | 340 | //------------------------------------------------------------------- |
341 | void AliSTARTv0::Init() | |
342 | { | |
971579f6 | 343 | // Initialises version 0 of the Forward Multiplicity Detector |
344 | // | |
345 | //Int_t *idtmed = gAlice->Idtmed(); | |
ca7295b2 | 346 | AliSTART::Init(); |
2ca99a7f | 347 | fIdSens1=gMC->VolId("0TOP"); |
ca7295b2 | 348 | printf("*** START version 0 initialized ***\n"); |
6ca40650 | 349 | |
350 | } | |
351 | ||
352 | //------------------------------------------------------------------- | |
353 | ||
354 | void AliSTARTv0::StepManager() | |
355 | { | |
356 | // | |
357 | // Called for every step in the START Detector | |
358 | // | |
359 | Int_t id,copy,copy1; | |
360 | static Float_t hits[7]; | |
361 | static Float_t edep; | |
362 | static Int_t vol[2]; | |
ca7295b2 | 363 | TLorentzVector pos; |
971579f6 | 364 | |
6ca40650 | 365 | TClonesArray &lhits = *fHits; |
6ca40650 | 366 | |
367 | if(!gMC->IsTrackAlive()) return; // particle has disappeared | |
368 | Float_t charge = gMC->TrackCharge(); | |
369 | if(TMath::Abs(charge)<=0.) return; //take only charged particles | |
971579f6 | 370 | // gMC->Gpcxyz(); |
371 | id=gMC->CurrentVolID(copy); | |
372 | ||
373 | ||
374 | // printf("gMC->ckine->ipart %d",gMC->ckine->ipart); | |
375 | // Check the sensetive volume | |
376 | if(id==fIdSens1 ) { | |
377 | if(gMC->IsTrackEntering()) { | |
378 | gMC->CurrentVolOffID(2,copy); | |
379 | vol[0]=copy; | |
380 | gMC->CurrentVolOffID(1,copy1); | |
381 | vol[1]=copy1; | |
382 | gMC->TrackPosition(pos); | |
383 | hits[0] = pos[0]; | |
384 | hits[1] = pos[1]; | |
385 | hits[2] = pos[2]; | |
386 | Float_t etot=gMC->Etot(); | |
387 | hits[4]=etot; | |
388 | Int_t part= gMC->TrackPid(); | |
389 | hits[5]=part; | |
390 | Float_t ttime=gMC->TrackTime(); | |
391 | hits[6]=ttime*1e9; | |
392 | edep=0; | |
6ca40650 | 393 | } |
971579f6 | 394 | if(gMC->IsTrackInside()) { |
395 | Float_t de=gMC->Edep(); | |
396 | edep=edep+de; | |
397 | // printf ("E deposition %f\n",edep); | |
398 | // for (i=0; i<=6; i++){ | |
399 | // printf(" HITS on START inside %f\n",hits[i]); } | |
6ca40650 | 400 | } |
971579f6 | 401 | if(gMC->IsTrackExiting()) { |
402 | Float_t de=gMC->Edep(); | |
403 | edep=edep+de; | |
404 | hits[3]=edep*1e3; | |
405 | ||
406 | // for (i=0; i<=6; i++){ | |
407 | // printf(" HITS on START Exit %f\n",hits[i]); } | |
408 | //for (i=0; i<=1; i++) { printf("START vol %d\n",vol[i]);} | |
409 | ||
410 | new(lhits[fNhits++]) AliSTARThit(fIshunt,gAlice->CurrentTrack(),vol,hits); | |
411 | } | |
412 | } | |
413 | //--------------------------------------------------------------------- | |
414 | } | |
415 | ||
416 | ||
417 | ||
6ca40650 | 418 | |
419 | ||
420 | ||
421 | ||
422 | ||
423 |