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.10 2007/10/07 19:40:46 decaro
19 right handling of l2t matrices and alignable entries in case of TOF staging geometry
21 Revision 1.9 2007/10/07 19:36:29 decaro
22 TOF materials and volumes description: update
24 Revision 1.8 2007/10/04 13:15:37 arcelli
25 updates to comply with AliTOFGeometryV5 becoming AliTOFGeometry
27 Revision 1.7 2007/10/03 18:07:26 arcelli
28 right handling of l2t matrices and alignable entries in case of TOF holes (Annalisa)
30 Revision 1.6 2007/10/03 10:41:16 arcelli
31 adding tracking-to-local matrices for new AliTOFcluster
33 Revision 1.5 2007/07/27 08:14:48 morsch
34 Write all track references into the same branch.
36 Revision 1.4 2007/05/29 16:51:05 decaro
37 Update of the front-end electronics and cooling system description
39 Revision 1.3.2 2007/05/29 decaro
40 FEA+cooling zone description: update
41 FEA+cooling orientation (side A/ side C) -> correction
42 Revision 1.3.1 2007/05/24 decaro
43 Change the FEA+cooling zone description:
44 - FCA1/FCA2, air boxes, contain:
46 FAL1/FAL2/FAL3 volumes, aluminium boxes;
47 - FRO1/FRO2/FRO3/FRO4/FBAR, aluminum boxes;
48 - changed FTUB positions;
50 Revision 1.3 2007/05/04 14:05:42 decaro
51 Ineffective comment cleanup
53 Revision 1.2 2007/05/04 12:59:22 arcelli
54 Change the TOF SM paths for misalignment (one layer up)
56 Revision 1.1 2007/05/02 17:32:58 decaro
57 TOF geometry description as installed (G. Cara Romeo, A. De Caro)
59 Revision 0.1 2007 March G. Cara Romeo and A. De Caro
60 Implemented a more realistic TOF geometry description,
63 - services and front end electronics description,
64 - TOF crate readout modules
65 (added volume FTOS in ALIC_1/BBMO_1/BBCE_%i -for i=1,...,18-,
66 and in ALIC_1/BFMO_%i -for i=19,...,36- volumes)
67 As the 5th version in terms of geometrical positioning of volumes.
71 ///////////////////////////////////////////////////////////////////////////////
73 // This class contains the functions for version 6 of the Time Of Flight //
76 // VERSION WITH 6 MODULES AND TILTED STRIPS //
78 // FULL COVERAGE VERSION + OPTION for PHOS holes //
83 <img src="picts/AliTOFv6T0Class.gif"> //
87 ///////////////////////////////////////////////////////////////////////////////
90 #include "TGeometry.h"
91 #include "TLorentzVector.h"
93 #include "TVirtualMC.h"
94 #include "TGeoManager.h"
95 #include <TGeoMatrix.h>
96 #include <TGeoPhysicalNode.h>
97 #include <TGeoVolume.h>
104 #include "AliTrackReference.h"
106 #include "AliTOFGeometry.h"
107 #include "AliTOFv6T0.h"
109 extern TDirectory *gDirectory;
110 extern TVirtualMC *gMC;
111 extern TGeoManager *gGeoManager;
113 extern AliRun *gAlice;
117 const Float_t AliTOFv6T0::fgkModuleWallThickness = 0.33; // cm
118 const Float_t AliTOFv6T0::fgkInterCentrModBorder1 = 49.5 ; // cm
119 const Float_t AliTOFv6T0::fgkInterCentrModBorder2 = 57.5 ; // cm
120 const Float_t AliTOFv6T0::fgkExterInterModBorder1 = 196.0 ; // cm
121 const Float_t AliTOFv6T0::fgkExterInterModBorder2 = 203.5 ; // cm
122 const Float_t AliTOFv6T0::fgkLengthInCeModBorder = 4.7 ; // cm
123 const Float_t AliTOFv6T0::fgkLengthExInModBorder = 7.0 ; // cm
124 const Float_t AliTOFv6T0::fgkModuleCoverThickness = 2.0 ; // cm
125 const Float_t AliTOFv6T0::fgkFEAwidth1 = 19.0; // cm
126 const Float_t AliTOFv6T0::fgkFEAwidth2 = 38.5; // cm
127 const Float_t AliTOFv6T0::fgkSawThickness = 1.0; // cm
128 const Float_t AliTOFv6T0::fgkCBLw = 13.5; // cm
129 const Float_t AliTOFv6T0::fgkCBLh1 = 2.0; // cm
130 const Float_t AliTOFv6T0::fgkCBLh2 = 12.3; // cm
132 //_____________________________________________________________________________
133 AliTOFv6T0::AliTOFv6T0():
143 // Default constructor
147 //_____________________________________________________________________________
148 AliTOFv6T0::AliTOFv6T0(const char *name, const char *title):
149 AliTOF(name,title,"tzero"),
159 // Standard constructor
162 // Check that FRAME is there otherwise we have no place where to
166 AliModule* frame = (AliModule*)gAlice->GetModule("FRAME");
168 AliFatal("TOF needs FRAME to be present");
171 if (fTOFGeometry) delete fTOFGeometry;
172 fTOFGeometry = new AliTOFGeometry();
174 if(frame->IsVersion()==1) {
175 AliDebug(1,Form("Frame version %d", frame->IsVersion()));
176 AliDebug(1,"Full Coverage for TOF");
179 AliDebug(1,Form("Frame version %d", frame->IsVersion()));
180 AliDebug(1,"TOF with Holes for PHOS");
183 fTOFGeometry->SetHoles(fTOFHoles);
185 //AliTOF::fTOFGeometry = fTOFGeometry;
188 TDirectory* saveDir = gDirectory;
189 gAlice->GetRunLoader()->CdGAFile();
190 fTOFGeometry->Write("TOFgeometry");
195 //_____________________________________________________________________________
196 void AliTOFv6T0::AddAlignableVolumes() const
199 // Create entries for alignable volumes associating the symbolic volume
200 // name with the corresponding volume path. Needs to be syncronized with
201 // eventual changes in the geometry.
207 TString vpL0 = "ALIC_1/B077_1/BSEGMO";
208 TString vpL1 = "_1/BTOF";
210 TString vpL3 = "/FTOA_0";
211 TString vpL4 = "/FLTA_0/FSTR_";
213 TString snSM = "TOF/sm";
214 TString snSTRIP = "/strip";
216 Int_t nSectors=fTOFGeometry->NSectors();
217 Int_t nStrips =fTOFGeometry->NStripA()+
218 2*fTOFGeometry->NStripB()+
219 2*fTOFGeometry->NStripC();
222 // The TOF MRPC Strips
223 // The symbolic names are: TOF/sm00/strip01
229 for (Int_t isect = 0; isect < nSectors; isect++) {
230 for (Int_t istr = 1; istr <= nStrips; istr++) {
232 //if (fTOFSectors[isect]==-1) continue;
234 if (fTOFHoles && (isect==13 || isect==14 || isect==15)) {
237 vpL4 = "/FLTB_0/FSTR_";
241 vpL4 = "/FLTC_0/FSTR_";
247 vpL4 = "/FLTA_0/FSTR_";
261 symName += Form("%02d",isect);
263 symName += Form("%02d",istr);
265 AliDebug(2,"--------------------------------------------");
266 AliDebug(2,Form("Alignable object %d", imod));
267 AliDebug(2,Form("volPath=%s\n",volPath.Data()));
268 AliDebug(2,Form("symName=%s\n",symName.Data()));
269 AliDebug(2,"--------------------------------------------");
271 gGeoManager->SetAlignableEntry(symName.Data(),volPath.Data());
273 //T2L matrices for alignment
274 TGeoPNEntry *e = gGeoManager->GetAlignableEntry(symName.Data());
276 const char *path = e->GetTitle();
277 if (!gGeoManager->cd(path)) {
278 AliFatal(Form("Volume path %s not valid!",path));
280 TGeoHMatrix *globMatrix = gGeoManager->GetCurrentMatrix();
281 Double_t phi = 20.0 * (isect % 18) + 10.0;
282 TGeoHMatrix *t2l = new TGeoHMatrix();
284 t2l->MultiplyLeft(&(globMatrix->Inverse()));
288 AliError(Form("Alignable entry %s is not valid!",symName.Data()));
297 // The TOF supermodules
298 // The symbolic names are: TOF/sm00
302 for (Int_t isect = 0; isect < nSectors; isect++) {
311 symName += Form("%02d",isect);
313 AliDebug(2,"--------------------------------------------");
314 AliDebug(2,Form("Alignable object %d", isect+imod));
315 AliDebug(2,Form("volPath=%s\n",volPath.Data()));
316 AliDebug(2,Form("symName=%s\n",symName.Data()));
317 AliDebug(2,"--------------------------------------------");
319 gGeoManager->SetAlignableEntry(symName.Data(),volPath.Data());
324 //____________________________________________________________________________
325 void AliTOFv6T0::BuildGeometry()
328 // Build TOF ROOT geometry for the ALICE event display
331 const int kColorTOF = 27;
333 TGeometry *globalGeometry = (TGeometry*)gAlice->GetGeometry();
336 top = globalGeometry->GetNode("alice");
338 // Position the different copies
339 const Float_t krTof =(fTOFGeometry->Rmax()+fTOFGeometry->Rmin())/2.;
340 const Float_t khTof = fTOFGeometry->Rmax()-fTOFGeometry->Rmin();
341 const Int_t kNTof = fTOFGeometry->NSectors();
342 const Float_t kangle = k2PI/kNTof;
344 //const Float_t fgkInterCentrModBorder1 = 49.5;
345 //const Float_t fgkInterCentrModBorder2 = 57.5;
349 // define offset for nodes
350 Float_t zOffsetB = (fTOFGeometry->ZlenA()*0.5 + (fgkInterCentrModBorder1+fgkInterCentrModBorder2)*0.5)*0.5;
351 Float_t zOffsetA = 0.;
352 // Define TOF basic volume
354 char nodeName0[16], nodeName1[16], nodeName2[16];
355 char nodeName3[16], nodeName4[16], rotMatNum[16];
358 new TBRIK("S_TOF_B","TOF box","void",
359 fTOFGeometry->StripLength()*0.5, khTof*0.5, fTOFGeometry->ZlenB()*0.5);
360 new TBRIK("S_TOF_C","TOF box","void",
361 fTOFGeometry->StripLength()*0.5, khTof*0.5, fTOFGeometry->ZlenB()*0.5);
363 new TBRIK("S_TOF_A","TOF box","void",
364 fTOFGeometry->StripLength()*0.5, khTof*0.5, fTOFGeometry->ZlenA()*0.5);
366 for (Int_t nodeNum=1;nodeNum<kNTof+1;nodeNum++){
369 sprintf(rotMatNum,"rot50%i",nodeNum);
370 sprintf(nodeName0,"FTO00%i",nodeNum);
371 sprintf(nodeName1,"FTO10%i",nodeNum);
372 sprintf(nodeName2,"FTO20%i",nodeNum);
373 sprintf(nodeName3,"FTO30%i",nodeNum);
374 sprintf(nodeName4,"FTO40%i",nodeNum);
377 sprintf(rotMatNum,"rot5%i",nodeNum);
378 sprintf(nodeName0,"FTO0%i",nodeNum);
379 sprintf(nodeName1,"FTO1%i",nodeNum);
380 sprintf(nodeName2,"FTO2%i",nodeNum);
381 sprintf(nodeName3,"FTO3%i",nodeNum);
382 sprintf(nodeName4,"FTO4%i",nodeNum);
385 new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
386 ang = (4.5-nodeNum) * kangle;
390 node = new TNode(nodeName2,nodeName2,"S_TOF_B", krTof*TMath::Cos(ang), krTof*TMath::Sin(ang), zOffsetB,rotMatNum);
391 node->SetLineColor(kColorTOF);
395 node = new TNode(nodeName3,nodeName3,"S_TOF_C", krTof*TMath::Cos(ang), krTof*TMath::Sin(ang),-zOffsetB,rotMatNum);
396 node->SetLineColor(kColorTOF);
401 node = new TNode(nodeName4,nodeName4,"S_TOF_A", krTof*TMath::Cos(ang), krTof*TMath::Sin(ang), zOffsetA,rotMatNum);
402 node->SetLineColor(kColorTOF);
404 } // end loop on nodeNum
408 //_____________________________________________________________________________
409 void AliTOFv6T0::CreateGeometry()
412 // Create geometry for Time Of Flight version 0
416 <img src="picts/AliTOFv6T0.gif">
420 // Creates common geometry
422 AliTOF::CreateGeometry();
426 //_____________________________________________________________________________
427 void AliTOFv6T0::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenA)
430 // Definition of the Time Of Fligh Resistive Plate Chambers
433 // module wall thickness (cm)
434 //const Float_t fgkModuleWallThickness = 0.33;
436 AliDebug(1, "************************* TOF geometry **************************");
437 AliDebug(1,Form(" xtof %d", xtof));
438 AliDebug(1,Form(" ytof %d", ytof));
439 AliDebug(1,Form(" zlenA %d", zlenA));
440 AliDebug(2,Form(" zlenA*0.5 = %d", zlenA*0.5));
442 Float_t xFLT, yFLT, zFLTA;
443 xFLT = xtof - 2.*fgkModuleWallThickness;
444 yFLT = ytof*0.5 - fgkModuleWallThickness;
445 zFLTA = zlenA - 2.*fgkModuleWallThickness;
447 CreateModules(xtof, ytof, zlenA, xFLT, yFLT, zFLTA);
448 MakeStripsInModules(ytof, zlenA);
450 CreateModuleCovers(xtof, zlenA);
452 CreateBackZone(xtof, ytof, zlenA);
453 MakeFrontEndElectronics();
454 MakeFEACooling(xtof, ytof, zlenA);
455 MakeNinoMask(xtof, ytof, zlenA);
456 MakeSuperModuleCooling(xtof, ytof, zlenA);
457 MakeSuperModuleServices(xtof, ytof, zlenA);
459 MakeModulesInBTOFvolumes(ytof, zlenA);
460 MakeCoversInBTOFvolumes();
461 MakeBackInBTOFvolumes(ytof);
463 MakeReadoutCrates(ytof);
467 //_____________________________________________________________________________
468 void AliTOFv6T0::CreateModules(Float_t xtof, Float_t ytof, Float_t zlenA,
469 Float_t xFLT, Float_t yFLT, Float_t zFLTA) const
472 // Create supermodule volume
473 // and wall volumes to separate 5 modules
476 const Float_t kPi = TMath::Pi();
478 //const Float_t fgkInterCentrModBorder1 = 49.5;
479 //const Float_t fgkInterCentrModBorder2 = 57.5;
480 //const Float_t fgkExterInterModBorder1 = 196.0;
481 //const Float_t fgkExterInterModBorder2 = 203.5;
483 //const Float_t fgkLengthExInModBorder = 4.7;
484 //const Float_t fgkLengthInCeModBorder = 7.0;
486 // module wall thickness (cm)
487 //const Float_t fgkModuleWallThickness = 0.33;
489 // Definition of the of fibre glass modules (FTOA, FTOB and FTOC)
491 Int_t *idtmed = fIdtmed->GetArray()-499;
497 par[1] = ytof * 0.25;
498 par[2] = zlenA * 0.5;
499 gMC->Gsvolu("FTOA", "BOX ", idtmed[503], par, 3); // Fibre glass
503 par[1] = ytof * 0.25;
504 par[2] = (zlenA*0.5 - fgkInterCentrModBorder1)*0.5;
505 gMC->Gsvolu("FTOB", "BOX ", idtmed[503], par, 3); // Fibre glass
506 gMC->Gsvolu("FTOC", "BOX ", idtmed[503], par, 3); // Fibre glass
510 // Definition and positioning
511 // of the not sensitive volumes with Insensitive Freon (FLTA, FLTB and FLTC)
516 gMC->Gsvolu("FLTA", "BOX ", idtmed[506], par, 3); // Freon mix
518 Float_t xcoor, ycoor, zcoor;
520 ycoor = fgkModuleWallThickness*0.5;
522 gMC->Gspos ("FLTA", 0, "FTOA", xcoor, ycoor, zcoor, 0, "ONLY");
525 par[2] = (zlenA*0.5 - 2.*fgkModuleWallThickness - fgkInterCentrModBorder1)*0.5;
526 gMC->Gsvolu("FLTB", "BOX ", idtmed[506], par, 3); // Freon mix
527 gMC->Gsvolu("FLTC", "BOX ", idtmed[506], par, 3); // Freon mix
530 //ycoor = fgkModuleWallThickness*0.5;
531 zcoor = fgkModuleWallThickness;
532 gMC->Gspos ("FLTB", 0, "FTOB", xcoor, ycoor, zcoor, 0, "ONLY");
533 gMC->Gspos ("FLTC", 0, "FTOC", xcoor, ycoor,-zcoor, 0, "ONLY");
536 // Definition and positioning
537 // of the fibre glass walls between central and intermediate modules (FWZ1 and FWZ2)
539 Float_t alpha, tgal, beta, tgbe, trpa[11];
540 tgal = (yFLT - 2.*fgkLengthInCeModBorder)/(fgkInterCentrModBorder2 - fgkInterCentrModBorder1);
541 alpha = TMath::ATan(tgal);
542 beta = (kPi*0.5 - alpha)*0.5;
543 tgbe = TMath::Tan(beta);
547 trpa[3] = 2.*fgkModuleWallThickness;
548 trpa[4] = (fgkLengthInCeModBorder - 2.*fgkModuleWallThickness*tgbe)*0.5;
549 trpa[5] = (fgkLengthInCeModBorder + 2.*fgkModuleWallThickness*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] = 2.*fgkModuleWallThickness;
552 trpa[8] = (fgkLengthInCeModBorder - 2.*fgkModuleWallThickness*tgbe)*0.5;
553 trpa[9] = (fgkLengthInCeModBorder + 2.*fgkModuleWallThickness*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("FWZ1","TRAP", idtmed[503], trpa, 11); // Fibre glass
557 AliMatrix (idrotm[0],90., 90.,180.,0.,90.,180.);
558 AliMatrix (idrotm[1],90., 90., 0.,0.,90., 0.);
561 ycoor = -(yFLT - fgkLengthInCeModBorder)*0.5;
562 zcoor = fgkInterCentrModBorder1;
563 gMC->Gspos("FWZ1", 1,"FLTA", xcoor, ycoor, zcoor,idrotm[0],"ONLY");
564 gMC->Gspos("FWZ1", 2,"FLTA", xcoor, ycoor,-zcoor,idrotm[1],"ONLY");
566 Float_t y0B, ycoorB, zcoorB;
569 y0B = fgkLengthInCeModBorder - fgkModuleWallThickness*tgbe;
573 trpa[3] = fgkModuleWallThickness;
574 trpa[4] = (y0B - fgkModuleWallThickness*tgbe)*0.5;
575 trpa[5] = (y0B + fgkModuleWallThickness*tgbe)*0.5;
576 trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg;
577 trpa[7] = fgkModuleWallThickness;
578 trpa[8] = (y0B - fgkModuleWallThickness*tgbe)*0.5;
579 trpa[9] = (y0B + fgkModuleWallThickness*tgbe)*0.5;
580 trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg;
582 ycoorB = ycoor - fgkModuleWallThickness*0.5*tgbe;
583 zcoorB = (zlenA*0.5 - 2.*fgkModuleWallThickness - fgkInterCentrModBorder1)*0.5 - 2.*fgkModuleWallThickness;
584 gMC->Gsvolu("FWZA","TRAP", idtmed[503], trpa, 11); // Fibre glass
585 gMC->Gspos("FWZA", 1,"FLTB", xcoor, ycoorB, zcoorB,idrotm[1],"ONLY");
586 gMC->Gspos("FWZA", 2,"FLTC", xcoor, ycoorB,-zcoorB,idrotm[0],"ONLY");
589 AliMatrix (idrotm[2],90.,270., 0.,0.,90.,180.);
590 AliMatrix (idrotm[3],90.,270.,180.,0.,90., 0.);
593 ycoor = (yFLT - fgkLengthInCeModBorder)*0.5;
594 zcoor = fgkInterCentrModBorder2;
595 gMC->Gspos("FWZ1", 3,"FLTA", xcoor, ycoor, zcoor,idrotm[2],"ONLY");
596 gMC->Gspos("FWZ1", 4,"FLTA", xcoor, ycoor,-zcoor,idrotm[3],"ONLY");
599 y0B = fgkLengthInCeModBorder + fgkModuleWallThickness*tgbe;
603 trpa[3] = fgkModuleWallThickness;
604 trpa[4] = (y0B - fgkModuleWallThickness*tgbe)*0.5;
605 trpa[5] = (y0B + fgkModuleWallThickness*tgbe)*0.5;
606 trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg;
607 trpa[7] = fgkModuleWallThickness;
608 trpa[8] = (y0B - fgkModuleWallThickness*tgbe)*0.5;
609 trpa[9] = (y0B + fgkModuleWallThickness*tgbe)*0.5;
610 trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg;
611 gMC->Gsvolu("FWZB","TRAP", idtmed[503], trpa, 11); // Fibre glass
613 ycoorB = ycoor - fgkModuleWallThickness*0.5*tgbe;
614 zcoorB = (zlenA*0.5 - 2.*fgkModuleWallThickness - fgkInterCentrModBorder1)*0.5 -
615 (fgkInterCentrModBorder2 - fgkInterCentrModBorder1) - 2.*fgkModuleWallThickness;
616 gMC->Gspos("FWZB", 1,"FLTB", xcoor, ycoorB, zcoorB,idrotm[3],"ONLY");
617 gMC->Gspos("FWZB", 2,"FLTC", xcoor, ycoorB,-zcoorB,idrotm[2],"ONLY");
620 trpa[0] = 0.5*(fgkInterCentrModBorder2 - fgkInterCentrModBorder1)/TMath::Cos(alpha);
621 trpa[1] = 2.*fgkModuleWallThickness;
623 trpa[3] = -beta*kRaddeg;
626 gMC->Gsvolu("FWZ2","PARA", idtmed[503], trpa, 6); // Fibre glass
628 AliMatrix (idrotm[4], alpha*kRaddeg,90.,90.+alpha*kRaddeg,90.,90.,180.);
629 AliMatrix (idrotm[5],180.-alpha*kRaddeg,90.,90.-alpha*kRaddeg,90.,90., 0.);
633 zcoor = (fgkInterCentrModBorder2 + fgkInterCentrModBorder1)*0.5;
634 gMC->Gspos("FWZ2", 1,"FLTA", xcoor, ycoor, zcoor,idrotm[4],"ONLY");
635 gMC->Gspos("FWZ2", 2,"FLTA", xcoor, ycoor,-zcoor,idrotm[5],"ONLY");
638 trpa[0] = 0.5*(fgkInterCentrModBorder2 - fgkInterCentrModBorder1)/TMath::Cos(alpha);
639 trpa[1] = fgkModuleWallThickness;
641 trpa[3] = -beta*kRaddeg;
644 gMC->Gsvolu("FWZC","PARA", idtmed[503], trpa, 6); // Fibre glass
646 ycoorB = ycoor - fgkModuleWallThickness*tgbe;
647 zcoorB = (zlenA*0.5 - 2.*fgkModuleWallThickness - fgkInterCentrModBorder1)*0.5 -
648 (fgkInterCentrModBorder2 - fgkInterCentrModBorder1)*0.5 - 2.*fgkModuleWallThickness;
649 gMC->Gspos("FWZC", 1,"FLTB", xcoor, ycoorB, zcoorB, idrotm[5],"ONLY");
650 gMC->Gspos("FWZC", 2,"FLTC", xcoor, ycoorB,-zcoorB, idrotm[4],"ONLY");
654 // Definition and positioning
655 // of the fibre glass walls between intermediate and lateral modules (FWZ3 and FWZ4)
657 tgal = (yFLT - 2.*fgkLengthExInModBorder)/(fgkExterInterModBorder2 - fgkExterInterModBorder1);
658 alpha = TMath::ATan(tgal);
659 beta = (kPi*0.5 - alpha)*0.5;
660 tgbe = TMath::Tan(beta);
664 trpa[3] = 2.*fgkModuleWallThickness;
665 trpa[4] = (fgkLengthExInModBorder - 2.*fgkModuleWallThickness*tgbe)*0.5;
666 trpa[5] = (fgkLengthExInModBorder + 2.*fgkModuleWallThickness*tgbe)*0.5;
667 trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg;
668 trpa[7] = 2.*fgkModuleWallThickness;
669 trpa[8] = (fgkLengthExInModBorder - 2.*fgkModuleWallThickness*tgbe)*0.5;
670 trpa[9] = (fgkLengthExInModBorder + 2.*fgkModuleWallThickness*tgbe)*0.5;
671 trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; //TMath::ATan((trpa[5] - trpa[4])/(2.*trpa[3]))*kRaddeg;
672 gMC->Gsvolu("FWZ3","TRAP", idtmed[503], trpa, 11); // Fibre glass
675 ycoor = (yFLT - fgkLengthExInModBorder)*0.5;
676 zcoor = fgkExterInterModBorder1;
677 gMC->Gspos("FWZ3", 1,"FLTA", xcoor, ycoor, zcoor,idrotm[3],"ONLY");
678 gMC->Gspos("FWZ3", 2,"FLTA", xcoor, ycoor,-zcoor,idrotm[2],"ONLY");
682 //ycoor = (yFLT - fgkLengthExInModBorder)*0.5;
683 zcoor = -fgkExterInterModBorder1 + (zlenA*0.5 + fgkInterCentrModBorder1 - 2.*fgkModuleWallThickness)*0.5;
684 gMC->Gspos("FWZ3", 5,"FLTB", xcoor, ycoor, zcoor,idrotm[2],"ONLY");
685 gMC->Gspos("FWZ3", 6,"FLTC", xcoor, ycoor,-zcoor,idrotm[3],"ONLY");
689 ycoor = -(yFLT - fgkLengthExInModBorder)*0.5;
690 zcoor = fgkExterInterModBorder2;
691 gMC->Gspos("FWZ3", 3,"FLTA", xcoor, ycoor, zcoor,idrotm[1],"ONLY");
692 gMC->Gspos("FWZ3", 4,"FLTA", xcoor, ycoor,-zcoor,idrotm[0],"ONLY");
696 //ycoor = -(yFLT - fgkLengthExInModBorder)*0.5;
697 zcoor = -fgkExterInterModBorder2 + (zlenA*0.5 + fgkInterCentrModBorder1 - 2.*fgkModuleWallThickness)*0.5;
698 gMC->Gspos("FWZ3", 7,"FLTB", xcoor, ycoor, zcoor,idrotm[0],"ONLY");
699 gMC->Gspos("FWZ3", 8,"FLTC", xcoor, ycoor,-zcoor,idrotm[1],"ONLY");
702 trpa[0] = 0.5*(fgkExterInterModBorder2 - fgkExterInterModBorder1)/TMath::Cos(alpha);
703 trpa[1] = 2.*fgkModuleWallThickness;
705 trpa[3] = -beta*kRaddeg;
708 gMC->Gsvolu("FWZ4","PARA", idtmed[503], trpa, 6); // Fibre glass
710 AliMatrix (idrotm[6],alpha*kRaddeg,90.,90.+alpha*kRaddeg,90.,90.,180.);
711 AliMatrix (idrotm[7],180.-alpha*kRaddeg,90.,90.-alpha*kRaddeg,90.,90.,0.);
715 zcoor = (fgkExterInterModBorder2 + fgkExterInterModBorder1)*0.5;
716 gMC->Gspos("FWZ4", 1,"FLTA", xcoor, ycoor, zcoor,idrotm[7],"ONLY");
717 gMC->Gspos("FWZ4", 2,"FLTA", xcoor, ycoor,-zcoor,idrotm[6],"ONLY");
722 zcoor = -(fgkExterInterModBorder2 + fgkExterInterModBorder1)*0.5 +
723 (zlenA*0.5 + fgkInterCentrModBorder1 - 2.*fgkModuleWallThickness)*0.5;
724 gMC->Gspos("FWZ4", 3,"FLTB", xcoor, ycoor, zcoor,idrotm[6],"ONLY");
725 gMC->Gspos("FWZ4", 4,"FLTC", xcoor, ycoor,-zcoor,idrotm[7],"ONLY");
730 //_____________________________________________________________________________
731 void AliTOFv6T0::CreateModuleCovers(Float_t xtof, Float_t zlenA) const
734 // Create covers for module:
735 // per each module zone, defined according to
736 // fgkInterCentrModBorder2, fgkExterInterModBorder1 and zlenA+2 values,
737 // there is a CORNICE of thickness 2cm in Al
738 // and the contained zones in honeycomb of Al.
739 // There is also an interface layer (1.6mm thichness)
740 // and plastic and Cu corresponding to the flat cables.
743 // module cover between strips and cards (cm)
744 //const Float_t fgkModuleCoverThickness = 2.;
746 //const Float_t fgkInterCentrModBorder2 = 57.5;
747 //const Float_t fgkExterInterModBorder1 = 196.0;
749 Int_t *idtmed = fIdtmed->GetArray()-499;
752 par[0] = xtof*0.5 + 2.;
753 par[1] = fgkModuleCoverThickness*0.5;
754 par[2] = zlenA*0.5 + 2.;
755 gMC->Gsvolu("FPEA", "BOX ", idtmed[500], par, 3); // Air
756 if (fTOFHoles) gMC->Gsvolu("FPEB", "BOX ", idtmed[500], par, 3); // Air
758 const Float_t kAlCoverThickness = 1.5;
759 const Float_t kInterfaceCardThickness = 0.16;
760 const Float_t kAlSkinThickness = 0.1;
762 //par[0] = xtof*0.5 + 2.;
763 par[1] = kAlCoverThickness*0.5;
764 //par[2] = zlenA*0.5 + 2.;
765 gMC->Gsvolu("FALT", "BOX ", idtmed[504], par, 3); // Al
766 if (fTOFHoles) gMC->Gsvolu("FALB", "BOX ", idtmed[504], par, 3); // Al
767 Float_t xcoor, ycoor, zcoor;
771 gMC->Gspos("FALT", 0, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY");
772 if (fTOFHoles) gMC->Gspos("FALB", 0, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY");
775 //par[1] = kAlCoverThickness*0.5;
776 par[2] = fgkInterCentrModBorder2 - 2.;
777 gMC->Gsvolu("FPE1", "BOX ", idtmed[505], par, 3); // Al honeycomb
781 gMC->Gspos("FPE1", 0, "FALT", xcoor, ycoor, zcoor, 0, "ONLY");
785 par[1] = kAlCoverThickness*0.5 - kAlSkinThickness;
786 //par[2] = fgkInterCentrModBorder2 - 2.;
787 gMC->Gsvolu("FPE4", "BOX ", idtmed[515], par, 3); // Al honeycomb for holes
791 gMC->Gspos("FPE4", 0, "FALB", xcoor, ycoor, zcoor, 0, "ONLY");
795 //par[1] = kAlCoverThickness*0.5;
796 par[2] = (fgkExterInterModBorder1 - fgkInterCentrModBorder2)*0.5 - 2.;
797 gMC->Gsvolu("FPE2", "BOX ", idtmed[505], par, 3); // Al honeycomb
800 zcoor = (fgkExterInterModBorder1 + fgkInterCentrModBorder2)*0.5;
801 gMC->Gspos("FPE2", 1, "FALT", xcoor, ycoor, zcoor, 0, "ONLY");
802 gMC->Gspos("FPE2", 2, "FALT", xcoor, ycoor,-zcoor, 0, "ONLY");
807 //zcoor = (fgkExterInterModBorder1 + fgkInterCentrModBorder2)*0.5;
808 gMC->Gspos("FPE2", 1, "FALB", xcoor, ycoor, zcoor, 0, "ONLY");
809 gMC->Gspos("FPE2", 2, "FALB", xcoor, ycoor,-zcoor, 0, "ONLY");
813 //par[1] = kAlCoverThickness*0.5;
814 par[2] = (zlenA*0.5 + 2. - fgkExterInterModBorder1)*0.5 - 2.;
815 gMC->Gsvolu("FPE3", "BOX ", idtmed[505], par, 3); // Al honeycomb
818 zcoor = (zlenA*0.5 + 2. + fgkExterInterModBorder1)*0.5;
819 gMC->Gspos("FPE3", 1, "FALT", xcoor, ycoor, zcoor, 0, "ONLY");
820 gMC->Gspos("FPE3", 2, "FALT", xcoor, ycoor,-zcoor, 0, "ONLY");
825 zcoor = (zlenA*0.5 + 2. + fgkExterInterModBorder1)*0.5;
826 gMC->Gspos("FPE3", 1, "FALB", xcoor, ycoor, zcoor, 0, "ONLY");
827 gMC->Gspos("FPE3", 2, "FALB", xcoor, ycoor,-zcoor, 0, "ONLY");
830 // volumes for Interface cards
832 par[1] = kInterfaceCardThickness*0.5;
833 par[2] = fgkInterCentrModBorder2 - 2.;
834 gMC->Gsvolu("FIF1", "BOX ", idtmed[502], par, 3); // G10
836 ycoor = kAlCoverThickness*0.5 + kInterfaceCardThickness*0.5;
838 gMC->Gspos("FIF1", 0, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY");
841 //par[1] = kInterfaceCardThickness*0.5;
842 par[2] = (fgkExterInterModBorder1 - fgkInterCentrModBorder2)*0.5 - 2.;
843 gMC->Gsvolu("FIF2", "BOX ", idtmed[502], par, 3); // G10
845 //ycoor = kAlCoverThickness*0.5 + kInterfaceCardThickness*0.5;
846 zcoor = (fgkExterInterModBorder1 + fgkInterCentrModBorder2)*0.5;
847 gMC->Gspos("FIF2", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY");
848 gMC->Gspos("FIF2", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY");
850 gMC->Gspos("FIF2", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY");
851 gMC->Gspos("FIF2", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY");
855 //par[1] = kInterfaceCardThickness*0.5;
856 par[2] = (zlenA*0.5 + 2. - fgkExterInterModBorder1)*0.5 - 2.;
857 gMC->Gsvolu("FIF3", "BOX ", idtmed[502], par, 3); // G10
859 //ycoor = kAlCoverThickness*0.5 + kInterfaceCardThickness*0.5;
860 zcoor = (zlenA*0.5 + 2. + fgkExterInterModBorder1)*0.5;
861 gMC->Gspos("FIF3", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY");
862 gMC->Gspos("FIF3", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY");
864 gMC->Gspos("FIF3", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY");
865 gMC->Gspos("FIF3", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY");
868 // volumes for flat cables
870 const Float_t kPlasticFlatCableThickness = 0.24;
872 par[1] = kPlasticFlatCableThickness*0.5;
873 par[2] = fgkInterCentrModBorder2 - 2.;
874 gMC->Gsvolu("FFC1", "BOX ", idtmed[513], par, 3); // Plastic (CH2)
876 ycoor = -kAlCoverThickness*0.5 - kPlasticFlatCableThickness*0.5;
878 gMC->Gspos("FFC1", 0, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY");
881 //par[1] = kPlasticFlatCableThickness*0.5;
882 par[2] = (fgkExterInterModBorder1 - fgkInterCentrModBorder2)*0.5 - 2.;
883 gMC->Gsvolu("FFC2", "BOX ", idtmed[513], par, 3); // Plastic (CH2)
885 //ycoor = -kAlCoverThickness*0.5 - kPlasticFlatCableThickness*0.5;
886 zcoor = (fgkExterInterModBorder1 + fgkInterCentrModBorder2)*0.5;
887 gMC->Gspos("FFC2", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY");
888 gMC->Gspos("FFC2", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY");
890 gMC->Gspos("FFC2", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY");
891 gMC->Gspos("FFC2", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY");
895 //par[1] = kPlasticFlatCableThickness*0.5;
896 par[2] = (zlenA*0.5 + 2. - fgkExterInterModBorder1)*0.5 - 2.;
897 gMC->Gsvolu("FFC3", "BOX ", idtmed[513], par, 3); // Plastic (CH2)
899 //ycoor = -kAlCoverThickness*0.5 - kPlasticFlatCableThickness*0.5;
900 zcoor = (zlenA*0.5 + 2. + fgkExterInterModBorder1)*0.5;
901 gMC->Gspos("FFC3", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY");
902 gMC->Gspos("FFC3", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY");
904 gMC->Gspos("FFC3", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY");
905 gMC->Gspos("FFC3", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY");
909 const Float_t kCopperFlatCableThickness = 0.01;
911 par[1] = kCopperFlatCableThickness*0.5;
912 par[2] = fgkInterCentrModBorder2 - 2.;
913 gMC->Gsvolu("FCC1", "BOX ", idtmed[512], par, 3); // Cu
915 ycoor = -kAlCoverThickness*0.5 - kPlasticFlatCableThickness - kCopperFlatCableThickness*0.5;
917 gMC->Gspos("FCC1", 0, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY");
920 //par[1] = kCopperFlatCableThickness*0.5;
921 par[2] = (fgkExterInterModBorder1 - fgkInterCentrModBorder2)*0.5 - 2.;
922 gMC->Gsvolu("FCC2", "BOX ", idtmed[512], par, 3); // Cu
924 //ycoor = -kAlCoverThickness*0.5 - kPlasticFlatCableThickness - kCopperFlatCableThickness*0.5;
925 zcoor = (fgkExterInterModBorder1 + fgkInterCentrModBorder2)*0.5;
926 gMC->Gspos("FCC2", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY");
927 gMC->Gspos("FCC2", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY");
929 gMC->Gspos("FCC2", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY");
930 gMC->Gspos("FCC2", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY");
934 //par[1] = kCopperFlatCableThickness*0.5;
935 par[2] = (zlenA*0.5 + 2. - fgkExterInterModBorder1)*0.5 - 2.;
936 gMC->Gsvolu("FCC3", "BOX ", idtmed[512], par, 3); // Cu
938 //ycoor = -kAlCoverThickness*0.5 - kPlasticFlatCableThickness - kCopperFlatCableThickness*0.5;
939 zcoor = (zlenA*0.5 + 2. + fgkExterInterModBorder1)*0.5;
940 gMC->Gspos("FCC3", 1, "FPEA", xcoor, ycoor, zcoor, 0, "ONLY");
941 gMC->Gspos("FCC3", 2, "FPEA", xcoor, ycoor,-zcoor, 0, "ONLY");
943 gMC->Gspos("FCC3", 1, "FPEB", xcoor, ycoor, zcoor, 0, "ONLY");
944 gMC->Gspos("FCC3", 2, "FPEB", xcoor, ycoor,-zcoor, 0, "ONLY");
949 //_____________________________________________________________________________
950 void AliTOFv6T0::MakeModulesInBTOFvolumes(Float_t ytof, Float_t zlenA) const
953 // Fill BTOF_%i (for i=0,...17) volumes
954 // with volumes FTOA (MRPC strip container),
955 // In case of TOF holes, two sectors (i.e. 11th and 12th)
956 // are filled with volumes: FTOB and FTOC (MRPC containers),
959 //const Float_t fgkInterCentrModBorder1 = 49.5;
963 //AliMatrix(idrotm[0], 90., 0., 0., 0., 90.,-90.);
964 AliMatrix(idrotm[0], 90., 0., 0., 0., 90.,270.);
966 Float_t xcoor, ycoor, zcoor;
969 // Positioning of fibre glass modules (FTOA, FTOB and FTOC)
971 for(Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++){
972 if(fTOFSectors[isec]==-1)continue;
974 sprintf(name, "BTOF%d",isec);
975 if (fTOFHoles && (isec==13 || isec==14 || isec==15)) {
976 //if (fTOFHoles && (isec==16||isec==17)) { \\Old 6h convention
978 ycoor = (zlenA*0.5 + fgkInterCentrModBorder1)*0.5;
979 zcoor = -ytof * 0.25;
980 gMC->Gspos("FTOB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
981 gMC->Gspos("FTOC", 0, name, xcoor,-ycoor, zcoor, idrotm[0], "ONLY");
986 zcoor = -ytof * 0.25;
987 gMC->Gspos("FTOA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
993 //_____________________________________________________________________________
994 void AliTOFv6T0::MakeCoversInBTOFvolumes() const
997 // Fill BTOF_%i (for i=0,...17) volumes
998 // with volumes FPEA (to separate strips from FEA cards)
999 // In case of TOF holes, two sectors (i.e. 11th and 12th)
1000 // are filled with FPEB volumes
1001 // (to separate MRPC strips from FEA cards)
1004 // module cover between strips and cards (cm)
1005 //const Float_t fgkModuleCoverThickness = 2.;
1009 //AliMatrix(idrotm[0], 90., 0., 0., 0., 90.,-90.);
1010 AliMatrix(idrotm[0], 90., 0., 0., 0., 90.,270.);
1012 Float_t xcoor, ycoor, zcoor;
1015 zcoor = fgkModuleCoverThickness*0.5;
1019 // Positioning of module covers (FPEA, FPEB)
1021 for(Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
1022 if(fTOFSectors[isec]==-1)continue;
1023 sprintf(name, "BTOF%d",isec);
1024 //if (fTOFHoles && (isec==16||isec==17)) \\Old 6h convention
1025 if (fTOFHoles && (isec==13 || isec==14 || isec==15))
1026 gMC->Gspos("FPEB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
1028 gMC->Gspos("FPEA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
1033 //_____________________________________________________________________________
1034 void AliTOFv6T0::MakeBackInBTOFvolumes(Float_t ytof) const
1037 // Fill BTOF_%i (for i=0,...17) volumes
1038 // with volumes FAIA (FEA cards and services container)
1039 // In case of TOF holes, two sectors (i.e. 11th and 12th)
1040 // are filled with volumes FAIB (FEA cards and services container).
1043 // module cover between strips and cards (cm)
1044 //const Float_t fgkModuleCoverThickness = 2.;
1048 //AliMatrix(idrotm[0], 90., 0., 0., 0., 90.,-90.);
1049 AliMatrix(idrotm[0], 90., 0., 0., 0., 90.,270.);
1051 Float_t xcoor, ycoor, zcoor;
1054 zcoor = fgkModuleCoverThickness + (ytof*0.5 - fgkModuleCoverThickness)*0.5;
1058 // Positioning of FEA cards and services containers (FAIA and FAIB)
1060 for(Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
1061 if(fTOFSectors[isec]==-1)continue;
1062 sprintf(name, "BTOF%d",isec);
1063 //if (fTOFHoles && (isec==16||isec==17)) \\Old 6h convention
1064 if (fTOFHoles && (isec==13 || isec==14 || isec==15))
1065 gMC->Gspos("FAIB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
1067 gMC->Gspos("FAIA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
1072 //_____________________________________________________________________________
1073 void AliTOFv6T0::MakeStripsInModules(Float_t ytof, Float_t zlenA) const
1076 // Define MRPC strip volume, called FSTR
1077 // Insert FSTR volume in FLTA/B/C volumes
1080 // module wall thickness (cm)
1081 //const Float_t fgkModuleWallThickness = 0.33;
1083 //const Float_t fgkInterCentrModBorder1 = 49.5;
1085 Float_t yFLT = ytof*0.5 - fgkModuleWallThickness;
1087 Int_t *idtmed = fIdtmed->GetArray()-499;
1089 ///////////////// Detector itself //////////////////////
1091 const Int_t knx = fTOFGeometry->NpadX(); // number of pads along x
1092 const Int_t knz = fTOFGeometry->NpadZ(); // number of pads along z
1093 const Float_t kPadX = fTOFGeometry->XPad(); // pad length along x
1094 const Float_t kPadZ = fTOFGeometry->ZPad(); // pad length along z
1096 // new description for strip volume -double stack strip-
1097 // -- all constants are expressed in cm
1098 // height of different layers
1099 const Float_t khhony = 1.0; // height of HONY Layer
1100 const Float_t khpcby = 0.08; // height of PCB Layer
1101 const Float_t khrgly = 0.055; // height of RED GLASS Layer
1103 const Float_t khfiliy = 0.125; // height of FISHLINE Layer
1104 const Float_t khglassy = 0.160*0.5; // semi-height of GLASS Layer
1105 const Float_t khglfy = khfiliy+2.*khglassy; // height of GLASS Layer
1107 const Float_t khcpcby = 0.16; // height of PCB Central Layer
1108 const Float_t kwhonz = 8.1; // z dimension of HONEY Layer
1109 const Float_t kwpcbz1 = 10.64; // z dimension of PCB Lower Layer
1110 const Float_t kwpcbz2 = 11.6; // z dimension of PCB Upper Layer
1111 const Float_t kwcpcbz = 12.4; // z dimension of PCB Central Layer
1113 const Float_t kwrglz = 8.; // z dimension of RED GLASS Layer
1114 const Float_t kwglfz = 7.; // z dimension of GLASS Layer
1115 const Float_t klsensmx = knx*kPadX; // length of Sensitive Layer
1116 const Float_t khsensmy = 0.0105; // height of Sensitive Layer
1117 const Float_t kwsensmz = knz*kPadZ; // width of Sensitive Layer
1119 // height of the FSTR Volume (the strip volume)
1120 const Float_t khstripy = 2.*khhony+2.*khpcby+4.*khrgly+2.*khglfy+khcpcby;
1122 // width of the FSTR Volume (the strip volume)
1123 const Float_t kwstripz = kwcpcbz;
1124 // length of the FSTR Volume (the strip volume)
1125 const Float_t klstripx = fTOFGeometry->StripLength();
1128 // FSTR volume definition-filling this volume with non sensitive Gas Mixture
1129 Float_t parfp[3]={klstripx*0.5, khstripy*0.5, kwstripz*0.5};
1130 gMC->Gsvolu("FSTR","BOX",idtmed[506],parfp,3); // Freon mix
1132 Float_t posfp[3]={0.,0.,0.};
1134 // NOMEX (HONEYCOMB) Layer definition
1135 //parfp[0] = klstripx*0.5;
1136 parfp[1] = khhony*0.5;
1137 parfp[2] = kwhonz*0.5;
1138 gMC->Gsvolu("FHON","BOX",idtmed[501],parfp,3); // Nomex (Honeycomb)
1139 // positioning 2 NOMEX Layers on FSTR volume
1141 posfp[1] =-khstripy*0.5 + parfp[1];
1143 gMC->Gspos("FHON",1,"FSTR",0., posfp[1],0.,0,"ONLY");
1144 gMC->Gspos("FHON",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
1146 // Lower PCB Layer definition
1147 //parfp[0] = klstripx*0.5;
1148 parfp[1] = khpcby*0.5;
1149 parfp[2] = kwpcbz1*0.5;
1150 gMC->Gsvolu("FPC1","BOX",idtmed[502],parfp,3); // G10
1152 // Upper PCB Layer definition
1153 //parfp[0] = klstripx*0.5;
1154 //parfp[1] = khpcby*0.5;
1155 parfp[2] = kwpcbz2*0.5;
1156 gMC->Gsvolu("FPC2","BOX",idtmed[502],parfp,3); // G10
1158 // positioning 2 external PCB Layers in FSTR volume
1160 posfp[1] =-khstripy*0.5+khhony+parfp[1];
1162 gMC->Gspos("FPC1",1,"FSTR",0.,-posfp[1],0.,0,"ONLY");
1163 gMC->Gspos("FPC2",1,"FSTR",0., posfp[1],0.,0,"ONLY");
1165 // Central PCB layer definition
1166 //parfp[0] = klstripx*0.5;
1167 parfp[1] = khcpcby*0.5;
1168 parfp[2] = kwcpcbz*0.5;
1169 gMC->Gsvolu("FPCB","BOX",idtmed[502],parfp,3); // G10
1170 // positioning the central PCB layer
1171 gMC->Gspos("FPCB",1,"FSTR",0.,0.,0.,0,"ONLY");
1173 // Sensitive volume definition
1174 Float_t parfs[3] = {klsensmx*0.5, khsensmy*0.5, kwsensmz*0.5};
1175 gMC->Gsvolu("FSEN","BOX",idtmed[507],parfs,3); // Cu sensitive
1176 // dividing FSEN along z in knz=2 and along x in knx=48
1177 gMC->Gsdvn("FSEZ","FSEN",knz,3);
1178 gMC->Gsdvn("FPAD","FSEZ",knx,1);
1179 // positioning sensitive layer inside FPCB
1180 gMC->Gspos("FSEN",1,"FPCB",0.,0.,0.,0,"ONLY");
1182 // RED GLASS Layer definition
1183 //parfp[0] = klstripx*0.5;
1184 parfp[1] = khrgly*0.5;
1185 parfp[2] = kwrglz*0.5;
1186 gMC->Gsvolu("FRGL","BOX",idtmed[508],parfp,3); // red glass
1187 // positioning 4 RED GLASS Layers in FSTR volume
1189 posfp[1] = -khstripy*0.5+khhony+khpcby+parfp[1];
1191 gMC->Gspos("FRGL",1,"FSTR",0., posfp[1],0.,0,"ONLY");
1192 gMC->Gspos("FRGL",4,"FSTR",0.,-posfp[1],0.,0,"ONLY");
1194 posfp[1] = (khcpcby+khrgly)*0.5;
1196 gMC->Gspos("FRGL",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
1197 gMC->Gspos("FRGL",3,"FSTR",0., posfp[1],0.,0,"ONLY");
1199 // GLASS Layer definition
1200 //parfp[0] = klstripx*0.5;
1201 parfp[1] = khglassy;
1202 parfp[2] = kwglfz*0.5;
1203 gMC->Gsvolu("FGLF","BOX",idtmed[508],parfp,3); // glass
1204 // positioning 2 GLASS Layers in FSTR volume
1206 posfp[1] = (khcpcby + khglfy)*0.5 + khrgly;
1208 gMC->Gspos("FGLF",1,"FSTR",0.,-posfp[1],0.,0,"ONLY");
1209 gMC->Gspos("FGLF",2,"FSTR",0., posfp[1],0.,0,"ONLY");
1211 // Positioning the Strips (FSTR volumes) in the FLT volumes
1212 Int_t maxStripNumbers [5] ={fTOFGeometry->NStripC(),
1213 fTOFGeometry->NStripB(),
1214 fTOFGeometry->NStripA(),
1215 fTOFGeometry->NStripB(),
1216 fTOFGeometry->NStripC()};
1220 Int_t totalStrip = 0;
1221 Float_t xpos, zpos, ypos, ang;
1222 for(Int_t iplate = 0; iplate < fTOFGeometry->NPlates(); iplate++){
1223 if (iplate>0) totalStrip += maxStripNumbers[iplate-1];
1224 for(Int_t istrip = 0; istrip < maxStripNumbers[iplate]; istrip++){
1226 ang = fTOFGeometry->GetAngles(iplate,istrip);
1227 AliDebug(1, Form(" iplate = %1i, istrip = %2i ---> ang = %f", iplate, istrip, ang));
1229 if (ang>0.) AliMatrix (idrotm[istrip+totalStrip],90.,0.,90.+ang,90., ang, 90.);
1230 else if (ang==0.) AliMatrix (idrotm[istrip+totalStrip],90.,0.,90.,90., 0., 0.);
1231 else if (ang<0.) AliMatrix (idrotm[istrip+totalStrip],90.,0.,90.+ang,90.,-ang,270.);
1234 ypos = fTOFGeometry->GetHeights(iplate,istrip) + yFLT*0.5;
1235 zpos = fTOFGeometry->GetDistances(iplate,istrip);
1236 gMC->Gspos("FSTR",istrip+totalStrip+1,"FLTA", xpos, ypos,-zpos,idrotm[istrip+totalStrip], "ONLY");
1239 if (istrip+totalStrip+1>53)
1240 gMC->Gspos("FSTR",istrip+totalStrip+1,"FLTC", xpos, ypos,-zpos-(zlenA*0.5 - 2.*fgkModuleWallThickness + fgkInterCentrModBorder1)*0.5,idrotm[istrip+totalStrip],"ONLY");
1241 if (istrip+totalStrip+1<39)
1242 gMC->Gspos("FSTR",istrip+totalStrip+1,"FLTB", xpos, ypos,-zpos+(zlenA*0.5 - 2.*fgkModuleWallThickness + fgkInterCentrModBorder1)*0.5,idrotm[istrip+totalStrip],"ONLY");
1249 //_____________________________________________________________________________
1250 void AliTOFv6T0::CreateBackZone(Float_t xtof, Float_t ytof, Float_t zlenA) const
1254 // - containers for FEA cards, cooling system
1255 // signal cables and supermodule support structure
1256 // (volumes called FAIA/B),
1257 // - containers for FEA cards and some cooling
1258 // elements for a FEA (volumes called FCA1/2).
1261 // module cover between strips and cards (cm)
1262 //const Float_t fgkModuleCoverThickness = 2.;
1264 //const Float_t fgkFEAwidth1 = 19.;
1265 //const Float_t fgkFEAwidth2 = 38.5;
1267 Int_t *idtmed = fIdtmed->GetArray()-499;
1271 // Definition of the air card containers (FAIA and FAIB)
1275 par[1] = (ytof*0.5 - fgkModuleCoverThickness)*0.5;
1277 gMC->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air
1278 if (fTOFHoles) gMC->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air
1280 // FEA card mother-volume definition
1281 Float_t carpar[3] = {fgkFEAwidth1*0.5, 5.6, 0.45};
1282 gMC->Gsvolu("FCA1", "BOX ", idtmed[500], carpar, 3); // Air
1283 carpar[0] = fgkFEAwidth2*0.5;
1286 gMC->Gsvolu("FCA2", "BOX ", idtmed[500], carpar, 3); // Air
1289 AliMatrix(idrotm[0], 90.,180., 90., 90.,180., 0.);
1291 // FEA card mother-volume positioning
1292 Float_t rowstep = 6.66;
1293 Float_t rowgap[5] = {13.5, 22.9, 16.94, 23.8, 20.4};
1294 Int_t rowb[5] = {6, 7, 6, 19, 7};
1295 Float_t carpos[3] = {25. - xtof*0.5,
1296 (11.5 - (ytof*0.5 - fgkModuleCoverThickness))*0.5,
1300 for (Int_t sg= -1; sg< 2; sg+= 2) {
1301 carpos[2] = sg*zlenA*0.5;
1302 for (Int_t nb=0; nb<5; ++nb) {
1303 carpos[2] = carpos[2] - sg*(rowgap[nb] - rowstep);
1304 nrow = row + rowb[nb];
1305 for ( ; row < nrow ; ++row) {
1307 carpos[2] -= sg*rowstep;
1310 gMC->Gspos("FCA1",2*row, "FAIA", carpos[0],carpos[1],carpos[2], 0,"ONLY");
1311 gMC->Gspos("FCA1",2*row-1,"FAIA",-carpos[0],carpos[1],carpos[2], 0,"ONLY");
1312 gMC->Gspos("FCA2", row, "FAIA", 0.,carpos[1],carpos[2], 0,"ONLY");
1318 gMC->Gspos("FCA1",2*row, "FAIA", carpos[0],carpos[1],carpos[2], 0,"ONLY");
1319 gMC->Gspos("FCA1",2*row-1,"FAIA",-carpos[0],carpos[1],carpos[2], 0,"ONLY");
1320 gMC->Gspos("FCA2", row, "FAIA", 0.,carpos[1],carpos[2], 0,"ONLY");
1323 gMC->Gspos("FCA1",2*row, "FAIA", carpos[0],carpos[1],carpos[2], idrotm[0],"ONLY");
1324 gMC->Gspos("FCA1",2*row-1,"FAIA",-carpos[0],carpos[1],carpos[2], idrotm[0],"ONLY");
1325 gMC->Gspos("FCA2", row, "FAIA", 0.,carpos[1],carpos[2], idrotm[0],"ONLY");
1334 gMC->Gspos("FCA1", 182, "FAIA", carpos[0],carpos[1],0., 0,"ONLY");
1335 gMC->Gspos("FCA1", 181, "FAIA",-carpos[0],carpos[1],0., 0,"ONLY");
1336 gMC->Gspos("FCA2", 91, "FAIA", 0., carpos[1], 0., 0, "ONLY");
1340 for (Int_t sg= -1; sg< 2; sg+= 2) {
1341 carpos[2] = sg*zlenA*0.5;
1342 for (Int_t nb=0; nb<4; ++nb) {
1343 carpos[2] = carpos[2] - sg*(rowgap[nb] - rowstep);
1344 nrow = row + rowb[nb];
1345 for ( ; row < nrow ; ++row) {
1346 carpos[2] -= sg*rowstep;
1350 gMC->Gspos("FCA1",2*row, "FAIB", carpos[0],carpos[1],carpos[2], 0,"ONLY");
1351 gMC->Gspos("FCA1",2*row-1,"FAIB",-carpos[0],carpos[1],carpos[2], 0,"ONLY");
1352 gMC->Gspos("FCA2", row, "FAIB", 0.,carpos[1],carpos[2], 0,"ONLY");
1355 gMC->Gspos("FCA1",2*row, "FAIB", carpos[0],carpos[1],carpos[2], idrotm[0],"ONLY");
1356 gMC->Gspos("FCA1",2*row-1,"FAIB",-carpos[0],carpos[1],carpos[2], idrotm[0],"ONLY");
1357 gMC->Gspos("FCA2", row, "FAIB", 0.,carpos[1],carpos[2], idrotm[0],"ONLY");
1367 //_____________________________________________________________________________
1368 void AliTOFv6T0::MakeFrontEndElectronics() const
1371 // Fill FCA1/2 volumes with FEA cards (FFEA volumes).
1374 Int_t *idtmed = fIdtmed->GetArray()-499;
1376 //const Float_t fgkFEAwidth1 = 19.;
1378 // FEA card volume definition
1379 Float_t feaParam1[3] = {fgkFEAwidth1*0.5, 5.6, 0.1};
1380 gMC->Gsvolu("FFEA", "BOX ", idtmed[502], feaParam1, 3); // G10
1382 // FEA card volume positioning
1383 Float_t carpar[3] = {fgkFEAwidth1*0.5, 5.6, 0.45};
1384 gMC->Gspos("FFEA", 1, "FCA1", 0., 0., -carpar[2]+feaParam1[2], 0, "ONLY");
1385 gMC->Gspos("FFEA", 2, "FCA2", -(feaParam1[0]+0.25), 0., -carpar[2]+feaParam1[2], 0, "ONLY");
1386 gMC->Gspos("FFEA", 3, "FCA2", (feaParam1[0]+0.25), 0., -carpar[2]+feaParam1[2], 0, "ONLY");
1390 //_____________________________________________________________________________
1391 void AliTOFv6T0::MakeFEACooling(Float_t xtof, Float_t ytof, Float_t zlenA) const
1394 // Make cooling system attached to each FEA card
1395 // (FAL1, FRO1 and FBAR/1/2 volumes)
1396 // in FAIA/B and FCA1/2 volume containers.
1399 // honeycomb layer between strips and cards (cm)
1400 //const Float_t fgkModuleCoverThickness = 2.;
1402 Int_t *idtmed = fIdtmed->GetArray()-499;
1404 //const Float_t fgkFEAwidth1 = 19.;
1406 Float_t feaParam1[3] = {fgkFEAwidth1*0.5, 5.6, 0.1};
1408 // first FEA cooling element definition
1409 Float_t al1[3] = {fgkFEAwidth1*0.5, 0.4, 0.2};
1410 gMC->Gsvolu("FAL1", "BOX ", idtmed[504], al1, 3); // Al
1411 // first FEA cooling element positioning
1412 Float_t carpar[3] = {fgkFEAwidth1*0.5, 5.6, 0.45};
1413 gMC->Gspos("FAL1", 1, "FCA1", 0., carpar[1]-al1[1], -carpar[2]+2.*feaParam1[2]+al1[2], 0, "ONLY");
1414 gMC->Gspos("FAL1", 2, "FCA2", -(feaParam1[0]+0.25), carpar[1]-al1[1], -carpar[2]+2.*feaParam1[2]+al1[2], 0, "ONLY");
1415 gMC->Gspos("FAL1", 3, "FCA2", (feaParam1[0]+0.25), carpar[1]-al1[1], -carpar[2]+2.*feaParam1[2]+al1[2], 0, "ONLY");
1417 // second FEA cooling element difinition
1418 //Float_t feaRoof1[3] = {9.5, 0.2, 1.45};
1419 Float_t feaRoof1[3] = {al1[0], al1[2], 1.45};
1420 gMC->Gsvolu("FRO1", "BOX ", idtmed[504], feaRoof1, 3); // Al
1422 // third FEA cooling element difinition
1423 Float_t bar[3] = {8.575, 0.6, 0.25};
1424 gMC->Gsvolu("FBAR", "BOX ", idtmed[504], bar, 3); // Al
1426 // fourth FEA cooling element difinition
1427 //Float_t bar1[3] = {8.575, 0.6, 0.1};
1428 Float_t bar1[3] = {bar[0], bar[1], 0.1};
1429 gMC->Gsvolu("FBA1", "BOX ", idtmed[504], bar1, 3); // Al
1431 // fifth FEA cooling element difinition
1432 //Float_t bar2[3] = {8.575, 0.1, 0.4};
1433 Float_t bar2[3] = {bar[0], 0.1, bar[1]-2.*bar[2]};
1434 gMC->Gsvolu("FBA2", "BOX ", idtmed[504], bar2, 3); // Al
1436 //const Float_t fgkCBLw = 13.5; // width of lateral cables and tubes block
1438 Float_t tubepar[3] = {0., 0.4, xtof*0.5 - fgkCBLw};
1440 // FEA cooling components positioning
1441 Float_t rowstep = 6.66;
1442 Float_t rowgap[5] = {13.5, 22.9, 16.94, 23.8, 20.4};
1443 Int_t rowb[5] = {6, 7, 6, 19, 7};
1444 Float_t carpos[3] = {25. - xtof*0.5,
1445 (11.5 - (ytof*0.5 - fgkModuleCoverThickness))*0.5,
1449 for (Int_t sg= -1; sg< 2; sg+= 2) {
1450 carpos[2] = sg*zlenA*0.5;
1451 for (Int_t nb=0; nb<5; ++nb) {
1452 carpos[2] = carpos[2] - sg*(rowgap[nb] - rowstep);
1453 nrow = row + rowb[nb];
1454 for ( ; row < nrow ; ++row) {
1456 carpos[2] -= sg*rowstep;
1460 gMC->Gspos("FBAR",4*row, "FAIA", carpos[0],carpos[1]+carpar[1]-bar[1],carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1461 gMC->Gspos("FBAR",4*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1462 gMC->Gspos("FBAR",4*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1463 gMC->Gspos("FBAR",4*row-3,"FAIA",-carpos[0],carpos[1]+carpar[1]-bar[1],carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1465 gMC->Gspos("FBA1",4*row, "FAIA", carpos[0],carpos[1]+carpar[1]-bar[1],carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1466 gMC->Gspos("FBA1",4*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1467 gMC->Gspos("FBA1",4*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1468 gMC->Gspos("FBA1",4*row-3,"FAIA",-carpos[0],carpos[1]+carpar[1]-bar[1],carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1470 gMC->Gspos("FBA2",8*row, "FAIA", carpos[0],carpos[1]+carpar[1]-bar2[1], carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1471 gMC->Gspos("FBA2",8*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]-bar2[1], carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1472 gMC->Gspos("FBA2",8*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-bar2[1], carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1473 gMC->Gspos("FBA2",8*row-3,"FAIA",-carpos[0],carpos[1]+carpar[1]-bar2[1], carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1475 gMC->Gspos("FBA2",8*row-4,"FAIA", carpos[0],carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1476 gMC->Gspos("FBA2",8*row-5,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1477 gMC->Gspos("FBA2",8*row-6,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1478 gMC->Gspos("FBA2",8*row-7,"FAIA",-carpos[0],carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1481 gMC->Gspos("FRO1",4*row, "FAIA", carpos[0],carpos[1]+carpar[1]+feaRoof1[1],carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1482 gMC->Gspos("FRO1",4*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof1[1],carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1483 gMC->Gspos("FRO1",4*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof1[1],carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1484 gMC->Gspos("FRO1",4*row-3,"FAIA",-carpos[0],carpos[1]+carpar[1]+feaRoof1[1],carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1489 gMC->Gspos("FBAR",4*row, "FAIA", carpos[0],carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1490 gMC->Gspos("FBAR",4*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1491 gMC->Gspos("FBAR",4*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1492 gMC->Gspos("FBAR",4*row-3,"FAIA",-carpos[0],carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1494 gMC->Gspos("FBA1",4*row, "FAIA", carpos[0],carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1495 gMC->Gspos("FBA1",4*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1496 gMC->Gspos("FBA1",4*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1497 gMC->Gspos("FBA1",4*row-3,"FAIA",-carpos[0],carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1499 gMC->Gspos("FBA2",8*row, "FAIA", carpos[0],carpos[1]+carpar[1]-bar2[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1500 gMC->Gspos("FBA2",8*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]-bar2[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1501 gMC->Gspos("FBA2",8*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-bar2[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1502 gMC->Gspos("FBA2",8*row-3,"FAIA",-carpos[0],carpos[1]+carpar[1]-bar2[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1504 gMC->Gspos("FBA2",8*row-4,"FAIA", carpos[0],carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1505 gMC->Gspos("FBA2",8*row-5,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1506 gMC->Gspos("FBA2",8*row-6,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1507 gMC->Gspos("FBA2",8*row-7,"FAIA",-carpos[0],carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1509 gMC->Gspos("FRO1",4*row, "FAIA", carpos[0],carpos[1]+carpar[1]+feaRoof1[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1510 gMC->Gspos("FRO1",4*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof1[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1511 gMC->Gspos("FRO1",4*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof1[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1512 gMC->Gspos("FRO1",4*row-3,"FAIA",-carpos[0],carpos[1]+carpar[1]+feaRoof1[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1519 gMC->Gspos("FBAR",364, "FAIA", carpos[0],carpos[1]+carpar[1]-bar[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1520 gMC->Gspos("FBAR",363, "FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1521 gMC->Gspos("FBAR",362, "FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1522 gMC->Gspos("FBAR",361, "FAIA",-carpos[0],carpos[1]+carpar[1]-bar[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1524 gMC->Gspos("FBA1",364, "FAIA", carpos[0],carpos[1]+carpar[1]-bar[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1525 gMC->Gspos("FBA1",363, "FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1526 gMC->Gspos("FBA1",362, "FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1527 gMC->Gspos("FBA1",361, "FAIA",-carpos[0],carpos[1]+carpar[1]-bar[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1529 gMC->Gspos("FBA2",728, "FAIA", carpos[0],carpos[1]+carpar[1]-bar2[1], -(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1530 gMC->Gspos("FBA2",727, "FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]-bar2[1], -(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1531 gMC->Gspos("FBA2",726, "FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-bar2[1], -(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1532 gMC->Gspos("FBA2",725, "FAIA",-carpos[0],carpos[1]+carpar[1]-bar2[1], -(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1534 gMC->Gspos("FBA2",724,"FAIA", carpos[0],carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], -(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1535 gMC->Gspos("FBA2",723,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], -(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1536 gMC->Gspos("FBA2",722,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], -(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1537 gMC->Gspos("FBA2",721,"FAIA",-carpos[0],carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], -(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1539 gMC->Gspos("FRO1",364, "FAIA", carpos[0],carpos[1]+carpar[1]+feaRoof1[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1540 gMC->Gspos("FRO1",363, "FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof1[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1541 gMC->Gspos("FRO1",362, "FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof1[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1542 gMC->Gspos("FRO1",361, "FAIA",-carpos[0],carpos[1]+carpar[1]+feaRoof1[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1547 for (Int_t sg= -1; sg< 2; sg+= 2) {
1548 carpos[2] = sg*zlenA*0.5;
1549 for (Int_t nb=0; nb<4; ++nb) {
1550 carpos[2] = carpos[2] - sg*(rowgap[nb] - rowstep);
1551 nrow = row + rowb[nb];
1552 for ( ; row < nrow ; ++row) {
1553 carpos[2] -= sg*rowstep;
1555 gMC->Gspos("FBAR",4*row, "FAIB", carpos[0],carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1556 gMC->Gspos("FBAR",4*row-1,"FAIB", (feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1557 gMC->Gspos("FBAR",4*row-2,"FAIB",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1558 gMC->Gspos("FBAR",4*row-3,"FAIB",-carpos[0],carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-bar[2]), 0,"ONLY");
1560 gMC->Gspos("FBA1",4*row, "FAIB", carpos[0],carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1561 gMC->Gspos("FBA1",4*row-1,"FAIB", (feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1562 gMC->Gspos("FBA1",4*row-2,"FAIB",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1563 gMC->Gspos("FBA1",4*row-3,"FAIB",-carpos[0],carpos[1]+carpar[1]-bar[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-2.*tubepar[1]-bar1[2]), 0,"ONLY");
1565 gMC->Gspos("FBA2",8*row, "FAIB", carpos[0],carpos[1]+carpar[1]-bar2[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1566 gMC->Gspos("FBA2",8*row-1,"FAIB", (feaParam1[0]+0.25),carpos[1]+carpar[1]-bar2[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1567 gMC->Gspos("FBA2",8*row-2,"FAIB",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-bar2[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1568 gMC->Gspos("FBA2",8*row-3,"FAIB",-carpos[0],carpos[1]+carpar[1]-bar2[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1570 gMC->Gspos("FBA2",8*row-4,"FAIB", carpos[0],carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1571 gMC->Gspos("FBA2",8*row-5,"FAIB", (feaParam1[0]+0.25),carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1572 gMC->Gspos("FBA2",8*row-6,"FAIB",-(feaParam1[0]+0.25),carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1573 gMC->Gspos("FBA2",8*row-7,"FAIB",-carpos[0],carpos[1]+carpar[1]-3.*bar2[1]-2.*tubepar[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), 0, "ONLY");
1575 gMC->Gspos("FRO1",4*row, "FAIB", carpos[0],carpos[1]+carpar[1]+feaRoof1[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1576 gMC->Gspos("FRO1",4*row-1,"FAIB", (feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof1[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1577 gMC->Gspos("FRO1",4*row-2,"FAIB",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof1[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1578 gMC->Gspos("FRO1",4*row-3,"FAIB",-carpos[0],carpos[1]+carpar[1]+feaRoof1[1],carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+feaRoof1[2]), 0,"ONLY");
1587 //_____________________________________________________________________________
1588 void AliTOFv6T0::MakeNinoMask(Float_t xtof, Float_t ytof, Float_t zlenA) const
1591 // Make cooling Nino mask
1592 // for each FEA card (FAL2/3 and FRO2/3/4 volumes)
1593 // in FAIA/B and FCA1/2 volume containers.
1596 // honeycomb layer between strips and cards (cm)
1597 //const Float_t fgkModuleCoverThickness = 2.;
1599 Int_t *idtmed = fIdtmed->GetArray()-499;
1601 //const Float_t fgkFEAwidth1 = 19.;
1603 // first Nino ASIC mask volume definition
1604 Float_t al2[3] = {7.25, 0.75, 0.25};
1605 gMC->Gsvolu("FAL2", "BOX ", idtmed[504], al2, 3); // Al
1607 // second Nino ASIC mask volume definition
1608 Float_t al3[3] = {3., 3.75, 0.1};
1609 gMC->Gsvolu("FAL3", "BOX ", idtmed[504], al3, 3); // Al
1611 // first Nino ASIC mask volume positioning
1612 Float_t feaParam1[3] = {fgkFEAwidth1*0.5, 5.6, 0.1};
1613 Float_t carpar[3] = {fgkFEAwidth1*0.5, 5.6, 0.45};
1614 gMC->Gspos("FAL2", 1, "FCA1", 0., carpar[1]-2.*al3[1]+0.25, carpar[2]-2.*al3[2]-al2[2], 0, "ONLY");
1615 gMC->Gspos("FAL2", 2, "FCA2", -(feaParam1[0]+0.25), carpar[1]-2.*al3[1]+0.25, carpar[2]-2.*al3[2]-al2[2], 0, "ONLY");
1616 gMC->Gspos("FAL2", 3, "FCA2", (feaParam1[0]+0.25), carpar[1]-2.*al3[1]+0.25, carpar[2]-2.*al3[2]-al2[2], 0, "ONLY");
1618 // second Nino ASIC mask volume positioning
1619 gMC->Gspos("FAL3", 1, "FCA1", 0., carpar[1]-al3[1], carpar[2]-al3[2], 0, "ONLY");
1620 gMC->Gspos("FAL3", 2, "FCA2", -(feaParam1[0]+0.25), carpar[1]-al3[1], carpar[2]-al3[2], 0, "ONLY");
1621 gMC->Gspos("FAL3", 3, "FCA2", (feaParam1[0]+0.25), carpar[1]-al3[1], carpar[2]-al3[2], 0, "ONLY");
1623 //Float_t feaRoof1[3] = {9.5, 0.2, 1.45};
1624 Float_t feaRoof1[3] = {fgkFEAwidth1*0.5, 0.2, 1.45};
1626 // third Nino ASIC mask volume definition
1627 //Float_t feaRoof2[3] = {3.35, 0.05, 1.05};
1628 Float_t feaRoof2[3] = {al3[0], 0.05, 1.05};
1629 gMC->Gsvolu("FRO2", "BOX ", idtmed[504], feaRoof2, 3); // Al
1631 // fourth Nino ASIC mask volume definition
1632 //Float_t feaRoof3[3] = {3.35, feaRoof1[1]+feaRoof2[1], 0.1};
1633 Float_t feaRoof3[3] = {al3[0], feaRoof1[1]+feaRoof2[1], 0.1};
1634 gMC->Gsvolu("FRO3", "BOX ", idtmed[504], feaRoof3, 3); // Al
1636 // fifth Nino ASIC mask volume definition
1637 Float_t feaRoof4[3] = {al3[0], 0.05, carpar[2]-feaParam1[2]-feaRoof1[1]-al3[2]};
1638 gMC->Gsvolu("FRO4", "BOX ", idtmed[504], feaRoof4, 3); // Al
1640 // other Nino ASIC mask volumes positioning
1641 Float_t rowstep = 6.66;
1642 Float_t rowgap[5] = {13.5, 22.9, 16.94, 23.8, 20.4};
1643 Int_t rowb[5] = {6, 7, 6, 19, 7};
1644 Float_t carpos[3] = {25. - xtof*0.5,
1645 (11.5 - (ytof*0.5 - fgkModuleCoverThickness))*0.5,
1649 for (Int_t sg= -1; sg< 2; sg+= 2) {
1650 carpos[2] = sg*zlenA*0.5;
1651 for (Int_t nb=0; nb<5; ++nb) {
1652 carpos[2] = carpos[2] - sg*(rowgap[nb] - rowstep);
1653 nrow = row + rowb[nb];
1654 for ( ; row < nrow ; ++row) {
1656 carpos[2] -= sg*rowstep;
1660 gMC->Gspos("FRO2",4*row, "FAIA", carpos[0],carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],carpos[2]+(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1661 gMC->Gspos("FRO2",4*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],carpos[2]+(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1662 gMC->Gspos("FRO2",4*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],carpos[2]+(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1663 gMC->Gspos("FRO2",4*row-3,"FAIA",-carpos[0],carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],carpos[2]+(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1665 gMC->Gspos("FRO3",4*row, "FAIA", carpos[0],carpos[1]+carpar[1]+feaRoof3[1],carpos[2]+(carpar[2]-feaRoof3[2]), 0,"ONLY");
1666 gMC->Gspos("FRO3",4*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof3[1],carpos[2]+(carpar[2]-feaRoof3[2]), 0,"ONLY");
1667 gMC->Gspos("FRO3",4*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof3[1],carpos[2]+(carpar[2]-feaRoof3[2]), 0,"ONLY");
1668 gMC->Gspos("FRO3",4*row-3,"FAIA",-carpos[0],carpos[1]+carpar[1]+feaRoof3[1],carpos[2]+(carpar[2]-feaRoof3[2]), 0,"ONLY");
1670 gMC->Gspos("FRO4",4*row, "FAIA", carpos[0], carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],carpos[2]+(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1671 gMC->Gspos("FRO4",4*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],carpos[2]+(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1672 gMC->Gspos("FRO4",4*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],carpos[2]+(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1673 gMC->Gspos("FRO4",4*row-3,"FAIA",-carpos[0], carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],carpos[2]+(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1678 gMC->Gspos("FRO2",4*row, "FAIA", carpos[0],carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],carpos[2]+sg*(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1679 gMC->Gspos("FRO2",4*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],carpos[2]+sg*(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1680 gMC->Gspos("FRO2",4*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],carpos[2]+sg*(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1681 gMC->Gspos("FRO2",4*row-3,"FAIA",-carpos[0],carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],carpos[2]+sg*(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1683 gMC->Gspos("FRO3",4*row, "FAIA", carpos[0],carpos[1]+carpar[1]+feaRoof3[1],carpos[2]+sg*(carpar[2]-feaRoof3[2]), 0,"ONLY");
1684 gMC->Gspos("FRO3",4*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof3[1],carpos[2]+sg*(carpar[2]-feaRoof3[2]), 0,"ONLY");
1685 gMC->Gspos("FRO3",4*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof3[1],carpos[2]+sg*(carpar[2]-feaRoof3[2]), 0,"ONLY");
1686 gMC->Gspos("FRO3",4*row-3,"FAIA",-carpos[0],carpos[1]+carpar[1]+feaRoof3[1],carpos[2]+sg*(carpar[2]-feaRoof3[2]), 0,"ONLY");
1688 gMC->Gspos("FRO4",4*row, "FAIA", carpos[0], carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],carpos[2]+sg*(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1689 gMC->Gspos("FRO4",4*row-1,"FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],carpos[2]+sg*(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1690 gMC->Gspos("FRO4",4*row-2,"FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],carpos[2]+sg*(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1691 gMC->Gspos("FRO4",4*row-3,"FAIA",-carpos[0], carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],carpos[2]+sg*(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1698 gMC->Gspos("FRO2",364, "FAIA", carpos[0],carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1699 gMC->Gspos("FRO2",363, "FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1700 gMC->Gspos("FRO2",362, "FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1701 gMC->Gspos("FRO2",361, "FAIA",-carpos[0],carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1703 gMC->Gspos("FRO3",364, "FAIA", carpos[0],carpos[1]+carpar[1]+feaRoof3[1],(carpar[2]-feaRoof3[2]), 0,"ONLY");
1704 gMC->Gspos("FRO3",363, "FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof3[1],(carpar[2]-feaRoof3[2]), 0,"ONLY");
1705 gMC->Gspos("FRO3",362, "FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof3[1],(carpar[2]-feaRoof3[2]), 0,"ONLY");
1706 gMC->Gspos("FRO3",361, "FAIA",-carpos[0],carpos[1]+carpar[1]+feaRoof3[1],(carpar[2]-feaRoof3[2]), 0,"ONLY");
1708 gMC->Gspos("FRO4",364, "FAIA", carpos[0], carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1709 gMC->Gspos("FRO4",363, "FAIA", (feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1710 gMC->Gspos("FRO4",362, "FAIA",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1711 gMC->Gspos("FRO4",361, "FAIA",-carpos[0], carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1716 for (Int_t sg= -1; sg< 2; sg+= 2) {
1717 carpos[2] = sg*zlenA*0.5;
1718 for (Int_t nb=0; nb<4; ++nb) {
1719 carpos[2] = carpos[2] - sg*(rowgap[nb] - rowstep);
1720 nrow = row + rowb[nb];
1721 for ( ; row < nrow ; ++row) {
1722 carpos[2] -= sg*rowstep;
1724 gMC->Gspos("FRO2",4*row, "FAIB", carpos[0],carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],carpos[2]+sg*(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1725 gMC->Gspos("FRO2",4*row-1,"FAIB", (feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],carpos[2]+sg*(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1726 gMC->Gspos("FRO2",4*row-2,"FAIB",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],carpos[2]+sg*(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1727 gMC->Gspos("FRO2",4*row-3,"FAIB",-carpos[0],carpos[1]+carpar[1]+2.*feaRoof1[1]+feaRoof2[1],carpos[2]+sg*(carpar[2]-2.*feaRoof3[2]-feaRoof2[2]), 0,"ONLY");
1729 gMC->Gspos("FRO3",4*row, "FAIB", carpos[0],carpos[1]+carpar[1]+feaRoof3[1],carpos[2]+sg*(carpar[2]-feaRoof3[2]), 0,"ONLY");
1730 gMC->Gspos("FRO3",4*row-1,"FAIB", (feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof3[1],carpos[2]+sg*(carpar[2]-feaRoof3[2]), 0,"ONLY");
1731 gMC->Gspos("FRO3",4*row-2,"FAIB",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+feaRoof3[1],carpos[2]+sg*(carpar[2]-feaRoof3[2]), 0,"ONLY");
1732 gMC->Gspos("FRO3",4*row-3,"FAIB",-carpos[0],carpos[1]+carpar[1]+feaRoof3[1],carpos[2]+sg*(carpar[2]-feaRoof3[2]), 0,"ONLY");
1734 gMC->Gspos("FRO4",4*row, "FAIB", carpos[0], carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],carpos[2]+sg*(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1735 gMC->Gspos("FRO4",4*row-1,"FAIB", (feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],carpos[2]+sg*(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1736 gMC->Gspos("FRO4",4*row-2,"FAIB",-(feaParam1[0]+0.25),carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],carpos[2]+sg*(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1737 gMC->Gspos("FRO4",4*row-3,"FAIB",-carpos[0], carpos[1]+carpar[1]+2.*feaRoof1[1]-feaRoof4[1],carpos[2]+sg*(carpar[2]-2.*al3[2]-feaRoof4[2]), 0,"ONLY");
1746 //_____________________________________________________________________________
1747 void AliTOFv6T0::MakeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlenA) const
1750 // Make cooling tubes (FTUB volume)
1751 // and cooling bars (FTLN and FLTN volumes)
1752 // in FAIA/B volume containers.
1755 //const Float_t fgkInterCentrModBorder2 = 57.5;
1757 // honeycomb layer between strips and cards (cm)
1758 //const Float_t fgkModuleCoverThickness = 2.;
1760 Int_t *idtmed = fIdtmed->GetArray()-499;
1764 //const Float_t fgkFEAwidth1 = 19.;
1766 //const Float_t fgkCBLw = 13.5; // width of lateral cables and tubes block
1767 //const Float_t fgkSawThickness = 1.;
1769 // cooling tube volume definition
1770 Float_t tubepar[3] = {0., 0.4, xtof*0.5 - fgkCBLw - fgkSawThickness};
1771 gMC->Gsvolu("FTUB", "TUBE", idtmed[512], tubepar, 3); // Cu
1773 // water cooling tube volume definition
1774 Float_t tubeparW[3] = {0., 0.3, tubepar[2]};
1775 gMC->Gsvolu("FITU", "TUBE", idtmed[509], tubeparW, 3); // H2O
1777 // Positioning of the water tube into the steel one
1778 gMC->Gspos("FITU",1,"FTUB",0.,0.,0.,0,"ONLY");
1780 // definition of transverse components of SM cooling system
1781 Float_t lonpar[3] = {tubepar[2], 6.15, 0.7};
1782 gMC->Gsvolu("FTLN", "BOX ", idtmed[504], lonpar, 3); // Al
1785 lonpar[2] = zlenA*0.5;
1786 // definition of longitudinal components of SM cooling system
1787 gMC->Gsvolu("FLON", "BOX ", idtmed[504], lonpar, 3); // Al
1789 lonpar[2] = (zlenA*0.5 - fgkInterCentrModBorder2)*0.5;
1790 gMC->Gsvolu("FLOB", "BOX ", idtmed[504], lonpar, 3); // Al
1794 AliMatrix(idrotm[0], 180., 90., 90., 90., 90., 0.);
1796 // Positioning of cooling tubes and transverse components of SM
1798 Float_t carpar[3] = {fgkFEAwidth1*0.5, 5.6, 0.45};
1799 Float_t feaParam1[3] = {fgkFEAwidth1*0.5, 5.6, 0.1};
1800 Float_t al1[3] = {fgkFEAwidth1*0.5, 0.4, 0.2};
1801 Float_t feaRoof1[3] = {al1[0], al1[2], 1.45};
1802 Float_t bar[3] = {8.575, 0.6, 0.25};
1803 Float_t rowstep = 6.66;
1805 Float_t rowgap[5] = {13.5, 22.9, 16.94, 23.8, 20.4};
1806 Int_t rowb[5] = {6, 7, 6, 19, 7};
1807 Float_t carpos[3] = {25. - xtof*0.5,
1808 (11.5 - (ytof*0.5 - fgkModuleCoverThickness))*0.5,
1812 for (Int_t sg= -1; sg< 2; sg+= 2) {
1813 carpos[2] = sg*zlenA*0.5;
1814 for (Int_t nb=0; nb<5; ++nb) {
1815 carpos[2] = carpos[2] - sg*(rowgap[nb] - rowstep);
1816 nrow = row + rowb[nb];
1817 for ( ; row < nrow ; ++row) {
1819 carpos[2] -= sg*rowstep;
1822 gMC->Gspos("FTUB", row, "FAIA", 0., carpos[1]+carpar[1]-bar[1], carpos[2]-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), idrotm[0], "ONLY");
1824 gMC->Gspos("FTUB", row, "FAIA", 0., carpos[1]+carpar[1]-bar[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), idrotm[0], "ONLY");
1827 gMC->Gspos("FTLN", 5+4*sg, "FAIA", 0., -0.1, 369.9*sg, 0, "ONLY");
1828 gMC->Gspos("FTLN", 5+3*sg, "FAIA", 0., -0.1, 366.9*sg, 0, "ONLY");
1829 gMC->Gspos("FTLN", 5+2*sg, "FAIA", 0., -0.1, 198.8*sg, 0, "ONLY");
1830 gMC->Gspos("FTLN", 5+sg, "FAIA", 0., -0.1, 56.82*sg, 0, "ONLY");
1833 gMC->Gspos("FTUB", 91, "FAIA", 0., carpos[1]+carpar[1]-bar[1],-(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), idrotm[0], "ONLY");
1835 gMC->Gspos("FLON", 2, "FAIA",-24., ytub+1.4, 0., 0, "MANY");
1836 gMC->Gspos("FLON", 1, "FAIA", 24., ytub+1.4, 0., 0, "MANY");
1841 for (Int_t sg= -1; sg< 2; sg+= 2) {
1842 carpos[2] = sg*zlenA*0.5;
1843 for (Int_t nb=0; nb<4; ++nb) {
1844 carpos[2] = carpos[2] - sg*(rowgap[nb] - rowstep);
1845 nrow = row + rowb[nb];
1846 for ( ; row < nrow ; ++row) {
1847 carpos[2] -= sg*rowstep;
1848 gMC->Gspos("FTUB", row, "FAIB", 0., carpos[1]+carpar[1]-bar[1], carpos[2]-sg*(carpar[2]-2.*feaParam1[2]-2.*al1[2]+2.*feaRoof1[2]-2.*bar[2]-tubepar[1]), idrotm[0], "ONLY");
1852 gMC->Gspos("FTLN", 5+4*sg, "FAIB", 0., -0.1, 369.9*sg, 0, "ONLY");
1853 gMC->Gspos("FTLN", 5+3*sg, "FAIB", 0., -0.1, 366.9*sg, 0, "ONLY");
1854 gMC->Gspos("FTLN", 5+2*sg, "FAIB", 0., -0.1, 198.8*sg, 0, "ONLY");
1855 gMC->Gspos("FTLN", 5+sg, "FAIB", 0., -0.1, 56.82*sg, 0, "ONLY");
1858 gMC->Gspos("FLOB", 4, "FAIB",-24., ytub+1.4, (zlenA*0.5 + fgkInterCentrModBorder2)*0.5, 0, "MANY");
1859 gMC->Gspos("FLOB", 3, "FAIB", 24., ytub+1.4, (zlenA*0.5 + fgkInterCentrModBorder2)*0.5, 0, "MANY");
1860 gMC->Gspos("FLOB", 2, "FAIB",-24., ytub+1.4, -(zlenA*0.5 + fgkInterCentrModBorder2)*0.5, 0, "MANY");
1861 gMC->Gspos("FLOB", 1, "FAIB", 24., ytub+1.4, -(zlenA*0.5 + fgkInterCentrModBorder2)*0.5, 0, "MANY");
1867 //_____________________________________________________________________________
1868 void AliTOFv6T0::MakeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zlenA) const
1871 // Make signal cables (FCAB and FCBL/B volumes),
1872 // supemodule cover (FCOV volume) and wall (FSAW volume)
1873 // in FAIA/B volume containers.
1876 //const Float_t fgkInterCentrModBorder2 = 57.5;
1878 // honeycomb layer between strips and cards (cm)
1879 //const Float_t fgkModuleCoverThickness = 2.;
1881 Int_t *idtmed = fIdtmed->GetArray()-499;
1885 //const Float_t fgkCBLw = 13.5; // width of lateral cables and tubes block
1886 //const Float_t fgkSawThickness = 1.;
1887 //const Float_t fgkFEAwidth1 = 19.;
1888 //const Float_t fgkFEAwidth2 = 38.5;
1890 Float_t tubepar[3] = {0., 0.4, xtof*0.5 - fgkCBLw - fgkSawThickness};
1892 // FEA cables definition
1893 Float_t cbpar[3] = {0., 0.5, (tubepar[2] - fgkFEAwidth2*0.5)*0.5};
1894 gMC->Gsvolu("FCAB", "TUBE", idtmed[510], cbpar, 3); // copper+alu
1895 cbpar[2] = (xtof*0.5 - fgkCBLw - fgkSawThickness - (xtof*0.5 - 25. + fgkFEAwidth1*0.5))*0.5;
1896 gMC->Gsvolu("FCAL", "TUBE", idtmed[510], cbpar, 3); // copper+alu
1899 AliMatrix(idrotm[0], 180., 90., 90., 90., 90., 0.);
1901 // FEA cables positioning
1902 Float_t rowstep = 6.66;
1904 Float_t ycab= ytub-3.;
1905 Float_t rowgap[5] = {13.5, 22.9, 16.94, 23.8, 20.4};
1906 Int_t rowb[5] = {6, 7, 6, 19, 7};
1907 Float_t carpos[3] = {25. - xtof*0.5,
1908 (11.5 - (ytof*0.5 - fgkModuleCoverThickness))*0.5,
1912 Float_t xCable = (xtof*0.5 - fgkCBLw - fgkSawThickness + fgkFEAwidth2*0.5)*0.5;
1913 Float_t xCableL = (xtof*0.5 - fgkCBLw - fgkSawThickness + (xtof*0.5 - 25. + fgkFEAwidth1*0.5))*0.5;
1914 for (Int_t sg= -1; sg< 2; sg+= 2) {
1915 carpos[2] = sg*zlenA*0.5;
1916 for (Int_t nb=0; nb<5; ++nb) {
1917 carpos[2] = carpos[2] - sg*(rowgap[nb] - rowstep);
1918 nrow = row + rowb[nb];
1919 for ( ; row < nrow ; ++row) {
1921 carpos[2] -= sg*rowstep;
1925 gMC->Gspos("FCAB", 2*row, "FAIA", xCable, ycab, carpos[2]-1.1, idrotm[0], "ONLY");
1926 gMC->Gspos("FCAB", 2*row-1, "FAIA",-xCable, ycab, carpos[2]-1.1, idrotm[0], "ONLY");
1927 gMC->Gspos("FCAL", 2*row, "FAIA", xCableL, ycab-2.*cbpar[1], carpos[2]-1.1, idrotm[0], "ONLY");
1928 gMC->Gspos("FCAL", 2*row-1, "FAIA",-xCableL, ycab-2.*cbpar[1], carpos[2]-1.1, idrotm[0], "ONLY");
1932 gMC->Gspos("FCAB", 2*row, "FAIA", xCable, ycab, carpos[2]-sg*1.1, idrotm[0], "ONLY");
1933 gMC->Gspos("FCAB", 2*row-1, "FAIA",-xCable, ycab, carpos[2]-sg*1.1, idrotm[0], "ONLY");
1934 gMC->Gspos("FCAL", 2*row, "FAIA", xCableL, ycab-2.*cbpar[1], carpos[2]-sg*1.1, idrotm[0], "ONLY");
1935 gMC->Gspos("FCAL", 2*row-1, "FAIA",-xCableL, ycab-2.*cbpar[1], carpos[2]-sg*1.1, idrotm[0], "ONLY");
1941 gMC->Gspos("FCAB", 182, "FAIA", xCable, ycab, -1.1, idrotm[0], "ONLY");
1942 gMC->Gspos("FCAB", 181, "FAIA",-xCable, ycab, -1.1, idrotm[0], "ONLY");
1943 gMC->Gspos("FCAL", 182, "FAIA", xCableL, ycab-2.*cbpar[1], -1.1, idrotm[0], "ONLY");
1944 gMC->Gspos("FCAL", 181, "FAIA",-xCableL, ycab-2.*cbpar[1], -1.1, idrotm[0], "ONLY");
1948 for (Int_t sg= -1; sg< 2; sg+= 2) {
1949 carpos[2] = sg*zlenA*0.5;
1950 for (Int_t nb=0; nb<4; ++nb) {
1951 carpos[2] = carpos[2] - sg*(rowgap[nb] - rowstep);
1952 nrow = row + rowb[nb];
1953 for ( ; row < nrow ; ++row) {
1954 carpos[2] -= sg*rowstep;
1955 gMC->Gspos("FCAB", 2*row, "FAIB", xCable, ycab, carpos[2]-sg*1.1, idrotm[0], "ONLY");
1956 gMC->Gspos("FCAB", 2*row-1, "FAIB",-xCable, ycab, carpos[2]-sg*1.1, idrotm[0], "ONLY");
1957 gMC->Gspos("FCAL", 2*row, "FAIB", xCableL, ycab-2.*cbpar[1], carpos[2]-sg*1.1, idrotm[0], "ONLY");
1958 gMC->Gspos("FCAL", 2*row-1, "FAIB",-xCableL, ycab-2.*cbpar[1], carpos[2]-sg*1.1, idrotm[0], "ONLY");
1964 // Cables and tubes on the side blocks
1965 // constants definition
1966 const Float_t kCBLl = zlenA*0.5; // length of block
1967 const Float_t kCBLlh = zlenA*0.5 - fgkInterCentrModBorder2; // length of block in case of holes
1968 //const Float_t fgkCBLw = 13.5; // width of block
1969 //const Float_t fgkCBLh1 = 2.; // min. height of block
1970 //const Float_t fgkCBLh2 = 12.3; // max. height of block
1971 //const Float_t fgkSawThickness = 1.; // Al wall thickness
1973 // lateral cable and tube volume definition
1974 Float_t tgal = (fgkCBLh2 - fgkCBLh1)/(2.*kCBLl);
1976 cblpar[0] = fgkCBLw *0.5;
1979 cblpar[3] = kCBLl *0.5;
1980 cblpar[4] = fgkCBLh1 *0.5;
1981 cblpar[5] = fgkCBLh2 *0.5;
1982 cblpar[6] = TMath::ATan(tgal)*kRaddeg;
1983 cblpar[7] = kCBLl *0.5;
1984 cblpar[8] = fgkCBLh1 *0.5;
1985 cblpar[9] = fgkCBLh2 *0.5;
1986 cblpar[10]= cblpar[6];
1987 gMC->Gsvolu("FCBL", "TRAP", idtmed[511], cblpar, 11); // cables and tubes mix
1989 // Side Al Walls definition
1990 Float_t sawpar[3] = {fgkSawThickness*0.5, fgkCBLh2*0.5, kCBLl};
1991 gMC->Gsvolu("FSAW", "BOX ", idtmed[504], sawpar, 3); // Al
1993 AliMatrix(idrotm[1], 90., 90., 180., 0., 90., 180.);
1994 AliMatrix(idrotm[2], 90., 90., 0., 0., 90., 0.);
1996 // lateral cable and tube volume positioning
1997 Float_t xcoor, ycoor, zcoor;
1998 xcoor = (xtof - fgkCBLw)*0.5 - 2.*sawpar[0];
1999 ycoor = (fgkCBLh1 + fgkCBLh2)*0.25 - (ytof*0.5 - fgkModuleCoverThickness)*0.5;
2001 gMC->Gspos("FCBL", 1, "FAIA", -xcoor, ycoor, -zcoor, idrotm[1], "ONLY");
2002 gMC->Gspos("FCBL", 2, "FAIA", xcoor, ycoor, -zcoor, idrotm[1], "ONLY");
2003 gMC->Gspos("FCBL", 3, "FAIA", -xcoor, ycoor, zcoor, idrotm[2], "ONLY");
2004 gMC->Gspos("FCBL", 4, "FAIA", xcoor, ycoor, zcoor, idrotm[2], "ONLY");
2007 cblpar[3] = kCBLlh *0.5;
2008 cblpar[5] = fgkCBLh1*0.5 + kCBLlh*tgal;
2009 cblpar[7] = kCBLlh *0.5;
2010 cblpar[9] = cblpar[5];
2011 gMC->Gsvolu("FCBB", "TRAP", idtmed[511], cblpar, 11); // cables and tubes mix
2013 xcoor = (xtof - fgkCBLw)*0.5 - 2.*sawpar[0];
2014 ycoor = (fgkCBLh1 + 2.*cblpar[5])*0.25 - (ytof*0.5 - fgkModuleCoverThickness)*0.5;
2015 zcoor = kCBLl-kCBLlh*0.5;
2016 gMC->Gspos("FCBB", 1, "FAIB", -xcoor, ycoor, -zcoor, idrotm[1], "ONLY");
2017 gMC->Gspos("FCBB", 2, "FAIB", xcoor, ycoor, -zcoor, idrotm[1], "ONLY");
2018 gMC->Gspos("FCBB", 3, "FAIB", -xcoor, ycoor, zcoor, idrotm[2], "ONLY");
2019 gMC->Gspos("FCBB", 4, "FAIB", xcoor, ycoor, zcoor, idrotm[2], "ONLY");
2022 // lateral cable and tube volume positioning
2023 xcoor = xtof*0.5-sawpar[0];
2024 ycoor = (fgkCBLh2 - ytof*0.5 + fgkModuleCoverThickness)*0.5;
2026 gMC->Gspos("FSAW", 1, "FAIA", -xcoor, ycoor, zcoor, 0, "ONLY");
2027 gMC->Gspos("FSAW", 2, "FAIA", xcoor, ycoor, zcoor, 0, "ONLY");
2030 xcoor = xtof*0.5 - sawpar[0];
2031 ycoor = (fgkCBLh2 - ytof*0.5 + fgkModuleCoverThickness)*0.5;
2032 gMC->Gspos("FSAW", 1, "FAIB", -xcoor, ycoor, 0., 0, "ONLY");
2033 gMC->Gspos("FSAW", 2, "FAIB", xcoor, ycoor, 0., 0, "ONLY");
2036 // TOF Supermodule cover definition and positioning
2037 Float_t covpar[3] = {xtof*0.5, 0.075, zlenA*0.5};
2038 gMC->Gsvolu("FCOV", "BOX ", idtmed[504], covpar, 3); // Al
2040 covpar[2] = (zlenA*0.5 - fgkInterCentrModBorder2)*0.5;
2041 gMC->Gsvolu("FCOB", "BOX ", idtmed[504], covpar, 3); // Al
2042 covpar[2] = fgkInterCentrModBorder2;
2043 gMC->Gsvolu("FCOP", "BOX ", idtmed[513], covpar, 3); // Plastic (CH2)
2047 ycoor = 12.5*0.5 - covpar[1];
2049 gMC->Gspos("FCOV", 0, "FAIA", xcoor, ycoor, zcoor, 0, "ONLY");
2051 zcoor = (zlenA*0.5 + fgkInterCentrModBorder2)*0.5;
2052 gMC->Gspos("FCOB", 1, "FAIB", xcoor, ycoor, zcoor, 0, "ONLY");
2053 gMC->Gspos("FCOB", 2, "FAIB", xcoor, ycoor, -zcoor, 0, "ONLY");
2055 gMC->Gspos("FCOP", 0, "FAIB", xcoor, ycoor, zcoor, 0, "ONLY");
2060 //_____________________________________________________________________________
2061 void AliTOFv6T0::MakeReadoutCrates(Float_t ytof) const
2065 // Empty crate weight: 50 Kg, electronics cards + cables ~ 52 Kg.
2066 // Per each side (A and C) the total weight is: 2x102 ~ 204 Kg.
2067 // ... + weight of the connection pannel for the steel cooling system (Cr 18%, Ni 12%, Fe 70%)
2068 // + other remaining elements + various supports
2070 // Each FEA card weight + all supports
2071 // (including all bolts and not including the cable connectors)
2073 // Per each strip there are 4 FEA cards, then
2074 // the total weight of the front-end electonics section is: 353.1 g x 4 = 1412.4 g.
2078 // Empty crate weight: 50 Kg, electronics cards + cables ~ 52 Kg.
2079 // Per each side (A and C) the total weight is: 2x102 ~ 204 Kg.
2080 // ... + weight of the connection pannel for the steel cooling system (Cr 18%, Ni 12%, Fe 70%)
2081 // + other remaining elements + various supports
2083 // Each FEA card weight + all supports
2084 // (including all bolts and not including the cable connectors)
2086 // Per each strip there are 4 FEA cards, then
2087 // the total weight of the front-end electonics section is: 353.1 g x 4 = 1412.4 g.
2090 Int_t *idtmed = fIdtmed->GetArray()-499;
2094 // volume definition
2095 Float_t serpar[3] = {29.*0.5, 121.*0.5, 90.*0.5};
2096 gMC->Gsvolu("FTOS", "BOX ", idtmed[514], serpar, 3); // Al + Cu + steel
2098 Float_t xcoor, ycoor, zcoor;
2099 zcoor = (118.-90.)*0.5;
2100 Float_t phi = -10., ra = fTOFGeometry->Rmin() + ytof*0.5;
2101 for (Int_t i = 0; i < fTOFGeometry->NSectors(); i++) {
2103 xcoor = ra * TMath::Cos(phi * kDegrad);
2104 ycoor = ra * TMath::Sin(phi * kDegrad);
2105 AliMatrix(idrotm[i], 90., phi, 90., phi + 270., 0., 0.);
2106 gMC->Gspos("FTOS", i, "BFMO", xcoor, ycoor, zcoor, idrotm[i], "ONLY");
2109 zcoor = (90. - 223.)*0.5;
2110 gMC->Gspos("FTOS", 1, "BBCE", ra, 0., zcoor, 0, "ONLY");
2114 //_____________________________________________________________________________
2115 void AliTOFv6T0::DrawModule() const
2118 // Draw a shaded view of the Time Of Flight version 5
2121 // Set everything unseen
2122 gMC->Gsatt("*", "seen", -1);
2125 //Set volumes visible
2128 //Set ALIC mother transparent
2129 gMC->Gsatt("ALIC","SEEN", 0);
2132 // Level 1 for TOF volumes
2133 gMC->Gsatt("B077","seen", 0);
2136 // Level 2 for TOF volumes
2137 gMC->Gsatt("B071","seen", 0);
2138 gMC->Gsatt("B074","seen", 0);
2139 gMC->Gsatt("B075","seen", 0);
2140 gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
2141 gMC->Gsatt("B080","seen", 0); // B080 does not has sub-level
2144 gMC->Gsatt("B056","seen", 0); // B056 does not has sub-levels -
2145 gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped -
2146 gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped -
2147 gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped -
2148 gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped -
2151 for (Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
2152 sprintf(name, "BREF%d",isec);
2153 gMC->Gsatt(name,"seen", 0); // all BREF%d sub-levels skipped -
2154 sprintf(name, "BTRD%d",isec);
2155 gMC->Gsatt(name,"seen", 0); // all BTRD%d sub-levels skipped -
2156 sprintf(name, "BTOF%d",isec);
2157 gMC->Gsatt(name,"seen",-2); // all BTOF%d sub-levels skipped -
2160 gMC->Gdopt("hide", "on");
2161 gMC->Gdopt("shad", "on");
2162 gMC->Gsatt("*", "fill", 7);
2163 gMC->SetClipBox(".");
2164 gMC->SetClipBox("*", 100, 1000, 100, 1000, 100, 1000);
2165 gMC->DefaultRange();
2166 gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018);
2167 gMC->Gdhead(1111, "Time Of Flight");
2168 gMC->Gdman(18, 3, "MAN");
2169 gMC->Gdopt("hide","off");
2171 //_____________________________________________________________________________
2172 void AliTOFv6T0::DrawDetectorModules() const
2175 // Draw a shaded view of the TOF detector SuperModules version 5
2178 // Set everything unseen
2179 gMC->Gsatt("*", "seen", -1);
2182 //Set volumes visible
2185 //Set ALIC mother transparent
2186 gMC->Gsatt("ALIC","SEEN", 0);
2189 // Level 1 for TOF volumes
2190 gMC->Gsatt("B077","seen", 0);
2193 // Level 2 for TOF volumes
2194 gMC->Gsatt("B071","seen", 0);
2195 gMC->Gsatt("B074","seen", 0);
2196 gMC->Gsatt("B075","seen", 0);
2197 gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
2198 gMC->Gsatt("B080","seen", 0); // B080 does not has sub-level
2201 gMC->Gsatt("B056","seen", 0); // B056 does not has sub-levels -
2202 gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped -
2203 gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped -
2204 gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped -
2205 gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped -
2208 for (Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
2209 sprintf(name, "BREF%d",isec);
2210 gMC->Gsatt(name,"seen", 0); // all BREF%d sub-levels skipped -
2211 sprintf(name, "BTRD%d",isec);
2212 gMC->Gsatt(name,"seen", 0); // all BTRD%d sub-levels skipped -
2213 sprintf(name, "BTOF%d",isec);
2214 gMC->Gsatt(name,"seen", 0); // all BTOF%d sub-levels skipped -
2217 // Level 3 of B071, B075 and B074
2218 gMC->Gsatt("FTOA","seen",-2); // all FTOA sub-levels skipped -
2219 if (fTOFHoles) gMC->Gsatt("FTOB","seen",-2); // all FTOB sub-levels skipped -
2220 if (fTOFHoles) gMC->Gsatt("FTOC","seen",-2); // all FTOC sub-levels skipped -
2222 // Level 3 of B071, B075 and B074
2223 gMC->Gsatt("FAIA","seen",-1); // all FAIA sub-levels skipped -
2224 if (fTOFHoles) gMC->Gsatt("FAIB","seen",-1); // all FAIB sub-levels skipped -
2226 // Level 3 of B071, B075 and B074
2227 gMC->Gsatt("FPEA","seen",-2/*1*/); // all FPEA sub-levels skipped -
2228 if (fTOFHoles) gMC->Gsatt("FPEB","seen",-2/*1*/); // all FPEB sub-levels skipped -
2230 gMC->Gdopt("hide","on");
2231 gMC->Gdopt("shad","on");
2232 gMC->Gsatt("*", "fill", 5);
2233 gMC->SetClipBox(".");
2234 gMC->SetClipBox("*", 100, 1000, 100, 1000, 0, 1000);
2235 gMC->DefaultRange();
2236 gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018);
2237 gMC->Gdhead(1111,"TOF detector");
2238 gMC->Gdman(18, 3, "MAN");
2239 gMC->Gdopt("hide","off");
2242 //_____________________________________________________________________________
2243 void AliTOFv6T0::DrawDetectorStrips() const
2246 // Draw a shaded view of the TOF strips for version 5
2249 // Set everything unseen
2250 gMC->Gsatt("*", "seen", -1);
2253 //Set volumes visible
2256 //Set ALIC mother transparent
2257 gMC->Gsatt("ALIC","SEEN", 0);
2260 // Level 1 for TOF volumes
2261 gMC->Gsatt("B077","seen", 0);
2264 // Level 2 for TOF volumes
2265 gMC->Gsatt("B071","seen", 0);
2266 gMC->Gsatt("B074","seen", 0);
2267 gMC->Gsatt("B075","seen", 0);
2268 gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
2269 gMC->Gsatt("B080","seen", 0); // B080 does not has sub-level
2272 gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped -
2273 gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped -
2274 gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped -
2275 gMC->Gsatt("B056","seen", 0); // B056 does not has sub-levels -
2276 gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped -
2279 for (Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
2280 sprintf(name, "BREF%d",isec);
2281 gMC->Gsatt(name,"seen", 0); // all BREF%d sub-levels skipped -
2282 sprintf(name, "BTRD%d",isec);
2283 gMC->Gsatt(name,"seen", 0); // all BTRD%d sub-levels skipped -
2284 sprintf(name, "BTOF%d",isec);
2285 gMC->Gsatt(name,"seen", 0); // all BTOF%d sub-levels skipped -
2288 // Level 3 of B071, B074 and B075
2289 gMC->Gsatt("FTOA","SEEN", 0);
2290 if (fTOFHoles) gMC->Gsatt("FTOB","SEEN", 0);
2291 if (fTOFHoles) gMC->Gsatt("FTOC","SEEN", 0);
2293 // Level 4 of B071, B074 and B075
2294 gMC->Gsatt("FLTA","SEEN", 0);
2295 if (fTOFHoles) gMC->Gsatt("FLTB","SEEN", 0);
2296 if (fTOFHoles) gMC->Gsatt("FLTC","SEEN", 0);
2298 // Level 5 of B071, B074 and B075
2299 gMC->Gsatt("FAIA","SEEN", 0);
2300 if (fTOFHoles) gMC->Gsatt("FAIB","SEEN", 0);
2302 gMC->Gsatt("FPEA","SEEN", -2/*1*/);
2303 if (fTOFHoles) gMC->Gsatt("FPEB","SEEN", -2/*1*/);
2305 gMC->Gsatt("FSTR","SEEN",-2); // all FSTR sub-levels skipped -
2307 gMC->Gsatt("FWZ1","SEEN", 1);
2308 gMC->Gsatt("FWZ2","SEEN", 1);
2309 gMC->Gsatt("FWZ3","SEEN", 1);
2310 gMC->Gsatt("FWZ4","SEEN", 1);
2312 gMC->Gsatt("FWZA","SEEN", 1);
2313 gMC->Gsatt("FWZB","SEEN", 1);
2314 gMC->Gsatt("FWZC","SEEN", 1);
2319 gMC->Gsatt("FCA1","SEEN", 0);
2320 gMC->Gsatt("FCA2","SEEN", 0);
2321 gMC->Gsatt("FCAB","SEEN", 0);
2322 gMC->Gsatt("FCAL","SEEN", 0);
2323 gMC->Gsatt("FTUB","SEEN",-1); // all FTUB sub-levels skipped -
2324 gMC->Gsatt("FTLN","SEEN", 0);
2325 gMC->Gsatt("FLTN","SEEN", 0);
2326 gMC->Gsatt("FCBL","SEEN", 0);
2327 if (fTOFHoles) gMC->Gsatt("FCBB","SEEN", 0);
2328 gMC->Gsatt("FSAW","SEEN", 0);
2329 gMC->Gsatt("FCOV","SEEN", 0);
2331 gMC->Gsatt("FCOB","SEEN", 0);
2332 gMC->Gsatt("FCOP","SEEN", 0);
2336 gMC->Gsatt("FITU","SEEN", 0);
2339 gMC->Gsatt("FHON","SEEN", 1);
2340 gMC->Gsatt("FPC1","SEEN", 1);
2341 gMC->Gsatt("FPC2","SEEN", 1);
2342 gMC->Gsatt("FPCB","SEEN", 1);
2343 gMC->Gsatt("FRGL","SEEN", 1);
2344 gMC->Gsatt("FGLF","SEEN", 1);
2346 // Level 2 of FPCB => Level 3 of FSTR
2347 gMC->Gsatt("FSEN","SEEN", 0);
2348 gMC->Gsatt("FSEZ","SEEN", 0);
2349 gMC->Gsatt("FPAD","SEEN", 1);
2351 gMC->Gdopt("hide","on");
2352 gMC->Gdopt("shad","on");
2353 gMC->Gsatt("*", "fill", 5);
2354 gMC->SetClipBox(".");
2355 gMC->SetClipBox("*", 0, 1000, 0, 1000, 0, 1000);
2356 gMC->DefaultRange();
2357 gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018);
2358 gMC->Gdhead(1111,"TOF Strips");
2359 gMC->Gdman(18, 3, "MAN");
2360 gMC->Gdopt("hide","off");
2363 //_____________________________________________________________________________
2364 void AliTOFv6T0::CreateMaterials()
2367 // Define materials for the Time Of Flight
2370 //AliTOF::CreateMaterials();
2372 AliMagF *magneticField = (AliMagF*)gAlice->Field();
2374 Int_t isxfld = magneticField->Integ();
2375 Float_t sxmgmx = magneticField->Max();
2377 //--- Quartz (SiO2) ---
2378 Float_t aq[2] = { 28.0855,15.9994};
2379 Float_t zq[2] = { 14.,8. };
2380 Float_t wq[2] = { 1.,2. };
2381 Float_t dq = 2.7; // (+5.9%)
2384 // --- Nomex (C14H22O2N2) ---
2385 Float_t anox[4] = {12.011,1.00794,15.9994,14.00674};
2386 Float_t znox[4] = { 6., 1., 8., 7.};
2387 Float_t wnox[4] = {14., 22., 2., 2.};
2388 //Float_t dnox = 0.048; //old value
2389 Float_t dnox = 0.22; // (x 4.6)
2392 // --- G10 {Si, O, C, H, O} ---
2393 Float_t we[7], na[7];
2395 Float_t ag10[5] = {28.0855,15.9994,12.011,1.00794,15.9994};
2396 Float_t zg10[5] = {14., 8., 6., 1., 8.};
2399 na[0]= 1. , na[1]= 2. , na[2]= 0. , na[3]= 0. , na[4]= 0.;
2400 MaterialMixer(we,ag10,na,5);
2401 wmatg10[0]= we[0]*0.6;
2402 wmatg10[1]= we[1]*0.6;
2403 na[0]= 0. , na[1]= 0. , na[2]= 14. , na[3]= 20. , na[4]= 3.;
2404 MaterialMixer(we,ag10,na,5);
2405 wmatg10[2]= we[2]*0.4;
2406 wmatg10[3]= we[3]*0.4;
2407 wmatg10[4]= we[4]*0.4;
2408 AliDebug(1,Form("wg10 %d %d %d %d %d", wmatg10[0], wmatg10[1], wmatg10[2], wmatg10[3], wmatg10[4]));
2409 //Float_t densg10 = 1.7; //old value
2410 Float_t densg10 = 2.0; // (+17.8%)
2413 Float_t awa[2] = { 1.00794, 15.9994 };
2414 Float_t zwa[2] = { 1., 8. };
2415 Float_t wwa[2] = { 2., 1. };
2420 Float_t aAir[4]={12.011,14.00674,15.9994,39.948};
2421 Float_t zAir[4]={6.,7.,8.,18.};
2422 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
2423 Float_t dAir = 1.20479E-3;
2425 // --- Fibre Glass ---
2426 Float_t afg[4] = {28.0855,15.9994,12.011,1.00794};
2427 Float_t zfg[4] = {14., 8., 6., 1.};
2428 Float_t wfg[4] = {0.12906,0.29405,0.51502,0.06187};
2429 //Float_t dfg = 1.111;
2430 Float_t dfg = 2.05; // (x1.845)
2433 // --- Freon C2F4H2 + SF6 ---
2434 Float_t afre[4] = {12.011,1.00794,18.9984032,32.0065};
2435 Float_t zfre[4] = { 6., 1., 9., 16.};
2436 Float_t wfre[4] = {0.21250,0.01787,0.74827,0.021355};
2437 Float_t densfre = 0.00375;
2440 // --- Cables and tubes {Al, Cu} ---
2441 Float_t acbt[2] = {26.981539,63.546};
2442 Float_t zcbt[2] = {13., 29.};
2443 Float_t wcbt[2] = {0.407,0.593};
2444 Float_t decbt = 0.68;
2446 // --- Cable {CH2, Al, Cu} ---
2447 Float_t asc[4] = {12.011, 1.00794, 26.981539,63.546};
2448 Float_t zsc[4] = { 6., 1., 13., 29.};
2450 for (Int_t ii=0; ii<4; ii++) wsc[ii]=0.;
2452 Float_t wDummy[4], nDummy[4];
2453 for (Int_t ii=0; ii<4; ii++) wDummy[ii]=0.;
2454 for (Int_t ii=0; ii<4; ii++) nDummy[ii]=0.;
2457 MaterialMixer(wDummy,asc,nDummy,2);
2458 wsc[0] = 0.4375*wDummy[0];
2459 wsc[1] = 0.4375*wDummy[1];
2462 Float_t dsc = 1.223;
2464 // --- Crates boxes {Al, Cu, Fe, Cr, Ni} ---
2465 Float_t acra[5]= {26.981539,63.546,55.845,51.9961,58.6934};
2466 Float_t zcra[5]= {13., 29., 26., 24., 28.};
2467 Float_t wcra[5]= {0.7,0.2,0.07,0.018,0.012};
2468 Float_t dcra = 0.77;
2470 // --- Polietilene CH2 ---
2471 Float_t aPlastic[2] = {12.011, 1.00794};
2472 Float_t zPlastic[2] = { 6., 1.};
2473 Float_t wPlastic[2] = { 1., 2.};
2474 //Float_t dPlastic = 0.92; // PDB value
2475 Float_t dPlastic = 0.93; // (~+1.1%)
2476 Int_t nwPlastic = -2;
2478 AliMixture ( 0, "Air$", aAir, zAir, dAir, 4, wAir);
2479 AliMixture ( 1, "Nomex$", anox, znox, dnox, nnox, wnox);
2480 AliMixture ( 2, "G10$", ag10, zg10, densg10, nlmatg10, wmatg10);
2481 AliMixture ( 3, "fibre glass$", afg, zfg, dfg, nfg, wfg);
2482 AliMaterial( 4, "Al $", 26.981539, 13., 2.7, -8.9, 999.);
2483 Float_t factor = 0.4/1.5*2./3.;
2484 AliMaterial( 5, "Al honeycomb$", 26.981539, 13., 2.7*factor, -8.9/factor, 999.);
2485 AliMixture ( 6, "Freon$", afre, zfre, densfre, nfre, wfre);
2486 AliMixture ( 7, "Glass$", aq, zq, dq, nq, wq);
2487 AliMixture ( 8, "Water$", awa, zwa, dwa, nwa, wwa);
2488 AliMixture ( 9, "cables+tubes$", acbt, zcbt, decbt, 2, wcbt);
2489 AliMaterial(10, "Cu $", 63.546, 29., 8.96, -1.43, 999.);
2490 AliMixture (11, "cable$", asc, zsc, dsc, 4, wsc);
2491 AliMixture (12, "Al+Cu+steel$", acra, zcra, dcra, 5, wcra);
2492 AliMixture (13, "plastic$", aPlastic, zPlastic, dPlastic, nwPlastic, wPlastic);
2493 Float_t factorHoles = 1./36.5;
2494 AliMaterial(14, "Al honey for holes$", 26.981539, 13., 2.7*factorHoles, -8.9/factorHoles, 999.);
2496 Float_t epsil, stmin, deemax, stemax;
2499 // EPSIL = 0.1 ! Tracking precision,
2500 // STEMAX = 0.1 ! Maximum displacement for multiple scattering
2501 // DEEMAX = 0.1 ! Maximum fractional energy loss, DLS
2505 epsil = .001; // Tracking precision,
2506 stemax = -1.; // Maximum displacement for multiple scattering
2507 deemax = -.3; // Maximum fractional energy loss, DLS
2510 AliMedium( 1,"Air$", 0, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2511 AliMedium( 2,"Nomex$", 1, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2512 AliMedium( 3,"G10$", 2, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2513 AliMedium( 4,"fibre glass$", 3, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2514 AliMedium( 5,"Al Frame$", 4, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2515 AliMedium( 6,"honeycomb$", 5, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2516 AliMedium( 7,"Fre$", 6, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2517 AliMedium( 8,"Cu-S$", 10, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2518 AliMedium( 9,"Glass$", 7, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2519 AliMedium(10,"Water$", 8, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2520 AliMedium(11,"Cable$", 11, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2521 AliMedium(12,"Cables+Tubes$", 9, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2522 AliMedium(13,"Copper$", 10, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2523 AliMedium(14,"Plastic$", 13, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2524 AliMedium(15,"Crates$", 12, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2525 AliMedium(16,"honey_holes$", 14, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
2528 //_____________________________________________________________________________
2529 void AliTOFv6T0::Init()
2532 // Initialise the detector after the geometry has been defined
2534 AliDebug(1, "**************************************"
2536 "**************************************");
2537 AliDebug(1, " Version 4 of TOF initialing, "
2538 "symmetric TOF - Full Coverage version");
2542 fIdFTOA = gMC->VolId("FTOA");
2544 fIdFTOB = gMC->VolId("FTOB");
2545 fIdFTOC = gMC->VolId("FTOC");
2547 fIdFLTA = gMC->VolId("FLTA");
2549 fIdFLTB = gMC->VolId("FLTB");
2550 fIdFLTC = gMC->VolId("FLTC");
2553 AliDebug(1, "**************************************"
2555 "**************************************");
2558 //_____________________________________________________________________________
2559 void AliTOFv6T0::StepManager()
2563 // Procedure called at each step in the Time Of Flight
2566 TLorentzVector mom, pos;
2567 Float_t xm[3],pm[3],xpad[3],ppad[3];
2570 Int_t sector, plate, padx, padz, strip;
2571 Int_t copy, padzid, padxid, stripid, i;
2572 Int_t *idtmed = fIdtmed->GetArray()-499;
2573 Float_t incidenceAngle;
2575 const char* volpath;
2580 gMC->IsTrackEntering()
2581 && gMC->TrackCharge()
2582 //&& gMC->GetMedium()==idtmed[507]
2583 && gMC->CurrentMedium()==idtmed[507]
2584 && gMC->CurrentVolID(copy)==fIdSens
2588 AliMC *mcApplication = (AliMC*)gAlice->GetMCApp();
2590 //AddTrackReference(mcApplication->GetCurrentTrackNumber(), AliTrackReference::kTOF);
2591 AddTrackReference(mcApplication->GetCurrentTrackNumber());
2593 // getting information about hit volumes
2595 padzid=gMC->CurrentVolOffID(1,copy);
2599 padxid=gMC->CurrentVolOffID(0,copy);
2603 stripid=gMC->CurrentVolOffID(4,copy);
2607 gMC->TrackPosition(pos);
2608 gMC->TrackMomentum(mom);
2610 Double_t normMom=1./mom.Rho();
2612 // getting the coordinates in pad ref system
2614 xm[0] = (Float_t)pos.X();
2615 xm[1] = (Float_t)pos.Y();
2616 xm[2] = (Float_t)pos.Z();
2618 pm[0] = (Float_t)mom.X()*normMom;
2619 pm[1] = (Float_t)mom.Y()*normMom;
2620 pm[2] = (Float_t)mom.Z()*normMom;
2622 gMC->Gmtod(xm,xpad,1); // from MRS to DRS: coordinates convertion
2623 gMC->Gmtod(pm,ppad,2); // from MRS to DRS: direction cosinus convertion
2626 if (TMath::Abs(ppad[1])>1) {
2627 AliWarning("Abs(ppad) > 1");
2628 ppad[1]=TMath::Sign((Float_t)1,ppad[1]);
2630 incidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
2633 if (strip < fTOFGeometry->NStripC()) {
2637 else if (strip >= fTOFGeometry->NStripC() &&
2638 strip < fTOFGeometry->NStripC() + fTOFGeometry->NStripB()) {
2640 strip = strip - fTOFGeometry->NStripC();
2642 else if (strip >= fTOFGeometry->NStripC() + fTOFGeometry->NStripB() &&
2643 strip < fTOFGeometry->NStripC() + fTOFGeometry->NStripB() + fTOFGeometry->NStripA()) {
2645 strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB();
2647 else if (strip >= fTOFGeometry->NStripC() + fTOFGeometry->NStripB() + fTOFGeometry->NStripA() &&
2648 strip < fTOFGeometry->NStripC() + fTOFGeometry->NStripB() + fTOFGeometry->NStripA() + fTOFGeometry->NStripB()) {
2650 strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB() - fTOFGeometry->NStripA();
2654 strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB() - fTOFGeometry->NStripA() - fTOFGeometry->NStripB();
2657 volpath=gMC->CurrentVolOffName(7);
2658 index=atoi(&volpath[4]);
2675 hits[6] = mom.Rho();
2680 hits[11]= incidenceAngle;
2681 hits[12]= gMC->Edep();
2682 hits[13]= gMC->TrackLength();
2690 AddT0Hit(mcApplication->GetCurrentTrackNumber(),vol, hits);
2691 //AddT0Hit(gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, hits);
2694 //-------------------------------------------------------------------
2695 void AliTOFv6T0::MaterialMixer(Float_t* p,Float_t* a,Float_t* m,Int_t n) const
2697 // a[] atomic weights vector (in)
2698 // (atoms present in more compound appear separately)
2699 // m[] number of corresponding atoms in the compound (in)
2701 for (Int_t i = 0; i < n; ++i) {
2705 for (Int_t i = 0; i < n; ++i) {
2707 //AliDebug(1,Form((\n weight[%i] = %f (,i,p[i]));