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 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
20 // Class AliMUONSt1GeometryBuilderV2
21 // ---------------------------------
22 // MUON Station1 detailed geometry construction class.
23 // (Originally defined in AliMUONv2.cxx - now removed.)
24 // Included in AliRoot 2004/01/23
26 #include "AliMUONSt1GeometryBuilderV2.h"
27 #include "AliMUONSt1SpecialMotif.h"
29 #include "AliMUONConstants.h"
30 #include "AliMUONGeometryModule.h"
31 #include "AliMUONGeometryEnvelopeStore.h"
33 #include "AliMpContainers.h"
34 #include "AliMpConstants.h"
35 #include "AliMpFiles.h"
36 #include "AliMpSectorReader.h"
37 #include "AliMpSector.h"
39 #include "AliMpVRowSegment.h"
40 #include "AliMpMotifMap.h"
41 #include "AliMpMotifPosition.h"
42 #include "AliMpPlaneType.h"
50 #include <TGeoMatrix.h>
51 #include <TClonesArray.h>
52 #include <Riostream.h>
54 #include <TVirtualMC.h>
55 #include <TGeoManager.h>
56 #include <TGeoVolume.h>
58 #include <TGeoCompositeShape.h>
68 // Thickness Constants
69 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzPadPlane=0.0148/2.; //Pad plane
70 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFoam = 2.503/2.; //Foam of mechanicalplane
71 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFR4 = 0.062/2.; //FR4 of mechanical plane
72 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzSnPb = 0.0091/2.; //Pad/Kapton connection (66 pt)
73 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzKapton = 0.0122/2.; //Kapton
74 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergPlastic = 0.3062/2.;//Berg connector
75 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergCopper = 0.1882/2.; //Berg connector
76 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzDaughter = 0.0156/2.; //Daughter board
77 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzGas = 0.42/2.; //Gas thickness
79 // Quadrant Mother volume - TUBS1 - Middle layer of model
80 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR1 = 18.3;
81 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR1 = 105.673;
82 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick1 = 6.5/2;
83 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL1 = 0.;
84 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU1 = 90.;
86 // Quadrant Mother volume - TUBS2 - near and far layers of model
87 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR2 = 20.7;
88 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR2 = 100.073;
89 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick2 = 3.0/2;
90 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL2 = 0.;
91 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU2 = 90.;
93 // Sensitive copper pads, foam layer, PCB and electronics model parameters
94 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxHole=1.5/2.;
95 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyHole=6./2.;
96 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergPlastic=0.74/2.;
97 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergPlastic=5.09/2.;
98 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergCopper=0.25/2.;
99 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergCopper=3.6/2.;
100 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxKapton=0.8/2.;
101 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyKapton=5.7/2.;
102 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxDaughter=2.3/2.;
103 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyDaughter=6.3/2.;
104 const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetX=1.46;
105 const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetY=0.71;
106 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamX=1.46;
107 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamY=0.051;
109 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaQuadLHC=2.6; // LHC Origin wrt Quadrant Origin
110 const GReal_t AliMUONSt1GeometryBuilderV2::fgkFrameOffset=5.2;
111 // Fix (1) of overlap SQN* layers with SQM* ones (was 5.0)
113 // Pad planes offsets
114 const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadXOffsetBP = 0.50 - 0.63/2; // = 0.185
115 const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadYOffsetBP = -0.31 - 0.42/2; // =-0.52
117 const char* AliMUONSt1GeometryBuilderV2::fgkHoleName="SCHL";
118 const char* AliMUONSt1GeometryBuilderV2::fgkDaughterName="SCDB";
119 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantEnvelopeName="SE";
120 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMLayerName="SQM";
121 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantNLayerName="SQN";
122 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantFLayerName="SQF";
123 const Int_t AliMUONSt1GeometryBuilderV2::fgkFoamBoxNameOffset=200;
124 const Int_t AliMUONSt1GeometryBuilderV2::fgkFR4BoxNameOffset=400;
125 const Int_t AliMUONSt1GeometryBuilderV2::fgkDaughterCopyNoOffset=1000;
127 ClassImp(AliMUONSt1GeometryBuilderV2)
129 //______________________________________________________________________________
130 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon)
131 : AliMUONVGeometryBuilder(0, 1),
134 // set path to mapping data files
135 if (! gSystem->Getenv("MINSTALL")) {
136 TString dirPath = gSystem->Getenv("ALICE_ROOT");
137 dirPath += "/MUON/mapping";
138 AliMpFiles::SetTopPath(dirPath);
139 gSystem->Setenv("MINSTALL", dirPath.Data());
140 //cout << "AliMpFiles top path set to " << dirPath << endl;
143 // cout << gSystem->Getenv("MINSTALL") << endl;
146 //______________________________________________________________________________
147 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2()
148 : AliMUONVGeometryBuilder(),
151 // Default Constructor
155 //______________________________________________________________________________
156 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(const AliMUONSt1GeometryBuilderV2& rhs)
157 : AliMUONVGeometryBuilder(rhs)
159 // Dummy copy constructor
161 AliFatal("Copy constructor is not implemented.");
164 //______________________________________________________________________________
165 AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2()
171 //______________________________________________________________________________
172 AliMUONSt1GeometryBuilderV2&
173 AliMUONSt1GeometryBuilderV2::operator = (const AliMUONSt1GeometryBuilderV2& rhs)
175 // check assignement to self
176 if (this == &rhs) return *this;
178 AliFatal("Assignment operator is not implemented.");
187 //______________________________________________________________________________
189 AliMUONSt1GeometryBuilderV2::QuadrantEnvelopeName(Int_t chamber, Int_t quadrant) const
191 // Generate unique envelope name from chamber Id and quadrant number
194 return Form("%s%d", Form("%s%d",fgkQuadrantEnvelopeName,chamber), quadrant);
197 //______________________________________________________________________________
198 void AliMUONSt1GeometryBuilderV2::CreateHole()
200 // Create all the elements found inside a foam hole
202 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
203 Int_t idAir = idtmed[1100]; // medium 1
204 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
205 Int_t idCopper = idtmed[1121]; // medium 22 = copper
208 GReal_t posX,posY,posZ;
213 gMC->Gsvolu(fgkHoleName,"BOX",idAir,par,3);
215 par[0] = fgkHxKapton;
216 par[1] = fgkHyKapton;
218 gMC->Gsvolu("SNPB", "BOX", idCopper, par, 3);
221 posZ = -fgkHzFoam+fgkHzSnPb;
222 gMC->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
225 par[1] = fgkHyBergPlastic;
226 par[2] = fgkHzKapton;
227 gMC->Gsvolu("SKPT", "BOX", idCopper, par, 3);
231 gMC->Gspos("SKPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
234 //______________________________________________________________________________
235 void AliMUONSt1GeometryBuilderV2::CreateDaughterBoard()
237 // Create all the elements in a daughter board
239 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
240 Int_t idAir = idtmed[1100]; // medium 1
241 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
242 //Int_t idPlastic =idtmed[1116]; // medium 17 = Plastic
243 Int_t idCopper = idtmed[1121]; // medium 22 = copper
244 Int_t idPlastic =idtmed[1127]; // medium 28 = Plastic
247 GReal_t posX,posY,posZ;
249 par[0]=fgkHxDaughter;
250 par[1]=fgkHyDaughter;
251 par[2]=TotalHzDaughter();
252 gMC->Gsvolu(fgkDaughterName,"BOX",idAir,par,3);
254 par[0]=fgkHxBergPlastic;
255 par[1]=fgkHyBergPlastic;
256 par[2]=fgkHzBergPlastic;
257 gMC->Gsvolu("SBGP","BOX",idPlastic,par,3);
260 posZ = -TotalHzDaughter() + fgkHzBergPlastic;
261 gMC->Gspos("SBGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
263 par[0]=fgkHxBergCopper;
264 par[1]=fgkHyBergCopper;
265 par[2]=fgkHzBergCopper;
266 gMC->Gsvolu("SBGC","BOX",idCopper,par,3);
270 gMC->Gspos("SBGC",1,"SBGP",posX,posY,posZ,0,"ONLY");
272 par[0]=fgkHxDaughter;
273 par[1]=fgkHyDaughter;
274 par[2]=fgkHzDaughter;
275 gMC->Gsvolu("SDGH","BOX",idCopper,par,3);
278 posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter;
279 gMC->Gspos("SDGH",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
282 //______________________________________________________________________________
283 void AliMUONSt1GeometryBuilderV2::CreateInnerLayers()
285 // Create the layer of sensitive volumes with gas
286 // and the copper layer.
290 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
291 //Int_t idArCO2 = idtmed[1108]; // medium 9 (ArCO2 80%)
292 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
293 Int_t idArCO2 = idtmed[1124]; // medium 25 (ArCO2 80%)
294 Int_t idCopper = idtmed[1121]; // medium 22 = copper
298 //Make gas volume - composed of 11 trapezoids
312 gMC->Gsvolu("SA1G", "TRAP", idArCO2, par, 11);
313 gMC->Gsvolu("SA2G", "TRAP", idArCO2, par, 11);
315 par[0] = fgkHzPadPlane;
316 gMC->Gsvolu("SA1C", "TRAP", idCopper,par, 11);
330 gMC->Gsvolu("SB1G", "TRAP", idArCO2, par, 11);
331 gMC->Gsvolu("SB2G", "TRAP", idArCO2, par, 11);
333 par[0] = fgkHzPadPlane;
334 gMC->Gsvolu("SB1C", "TRAP", idCopper,par, 11);
349 gMC->Gsvolu("SC1G", "TRAP", idArCO2, par, 11);
350 gMC->Gsvolu("SC2G", "TRAP", idArCO2, par, 11);
352 par[0] = fgkHzPadPlane;
353 gMC->Gsvolu("SC1C", "TRAP", idCopper,par, 11);
367 gMC->Gsvolu("SD1G", "TRAP", idArCO2, par, 11);
368 gMC->Gsvolu("SD2G", "TRAP", idArCO2, par, 11);
370 par[0] = fgkHzPadPlane;
371 gMC->Gsvolu("SD1C", "TRAP", idCopper,par, 11);
385 gMC->Gsvolu("SE1G", "TRAP", idArCO2, par, 11);
386 gMC->Gsvolu("SE2G", "TRAP", idArCO2, par, 11);
388 par[0] = fgkHzPadPlane;
389 gMC->Gsvolu("SE1C", "TRAP", idCopper,par, 11);
403 gMC->Gsvolu("SF1G", "TRAP", idArCO2, par, 11);
404 gMC->Gsvolu("SF2G", "TRAP", idArCO2, par, 11);
406 par[0] = fgkHzPadPlane;
407 gMC->Gsvolu("SF1C", "TRAP", idCopper,par, 11);
421 gMC->Gsvolu("SG1G", "TRAP", idArCO2, par, 11);
422 gMC->Gsvolu("SG2G", "TRAP", idArCO2, par, 11);
424 par[0] = fgkHzPadPlane;
425 gMC->Gsvolu("SG1C", "TRAP", idCopper,par, 11);
439 gMC->Gsvolu("SH1G", "TRAP", idArCO2, par, 11);
440 gMC->Gsvolu("SH2G", "TRAP", idArCO2, par, 11);
442 par[0] = fgkHzPadPlane;
443 gMC->Gsvolu("SH1C", "TRAP", idCopper,par, 11);
457 gMC->Gsvolu("SI1G", "TRAP", idArCO2, par, 11);
458 gMC->Gsvolu("SI2G", "TRAP", idArCO2, par, 11);
460 par[0] = fgkHzPadPlane;
461 gMC->Gsvolu("SI1C", "TRAP", idCopper,par, 11);
475 gMC->Gsvolu("SJ1G", "TRAP", idArCO2, par, 11);
476 gMC->Gsvolu("SJ2G", "TRAP", idArCO2, par, 11);
478 par[0] = fgkHzPadPlane;
479 gMC->Gsvolu("SJ1C", "TRAP", idCopper,par, 11);
493 gMC->Gsvolu("SK1G", "TRAP", idArCO2, par, 11);
494 gMC->Gsvolu("SK2G", "TRAP", idArCO2, par, 11);
496 par[0] = fgkHzPadPlane;
497 gMC->Gsvolu("SK1C", "TRAP", idCopper,par, 11);
500 //______________________________________________________________________________
501 void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber)
503 // create the quadrant (bending and non-bending planes)
504 // for the given chamber
507 CreateFrame(chamber);
510 SpecialMap specialMap;
511 specialMap[76] = AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.);
512 specialMap[75] = AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36));
513 specialMap[47] = AliMUONSt1SpecialMotif(TVector2(1.01, 0.36));
517 SpecialMap specialMap;
518 specialMap.Add(76, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.));
519 specialMap.Add(75, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36)));
520 specialMap.Add(47, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36)));
523 AliMpSectorReader reader1(kStation1, kBendingPlane);
524 AliMpSector* sector1 = reader1.BuildSector();
526 //Bool_t reflectZ = true;
527 Bool_t reflectZ = false;
528 //TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.);
529 TVector3 where = TVector3(fgkDeltaQuadLHC + fgkPadXOffsetBP,
530 fgkDeltaQuadLHC + fgkPadYOffsetBP, 0.);
531 PlaceSector(sector1, specialMap, where, reflectZ, chamber);
535 specialMap[76] = AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.);
536 specialMap[75] = AliMUONSt1SpecialMotif(TVector2(1.96, 0.17));
537 specialMap[47] = AliMUONSt1SpecialMotif(TVector2(2.18,-0.98));
538 specialMap[20] = AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08));
539 specialMap[46] = AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25));
540 specialMap[74] = AliMUONSt1SpecialMotif(TVector2(0.28, 0.21));
541 // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector
542 // in the true position)
543 // Was: specialMap[47] = AliMUONSt1SpecialMotif(TVector2(1.61,-1.18));
547 Int_t nb = AliMpConstants::ManuMask(kNonBendingPlane);
549 specialMap.Add(76 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.));
550 specialMap.Add(75 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.96, 0.17)));
551 specialMap.Add(47 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(2.18,-0.98)));
552 specialMap.Add(20 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08)));
553 specialMap.Add(46 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25)));
554 specialMap.Add(74 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.28, 0.21)));
555 // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector
556 // in the true position)
557 // Was: specialMap.Add(47,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.61,-1.18)));
560 AliMpSectorReader reader2(kStation1, kNonBendingPlane);
561 AliMpSector* sector2 = reader2.BuildSector();
565 TVector2 offset = sector2->Position();
566 where = TVector3(where.X()+offset.X(), where.Y()+offset.Y(), 0.);
567 // Add the half-pad shift of the non-bending plane wrt bending plane
568 // (The shift is defined in the mapping as sector offset)
569 // Fix (4) - was TVector3(where.X()+0.63/2, ... - now it is -0.63/2
570 PlaceSector(sector2, specialMap, where, reflectZ, chamber);
577 //______________________________________________________________________________
578 void AliMUONSt1GeometryBuilderV2::CreateFoamBox(
580 const TVector2& dimensions)
582 // create all the elements in the copper plane
585 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
586 Int_t idAir = idtmed[1100]; // medium 1
587 //Int_t idFoam = idtmed[1115]; // medium 16 = Foam
588 //Int_t idFR4 = idtmed[1114]; // medium 15 = FR4
589 Int_t idFoam = idtmed[1125]; // medium 26 = Foam
590 Int_t idFR4 = idtmed[1122]; // medium 23 = FR4
594 par[0] = dimensions.X();
595 par[1] = dimensions.Y();
596 par[2] = TotalHzPlane();
597 gMC->Gsvolu(PlaneSegmentName(segNumber).Data(),"BOX",idAir,par,3);
600 par[0] = dimensions.X();
601 par[1] = dimensions.Y();
603 gMC->Gsvolu(FoamBoxName(segNumber).Data(),"BOX",idFoam,par,3);
604 GReal_t posX,posY,posZ;
607 posZ = -TotalHzPlane() + fgkHzFoam;
608 gMC->Gspos(FoamBoxName(segNumber).Data(),1,
609 PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
611 // mechanical plane FR4 layer
612 par[0] = dimensions.X();
613 par[1] = dimensions.Y();
615 gMC->Gsvolu(FR4BoxName(segNumber).Data(),"BOX",idFR4,par,3);
618 posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4;
619 gMC->Gspos(FR4BoxName(segNumber).Data(),1,
620 PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
623 //______________________________________________________________________________
624 void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(Int_t segNumber,
625 const TVector2& dimensions,
628 // Create a segment of a plane (this includes a foam layer,
629 // holes in the foam to feed the kaptons through, kapton connectors
630 // and the mother board.)
633 CreateFoamBox(segNumber,dimensions);
635 for (Int_t holeNum=0;holeNum<nofHoles;holeNum++) {
636 GReal_t posX = ((2.*holeNum+1.)/nofHoles-1.)*dimensions.X();
640 gMC->Gspos(fgkHoleName,holeNum+1,
641 FoamBoxName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
645 //______________________________________________________________________________
646 void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber)
648 // Create the non-sensitive elements of the frame for the <chamber>
651 // Model and notation:
653 // The Quadrant volume name starts with SQ
654 // The volume segments are numbered 00 to XX.
660 // (SQ17-24) / | InVFrame (SQ00-01)
664 // (SQ25-39) | | InArcFrame (SQ42-45)
667 // InHFrame (SQ40-41)
670 // 06 February 2003 - Overlapping volumes resolved.
671 // One quarter chamber is comprised of three TUBS volumes: SQMx, SQNx, and SQFx,
672 // where SQMx is the Quadrant Middle layer for chamber <x> ( posZ in [-3.25,3.25]),
673 // SQNx is the Quadrant Near side layer for chamber <x> ( posZ in [-6.25,3-.25) ), and
674 // SQFx is the Quadrant Far side layer for chamber <x> ( posZ in (3.25,6.25] ).
677 const Float_t kNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin
680 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
682 Int_t idAir = idtmed[1100]; // medium 1
683 //Int_t idFrameEpoxy = idtmed[1115]; // medium 16 = Frame Epoxy ME730
684 //Int_t idInox = idtmed[1116]; // medium 17 Stainless Steel (18%Cr,9%Ni,Fe)
685 //Int_t idFR4 = idtmed[1110]; // medium 11 FR4
686 //Int_t idCopper = idtmed[1109]; // medium 10 Copper
687 //Int_t idAlu = idtmed[1103]; // medium 4 Aluminium
688 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
689 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
690 Int_t idFR4 = idtmed[1122]; // medium 23 FR4 // was 15 not 11
691 Int_t idCopper = idtmed[1121]; // medium 22 Copper
692 Int_t idAlu = idtmed[1120]; // medium 21 Aluminium
696 Int_t rot1, rot2, rot3;
699 fMUON->AliMatrix(rot1, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane
700 fMUON->AliMatrix(rot2, 90., 45., 90., 135., 0., 0.); // +45 deg in x-y plane
701 fMUON->AliMatrix(rot3, 90., 45., 90., 315.,180., 0.); // +45 deg in x-y + rotation 180° around y
703 // Translation matrices ... NOT USED
704 // fMUON->AliMatrix(trans1, 90., 0., 90., 90., 0., 0.); // X-> X; Y -> Y; Z -> Z
705 // fMUON->AliMatrix(trans2, 90., 180., 90., 90., 180., 0.); // X->-X; Y -> Y; Z ->-Z
706 // fMUON->AliMatrix(trans3, 90., 180., 90., 270., 0., 0.); // X->-X; Y ->-Y; Z -> Z
707 // fMUON->AliMatrix(trans4, 90., 0., 90., 270., 180., 0.); // X-> X; Y ->-Y; Z ->-Z
709 // ___________________Volume thicknesses________________________
711 const Float_t kHzFrameThickness = 1.59/2.; //equivalent thickness
712 const Float_t kHzOuterFrameEpoxy = 1.19/2.; //equivalent thickness
713 const Float_t kHzOuterFrameInox = 0.1/2.; //equivalent thickness
714 const Float_t kHzFoam = 2.083/2.; //evaluated elsewhere
715 // CHECK with fgkHzFoam
717 // Pertaining to the top outer area
718 const Float_t kHzTopAnodeSteel1 = 0.185/2.; //equivalent thickness
719 const Float_t kHzTopAnodeSteel2 = 0.51/2.; //equivalent thickness
720 const Float_t kHzAnodeFR4 = 0.08/2.; //equivalent thickness
721 const Float_t kHzTopEarthFaceCu = 0.364/2.; //equivalent thickness
722 const Float_t kHzTopEarthProfileCu = 1.1/2.; //equivalent thickness
723 const Float_t kHzTopPositionerSteel = 1.45/2.; //should really be 2.125/2.;
724 const Float_t kHzTopGasSupportAl = 0.85/2.; //equivalent thickness
726 // Pertaining to the vertical outer area
727 const Float_t kHzVerticalCradleAl = 0.8/2.; //equivalent thickness
728 const Float_t kHzLateralSightAl = 0.975/2.; //equivalent thickness
729 const Float_t kHzLateralPosnInoxFace = 2.125/2.;//equivalent thickness
730 const Float_t kHzLatPosInoxProfM = 6.4/2.; //equivalent thickness
731 const Float_t kHzLatPosInoxProfNF = 1.45/2.; //equivalent thickness
732 const Float_t kHzLateralPosnAl = 0.5/2.; //equivalent thickness
733 const Float_t kHzVertEarthFaceCu = 0.367/2.; //equivalent thickness
734 const Float_t kHzVertBarSteel = 0.198/2.; //equivalent thickness
735 const Float_t kHzVertEarthProfCu = 1.1/2.; //equivalent thickness
737 //_______________Parameter definitions in sequence _________
739 // InVFrame parameters
740 const Float_t kHxInVFrame = 1.85/2.;
741 const Float_t kHyInVFrame = 73.95/2.;
742 const Float_t kHzInVFrame = kHzFrameThickness;
744 //Flat 7.5mm vertical section
745 const Float_t kHxV1mm = 0.75/2.;
746 const Float_t kHyV1mm = 1.85/2.;
747 const Float_t kHzV1mm = kHzFrameThickness;
749 // OuterTopFrame Structure
752 // The frame is composed of a cuboid and two trapezoids
753 // (TopFrameAnode, TopFrameAnodeA, TopFrameAnodeB).
754 // Each shape is composed of two layers (Epoxy and Inox) and
755 // takes the frame's inner anode circuitry into account in the material budget.
758 // The overhanging anode part is composed froma cuboid and two trapezoids
759 // (TopAnode, TopAnode1, and TopAnode2). These surfaces neglect implanted
760 // resistors, but accounts for the major Cu, Pb/Sn, and FR4 material
762 // The stainless steel anode supports have been included.
764 // EARTHING (TopEarthFace, TopEarthProfile)
765 // Al GAS SUPPORT (TopGasSupport)
767 // ALIGNMENT (TopPositioner) - Alignment system, three sights per quarter
768 // chamber. This sight is forseen for the alignment of the horizontal level
769 // (parallel to the OY axis of LHC). Its position will be evaluated relative
770 // to a system of sights places on the cradles;
774 //TopFrameAnode parameters - cuboid, 2 layers
775 const Float_t kHxTFA = 34.1433/2.;
776 const Float_t kHyTFA = 7.75/2.;
777 const Float_t kHzTFAE = kHzOuterFrameEpoxy; // layer 1 thickness
778 const Float_t kHzTFAI = kHzOuterFrameInox; // layer 3 thickness
780 // TopFrameAnodeA parameters - trapezoid, 2 layers
781 const Float_t kHzFAAE = kHzOuterFrameEpoxy; // layer 1 thickness
782 const Float_t kHzFAAI = kHzOuterFrameInox; // layer 3 thickness
783 const Float_t kTetFAA = 0.;
784 const Float_t kPhiFAA = 0.;
785 const Float_t kH1FAA = 8.7/2.;
786 const Float_t kBl1FAA = 4.35/2.;
787 const Float_t kTl1FAA = 7.75/2.;
788 const Float_t kAlp1FAA = 11.06;
789 const Float_t kH2FAA = 8.7/2.;
790 const Float_t kBl2FAA = 4.35/2.;
791 const Float_t kTl2FAA = 7.75/2.;
792 const Float_t kAlp2FAA = 11.06;
794 // TopFrameAnodeB parameters - trapezoid, 2 layers
795 const Float_t kHzFABE = kHzOuterFrameEpoxy; // layer 1 thickness
796 const Float_t kHzFABI = kHzOuterFrameInox; // layer 3 thickness
797 const Float_t kTetFAB = 0.;
798 const Float_t kPhiFAB = 0.;
799 const Float_t kH1FAB = 8.70/2.;
800 const Float_t kBl1FAB = 0.;
801 const Float_t kTl1FAB = 4.35/2.;
802 const Float_t kAlp1FAB = 14.03;
803 const Float_t kH2FAB = 8.70/2.;
804 const Float_t kBl2FAB = 0.;
805 const Float_t kTl2FAB = 4.35/2.;
806 const Float_t kAlp2FAB = 14.03;
808 // TopAnode parameters - cuboid (part 1 of 3 parts)
809 const Float_t kHxTA1 = 16.2/2.;
810 const Float_t kHyTA1 = 3.5/2.;
811 const Float_t kHzTA11 = kHzTopAnodeSteel1; // layer 1
812 const Float_t kHzTA12 = kHzAnodeFR4; // layer 2
814 // TopAnode parameters - trapezoid 1 (part 2 of 3 parts)
815 const Float_t kHzTA21 = kHzTopAnodeSteel2; // layer 1
816 const Float_t kHzTA22 = kHzAnodeFR4; // layer 2
817 const Float_t kTetTA2 = 0.;
818 const Float_t kPhiTA2= 0.;
819 const Float_t kH1TA2 = 7.268/2.;
820 const Float_t kBl1TA2 = 2.03/2.;
821 const Float_t kTl1TA2 = 3.5/2.;
822 const Float_t kAlp1TA2 = 5.78;
823 const Float_t kH2TA2 = 7.268/2.;
824 const Float_t kBl2TA2 = 2.03/2.;
825 const Float_t kTl2TA2 = 3.5/2.;
826 const Float_t kAlp2TA2 = 5.78;
828 // TopAnode parameters - trapezoid 2 (part 3 of 3 parts)
829 const Float_t kHzTA3 = kHzAnodeFR4; // layer 1
830 const Float_t kTetTA3 = 0.;
831 const Float_t kPhiTA3 = 0.;
832 const Float_t kH1TA3 = 7.268/2.;
833 const Float_t kBl1TA3 = 0.;
834 const Float_t kTl1TA3 = 2.03/2.;
835 const Float_t kAlp1TA3 = 7.95;
836 const Float_t kH2TA3 = 7.268/2.;
837 const Float_t kBl2TA3 = 0.;
838 const Float_t kTl2TA3 = 2.03/2.;
839 const Float_t kAlp2TA3 = 7.95;
841 // TopEarthFace parameters - single trapezoid
842 const Float_t kHzTEF = kHzTopEarthFaceCu;
843 const Float_t kTetTEF = 0.;
844 const Float_t kPhiTEF = 0.;
845 const Float_t kH1TEF = 1.200/2.;
846 const Float_t kBl1TEF = 21.323/2.;
847 const Float_t kTl1TEF = 17.963/2.;
848 const Float_t kAlp1TEF = -54.46;
849 const Float_t kH2TEF = 1.200/2.;
850 const Float_t kBl2TEF = 21.323/2.;
851 const Float_t kTl2TEF = 17.963/2.;
852 const Float_t kAlp2TEF = -54.46;
854 // TopEarthProfile parameters - single trapezoid
855 const Float_t kHzTEP = kHzTopEarthProfileCu;
856 const Float_t kTetTEP = 0.;
857 const Float_t kPhiTEP = 0.;
858 const Float_t kH1TEP = 0.40/2.;
859 const Float_t kBl1TEP = 31.766/2.;
860 const Float_t kTl1TEP = 30.535/2.;
861 const Float_t kAlp1TEP = -56.98;
862 const Float_t kH2TEP = 0.40/2.;
863 const Float_t kBl2TEP = 31.766/2.;
864 const Float_t kTl2TEP = 30.535/2.;
865 const Float_t kAlp2TEP = -56.98;
867 // TopPositioner parameters - single Stainless Steel trapezoid
868 const Float_t kHzTP = kHzTopPositionerSteel;
869 const Float_t kTetTP = 0.;
870 const Float_t kPhiTP = 0.;
871 const Float_t kH1TP = 3.00/2.;
872 const Float_t kBl1TP = 7.023/2.;
873 const Float_t kTl1TP = 7.314/2.;
874 const Float_t kAlp1TP = 2.78;
875 const Float_t kH2TP = 3.00/2.;
876 const Float_t kBl2TP = 7.023/2.;
877 const Float_t kTl2TP = 7.314/2.;
878 const Float_t kAlp2TP = 2.78;
880 // TopGasSupport parameters - single cuboid
881 const Float_t kHxTGS = 8.50/2.;
882 const Float_t kHyTGS = 3.00/2.;
883 const Float_t kHzTGS = kHzTopGasSupportAl;
885 // OutEdgeFrame parameters - 4 trapezoidal sections, 2 layers of material
890 const Float_t kHzOETFE = kHzOuterFrameEpoxy; // layer 1
891 const Float_t kHzOETFI = kHzOuterFrameInox; // layer 3
893 const Float_t kTetOETF = 0.; // common to all 4 trapezoids
894 const Float_t kPhiOETF = 0.; // common to all 4 trapezoids
896 const Float_t kH1OETF = 7.196/2.; // common to all 4 trapezoids
897 const Float_t kH2OETF = 7.196/2.; // common to all 4 trapezoids
899 const Float_t kBl1OETF1 = 3.75/2;
900 const Float_t kTl1OETF1 = 3.996/2.;
901 const Float_t kAlp1OETF1 = 0.98;
903 const Float_t kBl2OETF1 = 3.75/2;
904 const Float_t kTl2OETF1 = 3.996/2.;
905 const Float_t kAlp2OETF1 = 0.98;
908 const Float_t kBl1OETF2 = 3.01/2.;
909 const Float_t kTl1OETF2 = 3.75/2;
910 const Float_t kAlp1OETF2 = 2.94;
912 const Float_t kBl2OETF2 = 3.01/2.;
913 const Float_t kTl2OETF2 = 3.75/2;
914 const Float_t kAlp2OETF2 = 2.94;
917 //const Float_t kBl1OETF3 = 1.767/2.;
918 //const Float_t kTl1OETF3 = 3.01/2.;
919 const Float_t kBl1OETF3 = 1.117/2.;
920 const Float_t kTl1OETF3 = 2.36/2.;
921 const Float_t kAlp1OETF3 = 4.94;
922 // Fix (5) - overlap of SQ21 with 041M and 125M
924 //const Float_t kBl2OETF3 = 1.767/2.;
925 //const Float_t kTl2OETF3 = 3.01/2.;
926 const Float_t kBl2OETF3 = 1.117/2.;
927 const Float_t kTl2OETF3 = 2.36/2.;
928 const Float_t kAlp2OETF3 = 4.94;
929 // Fix (5) - overlap of SQ21 with 041M and 125M
932 const Float_t kBl1OETF4 = 0.;
933 const Float_t kTl1OETF4 = 1.77/2.;
934 const Float_t kAlp1OETF4 = 7.01;
936 const Float_t kBl2OETF4 = 0.;
937 const Float_t kTl2OETF4 = 1.77/2.;
938 const Float_t kAlp2OETF4 = 7.01;
940 // Frame Structure (OutVFrame):
942 // OutVFrame and corner (OutVFrame cuboid, OutVFrame trapezoid)
943 // EARTHING (VertEarthFaceCu,VertEarthSteel,VertEarthProfCu),
944 // DETECTOR POSITIONNING (SuppLateralPositionner, LateralPositionner),
945 // CRADLE (VertCradle), and
946 // ALIGNMENT (LateralSightSupport, LateralSight)
950 // OutVFrame parameters - cuboid
951 const Float_t kHxOutVFrame = 1.85/2.;
952 const Float_t kHyOutVFrame = 46.23/2.;
953 const Float_t kHzOutVFrame = kHzFrameThickness;
955 // OutVFrame corner parameters - trapezoid
956 const Float_t kHzOCTF = kHzFrameThickness;
957 const Float_t kTetOCTF = 0.;
958 const Float_t kPhiOCTF = 0.;
959 const Float_t kH1OCTF = 1.85/2.;
960 const Float_t kBl1OCTF = 0.;
961 const Float_t kTl1OCTF = 3.66/2.;
962 const Float_t kAlp1OCTF = 44.67;
963 const Float_t kH2OCTF = 1.85/2.;
964 const Float_t kBl2OCTF = 0.;
965 const Float_t kTl2OCTF = 3.66/2.;
966 const Float_t kAlp2OCTF = 44.67;
968 // VertEarthFaceCu parameters - single trapezoid
969 const Float_t kHzVFC = kHzVertEarthFaceCu;
970 const Float_t kTetVFC = 0.;
971 const Float_t kPhiVFC = 0.;
972 const Float_t kH1VFC = 1.200/2.;
973 const Float_t kBl1VFC = 46.11/2.;
974 const Float_t kTl1VFC = 48.236/2.;
975 const Float_t kAlp1VFC = 41.54;
976 const Float_t kH2VFC = 1.200/2.;
977 const Float_t kBl2VFC = 46.11/2.;
978 const Float_t kTl2VFC = 48.236/2.;
979 const Float_t kAlp2VFC = 41.54;
981 // VertEarthSteel parameters - single trapezoid
982 const Float_t kHzVES = kHzVertBarSteel;
983 const Float_t kTetVES = 0.;
984 const Float_t kPhiVES = 0.;
985 const Float_t kH1VES = 1.200/2.;
986 const Float_t kBl1VES = 30.486/2.;
987 const Float_t kTl1VES = 32.777/2.;
988 const Float_t kAlp1VES = 43.67;
989 const Float_t kH2VES = 1.200/2.;
990 const Float_t kBl2VES = 30.486/2.;
991 const Float_t kTl2VES = 32.777/2.;
992 const Float_t kAlp2VES = 43.67;
994 // VertEarthProfCu parameters - single trapezoid
995 const Float_t kHzVPC = kHzVertEarthProfCu;
996 const Float_t kTetVPC = 0.;
997 const Float_t kPhiVPC = 0.;
998 const Float_t kH1VPC = 0.400/2.;
999 const Float_t kBl1VPC = 29.287/2.;
1000 const Float_t kTl1VPC = 30.091/2.;
1001 const Float_t kAlp1VPC = 45.14;
1002 const Float_t kH2VPC = 0.400/2.;
1003 const Float_t kBl2VPC = 29.287/2.;
1004 const Float_t kTl2VPC = 30.091/2.;
1005 const Float_t kAlp2VPC = 45.14;
1007 // SuppLateralPositionner - single cuboid
1008 const Float_t kHxSLP = 2.80/2.;
1009 const Float_t kHySLP = 5.00/2.;
1010 const Float_t kHzSLP = kHzLateralPosnAl;
1012 // LateralPositionner - squared off U bend, face view
1013 const Float_t kHxLPF = 5.2/2.;
1014 const Float_t kHyLPF = 3.0/2.;
1015 const Float_t kHzLPF = kHzLateralPosnInoxFace;
1017 // LateralPositionner - squared off U bend, profile view
1018 const Float_t kHxLPP = 0.425/2.;
1019 const Float_t kHyLPP = 3.0/2.;
1020 const Float_t kHzLPP = kHzLatPosInoxProfM; // middle layer
1021 const Float_t kHzLPNF = kHzLatPosInoxProfNF; // near and far layers
1023 // VertCradle, 3 layers (copies), each composed of 4 trapezoids
1025 const Float_t kHzVC1 = kHzVerticalCradleAl;
1026 const Float_t kTetVC1 = 0.;
1027 const Float_t kPhiVC1 = 0.;
1028 const Float_t kH1VC1 = 10.25/2.;
1029 const Float_t kBl1VC1 = 3.70/2.;
1030 const Float_t kTl1VC1 = 0.;
1031 const Float_t kAlp1VC1 = -10.23;
1032 const Float_t kH2VC1 = 10.25/2.;
1033 const Float_t kBl2VC1 = 3.70/2.;
1034 const Float_t kTl2VC1 = 0.;
1035 const Float_t kAlp2VC1 = -10.23;
1038 const Float_t kHzVC2 = kHzVerticalCradleAl;
1039 const Float_t kTetVC2 = 0.;
1040 const Float_t kPhiVC2 = 0.;
1041 const Float_t kH1VC2 = 10.25/2.;
1042 const Float_t kBl1VC2 = 6.266/2.;
1043 const Float_t kTl1VC2 = 3.70/2.;
1044 const Float_t kAlp1VC2 = -7.13;
1045 const Float_t kH2VC2 = 10.25/2.;
1046 const Float_t kBl2VC2 = 6.266/2.;
1047 const Float_t kTl2VC2 = 3.70/2.;
1048 const Float_t kAlp2VC2 = -7.13;
1051 const Float_t kHzVC3 = kHzVerticalCradleAl;
1052 const Float_t kTetVC3 = 0.;
1053 const Float_t kPhiVC3 = 0.;
1054 const Float_t kH1VC3 = 10.25/2.;
1055 const Float_t kBl1VC3 = 7.75/2.;
1056 const Float_t kTl1VC3 = 6.266/2.;
1057 const Float_t kAlp1VC3 = -4.14;
1058 const Float_t kH2VC3 = 10.25/2.;
1059 const Float_t kBl2VC3 = 7.75/2.;
1060 const Float_t kTl2VC3 = 6.266/2.;
1061 const Float_t kAlp2VC3 = -4.14;
1064 const Float_t kHzVC4 = kHzVerticalCradleAl;
1065 const Float_t kTetVC4 = 0.;
1066 const Float_t kPhiVC4 = 0.;
1067 const Float_t kH1VC4 = 10.27/2.;
1068 const Float_t kBl1VC4 = 8.273/2.;
1069 const Float_t kTl1VC4 = 7.75/2.;
1070 const Float_t kAlp1VC4 = -1.46;
1071 const Float_t kH2VC4 = 10.27/2.;
1072 const Float_t kBl2VC4 = 8.273/2.;
1073 const Float_t kTl2VC4 = 7.75/2.;
1074 const Float_t kAlp2VC4 = -1.46;
1076 // LateralSightSupport - single trapezoid
1077 const Float_t kHzVSS = kHzLateralSightAl;
1078 const Float_t kTetVSS = 0.;
1079 const Float_t kPhiVSS = 0.;
1080 const Float_t kH1VSS = 5.00/2.;
1081 const Float_t kBl1VSS = 7.747/2;
1082 const Float_t kTl1VSS = 7.188/2.;
1083 const Float_t kAlp1VSS = -3.20;
1084 const Float_t kH2VSS = 5.00/2.;
1085 const Float_t kBl2VSS = 7.747/2.;
1086 const Float_t kTl2VSS = 7.188/2.;
1087 const Float_t kAlp2VSS = -3.20;
1089 // LateralSight (reference point) - 3 per quadrant, only 1 programmed for now
1090 const Float_t kVSInRad = 0.6;
1091 const Float_t kVSOutRad = 1.3;
1092 const Float_t kVSLen = kHzFrameThickness;
1096 // InHFrame parameters
1097 const Float_t kHxInHFrame = 75.8/2.;
1098 const Float_t kHyInHFrame = 1.85/2.;
1099 const Float_t kHzInHFrame = kHzFrameThickness;
1101 //Flat 7.5mm horizontal section
1102 const Float_t kHxH1mm = 1.85/2.;
1103 const Float_t kHyH1mm = 0.75/2.;
1104 const Float_t kHzH1mm = kHzFrameThickness;
1108 // InArcFrame parameters
1109 const Float_t kIAF = 15.70;
1110 const Float_t kOAF = 17.55;
1111 const Float_t kHzAF = kHzFrameThickness;
1112 const Float_t kAFphi1 = 0.0;
1113 const Float_t kAFphi2 = 90.0;
1117 // ScrewsInFrame parameters HEAD
1118 const Float_t kSCRUHMI = 0.;
1119 const Float_t kSCRUHMA = 0.690/2.;
1120 const Float_t kSCRUHLE = 0.4/2.;
1121 // ScrewsInFrame parameters MIDDLE
1122 const Float_t kSCRUMMI = 0.;
1123 const Float_t kSCRUMMA = 0.39/2.;
1124 const Float_t kSCRUMLE = kHzFrameThickness;
1125 // ScrewsInFrame parameters NUT
1126 const Float_t kSCRUNMI = 0.;
1127 const Float_t kSCRUNMA = 0.78/2.;
1128 const Float_t kSCRUNLE = 0.8/2.;
1130 // ___________________Make volumes________________________
1133 Float_t posX,posY,posZ;
1135 // Quadrant volume TUBS1, positioned at the end
1136 par[0] = fgkMotherIR1;
1137 par[1] = fgkMotherOR1;
1138 par[2] = fgkMotherThick1;
1139 par[3] = fgkMotherPhiL1;
1140 par[4] = fgkMotherPhiU1;
1141 gMC->Gsvolu(QuadrantMLayerName(chamber),"TUBS",idAir,par,5);
1143 // Replace the volume shape with a composite shape
1144 // with substracted overlap with beam shield (YMOT)
1146 if ( gMC->IsRootGeometrySupported() &&
1147 TString(gMC->ClassName()) != "TGeant4") {
1151 = gGeoManager->FindVolumeFast(QuadrantMLayerName(chamber));
1154 << "Quadrant volume " << QuadrantMLayerName(chamber) << " not found"
1158 TGeoShape* quadrant = mlayer->GetShape();
1159 quadrant->SetName("quadrant");
1161 // Beam shield recess
1164 par[2] = fgkMotherThick1;
1165 new TGeoTube("shield_tube", par[0], par[1], par[2]);
1171 TGeoTranslation* displacement
1172 = new TGeoTranslation("TR", posX, posY, posZ);
1173 displacement->RegisterYourself();
1176 TGeoShape* composite
1177 = new TGeoCompositeShape("composite", "quadrant-shield_tube:TR");
1179 // Reset shape to volume
1180 mlayer->SetShape(composite);
1184 // Quadrant volume TUBS2, positioned at the end
1185 par[0] = fgkMotherIR2;
1186 par[1] = fgkMotherOR2;
1187 par[2] = fgkMotherThick2;
1188 par[3] = fgkMotherPhiL2;
1189 par[4] = fgkMotherPhiU2;
1191 gMC->Gsvolu(QuadrantNLayerName(chamber),"TUBS",idAir,par,5);
1192 gMC->Gsvolu(QuadrantFLayerName(chamber),"TUBS",idAir,par,5);
1196 par[0] = kHxInVFrame;
1197 par[1] = kHyInVFrame;
1198 par[2] = kHzInVFrame;
1199 gMC->Gsvolu("SQ00","BOX",idFrameEpoxy,par,3);
1201 //Flat 1mm vertical section
1205 gMC->Gsvolu("SQ01","BOX",idFrameEpoxy,par,3);
1209 // - 3 components (a cuboid and 2 trapezes) and 2 layers (Epoxy/Inox)
1213 // TopFrameAnode - layer 1 of 2
1217 gMC->Gsvolu("SQ02","BOX",idFrameEpoxy,par,3);
1219 // TopFrameAnode - layer 2 of 2
1221 gMC->Gsvolu("SQ03","BOX",idInox,par,3);
1223 // TopFrameAnodeA - layer 1 of 2
1235 gMC->Gsvolu("SQ04","TRAP",idFrameEpoxy,par,11);
1237 // TopFrameAnodeA - layer 2 of 2
1239 gMC->Gsvolu("SQ05","TRAP",idInox,par,11);
1241 // TopFrameAnodeB - layer 1 of 2
1253 gMC->Gsvolu("SQ06","TRAP",idFrameEpoxy,par,11);
1255 // OutTopTrapFrameB - layer 2 of 2
1257 gMC->Gsvolu("SQ07","TRAP",idInox,par,11);
1259 // TopAnode1 - layer 1 of 2
1263 gMC->Gsvolu("SQ08","BOX",idInox,par,3);
1265 // TopAnode1 - layer 2 of 2
1267 gMC->Gsvolu("SQ09","BOX",idFR4,par,11);
1269 // TopAnode2 - layer 1 of 2
1281 gMC->Gsvolu("SQ10","TRAP",idInox,par,11);
1283 // TopAnode2 - layer 2 of 2
1285 gMC->Gsvolu("SQ11","TRAP",idFR4,par,11);
1287 // TopAnode3 - layer 1 of 1
1299 gMC->Gsvolu("SQ12","TRAP",idFR4,par,11);
1313 gMC->Gsvolu("SQ13","TRAP",idCopper,par,11);
1327 gMC->Gsvolu("SQ14","TRAP",idCopper,par,11);
1333 gMC->Gsvolu("SQ15","BOX",idAlu,par,3);
1335 // TopPositioner parameters - single Stainless Steel trapezoid
1347 gMC->Gsvolu("SQ16","TRAP",idInox,par,11);
1350 // OutEdgeTrapFrame Epoxy = (4 trapezes)*2 copies*2 layers (Epoxy/Inox)
1353 // Trapezoid 1 - 2 layers
1359 par[6] = kAlp1OETF1;
1363 par[10] = kAlp2OETF1;
1366 gMC->Gsvolu("SQ17","TRAP",idFrameEpoxy,par,11);
1368 gMC->Gsvolu("SQ18","TRAP",idInox,par,11);
1370 // Trapezoid 2 - 2 layers
1373 par[6] = kAlp1OETF2;
1377 par[10] = kAlp2OETF2;
1380 gMC->Gsvolu("SQ19","TRAP",idFrameEpoxy,par,11);
1382 gMC->Gsvolu("SQ20","TRAP",idInox,par,11);
1384 // Trapezoid 3 - 2 layers
1387 par[6] = kAlp1OETF3;
1391 par[10] = kAlp2OETF3;
1394 gMC->Gsvolu("SQ21","TRAP",idFrameEpoxy,par,11);
1396 gMC->Gsvolu("SQ22","TRAP",idInox,par,11);
1398 // Trapezoid 4 - 2 layers
1402 par[6] = kAlp1OETF4;
1406 par[10] = kAlp2OETF4;
1409 gMC->Gsvolu("SQ23","TRAP",idFrameEpoxy,par,11);
1411 gMC->Gsvolu("SQ24","TRAP",idInox,par,11);
1415 par[0] = kHxOutVFrame;
1416 par[1] = kHyOutVFrame;
1417 par[2] = kHzOutVFrame;
1418 gMC->Gsvolu("SQ25","BOX",idFrameEpoxy,par,3);
1431 par[10] = kAlp2OCTF;
1432 gMC->Gsvolu("SQ26","TRAP",idFrameEpoxy,par,11);
1434 // EarthFaceCu trapezoid
1446 gMC->Gsvolu("SQ27","TRAP",idCopper,par,11);
1448 // VertEarthSteel trapezoid
1460 gMC->Gsvolu("SQ28","TRAP",idInox,par,11);
1462 // VertEarthProfCu trapezoid
1474 gMC->Gsvolu("SQ29","TRAP",idCopper,par,11);
1476 // SuppLateralPositionner cuboid
1480 gMC->Gsvolu("SQ30","BOX",idAlu,par,3);
1482 // LateralPositionerFace
1486 gMC->Gsvolu("SQ31","BOX",idInox,par,3);
1488 // LateralPositionerProfile
1492 gMC->Gsvolu("SQ32","BOX",idInox,par,3); // middle layer
1497 gMC->Gsvolu("SQ33","BOX",idInox,par,3); // near and far layers
1499 // VertCradleA - 1st trapezoid
1511 gMC->Gsvolu("SQ34","TRAP",idAlu,par,11);
1513 // VertCradleB - 2nd trapezoid
1525 gMC->Gsvolu("SQ35","TRAP",idAlu,par,11);
1527 // VertCradleC - 3rd trapezoid
1539 gMC->Gsvolu("SQ36","TRAP",idAlu,par,11);
1541 // VertCradleD - 4th trapezoid
1553 gMC->Gsvolu("SQ37","TRAP",idAlu,par,11);
1555 // LateralSightSupport trapezoid
1567 gMC->Gsvolu("SQ38","TRAP",idAlu,par,11);
1573 gMC->Gsvolu("SQ39","TUBE",idFrameEpoxy,par,3);
1577 par[0] = kHxInHFrame;
1578 par[1] = kHyInHFrame;
1579 par[2] = kHzInHFrame;
1580 gMC->Gsvolu("SQ40","BOX",idFrameEpoxy,par,3);
1582 //Flat 7.5mm horizontal section
1586 gMC->Gsvolu("SQ41","BOX",idFrameEpoxy,par,3);
1595 gMC->Gsvolu("SQ42","TUBS",idFrameEpoxy,par,5);
1598 // ScrewsInFrame - 3 sections in order to avoid overlapping volumes
1599 // Screw Head, in air
1604 gMC->Gsvolu("SQ43","TUBE",idInox,par,3);
1606 // Middle part, in the Epoxy
1610 gMC->Gsvolu("SQ44","TUBE",idInox,par,3);
1612 // Screw nut, in air
1616 gMC->Gsvolu("SQ45","TUBE",idInox,par,3);
1619 // __________________Place volumes in the quadrant ____________
1623 posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyInVFrame;
1625 gMC->Gspos("SQ00",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1627 // keep memory of the mid position. Used for placing screws
1628 const GReal_t kMidVposX = posX;
1629 const GReal_t kMidVposY = posY;
1630 const GReal_t kMidVposZ = posZ;
1632 //Flat 7.5mm vertical section
1633 posX = 2.0*kHxInVFrame+kHxV1mm;
1634 posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyV1mm;
1636 gMC->Gspos("SQ01",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
1638 // TopFrameAnode place 2 layers of TopFrameAnode cuboids
1640 posY = 2.*kHyInHFrame+2.*kHyH1mm+kIAF+2.*kHyInVFrame+kHyTFA;
1641 posZ = kHzOuterFrameInox;
1642 gMC->Gspos("SQ02",1,QuadrantMLayerName(chamber),posX, posY, posZ,0,"ONLY");
1643 posZ = posZ+kHzOuterFrameInox;
1644 gMC->Gspos("SQ03",1,QuadrantMLayerName(chamber),posX, posY, posZ,0,"ONLY");
1646 // place 2 layers of TopFrameAnodeA trapezoids
1647 posX = 35.8932+fgkDeltaQuadLHC;
1648 posY = 92.6745+fgkDeltaQuadLHC;
1649 posZ = kHzOuterFrameInox;
1650 gMC->Gspos("SQ04",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1651 posZ = posZ+kHzOuterFrameInox;
1652 gMC->Gspos("SQ05",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1654 // place 2 layers of TopFrameAnodeB trapezoids
1655 posX = 44.593+fgkDeltaQuadLHC;
1656 posY = 90.737+fgkDeltaQuadLHC;
1657 posZ = kHzOuterFrameInox;
1658 gMC->Gspos("SQ06",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1659 posZ = posZ+kHzOuterFrameInox;
1660 gMC->Gspos("SQ07",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1662 // TopAnode1 place 2 layers
1663 posX = 6.8+fgkDeltaQuadLHC;
1664 posY = 99.85+fgkDeltaQuadLHC;
1665 posZ = -1.*kHzAnodeFR4;
1666 gMC->Gspos("SQ08",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1667 posZ = posZ+kHzTopAnodeSteel1;
1668 gMC->Gspos("SQ09",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1670 // TopAnode2 place 2 layers
1671 posX = 18.534+fgkDeltaQuadLHC;
1672 posY = 99.482+fgkDeltaQuadLHC;
1673 posZ = -1.*kHzAnodeFR4;
1674 gMC->Gspos("SQ10",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1675 posZ = posZ+kHzTopAnodeSteel2;
1676 gMC->Gspos("SQ11",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1678 // TopAnode3 place 1 layer
1679 posX = 25.80+fgkDeltaQuadLHC;
1680 posY = 98.61+fgkDeltaQuadLHC;
1682 gMC->Gspos("SQ12",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1684 // TopEarthFace - 2 copies
1685 posX = 23.122+fgkDeltaQuadLHC;
1686 posY = 96.90+fgkDeltaQuadLHC;
1687 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopEarthFaceCu;
1688 gMC->Gspos("SQ13",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1690 gMC->Gspos("SQ13",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1693 posX = 14.475+fgkDeltaQuadLHC;
1694 posY = 97.900+fgkDeltaQuadLHC;
1695 posZ = kHzTopEarthProfileCu;
1696 gMC->Gspos("SQ14",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1698 gMC->Gspos("SQ14",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1700 // TopGasSupport - 2 copies
1701 posX = 4.9500+fgkDeltaQuadLHC;
1702 posY = 96.200+fgkDeltaQuadLHC;
1703 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopGasSupportAl;
1704 gMC->Gspos("SQ15",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1706 gMC->Gspos("SQ15",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1708 // TopPositioner parameters - single Stainless Steel trapezoid - 2 copies
1709 posX = 7.60+fgkDeltaQuadLHC;
1710 posY = 98.98+fgkDeltaQuadLHC;
1711 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+2.*kHzTopGasSupportAl+kHzTopPositionerSteel;
1712 gMC->Gspos("SQ16",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1714 gMC->Gspos("SQ16",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1720 xCenter[0] = 73.201 + fgkDeltaQuadLHC;
1721 xCenter[1] = 78.124 + fgkDeltaQuadLHC;
1722 //xCenter[2] = 82.862 + fgkDeltaQuadLHC;
1723 xCenter[2] = 83.102 + fgkDeltaQuadLHC;
1724 xCenter[3] = 87.418 + fgkDeltaQuadLHC;
1725 // Fix (5) - overlap of SQ21 with 041M and 125M
1727 yCenter[0] = 68.122 + fgkDeltaQuadLHC;
1728 yCenter[1] = 62.860 + fgkDeltaQuadLHC;
1729 //yCenter[2] = 57.420 + fgkDeltaQuadLHC;
1730 yCenter[2] = 57.660 + fgkDeltaQuadLHC;
1731 yCenter[3] = 51.800 + fgkDeltaQuadLHC;
1732 // Fix (5) - overlap of SQ21 with 041M and 125M
1734 xCenter[4] = 68.122 + fgkDeltaQuadLHC;
1735 xCenter[5] = 62.860 + fgkDeltaQuadLHC;
1736 xCenter[6] = 57.420 + fgkDeltaQuadLHC;
1737 xCenter[7] = 51.800 + fgkDeltaQuadLHC;
1739 yCenter[4] = 73.210 + fgkDeltaQuadLHC;
1740 yCenter[5] = 78.124 + fgkDeltaQuadLHC;
1741 yCenter[6] = 82.862 + fgkDeltaQuadLHC;
1742 yCenter[7] = 87.418 + fgkDeltaQuadLHC;
1744 posZ = -1.0*kHzOuterFrameInox;
1745 gMC->Gspos("SQ17",1,QuadrantMLayerName(chamber), xCenter[0], yCenter[0], posZ, rot2,"ONLY");
1746 gMC->Gspos("SQ17",2,QuadrantMLayerName(chamber), xCenter[4], yCenter[4], posZ, rot3,"ONLY");
1748 gMC->Gspos("SQ19",1,QuadrantMLayerName(chamber), xCenter[1], yCenter[1], posZ, rot2,"ONLY");
1749 gMC->Gspos("SQ19",2,QuadrantMLayerName(chamber), xCenter[5], yCenter[5], posZ, rot3,"ONLY");
1751 gMC->Gspos("SQ21",1,QuadrantMLayerName(chamber), xCenter[2], yCenter[2], posZ, rot2,"ONLY");
1752 gMC->Gspos("SQ21",2,QuadrantMLayerName(chamber), xCenter[6], yCenter[6], posZ, rot3,"ONLY");
1754 gMC->Gspos("SQ23",1,QuadrantMLayerName(chamber), xCenter[3], yCenter[3], posZ, rot2,"ONLY");
1755 gMC->Gspos("SQ23",2,QuadrantMLayerName(chamber), xCenter[7], yCenter[7], posZ, rot3,"ONLY");
1757 posZ = posZ+kHzOuterFrameEpoxy;
1759 gMC->Gspos("SQ18",1,QuadrantMLayerName(chamber), xCenter[0], yCenter[0], posZ, rot2,"ONLY");
1760 gMC->Gspos("SQ18",2,QuadrantMLayerName(chamber), xCenter[4], yCenter[4], posZ, rot3,"ONLY");
1762 gMC->Gspos("SQ20",1,QuadrantMLayerName(chamber), xCenter[1], yCenter[1], posZ, rot2,"ONLY");
1763 gMC->Gspos("SQ20",2,QuadrantMLayerName(chamber), xCenter[5], yCenter[5], posZ, rot3,"ONLY");
1765 gMC->Gspos("SQ22",1,QuadrantMLayerName(chamber), xCenter[2], yCenter[2], posZ, rot2,"ONLY");
1766 gMC->Gspos("SQ22",2,QuadrantMLayerName(chamber), xCenter[6], yCenter[6], posZ, rot3,"ONLY");
1768 gMC->Gspos("SQ24",1,QuadrantMLayerName(chamber), xCenter[3], yCenter[3], posZ, rot2,"ONLY");
1769 gMC->Gspos("SQ24",2,QuadrantMLayerName(chamber), xCenter[7], yCenter[7], posZ, rot3,"ONLY");
1774 posX = 2.*kHxInVFrame+kIAF+2.*kHxInHFrame-kHxOutVFrame+2.*kHxV1mm;
1775 posY = 2.*kHyInHFrame+kHyOutVFrame;
1777 gMC->Gspos("SQ25",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1779 // keep memory of the mid position. Used for placing screws
1780 const GReal_t kMidOVposX = posX;
1781 const GReal_t kMidOVposY = posY;
1782 const GReal_t kMidOVposZ = posZ;
1784 const Float_t kTOPY = posY+kHyOutVFrame;
1785 const Float_t kOUTX = posX;
1789 posY = kTOPY+((kBl1OCTF+kTl1OCTF)/2.);
1791 gMC->Gspos("SQ26",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1793 // VertEarthFaceCu - 2 copies
1794 posX = 89.4000+fgkDeltaQuadLHC;
1795 posY = 25.79+fgkDeltaQuadLHC;
1796 posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertEarthFaceCu;
1797 gMC->Gspos("SQ27",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1799 gMC->Gspos("SQ27",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1801 // VertEarthSteel - 2 copies
1802 posX = 91.00+fgkDeltaQuadLHC;
1803 posY = 30.616+fgkDeltaQuadLHC;
1804 posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertBarSteel;
1805 gMC->Gspos("SQ28",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1807 gMC->Gspos("SQ28",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1809 // VertEarthProfCu - 2 copies
1810 posX = 92.000+fgkDeltaQuadLHC;
1811 posY = 29.64+fgkDeltaQuadLHC;
1812 posZ = kHzFrameThickness;
1813 gMC->Gspos("SQ29",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1815 gMC->Gspos("SQ29",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1817 // SuppLateralPositionner - 2 copies
1818 posX = 90.2-kNearFarLHC;
1819 posY = 5.00-kNearFarLHC;
1820 posZ = kHzLateralPosnAl-fgkMotherThick2;
1821 gMC->Gspos("SQ30",1,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1823 gMC->Gspos("SQ30",2,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1825 // LateralPositionner - 2 copies - Face view
1826 posX = 92.175-kNearFarLHC-2.*kHxLPP;
1827 posY = 5.00-kNearFarLHC;
1828 posZ =2.0*kHzLateralPosnAl+kHzLateralPosnInoxFace-fgkMotherThick2;
1829 gMC->Gspos("SQ31",1,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1831 gMC->Gspos("SQ31",2,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1833 // LateralPositionner - Profile view
1834 posX = 92.175+fgkDeltaQuadLHC+kHxLPF-kHxLPP;
1835 posY = 5.00+fgkDeltaQuadLHC;
1837 gMC->Gspos("SQ32",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // middle layer
1839 posX = 92.175-kNearFarLHC+kHxLPF-kHxLPP;
1840 posY = 5.0000-kNearFarLHC;
1841 posZ = fgkMotherThick2-kHzLPNF;
1842 gMC->Gspos("SQ33",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // near layer
1844 gMC->Gspos("SQ33",2,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // far layer
1846 // VertCradleA 1st Trapezoid - 3 copies
1847 posX = 95.73+fgkDeltaQuadLHC;
1848 posY = 33.26+fgkDeltaQuadLHC;
1850 gMC->Gspos("SQ34",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1852 posX = 95.73-kNearFarLHC;
1853 posY = 33.26-kNearFarLHC;
1854 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
1855 gMC->Gspos("SQ34",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1857 gMC->Gspos("SQ34",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1859 // VertCradleB 2nd Trapezoid - 3 copies
1860 posX = 97.29+fgkDeltaQuadLHC;
1861 posY = 23.02+fgkDeltaQuadLHC;
1863 gMC->Gspos("SQ35",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1865 posX = 97.29-kNearFarLHC;
1866 posY = 23.02-kNearFarLHC;
1867 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
1868 gMC->Gspos("SQ35",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1870 gMC->Gspos("SQ35",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1872 // OutVertCradleC 3rd Trapeze - 3 copies
1873 posX = 98.31+fgkDeltaQuadLHC;
1874 posY = 12.77+fgkDeltaQuadLHC;
1876 gMC->Gspos("SQ36",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1878 posX = 98.05-kNearFarLHC;
1879 posY = 12.77-kNearFarLHC;
1880 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
1881 // Fix (2) of extrusion SQ36 from SQN1, SQN2, SQF1, SQF2
1882 // (was posX = 98.31 ...)
1883 gMC->Gspos("SQ36",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1885 gMC->Gspos("SQ36",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1887 // OutVertCradleD 4th Trapeze - 3 copies
1888 posX = 98.81+fgkDeltaQuadLHC;
1889 posY = 2.52+fgkDeltaQuadLHC;
1891 gMC->Gspos("SQ37",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1893 posZ = fgkMotherThick1-kHzVerticalCradleAl;
1894 gMC->Gspos("SQ37",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1896 gMC->Gspos("SQ37",3,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1898 // LateralSightSupport - 2 copies
1899 posX = 98.33-kNearFarLHC;
1900 posY = 10.00-kNearFarLHC;
1901 posZ = kHzLateralSightAl-fgkMotherThick2;
1902 // Fix (3) of extrusion SQ38 from SQN1, SQN2, SQF1, SQF2
1903 // (was posX = 98.53 ...)
1904 gMC->Gspos("SQ38",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1906 gMC->Gspos("SQ38",2,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1909 posX = 92.84+fgkDeltaQuadLHC;
1910 posY = 8.13+fgkDeltaQuadLHC;
1912 gMC->Gspos("SQ39",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1917 posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxInHFrame;
1920 gMC->Gspos("SQ40",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1922 // keep memory of the mid position. Used for placing screws
1923 const GReal_t kMidHposX = posX;
1924 const GReal_t kMidHposY = posY;
1925 const GReal_t kMidHposZ = posZ;
1927 // Flat 7.5mm horizontal section
1928 posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxH1mm;
1929 posY = 2.0*kHyInHFrame+kHyH1mm;
1931 gMC->Gspos("SQ41",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
1934 posX = 2.0*kHxInVFrame+2.*kHxV1mm;
1935 posY = 2.0*kHyInHFrame+2.*kHyH1mm;
1937 gMC->Gspos("SQ42",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
1939 // keep memory of the mid position. Used for placing screws
1940 const GReal_t kMidArcposX = posX;
1941 const GReal_t kMidArcposY = posY;
1942 const GReal_t kMidArcposZ = posZ;
1944 // ScrewsInFrame - in sensitive volume
1949 // Screws on IHEpoxyFrame
1951 const Int_t kNumberOfScrewsIH = 14; // no. of screws on the IHEpoxyFrame
1952 const Float_t kOffX = 5.; // inter-screw distance
1954 // first screw coordinates
1957 // other screw coordinates
1958 for (Int_t i = 1;i<kNumberOfScrewsIH;i++){
1959 scruX[i] = scruX[i-1]+kOffX;
1960 scruY[i] = scruY[0];
1962 // Position the volumes on the frames
1963 for (Int_t i = 0;i<kNumberOfScrewsIH;i++){
1964 posX = fgkDeltaQuadLHC + scruX[i];
1965 posY = fgkDeltaQuadLHC + scruY[i];
1967 gMC->Gspos("SQ43",i+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1969 gMC->Gspos("SQ44",i+1,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
1970 gMC->Gspos("SQ45",i+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1972 // special screw coordinates
1975 posX = fgkDeltaQuadLHC + scruX[63];
1976 posY = fgkDeltaQuadLHC + scruY[63];
1978 gMC->Gspos("SQ43",64,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1980 gMC->Gspos("SQ44",64,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
1981 gMC->Gspos("SQ45",64,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1983 // Screws on the IVEpoxyFrame
1985 const Int_t kNumberOfScrewsIV = 15; // no. of screws on the IVEpoxyFrame
1986 const Float_t kOffY = 5.; // inter-screw distance
1987 Int_t firstScrew = 58;
1988 Int_t lastScrew = 44;
1990 // first (special) screw coordinates
1991 scruX[firstScrew-1] = -2.23;
1992 scruY[firstScrew-1] = 16.3;
1993 // second (repetitive) screw coordinates
1994 scruX[firstScrew-2] = -2.23;
1995 scruY[firstScrew-2] = 21.07;
1996 // other screw coordinates
1997 for (Int_t i = firstScrew-3;i>lastScrew-2;i--){
1998 scruX[i] = scruX[firstScrew-2];
1999 scruY[i] = scruY[i+1]+kOffY;
2002 for (Int_t i = 0;i<kNumberOfScrewsIV;i++){
2003 posX = fgkDeltaQuadLHC + scruX[i+lastScrew-1];
2004 posY = fgkDeltaQuadLHC + scruY[i+lastScrew-1];
2006 gMC->Gspos("SQ43",i+lastScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2008 gMC->Gspos("SQ44",i+lastScrew,"SQ00",posX+0.1-kMidVposX, posY+0.1-kMidVposY, posZ-kMidVposZ, 0, "ONLY");
2009 gMC->Gspos("SQ45",i+lastScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
2012 // Screws on the OVEpoxyFrame
2014 const Int_t kNumberOfScrewsOV = 10; // no. of screws on the OVEpoxyFrame
2019 // first (repetitive) screw coordinates
2020 // notes: 1st screw should be placed in volume 40 (InnerHorizFrame)
2021 scruX[firstScrew-1] = 90.9;
2022 scruY[firstScrew-1] = -2.23; // true value
2024 // other screw coordinates
2025 for (Int_t i = firstScrew; i<lastScrew; i++ ){
2026 scruX[i] = scruX[firstScrew-1];
2027 scruY[i] = scruY[i-1]+kOffY;
2029 for (Int_t i = 1;i<kNumberOfScrewsOV;i++){
2030 posX = fgkDeltaQuadLHC + scruX[i+firstScrew-1];
2031 posY = fgkDeltaQuadLHC + scruY[i+firstScrew-1];
2033 gMC->Gspos("SQ43",i+firstScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2036 gMC->Gspos("SQ44",i+firstScrew,"SQ25",posX+0.1-kMidOVposX, posY+0.1-kMidOVposY, posZ-kMidOVposZ, 0, "ONLY");
2037 gMC->Gspos("SQ45",i+firstScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
2039 // special case for 1st screw, inside the horizontal frame (volume 40)
2040 posX = fgkDeltaQuadLHC + scruX[firstScrew-1];
2041 posY = fgkDeltaQuadLHC + scruY[firstScrew-1];
2044 gMC->Gspos("SQ44",firstScrew,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
2046 // Inner Arc of Frame, screw positions and numbers-1
2047 scruX[62] = 16.009; scruY[62] = 1.401;
2048 scruX[61] = 14.564; scruY[61] = 6.791;
2049 scruX[60] = 11.363; scruY[60] = 11.363;
2050 scruX[59] = 6.791 ; scruY[59] = 14.564;
2051 scruX[58] = 1.401 ; scruY[58] = 16.009;
2053 for (Int_t i = 0;i<5;i++){
2054 posX = fgkDeltaQuadLHC + scruX[i+58];
2055 posY = fgkDeltaQuadLHC + scruY[i+58];
2057 gMC->Gspos("SQ43",i+58+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2059 gMC->Gspos("SQ44",i+58+1,"SQ42",posX+0.1-kMidArcposX, posY+0.1-kMidArcposY, posZ-kMidArcposZ, 0, "ONLY");
2060 gMC->Gspos("SQ45",i+58+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
2064 //______________________________________________________________________________
2065 void AliMUONSt1GeometryBuilderV2::PlaceInnerLayers(Int_t chamber)
2067 // Place the gas and copper layers for the specified chamber.
2070 // Rotation Matrices
2071 Int_t rot1, rot2, rot3, rot4;
2073 fMUON->AliMatrix(rot1, 90., 315., 90., 45., 0., 0.); // -45 deg
2074 fMUON->AliMatrix(rot2, 90., 90., 90., 180., 0., 0.); // 90 deg
2075 fMUON->AliMatrix(rot3, 90., 270., 90., 0., 0., 0.); // -90 deg
2076 fMUON->AliMatrix(rot4, 90., 45., 90., 135., 0., 0.); // deg
2081 GReal_t zc = fgkHzGas + fgkHzPadPlane;
2082 Int_t dpos = (chamber-1)*2;
2085 x = 14.53 + fgkDeltaQuadLHC;
2086 y = 53.34 + fgkDeltaQuadLHC;
2087 name = GasVolumeName("SAG", chamber);
2088 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2089 gMC->Gspos("SA1C", 1+dpos, QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2090 gMC->Gspos("SA1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2092 x = 40.67 + fgkDeltaQuadLHC;
2093 y = 40.66 + fgkDeltaQuadLHC;
2094 name = GasVolumeName("SBG", chamber);
2095 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot1,"ONLY");
2096 gMC->Gspos("SB1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot1,"ONLY");
2097 gMC->Gspos("SB1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,rot1,"ONLY");
2099 x = 53.34 + fgkDeltaQuadLHC;
2100 y = 14.52 + fgkDeltaQuadLHC;
2101 name = GasVolumeName("SCG", chamber);
2102 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot2,"ONLY");
2103 gMC->Gspos("SC1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot2,"ONLY");
2104 gMC->Gspos("SC1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot2,"ONLY");
2106 x = 5.83 + fgkDeltaQuadLHC;
2107 y = 17.29 + fgkDeltaQuadLHC;
2108 name = GasVolumeName("SDG", chamber);
2109 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot3,"ONLY");
2110 gMC->Gspos("SD1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot3,"ONLY");
2111 gMC->Gspos("SD1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot3,"ONLY");
2113 x = 9.04 + fgkDeltaQuadLHC;
2114 y = 16.91 + fgkDeltaQuadLHC;
2115 name = GasVolumeName("SEG", chamber);
2116 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2117 gMC->Gspos("SE1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2118 gMC->Gspos("SE1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2120 x = 10.12 + fgkDeltaQuadLHC;
2121 y = 14.67 + fgkDeltaQuadLHC;
2122 name = GasVolumeName("SFG", chamber);
2123 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2124 gMC->Gspos("SF1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2125 gMC->Gspos("SF1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2127 x = 8.2042 + fgkDeltaQuadLHC;
2128 y = 16.19 + fgkDeltaQuadLHC;
2129 name = GasVolumeName("SGG", chamber);
2130 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2131 gMC->Gspos("SG1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2132 gMC->Gspos("SG1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2134 x = 14.68 + fgkDeltaQuadLHC;
2135 y = 10.10 + fgkDeltaQuadLHC;
2136 name = GasVolumeName("SHG", chamber);
2137 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2138 gMC->Gspos("SH1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2139 gMC->Gspos("SH1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2141 x = 16.21 + fgkDeltaQuadLHC;
2142 y = 8.17 + fgkDeltaQuadLHC;
2143 name = GasVolumeName("SIG", chamber);
2144 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2145 gMC->Gspos("SI1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2146 gMC->Gspos("SI1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2148 x = 16.92 + fgkDeltaQuadLHC;
2149 y = 9.02 + fgkDeltaQuadLHC;
2150 name = GasVolumeName("SJG", chamber);
2151 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot3,"ONLY");
2152 gMC->Gspos("SJ1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot3,"ONLY");
2153 gMC->Gspos("SJ1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot3,"ONLY");
2155 x = 17.30 + fgkDeltaQuadLHC;
2156 y = 5.85 + fgkDeltaQuadLHC;
2157 name = GasVolumeName("SKG", chamber);
2158 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2159 gMC->Gspos("SK1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2160 gMC->Gspos("SK1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2163 //______________________________________________________________________________
2164 void AliMUONSt1GeometryBuilderV2::PlaceSector(AliMpSector* sector,SpecialMap specialMap,
2165 const TVector3& where, Bool_t reflectZ, Int_t chamber)
2167 // Place all the segments in the mother volume, at the position defined
2168 // by the sector's data.
2171 static Int_t segNum=1;
2178 reflZ=0; // no reflection along z... nothing
2179 fMUON->AliMatrix(rotMat, 90.,90.,90,180.,0.,0.); // 90° rotation around z, NO reflection along z
2182 fMUON->AliMatrix(reflZ, 90.,0.,90,90.,180.,0.); // reflection along z
2183 fMUON->AliMatrix(rotMat, 90.,90.,90,180.,180.,0.); // 90° rotation around z AND reflection along z
2186 GReal_t posX,posY,posZ;
2189 vector<Int_t> alreadyDone;
2193 TArrayI alreadyDone(20);
2194 Int_t nofAlreadyDone = 0;
2197 for (Int_t irow=0;irow<sector->GetNofRows();irow++){ // for each row
2198 AliMpRow* row = sector->GetRow(irow);
2201 for (Int_t iseg=0;iseg<row->GetNofRowSegments();iseg++){ // for each row segment
2202 AliMpVRowSegment* seg = row->GetRowSegment(iseg);
2205 SpecialMap::iterator iter
2206 = specialMap.find(seg->GetMotifPositionId(0));
2208 if ( iter == specialMap.end()){ //if this is a normal segment (ie. not part of <specialMap>)
2212 Long_t value = specialMap.GetValue(seg->GetMotifPositionId(0));
2214 if ( value == 0 ){ //if this is a normal segment (ie. not part of <specialMap>)
2217 // create the cathode part
2218 CreatePlaneSegment(segNum, seg->Dimensions(), seg->GetNofMotifs());
2220 posX = where.X() + seg->Position().X();
2221 posY = where.Y() + seg->Position().Y();
2222 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
2223 gMC->Gspos(PlaneSegmentName(segNum).Data(), 1,
2224 QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2226 // and place all the daughter boards of this segment
2227 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {
2230 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2231 AliMpMotifPosition* motifPos =
2232 sector->GetMotifMap()->FindMotifPosition(motifPosId);
2233 Int_t copyNo = motifPosId;
2234 if ( sector->GetDirection() == kX) copyNo += fgkDaughterCopyNoOffset;
2237 posX = where.X() + motifPos->Position().X() + fgkOffsetX;
2238 posY = where.Y() + motifPos->Position().Y() + fgkOffsetY;
2239 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
2241 gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2247 // if this is a special segment
2248 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {// for each motif
2250 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2253 if (find(alreadyDone.begin(),alreadyDone.end(),motifPosId)
2254 != alreadyDone.end()) continue; // don't treat the same motif twice
2256 AliMUONSt1SpecialMotif spMot = specialMap[motifPosId];
2259 Bool_t isDone = false;
2261 while (i<nofAlreadyDone && !isDone) {
2262 if (alreadyDone.At(i) == motifPosId) isDone=true;
2265 if (isDone) continue; // don't treat the same motif twice
2267 AliMUONSt1SpecialMotif spMot = *((AliMUONSt1SpecialMotif*)specialMap.GetValue(motifPosId));
2270 // cout << chamber << " processing special motif: " << motifPosId << endl;
2272 AliMpMotifPosition* motifPos = sector->GetMotifMap()->FindMotifPosition(motifPosId);
2275 Int_t copyNo = motifPosId;
2276 if ( sector->GetDirection() == kX) copyNo += fgkDaughterCopyNoOffset;
2278 // place the hole for the motif, wrt the requested rotation angle
2279 Int_t rot = ( spMot.GetRotAngle()<0.1 ) ? reflZ:rotMat;
2281 posX = where.X() + motifPos->Position().X() + spMot.GetDelta().X();
2282 posY = where.Y() + motifPos->Position().Y() + spMot.GetDelta().Y();
2283 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
2284 gMC->Gspos(fgkHoleName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
2286 // then place the daughter board for the motif, wrt the requested rotation angle
2287 posX = posX+fgkDeltaFilleEtamX;
2288 posY = posY+fgkDeltaFilleEtamY;
2289 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
2290 gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
2293 alreadyDone.push_back(motifPosId);// mark this motif as done
2296 if (nofAlreadyDone == alreadyDone.GetSize())
2297 alreadyDone.Set(2*nofAlreadyDone);
2298 alreadyDone.AddAt(motifPosId, nofAlreadyDone++);
2301 // cout << chamber << " processed motifPosId: " << motifPosId << endl;
2303 }// end of special motif case
2308 //______________________________________________________________________________
2309 TString AliMUONSt1GeometryBuilderV2::GasVolumeName(const TString& name, Int_t chamber) const
2311 // Inserts the chamber number into the name.
2314 TString newString(name);
2319 newString.Insert(2, number);
2325 //______________________________________________________________________________
2326 Bool_t AliMUONSt1GeometryBuilderV2::IsInChamber(Int_t ich, Int_t volGid) const
2328 // True if volume <volGid> is part of the sensitive
2329 // volumes of chamber <ich>
2331 for (Int_t i = 0; i < fChamberV2[ich]->GetSize(); i++) {
2332 if (fChamberV2[ich]->At(i) == volGid) return kTRUE;
2339 // protected methods
2343 //______________________________________________________________________________
2344 Int_t AliMUONSt1GeometryBuilderV2::GetChamberId(Int_t volId) const
2346 // Check if the volume with specified volId is a sensitive volume (gas)
2347 // of some chamber and returns the chamber number;
2348 // if not sensitive volume - return 0.
2351 for (Int_t i = 1; i <=2; i++)
2352 if (IsInChamber(i-1,volId)) return i;
2354 for (Int_t i = 3; i <= AliMUONConstants::NCh(); i++)
2355 if (volId==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()) return i;
2365 //______________________________________________________________________________
2366 void AliMUONSt1GeometryBuilderV2::CreateMaterials()
2368 // Materials and medias defined in MUONv1:
2370 // AliMaterial( 9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
2371 // AliMaterial(10, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
2372 // AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
2373 // AliMixture( 19, "Bakelite$", abak, zbak, dbak, -3, wbak);
2374 // AliMixture( 20, "ArC4H10 GAS$", ag, zg, dg, 3, wg);
2375 // AliMixture( 21, "TRIG GAS$", atrig, ztrig, dtrig, -5, wtrig);
2376 // AliMixture( 22, "ArCO2 80%$", ag1, zg1, dg1, 3, wg1);
2377 // AliMixture( 23, "Ar-freon $", atr1, ztr1, dtr1, 4, wtr1);
2378 // AliMixture( 24, "ArCO2 GAS$", agas, zgas, dgas, 3, wgas);
2379 // AliMaterial(31, "COPPER$", 63.54, 29., 8.96, 1.4, 0.);
2380 // AliMixture( 32, "Vetronite$",aglass, zglass, dglass, 5, wglass);
2381 // AliMaterial(33, "Carbon$", 12.01, 6., 2.265, 18.8, 49.9);
2382 // AliMixture( 34, "Rohacell$", arohac, zrohac, drohac, -4, wrohac);
2384 // AliMedium( 1, "AIR_CH_US ", 15, 1, iSXFLD, ...
2385 // AliMedium( 4, "ALU_CH_US ", 9, 0, iSXFLD, ...
2386 // AliMedium( 5, "ALU_CH_US ", 10, 0, iSXFLD, ...
2387 // AliMedium( 6, "AR_CH_US ", 20, 1, iSXFLD, ...
2388 // AliMedium( 7, "GAS_CH_TRIGGER ", 21, 1, iSXFLD, ...
2389 // AliMedium( 8, "BAKE_CH_TRIGGER ", 19, 0, iSXFLD, ...
2390 // AliMedium( 9, "ARG_CO2 ", 22, 1, iSXFLD, ...
2391 // AliMedium(11, "PCB_COPPER ", 31, 0, iSXFLD, ...
2392 // AliMedium(12, "VETRONITE ", 32, 0, iSXFLD, ...
2393 // AliMedium(13, "CARBON ", 33, 0, iSXFLD, ...
2394 // AliMedium(14, "Rohacell ", 34, 0, iSXFLD, ...
2397 // --- Define materials for GEANT ---
2400 fMUON->AliMaterial(41, "Aluminium II$", 26.98, 13., 2.7, -8.9, 26.1);
2402 // from PDG and "The Particle Detector BriefBook", Bock and Vasilescu, P.18
2403 // ??? same but the last but one argument < 0
2405 // --- Define mixtures for GEANT ---
2408 // Ar-CO2 gas II (80%+20%)
2409 Float_t ag1[2] = { 39.95, 44.01};
2410 Float_t zg1[2] = { 18., 22.};
2411 Float_t wg1[2] = { .8, 0.2};
2412 Float_t dg1 = .001821;
2413 fMUON->AliMixture(45, "ArCO2 II 80%$", ag1, zg1, dg1, 2, wg1);
2415 // use wg1 weighting factors (6th arg > 0)
2417 // Rohacell 51 II - imide methacrylique
2418 Float_t aRohacell51[4] = { 12.01, 1.01, 16.00, 14.01};
2419 Float_t zRohacell51[4] = { 6., 1., 8., 7.};
2420 Float_t wRohacell51[4] = { 9., 13., 2., 1.};
2421 Float_t dRohacell51 = 0.052;
2422 fMUON->AliMixture(46, "FOAM$",aRohacell51,zRohacell51,dRohacell51,-4,wRohacell51);
2424 // use relative A (molecular) values (6th arg < 0)
2426 Float_t aSnPb[2] = { 118.69, 207.19};
2427 Float_t zSnPb[2] = { 50, 82};
2428 Float_t wSnPb[2] = { 0.6, 0.4} ;
2429 Float_t dSnPb = 8.926;
2430 fMUON->AliMixture(47, "SnPb$", aSnPb,zSnPb,dSnPb,2,wSnPb);
2432 // use wSnPb weighting factors (6th arg > 0)
2434 // plastic definition from K5, Freiburg (found on web)
2435 Float_t aPlastic[2]={ 1.01, 12.01};
2436 Float_t zPlastic[2]={ 1, 6};
2437 Float_t wPlastic[2]={ 1, 1};
2438 Float_t denPlastic=1.107;
2439 fMUON->AliMixture(48, "Plastic$",aPlastic,zPlastic,denPlastic,-2,wPlastic);
2441 // use relative A (molecular) values (6th arg < 0)...no other info...
2443 // Not used, to be removed
2447 // Inox/Stainless Steel (18%Cr, 9%Ni)
2448 Float_t aInox[3] = {55.847, 51.9961, 58.6934};
2449 Float_t zInox[3] = {26., 24., 28.};
2450 Float_t wInox[3] = {0.73, 0.18, 0.09};
2451 Float_t denInox = 7.930;
2452 fMUON->AliMixture(50, "StainlessSteel$",aInox,zInox,denInox,3,wInox);
2454 // use wInox weighting factors (6th arg > 0)
2455 // from CERN note NUFACT Note023, Oct.2000
2457 // End - Not used, to be removed
2460 // --- Define the tracking medias for GEANT ---
2463 GReal_t epsil = .001; // Tracking precision,
2464 //GReal_t stemax = -1.; // Maximum displacement for multiple scat
2465 GReal_t tmaxfd = -20.; // Maximum angle due to field deflection
2466 //GReal_t deemax = -.3; // Maximum fractional energy loss, DLS
2467 GReal_t stmin = -.8;
2468 GReal_t maxStepAlu = fMUON->GetMaxStepAlu();
2469 GReal_t maxDestepAlu = fMUON->GetMaxDestepAlu();
2470 GReal_t maxStepGas = fMUON->GetMaxStepGas();
2471 Int_t iSXFLD = gAlice->Field()->Integ();
2472 Float_t sXMGMX = gAlice->Field()->Max();
2474 fMUON->AliMedium(21, "ALU_II$", 41, 0, iSXFLD, sXMGMX,
2475 tmaxfd, maxStepAlu, maxDestepAlu, epsil, stmin);
2477 // was med: 15 mat: 31
2478 fMUON->AliMedium(24, "FrameCH$", 44, 1, iSXFLD, sXMGMX,
2479 10.0, 0.001, 0.001, 0.001, 0.001);
2480 // was med: 20 mat: 36
2481 fMUON->AliMedium(25, "ARG_CO2_II", 45, 1, iSXFLD, sXMGMX,
2482 tmaxfd, maxStepGas, maxDestepAlu, epsil, stmin);
2483 // was med: 9 mat: 22
2484 fMUON->AliMedium(26, "FOAM_CH$", 46, 0, iSXFLD, sXMGMX,
2485 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ;
2486 // was med: 16 mat: 32
2487 fMUON->AliMedium(27, "SnPb$", 47, 0, iSXFLD, sXMGMX,
2488 10.0, 0.01, 1.0, 0.003, 0.003);
2489 // was med: 19 mat: 35
2490 fMUON->AliMedium(28, "Plastic$", 48, 0, iSXFLD, sXMGMX,
2491 10.0, 0.01, 1.0, 0.003, 0.003);
2492 // was med: 17 mat: 33
2494 // Not used, to be romoved
2497 fMUON->AliMedium(30, "InoxBolts$", 50, 1, iSXFLD, sXMGMX,
2498 10.0, 0.01, 1.0, 0.003, 0.003);
2499 // was med: 21 mat: 37
2501 // End - Not used, to be removed
2504 //______________________________________________________________________________
2505 void AliMUONSt1GeometryBuilderV2::CreateGeometry()
2507 // Create the detailed GEANT geometry for the dimuon arm station1
2509 AliDebug(1,"Called");
2511 // Define chamber volumes as virtual
2514 // Create basic volumes
2517 CreateDaughterBoard();
2518 CreateInnerLayers();
2520 // Create reflexion matrices
2523 Int_t reflXZ, reflYZ, reflXY;
2524 fMUON->AliMatrix(reflXZ, 90., 180., 90., 90., 180., 0.);
2525 fMUON->AliMatrix(reflYZ, 90., 0., 90.,-90., 180., 0.);
2526 fMUON->AliMatrix(reflXY, 90., 180., 90., 270., 0., 0.);
2528 // Define transformations for each quadrant
2529 // In old coordinate system: In new coordinate system:
2532 // II. | I. I. | II.
2534 // _____ | ____ _____ | ____
2536 // III. | IV. IV. | III.
2541 rotm[0]=0; // quadrant I
2542 rotm[1]=reflXZ; // quadrant II
2543 rotm[2]=reflXY; // quadrant III
2544 rotm[3]=reflYZ; // quadrant IV
2546 TGeoRotation rotm[4];
2547 rotm[0] = TGeoRotation("identity");
2548 rotm[1] = TGeoRotation("reflXZ", 90., 180., 90., 90., 180., 0.);
2549 rotm[2] = TGeoRotation("reflXY", 90., 180., 90., 270., 0., 0.);
2550 rotm[3] = TGeoRotation("reflYZ", 90., 0., 90.,-90., 180., 0.);
2553 scale[0] = TVector3( 1, 1, 1); // quadrant I
2554 scale[1] = TVector3(-1, 1, -1); // quadrant II
2555 scale[2] = TVector3(-1, -1, 1); // quadrant III
2556 scale[3] = TVector3( 1, -1, -1); // quadrant IV
2559 detElemId[0] = 1; // quadrant I
2560 detElemId[1] = 0; // quadrant II
2561 detElemId[2] = 3; // quadrant III
2562 detElemId[3] = 2; // quadrant IV
2564 // Shift in Z of the middle layer
2565 Double_t deltaZ = 7.5/2.;
2567 // Position of quadrant I wrt to the chamber position
2568 // TVector3 pos0(-fgkDeltaQuadLHC, -fgkDeltaQuadLHC, deltaZ);
2570 // Shift for near/far layers
2571 GReal_t shiftXY = fgkFrameOffset;
2572 GReal_t shiftZ = fgkMotherThick1+fgkMotherThick2;
2574 // Build two chambers
2576 for (Int_t ich=1; ich<3; ich++) {
2578 // Create quadrant volume
2579 CreateQuadrant(ich);
2581 // Place gas volumes
2582 PlaceInnerLayers(ich);
2584 // Place the quadrant
2585 for (Int_t i=0; i<4; i++) {
2588 GReal_t posx0, posy0, posz0;
2589 posx0 = fgkPadXOffsetBP * scale[i].X();
2590 posy0 = fgkPadYOffsetBP * scale[i].Y();;
2591 posz0 = deltaZ * scale[i].Z();
2593 ->AddEnvelope(QuadrantEnvelopeName(ich,i), detElemId[i] + ich*100, true,
2594 TGeoTranslation(posx0, posy0, posz0), rotm[i]);
2597 GReal_t posx, posy, posz;
2598 posx = -fgkDeltaQuadLHC - fgkPadXOffsetBP;
2599 posy = -fgkDeltaQuadLHC - fgkPadYOffsetBP;
2602 ->AddEnvelopeConstituent(QuadrantMLayerName(ich), QuadrantEnvelopeName(ich,i),
2603 i+1, TGeoTranslation(posx, posy, posz));
2606 GReal_t posx2 = posx + shiftXY;;
2607 GReal_t posy2 = posy + shiftXY;;
2608 GReal_t posz2 = posz - shiftZ;;
2609 //gMC->Gspos(QuadrantNLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
2611 ->AddEnvelopeConstituent(QuadrantNLayerName(ich), QuadrantEnvelopeName(ich,i),
2612 i+1, TGeoTranslation(posx2, posy2, posz2));
2614 posz2 = posz + shiftZ;
2615 //gMC->Gspos(QuadrantFLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
2617 ->AddEnvelopeConstituent(QuadrantFLayerName(ich), QuadrantEnvelopeName(ich,i),
2618 i+1, TGeoTranslation(posx2, posy2, posz2));
2623 //______________________________________________________________________________
2624 void AliMUONSt1GeometryBuilderV2::SetTransformations()
2626 // Defines the transformations for the station2 chambers.
2629 SetVolume(0, "SC01", true);
2630 SetVolume(1, "SC02", true);
2632 Double_t zpos1 = - AliMUONConstants::DefaultChamberZ(0);
2633 SetTranslation(0, TGeoTranslation(0., 0., zpos1));
2635 Double_t zpos2 = - AliMUONConstants::DefaultChamberZ(1);
2636 SetTranslation(1, TGeoTranslation(0., 0., zpos2));
2639 //______________________________________________________________________________
2640 void AliMUONSt1GeometryBuilderV2::SetSensitiveVolumes()
2642 // Defines the sensitive volumes for station2 chambers.
2645 GetGeometry(0)->SetSensitiveVolume("SA1G");
2646 GetGeometry(0)->SetSensitiveVolume("SB1G");
2647 GetGeometry(0)->SetSensitiveVolume("SC1G");
2648 GetGeometry(0)->SetSensitiveVolume("SD1G");
2649 GetGeometry(0)->SetSensitiveVolume("SE1G");
2650 GetGeometry(0)->SetSensitiveVolume("SF1G");
2651 GetGeometry(0)->SetSensitiveVolume("SG1G");
2652 GetGeometry(0)->SetSensitiveVolume("SH1G");
2653 GetGeometry(0)->SetSensitiveVolume("SI1G");
2654 GetGeometry(0)->SetSensitiveVolume("SJ1G");
2655 GetGeometry(0)->SetSensitiveVolume("SK1G");
2657 GetGeometry(1)->SetSensitiveVolume("SA2G");
2658 GetGeometry(1)->SetSensitiveVolume("SB2G");
2659 GetGeometry(1)->SetSensitiveVolume("SC2G");
2660 GetGeometry(1)->SetSensitiveVolume("SD2G");
2661 GetGeometry(1)->SetSensitiveVolume("SE2G");
2662 GetGeometry(1)->SetSensitiveVolume("SF2G");
2663 GetGeometry(1)->SetSensitiveVolume("SG2G");
2664 GetGeometry(1)->SetSensitiveVolume("SH2G");
2665 GetGeometry(1)->SetSensitiveVolume("SI2G");
2666 GetGeometry(1)->SetSensitiveVolume("SJ2G");
2667 GetGeometry(1)->SetSensitiveVolume("SK2G");