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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // This class contains the functions for version 4 of the Time Of Flight //
23 // VERSION WITH 5 MODULES AND TILTED STRIPS //
25 // FULL COVERAGE VERSION //
31 // Domenico Vicinanza //
33 // University of Salerno - Italy //
35 // Fabrizio Pierella //
36 // University of Bologna - Italy //
41 <img src="picts/AliTOFv4Class.gif"> //
45 ///////////////////////////////////////////////////////////////////////////////
47 #include <Riostream.h>
51 #include <TGeometry.h>
52 #include <TLorentzVector.h>
55 #include <TVirtualMC.h>
60 #include "AliTOFConstants.h" // AdC
65 //_____________________________________________________________________________
69 // Default constructor
73 //_____________________________________________________________________________
74 AliTOFv4::AliTOFv4(const char *name, const char *title)
78 // Standard constructor
81 // Check that FRAME is there otherwise we have no place where to
83 AliModule* frame=gAlice->GetModule("FRAME");
85 Error("Ctor","TOF needs FRAME to be present\n");
88 if(frame->IsVersion()!=1) {
89 Error("Ctor","FRAME version 1 needed with this version of TOF\n");
95 //_____________________________________________________________________________
96 void AliTOFv4::CreateGeometry()
99 // Create geometry for Time Of Flight version 0
103 <img src="picts/AliTOFv4.gif">
107 // Creates common geometry
109 AliTOF::CreateGeometry();
112 //_____________________________________________________________________________
113 void AliTOFv4::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenC,
114 Float_t zlenB, Float_t zlenA, Float_t ztof0)
117 // Definition of the Time Of Fligh Resistive Plate Chambers
118 // xFLT, yFLT, zFLT - sizes of TOF modules (large)
120 Float_t ycoor, zcoor;
122 Int_t *idtmed = fIdtmed->GetArray()-499;
125 Float_t hTof = fRmax-fRmin;
127 Float_t radius = fRmin+2.;//cm
131 par[2] = zlenC * 0.5;
132 gMC->Gsvolu("FTOC", "BOX ", idtmed[506], par, 3);
133 par[2] = zlenB * 0.5;
134 gMC->Gsvolu("FTOB", "BOX ", idtmed[506], par, 3);
135 par[2] = zlenA * 0.5;
136 gMC->Gsvolu("FTOA", "BOX ", idtmed[506], par, 3);
139 // Positioning of modules
141 Float_t zcor1 = ztof0 - zlenC*0.5;
142 Float_t zcor2 = ztof0 - zlenC - zlenB*0.5;
145 AliMatrix(idrotm[0], 90., 0., 0., 0., 90,-90.);
146 AliMatrix(idrotm[1], 90.,180., 0., 0., 90, 90.);
147 gMC->Gspos("FTOC", 1, "BTO1", 0, zcor1, 0, idrotm[0], "ONLY");
148 gMC->Gspos("FTOC", 2, "BTO1", 0, -zcor1, 0, idrotm[1], "ONLY");
149 gMC->Gspos("FTOC", 1, "BTO2", 0, zcor1, 0, idrotm[0], "ONLY");
150 gMC->Gspos("FTOC", 2, "BTO2", 0, -zcor1, 0, idrotm[1], "ONLY");
151 gMC->Gspos("FTOC", 1, "BTO3", 0, zcor1, 0, idrotm[0], "ONLY");
152 gMC->Gspos("FTOC", 2, "BTO3", 0, -zcor1, 0, idrotm[1], "ONLY");
154 gMC->Gspos("FTOB", 1, "BTO1", 0, zcor2, 0, idrotm[0], "ONLY");
155 gMC->Gspos("FTOB", 2, "BTO1", 0, -zcor2, 0, idrotm[1], "ONLY");
156 gMC->Gspos("FTOB", 1, "BTO2", 0, zcor2, 0, idrotm[0], "ONLY");
157 gMC->Gspos("FTOB", 2, "BTO2", 0, -zcor2, 0, idrotm[1], "ONLY");
158 gMC->Gspos("FTOB", 1, "BTO3", 0, zcor2, 0, idrotm[0], "ONLY");
159 gMC->Gspos("FTOB", 2, "BTO3", 0, -zcor2, 0, idrotm[1], "ONLY");
161 gMC->Gspos("FTOA", 0, "BTO1", 0, zcor3, 0, idrotm[0], "ONLY");
162 gMC->Gspos("FTOA", 0, "BTO2", 0, zcor3, 0, idrotm[0], "ONLY");
163 gMC->Gspos("FTOA", 0, "BTO3", 0, zcor3, 0, idrotm[0], "ONLY");
165 Float_t db = 0.5;//cm
166 Float_t xFLT, xFST, yFLT, zFLTA, zFLTB, zFLTC;
174 xFST = xFLT-fDeadBndX*2;//cm
176 // Sizes of MRPC pads
178 Float_t yPad = 0.505;//cm
180 // Large not sensitive volumes with Insensitive Freon
184 if (fDebug) cout << ClassName() <<
185 ": ************************* TOF geometry **************************"<<endl;
187 par[2] = (zFLTA *0.5);
188 gMC->Gsvolu("FLTA", "BOX ", idtmed[512], par, 3); // Insensitive Freon
189 gMC->Gspos ("FLTA", 0, "FTOA", 0., 0., 0., 0, "ONLY");
191 par[2] = (zFLTB * 0.5);
192 gMC->Gsvolu("FLTB", "BOX ", idtmed[512], par, 3); // Insensitive Freon
193 gMC->Gspos ("FLTB", 0, "FTOB", 0., 0., 0., 0, "ONLY");
195 par[2] = (zFLTC * 0.5);
196 gMC->Gsvolu("FLTC", "BOX ", idtmed[512], par, 3); // Insensitive Freon
197 gMC->Gspos ("FLTC", 0, "FTOC", 0., 0., 0., 0, "ONLY");
199 ///// Layers of Aluminum before and after detector /////
200 ///// Aluminum Box for Modules (1.8 mm thickness) /////
201 ///// lateral walls not simulated for the time being
202 //const Float_t khAlWall = 0.18;
204 const Float_t khAlWall = 0.11;
206 par[1] = khAlWall/2.;//cm
207 ycoor = -yFLT/2 + par[1];
208 par[2] = (zFLTA *0.5);
209 gMC->Gsvolu("FALA", "BOX ", idtmed[508], par, 3); // Alluminium
210 gMC->Gspos ("FALA", 1, "FLTA", 0., ycoor, 0., 0, "ONLY");
211 gMC->Gspos ("FALA", 2, "FLTA", 0.,-ycoor, 0., 0, "ONLY");
212 par[2] = (zFLTB *0.5);
213 gMC->Gsvolu("FALB", "BOX ", idtmed[508], par, 3); // Alluminium
214 gMC->Gspos ("FALB", 1, "FLTB", 0., ycoor, 0., 0, "ONLY");
215 gMC->Gspos ("FALB", 2, "FLTB", 0.,-ycoor, 0., 0, "ONLY");
216 par[2] = (zFLTC *0.5);
217 gMC->Gsvolu("FALC", "BOX ", idtmed[508], par, 3); // Alluminium
218 gMC->Gspos ("FALC", 1, "FLTC", 0., ycoor, 0., 0, "ONLY");
219 gMC->Gspos ("FALC", 2, "FLTC", 0.,-ycoor, 0., 0, "ONLY");
221 ///////////////// Detector itself //////////////////////
223 const Float_t kdeadBound = fDeadBndZ; //cm non-sensitive between the pad edge
224 //and the boundary of the strip
225 const Int_t knx = fNpadX; // number of pads along x
226 const Int_t knz = fNpadZ; // number of pads along z
227 const Float_t kspace = fSpace; //cm distance from the front plate of the box
229 Float_t zSenStrip = fZpad*fNpadZ;//cm
230 Float_t stripWidth = zSenStrip + 2*kdeadBound;
234 par[2] = stripWidth*0.5;
236 // new description for strip volume -double stack strip-
237 // -- all constants are expressed in cm
238 // heigth of different layers
239 const Float_t khhony = 0.8 ; // heigth of HONY Layer
240 const Float_t khpcby = 0.08 ; // heigth of PCB Layer
241 const Float_t khmyly = 0.035 ; // heigth of MYLAR Layer
242 const Float_t khgraphy = 0.02 ; // heigth of GRAPHITE Layer
243 const Float_t khglasseiy = 0.135; // 0.6 Ext. Glass + 1.1 i.e. (Int. Glass/2) (mm)
244 const Float_t khsensmy = 0.11 ; // heigth of Sensitive Freon Mixture
245 const Float_t kwsensmz = 2*3.5 ; // cm
246 const Float_t klsensmx = 48*2.5; // cm
247 const Float_t kwpadz = 3.5; // cm z dimension of the FPAD volume
248 const Float_t klpadx = 2.5; // cm x dimension of the FPAD volume
250 // heigth of the FSTR Volume (the strip volume)
251 const Float_t khstripy = 2*khhony+3*khpcby+4*(khmyly+khgraphy+khglasseiy)+2*khsensmy;
252 // width of the FSTR Volume (the strip volume)
253 const Float_t kwstripz = 10.;
254 // length of the FSTR Volume (the strip volume)
255 const Float_t klstripx = 122.;
257 Float_t parfp[3]={klstripx*0.5,khstripy*0.5,kwstripz*0.5};
258 // coordinates of the strip center in the strip reference frame; used for positioning
259 // internal strip volumes
260 Float_t posfp[3]={0.,0.,0.};
263 // FSTR volume definition and filling this volume with non sensitive Gas Mixture
264 gMC->Gsvolu("FSTR","BOX",idtmed[512],parfp,3);
265 //-- HONY Layer definition
267 parfp[1] = khhony*0.5;
269 gMC->Gsvolu("FHON","BOX",idtmed[503],parfp,3);
270 // positioning 2 HONY Layers on FSTR volume
272 posfp[1]=-khstripy*0.5+parfp[1];
273 gMC->Gspos("FHON",1,"FSTR",0., posfp[1],0.,0,"ONLY");
274 gMC->Gspos("FHON",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
276 //-- PCB Layer definition
277 parfp[1] = khpcby*0.5;
278 gMC->Gsvolu("FPCB","BOX",idtmed[504],parfp,3);
279 // positioning 2 PCB Layers on FSTR volume
280 posfp[1]=-khstripy*0.5+khhony+parfp[1];
281 gMC->Gspos("FPCB",1,"FSTR",0., posfp[1],0.,0,"ONLY");
282 gMC->Gspos("FPCB",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
283 // positioning the central PCB layer
284 gMC->Gspos("FPCB",3,"FSTR",0.,0.,0.,0,"ONLY");
288 //-- MYLAR Layer definition
289 parfp[1] = khmyly*0.5;
290 gMC->Gsvolu("FMYL","BOX",idtmed[511],parfp,3);
291 // positioning 2 MYLAR Layers on FSTR volume
292 posfp[1] = -khstripy*0.5+khhony+khpcby+parfp[1];
293 gMC->Gspos("FMYL",1,"FSTR",0., posfp[1],0.,0,"ONLY");
294 gMC->Gspos("FMYL",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
295 // adding further 2 MYLAR Layers on FSTR volume
296 posfp[1] = khpcby*0.5+parfp[1];
297 gMC->Gspos("FMYL",3,"FSTR",0., posfp[1],0.,0,"ONLY");
298 gMC->Gspos("FMYL",4,"FSTR",0.,-posfp[1],0.,0,"ONLY");
301 //-- Graphite Layer definition
302 parfp[1] = khgraphy*0.5;
303 gMC->Gsvolu("FGRP","BOX",idtmed[502],parfp,3);
304 // positioning 2 Graphite Layers on FSTR volume
305 posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+parfp[1];
306 gMC->Gspos("FGRP",1,"FSTR",0., posfp[1],0.,0,"ONLY");
307 gMC->Gspos("FGRP",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
308 // adding further 2 Graphite Layers on FSTR volume
309 posfp[1] = khpcby*0.5+khmyly+parfp[1];
310 gMC->Gspos("FGRP",3,"FSTR",0., posfp[1],0.,0,"ONLY");
311 gMC->Gspos("FGRP",4,"FSTR",0.,-posfp[1],0.,0,"ONLY");
314 //-- Glass (EXT. +Semi INT.) Layer definition
315 parfp[1] = khglasseiy*0.5;
316 gMC->Gsvolu("FGLA","BOX",idtmed[514],parfp,3);
317 // positioning 2 Glass Layers on FSTR volume
318 posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+khgraphy+parfp[1];
319 gMC->Gspos("FGLA",1,"FSTR",0., posfp[1],0.,0,"ONLY");
320 gMC->Gspos("FGLA",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
321 // adding further 2 Glass Layers on FSTR volume
322 posfp[1] = khpcby*0.5+khmyly+khgraphy+parfp[1];
323 gMC->Gspos("FGLA",3,"FSTR",0., posfp[1],0.,0,"ONLY");
324 gMC->Gspos("FGLA",4,"FSTR",0.,-posfp[1],0.,0,"ONLY");
327 //-- Sensitive Mixture Layer definition
328 parfp[0] = klsensmx*0.5;
329 parfp[1] = khsensmy*0.5;
330 parfp[2] = kwsensmz*0.5;
331 gMC->Gsvolu("FSEN","BOX",idtmed[513],parfp,3);
332 gMC->Gsvolu("FNSE","BOX",idtmed[512],parfp,3);
333 // positioning 2 gas Layers on FSTR volume
334 // the upper is insensitive freon
335 // while the remaining is sensitive
336 posfp[1] = khpcby*0.5+khmyly+khgraphy+khglasseiy+parfp[1];
337 gMC->Gspos("FNSE",0,"FSTR", 0., posfp[1],0.,0,"ONLY");
338 gMC->Gspos("FSEN",0,"FSTR", 0.,-posfp[1],0.,0,"ONLY");
340 // dividing FSEN along z in knz=2 and along x in knx=48
341 gMC->Gsdvn("FSEZ","FSEN",knz,3);
342 gMC->Gsdvn("FSEX","FSEZ",knx,1);
344 // FPAD volume definition
345 parfp[0] = klpadx*0.5;
346 parfp[1] = khsensmy*0.5;
347 parfp[2] = kwpadz*0.5;
348 gMC->Gsvolu("FPAD","BOX",idtmed[513],parfp,3);
349 // positioning the FPAD volumes on previous divisions
350 gMC->Gspos("FPAD",0,"FSEX",0.,0.,0.,0,"ONLY");
352 //// Positioning the Strips (FSTR) in the FLT volumes /////
356 Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
358 Float_t gap = fGapA+0.5; //cm updated distance between the strip axis
364 ycoor = -14.5 + kspace ; //2 cm over front plate
366 AliMatrix (idrotm[0], 90., 0.,90.,90.,0., 90.);
368 Int_t centerLoc= (Int_t)(fNStripA/2.) + 1; // AdC
370 //gMC->Gspos("FSTR",j,"FLTA",0.,ycoor, 0.,idrotm[0],"ONLY");
371 gMC->Gspos("FSTR",centerLoc,"FLTA",0.,ycoor, 0.,idrotm[0],"ONLY"); // AdC
373 printf("%s: %f, St. %2i, Pl.3 ",ClassName(),ang*kRaddeg,j); // AdC
374 printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
378 Int_t upDown = -1; // upDown=-1 -> Upper strip
379 // upDown=+1 -> Lower strip
381 ang = atan(zcoor/radius);
383 AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
384 AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.);
386 ycoor = -14.5+ kspace; //2 cm over front plate
387 ycoor += (1-(upDown+1)/2)*gap;
388 //gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
389 //gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
390 gMC->Gspos("FSTR",centerLoc-j,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY"); // AdC
391 gMC->Gspos("FSTR",centerLoc+j,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY"); // AdC
393 printf("%s: %f, St. %2i, Pl.3 ",ClassName(),ang*kRaddeg,j); // AdC
394 printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
396 j++; //j += 2; // AdC
397 upDown*= -1; // Alternate strips
398 zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)-
399 upDown*gap*TMath::Tan(ang)-
400 (zSenStrip/2)/TMath::Cos(ang);
401 } while (zcoor-(stripWidth/2)*TMath::Cos(ang)>-t+zFLTC+zFLTB+db*2);
403 zcoor = zcoor+(zSenStrip/2)/TMath::Cos(ang)+
404 upDown*gap*TMath::Tan(ang)+
405 (zSenStrip/2)/TMath::Cos(ang);
408 zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)-
409 upDown*gap*TMath::Tan(ang)-
410 (zSenStrip/2)/TMath::Cos(ang);
412 ang = atan(zcoor/radius);
414 AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
415 AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.);
418 ycoor = -14.5+ kspace; //2 cm over front plate
419 ycoor += (1-(upDown+1)/2)*gap;
420 //gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
421 //gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
422 gMC->Gspos("FSTR",centerLoc-j,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY"); // AdC
423 gMC->Gspos("FSTR",centerLoc+j,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY"); // AdC
425 printf("%s: %f, St. %2i, Pl.3 ",ClassName(),ang*kRaddeg,j); // AdC
426 printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
428 ycoor = -hTof/2.+ kspace;//2 cm over front plate
435 Float_t deadRegion = 1.0;//cm
437 zpos = zcoor - (zSenStrip/2)/TMath::Cos(ang)-
438 upDown*gap*TMath::Tan(ang)-
439 (zSenStrip/2)/TMath::Cos(ang)-
440 deadRegion/TMath::Cos(ang);
442 ang = atan(zpos/radius);
444 AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
446 ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
447 ycoor += (1-(upDown+1)/2)*gap;
448 zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
449 gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
451 printf("%s: %f, St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i);
452 printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
458 zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)-
459 upDown*gap*TMath::Tan(ang)-
460 (zSenStrip/2)/TMath::Cos(ang);
461 ang = atan(zpos/radius);
463 AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
465 Float_t deltaSpaceinB=-0.5; // [cm] to avoid overlaps with the end of freon frame
466 Float_t deltaGapinB=0.5; // [cm] to avoid overlaps in between initial strips
467 ycoor = -hTof*0.5+ kspace+deltaSpaceinB ; //2 cm over front plate
468 ycoor += (1-(upDown+1)/2)*(gap+deltaGapinB);
469 zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
470 gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
472 printf("%s: %f, St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i);
473 printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
477 } while (TMath::Abs(ang*kRaddeg)<22.5);
478 //till we reach a tilting angle of 22.5 degrees
480 ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
481 zpos = zpos - zSenStrip/TMath::Cos(ang);
482 // this avoid overlaps in between outer strips in plate B
483 Float_t deltaMovingUp=0.8; // [cm]
484 Float_t deltaMovingDown=-0.5; // [cm]
487 ang = atan(zpos/radius);
489 AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
491 zcoor = zpos+(zFLTB/2+zFLTA/2+db);
492 gMC->Gspos("FSTR",i, "FLTB", 0., ycoor+deltaMovingDown+deltaMovingUp, zcoor,idrotm[nrot], "ONLY");
493 deltaMovingUp+=0.8; // update delta moving toward the end of the plate
494 zpos = zpos - zSenStrip/TMath::Cos(ang);
496 printf("%s: %f, St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i);
497 printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
501 } while (zpos-stripWidth*0.5/TMath::Cos(ang)>-t+zFLTC+db);
505 zpos = zpos + zSenStrip/TMath::Cos(ang);
507 zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)+
509 (zSenStrip/2)/TMath::Cos(ang);
513 Float_t deltaGap=-2.5; // [cm] update distance from strip center and plate
514 ycoor= -hTof*0.5+kspace+gap+deltaGap;
518 ang = atan(zpos/radius);
520 AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
522 zcoor = zpos+(zFLTC*0.5+zFLTB+zFLTA*0.5+db*2);
523 gMC->Gspos("FSTR",i, "FLTC", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
525 printf("%s: %f, St. %2i, Pl.5 ",ClassName(),ang*kRaddeg,i);
526 printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
528 zpos = zpos - zSenStrip/TMath::Cos(ang);
529 } while (zpos-stripWidth*TMath::Cos(ang)*0.5>-t);
532 ////////// Layers after strips /////////////////
533 // Al Layer thickness (2.3mm) factor 0.7
535 Float_t overSpace = fOverSpc;//cm
538 par[1] = 0.115*0.7; // factor 0.7
539 par[2] = (zFLTA *0.5);
540 ycoor = -yFLT/2 + overSpace + par[1];
541 gMC->Gsvolu("FPEA", "BOX ", idtmed[508], par, 3); // Al
542 gMC->Gspos ("FPEA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
543 par[2] = (zFLTB *0.5);
544 gMC->Gsvolu("FPEB", "BOX ", idtmed[508], par, 3); // Al
545 gMC->Gspos ("FPEB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
546 par[2] = (zFLTC *0.5);
547 gMC->Gsvolu("FPEC", "BOX ", idtmed[508], par, 3); // Al
548 gMC->Gspos ("FPEC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
551 // plexiglass thickness: 1.5 mm ; factor 0.3
554 par[1] = 0.075*0.3; // factor 0.3
555 par[2] = (zFLTA *0.5);
557 gMC->Gsvolu("FECA", "BOX ", idtmed[505], par, 3); // Plexigl.
558 gMC->Gspos ("FECA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
559 par[2] = (zFLTB *0.5);
560 gMC->Gsvolu("FECB", "BOX ", idtmed[505], par, 3); // Plexigl.
561 gMC->Gspos ("FECB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
562 par[2] = (zFLTC *0.5);
563 gMC->Gsvolu("FECC", "BOX ", idtmed[505], par, 3); // Plexigl.
564 gMC->Gspos ("FECC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
569 par[1] = (yFLT/2-ycoor-khAlWall)*0.5; // Aluminum layer considered (0.18 cm)
570 par[2] = (zFLTA *0.5);
572 gMC->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air
573 gMC->Gspos ("FAIA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
574 par[2] = (zFLTB *0.5);
575 gMC->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air
576 gMC->Gspos ("FAIB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
577 par[2] = (zFLTC *0.5);
578 gMC->Gsvolu("FAIC", "BOX ", idtmed[500], par, 3); // Air
579 gMC->Gspos ("FAIC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
582 // start with cards and cooling tubes
583 // finally, cards, cooling tubes and layer for thermal dispersion
585 // card volume definition
587 // see GEOM200 in GEANT manual
588 AliMatrix(idrotm[98], 90., 0., 90., 90., 0., 0.); // 0 deg
594 gMC->Gsvolu("FCAR", "BOX ", idtmed[504], cardpar, 3); // PCB Card
595 //alu plate volume definition
598 gMC->Gsvolu("FALP", "BOX ", idtmed[508], cardpar, 3); // Alu Plate
601 // central module positioning (FAIA)
602 Float_t cardpos[3], aplpos2, stepforcardA=6.625;
606 Float_t aplpos1 = -2.;
608 for (icard=0; icard<15; ++icard) {
609 cardpos[2]= cardpos[2]+stepforcardA;
610 aplpos2 = cardpos[2]+0.15;
611 gMC->Gspos("FCAR",icard,"FAIA",cardpos[0],cardpos[1],cardpos[2],idrotm[98],"ONLY");
612 gMC->Gspos("FALP",icard,"FAIA",cardpos[0],aplpos1,aplpos2,idrotm[98],"ONLY");
617 // intermediate module positioning (FAIB)
618 Float_t stepforcardB= 7.05;
620 for (icard=0; icard<19; ++icard) {
621 cardpos[2]= cardpos[2]+stepforcardB;
622 aplpos2 = cardpos[2]+0.15;
623 gMC->Gspos("FCAR",icard,"FAIB",cardpos[0],cardpos[1],cardpos[2],idrotm[98],"ONLY");
624 gMC->Gspos("FALP",icard,"FAIB",cardpos[0],aplpos1,aplpos2,idrotm[98],"ONLY");
628 // outer module positioning (FAIC)
629 Float_t stepforcardC= 8.45238;
631 for (icard=0; icard<20; ++icard) {
632 cardpos[2]= cardpos[2]+stepforcardC;
633 aplpos2 = cardpos[2]+0.15;
634 gMC->Gspos("FCAR",icard,"FAIC",cardpos[0],cardpos[1],cardpos[2],idrotm[98],"ONLY");
635 gMC->Gspos("FALP",icard,"FAIC",cardpos[0],aplpos1,aplpos2,idrotm[98],"ONLY");
638 // tube volume definition
643 gMC->Gsvolu("FTUB", "TUBE", idtmed[516], tubepar, 3); // cooling tubes (steel)
647 gMC->Gsvolu("FITU", "TUBE", idtmed[515], tubepar, 3); // cooling water
648 // positioning water tube into the steel one
649 gMC->Gspos("FITU",1,"FTUB",0.,0.,0.,0,"ONLY");
653 AliMatrix(idrotm[99], 180., 90., 90., 90., 90., 0.);
654 // central module positioning (FAIA)
655 Float_t tubepos[3], tdis=0.6;
657 tubepos[1]= cardpos[1];
658 tubepos[2]= -53.+tdis;
661 for (itub=0; itub<15; ++itub) {
662 tubepos[2]= tubepos[2]+stepforcardA;
663 gMC->Gspos("FTUB",itub,"FAIA",tubepos[0],tubepos[1],tubepos[2],idrotm[99],
668 // intermediate module positioning (FAIB)
669 tubepos[2]= -70.5+tdis;
670 for (itub=0; itub<19; ++itub) {
671 tubepos[2]= tubepos[2]+stepforcardB;
672 gMC->Gspos("FTUB",itub,"FAIB",tubepos[0],tubepos[1],tubepos[2],idrotm[99],
676 // outer module positioning (FAIC)
677 tubepos[2]= -88.75+tdis;
678 for (itub=0; itub<20; ++itub) {
679 tubepos[2]= tubepos[2]+stepforcardC;
680 gMC->Gspos("FTUB",itub,"FAIC",tubepos[0],tubepos[1],tubepos[2],idrotm[99],
686 //_____________________________________________________________________________
687 void AliTOFv4::DrawModule() const
690 // Draw a shaded view of the Time Of Flight version 4
692 // Set everything unseen
693 gMC->Gsatt("*", "seen", -1);
695 // Set ALIC mother transparent
696 gMC->Gsatt("ALIC","SEEN",0);
698 // Set the volumes visible
699 gMC->Gsatt("ALIC","SEEN",0);
701 gMC->Gsatt("FTOA","SEEN",1);
702 gMC->Gsatt("FTOB","SEEN",1);
703 gMC->Gsatt("FTOC","SEEN",1);
704 gMC->Gsatt("FLTA","SEEN",1);
705 gMC->Gsatt("FLTB","SEEN",1);
706 gMC->Gsatt("FLTC","SEEN",1);
707 gMC->Gsatt("FPLA","SEEN",1);
708 gMC->Gsatt("FPLB","SEEN",1);
709 gMC->Gsatt("FPLC","SEEN",1);
710 gMC->Gsatt("FSTR","SEEN",1);
711 gMC->Gsatt("FPEA","SEEN",1);
712 gMC->Gsatt("FPEB","SEEN",1);
713 gMC->Gsatt("FPEC","SEEN",1);
715 gMC->Gsatt("FLZ1","SEEN",0);
716 gMC->Gsatt("FLZ2","SEEN",0);
717 gMC->Gsatt("FLZ3","SEEN",0);
718 gMC->Gsatt("FLX1","SEEN",0);
719 gMC->Gsatt("FLX2","SEEN",0);
720 gMC->Gsatt("FLX3","SEEN",0);
721 gMC->Gsatt("FPAD","SEEN",0);
723 gMC->Gdopt("hide", "on");
724 gMC->Gdopt("shad", "on");
725 gMC->Gsatt("*", "fill", 7);
726 gMC->SetClipBox(".");
727 gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
729 gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .02, .02);
730 gMC->Gdhead(1111, "Time Of Flight");
731 gMC->Gdman(18, 4, "MAN");
732 gMC->Gdopt("hide","off");
734 //_____________________________________________________________________________
735 void AliTOFv4::DrawDetectorModules()
738 // Draw a shaded view of the TOF detector version 4
742 //Set ALIC mother transparent
743 gMC->Gsatt("ALIC","SEEN",0);
746 //Set volumes visible
749 // Level 1 for TOF volumes
750 gMC->Gsatt("B077","seen",0);
753 //==========> Level 2
755 gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
756 gMC->Gsatt("B071","seen",0);
757 gMC->Gsatt("B074","seen",0);
758 gMC->Gsatt("B075","seen",0);
759 gMC->Gsatt("B080","seen",0); // B080 does not has sub-level
763 gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped -
764 gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped -
765 gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped -
766 gMC->Gsatt("B069","seen",-1); // all B069 sub-levels skipped -
767 gMC->Gsatt("B056","seen",0); // B056 does not has sub-levels -
768 gMC->Gsatt("B059","seen",-1); // all B059 sub-levels skipped -
769 gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped -
770 gMC->Gsatt("BTR1","seen",0); // BTR1 do not have sub-levels -
771 gMC->Gsatt("BTO1","seen",0);
775 gMC->Gsatt("BTR2","seen",0); // BTR2 does not has sub-levels -
776 gMC->Gsatt("BTO2","seen",0);
779 gMC->Gsatt("BTR3","seen",0); // BTR3 do not have sub-levels -
780 gMC->Gsatt("BTO3","seen",0);
782 // ==================> Level 3
783 // Level 3 of B071 / Level 2 of BTO1
784 gMC->Gsatt("FTOC","seen",-2);
785 gMC->Gsatt("FTOB","seen",-2);
786 gMC->Gsatt("FTOA","seen",-2);
788 // Level 3 of B074 / Level 2 of BTO2
789 // -> cfr previous settings
791 // Level 3 of B075 / Level 2 of BTO3
792 // -> cfr previous settings
794 gMC->Gdopt("hide","on");
795 gMC->Gdopt("shad","on");
796 gMC->Gsatt("*", "fill", 5);
797 gMC->SetClipBox(".");
798 gMC->SetClipBox("*", 0, 1000, 0, 1000, 0, 1000);
800 gMC->Gdraw("alic", 45, 40, 0, 10, 10, .015, .015);
801 gMC->Gdhead(1111,"TOF detector V1");
802 gMC->Gdman(18, 4, "MAN");
803 gMC->Gdopt("hide","off");
806 //_____________________________________________________________________________
807 void AliTOFv4::DrawDetectorStrips()
810 // Draw a shaded view of the TOF strips for version 4
813 //Set ALIC mother transparent
814 gMC->Gsatt("ALIC","SEEN",0);
817 //Set volumes visible
819 // Level 1 for TOF volumes
820 gMC->Gsatt("B077","seen",0);
822 //==========> Level 2
824 gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
825 gMC->Gsatt("B071","seen",0);
826 gMC->Gsatt("B074","seen",0);
827 gMC->Gsatt("B075","seen",0);
828 gMC->Gsatt("B080","seen",0); // B080 does not has sub-level
831 gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped -
832 gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped -
833 gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped -
834 gMC->Gsatt("B069","seen",-1); // all B069 sub-levels skipped -
835 gMC->Gsatt("B056","seen",0); // B056 does not has sub-levels -
836 gMC->Gsatt("B059","seen",-1); // all B059 sub-levels skipped -
837 gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped -
838 gMC->Gsatt("BTR1","seen",0); // BTR1 do not have sub-levels -
839 gMC->Gsatt("BTO1","seen",0);
841 // ==================> Level 3
842 // Level 3 of B071 / Level 2 of BTO1
843 gMC->Gsatt("FTOC","seen",0);
844 gMC->Gsatt("FTOB","seen",0);
845 gMC->Gsatt("FTOA","seen",0);
847 // Level 3 of B074 / Level 2 of BTO2
848 // -> cfr previous settings
850 // Level 3 of B075 / Level 2 of BTO3
851 // -> cfr previous settings
854 // ==========================> Level 4
855 // Level 4 of B071 / Level 3 of BTO1 / Level 2 of FTOC
856 gMC->Gsatt("FLTC","seen",0);
857 // Level 4 of B071 / Level 3 of BTO1 / Level 2 of FTOB
858 gMC->Gsatt("FLTB","seen",0);
859 // Level 4 of B071 / Level 3 of BTO1 / Level 2 of FTOA
860 gMC->Gsatt("FLTA","seen",0);
862 // Level 4 of B074 / Level 3 of BTO2 / Level 2 of FTOC
863 // -> cfr previous settings
864 // Level 4 of B074 / Level 3 of BTO2 / Level 2 of FTOB
865 // -> cfr previous settings
867 // Level 4 of B075 / Level 3 of BTO3 / Level 2 of FTOC
868 // -> cfr previous settings
870 //======================================> Level 5
871 // Level 5 of B071 / Level 4 of BTO1 / Level 3 of FTOC / Level 2 of FLTC
872 gMC->Gsatt("FALC","seen",0); // no children for FALC
873 gMC->Gsatt("FSTR","seen",-2);
874 gMC->Gsatt("FPEC","seen",0); // no children for FPEC
875 gMC->Gsatt("FECC","seen",0); // no children for FECC
876 gMC->Gsatt("FWAC","seen",0); // no children for FWAC
877 gMC->Gsatt("FAIC","seen",0); // no children for FAIC
879 // Level 5 of B071 / Level 4 of BTO1 / Level 3 of FTOB / Level 2 of FLTB
880 gMC->Gsatt("FALB","seen",0); // no children for FALB
881 //--> gMC->Gsatt("FSTR","seen",-2);
884 // -> cfr previous settings
885 gMC->Gsatt("FPEB","seen",0); // no children for FPEB
886 gMC->Gsatt("FECB","seen",0); // no children for FECB
887 gMC->Gsatt("FWAB","seen",0); // no children for FWAB
888 gMC->Gsatt("FAIB","seen",0); // no children for FAIB
890 // Level 5 of B071 / Level 4 of BTO1 / Level 3 of FTOA / Level 2 of FLTA
891 gMC->Gsatt("FALA","seen",0); // no children for FALB
892 //--> gMC->Gsatt("FSTR","seen",-2);
893 // -> cfr previous settings
894 gMC->Gsatt("FPEA","seen",0); // no children for FPEA
895 gMC->Gsatt("FECA","seen",0); // no children for FECA
896 gMC->Gsatt("FWAA","seen",0); // no children for FWAA
897 gMC->Gsatt("FAIA","seen",0); // no children for FAIA
900 gMC->Gsatt("BTR2","seen",0); // BTR2 does not has sub-levels -
901 gMC->Gsatt("BTO2","seen",0);
904 gMC->Gsatt("BTR3","seen",0); // BTR3 do not have sub-levels -
905 gMC->Gsatt("BTO3","seen",0);
907 // for others Level 5, cfr. previous settings
909 gMC->Gdopt("hide","on");
910 gMC->Gdopt("shad","on");
911 gMC->Gsatt("*", "fill", 5);
912 gMC->SetClipBox(".");
913 gMC->SetClipBox("*", 0, 1000, 0, 1000, 0, 1000);
915 gMC->Gdraw("alic", 45, 40, 0, 10, 10, .015, .015);
916 gMC->Gdhead(1111,"TOF Strips V1");
917 gMC->Gdman(18, 4, "MAN");
918 gMC->Gdopt("hide","off");
921 //_____________________________________________________________________________
922 void AliTOFv4::CreateMaterials()
925 // Define materials for the Time Of Flight
927 AliTOF::CreateMaterials();
930 //_____________________________________________________________________________
931 void AliTOFv4::Init()
934 // Initialise the detector after the geometry has been defined
937 printf("%s: **************************************"
939 "**************************************\n",ClassName());
940 printf("\n%s: Version 4 of TOF initialing, "
941 "symmetric TOF - Full Coverage version\n",ClassName());
946 fIdFTOA = gMC->VolId("FTOA");
947 fIdFTOB = gMC->VolId("FTOB");
948 fIdFTOC = gMC->VolId("FTOC");
949 fIdFLTA = gMC->VolId("FLTA");
950 fIdFLTB = gMC->VolId("FLTB");
951 fIdFLTC = gMC->VolId("FLTC");
954 printf("%s: **************************************"
956 "**************************************\n",ClassName());
960 //_____________________________________________________________________________
961 void AliTOFv4::StepManager()
964 // Procedure called at each step in the Time Of Flight
966 TLorentzVector mom, pos;
967 Float_t xm[3],pm[3],xpad[3],ppad[3];
968 Float_t hits[13],phi,phid,z;
970 Int_t sector, plate, padx, padz, strip;
971 Int_t copy, padzid, padxid, stripid, i;
972 Int_t *idtmed = fIdtmed->GetArray()-499;
973 Float_t incidenceAngle;
975 if(gMC->CurrentMedium()==idtmed[513] &&
976 gMC->IsTrackEntering() && gMC->TrackCharge()
977 && gMC->CurrentVolID(copy)==fIdSens)
979 // getting information about hit volumes
981 padzid=gMC->CurrentVolOffID(2,copy);
984 padxid=gMC->CurrentVolOffID(1,copy);
987 stripid=gMC->CurrentVolOffID(4,copy);
990 gMC->TrackPosition(pos);
991 gMC->TrackMomentum(mom);
993 // Double_t NormPos=1./pos.Rho();
994 Double_t normMom=1./mom.Rho();
996 // getting the cohordinates in pad ref system
997 xm[0] = (Float_t)pos.X();
998 xm[1] = (Float_t)pos.Y();
999 xm[2] = (Float_t)pos.Z();
1001 pm[0] = (Float_t)mom.X()*normMom;
1002 pm[1] = (Float_t)mom.Y()*normMom;
1003 pm[2] = (Float_t)mom.Z()*normMom;
1005 gMC->Gmtod(xm,xpad,1);
1006 gMC->Gmtod(pm,ppad,2);
1008 incidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
1013 if (TMath::Abs(z) <= fZlenA*0.5) plate = 2; //3; // AdC
1014 if (z < (fZlenA*0.5+fZlenB) &&
1015 z > fZlenA*0.5) plate = 1; //4; // AdC
1016 if (z >-(fZlenA*0.5+fZlenB) &&
1017 z < -fZlenA*0.5) plate = 3; //2; // AdC
1018 if (z > (fZlenA*0.5+fZlenB)) plate = 0; //5; // AdC
1019 if (z <-(fZlenA*0.5+fZlenB)) plate = 4; //1; // AdC
1021 if (plate==0) strip=AliTOFConstants::fgkNStripC-strip; // AdC
1022 else if (plate==1) strip=AliTOFConstants::fgkNStripB-strip; // AdC
1023 else strip--; // AdC
1025 if (z<=0.) padx=AliTOFConstants::fgkNpadX-padx; // AdC
1028 if (plate==3 || plate==4) padz=AliTOFConstants::fgkNpadZ-padz; // AdC
1032 if (phi>=0.) phid = phi*kRaddeg; //+180.; // AdC
1033 else phid = phi*kRaddeg + 360.; // AdC
1034 sector = Int_t (phid/20.); // AdC
1042 hits[6] = mom.Rho();
1047 hits[11]= incidenceAngle;
1048 hits[12]= gMC->Edep();
1056 AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, hits);