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 Revision 1.2 2007/05/04 12:59:22 arcelli
19 Change the TOF SM paths for misalignment (one layer up)
21 Revision 1.1 2007/05/02 17:32:58 decaro
22 TOF geometry description as installed (G. Cara Romeo, A. De Caro)
24 Revision 0.1 2007 March G. Cara Romeo and A. De Caro
25 Implemented a more realistic TOF geometry description,
28 - services and front end electronics description,
29 - TOF crate readout modules
30 (added volume FTOS in ALIC_1/BBMO_1/BBCE_%i -for i=1,...,18-,
31 and in ALIC_1/BFMO_%i -for i=19,...,36- volumes)
32 As the 5th version in terms of geometrical positioning of volumes.
36 ///////////////////////////////////////////////////////////////////////////////
38 // This class contains the functions for version 6 of the Time Of Flight //
41 // VERSION WITH 6 MODULES AND TILTED STRIPS //
43 // FULL COVERAGE VERSION + OPTION for PHOS holes //
48 <img src="picts/AliTOFv6T0Class.gif"> //
52 ///////////////////////////////////////////////////////////////////////////////
55 #include "TGeometry.h"
56 #include "TLorentzVector.h"
58 #include "TVirtualMC.h"
59 #include "TGeoManager.h"
67 #include "AliTOFGeometry.h"
68 #include "AliTOFGeometryV5.h"
69 #include "AliTOFv6T0.h"
71 extern TDirectory *gDirectory;
72 extern TVirtualMC *gMC;
73 extern TGeoManager *gGeoManager;
75 extern AliRun *gAlice;
79 //_____________________________________________________________________________
80 AliTOFv6T0::AliTOFv6T0():
90 // Default constructor
94 //_____________________________________________________________________________
95 AliTOFv6T0::AliTOFv6T0(const char *name, const char *title):
96 AliTOF(name,title,"tzero"),
106 // Standard constructor
109 // Check that FRAME is there otherwise we have no place where to
113 AliModule* frame = (AliModule*)gAlice->GetModule("FRAME");
115 AliFatal("TOF needs FRAME to be present");
118 if (fTOFGeometry) delete fTOFGeometry;
119 fTOFGeometry = new AliTOFGeometryV5();
121 if(frame->IsVersion()==1) {
122 AliDebug(1,Form("Frame version %d", frame->IsVersion()));
123 AliDebug(1,"Full Coverage for TOF");
126 AliDebug(1,Form("Frame version %d", frame->IsVersion()));
127 AliDebug(1,"TOF with Holes for PHOS");
130 fTOFGeometry->SetHoles(fTOFHoles);
132 //AliTOF::fTOFGeometry = fTOFGeometry;
135 TDirectory* saveDir = gDirectory;
136 gAlice->GetRunLoader()->CdGAFile();
137 fTOFGeometry->Write("TOFgeometry");
142 //_____________________________________________________________________________
143 void AliTOFv6T0::AddAlignableVolumes() const
146 // Create entries for alignable volumes associating the symbolic volume
147 // name with the corresponding volume path. Needs to be syncronized with
148 // eventual changes in the geometry.
154 TString vpL0 = "ALIC_1/B077_1/BSEGMO";
155 TString vpL1 = "_1/BTOF";
157 TString vpL3 = "/FTOA_0";
158 TString vpL4 = "/FLTA_0/FSTR_";
160 TString snSM = "TOF/sm";
161 TString snSTRIP = "/strip";
163 Int_t nSectors=fTOFGeometry->NSectors();
164 Int_t nStrips =fTOFGeometry->NStripA()+
165 2*fTOFGeometry->NStripB()+
166 2*fTOFGeometry->NStripC();
169 // The TOF MRPC Strips
170 // The symbolic names are: TOF/sm00/strip01
176 for (Int_t isect = 0; isect < nSectors; isect++) {
177 for (Int_t istr = 1; istr <= nStrips; istr++) {
190 symName += Form("%02d",isect);
192 symName += Form("%02d",istr);
194 AliDebug(2,"--------------------------------------------");
195 AliDebug(2,Form("Alignable object %d", imod));
196 AliDebug(2,Form("volPath=%s\n",volPath.Data()));
197 AliDebug(2,Form("symName=%s\n",symName.Data()));
198 AliDebug(2,"--------------------------------------------");
200 gGeoManager->SetAlignableEntry(symName.Data(),volPath.Data());
207 // The TOF supermodules
208 // The symbolic names are: TOF/sm00
212 for (Int_t isect = 0; isect < nSectors; isect++) {
221 symName += Form("%02d",isect);
223 AliDebug(2,"--------------------------------------------");
224 AliDebug(2,Form("Alignable object %d", isect+imod));
225 AliDebug(2,Form("volPath=%s\n",volPath.Data()));
226 AliDebug(2,Form("symName=%s\n",symName.Data()));
227 AliDebug(2,"--------------------------------------------");
229 gGeoManager->SetAlignableEntry(symName.Data(),volPath.Data());
234 //____________________________________________________________________________
235 void AliTOFv6T0::BuildGeometry()
238 // Build TOF ROOT geometry for the ALICE event display
241 const int kColorTOF = 27;
243 TGeometry *globalGeometry = (TGeometry*)gAlice->GetGeometry();
246 top = globalGeometry->GetNode("alice");
248 // Position the different copies
249 const Float_t krTof =(fTOFGeometry->Rmax()+fTOFGeometry->Rmin())/2.;
250 const Float_t khTof = fTOFGeometry->Rmax()-fTOFGeometry->Rmin();
251 const Int_t kNTof = fTOFGeometry->NSectors();
252 const Float_t kangle = k2PI/kNTof;
254 const Float_t kInterCentrModBorder1 = 49.5;
255 const Float_t kInterCentrModBorder2 = 57.5;
259 // define offset for nodes
260 Float_t zOffsetB = (fTOFGeometry->ZlenA()*0.5 + (kInterCentrModBorder1+kInterCentrModBorder2)*0.5)*0.5;
261 Float_t zOffsetA = 0.;
262 // Define TOF basic volume
264 char nodeName0[16], nodeName1[16], nodeName2[16];
265 char nodeName3[16], nodeName4[16], rotMatNum[16];
268 new TBRIK("S_TOF_B","TOF box","void",
269 fTOFGeometry->StripLength()*0.5, khTof*0.5, fTOFGeometry->ZlenB()*0.5);
270 new TBRIK("S_TOF_C","TOF box","void",
271 fTOFGeometry->StripLength()*0.5, khTof*0.5, fTOFGeometry->ZlenB()*0.5);
273 new TBRIK("S_TOF_A","TOF box","void",
274 fTOFGeometry->StripLength()*0.5, khTof*0.5, fTOFGeometry->ZlenA()*0.5);
276 for (Int_t nodeNum=1;nodeNum<kNTof+1;nodeNum++){
279 sprintf(rotMatNum,"rot50%i",nodeNum);
280 sprintf(nodeName0,"FTO00%i",nodeNum);
281 sprintf(nodeName1,"FTO10%i",nodeNum);
282 sprintf(nodeName2,"FTO20%i",nodeNum);
283 sprintf(nodeName3,"FTO30%i",nodeNum);
284 sprintf(nodeName4,"FTO40%i",nodeNum);
287 sprintf(rotMatNum,"rot5%i",nodeNum);
288 sprintf(nodeName0,"FTO0%i",nodeNum);
289 sprintf(nodeName1,"FTO1%i",nodeNum);
290 sprintf(nodeName2,"FTO2%i",nodeNum);
291 sprintf(nodeName3,"FTO3%i",nodeNum);
292 sprintf(nodeName4,"FTO4%i",nodeNum);
295 new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
296 ang = (4.5-nodeNum) * kangle;
300 node = new TNode(nodeName2,nodeName2,"S_TOF_B", krTof*TMath::Cos(ang), krTof*TMath::Sin(ang), zOffsetB,rotMatNum);
301 node->SetLineColor(kColorTOF);
305 node = new TNode(nodeName3,nodeName3,"S_TOF_C", krTof*TMath::Cos(ang), krTof*TMath::Sin(ang),-zOffsetB,rotMatNum);
306 node->SetLineColor(kColorTOF);
311 node = new TNode(nodeName4,nodeName4,"S_TOF_A", krTof*TMath::Cos(ang), krTof*TMath::Sin(ang), zOffsetA,rotMatNum);
312 node->SetLineColor(kColorTOF);
314 } // end loop on nodeNum
318 //_____________________________________________________________________________
319 void AliTOFv6T0::CreateGeometry()
322 // Create geometry for Time Of Flight version 0
326 <img src="picts/AliTOFv6T0.gif">
330 // Creates common geometry
332 AliTOF::CreateGeometry();
336 //_____________________________________________________________________________
337 void AliTOFv6T0::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenA)
340 // Definition of the Time Of Fligh Resistive Plate Chambers
343 const Float_t kPi = TMath::Pi();
345 const Float_t kInterCentrModBorder1 = 49.5;
346 const Float_t kInterCentrModBorder2 = 57.5;
347 const Float_t kExterInterModBorder1 = 196.0;
348 const Float_t kExterInterModBorder2 = 203.5;
350 const Float_t kLengthExInModBorder = 4.7;
351 const Float_t kLengthInCeModBorder = 7.0;
353 // module wall thickness (cm)
354 const Float_t kModuleWallThickness = 0.33;
356 // honeycomb layer between strips and cards (cm)
357 const Float_t kHoneycombLayerThickness = 2.;
359 AliDebug(1, "************************* TOF geometry **************************");
360 AliDebug(1,Form(" xtof %d", xtof));
361 AliDebug(1,Form(" ytof %d", ytof));
362 AliDebug(1,Form(" zlenA %d", zlenA));
363 AliDebug(2,Form(" zlenA*0.5 = %d", zlenA*0.5));
365 // Definition of the of fibre glass modules (FTOA, FTOB and FTOC)
367 Float_t xcoor, ycoor, zcoor;
369 Int_t *idtmed = fIdtmed->GetArray()-499;
373 par[1] = ytof * 0.25;
374 par[2] = zlenA * 0.5;
375 gMC->Gsvolu("FTOA", "BOX ", idtmed[503], par, 3); // fibre glass
379 par[1] = ytof * 0.25;
380 par[2] = (zlenA*0.5 - kInterCentrModBorder1)*0.5;
381 gMC->Gsvolu("FTOB", "BOX ", idtmed[503], par, 3); // fibre glass
382 gMC->Gsvolu("FTOC", "BOX ", idtmed[503], par, 3); // fibre glass
385 // New supermodule card section description
386 // 2 cm honeycomb layer between strips and cards
387 par[0] = xtof*0.5 + 2.;
388 par[1] = kHoneycombLayerThickness*0.5;
389 par[2] = zlenA*0.5 + 2.;
390 gMC->Gsvolu("FPEA", "BOX ", idtmed[506], par, 3); // Al + Cu honeycomb
392 //par[0] = xtof*0.5 + 2.;
393 //par[1] = kHoneycombLayerThickness*0.5;
394 par[2] = (zlenA*0.5 - kInterCentrModBorder1)*0.5 + 2.;
395 gMC->Gsvolu("FPEB", "BOX ", idtmed[506], par, 3); // Al + Cu honeycomb
398 // Definition of the air card containers (FAIA and FAIB)
401 par[1] = (ytof*0.5 - kHoneycombLayerThickness)*0.5;
403 gMC->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air
404 if (fTOFHoles) gMC->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air
406 // Positioning of fibre glass modules (FTOA, FTOB and FTOC) and
407 // card containers (FPEA, FAIA and FAIB)
409 //AliMatrix(idrotm[0], 90., 0., 0., 0., 90.,-90.);
410 AliMatrix(idrotm[0], 90., 0., 0., 0., 90.,270.);
412 for(Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++){
413 if(fTOFSectors[isec]==-1)continue;
415 sprintf(name, "BTOF%d",isec);
416 if (fTOFHoles && (isec==11||isec==12)) {
417 //if (fTOFHoles && (isec==16||isec==17)) { \\Old 6h convention
419 ycoor = (zlenA*0.5 + kInterCentrModBorder1)*0.5;
420 zcoor = -ytof * 0.25;
421 gMC->Gspos("FTOB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
422 gMC->Gspos("FTOC", 0, name, xcoor,-ycoor, zcoor, idrotm[0], "ONLY");
424 //ycoor = (zlenA*0.5 + kInterCentrModBorder1)*0.5;
425 zcoor = kHoneycombLayerThickness*0.5;
426 gMC->Gspos("FPEB", 1, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
427 gMC->Gspos("FPEB", 2, name, xcoor,-ycoor, zcoor, idrotm[0], "ONLY");
430 zcoor = kHoneycombLayerThickness + (ytof*0.5 - kHoneycombLayerThickness)*0.5;
431 gMC->Gspos("FAIB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
436 zcoor = -ytof * 0.25;
437 gMC->Gspos("FTOA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
440 zcoor = kHoneycombLayerThickness*0.5;
441 gMC->Gspos("FPEA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
444 zcoor = kHoneycombLayerThickness + (ytof*0.5 - kHoneycombLayerThickness)*0.5;
445 gMC->Gspos("FAIA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
449 // Definition and positioning
450 // of the not sensitive volumes with Insensitive Freon (FLTA, FLTB and FLTC)
452 Float_t xFLT, yFLT, zFLTA;
454 xFLT = xtof - kModuleWallThickness*2.;
455 yFLT = ytof*0.5 - kModuleWallThickness;
456 zFLTA = zlenA - kModuleWallThickness*2.;
461 gMC->Gsvolu("FLTA", "BOX ", idtmed[507], par, 3); // Freon mix
464 ycoor = kModuleWallThickness*0.5;
466 gMC->Gspos ("FLTA", 0, "FTOA", xcoor, ycoor, zcoor, 0, "ONLY");
469 par[2] = (zlenA*0.5 - kInterCentrModBorder1 - kModuleWallThickness)*0.5;
470 gMC->Gsvolu("FLTB", "BOX ", idtmed[507], par, 3); // Freon mix
471 gMC->Gsvolu("FLTC", "BOX ", idtmed[507], par, 3); // Freon mix
474 //ycoor = kModuleWallThickness*0.5;
476 gMC->Gspos ("FLTB", 0, "FTOB", xcoor, ycoor, zcoor, 0, "ONLY");
477 gMC->Gspos ("FLTC", 0, "FTOC", xcoor, ycoor, zcoor, 0, "ONLY");
480 Float_t alpha, tgal, beta, tgbe, trpa[11];
482 // Definition and positioning
483 // of the fibre glass walls between central and intermediate modules (FWZ1 and FWZ2)
485 tgal = (yFLT - 2.*kLengthInCeModBorder)/(kInterCentrModBorder2 - kInterCentrModBorder1);
486 alpha = TMath::ATan(tgal);
487 beta = (kPi*0.5 - alpha)*0.5;
488 tgbe = TMath::Tan(beta);
492 trpa[3] = kModuleWallThickness;
493 trpa[4] = (kLengthInCeModBorder - kModuleWallThickness*tgbe)*0.5;
494 trpa[5] = (kLengthInCeModBorder + kModuleWallThickness*tgbe)*0.5;
495 trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg;
496 trpa[7] = kModuleWallThickness;
497 trpa[8] = (kLengthInCeModBorder - kModuleWallThickness*tgbe)*0.5;
498 trpa[9] = (kLengthInCeModBorder + kModuleWallThickness*tgbe)*0.5;
499 trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg;
500 gMC->Gsvolu("FWZ1","TRAP", idtmed[503], trpa, 11); // fibre glass
502 AliMatrix (idrotm[1],90., 90.,180.,0.,90.,180.);
503 AliMatrix (idrotm[4],90., 90., 0.,0.,90., 0.);
506 ycoor = -(yFLT - kLengthInCeModBorder)*0.5;
507 zcoor = kInterCentrModBorder1;
508 gMC->Gspos("FWZ1", 1,"FLTA", xcoor, ycoor, zcoor,idrotm[1],"ONLY");
509 gMC->Gspos("FWZ1", 2,"FLTA", xcoor, ycoor,-zcoor,idrotm[4],"ONLY");
511 AliMatrix (idrotm[2],90.,270., 0.,0.,90.,180.);
512 AliMatrix (idrotm[5],90.,270.,180.,0.,90., 0.);
515 ycoor = (yFLT - kLengthInCeModBorder)*0.5;
516 zcoor = kInterCentrModBorder2;
517 gMC->Gspos("FWZ1", 3,"FLTA", xcoor, ycoor, zcoor,idrotm[2],"ONLY");
518 gMC->Gspos("FWZ1", 4,"FLTA", xcoor, ycoor,-zcoor,idrotm[5],"ONLY");
520 trpa[0] = 0.5*(kInterCentrModBorder2 - kInterCentrModBorder1)/TMath::Cos(alpha);
521 trpa[1] = kModuleWallThickness;
523 trpa[3] = -beta*kRaddeg;
526 gMC->Gsvolu("FWZ2","PARA", idtmed[503], trpa, 6); // fibre glass
528 AliMatrix (idrotm[3], alpha*kRaddeg,90.,90.+alpha*kRaddeg,90.,90.,180.);
529 AliMatrix (idrotm[6],180.-alpha*kRaddeg,90.,90.-alpha*kRaddeg,90.,90., 0.);
533 zcoor = (kInterCentrModBorder2 + kInterCentrModBorder1)*0.5;
534 gMC->Gspos("FWZ2", 1,"FLTA", xcoor, ycoor, zcoor,idrotm[3],"ONLY");
535 gMC->Gspos("FWZ2", 2,"FLTA", xcoor, ycoor,-zcoor,idrotm[6],"ONLY");
537 // Definition and positioning
538 // of the fibre glass walls between intermediate and lateral modules (FWZ3 and FWZ4)
540 tgal = (yFLT - 2.*kLengthExInModBorder)/(kExterInterModBorder2 - kExterInterModBorder1);
541 alpha = TMath::ATan(tgal);
542 beta = (kPi*0.5 - alpha)*0.5;
543 tgbe = TMath::Tan(beta);
547 trpa[3] = kModuleWallThickness;
548 trpa[4] = (kLengthExInModBorder - kModuleWallThickness*tgbe)*0.5;
549 trpa[5] = (kLengthExInModBorder + kModuleWallThickness*tgbe)*0.5;
550 trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg;
551 trpa[7] = kModuleWallThickness;
552 trpa[8] = (kLengthExInModBorder - kModuleWallThickness*tgbe)*0.5;
553 trpa[9] = (kLengthExInModBorder + kModuleWallThickness*tgbe)*0.5;
554 trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg;
555 gMC->Gsvolu("FWZ3","TRAP", idtmed[503], trpa, 11); // fibre glass
558 ycoor = (yFLT - kLengthExInModBorder)*0.5;
559 zcoor = kExterInterModBorder1;
560 gMC->Gspos("FWZ3", 1,"FLTA", xcoor, ycoor, zcoor,idrotm[5],"ONLY");
561 gMC->Gspos("FWZ3", 2,"FLTA", xcoor, ycoor,-zcoor,idrotm[2],"ONLY");
565 //ycoor = (yFLT - kLengthExInModBorder)*0.5;
566 zcoor = -kExterInterModBorder1 + (zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5;
567 gMC->Gspos("FWZ3", 5,"FLTB", xcoor, ycoor, zcoor,idrotm[2],"ONLY");
568 gMC->Gspos("FWZ3", 6,"FLTC", xcoor, ycoor,-zcoor,idrotm[5],"ONLY");
572 ycoor = -(yFLT - kLengthExInModBorder)*0.5;
573 zcoor = kExterInterModBorder2;
574 gMC->Gspos("FWZ3", 3,"FLTA", xcoor, ycoor, zcoor,idrotm[4],"ONLY");
575 gMC->Gspos("FWZ3", 4,"FLTA", xcoor, ycoor,-zcoor,idrotm[1],"ONLY");
579 //ycoor = -(yFLT - kLengthExInModBorder)*0.5;
580 zcoor = -kExterInterModBorder2 + (zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5;
581 gMC->Gspos("FWZ3", 7,"FLTB", xcoor, ycoor, zcoor,idrotm[1],"ONLY");
582 gMC->Gspos("FWZ3", 8,"FLTC", xcoor, ycoor,-zcoor,idrotm[4],"ONLY");
585 trpa[0] = 0.5*(kExterInterModBorder2 - kExterInterModBorder1)/TMath::Cos(alpha);
586 trpa[1] = kModuleWallThickness;
588 trpa[3] = -beta*kRaddeg;
591 gMC->Gsvolu("FWZ4","PARA", idtmed[503], trpa, 6); // fibre glass
593 AliMatrix (idrotm[13],alpha*kRaddeg,90.,90.+alpha*kRaddeg,90.,90.,180.);
594 AliMatrix (idrotm[16],180.-alpha*kRaddeg,90.,90.-alpha*kRaddeg,90.,90.,0.);
598 zcoor = (kExterInterModBorder2 + kExterInterModBorder1)*0.5;
599 gMC->Gspos("FWZ4", 1,"FLTA", xcoor, ycoor, zcoor,idrotm[16],"ONLY");
600 gMC->Gspos("FWZ4", 2,"FLTA", xcoor, ycoor,-zcoor,idrotm[13],"ONLY");
605 zcoor = -(kExterInterModBorder2 + kExterInterModBorder1)*0.5 +
606 (zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5;
607 gMC->Gspos("FWZ4", 3,"FLTB", xcoor, ycoor, zcoor,idrotm[13],"ONLY");
608 gMC->Gspos("FWZ4", 4,"FLTC", xcoor, ycoor,-zcoor,idrotm[16],"ONLY");
612 ///////////////// Detector itself //////////////////////
614 const Int_t knx = fTOFGeometry->NpadX(); // number of pads along x
615 const Int_t knz = fTOFGeometry->NpadZ(); // number of pads along z
616 const Float_t kPadX = fTOFGeometry->XPad(); // pad length along x
617 const Float_t kPadZ = fTOFGeometry->ZPad(); // pad length along z
619 // new description for strip volume -double stack strip-
620 // -- all constants are expressed in cm
621 // heigth of different layers
622 const Float_t khhony = 1.0; // heigth of HONY Layer
623 const Float_t khpcby = 0.08; // heigth of PCB Layer
624 const Float_t khrgly = 0.055; // heigth of RED GLASS Layer
626 const Float_t khfiliy = 0.125; // heigth of FISHLINE Layer
627 const Float_t khglassy = 0.160*0.5; // heigth of GLASS Layer
628 const Float_t khglfy = khfiliy+2.*khglassy; // heigth of GLASS+FISHLINE Layer
630 const Float_t khcpcby = 0.16; // heigth of PCB Central Layer
631 const Float_t kwhonz = 8.1; // z dimension of HONEY Layer
632 const Float_t kwpcbz1 = 10.6; // z dimension of PCB Lower Layer
633 const Float_t kwpcbz2 = 11.6; // z dimension of PCB Upper Layer
634 const Float_t kwcpcbz = 13.; // z dimension of PCB Central Layer
635 const Float_t kwrglz = 8.; // z dimension of RED GLASS Layer
636 const Float_t kwglfz = 7.; // z dimension of GLASS+FISHLN Layer
637 const Float_t klsensmx = knx*kPadX; // length of Sensitive Layer
638 const Float_t khsensmy = 0.05; // heigth of Sensitive Layer
639 const Float_t kwsensmz = knz*kPadZ; // width of Sensitive Layer
641 // heigth of the FSTR Volume (the strip volume)
642 const Float_t khstripy = 2.*khhony+2.*khpcby+4.*khrgly+2.*khglfy+khcpcby;
644 // width of the FSTR Volume (the strip volume)
645 const Float_t kwstripz = kwcpcbz;
646 // length of the FSTR Volume (the strip volume)
647 const Float_t klstripx = fTOFGeometry->StripLength();
649 Float_t parfp[3]={klstripx*0.5, khstripy*0.5, kwstripz*0.5};
650 // Coordinates of the strip center in the strip reference frame;
651 // used for positioning internal strip volumes
652 Float_t posfp[3]={0.,0.,0.};
654 // FSTR volume definition-filling this volume with non sensitive Gas Mixture
655 gMC->Gsvolu("FSTR","BOX",idtmed[507],parfp,3); // Freon mix
657 //-- HONY Layer definition
658 //parfp[0] = klstripx*0.5;
659 parfp[1] = khhony*0.5;
660 parfp[2] = kwhonz*0.5;
661 gMC->Gsvolu("FHON","BOX",idtmed[501],parfp,3); // honeycomb (Nomex)
662 // positioning 2 HONY Layers on FSTR volume
664 posfp[1] =-khstripy*0.5+parfp[1];
666 gMC->Gspos("FHON",1,"FSTR",0., posfp[1],0.,0,"ONLY");
667 gMC->Gspos("FHON",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
669 //-- PCB Layer definition
670 //parfp[0] = klstripx*0.5;
671 parfp[1] = khpcby*0.5;
672 parfp[2] = kwpcbz1*0.5;
673 gMC->Gsvolu("FPC1","BOX",idtmed[502],parfp,3); // G10
674 //parfp[0] = klstripx*0.5;
675 //parfp[1] = khpcby*0.5;
676 parfp[2] = kwpcbz2*0.5;
677 gMC->Gsvolu("FPC2","BOX",idtmed[502],parfp,3); // G10
678 // positioning 2 PCB Layers on FSTR volume
680 posfp[1] =-khstripy*0.5+khhony+parfp[1];
682 gMC->Gspos("FPC1",1,"FSTR",0.,-posfp[1],0.,0,"ONLY");
683 gMC->Gspos("FPC2",1,"FSTR",0., posfp[1],0.,0,"ONLY");
685 //-- central PCB layer definition
686 //parfp[0] = klstripx*0.5;
687 parfp[1] = khcpcby*0.5;
688 parfp[2] = kwcpcbz*0.5;
689 gMC->Gsvolu("FPCB","BOX",idtmed[502],parfp,3); // G10
690 // positioning the central PCB layer
691 gMC->Gspos("FPCB",1,"FSTR",0.,0.,0.,0,"ONLY");
694 Float_t parfs[3] = {klsensmx*0.5, khsensmy*0.5, kwsensmz*0.5};
695 gMC->Gsvolu("FSEN","BOX",idtmed[508],parfs,3); // sensitive
696 // dividing FSEN along z in knz=2 and along x in knx=48
697 gMC->Gsdvn("FSEZ","FSEN",knz,3);
698 gMC->Gsdvn("FPAD","FSEZ",knx,1);
699 // positioning a Sensitive layer inside FPCB
700 gMC->Gspos("FSEN",1,"FPCB",0.,0.,0.,0,"ONLY");
702 //-- RED GLASS Layer definition
703 //parfp[0] = klstripx*0.5;
704 parfp[1] = khrgly*0.5;
705 parfp[2] = kwrglz*0.5;
706 gMC->Gsvolu("FRGL","BOX",idtmed[509],parfp,3); // glass
707 // positioning 4 RED GLASS Layers on FSTR volume
709 posfp[1] = -khstripy*0.5+khhony+khpcby+parfp[1];
711 gMC->Gspos("FRGL",1,"FSTR",0., posfp[1],0.,0,"ONLY");
712 gMC->Gspos("FRGL",4,"FSTR",0.,-posfp[1],0.,0,"ONLY");
714 posfp[1] = (khcpcby+khrgly)*0.5;
716 gMC->Gspos("FRGL",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
717 gMC->Gspos("FRGL",3,"FSTR",0., posfp[1],0.,0,"ONLY");
719 //-- GLASS+FISHLINE Layer definition
720 //parfp[0] = klstripx*0.5;
721 parfp[1] = khglfy*0.5;
722 parfp[2] = kwglfz*0.5;
723 gMC->Gsvolu("FGLF","BOX",idtmed[504],parfp,3);
725 // positioning 2 GLASS+FISHLINE Layers on FSTR volume
727 posfp[1] = (khcpcby + khglfy)*0.5 + khrgly;
729 gMC->Gspos("FGLF",1,"FSTR",0.,-posfp[1],0.,0,"ONLY");
730 gMC->Gspos("FGLF",2,"FSTR",0., posfp[1],0.,0,"ONLY");
732 // Positioning the Strips (FSTR volumes) in the FLT volumes
733 Int_t maxStripNumbers [5] ={fTOFGeometry->NStripC(),
734 fTOFGeometry->NStripB(),
735 fTOFGeometry->NStripA(),
736 fTOFGeometry->NStripB(),
737 fTOFGeometry->NStripC()};
739 Int_t totalStrip = 0;
740 Float_t xpos, zpos, ypos, ang;
741 for(Int_t iplate = 0; iplate < fTOFGeometry->NPlates(); iplate++){
742 if (iplate>0) totalStrip += maxStripNumbers[iplate-1];
743 for(Int_t istrip = 0; istrip < maxStripNumbers[iplate]; istrip++){
745 ang = fTOFGeometry->GetAngles(iplate,istrip);
746 AliDebug(1, Form(" iplate = %1i, istrip = %2i ---> ang = %f", iplate, istrip, ang));
748 if (ang>0.) AliMatrix (idrotm[istrip+totalStrip+1],90.,0.,90.+ang,90., ang, 90.);
749 else if (ang==0.) AliMatrix (idrotm[istrip+totalStrip+1],90.,0.,90.,90., 0., 0.);
750 else if (ang<0.) AliMatrix (idrotm[istrip+totalStrip+1],90.,0.,90.+ang,90.,-ang,270.);
753 zpos = fTOFGeometry->GetDistances(iplate,istrip);
754 ypos = fTOFGeometry->GetHeights(iplate,istrip) + yFLT*0.5;
756 gMC->Gspos("FSTR",istrip+totalStrip+1,"FLTA", xpos, ypos,-zpos,idrotm[istrip+totalStrip+1], "ONLY");
759 if (istrip+totalStrip+1>53)
760 gMC->Gspos("FSTR",istrip+totalStrip+1,"FLTC", xpos, ypos,-zpos-(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[istrip+totalStrip+1],"ONLY");
761 if (istrip+totalStrip+1<39)
762 gMC->Gspos("FSTR",istrip+totalStrip+1,"FLTB", xpos, ypos,-zpos+(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[istrip+totalStrip+1],"ONLY");
767 // Definition of the cards, cooling tubes and layer for thermal dispersion
770 // card volume definition
771 Float_t carpar[3] = {9.5, 5.75, 0.5};
772 gMC->Gsvolu("FCA1", "BOX ", idtmed[514], carpar, 3); // PCB+Alu small Card
776 gMC->Gsvolu("FCA2", "BOX ", idtmed[514], carpar, 3); // PCB+Alu long Card
778 // tube volume definition
779 Float_t tubepar[3] = {0., 0.4, xFLT*0.5-15.};
780 gMC->Gsvolu("FTUB", "TUBE", idtmed[513], tubepar, 3); // copper cooling tubes
783 //tubepar[2]= xFLT*0.5 - 15.;
784 gMC->Gsvolu("FITU", "TUBE", idtmed[510], tubepar, 3); // cooling water
785 // Positioning of the water tube into the steel one
786 gMC->Gspos("FITU",1,"FTUB",0.,0.,0.,0,"ONLY");
789 Float_t cbpar[3] = {0., 0.5, tubepar[2]};
790 gMC->Gsvolu("FCAB", "TUBE", idtmed[511], cbpar, 3); // copper+alu
792 // Alluminium components
793 Float_t lonpar[3] = {tubepar[2], 6.15, 0.7};
794 gMC->Gsvolu("FTLN", "BOX ", idtmed[505], lonpar, 3); // alluminium
797 lonpar[2] = zlenA*0.5;
798 gMC->Gsvolu("FLON", "BOX ", idtmed[505], lonpar, 3); // alluminium
801 AliMatrix(idrotm[99], 180., 90., 90., 90., 90., 0.);
803 // cards, tubes, cables positioning
804 Float_t carpos[3], rowstep = 6.66, ytub= 3.65, ycab= ytub-3.;
805 Float_t rowgap[5] = {13.5, 22.9, 16.94, 23.8, 20.4};
806 Int_t row, rowb[5] = {6, 7, 6, 19, 7}, nrow;
807 carpos[0] = 25. - xtof*0.5;
808 carpos[1] = (11.5 - (ytof*0.5 - kHoneycombLayerThickness))*0.5;
810 for (Int_t sg= -1; sg< 2; sg+= 2) {
811 carpos[2] = sg*zlenA*0.5;
812 for (Int_t nb=0; nb<5; ++nb) {
813 carpos[2] = carpos[2] - sg*(rowgap[nb] - rowstep);
814 nrow = row + rowb[nb];
815 for ( ; row < nrow ; ++row) {
816 carpos[2] -= sg*rowstep;
817 gMC->Gspos("FCA1",2*row-1, "FAIA", carpos[0],carpos[1],carpos[2], 0,"ONLY");
818 gMC->Gspos("FCA1", 2*row, "FAIA",-carpos[0],carpos[1],carpos[2], 0,"ONLY");
819 gMC->Gspos("FCA2", row, "FAIA", 0., carpos[1], carpos[2], 0, "ONLY");
820 gMC->Gspos("FTUB", row, "FAIA", 0., ytub, carpos[2]-sg, idrotm[99], "ONLY");
821 gMC->Gspos("FCAB", row, "FAIA", 0., ycab, carpos[2]-sg, idrotm[99], "ONLY");
824 gMC->Gspos("FTLN", 5+4*sg, "FAIA", 0., -0.1, 369.9*sg, 0, "ONLY");
825 gMC->Gspos("FTLN", 5+3*sg, "FAIA", 0., -0.1, 366.9*sg, 0, "ONLY");
826 gMC->Gspos("FTLN", 5+2*sg, "FAIA", 0., -0.1, 198.8*sg, 0, "ONLY");
827 gMC->Gspos("FTLN", 5+sg, "FAIA", 0., -0.1, 56.82*sg, 0, "ONLY");
829 gMC->Gspos("FCA1", 181, "FAIA", carpos[0],carpos[1],0., 0,"ONLY");
830 gMC->Gspos("FCA1", 182, "FAIA",-carpos[0],carpos[1],0., 0,"ONLY");
831 gMC->Gspos("FCA2", 91, "FAIA", 0., carpos[1], 0., 0, "ONLY");
832 gMC->Gspos("FTUB", 91, "FAIA", 0., ytub, 1., idrotm[99], "ONLY");
833 gMC->Gspos("FCAB", 91, "FAIA", 0., ycab, 1., idrotm[99], "ONLY");
834 gMC->Gspos("FLON", 1, "FAIA",-24., ytub+1.4, 0., 0, "MANY");
835 gMC->Gspos("FLON", 2, "FAIA", 24., ytub+1.4, 0., 0, "MANY");
838 for (Int_t sg= -1; sg< 2; sg+= 2) {
839 carpos[2] = sg*zlenA*0.5;
840 for (Int_t nb=0; nb<4; ++nb) {
841 carpos[2] = carpos[2] - sg*(rowgap[nb] - rowstep);
842 nrow = row + rowb[nb];
843 for ( ; row < nrow ; ++row) {
844 carpos[2] -= sg*rowstep;
845 gMC->Gspos("FCA1",2*row-1, "FAIB", carpos[0],carpos[1],carpos[2], 0,"ONLY");
846 gMC->Gspos("FCA1", 2*row, "FAIB",-carpos[0],carpos[1],carpos[2], 0,"ONLY");
847 gMC->Gspos("FCA2", row, "FAIB", 0., carpos[1], carpos[2], 0, "ONLY");
848 gMC->Gspos("FTUB", row, "FAIB", 0., ytub,carpos[2]-sg, idrotm[99], "ONLY");
849 gMC->Gspos("FCAB", row, "FAIB", 0., ycab,carpos[2]-sg, idrotm[99], "ONLY");
852 gMC->Gspos("FTLN", 5+4*sg, "FAIB", 0., -0.1, 369.9*sg, 0, "ONLY");
853 gMC->Gspos("FTLN", 5+3*sg, "FAIB", 0., -0.1, 366.9*sg, 0, "ONLY");
854 gMC->Gspos("FTLN", 5+2*sg, "FAIB", 0., -0.1, 198.8*sg, 0, "ONLY");
855 gMC->Gspos("FTLN", 5+sg, "FAIB", 0., -0.1, 56.82*sg, 0, "ONLY");
857 gMC->Gspos("FLON", 1, "FAIB",-24., ytub+1.4, 0., 0, "MANY");
858 gMC->Gspos("FLON", 2, "FAIB", 24., ytub+1.4, 0., 0, "MANY");
861 // Cables and tubes on the side blocks
862 const Float_t kcbll = zlenA*0.5; // length of block
863 const Float_t kcbllh = zlenA*0.5 - kInterCentrModBorder2; // length of block in case of hole
864 const Float_t kcblw = 13.5; // width of block
865 const Float_t kcblh1 = 2.; // min. heigth of block
866 const Float_t kcblh2 = 12.3; // max. heigth of block
869 tgal = (kcblh2 - kcblh1)/(2.*kcbll);
870 cblpar[0] = kcblw *0.5;
873 cblpar[3] = kcbll *0.5;
874 cblpar[4] = kcblh1 *0.5;
875 cblpar[5] = kcblh2 *0.5;
876 cblpar[6] = TMath::ATan(tgal)*kRaddeg;
877 cblpar[7] = kcbll *0.5;
878 cblpar[8] = kcblh1 *0.5;
879 cblpar[9] = kcblh2 *0.5;
880 cblpar[10]= cblpar[6];
881 gMC->Gsvolu("FCBL", "TRAP", idtmed[512], cblpar, 11); // cables & tubes mix
882 Float_t sawpar[3] = {0.5, kcblh2*0.5, kcbll};
883 gMC->Gsvolu("FSAW", "BOX ", idtmed[505], sawpar, 3); // Side Al walls
884 // volume positioning
885 AliMatrix(idrotm[7], 90., 90., 180., 0., 90., 180.);
886 AliMatrix(idrotm[8], 90., 90., 0., 0., 90., 0.);
887 xcoor = (xtof-kcblw)*0.5 - 2.*sawpar[0];
888 ycoor = (kcblh1+kcblh2)*0.25 - (ytof*0.5 - kHoneycombLayerThickness)*0.5;
890 gMC->Gspos("FCBL", 1, "FAIA", -xcoor, ycoor, -zcoor, idrotm[7], "ONLY");
891 gMC->Gspos("FCBL", 2, "FAIA", xcoor, ycoor, -zcoor, idrotm[7], "ONLY");
892 gMC->Gspos("FCBL", 3, "FAIA", -xcoor, ycoor, zcoor, idrotm[8], "ONLY");
893 gMC->Gspos("FCBL", 4, "FAIA", xcoor, ycoor, zcoor, idrotm[8], "ONLY");
894 xcoor = xtof*0.5-sawpar[0];
895 ycoor = (kcblh2 - ytof*0.5 + kHoneycombLayerThickness)*0.5;
896 gMC->Gspos("FSAW", 1, "FAIA", -xcoor, ycoor, 0., 0, "ONLY");
897 gMC->Gspos("FSAW", 2, "FAIA", xcoor, ycoor, 0., 0, "ONLY");
899 cblpar[3] = kcbllh *0.5;
900 cblpar[5] = kcblh1*0.5 + kcbllh*tgal;
901 cblpar[7] = kcbllh *0.5;
902 cblpar[9] = cblpar[5];
903 gMC->Gsvolu("FCBB", "TRAP", idtmed[512], cblpar, 11); // cables & tubes mix
904 xcoor = (xtof - kcblw)*0.5 - 2.*sawpar[0];
905 ycoor = (kcblh1 + 2.*cblpar[5])*0.25 - (ytof*0.5 - kHoneycombLayerThickness)*0.5;
906 zcoor = kcbll-kcbllh*0.5;
907 gMC->Gspos("FCBB", 1, "FAIB", -xcoor, ycoor, -zcoor, idrotm[7], "ONLY");
908 gMC->Gspos("FCBB", 2, "FAIB", xcoor, ycoor, -zcoor, idrotm[7], "ONLY");
909 gMC->Gspos("FCBB", 3, "FAIB", -xcoor, ycoor, zcoor, idrotm[8], "ONLY");
910 gMC->Gspos("FCBB", 4, "FAIB", xcoor, ycoor, zcoor, idrotm[8], "ONLY");
911 xcoor = xtof*0.5 - sawpar[0];
912 ycoor = (kcblh2 - ytof*0.5 + kHoneycombLayerThickness)*0.5;
913 gMC->Gspos("FSAW", 1, "FAIB", -xcoor, ycoor, 0., 0, "ONLY");
914 gMC->Gspos("FSAW", 2, "FAIB", xcoor, ycoor, 0., 0, "ONLY");
917 // TOF Supermodule cover definition and positioning
918 Float_t covpar[3] = {xtof*0.5, 0.1, zlenA*0.5};
919 gMC->Gsvolu("FCOV", "BOX ", idtmed[505], covpar, 3); // Al cover
921 ycoor = 12.5*0.5 - 0.1;
923 gMC->Gspos("FCOV", 0, "FAIA", xcoor, ycoor, zcoor, 0, "ONLY");
924 if (fTOFHoles) gMC->Gspos("FCOV", 0, "FAIB", xcoor, ycoor, zcoor, 0, "ONLY");
928 // Empty crate weight: 50 Kg, electronics cards + cables ~ 52 Kg.
929 // Per each side (A and C) the total weight is: 2x102 ~ 204 Kg.
930 // ... + weight of the connection pannel for the steel cooling system (Cr 18%, Ni 12%, Fe 70%)
931 // + other remaining elements + various supports
933 // Each FEA card weight + all supports
934 // (including all bolts and not including the cable connectors)
936 // Per each strip there are 4 FEA cards, then
937 // the total weight of the front-end electonics section is: 353.1 g x 4 = 1412.4 g.
939 Float_t serpar[3] = {29.*0.5, 121.*0.5, 90.*0.5};
940 gMC->Gsvolu("FTOS", "BOX ", idtmed[515], serpar, 3); // Al + Cu + steel
941 zcoor = (118.-90.)*0.5;
942 Float_t phi = -10., ra = fTOFGeometry->Rmin() + ytof*0.5;
943 for (Int_t i = 0; i < fTOFGeometry->NSectors(); i++) {
945 xcoor = ra * TMath::Cos(phi * kDegrad);
946 ycoor = ra * TMath::Sin(phi * kDegrad);
947 AliMatrix(idrotm[20+i], 90., phi, 90., phi + 270., 0., 0.);
948 gMC->Gspos("FTOS", i, "BFMO", xcoor, ycoor, zcoor, idrotm[20+i], "ONLY");
950 zcoor = (90. - 223.)*0.5;
951 gMC->Gspos("FTOS", 1, "BBCE", ra, 0., zcoor, 0, "ONLY");
954 //_____________________________________________________________________________
955 void AliTOFv6T0::DrawModule() const
958 // Draw a shaded view of the Time Of Flight version 5
961 // Set everything unseen
962 gMC->Gsatt("*", "seen", -1);
965 //Set volumes visible
968 //Set ALIC mother transparent
969 gMC->Gsatt("ALIC","SEEN", 0);
972 // Level 1 for TOF volumes
973 gMC->Gsatt("B077","seen", 0);
976 // Level 2 for TOF volumes
977 gMC->Gsatt("B071","seen", 0);
978 gMC->Gsatt("B074","seen", 0);
979 gMC->Gsatt("B075","seen", 0);
980 gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
981 gMC->Gsatt("B080","seen", 0); // B080 does not has sub-level
984 gMC->Gsatt("B056","seen", 0); // B056 does not has sub-levels -
985 gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped -
986 gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped -
987 gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped -
988 gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped -
991 for (Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
992 sprintf(name, "BREF%d",isec);
993 gMC->Gsatt(name,"seen", 0); // all BREF%d sub-levels skipped -
994 sprintf(name, "BTRD%d",isec);
995 gMC->Gsatt(name,"seen", 0); // all BTRD%d sub-levels skipped -
996 sprintf(name, "BTOF%d",isec);
997 gMC->Gsatt(name,"seen",-2); // all BTOF%d sub-levels skipped -
1000 gMC->Gdopt("hide", "on");
1001 gMC->Gdopt("shad", "on");
1002 gMC->Gsatt("*", "fill", 7);
1003 gMC->SetClipBox(".");
1004 gMC->SetClipBox("*", 100, 1000, 100, 1000, 100, 1000);
1005 gMC->DefaultRange();
1006 gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018);
1007 gMC->Gdhead(1111, "Time Of Flight");
1008 gMC->Gdman(18, 3, "MAN");
1009 gMC->Gdopt("hide","off");
1011 //_____________________________________________________________________________
1012 void AliTOFv6T0::DrawDetectorModules() const
1015 // Draw a shaded view of the TOF detector SuperModules version 5
1018 // Set everything unseen
1019 gMC->Gsatt("*", "seen", -1);
1022 //Set volumes visible
1025 //Set ALIC mother transparent
1026 gMC->Gsatt("ALIC","SEEN", 0);
1029 // Level 1 for TOF volumes
1030 gMC->Gsatt("B077","seen", 0);
1033 // Level 2 for TOF volumes
1034 gMC->Gsatt("B071","seen", 0);
1035 gMC->Gsatt("B074","seen", 0);
1036 gMC->Gsatt("B075","seen", 0);
1037 gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
1038 gMC->Gsatt("B080","seen", 0); // B080 does not has sub-level
1041 gMC->Gsatt("B056","seen", 0); // B056 does not has sub-levels -
1042 gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped -
1043 gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped -
1044 gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped -
1045 gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped -
1048 for (Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
1049 sprintf(name, "BREF%d",isec);
1050 gMC->Gsatt(name,"seen", 0); // all BREF%d sub-levels skipped -
1051 sprintf(name, "BTRD%d",isec);
1052 gMC->Gsatt(name,"seen", 0); // all BTRD%d sub-levels skipped -
1053 sprintf(name, "BTOF%d",isec);
1054 gMC->Gsatt(name,"seen", 0); // all BTOF%d sub-levels skipped -
1057 // Level 3 of B071, B075 and B074
1058 gMC->Gsatt("FTOA","seen",-2); // all FTOA sub-levels skipped -
1059 if (fTOFHoles) gMC->Gsatt("FTOB","seen",-2); // all FTOB sub-levels skipped -
1060 if (fTOFHoles) gMC->Gsatt("FTOC","seen",-2); // all FTOC sub-levels skipped -
1062 // Level 3 of B071, B075 and B074
1063 gMC->Gsatt("FAIA","seen",-1); // all FAIA sub-levels skipped -
1064 if (fTOFHoles) gMC->Gsatt("FAIB","seen",-1); // all FAIB sub-levels skipped -
1066 // Level 3 of B071, B075 and B074
1067 gMC->Gsatt("FPEA","seen",1); // all FPEA sub-levels skipped -
1068 if (fTOFHoles) gMC->Gsatt("FPEB","seen",1); // all FPEB sub-levels skipped -
1070 gMC->Gdopt("hide","on");
1071 gMC->Gdopt("shad","on");
1072 gMC->Gsatt("*", "fill", 5);
1073 gMC->SetClipBox(".");
1074 gMC->SetClipBox("*", 100, 1000, 100, 1000, 0, 1000);
1075 gMC->DefaultRange();
1076 gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018);
1077 gMC->Gdhead(1111,"TOF detector");
1078 gMC->Gdman(18, 3, "MAN");
1079 gMC->Gdopt("hide","off");
1082 //_____________________________________________________________________________
1083 void AliTOFv6T0::DrawDetectorStrips() const
1086 // Draw a shaded view of the TOF strips for version 5
1089 // Set everything unseen
1090 gMC->Gsatt("*", "seen", -1);
1093 //Set volumes visible
1096 //Set ALIC mother transparent
1097 gMC->Gsatt("ALIC","SEEN", 0);
1100 // Level 1 for TOF volumes
1101 gMC->Gsatt("B077","seen", 0);
1104 // Level 2 for TOF volumes
1105 gMC->Gsatt("B071","seen", 0);
1106 gMC->Gsatt("B074","seen", 0);
1107 gMC->Gsatt("B075","seen", 0);
1108 gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
1109 gMC->Gsatt("B080","seen", 0); // B080 does not has sub-level
1112 gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped -
1113 gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped -
1114 gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped -
1115 gMC->Gsatt("B056","seen", 0); // B056 does not has sub-levels -
1116 gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped -
1119 for (Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
1120 sprintf(name, "BREF%d",isec);
1121 gMC->Gsatt(name,"seen", 0); // all BREF%d sub-levels skipped -
1122 sprintf(name, "BTRD%d",isec);
1123 gMC->Gsatt(name,"seen", 0); // all BTRD%d sub-levels skipped -
1124 sprintf(name, "BTOF%d",isec);
1125 gMC->Gsatt(name,"seen", 0); // all BTOF%d sub-levels skipped -
1128 // Level 3 of B071, B074 and B075
1129 gMC->Gsatt("FTOA","SEEN", 0);
1130 if (fTOFHoles) gMC->Gsatt("FTOB","SEEN", 0);
1131 if (fTOFHoles) gMC->Gsatt("FTOC","SEEN", 0);
1133 // Level 4 of B071, B074 and B075
1134 gMC->Gsatt("FLTA","SEEN", 0);
1135 if (fTOFHoles) gMC->Gsatt("FLTB","SEEN", 0);
1136 if (fTOFHoles) gMC->Gsatt("FLTC","SEEN", 0);
1138 // Level 5 of B071, B074 and B075
1139 gMC->Gsatt("FAIA","SEEN", 0);
1140 if (fTOFHoles) gMC->Gsatt("FAIB","SEEN", 0);
1142 gMC->Gsatt("FPEA","SEEN", 1);
1143 if (fTOFHoles) gMC->Gsatt("FPEB","SEEN", 1);
1145 gMC->Gsatt("FSTR","SEEN",-2); // all FSTR sub-levels skipped -
1147 gMC->Gsatt("FWZ1","SEEN", 1);
1148 gMC->Gsatt("FWZ2","SEEN", 1);
1149 gMC->Gsatt("FWZ3","SEEN", 1);
1150 gMC->Gsatt("FWZ4","SEEN", 1);
1155 gMC->Gsatt("FCA1","SEEN", 0);
1156 gMC->Gsatt("FCA2","SEEN", 0);
1157 gMC->Gsatt("FCAB","SEEN", 0);
1158 gMC->Gsatt("FTUB","SEEN",-1); // all FTUB sub-levels skipped -
1159 gMC->Gsatt("FTLN","SEEN", 0);
1160 gMC->Gsatt("FLTN","SEEN", 0);
1161 gMC->Gsatt("FCBL","SEEN", 0);
1162 gMC->Gsatt("FSAW","SEEN", 0);
1163 gMC->Gsatt("FCOV","SEEN", 0);
1164 if (fTOFHoles) gMC->Gsatt("FCBB","SEEN", 0);
1167 gMC->Gsatt("FITU","SEEN", 0);
1170 gMC->Gsatt("FHON","SEEN", 1);
1171 gMC->Gsatt("FPC1","SEEN", 1);
1172 gMC->Gsatt("FPC2","SEEN", 1);
1173 gMC->Gsatt("FPCB","SEEN", 1);
1174 gMC->Gsatt("FRGL","SEEN", 1);
1175 gMC->Gsatt("FGLF","SEEN", 1);
1177 // Level 2 of FPCB => Level 3 of FSTR
1178 gMC->Gsatt("FSEN","SEEN", 0);
1179 gMC->Gsatt("FSEZ","SEEN", 0);
1180 gMC->Gsatt("FPAD","SEEN", 1);
1182 gMC->Gdopt("hide","on");
1183 gMC->Gdopt("shad","on");
1184 gMC->Gsatt("*", "fill", 5);
1185 gMC->SetClipBox(".");
1186 gMC->SetClipBox("*", 0, 1000, 0, 1000, 0, 1000);
1187 gMC->DefaultRange();
1188 gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018);
1189 gMC->Gdhead(1111,"TOF Strips");
1190 gMC->Gdman(18, 3, "MAN");
1191 gMC->Gdopt("hide","off");
1194 //_____________________________________________________________________________
1195 void AliTOFv6T0::CreateMaterials()
1198 // Define materials for the Time Of Flight
1201 //AliTOF::CreateMaterials();
1203 AliMagF *magneticField = (AliMagF*)gAlice->Field();
1205 Int_t isxfld = magneticField->Integ();
1206 Float_t sxmgmx = magneticField->Max();
1208 Float_t we[7], na[7];
1210 //--- Quartz (SiO2) to simulate float glass
1211 // density tuned to have correct float glass
1213 Float_t aq[2] = { 28.09,16. };
1214 Float_t zq[2] = { 14.,8. };
1215 Float_t wq[2] = { 1.,2. };
1216 //Float_t dq = 2.55; // std value: 2.2
1217 Float_t dq = 2.7; // (+5.9%)
1221 Float_t anox[4] = {12.01,1.01,16.00,14.01};
1222 Float_t znox[4] = { 6., 1., 8., 7.};
1223 Float_t wnox[4] = {14., 22., 2., 2.};
1224 //Float_t dnox = 0.048; //old value
1225 Float_t dnox = 0.22; // (x 4.6)
1228 // --- glass+freon { Si, O, C, F, H, S }
1229 Float_t agfr[6]= {28.09,16.00,12.01,19.00,1.01,32.065};
1230 Float_t zgfr[6]= {14., 8., 6., 9., 1., 16.};
1231 Float_t wgfr[6]= {0.465, 0.530, 0.000484, 0.00383, 4.0e-05, 0.000646};
1233 AliDebug(1,Form("wgfr: %d %d %d %d %d %d", wgfr[0], wgfr[1], wgfr[2], wgfr[3], wgfr[4], wgfr[5]));
1234 //Float_t dgfr = 1.35; // + FISHLINE (old value)
1235 Float_t dgfr = 1.6; // + FISHLINE(+18.5 %)
1237 // --- G10 {Si, O, C, H, O}
1238 Float_t ag10[5] = {28.09,16.00,12.01,1.01,16.00};
1239 Float_t zg10[5] = {14., 8., 6., 1., 8.};
1242 na[0]= 1. , na[1]= 2. , na[2]= 0. , na[3]= 0. , na[4]= 0.;
1243 MaterialMixer(we,ag10,na,5);
1244 wmatg10[0]= we[0]*0.6;
1245 wmatg10[1]= we[1]*0.6;
1246 na[0]= 0. , na[1]= 0. , na[2]= 14. , na[3]= 20. , na[4]= 3.;
1247 MaterialMixer(we,ag10,na,5);
1248 wmatg10[2]= we[2]*0.4;
1249 wmatg10[3]= we[3]*0.4;
1250 wmatg10[4]= we[4]*0.4;
1251 AliDebug(1,Form("wg10 %d %d %d %d %d", wmatg10[0], wmatg10[1], wmatg10[2], wmatg10[3], wmatg10[4]));
1252 // Float_t densg10 = 1.7; //old value
1253 Float_t densg10 = 2.0; // (+17.8%)
1256 Float_t awa[2] = { 1., 16. };
1257 Float_t zwa[2] = { 1., 8. };
1258 Float_t wwa[2] = { 2., 1. };
1263 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
1264 Float_t zAir[4]={6.,7.,8.,18.};
1265 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
1266 Float_t dAir = 1.20479E-3;
1269 Float_t afg[4] = {28.09,16.00,12.01,1.01};
1270 Float_t zfg[4] = {14., 8., 6., 1.};
1271 Float_t wfg[4] = {0.12906,0.29405,0.51502,0.06187};
1272 //Float_t dfg = 1.111;
1273 Float_t dfg = 2.; // (+1.8%)
1276 // --- Freon C2F4H2 + SF6
1277 Float_t afre[4]= {12.01,1.01,19.00,32.07};
1278 Float_t zfre[4]= { 6., 1., 9., 16.};
1279 Float_t wfre[4]= {0.21250,0.01787,0.74827,0.021355};
1280 Float_t densfre= 0.00375;
1283 // --- Al + Cu + G10 {Al, Cu, Si, O, C, H, O}
1284 Float_t acar[7]= {26.98,63.55,28.09,16.00,12.01,1.01,16.00};
1285 Float_t zcar[7]= {13., 29., 14., 8., 6., 1., 8.};
1289 wcar[2]= 0.25*wmatg10[0];
1290 wcar[3]= 0.25*wmatg10[1];
1291 wcar[4]= 0.25*wmatg10[2];
1292 wcar[5]= 0.25*wmatg10[3];
1293 wcar[6]= 0.25*wmatg10[4];
1294 AliDebug(1,Form("wcar %d %d %d %d %d %d %d", wcar[0], wcar[1], wcar[2], wcar[3], wcar[4], wcar[5], wcar[6]));
1297 // --- Cables, tubes {Al, Cu} ---
1298 Float_t acbt[2]= {26.98,63.55};
1299 Float_t zcbt[2]= {13., 29.};
1300 //Float_t wcbt[2]= {0.541,0.459};
1301 Float_t wcbt[2]= {0.407,0.593};
1302 //Float_t decbt = 0.95;
1303 Float_t decbt = 0.68;
1305 // --- Cable {Al, Cu}
1306 Float_t wcb[2] = {0.165,0.835};
1307 Float_t decb = 0.962;
1309 // --- Honeycomb layer {Al, Cu}
1310 Float_t whon[2]= {0.9,0.1};
1311 //Float_t dhon = 0.44;
1312 Float_t dhon = 1.095; // (x 2.56)
1314 // --- Crates boxes {Al, Cu, Fe, Cr, Ni}
1315 Float_t acra[5]= {26.98,63.55,55.845,52.00,58.69};
1316 Float_t zcra[5]= {13., 29., 26., 24., 28.};
1317 Float_t wcra[5]= {0.7,0.2,0.07,0.018,0.012};
1318 Float_t dcra = 0.77;
1320 AliMixture ( 0, "Air$", aAir, zAir, dAir, 4, wAir);
1321 AliMixture ( 1, "Nomex$", anox, znox, dnox, nnox, wnox);
1322 AliMixture ( 2, "G10$", ag10, zg10, densg10, nlmatg10, wmatg10);
1323 AliMixture ( 3, "fibre glass$", afg, zfg, dfg, nfg, wfg);
1324 AliMaterial( 4, "Al $", 26.98, 13., 2.7, 8.9, 37.2);
1325 AliMixture ( 5, "Al+Cu honeycomb$", acbt, zcbt, dhon, 2, whon);
1326 AliMixture ( 6, "Freon$", afre, zfre, densfre, nfre, wfre);
1327 AliMixture ( 7, "Glass$", aq, zq, dq, nq, wq);
1328 AliMixture ( 8, "glass-freon$", agfr, zgfr, dgfr, ngfr, wgfr);
1329 AliMixture ( 9, "Water$", awa, zwa, dwa, nwa, wwa);
1330 AliMixture (10, "Al+Cu$", acbt, zcbt, decbt, 2, wcbt);
1331 AliMaterial(11, "Cu $", 63.54, 29., 3.392, 1.43, 10.);
1332 AliMixture (12, "Al+Cu (cable)$", acbt, zcbt, decb, 2, wcb);
1333 AliMixture (13, "Al+Cu+G10$", acar, zcar, dcar, 7, wcar);
1334 AliMixture (14, "Al+Cu+steel$", acra, zcra, dcra, 5, wcra);
1336 Float_t epsil, stmin, deemax, stemax;
1339 // EPSIL = 0.1 ! Tracking precision,
1340 // STEMAX = 0.1 ! Maximum displacement for multiple scattering
1341 // DEEMAX = 0.1 ! Maximum fractional energy loss, DLS
1345 epsil = .001; // Tracking precision,
1346 stemax = -1.; // Maximum displacement for multiple scattering
1347 deemax = -.3; // Maximum fractional energy loss, DLS
1350 AliMedium( 1, "Air$", 0, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1351 AliMedium( 2,"Nomex$", 1, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1352 AliMedium( 3,"G10$", 2, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1353 AliMedium( 4,"fibre glass$", 3, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1354 AliMedium( 5,"glass-freon$", 8, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1355 AliMedium( 6,"Al Frame$", 4, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1356 AliMedium( 7,"honeycomb$", 5, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1357 AliMedium( 8,"Fre$", 6, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1358 AliMedium( 9,"Cu-S$", 11, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1359 AliMedium(10,"Glass$", 7, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1360 AliMedium(11,"Water$", 9, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1361 AliMedium(12,"Cable$", 12, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1362 AliMedium(13,"Al+Cables$", 10, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1363 AliMedium(14,"Copper$", 11, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1364 AliMedium(15,"Cards$", 13, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1365 AliMedium(16,"Crates$", 14, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
1368 //_____________________________________________________________________________
1369 void AliTOFv6T0::Init()
1372 // Initialise the detector after the geometry has been defined
1374 AliDebug(1, "**************************************"
1376 "**************************************");
1377 AliDebug(1, " Version 4 of TOF initialing, "
1378 "symmetric TOF - Full Coverage version");
1382 fIdFTOA = gMC->VolId("FTOA");
1384 fIdFTOB = gMC->VolId("FTOB");
1385 fIdFTOC = gMC->VolId("FTOC");
1387 fIdFLTA = gMC->VolId("FLTA");
1389 fIdFLTB = gMC->VolId("FLTB");
1390 fIdFLTC = gMC->VolId("FLTC");
1393 AliDebug(1, "**************************************"
1395 "**************************************");
1398 //_____________________________________________________________________________
1399 void AliTOFv6T0::StepManager()
1403 // Procedure called at each step in the Time Of Flight
1406 TLorentzVector mom, pos;
1407 Float_t xm[3],pm[3],xpad[3],ppad[3];
1410 Int_t sector, plate, padx, padz, strip;
1411 Int_t copy, padzid, padxid, stripid, i;
1412 Int_t *idtmed = fIdtmed->GetArray()-499;
1413 Float_t incidenceAngle;
1415 const char* volpath;
1420 gMC->IsTrackEntering()
1421 && gMC->TrackCharge()
1422 //&& gMC->GetMedium()==idtmed[508]
1423 && gMC->CurrentMedium()==idtmed[508]
1424 && gMC->CurrentVolID(copy)==fIdSens
1428 AliMC *mcApplication = (AliMC*)gAlice->GetMCApp();
1430 AddTrackReference(mcApplication->GetCurrentTrackNumber());
1431 //AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber());
1433 // getting information about hit volumes
1435 padzid=gMC->CurrentVolOffID(1,copy);
1439 padxid=gMC->CurrentVolOffID(0,copy);
1443 stripid=gMC->CurrentVolOffID(4,copy);
1447 gMC->TrackPosition(pos);
1448 gMC->TrackMomentum(mom);
1450 Double_t normMom=1./mom.Rho();
1452 // getting the coordinates in pad ref system
1454 xm[0] = (Float_t)pos.X();
1455 xm[1] = (Float_t)pos.Y();
1456 xm[2] = (Float_t)pos.Z();
1458 pm[0] = (Float_t)mom.X()*normMom;
1459 pm[1] = (Float_t)mom.Y()*normMom;
1460 pm[2] = (Float_t)mom.Z()*normMom;
1462 gMC->Gmtod(xm,xpad,1); // from MRS to DRS: coordinates convertion
1463 gMC->Gmtod(pm,ppad,2); // from MRS to DRS: direction cosinus convertion
1466 if (TMath::Abs(ppad[1])>1) {
1467 AliWarning("Abs(ppad) > 1");
1468 ppad[1]=TMath::Sign((Float_t)1,ppad[1]);
1470 incidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
1473 if (strip < fTOFGeometry->NStripC()) {
1477 else if (strip >= fTOFGeometry->NStripC() &&
1478 strip < fTOFGeometry->NStripC() + fTOFGeometry->NStripB()) {
1480 strip = strip - fTOFGeometry->NStripC();
1482 else if (strip >= fTOFGeometry->NStripC() + fTOFGeometry->NStripB() &&
1483 strip < fTOFGeometry->NStripC() + fTOFGeometry->NStripB() + fTOFGeometry->NStripA()) {
1485 strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB();
1487 else if (strip >= fTOFGeometry->NStripC() + fTOFGeometry->NStripB() + fTOFGeometry->NStripA() &&
1488 strip < fTOFGeometry->NStripC() + fTOFGeometry->NStripB() + fTOFGeometry->NStripA() + fTOFGeometry->NStripB()) {
1490 strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB() - fTOFGeometry->NStripA();
1494 strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB() - fTOFGeometry->NStripA() - fTOFGeometry->NStripB();
1497 volpath=gMC->CurrentVolOffName(7);
1498 index=atoi(&volpath[4]);
1515 hits[6] = mom.Rho();
1520 hits[11]= incidenceAngle;
1521 hits[12]= gMC->Edep();
1522 hits[13]= gMC->TrackLength();
1530 AddT0Hit(mcApplication->GetCurrentTrackNumber(),vol, hits);
1531 //AddT0Hit(gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, hits);
1534 //-------------------------------------------------------------------
1535 void AliTOFv6T0::MaterialMixer(Float_t* p,Float_t* a,Float_t* m,Int_t n) const
1537 // a[] atomic weights vector (in)
1538 // (atoms present in more compound appear separately)
1539 // m[] number of corresponding atoms in the compound (in)
1541 for (Int_t i = 0; i < n; ++i) {
1545 for (Int_t i = 0; i < n; ++i) {
1547 //AliDebug(1,Form((\n weight[%i] = %f (,i,p[i]));