]>
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$ | |
00e5f8d9 | 18 | Revision 1.10 1999/10/15 15:35:20 fca |
19 | New version for frame1099 with and without holes | |
20 | ||
937fe4a4 | 21 | Revision 1.9 1999/09/29 09:24:33 fca |
22 | Introduction of the Copyright and cvs Log | |
23 | ||
4c039060 | 24 | */ |
25 | ||
fe4da5cc | 26 | /////////////////////////////////////////////////////////////////////////////// |
27 | // // | |
937fe4a4 | 28 | // Time Of Flight: design of C.Williams FCA // |
29 | // This class contains the functions for version 1 of the Time Of Flight // | |
fe4da5cc | 30 | // detector. // |
937fe4a4 | 31 | // |
32 | // VERSION WITH 5 MODULES AND TILTED STRIPS | |
33 | // | |
34 | // WITH HOLES FOR PHOS AND HMPID inside the | |
35 | // SPACE FRAME WITH HOLES | |
36 | // | |
37 | // | |
38 | // Authors: | |
39 | // | |
40 | // Alessio Seganti | |
41 | // Domenico Vicinanza | |
42 | // | |
43 | // University of Salerno - Italy | |
44 | // | |
45 | // | |
fe4da5cc | 46 | //Begin_Html |
47 | /* | |
1439f98e | 48 | <img src="picts/AliTOFv0Class.gif"> |
fe4da5cc | 49 | */ |
50 | //End_Html | |
51 | // // | |
52 | /////////////////////////////////////////////////////////////////////////////// | |
53 | ||
54 | #include "AliTOFv0.h" | |
55 | #include "AliRun.h" | |
fe4da5cc | 56 | #include "AliConst.h" |
3fe3a833 | 57 | |
fe4da5cc | 58 | ClassImp(AliTOFv0) |
59 | ||
60 | //_____________________________________________________________________________ | |
151e057e | 61 | AliTOFv0::AliTOFv0() |
fe4da5cc | 62 | { |
63 | // | |
64 | // Default constructor | |
65 | // | |
66 | } | |
67 | ||
68 | //_____________________________________________________________________________ | |
69 | AliTOFv0::AliTOFv0(const char *name, const char *title) | |
70 | : AliTOF(name,title) | |
71 | { | |
72 | // | |
3fe3a833 | 73 | // Standard constructor |
fe4da5cc | 74 | // |
75 | } | |
76 | ||
77 | //_____________________________________________________________________________ | |
78 | void AliTOFv0::CreateGeometry() | |
79 | { | |
80 | // | |
3fe3a833 | 81 | // Create geometry for Time Of Flight version 0 |
82 | // | |
fe4da5cc | 83 | //Begin_Html |
84 | /* | |
1439f98e | 85 | <img src="picts/AliTOFv0.gif"> |
fe4da5cc | 86 | */ |
87 | //End_Html | |
88 | // | |
937fe4a4 | 89 | // Creates common geometry |
fe4da5cc | 90 | // |
3fe3a833 | 91 | AliTOF::CreateGeometry(); |
fe4da5cc | 92 | } |
93 | ||
94 | //_____________________________________________________________________________ | |
937fe4a4 | 95 | void AliTOFv0::TOFpc(Float_t xtof, Float_t ytof, Float_t zlen1, |
96 | Float_t zlen2, Float_t zlen3, Float_t ztof0) | |
fe4da5cc | 97 | { |
98 | // | |
3fe3a833 | 99 | // Definition of the Time Of Fligh Resistive Plate Chambers |
937fe4a4 | 100 | // xFLT, yFLT, zFLT - sizes of TOF modules (large) |
3fe3a833 | 101 | |
102 | Float_t ycoor; | |
3fe3a833 | 103 | Float_t par[10]; |
937fe4a4 | 104 | Int_t idrotm[100]; |
105 | Int_t nrot = 0; | |
3fe3a833 | 106 | |
107 | Int_t *idtmed = fIdtmed->GetArray()-499; | |
937fe4a4 | 108 | |
109 | ||
110 | par[0] = xtof / 2.; | |
111 | par[1] = ytof / 2.; | |
112 | par[2] = zlen1 / 2.; | |
113 | gMC->Gsvolu("FTO1", "BOX ", idtmed[506], par, 3); | |
114 | par[2] = zlen2 / 2.; | |
115 | gMC->Gsvolu("FTO2", "BOX ", idtmed[506], par, 3); | |
116 | par[2] = zlen3 / 2.; | |
117 | gMC->Gsvolu("FTO3", "BOX ", idtmed[506], par, 3); | |
118 | ||
119 | ||
120 | // Positioning of modules | |
121 | ||
122 | Float_t zcoor; | |
123 | ||
124 | Float_t zcor1 = ztof0 - zlen1/2; | |
125 | Float_t zcor2 = ztof0 - zlen1 - zlen2/2.; | |
126 | Float_t zcor3 = 0.; | |
127 | ||
128 | AliMatrix(idrotm[0], 90., 0., 0., 0., 90, -90.); | |
129 | AliMatrix(idrotm[1], 90., 180., 0., 0., 90, 90.); | |
130 | gMC->Gspos("FTO1", 1, "BTO1", 0, zcor1, 0, idrotm[0], "ONLY"); | |
131 | gMC->Gspos("FTO1", 2, "BTO1", 0, -zcor1, 0, idrotm[1], "ONLY"); | |
132 | zcoor = (zlen1/2.); | |
133 | gMC->Gspos("FTO1", 1, "BTO2", 0, zcoor, 0, idrotm[0], "ONLY"); | |
134 | zcoor = 0.; | |
135 | gMC->Gspos("FTO1", 1, "BTO3", 0, zcoor, 0, idrotm[0], "ONLY"); | |
136 | ||
137 | gMC->Gspos("FTO2", 1, "BTO1", 0, zcor2, 0, idrotm[0], "ONLY"); | |
138 | gMC->Gspos("FTO2", 2, "BTO1", 0, -zcor2, 0, idrotm[1], "ONLY"); | |
139 | zcoor = -zlen2/2.; | |
140 | gMC->Gspos("FTO2", 0, "BTO2", 0, zcoor, 0, idrotm[0], "ONLY"); | |
141 | ||
142 | gMC->Gspos("FTO3", 0, "BTO1", 0, zcor3, 0, idrotm[0], "ONLY"); | |
143 | ||
144 | // Subtraction the distance to TOF module boundaries | |
145 | ||
146 | Float_t db = 7.; | |
147 | Float_t xFLT, yFLT, zFLT1, zFLT2, zFLT3; | |
148 | ||
149 | xFLT = xtof -(.5 +.5)*2; | |
150 | yFLT = ytof; | |
151 | zFLT1 = zlen1 - db; | |
152 | zFLT2 = zlen2 - db; | |
153 | zFLT3 = zlen3 - db; | |
154 | ||
155 | // Sizes of MRPC pads | |
156 | ||
157 | Float_t yPad = 0.505; | |
3fe3a833 | 158 | |
937fe4a4 | 159 | // Large not sensitive volumes with CO2 |
160 | par[0] = xFLT/2; | |
161 | par[1] = yFLT/2; | |
162 | ||
3fe3a833 | 163 | cout <<"************************* TOF geometry **************************"<<endl; |
937fe4a4 | 164 | |
165 | par[2] = (zFLT1 / 2.); | |
3fe3a833 | 166 | gMC->Gsvolu("FLT1", "BOX ", idtmed[506], par, 3); // CO2 |
937fe4a4 | 167 | gMC->Gspos("FLT1", 0, "FTO1", 0., 0., 0., 0, "ONLY"); |
168 | ||
169 | par[2] = (zFLT2 / 2.); | |
3fe3a833 | 170 | gMC->Gsvolu("FLT2", "BOX ", idtmed[506], par, 3); // CO2 |
937fe4a4 | 171 | gMC->Gspos("FLT2", 0, "FTO2", 0., 0., 0., 0, "ONLY"); |
172 | ||
173 | par[2] = (zFLT3 / 2.); | |
3fe3a833 | 174 | gMC->Gsvolu("FLT3", "BOX ", idtmed[506], par, 3); // CO2 |
937fe4a4 | 175 | gMC->Gspos("FLT3", 0, "FTO3", 0., 0., 0., 0, "ONLY"); |
176 | ||
3fe3a833 | 177 | ////////// Layers before detector //////////////////// |
937fe4a4 | 178 | |
179 | // Alluminium layer in front 1.0 mm thick at the beginning | |
3fe3a833 | 180 | par[0] = -1; |
937fe4a4 | 181 | par[1] = 0.1; |
3fe3a833 | 182 | par[2] = -1; |
937fe4a4 | 183 | ycoor = -yFLT/2 + par[1]; |
184 | gMC->Gsvolu("FMY1", "BOX ", idtmed[508], par, 3); // Alluminium | |
3fe3a833 | 185 | gMC->Gspos("FMY1", 0, "FLT1", 0., ycoor, 0., 0, "ONLY"); |
937fe4a4 | 186 | gMC->Gsvolu("FMY2", "BOX ", idtmed[508], par, 3); // Alluminium |
3fe3a833 | 187 | gMC->Gspos("FMY2", 0, "FLT2", 0., ycoor, 0., 0, "ONLY"); |
937fe4a4 | 188 | gMC->Gsvolu("FMY3", "BOX ", idtmed[508], par, 3); // Alluminium |
3fe3a833 | 189 | gMC->Gspos("FMY3", 0, "FLT3", 0., ycoor, 0., 0, "ONLY"); |
937fe4a4 | 190 | |
191 | // Honeycomb layer (1cm of special polyethilene) | |
3fe3a833 | 192 | ycoor = ycoor + par[1]; |
193 | par[0] = -1; | |
937fe4a4 | 194 | par[1] = 0.5; |
3fe3a833 | 195 | par[2] = -1; |
196 | ycoor = ycoor + par[1]; | |
197 | gMC->Gsvolu("FPL1", "BOX ", idtmed[503], par, 3); // Hony | |
198 | gMC->Gspos("FPL1", 0, "FLT1", 0., ycoor, 0., 0, "ONLY"); | |
199 | gMC->Gsvolu("FPL2", "BOX ", idtmed[503], par, 3); // Hony | |
200 | gMC->Gspos("FPL2", 0, "FLT2", 0., ycoor, 0., 0, "ONLY"); | |
201 | gMC->Gsvolu("FPL3", "BOX ", idtmed[503], par, 3); // Hony | |
202 | gMC->Gspos("FPL3", 0, "FLT3", 0., ycoor, 0., 0, "ONLY"); | |
937fe4a4 | 203 | |
3fe3a833 | 204 | ///////////////// Detector itself ////////////////////// |
937fe4a4 | 205 | |
206 | const Float_t StripWidth = 7.81;//cm | |
207 | const Float_t DeadBound = 1.;//cm non-sensitive between the pad edge and the boundary of the strip | |
208 | const Int_t nx = 40; // number of pads along x | |
209 | const Int_t nz = 2; // number of pads along z | |
210 | const Float_t Gap=4.; //cm distance between the strip axis | |
211 | const Float_t Space = 5.5; //cm distance from the front plate of the box | |
212 | ||
213 | Float_t zSenStrip; | |
214 | zSenStrip = StripWidth-2*DeadBound;//cm | |
215 | ||
3fe3a833 | 216 | par[0] = -1; |
937fe4a4 | 217 | par[1] = yPad/2; |
218 | par[2] = StripWidth/2.; | |
219 | ||
220 | // Glass Layer of detector | |
221 | gMC->Gsvolu("FSTR","BOX",idtmed[514],par,3); | |
222 | ||
223 | // Freon for non-sesitive boundaries | |
3fe3a833 | 224 | par[0] = -1; |
937fe4a4 | 225 | par[1] = 0.110/2; |
3fe3a833 | 226 | par[2] = -1; |
937fe4a4 | 227 | gMC->Gsvolu("FNSF","BOX",idtmed[512],par,3); |
228 | gMC->Gspos("FNSF",0,"FSTR",0.,0.,0.,0,"ONLY"); | |
229 | // Mylar for non-sesitive boundaries | |
230 | par[1] = 0.025; | |
231 | gMC->Gsvolu("FMYI","BOX",idtmed[510],par,3); | |
232 | gMC->Gspos("FMYI",0,"FNSF",0.,0.,0.,0,"ONLY"); | |
233 | ||
234 | // Mylar for outer layers | |
235 | par[1] = 0.035/2; | |
236 | ycoor = -yPad/2.+par[1]; | |
237 | gMC->Gsvolu("FMYX","BOX",idtmed[510],par,3); | |
238 | gMC->Gspos("FMYX",1,"FSTR",0.,ycoor,0.,0,"ONLY"); | |
239 | gMC->Gspos("FMYX",2,"FSTR",0.,-ycoor,0.,0,"ONLY"); | |
240 | ycoor += par[1]; | |
241 | ||
242 | // Graphyte layers | |
243 | par[1] = 0.003/2; | |
244 | ycoor += par[1]; | |
245 | gMC->Gsvolu("FGRL","BOX",idtmed[502],par,3); | |
246 | gMC->Gspos("FGRL",1,"FSTR",0.,ycoor,0.,0,"ONLY"); | |
247 | gMC->Gspos("FGRL",2,"FSTR",0.,-ycoor,0.,0,"ONLY"); | |
248 | ||
249 | // Freon sensitive layer | |
3fe3a833 | 250 | par[0] = -1; |
937fe4a4 | 251 | par[1] = 0.110/2.; |
252 | par[2] = zSenStrip/2.; | |
253 | gMC->Gsvolu("FCFC","BOX",idtmed[513],par,3); | |
254 | gMC->Gspos("FCFC",0,"FNSF",0.,0.,0.,0,"ONLY"); | |
255 | ||
256 | // Pad definition x & z | |
257 | gMC->Gsdvn("FLZ","FCFC", nz, 3); | |
258 | gMC->Gsdvn("FLX","FLZ" , nx, 1); | |
259 | ||
937fe4a4 | 260 | //// Positioning the Strips (FSTR) in the FLT volumes ///// |
261 | ||
262 | ||
263 | // 3 (Central) Plate | |
264 | Float_t t = zFLT1+zFLT2+zFLT3/2.+7.*2.5;//Half Width of Barrel | |
265 | Float_t zpos = 0; | |
266 | Float_t ang; | |
267 | Float_t Offset; | |
268 | Float_t last; | |
269 | nrot = 0; | |
270 | Int_t i=1,j=1; | |
271 | zcoor=0; | |
272 | Int_t UpDown=-1; // UpDown=-1 -> Upper strip, UpDown=+1 -> Lower strip | |
273 | ||
274 | do{ | |
275 | ang = atan(zcoor/t); | |
00e5f8d9 | 276 | ang = ang*kRaddeg; |
277 | AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang,90.); | |
278 | AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang,90.); | |
937fe4a4 | 279 | ycoor = -14.5+ Space; //2 cm over front plate |
280 | ycoor += (1-(UpDown+1)/2)*Gap; | |
281 | gMC->Gspos("FSTR",j ,"FLT3",0.,ycoor, zcoor,idrotm[nrot], "ONLY"); | |
282 | gMC->Gspos("FSTR",j+1,"FLT3",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY"); | |
00e5f8d9 | 283 | ang = ang/kRaddeg; |
937fe4a4 | 284 | |
285 | zcoor=zcoor-(zSenStrip/2)/TMath::Cos(ang)+UpDown*Gap*TMath::Tan(ang)-(zSenStrip/2)/TMath::Cos(ang); | |
286 | UpDown*= -1; // Alternate strips | |
287 | i++; | |
288 | j+=2; | |
289 | } while (zcoor-(StripWidth/2)*TMath::Cos(ang)>-t+zFLT1+zFLT2+7*2.5); | |
290 | ||
291 | ycoor = -29./2.+ Space; //2 cm over front plate | |
292 | ||
293 | // Plate 2 | |
294 | zpos = -zFLT3/2-7.; | |
295 | ang = atan(zpos/sqrt(2*t*t-zpos*zpos)); | |
296 | Offset = StripWidth*TMath::Cos(ang)/2; | |
297 | zpos -= Offset; | |
298 | nrot = 0; | |
299 | i=1; | |
300 | // UpDown has not to be reinitialized, so that the arrangement of the strips can continue coherently | |
301 | ||
302 | do { | |
303 | ang = atan(zpos/sqrt(2*t*t-zpos*zpos)); | |
00e5f8d9 | 304 | ang = ang*kRaddeg; |
305 | AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang,270.); | |
937fe4a4 | 306 | ycoor = -29./2.+ Space ; //2 cm over front plate |
307 | ycoor += (1-(UpDown+1)/2)*Gap; | |
308 | zcoor = zpos+(zFLT3/2.+7+zFLT2/2); // Moves to the system of the centre of the modulus FLT2 | |
309 | gMC->Gspos("FSTR",i, "FLT2", 0., ycoor, zcoor,idrotm[nrot], "ONLY"); | |
00e5f8d9 | 310 | ang = ang/kRaddeg; |
937fe4a4 | 311 | zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)+UpDown*Gap*TMath::Tan(ang)-(zSenStrip/2)/TMath::Cos(ang); |
312 | last = StripWidth*TMath::Cos(ang)/2; | |
313 | UpDown*=-1; | |
314 | i++; | |
315 | } while (zpos-(StripWidth/2)*TMath::Cos(ang)>-t+zFLT1+7); | |
316 | ||
317 | // Plate 1 | |
318 | zpos = -t+zFLT1+3.5; | |
319 | ang = atan(zpos/sqrt(2*t*t-zpos*zpos)); | |
320 | Offset = StripWidth*TMath::Cos(ang)/2.; | |
321 | zpos -= Offset; | |
322 | nrot = 0; | |
323 | i=0; | |
324 | ycoor= -29./2.+Space+Gap/2; | |
325 | ||
326 | do { | |
327 | ang = atan(zpos/sqrt(2*t*t-zpos*zpos)); | |
00e5f8d9 | 328 | ang = ang*kRaddeg; |
329 | AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang,270.); | |
937fe4a4 | 330 | i++; |
331 | zcoor = zpos+(zFLT1/2+zFLT2+zFLT3/2+7.*2.); | |
332 | gMC->Gspos("FSTR",i, "FLT1", 0., ycoor, zcoor,idrotm[nrot], "ONLY"); | |
00e5f8d9 | 333 | ang = ang /kRaddeg; |
937fe4a4 | 334 | zpos = zpos - zSenStrip/TMath::Cos(ang); |
335 | last = StripWidth*TMath::Cos(ang)/2.; | |
336 | } while (zpos>-t+7.+last); | |
337 | ||
338 | printf("#######################################################\n"); | |
339 | printf(" Distance from the bound of the FLT3: zFLT3- %f cm \n", zpos+(zSenStrip/2)/TMath::Cos(ang)); | |
340 | ang = atan(zpos/sqrt(2*t*t-zpos*zpos)); | |
341 | zpos = zpos - zSenStrip/TMath::Cos(ang); | |
342 | printf("NEXT Distance from the bound of the FLT3: zFLT3- %f cm \n", zpos+(zSenStrip/2)/TMath::Cos(ang)); | |
343 | printf("#######################################################\n"); | |
344 | ||
345 | ////////// Layers after detector ///////////////// | |
346 | ||
347 | // Honeycomb layer after (3cm) | |
348 | ||
349 | Float_t OverSpace = Space + 7.3; | |
350 | /// StripWidth*TMath::Sin(ang) + 1.3; | |
351 | ||
352 | par[0] = -1; | |
353 | par[1] = 0.6; | |
3fe3a833 | 354 | par[2] = -1; |
937fe4a4 | 355 | ycoor = -yFLT/2 + OverSpace + par[1]; |
3fe3a833 | 356 | gMC->Gsvolu("FPE1", "BOX ", idtmed[503], par, 3); // Hony |
357 | gMC->Gspos("FPE1", 0, "FLT1", 0., ycoor, 0., 0, "ONLY"); | |
358 | gMC->Gsvolu("FPE2", "BOX ", idtmed[503], par, 3); // Hony | |
359 | gMC->Gspos("FPE2", 0, "FLT2", 0., ycoor, 0., 0, "ONLY"); | |
360 | gMC->Gsvolu("FPE3", "BOX ", idtmed[503], par, 3); // Hony | |
361 | gMC->Gspos("FPE3", 0, "FLT3", 0., ycoor, 0., 0, "ONLY"); | |
937fe4a4 | 362 | |
363 | // Electronics (Cu) after | |
364 | ycoor += par[1]; | |
3fe3a833 | 365 | par[0] = -1; |
366 | par[1] = 1.43*0.05 / 2.; // 5% of X0 | |
367 | par[2] = -1; | |
937fe4a4 | 368 | ycoor += par[1]; |
3fe3a833 | 369 | gMC->Gsvolu("FEC1", "BOX ", idtmed[501], par, 3); // Cu |
370 | gMC->Gspos("FEC1", 0, "FLT1", 0., ycoor, 0., 0, "ONLY"); | |
371 | gMC->Gsvolu("FEC2", "BOX ", idtmed[501], par, 3); // Cu | |
372 | gMC->Gspos("FEC2", 0, "FLT2", 0., ycoor, 0., 0, "ONLY"); | |
373 | gMC->Gsvolu("FEC3", "BOX ", idtmed[501], par, 3); // Cu | |
374 | gMC->Gspos("FEC3", 0, "FLT3", 0., ycoor, 0., 0, "ONLY"); | |
937fe4a4 | 375 | |
376 | // Cooling water after | |
377 | ycoor += par[1]; | |
3fe3a833 | 378 | par[0] = -1; |
379 | par[1] = 36.1*0.02 / 2.; // 2% of X0 | |
380 | par[2] = -1; | |
937fe4a4 | 381 | ycoor += par[1]; |
3fe3a833 | 382 | gMC->Gsvolu("FWA1", "BOX ", idtmed[515], par, 3); // Water |
383 | gMC->Gspos("FWA1", 0, "FLT1", 0., ycoor, 0., 0, "ONLY"); | |
384 | gMC->Gsvolu("FWA2", "BOX ", idtmed[515], par, 3); // Water | |
385 | gMC->Gspos("FWA2", 0, "FLT2", 0., ycoor, 0., 0, "ONLY"); | |
386 | gMC->Gsvolu("FWA3", "BOX ", idtmed[515], par, 3); // Water | |
387 | gMC->Gspos("FWA3", 0, "FLT3", 0., ycoor, 0., 0, "ONLY"); | |
937fe4a4 | 388 | |
389 | //back plate honycomb (2cm) | |
3fe3a833 | 390 | par[0] = -1; |
391 | par[1] = 2 / 2.; | |
392 | par[2] = -1; | |
937fe4a4 | 393 | ycoor = yFLT/2 - par[1]; |
3fe3a833 | 394 | gMC->Gsvolu("FEG1", "BOX ", idtmed[503], par, 3); // Hony |
395 | gMC->Gspos("FEG1", 0, "FLT1", 0., ycoor, 0., 0, "ONLY"); | |
396 | gMC->Gsvolu("FEG2", "BOX ", idtmed[503], par, 3); // Hony | |
397 | gMC->Gspos("FEG2", 0, "FLT2", 0., ycoor, 0., 0, "ONLY"); | |
398 | gMC->Gsvolu("FEG3", "BOX ", idtmed[503], par, 3); // Hony | |
399 | gMC->Gspos("FEG3", 0, "FLT3", 0., ycoor, 0., 0, "ONLY"); | |
400 | } | |
fe4da5cc | 401 | |
3fe3a833 | 402 | //_____________________________________________________________________________ |
403 | void AliTOFv0::DrawModule() | |
404 | { | |
405 | // | |
937fe4a4 | 406 | // Draw a shaded view of the Time Of Flight version 1 |
3fe3a833 | 407 | // |
fe4da5cc | 408 | // Set everything unseen |
cfce8870 | 409 | gMC->Gsatt("*", "seen", -1); |
fe4da5cc | 410 | // |
411 | // Set ALIC mother transparent | |
cfce8870 | 412 | gMC->Gsatt("ALIC","SEEN",0); |
fe4da5cc | 413 | // |
414 | // Set the volumes visible | |
3fe3a833 | 415 | gMC->Gsatt("ALIC","SEEN",0); |
416 | gMC->Gsatt("FBAR","SEEN",1); | |
417 | gMC->Gsatt("FTO1","SEEN",1); | |
418 | gMC->Gsatt("FTO2","SEEN",1); | |
419 | gMC->Gsatt("FTO3","SEEN",1); | |
cfce8870 | 420 | gMC->Gsatt("FBT1","SEEN",1); |
421 | gMC->Gsatt("FBT2","SEEN",1); | |
422 | gMC->Gsatt("FBT3","SEEN",1); | |
3fe3a833 | 423 | gMC->Gsatt("FDT1","SEEN",1); |
424 | gMC->Gsatt("FDT2","SEEN",1); | |
425 | gMC->Gsatt("FDT3","SEEN",1); | |
426 | gMC->Gsatt("FLT1","SEEN",1); | |
427 | gMC->Gsatt("FLT2","SEEN",1); | |
428 | gMC->Gsatt("FLT3","SEEN",1); | |
937fe4a4 | 429 | gMC->Gsatt("FPL1","SEEN",1); |
430 | gMC->Gsatt("FPL2","SEEN",1); | |
431 | gMC->Gsatt("FPL3","SEEN",1); | |
432 | gMC->Gsatt("FLD1","SEEN",1); | |
433 | gMC->Gsatt("FLD2","SEEN",1); | |
434 | gMC->Gsatt("FLD3","SEEN",1); | |
435 | gMC->Gsatt("FLZ1","SEEN",1); | |
436 | gMC->Gsatt("FLZ2","SEEN",1); | |
437 | gMC->Gsatt("FLZ3","SEEN",1); | |
438 | gMC->Gsatt("FLX1","SEEN",1); | |
439 | gMC->Gsatt("FLX2","SEEN",1); | |
440 | gMC->Gsatt("FLX3","SEEN",1); | |
441 | gMC->Gsatt("FPA0","SEEN",1); | |
cfce8870 | 442 | // |
443 | gMC->Gdopt("hide", "on"); | |
444 | gMC->Gdopt("shad", "on"); | |
445 | gMC->Gsatt("*", "fill", 7); | |
cfce8870 | 446 | gMC->SetClipBox("."); |
447 | gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000); | |
448 | gMC->DefaultRange(); | |
449 | gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .02, .02); | |
450 | gMC->Gdhead(1111, "Time Of Flight"); | |
451 | gMC->Gdman(18, 4, "MAN"); | |
452 | gMC->Gdopt("hide","off"); | |
fe4da5cc | 453 | } |
454 | ||
455 | //_____________________________________________________________________________ | |
456 | void AliTOFv0::CreateMaterials() | |
457 | { | |
458 | // | |
459 | // Define materials for the Time Of Flight | |
460 | // | |
461 | AliTOF::CreateMaterials(); | |
462 | } | |
463 | ||
464 | //_____________________________________________________________________________ | |
465 | void AliTOFv0::Init() | |
466 | { | |
467 | // | |
3fe3a833 | 468 | // Initialise the detector after the geometry has been defined |
fe4da5cc | 469 | // |
fe4da5cc | 470 | AliTOF::Init(); |
3fe3a833 | 471 | fIdFTO2=gMC->VolId("FTO2"); |
472 | fIdFTO3=gMC->VolId("FTO3"); | |
473 | fIdFLT1=gMC->VolId("FLT1"); | |
474 | fIdFLT2=gMC->VolId("FLT2"); | |
475 | fIdFLT3=gMC->VolId("FLT3"); | |
fe4da5cc | 476 | } |
477 | ||
478 | //_____________________________________________________________________________ | |
479 | void AliTOFv0::StepManager() | |
480 | { | |
481 | // | |
482 | // Procedure called at each step in the Time Of Flight | |
3fe3a833 | 483 | // |
484 | TLorentzVector mom, pos; | |
fe4da5cc | 485 | Float_t hits[8]; |
486 | Int_t vol[3]; | |
0a6d8768 | 487 | Int_t copy, id, i; |
ad51aeb0 | 488 | Int_t *idtmed = fIdtmed->GetArray()-499; |
3fe3a833 | 489 | if(gMC->GetMedium()==idtmed[514-1] && |
0a6d8768 | 490 | gMC->IsTrackEntering() && gMC->TrackCharge() |
3fe3a833 | 491 | && gMC->CurrentVolID(copy)==fIdSens) { |
fe4da5cc | 492 | TClonesArray &lhits = *fHits; |
493 | // | |
494 | // Record only charged tracks at entrance | |
3fe3a833 | 495 | gMC->CurrentVolOffID(1,copy); |
fe4da5cc | 496 | vol[2]=copy; |
3fe3a833 | 497 | gMC->CurrentVolOffID(3,copy); |
498 | vol[1]=copy; | |
499 | id=gMC->CurrentVolOffID(8,copy); | |
500 | vol[0]=copy; | |
501 | if(id==fIdFTO3) { | |
502 | vol[0]+=22; | |
503 | id=gMC->CurrentVolOffID(5,copy); | |
504 | if(id==fIdFLT3) vol[1]+=6; | |
505 | } else if (id==fIdFTO2) { | |
506 | vol[0]+=20; | |
507 | id=gMC->CurrentVolOffID(5,copy); | |
508 | if(id==fIdFLT2) vol[1]+=8; | |
509 | } else { | |
510 | id=gMC->CurrentVolOffID(5,copy); | |
511 | if(id==fIdFLT1) vol[1]+=14; | |
512 | } | |
0a6d8768 | 513 | gMC->TrackPosition(pos); |
514 | gMC->TrackMomentum(mom); | |
3fe3a833 | 515 | // |
0a6d8768 | 516 | Double_t ptot=mom.Rho(); |
517 | Double_t norm=1/ptot; | |
518 | for(i=0;i<3;++i) { | |
519 | hits[i]=pos[i]; | |
520 | hits[i+3]=mom[i]*norm; | |
521 | } | |
522 | hits[6]=ptot; | |
523 | hits[7]=pos[3]; | |
fe4da5cc | 524 | new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),vol,hits); |
525 | } | |
526 | } | |
937fe4a4 | 527 |