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 **************************************************************************/
19 Revision 0.1 2004 November G. Cara Romeo and A. De Caro
20 Implement new TOF geometry version
22 suppress few volume overlaps
23 (in the 4th TOF geometry version),
24 insert the realistic strip numbers and positions
28 ///////////////////////////////////////////////////////////////////////////////
30 // This class contains the functions for version 5 of the Time Of Flight //
33 // VERSION WITH 5 MODULES AND TILTED STRIPS //
35 // FULL COVERAGE VERSION + OPTION for PHOS holes //
40 <img src="picts/AliTOFv5T0Class.gif"> //
44 ///////////////////////////////////////////////////////////////////////////////
46 #include "Riostream.h"
49 #include "TVirtualMC.h"
51 #include <TGeometry.h>
52 #include <TLorentzVector.h>
55 #include <TVirtualMC.h>
63 #include "AliTOFGeometry.h"
64 #include "AliTOFGeometryV5.h"
65 #include "AliTOFv5T0.h"
69 //_____________________________________________________________________________
70 AliTOFv5T0::AliTOFv5T0()
73 // Default constructor
77 //_____________________________________________________________________________
78 AliTOFv5T0::AliTOFv5T0(const char *name, const char *title)
79 : AliTOF(name,title,"tzero")
82 // Standard constructor
85 // Check that FRAME is there otherwise we have no place where to
89 AliModule* frame=gAlice->GetModule("FRAME");
91 AliFatal("TOF needs FRAME to be present");
94 if (fTOFGeometry) delete fTOFGeometry;
95 fTOFGeometry = new AliTOFGeometryV5();
97 if(frame->IsVersion()==1) {
98 AliInfo(Form("Frame version %d", frame->IsVersion()));
99 AliInfo("Full Coverage for TOF");
102 AliInfo(Form("Frame version %d", frame->IsVersion()));
103 AliInfo("TOF with Holes for PHOS");
106 fTOFGeometry->SetHoles(fTOFHoles);
108 //AliTOF::fTOFGeometry = fTOFGeometry;
111 TDirectory* saveDir = gDirectory;
112 gAlice->GetRunLoader()->CdGAFile();
113 fTOFGeometry->Write("TOFgeometry");
118 //____________________________________________________________________________
119 void AliTOFv5T0::BuildGeometry()
122 // Build TOF ROOT geometry for the ALICE event display
125 const int kColorTOF = 27;
128 top = gAlice->GetGeometry()->GetNode("alice");
130 // Position the different copies
131 const Float_t krTof =(fTOFGeometry->Rmax()+fTOFGeometry->Rmin())/2.;
132 const Float_t khTof = fTOFGeometry->Rmax()-fTOFGeometry->Rmin();
133 const Int_t kNTof = fTOFGeometry->NSectors();
134 const Float_t kangle = k2PI/kNTof;
136 const Float_t kInterCentrModBorder1 = 49.5;
137 const Float_t kInterCentrModBorder2 = 57.5;
141 // define offset for nodes
142 Float_t zOffsetB = (fTOFGeometry->ZlenA()*0.5 + (kInterCentrModBorder1+kInterCentrModBorder2)*0.5)*0.5;
143 Float_t zOffsetA = 0.;
144 // Define TOF basic volume
146 char nodeName0[7], nodeName1[7], nodeName2[7];
147 char nodeName3[7], nodeName4[7], rotMatNum[7];
150 new TBRIK("S_TOF_B","TOF box","void",
151 fTOFGeometry->StripLength()*0.5, khTof*0.5, fTOFGeometry->ZlenB()*0.5);
152 new TBRIK("S_TOF_C","TOF box","void",
153 fTOFGeometry->StripLength()*0.5, khTof*0.5, fTOFGeometry->ZlenB()*0.5);
155 new TBRIK("S_TOF_A","TOF box","void",
156 fTOFGeometry->StripLength()*0.5, khTof*0.5, fTOFGeometry->ZlenA()*0.5);
158 for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
161 sprintf(rotMatNum,"rot50%i",nodeNum);
162 sprintf(nodeName0,"FTO00%i",nodeNum);
163 sprintf(nodeName1,"FTO10%i",nodeNum);
164 sprintf(nodeName2,"FTO20%i",nodeNum);
165 sprintf(nodeName3,"FTO30%i",nodeNum);
166 sprintf(nodeName4,"FTO40%i",nodeNum);
169 sprintf(rotMatNum,"rot5%i",nodeNum);
170 sprintf(nodeName0,"FTO0%i",nodeNum);
171 sprintf(nodeName1,"FTO1%i",nodeNum);
172 sprintf(nodeName2,"FTO2%i",nodeNum);
173 sprintf(nodeName3,"FTO3%i",nodeNum);
174 sprintf(nodeName4,"FTO4%i",nodeNum);
177 new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
178 ang = (4.5-nodeNum) * kangle;
182 node = new TNode(nodeName2,nodeName2,"S_TOF_B", krTof*TMath::Cos(ang), krTof*TMath::Sin(ang), zOffsetB,rotMatNum);
183 node->SetLineColor(kColorTOF);
187 node = new TNode(nodeName3,nodeName3,"S_TOF_C", krTof*TMath::Cos(ang), krTof*TMath::Sin(ang),-zOffsetB,rotMatNum);
188 node->SetLineColor(kColorTOF);
193 node = new TNode(nodeName4,nodeName4,"S_TOF_A", krTof*TMath::Cos(ang), krTof*TMath::Sin(ang), zOffsetA,rotMatNum);
194 node->SetLineColor(kColorTOF);
196 } // end loop on nodeNum
200 //_____________________________________________________________________________
201 void AliTOFv5T0::CreateGeometry()
204 // Create geometry for Time Of Flight version 0
208 <img src="picts/AliTOFv5T0.gif">
212 // Creates common geometry
214 AliTOF::CreateGeometry();
218 //_____________________________________________________________________________
219 void AliTOFv5T0::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenA,
223 const Float_t kPi = TMath::Pi();
225 const Float_t kInterCentrModBorder1 = 49.5;
226 const Float_t kInterCentrModBorder2 = 57.5;
227 const Float_t kExterInterModBorder1 = 196.0;
228 const Float_t kExterInterModBorder2 = 203.5;
230 const Float_t kLengthExInModBorder = 4.7;
231 const Float_t kLengthInCeModBorder = 7.0;
233 const Float_t khAlWall = 0.1;
235 // module wall thickness
236 const Float_t kModuleWallThickness = 0.3;
238 // 1.5 cm Al honeycomb layer between strips and cards
239 const Float_t kHoneycombLayerThickness = 1.5;
241 AliDebug(2,Form("zlenA*0.5 = %d", zlenA*0.5));
242 AliDebug(1, "************************* TOF geometry **************************");
244 // Definition of the Time Of Fligh Resistive Plate Chambers
245 // xFLT, yFLT, zFLT - sizes of TOF modules (large)
247 Float_t ycoor, zcoor;
249 Int_t *idtmed = fIdtmed->GetArray()-499;
254 par[2] = zlenA * 0.5;
255 gMC->Gsvolu("FTOA", "BOX ", idtmed[503], par, 3); // fibre glass
258 par[2] = (zlenA*0.5 - kInterCentrModBorder1)*0.5;
259 gMC->Gsvolu("FTOB", "BOX ", idtmed[503], par, 3);
260 gMC->Gsvolu("FTOC", "BOX ", idtmed[503], par, 3);
263 // Positioning of modules
265 //AliMatrix(idrotm[0], 90., 0., 0., 0., 90.,-90.);
266 AliMatrix(idrotm[0], 90., 0., 0., 0., 90.,270.); // adc
270 gMC->Gspos("FTOA", 0, "BTO1", 0, zcor3, 0, idrotm[0], "ONLY");
271 gMC->Gspos("FTOA", 0, "BTO3", 0, zcor3, 0, idrotm[0], "ONLY");
274 zcor3 = (zlenA*0.5 + kInterCentrModBorder1)*0.5;
275 gMC->Gspos("FTOB", 0, "BTO2", 0, zcor3, 0, idrotm[0], "ONLY");
276 gMC->Gspos("FTOC", 0, "BTO2", 0,-zcor3, 0, idrotm[0], "ONLY");
278 else gMC->Gspos("FTOA", 0, "BTO2", 0, zcor3, 0, idrotm[0], "ONLY");
280 // Large not sensitive volumes with Insensitive Freon (FLTA, FLTB and FLTC)
282 Float_t xFLT, yFLT, zFLTA;
284 xFLT = xtof - kModuleWallThickness*2.;
285 yFLT = ytof - kModuleWallThickness*2.;
286 zFLTA = zlenA - kModuleWallThickness*2.;
292 gMC->Gsvolu("FLTA", "BOX ", idtmed[507], par, 3); // Freon mix ok
293 gMC->Gspos ("FLTA", 0, "FTOA", 0., 0., 0., 0, "ONLY");
296 par[2] = (zlenA*0.5 - kInterCentrModBorder1-kModuleWallThickness)*0.5;
297 gMC->Gsvolu("FLTB", "BOX ", idtmed[507], par, 3); // Freon mix
298 gMC->Gspos ("FLTB", 0, "FTOB", 0., 0., kModuleWallThickness*0.5, 0, "ONLY");
299 gMC->Gsvolu("FLTC", "BOX ", idtmed[507], par, 3); // Freon mix
300 gMC->Gspos ("FLTC", 0, "FTOC", 0., 0., -kModuleWallThickness*0.5, 0, "ONLY");
303 // Layer of Aluminum after detector
305 par[1] = khAlWall*0.5;
308 ycoor = (-yFLT + khAlWall)*0.5;
309 gMC->Gsvolu("FALA", "BOX ", idtmed[505], par, 3); // Alluminium ok
310 gMC->Gspos ("FALA", 0, "FLTA", 0., -ycoor, 0., 0, "ONLY");
313 par[2] = (zlenA*0.5 - kInterCentrModBorder2-kModuleWallThickness)*0.5;
314 gMC->Gsvolu("FALB", "BOX ", idtmed[505], par, 3); // Alluminium
315 gMC->Gspos ("FALB", 1, "FLTB", 0.,-ycoor, -(kInterCentrModBorder2-kInterCentrModBorder1)*0.5, 0, "ONLY");
316 gMC->Gspos ("FALB", 2, "FLTC", 0.,-ycoor, (kInterCentrModBorder2-kInterCentrModBorder1)*0.5, 0, "ONLY");
319 Float_t y0, alpha, beta, tgbe, trpa[11], dy, zcoo;
322 // wall between central and intermediate modules
323 y0 = kLengthInCeModBorder;
324 zcoor = kInterCentrModBorder1;
325 zcoo = kInterCentrModBorder2;
326 alpha = TMath::ATan((dy-2.*y0)/(zcoo-zcoor));
327 beta = (kPi*0.5-alpha)*0.5;
328 tgbe = TMath::Tan(beta);
329 trpa[0] = xFLT*0.5;//par[0];
332 trpa[3] = kModuleWallThickness;
333 trpa[4] = (y0-kModuleWallThickness*tgbe)*0.5;
334 trpa[5] = (y0+kModuleWallThickness*tgbe)*0.5;
335 trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg;
336 trpa[7] = kModuleWallThickness;
337 trpa[8] = (y0-kModuleWallThickness*tgbe)*0.5;
338 trpa[9] = (y0+kModuleWallThickness*tgbe)*0.5;
339 trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg;
341 gMC->Gsvolu("FWZ1","TRAP", idtmed[503], trpa, 11); // fibre glass
343 AliMatrix (idrotm[1],90., 90.,180.,0.,90.,180.);
344 ycoor = -dy + y0*0.5;
345 gMC->Gspos("FWZ1", 1,"FLTA",0.,ycoor, zcoor,idrotm[1],"ONLY");
347 AliMatrix (idrotm[4],90., 90., 0.,0.,90., 0.);
348 gMC->Gspos("FWZ1", 2,"FLTA",0.,ycoor,-zcoor,idrotm[4],"ONLY");
351 Float_t y0B = y0 - kModuleWallThickness*0.5*tgbe;
352 Float_t ycoorB = ycoor - kModuleWallThickness*0.25/tgbe;
353 trpa[0] = xFLT*0.5;//par[0];
356 trpa[3] = kModuleWallThickness*0.5;
357 trpa[4] = (y0B-kModuleWallThickness*0.5*tgbe)*0.5;
358 trpa[5] = (y0B+kModuleWallThickness*0.5*tgbe)*0.5;
359 trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg;
360 trpa[7] = kModuleWallThickness*0.5;
361 trpa[8] = (y0B-kModuleWallThickness*0.5*tgbe)*0.5;
362 trpa[9] = (y0B+kModuleWallThickness*0.5*tgbe)*0.5;
363 trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg;
364 gMC->Gsvolu("FZ1B","TRAP", idtmed[503], trpa, 11); // fibre glass
365 gMC->Gspos("FZ1B", 5,"FLTB",0.,ycoorB,-zcoor+(zlenA*0.5+kInterCentrModBorder1)*0.5-kModuleWallThickness,idrotm[4],"ONLY");
366 gMC->Gspos("FZ1B", 6,"FLTC",0.,ycoorB,+zcoor-(zlenA*0.5+kInterCentrModBorder1)*0.5+kModuleWallThickness,idrotm[1],"ONLY");
369 AliMatrix (idrotm[2],90.,270., 0.,0.,90.,180.);
371 gMC->Gspos("FWZ1", 3,"FLTA",0.,ycoor, zcoo,idrotm[2],"ONLY");
372 AliMatrix (idrotm[5],90.,270.,180.,0.,90., 0.);
373 gMC->Gspos("FWZ1", 4,"FLTA",0.,ycoor,-zcoo,idrotm[5],"ONLY");
376 Float_t y0B = y0 + kModuleWallThickness*0.5*tgbe;
377 Float_t ycoorB = ycoor - kModuleWallThickness*0.25/tgbe;
378 trpa[0] = xFLT*0.5;//par[0];
381 trpa[3] = kModuleWallThickness*0.5;
382 trpa[4] = (y0B-kModuleWallThickness*0.5*tgbe)*0.5;
383 trpa[5] = (y0B+kModuleWallThickness*0.5*tgbe)*0.5;
384 trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg;
385 trpa[7] = kModuleWallThickness*0.5;
386 trpa[8] = (y0B-kModuleWallThickness*0.5*tgbe)*0.5;
387 trpa[9] = (y0B+kModuleWallThickness*0.5*tgbe)*0.5;
388 trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg;
389 gMC->Gsvolu("FZ1C","TRAP", idtmed[503], trpa, 11); // fibre glass
390 gMC->Gspos("FZ1C", 7,"FLTB",0.,ycoorB,-zcoo+(zlenA*0.5+kInterCentrModBorder1)*0.5-kModuleWallThickness,idrotm[5],"ONLY");
391 gMC->Gspos("FZ1C", 8,"FLTC",0.,ycoorB, zcoo-(zlenA*0.5+kInterCentrModBorder1)*0.5+kModuleWallThickness,idrotm[2],"ONLY");
394 trpa[0] = 0.5*(zcoo-zcoor)/TMath::Cos(alpha);
395 trpa[1] = kModuleWallThickness;
396 trpa[2] = xFLT*0.5;//par[0];
397 trpa[3] = -beta*kRaddeg;
400 gMC->Gsvolu("FWZ2","PARA", idtmed[503], trpa, 6); // fibre glass
401 AliMatrix (idrotm[3], alpha*kRaddeg,90.,90.+alpha*kRaddeg,90.,90.,180.);
402 gMC->Gspos("FWZ2", 1,"FLTA",0.,-dy*0.5, (zcoo+zcoor)*0.5,idrotm[3],"ONLY");
403 AliMatrix (idrotm[6],180.-alpha*kRaddeg,90.,90.-alpha*kRaddeg,90.,90., 0.);
404 gMC->Gspos("FWZ2", 2,"FLTA",0.,-dy*0.5,-(zcoo+zcoor)*0.5,idrotm[6],"ONLY");
407 trpa[0] = 0.5*(zcoo-zcoor)/TMath::Cos(alpha);
408 trpa[1] = kModuleWallThickness*0.5;
409 trpa[2] = xFLT*0.5;//par[0];
410 trpa[3] = -beta*kRaddeg;
413 gMC->Gsvolu("FZ2B","PARA", idtmed[503], trpa, 6); // fibre glass
414 gMC->Gspos("FZ2B", 3,"FLTB",0.,-dy*0.5-kModuleWallThickness*0.5/tgbe,-(zcoo+zcoor)*0.5+(zlenA*0.5+kInterCentrModBorder1)*0.5-kModuleWallThickness,idrotm[6],"ONLY");
415 gMC->Gspos("FZ2B", 4,"FLTC",0.,-dy*0.5-kModuleWallThickness*0.5/tgbe,+(zcoo+zcoor)*0.5-(zlenA*0.5+kInterCentrModBorder1)*0.5+kModuleWallThickness,idrotm[3],"ONLY");
418 // wall between intermediate and lateral modules
419 y0 = kLengthExInModBorder;//4.7;
420 zcoor = kExterInterModBorder1;//196.;
421 zcoo = kExterInterModBorder2;//203.5;
422 alpha = TMath::ATan((dy-2.*y0)/(zcoo-zcoor));
423 beta = (kPi*0.5-alpha)*0.5;
424 tgbe = TMath::Tan(beta);
425 trpa[0] = xFLT*0.5;//par[0];
428 trpa[3] = kModuleWallThickness;
429 trpa[4] = (y0-kModuleWallThickness*tgbe)*0.5;
430 trpa[5] = (y0+kModuleWallThickness*tgbe)*0.5;
431 trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg;
432 trpa[7] = kModuleWallThickness;
433 trpa[8] = (y0-kModuleWallThickness*tgbe)*0.5;
434 trpa[9] = (y0+kModuleWallThickness*tgbe)*0.5;
435 trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg;
436 gMC->Gsvolu("FWZ3","TRAP", idtmed[503], trpa, 11); // fibre glass
438 gMC->Gspos("FWZ3", 1,"FLTA",0.,ycoor, zcoor,idrotm[5],"ONLY");
439 gMC->Gspos("FWZ3", 2,"FLTA",0.,ycoor,-zcoor,idrotm[2],"ONLY");
442 gMC->Gspos("FWZ3", 5,"FLTB",0.,ycoor,-zcoor+(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[2],"ONLY");
443 gMC->Gspos("FWZ3", 6,"FLTC",0.,ycoor, zcoor-(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[5],"ONLY");
446 gMC->Gspos("FWZ3", 3,"FLTA",0.,ycoor, zcoo,idrotm[4],"ONLY");
447 gMC->Gspos("FWZ3", 4,"FLTA",0.,ycoor,-zcoo,idrotm[1],"ONLY");
450 gMC->Gspos("FWZ3", 7,"FLTB",0.,ycoor,-zcoo+(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[1],"ONLY");
451 gMC->Gspos("FWZ3", 8,"FLTC",0.,ycoor, zcoo-(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[4],"ONLY");
454 trpa[0] = 0.5*(zcoo-zcoor)/TMath::Cos(alpha);
455 trpa[1] = kModuleWallThickness;
456 trpa[2] = xFLT*0.5;//par[0];
457 trpa[3] = -beta*kRaddeg;
460 gMC->Gsvolu("FWZ4","PARA", idtmed[503], trpa, 6); // fibre glass
461 AliMatrix (idrotm[3],alpha*kRaddeg,90.,90.+alpha*kRaddeg,90.,90.,180.);
462 AliMatrix (idrotm[6],180.-alpha*kRaddeg,90.,90.-alpha*kRaddeg,90.,90.,0.);
463 gMC->Gspos("FWZ4", 1,"FLTA",0.,-dy*0.5, (zcoo+zcoor)*0.5,idrotm[6],"ONLY");
464 gMC->Gspos("FWZ4", 2,"FLTA",0.,-dy*0.5,-(zcoo+zcoor)*0.5,idrotm[3],"ONLY");
467 gMC->Gspos("FWZ4", 3,"FLTB",0.,-dy*0.5,-(zcoo+zcoor)*0.5+(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[3],"ONLY");
468 gMC->Gspos("FWZ4", 4,"FLTC",0.,-dy*0.5, (zcoo+zcoor)*0.5-(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[6],"ONLY");
471 ///////////////// Detector itself //////////////////////
473 const Int_t knx = fTOFGeometry->NpadX(); // number of pads along x
474 const Int_t knz = fTOFGeometry->NpadZ(); // number of pads along z
475 const Float_t kPadX = fTOFGeometry->XPad(); // pad length along x
476 const Float_t kPadZ = fTOFGeometry->ZPad(); // pad length along z
478 // new description for strip volume -double stack strip-
479 // -- all constants are expressed in cm
480 // heigth of different layers
481 const Float_t khhony = 1.0 ; // heigth of HONY Layer
482 const Float_t khpcby = 0.08 ; // heigth of PCB Layer
483 const Float_t khrgly = 0.055 ; // heigth of RED GLASS Layer
484 const Float_t khglfy = 0.285 ; // heigth of GLASS+FISHLINE Layer
485 const Float_t khcpcby = 0.16 ; // heigth of PCB Central Layer
486 const Float_t kwhonz = 8.1 ; // z dimension of HONEY Layer
487 const Float_t kwpcbz1 = 10.6 ; // z dimension of PCB Lower Layer
488 const Float_t kwpcbz2 = 11.6 ; // z dimension of PCB Upper Layer
489 const Float_t kwcpcbz = 12.4 ; // z dimension of PCB Central Layer
490 const Float_t kwrglz = 8. ; // z dimension of RED GLASS Layer
491 const Float_t kwglfz = 7. ; // z dimension of GLASS+FISHLN Layer
492 const Float_t klsensmx = knx*kPadX; // length of Sensitive Layer
493 const Float_t khsensmy = 0.05;//0.11;//0.16;// heigth of Sensitive Layer // ADC
494 const Float_t kwsensmz = knz*kPadZ; // width of Sensitive Layer
496 // heigth of the FSTR Volume (the strip volume)
497 const Float_t khstripy = 2.*khhony+2.*khpcby+4.*khrgly+2.*khglfy+khcpcby;
499 // width of the FSTR Volume (the strip volume)
500 const Float_t kwstripz = kwcpcbz;
501 // length of the FSTR Volume (the strip volume)
502 const Float_t klstripx = fTOFGeometry->StripLength();//122.;
504 Float_t parfp[3]={klstripx*0.5,khstripy*0.5,kwstripz*0.5};
505 // Coordinates of the strip center in the strip reference frame;
506 // used for positioning internal strip volumes
507 Float_t posfp[3]={0.,0.,0.};
509 // FSTR volume definition-filling this volume with non sensitive Gas Mixture
510 gMC->Gsvolu("FSTR","BOX",idtmed[507],parfp,3); // Freon mix
512 //-- HONY Layer definition
513 parfp[1] = khhony*0.5;
514 parfp[2] = kwhonz*0.5;
515 gMC->Gsvolu("FHON","BOX",idtmed[501],parfp,3); // honeycomb (Nomex)
516 // positioning 2 HONY Layers on FSTR volume
517 posfp[1] =-khstripy*0.5+parfp[1];
518 gMC->Gspos("FHON",1,"FSTR",0., posfp[1],0.,0,"ONLY");
519 gMC->Gspos("FHON",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
521 //-- PCB Layer definition
522 parfp[1] = khpcby*0.5;
523 parfp[2] = kwpcbz1*0.5;
524 gMC->Gsvolu("FPC1","BOX",idtmed[502],parfp,3); // G10
525 parfp[2] = kwpcbz2*0.5;
526 gMC->Gsvolu("FPC2","BOX",idtmed[502],parfp,3); // G10
527 // positioning 2 PCB Layers on FSTR volume
528 posfp[1] =-khstripy*0.5+khhony+parfp[1];
529 gMC->Gspos("FPC1",1,"FSTR",0.,-posfp[1],0.,0,"ONLY");
530 gMC->Gspos("FPC2",1,"FSTR",0., posfp[1],0.,0,"ONLY");
532 //-- central PCB layer definition
533 parfp[1] = khcpcby*0.5;
534 parfp[2] = kwcpcbz*0.5;
535 gMC->Gsvolu("FPCB","BOX",idtmed[502],parfp,3); // G10
536 // positioning the central PCB layer
537 gMC->Gspos("FPCB",1,"FSTR",0.,0.,0.,0,"ONLY");
540 Float_t parfs[3] = {klsensmx*0.5, khsensmy*0.5, kwsensmz*0.5};
541 gMC->Gsvolu("FSEN","BOX",idtmed[508],parfs,3); // sensitive ...
542 // dividing FSEN along z in knz=2 and along x in knx=48
543 gMC->Gsdvn("FSEZ","FSEN",knz,3);
544 gMC->Gsdvn("FPAD","FSEZ",knx,1);
545 // positioning a Sensitive layer inside FPCB
546 gMC->Gspos("FSEN",1,"FPCB",0.,0.,0.,0,"ONLY");
548 //-- RED GLASS Layer definition
549 parfp[1] = khrgly*0.5;
550 parfp[2] = kwrglz*0.5;
551 gMC->Gsvolu("FRGL","BOX",idtmed[509],parfp,3); // glass
552 // positioning 4 RED GLASS Layers on FSTR volume
553 posfp[1] = -khstripy*0.5+khhony+khpcby+parfp[1];
554 gMC->Gspos("FRGL",1,"FSTR",0., posfp[1],0.,0,"ONLY");
555 gMC->Gspos("FRGL",4,"FSTR",0.,-posfp[1],0.,0,"ONLY");
556 posfp[1] = (khcpcby+khrgly)*0.5;
557 gMC->Gspos("FRGL",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
558 gMC->Gspos("FRGL",3,"FSTR",0., posfp[1],0.,0,"ONLY");
560 //-- GLASS+FISHLINE Layer definition
561 parfp[1] = khglfy*0.5;
562 parfp[2] = kwglfz*0.5;
563 gMC->Gsvolu("FGLF","BOX",idtmed[504],parfp,3);
565 // positioning 2 GLASS+FISHLINE Layers on FSTR volume
566 posfp[1] = (khcpcby+khglfy)*0.5+khrgly;
567 gMC->Gspos("FGLF",1,"FSTR",0.,-posfp[1],0.,0,"ONLY");
568 gMC->Gspos("FGLF",2,"FSTR",0., posfp[1],0.,0,"ONLY");
571 // Positioning the Strips (FSTR) in the FLT volumes
572 Int_t maxStripNumbers [5] ={fTOFGeometry->NStripC(),
573 fTOFGeometry->NStripB(),
574 fTOFGeometry->NStripA(),
575 fTOFGeometry->NStripB(),
576 fTOFGeometry->NStripC()};
578 Int_t totalStrip = 0;
579 Float_t zpos, ypos, ang;
580 for(Int_t iplate =0; iplate < fTOFGeometry->NPlates(); iplate++){
581 if (iplate>0) totalStrip += maxStripNumbers[iplate-1];
582 for(Int_t istrip =0; istrip < maxStripNumbers[iplate]; istrip++){
584 ang = fTOFGeometry->GetAngles(iplate,istrip);
585 AliDebug(1, Form(" iplate = %1i, istrip = %2i ---> ang = %f", iplate, istrip, ang));
587 if (ang>0.) AliMatrix (idrotm[istrip+totalStrip+1],90.,0.,90.+ang,90., ang, 90.);
588 else if (ang==0.) AliMatrix (idrotm[istrip+totalStrip+1],90.,0.,90.,90., 0., 0.);
589 else if (ang<0.) AliMatrix (idrotm[istrip+totalStrip+1],90.,0.,90.+ang,90.,-ang,270.);
592 zpos = fTOFGeometry->GetDistances(iplate,istrip);
593 ypos = fTOFGeometry->GetHeights(iplate,istrip);
595 gMC->Gspos("FSTR",istrip+totalStrip+1,"FLTA",0.,ypos,-zpos,idrotm[istrip+totalStrip+1], "ONLY");
598 if (istrip+totalStrip+1>53) gMC->Gspos("FSTR",istrip+totalStrip+1,"FLTC",0.,ypos,-zpos-(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[istrip+totalStrip+1],"ONLY");
599 if (istrip+totalStrip+1<39) gMC->Gspos("FSTR",istrip+totalStrip+1,"FLTB",0.,ypos,-zpos+(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[istrip+totalStrip+1],"ONLY");
604 // 1.5 cm Al honeycomb layer between strips and cards
606 par[1] = kHoneycombLayerThickness*0.5;
608 ycoor = kHoneycombLayerThickness*0.5;
609 gMC->Gsvolu("FPEA", "BOX ", idtmed[506], par, 3); // Al honeycomb ok giovanni cara romeo
610 gMC->Gspos ("FPEA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
613 par[2] = (zlenA*0.5 - kInterCentrModBorder2-kModuleWallThickness)*0.5;
614 ycoor = kHoneycombLayerThickness*0.5;
615 gMC->Gsvolu("FPEB", "BOX ", idtmed[506], par, 3); // Al honeycomb ok giovanni cara romeo
616 gMC->Gspos ("FPEB", 1, "FLTB", 0., ycoor, -(kInterCentrModBorder2-kInterCentrModBorder1)*0.5, 0, "ONLY");
617 gMC->Gspos ("FPEB", 2, "FLTC", 0., ycoor, (kInterCentrModBorder2-kInterCentrModBorder1)*0.5, 0, "ONLY");
621 ycoor += kHoneycombLayerThickness*0.5;
623 par[1] = (yFLT*0.5-kHoneycombLayerThickness-khAlWall)*0.5;
625 ycoor += (yFLT*0.5-kHoneycombLayerThickness-khAlWall)*0.5;
626 gMC->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air
627 gMC->Gspos ("FAIA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
630 par[2] = (zlenA*0.5 - kInterCentrModBorder2 - kModuleWallThickness)*0.5;
631 gMC->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air
632 gMC->Gspos ("FAIB", 0, "FLTB", 0., ycoor, -(kInterCentrModBorder2-kInterCentrModBorder1)*0.5, 0, "ONLY");
633 gMC->Gsvolu("FAIC", "BOX ", idtmed[500], par, 3); // Air
634 gMC->Gspos ("FAIC", 0, "FLTC", 0., ycoor, (kInterCentrModBorder2-kInterCentrModBorder1)*0.5, 0, "ONLY");
637 // start with cards and cooling tubes
638 // finally, cards, cooling tubes and layer for thermal dispersion
641 // see GEOM200 in GEANT manual
643 //AliMatrix(idrotm[98], 90., 0., 90., 90., 0., 0.); // 0 deg
647 // card volume definition
648 cardpar[0]= xFLT*0.5;
651 gMC->Gsvolu("FCAR", "BOX ", idtmed[502], cardpar, 3); // PCB Card
653 //alu plate volume definition
656 gMC->Gsvolu("FALP", "BOX ", idtmed[505], cardpar, 3); // Alu Plate
658 // tube volume definition
663 gMC->Gsvolu("FTUB", "TUBE", idtmed[511], tubepar, 3); // cooling tubes (steel)
668 gMC->Gsvolu("FITU", "TUBE", idtmed[510], tubepar, 3); // cooling water
669 // positioning water tube into the steel one
670 gMC->Gspos("FITU",1,"FTUB",0.,0.,0.,0,"ONLY");
673 AliMatrix(idrotm[99], 180., 90., 90., 90., 90., 0.);
675 // central module positioning
676 Float_t cardpos[3], aplpos2;
677 Float_t stepforcardA=6.625;
679 Float_t aplpos1 = -2.;
684 // tubepos= -53.+tdis;
686 for (icard=39; icard<54; ++icard) {
687 cardpos[2]= cardpos[2]+stepforcardA;
688 aplpos2 = cardpos[2]+0.15;
689 gMC->Gspos("FCAR",icard,"FAIA",cardpos[0],cardpos[1], cardpos[2], 0,"ONLY");
690 gMC->Gspos("FALP",icard,"FAIA",cardpos[0], aplpos1, aplpos2, 0,"ONLY");
691 gMC->Gspos("FTUB",icard,"FAIA", 0.,cardpos[1],cardpos[2]+tdis,idrotm[99],"ONLY");
694 // intermediate module positioning
695 Float_t stepforcardB= 7.05;
699 for (icard=20; icard<39; ++icard) {
700 cardpos[2]= cardpos[2]+stepforcardB;
701 aplpos2 = cardpos[2]+0.15;
703 gMC->Gspos("FCAR",icard+34,"FAIA",cardpos[0],cardpos[1], cardpos[2], 0,"ONLY");
704 gMC->Gspos("FALP",icard+34,"FAIA",cardpos[0], aplpos1, aplpos2, 0,"ONLY");
705 gMC->Gspos("FTUB",icard+34,"FAIA", 0.,cardpos[1], cardpos[2]+tdis,idrotm[99],"ONLY");
706 gMC->Gspos("FCAR",58-icard,"FAIA",cardpos[0],cardpos[1], -cardpos[2], 0,"ONLY");
707 gMC->Gspos("FALP",58-icard,"FAIA",cardpos[0], aplpos1, -aplpos2, 0,"ONLY");
708 gMC->Gspos("FTUB",58-icard,"FAIA", 0.,cardpos[1],-cardpos[2]-tdis,idrotm[99],"ONLY");
711 gMC->Gspos("FCAR",icard+34+182,"FAIC",cardpos[0],cardpos[1], cardpos[2]-(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY");
712 gMC->Gspos("FALP",icard+34+182,"FAIC",cardpos[0], aplpos1, aplpos2-(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY");
713 gMC->Gspos("FTUB",icard+34+182,"FAIC", 0.,cardpos[1], cardpos[2]+tdis-(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5,idrotm[99],"ONLY");
714 gMC->Gspos("FCAR",58-icard+ 91,"FAIB",cardpos[0],cardpos[1], -cardpos[2]+(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY");
715 gMC->Gspos("FALP",58-icard+ 91,"FAIB",cardpos[0], aplpos1, -aplpos2+(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY");
716 gMC->Gspos("FTUB",58-icard+ 91,"FAIB", 0.,cardpos[1],-cardpos[2]-tdis+(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5,idrotm[99],"ONLY");
721 // outer module positioning
722 Float_t stepforcardC= 8.45238;
725 for (icard=1; icard<20; ++icard) {
726 cardpos[2]= cardpos[2]+stepforcardC;
727 aplpos2 = cardpos[2]+0.15;
729 gMC->Gspos("FCAR",icard+72,"FAIA",cardpos[0],cardpos[1], cardpos[2], 0,"ONLY");
730 gMC->Gspos("FALP",icard+72,"FAIA",cardpos[0], aplpos1, aplpos2, 0,"ONLY");
731 gMC->Gspos("FTUB",icard+72,"FAIA", 0.,cardpos[1], cardpos[2]+tdis,idrotm[99],"ONLY");
732 gMC->Gspos("FCAR",20-icard,"FAIA",cardpos[0],cardpos[1], -cardpos[2], 0,"ONLY");
733 gMC->Gspos("FALP",20-icard,"FAIA",cardpos[0], aplpos1, -aplpos2, 0,"ONLY");
734 gMC->Gspos("FTUB",20-icard,"FAIA", 0.,cardpos[1],-cardpos[2]-tdis,idrotm[99],"ONLY");
737 gMC->Gspos("FCAR",icard+72+182,"FAIC",cardpos[0],cardpos[1], cardpos[2]-(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY");
738 gMC->Gspos("FALP",icard+72+182,"FAIC",cardpos[0], aplpos1, aplpos2-(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY");
739 gMC->Gspos("FTUB",icard+72+182,"FAIC", 0.,cardpos[1], cardpos[2]+tdis-(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5,idrotm[99],"ONLY");
740 gMC->Gspos("FCAR",20-icard+ 91,"FAIB",cardpos[0],cardpos[1], -cardpos[2]+(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY");
741 gMC->Gspos("FALP",20-icard+ 91,"FAIB",cardpos[0], aplpos1, -aplpos2+(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY");
742 gMC->Gspos("FTUB",20-icard+ 91,"FAIB", 0.,cardpos[1],-cardpos[2]-tdis+(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5,idrotm[99],"ONLY");
747 //_____________________________________________________________________________
748 void AliTOFv5T0::DrawModule() const
751 // Draw a shaded view of the Time Of Flight version 4
754 // Set everything unseen
755 gMC->Gsatt("*", "seen", -1);
758 //Set volumes visible
761 //Set ALIC mother transparent
762 gMC->Gsatt("ALIC","SEEN", 0);
765 // Level 1 for TOF volumes
766 gMC->Gsatt("B077","seen", 0);
769 // Level 2 for TOF volumes
770 gMC->Gsatt("B071","seen", 0);
771 gMC->Gsatt("B074","seen", 0);
772 gMC->Gsatt("B075","seen", 0);
773 gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
774 gMC->Gsatt("B080","seen", 0); // B080 does not has sub-level
777 gMC->Gsatt("B056","seen", 0); // B056 does not has sub-levels -
778 gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped -
779 gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped -
780 gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped -
781 gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped -
783 gMC->Gsatt("BTR1","seen", 0); // all BTR1 sub-levels skipped -
784 gMC->Gsatt("BTO1","seen", 0);
787 gMC->Gsatt("BTR2","seen", 0); // all BTR1 sub-levels skipped -
788 gMC->Gsatt("BTO2","seen", 0);
791 gMC->Gsatt("BTR3","seen", 0); // all BTR1 sub-levels skipped -
792 gMC->Gsatt("BTO3","seen", 0);
794 // Level 3 of B071, B074 and B075
795 gMC->Gsatt("FTOA","SEEN", 0);
796 if (fTOFHoles) gMC->Gsatt("FTOB","SEEN", 0);
798 // Level 4 of B071, B074 and B075
799 gMC->Gsatt("FLTA","SEEN", 0);
800 if (fTOFHoles) gMC->Gsatt("FLTB","SEEN",0);
801 if (fTOFHoles) gMC->Gsatt("FLTC","SEEN",0);
803 // Level 5 of B071, B074 and B075
804 gMC->Gsatt("FAIA","SEEN",-1); // all FAIA sub-levels skipped -
805 if (fTOFHoles) gMC->Gsatt("FAIB","SEEN",-1); // all FAIB sub-levels skipped -
806 if (fTOFHoles) gMC->Gsatt("FAIC","SEEN",-1); // all FAIC sub-levels skipped -
808 gMC->Gsatt("FALA","SEEN", 0);
809 if (fTOFHoles) gMC->Gsatt("FALB","SEEN", 0);
811 gMC->Gsatt("FPEA","SEEN", 1);
812 if (fTOFHoles) gMC->Gsatt("FPEB","SEEN", 1);
814 gMC->Gsatt("FSTR","SEEN",-1); // all FSTR sub-levels skipped -
816 gMC->Gsatt("FWZ1","SEEN", 0);
817 gMC->Gsatt("FWZ2","SEEN", 0);
818 gMC->Gsatt("FWZ3","SEEN", 0);
819 gMC->Gsatt("FWZ4","SEEN", 0);
821 gMC->Gsatt("FZ1B","SEEN", 0);
822 gMC->Gsatt("FZ1C","SEEN", 0);
823 gMC->Gsatt("FZ2B","SEEN", 0);
826 gMC->Gdopt("hide", "on");
827 gMC->Gdopt("shad", "on");
828 gMC->Gsatt("*", "fill", 7);
829 gMC->SetClipBox(".");
830 gMC->SetClipBox("*", 100, 1000, 100, 1000, 100, 1000);
832 gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018);
833 gMC->Gdhead(1111, "Time Of Flight");
834 gMC->Gdman(18, 3, "MAN");
835 gMC->Gdopt("hide","off");
837 //_____________________________________________________________________________
838 void AliTOFv5T0::DrawDetectorModules()
841 // Draw a shaded view of the TOF detector version 4
844 // Set everything unseen
845 gMC->Gsatt("*", "seen", -1);
848 //Set volumes visible
851 //Set ALIC mother transparent
852 gMC->Gsatt("ALIC","SEEN", 0);
855 // Level 1 for TOF volumes
856 gMC->Gsatt("B077","seen", 0);
859 // Level 2 for TOF volumes
860 gMC->Gsatt("B071","seen", 0);
861 gMC->Gsatt("B074","seen", 0);
862 gMC->Gsatt("B075","seen", 0);
863 gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
864 gMC->Gsatt("B080","seen", 0); // B080 does not has sub-level
867 gMC->Gsatt("B056","seen", 0); // B056 does not has sub-levels -
868 gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped -
869 gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped -
870 gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped -
871 gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped -
873 gMC->Gsatt("BTR1","seen", 0); // all BTR1 sub-levels skipped -
874 gMC->Gsatt("BTO1","seen", 0);
877 gMC->Gsatt("BTR2","seen", 0); // all BTR1 sub-levels skipped -
878 gMC->Gsatt("BTO2","seen", 0);
881 gMC->Gsatt("BTR3","seen", 0); // all BTR1 sub-levels skipped -
882 gMC->Gsatt("BTO3","seen", 0);
884 // Level 3 of B071, B075 and B074
885 gMC->Gsatt("FTOA","seen",-2); // all FTOA sub-levels skipped -
887 gMC->Gsatt("FTOB","seen",-2); // all FTOB sub-levels skipped -
888 gMC->Gsatt("FTOC","seen",-2); // all FTOC sub-levels skipped -
891 gMC->Gdopt("hide","on");
892 gMC->Gdopt("shad","on");
893 gMC->Gsatt("*", "fill", 5);
894 gMC->SetClipBox(".");
895 gMC->SetClipBox("*", 100, 1000, 100, 1000, 0, 1000);
897 gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018);
898 gMC->Gdhead(1111,"TOF detector");
899 gMC->Gdman(18, 3, "MAN");
900 gMC->Gdopt("hide","off");
903 //_____________________________________________________________________________
904 void AliTOFv5T0::DrawDetectorStrips()
907 // Draw a shaded view of the TOF strips for version 4
910 // Set everything unseen
911 gMC->Gsatt("*", "seen", -1);
914 //Set volumes visible
917 //Set ALIC mother transparent
918 gMC->Gsatt("ALIC","SEEN", 0);
921 // Level 1 for TOF volumes
922 gMC->Gsatt("B077","seen", 0);
925 // Level 2 for TOF volumes
926 gMC->Gsatt("B071","seen", 0);
927 gMC->Gsatt("B074","seen", 0);
928 gMC->Gsatt("B075","seen", 0);
929 gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
930 gMC->Gsatt("B080","seen", 0); // B080 does not has sub-level
933 gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped -
934 gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped -
935 gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped -
936 gMC->Gsatt("B056","seen", 0); // B056 does not has sub-levels -
937 gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped -
939 gMC->Gsatt("BTR1","seen", 0); // all BTR1 sub-levels skipped -
940 gMC->Gsatt("BTO1","seen", 0);
943 gMC->Gsatt("BTR2","seen", 0); // all BTR1 sub-levels skipped -
944 gMC->Gsatt("BTO2","seen", 0);
947 gMC->Gsatt("BTR3","seen", 0); // all BTR1 sub-levels skipped -
948 gMC->Gsatt("BTO3","seen", 0);
950 // Level 3 of B071, B074 and B075
951 gMC->Gsatt("FTOA","SEEN", 0);
953 gMC->Gsatt("FTOB","SEEN", 0);
954 gMC->Gsatt("FTOC","SEEN", 0);
957 // Level 4 of B071, B074 and B075
958 gMC->Gsatt("FLTA","SEEN", 0);
960 gMC->Gsatt("FLTB","SEEN", 0);
961 gMC->Gsatt("FLTC","SEEN", 0);
964 // Level 5 of B071, B074 and B075
965 gMC->Gsatt("FAIA","SEEN",-1); // all FAIA sub-levels skipped -
967 gMC->Gsatt("FAIB","SEEN",-1); // all FAIB sub-levels skipped -
968 gMC->Gsatt("FAIC","SEEN",-1); // all FAIC sub-levels skipped -
971 gMC->Gsatt("FALA","SEEN", 0);
972 if (fTOFHoles) gMC->Gsatt("FALB","SEEN", 0);
974 gMC->Gsatt("FPEA","SEEN", 0);
975 if (fTOFHoles) gMC->Gsatt("FPEB","SEEN", 0);
977 gMC->Gsatt("FSTR","SEEN",-2); // all FSTR sub-levels skipped -
979 gMC->Gsatt("FWZ1","SEEN", 0);
980 gMC->Gsatt("FWZ2","SEEN", 0);
981 gMC->Gsatt("FWZ3","SEEN", 0);
982 gMC->Gsatt("FWZ4","SEEN", 0);
984 gMC->Gsatt("FZ1B","SEEN", 0);
985 gMC->Gsatt("FZ1C","SEEN", 0);
986 gMC->Gsatt("FZ2B","SEEN", 0);
993 gMC->Gsatt("FALP","SEEN",0);
994 gMC->Gsatt("FCAR","SEEN",0);
995 gMC->Gsatt("FTUB","SEEN",-1); // all FTUB sub-levels skipped -
998 gMC->Gsatt("FITU","SEEN",0);
1003 gMC->Gsatt("FGLF","SEEN",0);
1004 gMC->Gsatt("FHON","SEEN",0);
1005 gMC->Gsatt("FPC1","SEEN",0);
1006 gMC->Gsatt("FPC2","SEEN",0);
1007 gMC->Gsatt("FPCB","SEEN",0);
1008 gMC->Gsatt("FRGL","SEEN",0);
1010 // Level 2 of FPCB => Level 3 of FSTR
1011 gMC->Gsatt("FSEN","SEEN",0);
1012 gMC->Gsatt("FSEZ","SEEN",0);
1013 gMC->Gsatt("FPAD","SEEN",1);
1016 gMC->Gdopt("hide","on");
1017 gMC->Gdopt("shad","on");
1018 gMC->Gsatt("*", "fill", 5);
1019 gMC->SetClipBox(".");
1020 gMC->SetClipBox("*", 0, 1000, 0, 1000, 0, 1000);
1021 gMC->DefaultRange();
1022 gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018);
1023 gMC->Gdhead(1111,"TOF Strips");
1024 gMC->Gdman(18, 3, "MAN");
1025 gMC->Gdopt("hide","off");
1028 //_____________________________________________________________________________
1029 void AliTOFv5T0::CreateMaterials()
1032 // Define materials for the Time Of Flight
1035 //AliTOF::CreateMaterials();
1037 Int_t isxfld = gAlice->Field()->Integ();
1038 Float_t sxmgmx = gAlice->Field()->Max();
1039 Float_t we[7], ae[7], na[7], fr[7], vl[7];
1043 //--- Quartz (SiO2) to simulate float glass
1044 // density tuned to have correct float glass
1046 Float_t aq[2] = { 28.0855,15.9994 };
1047 Float_t zq[2] = { 14.,8. };
1048 Float_t wq[2] = { 1.,2. };
1049 Float_t dq = 2.55; // std value: 2.2
1053 Float_t anox[4] = {12.01,1.01,16.00,14.01};
1054 Float_t znox[4] = { 6., 1., 8., 7.};
1055 Float_t wnox[4] = {14., 22., 2., 2.};
1056 Float_t dnox = 0.048;
1060 Float_t ag10[4] = {28.09,12.01,1.01,16.00};
1061 Float_t zg10[4] = {14., 6., 1., 8.};
1064 for (i = 0; i < nlmatg10; ++i) {
1080 MaterialMixer(we,ae,na,fr,vl,5);
1086 Float_t densg10 = 1.7;
1089 Float_t awa[2] = { 1., 16. };
1090 Float_t zwa[2] = { 1., 8. };
1091 Float_t wwa[2] = { 2., 1. };
1096 Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
1097 Float_t zsteel[4] = { 26.,24.,28.,14. };
1098 Float_t wsteel[4] = { .715,.18,.1,.005 };
1101 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
1102 Float_t zAir[4]={6.,7.,8.,18.};
1103 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
1104 Float_t dAir = 1.20479E-3;
1107 Float_t afg[4] = {28.09,16.00,12.01,1.01};
1108 Float_t zfg[4] = {14., 8., 6., 1.};
1109 Float_t wfg[4] = {0.12906,0.29405,0.51502,0.06187};
1110 Float_t dfg = 1.111;
1113 // --- Freon C2F4H2 + SF6
1114 Float_t afre[4]= {12.01,1.01,19.00,32.07};
1115 Float_t zfre[4]= { 6., 1., 9., 16.};
1116 Float_t wfre[4]= {0.21250,0.01787,0.74827,0.021355};
1117 Float_t densfre= 0.00375;
1120 char namat[15] = " ";
1121 Float_t ama[2], zma[2], dma, radl, absl, buf[1];
1124 AliMixture ( 0, "Air$", aAir, zAir, dAir, 4, wAir);
1125 AliMixture ( 1, "Nomex$", anox, znox, dnox, nnox, wnox);
1126 AliMixture ( 2, "G10$", ag10, zg10, densg10, nlmatg10, wmatg10);
1127 AliMixture ( 3, "fibre glass$", afg, zfg, dfg, nfg, wfg);
1128 AliMaterial( 4, "Al $", 26.98, 13., 2.7, 8.9, 37.2);
1129 AliMaterial( 5, "Al honeycomb$", 26.98, 13., 0.0496, 483., 2483.);
1130 AliMixture ( 6, "Freon$", afre, zfre, densfre, nfre, wfre);
1131 AliMixture ( 7, "Glass$", aq, zq, dq, nq, wq);
1133 // get freon and glass
1134 gMC->Gfmate((*fIdmate)[6],namat,ama[0],zma[0],dma,radl,absl,buf,nbuf);
1135 gMC->Gfmate((*fIdmate)[7],namat,ama[1],zma[1],dma,radl,absl,buf,nbuf);
1138 Float_t wgfr[2]= {0.0011,0.9989};
1139 Float_t dgfr = 1.434;
1141 AliMixture ( 8, "glass-freon$", ama, zma, dgfr, ngfr, wgfr);
1142 AliMixture ( 9, "Water$", awa, zwa, dwa, nwa, wwa);
1143 AliMixture (10, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel);
1145 Float_t epsil, stmin, deemax, stemax;
1148 // EPSIL = 0.1 ! Tracking precision,
1149 // STEMAX = 0.1 ! Maximum displacement for multiple scattering
1150 // DEEMAX = 0.1 ! Maximum fractional energy loss, DLS
1154 epsil = .001; // Tracking precision,
1155 stemax = -1.; // Maximum displacement for multiple scattering
1156 deemax = -.3; // Maximum fractional energy loss, DLS
1159 AliMedium( 1, "Air$", 0, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1160 AliMedium( 2,"Nomex$", 1, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1161 AliMedium( 3,"G10$", 2, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1162 AliMedium( 4,"fibre glass$", 3, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1163 AliMedium( 5,"glass-freon$", 8, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1164 AliMedium( 6,"Al Frame$", 4, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1165 AliMedium( 7,"Al honeycomb$", 5, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1166 AliMedium( 8,"Fre$", 6, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1167 AliMedium( 9,"PCB-S$", 2, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1168 AliMedium(10,"Glass$", 7, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1169 AliMedium(11,"Water$", 9, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1170 AliMedium(12,"STEEL$", 10, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1173 //_____________________________________________________________________________
1174 void AliTOFv5T0::Init()
1177 // Initialise the detector after the geometry has been defined
1179 AliDebug(1, "**************************************"
1181 "**************************************");
1182 AliDebug(1, " Version 4 of TOF initialing, "
1183 "symmetric TOF - Full Coverage version");
1187 fIdFTOA = gMC->VolId("FTOA");
1189 fIdFTOB = gMC->VolId("FTOB");
1190 fIdFTOC = gMC->VolId("FTOC");
1192 fIdFLTA = gMC->VolId("FLTA");
1194 fIdFLTB = gMC->VolId("FLTB");
1195 fIdFLTC = gMC->VolId("FLTC");
1198 AliDebug(1, "**************************************"
1200 "**************************************");
1203 //_____________________________________________________________________________
1204 void AliTOFv5T0::StepManager()
1208 // Procedure called at each step in the Time Of Flight
1211 TLorentzVector mom, pos;
1212 Float_t xm[3],pm[3],xpad[3],ppad[3];
1213 Float_t hits[14],phi,phid;
1216 Int_t sector, padx, padz, strip;
1217 Int_t copy, padzid, padxid, stripid, i;
1218 Int_t *idtmed = fIdtmed->GetArray()-499;
1219 Float_t incidenceAngle;
1222 gMC->IsTrackEntering()
1223 && gMC->TrackCharge()
1224 && gMC->GetMedium()==idtmed[508]
1225 && gMC->CurrentVolID(copy)==fIdSens
1229 AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber());
1231 // getting information about hit volumes
1233 padzid=gMC->CurrentVolOffID(1,copy);
1237 padxid=gMC->CurrentVolOffID(0,copy);
1241 stripid=gMC->CurrentVolOffID(4,copy);
1245 gMC->TrackPosition(pos);
1246 gMC->TrackMomentum(mom);
1248 Double_t normMom=1./mom.Rho();
1250 // getting the coordinates in pad ref system
1252 xm[0] = (Float_t)pos.X();
1253 xm[1] = (Float_t)pos.Y();
1254 xm[2] = (Float_t)pos.Z();
1256 pm[0] = (Float_t)mom.X()*normMom;
1257 pm[1] = (Float_t)mom.Y()*normMom;
1258 pm[2] = (Float_t)mom.Z()*normMom;
1260 gMC->Gmtod(xm,xpad,1); // from MRS to DRS: coordinates convertion
1261 gMC->Gmtod(pm,ppad,2); // from MRS to DRS: direction cosinus convertion
1264 if (TMath::Abs(ppad[1])>1) {
1265 AliWarning("Abs(ppad) > 1");
1266 ppad[1]=TMath::Sign((Float_t)1,ppad[1]);
1268 incidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
1271 if (phi>=0.) phid = phi*kRaddeg;
1272 else phid = phi*kRaddeg + 360.;
1274 sector = Int_t (phid/20.);
1276 if (strip < fTOFGeometry->NStripC()) {
1280 else if (strip >= fTOFGeometry->NStripC() &&
1281 strip < fTOFGeometry->NStripC() + fTOFGeometry->NStripB()) {
1283 strip = strip - fTOFGeometry->NStripC();
1285 else if (strip >= fTOFGeometry->NStripC() + fTOFGeometry->NStripB() &&
1286 strip < fTOFGeometry->NStripC() + fTOFGeometry->NStripB() + fTOFGeometry->NStripA()) {
1288 strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB();
1290 else if (strip >= fTOFGeometry->NStripC() + fTOFGeometry->NStripB() + fTOFGeometry->NStripA() &&
1291 strip < fTOFGeometry->NStripC() + fTOFGeometry->NStripB() + fTOFGeometry->NStripA() + fTOFGeometry->NStripB()) {
1293 strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB() - fTOFGeometry->NStripA();
1297 strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB() - fTOFGeometry->NStripA() - fTOFGeometry->NStripB();
1305 hits[6] = mom.Rho();
1310 hits[11]= incidenceAngle;
1311 hits[12]= gMC->Edep();
1312 hits[13]= gMC->TrackLength();
1320 AddT0Hit(gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, hits);
1323 //-------------------------------------------------------------------
1324 void AliTOFv5T0::MaterialMixer(Float_t* p,Float_t* a,Float_t* m,Float_t* d,Float_t* s,Int_t n) {
1325 // a[] atomic weights vector (in)
1326 // (atoms present in more compound appear separately)
1327 // m[] number of corresponding atoms in the mixture (in)
1328 // d[] fraction of the compound relative to the corresponding atoms (in)
1329 // s[] further possible weights " " " " (in)
1331 for (Int_t i = 0; i < n; ++i) {
1332 p[i] = a[i]*m[i]*d[i]*s[i];
1335 for (Int_t i = 0; i < n; ++i) {
1337 // AliInfo(Form((\n weight[%i] = %f (,i,p[i]));