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>
69 ClassImp(AliMUONSt1GeometryBuilderV2)
72 // Thickness Constants
73 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzPadPlane=0.0148/2.; //Pad plane
74 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFoam = 2.503/2.; //Foam of mechanicalplane
75 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFR4 = 0.062/2.; //FR4 of mechanical plane
76 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzSnPb = 0.0091/2.; //Pad/Kapton connection (66 pt)
77 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzKapton = 0.0122/2.; //Kapton
78 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergPlastic = 0.3062/2.;//Berg connector
79 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergCopper = 0.1882/2.; //Berg connector
80 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzDaughter = 0.0156/2.; //Daughter board
81 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzGas = 0.42/2.; //Gas thickness
83 // Quadrant Mother volume - TUBS1 - Middle layer of model
84 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR1 = 18.3;
85 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR1 = 105.673;
86 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick1 = 6.5/2;
87 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL1 = 0.;
88 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU1 = 90.;
90 // Quadrant Mother volume - TUBS2 - near and far layers of model
91 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR2 = 20.7;
92 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR2 = 100.073;
93 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick2 = 3.0/2;
94 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL2 = 0.;
95 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU2 = 90.;
97 // Sensitive copper pads, foam layer, PCB and electronics model parameters
98 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxHole=1.5/2.;
99 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyHole=6./2.;
100 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergPlastic=0.74/2.;
101 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergPlastic=5.09/2.;
102 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergCopper=0.25/2.;
103 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergCopper=3.6/2.;
104 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxKapton=0.8/2.;
105 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyKapton=5.7/2.;
106 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxDaughter=2.3/2.;
107 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyDaughter=6.3/2.;
108 const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetX=1.46;
109 const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetY=0.71;
110 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamX=1.46;
111 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamY=0.051;
113 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaQuadLHC=2.6; // LHC Origin wrt Quadrant Origin
114 const GReal_t AliMUONSt1GeometryBuilderV2::fgkFrameOffset=5.2;
115 // Fix (1) of overlap SQN* layers with SQM* ones (was 5.0)
117 // Pad planes offsets
118 const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadXOffsetBP = 0.50 - 0.63/2; // = 0.185
119 const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadYOffsetBP = -0.31 - 0.42/2; // =-0.52
121 const char* AliMUONSt1GeometryBuilderV2::fgkHoleName="SCHL";
122 const char* AliMUONSt1GeometryBuilderV2::fgkDaughterName="SCDB";
123 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantEnvelopeName="SE";
124 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMLayerName="SQM";
125 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantNLayerName="SQN";
126 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantFLayerName="SQF";
127 const Int_t AliMUONSt1GeometryBuilderV2::fgkFoamBoxNameOffset=200;
128 const Int_t AliMUONSt1GeometryBuilderV2::fgkFR4BoxNameOffset=400;
129 const Int_t AliMUONSt1GeometryBuilderV2::fgkDaughterCopyNoOffset=1000;
131 //______________________________________________________________________________
132 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon)
133 : AliMUONVGeometryBuilder(0, 1),
136 /// Standard constructor
138 // set path to mapping data files
139 if (! gSystem->Getenv("MINSTALL")) {
140 TString dirPath = gSystem->Getenv("ALICE_ROOT");
141 dirPath += "/MUON/mapping";
142 AliMpFiles::SetTopPath(dirPath);
143 gSystem->Setenv("MINSTALL", dirPath.Data());
144 //cout << "AliMpFiles top path set to " << dirPath << endl;
147 // cout << gSystem->Getenv("MINSTALL") << endl;
150 //______________________________________________________________________________
151 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2()
152 : AliMUONVGeometryBuilder(),
155 /// Default Constructor
158 //______________________________________________________________________________
159 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(const AliMUONSt1GeometryBuilderV2& rhs)
160 : AliMUONVGeometryBuilder(rhs)
162 /// Dummy copy constructor
164 AliFatal("Copy constructor is not implemented.");
167 //______________________________________________________________________________
168 AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2()
174 //______________________________________________________________________________
175 AliMUONSt1GeometryBuilderV2&
176 AliMUONSt1GeometryBuilderV2::operator = (const AliMUONSt1GeometryBuilderV2& rhs)
178 /// Assignment operator
180 // check assignement to self
181 if (this == &rhs) return *this;
183 AliFatal("Assignment operator is not implemented.");
192 //______________________________________________________________________________
194 AliMUONSt1GeometryBuilderV2::QuadrantEnvelopeName(Int_t chamber, Int_t quadrant) const
196 /// Generate unique envelope name from chamber Id and quadrant number
198 return Form("%s%d", Form("%s%d",fgkQuadrantEnvelopeName,chamber), quadrant);
201 //______________________________________________________________________________
202 void AliMUONSt1GeometryBuilderV2::CreateHole()
204 /// Create all the elements found inside a foam hole
206 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
207 Int_t idAir = idtmed[1100]; // medium 1
208 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
209 Int_t idCopper = idtmed[1121]; // medium 22 = copper
212 GReal_t posX,posY,posZ;
217 gMC->Gsvolu(fgkHoleName,"BOX",idAir,par,3);
219 par[0] = fgkHxKapton;
220 par[1] = fgkHyKapton;
222 gMC->Gsvolu("SNPB", "BOX", idCopper, par, 3);
225 posZ = -fgkHzFoam+fgkHzSnPb;
226 gMC->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
229 par[1] = fgkHyBergPlastic;
230 par[2] = fgkHzKapton;
231 gMC->Gsvolu("SKPT", "BOX", idCopper, par, 3);
235 gMC->Gspos("SKPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
238 //______________________________________________________________________________
239 void AliMUONSt1GeometryBuilderV2::CreateDaughterBoard()
241 /// Create all the elements in a daughter board
243 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
244 Int_t idAir = idtmed[1100]; // medium 1
245 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
246 //Int_t idPlastic =idtmed[1116]; // medium 17 = Plastic
247 Int_t idCopper = idtmed[1121]; // medium 22 = copper
248 Int_t idPlastic =idtmed[1127]; // medium 28 = Plastic
251 GReal_t posX,posY,posZ;
253 par[0]=fgkHxDaughter;
254 par[1]=fgkHyDaughter;
255 par[2]=TotalHzDaughter();
256 gMC->Gsvolu(fgkDaughterName,"BOX",idAir,par,3);
258 par[0]=fgkHxBergPlastic;
259 par[1]=fgkHyBergPlastic;
260 par[2]=fgkHzBergPlastic;
261 gMC->Gsvolu("SBGP","BOX",idPlastic,par,3);
264 posZ = -TotalHzDaughter() + fgkHzBergPlastic;
265 gMC->Gspos("SBGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
267 par[0]=fgkHxBergCopper;
268 par[1]=fgkHyBergCopper;
269 par[2]=fgkHzBergCopper;
270 gMC->Gsvolu("SBGC","BOX",idCopper,par,3);
274 gMC->Gspos("SBGC",1,"SBGP",posX,posY,posZ,0,"ONLY");
276 par[0]=fgkHxDaughter;
277 par[1]=fgkHyDaughter;
278 par[2]=fgkHzDaughter;
279 gMC->Gsvolu("SDGH","BOX",idCopper,par,3);
282 posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter;
283 gMC->Gspos("SDGH",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
286 //______________________________________________________________________________
287 void AliMUONSt1GeometryBuilderV2::CreateInnerLayers()
289 /// Create the layer of sensitive volumes with gas
290 /// and the copper layer.
293 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
294 //Int_t idArCO2 = idtmed[1108]; // medium 9 (ArCO2 80%)
295 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
296 Int_t idArCO2 = idtmed[1124]; // medium 25 (ArCO2 80%)
297 Int_t idCopper = idtmed[1121]; // medium 22 = copper
301 //Make gas volume - composed of 11 trapezoids
315 gMC->Gsvolu("SA1G", "TRAP", idArCO2, par, 11);
316 gMC->Gsvolu("SA2G", "TRAP", idArCO2, par, 11);
318 par[0] = fgkHzPadPlane;
319 gMC->Gsvolu("SA1C", "TRAP", idCopper,par, 11);
333 gMC->Gsvolu("SB1G", "TRAP", idArCO2, par, 11);
334 gMC->Gsvolu("SB2G", "TRAP", idArCO2, par, 11);
336 par[0] = fgkHzPadPlane;
337 gMC->Gsvolu("SB1C", "TRAP", idCopper,par, 11);
352 gMC->Gsvolu("SC1G", "TRAP", idArCO2, par, 11);
353 gMC->Gsvolu("SC2G", "TRAP", idArCO2, par, 11);
355 par[0] = fgkHzPadPlane;
356 gMC->Gsvolu("SC1C", "TRAP", idCopper,par, 11);
370 gMC->Gsvolu("SD1G", "TRAP", idArCO2, par, 11);
371 gMC->Gsvolu("SD2G", "TRAP", idArCO2, par, 11);
373 par[0] = fgkHzPadPlane;
374 gMC->Gsvolu("SD1C", "TRAP", idCopper,par, 11);
388 gMC->Gsvolu("SE1G", "TRAP", idArCO2, par, 11);
389 gMC->Gsvolu("SE2G", "TRAP", idArCO2, par, 11);
391 par[0] = fgkHzPadPlane;
392 gMC->Gsvolu("SE1C", "TRAP", idCopper,par, 11);
406 gMC->Gsvolu("SF1G", "TRAP", idArCO2, par, 11);
407 gMC->Gsvolu("SF2G", "TRAP", idArCO2, par, 11);
409 par[0] = fgkHzPadPlane;
410 gMC->Gsvolu("SF1C", "TRAP", idCopper,par, 11);
424 gMC->Gsvolu("SG1G", "TRAP", idArCO2, par, 11);
425 gMC->Gsvolu("SG2G", "TRAP", idArCO2, par, 11);
427 par[0] = fgkHzPadPlane;
428 gMC->Gsvolu("SG1C", "TRAP", idCopper,par, 11);
442 gMC->Gsvolu("SH1G", "TRAP", idArCO2, par, 11);
443 gMC->Gsvolu("SH2G", "TRAP", idArCO2, par, 11);
445 par[0] = fgkHzPadPlane;
446 gMC->Gsvolu("SH1C", "TRAP", idCopper,par, 11);
460 gMC->Gsvolu("SI1G", "TRAP", idArCO2, par, 11);
461 gMC->Gsvolu("SI2G", "TRAP", idArCO2, par, 11);
463 par[0] = fgkHzPadPlane;
464 gMC->Gsvolu("SI1C", "TRAP", idCopper,par, 11);
478 gMC->Gsvolu("SJ1G", "TRAP", idArCO2, par, 11);
479 gMC->Gsvolu("SJ2G", "TRAP", idArCO2, par, 11);
481 par[0] = fgkHzPadPlane;
482 gMC->Gsvolu("SJ1C", "TRAP", idCopper,par, 11);
496 gMC->Gsvolu("SK1G", "TRAP", idArCO2, par, 11);
497 gMC->Gsvolu("SK2G", "TRAP", idArCO2, par, 11);
499 par[0] = fgkHzPadPlane;
500 gMC->Gsvolu("SK1C", "TRAP", idCopper,par, 11);
503 //______________________________________________________________________________
504 void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber)
506 /// Create the quadrant (bending and non-bending planes)
507 /// for the given chamber
509 CreateFrame(chamber);
512 SpecialMap specialMap;
513 specialMap[76] = AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.);
514 specialMap[75] = AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36));
515 specialMap[47] = AliMUONSt1SpecialMotif(TVector2(1.01, 0.36));
519 SpecialMap specialMap;
520 specialMap.Add(76, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.));
521 specialMap.Add(75, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36)));
522 specialMap.Add(47, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36)));
525 AliMpSectorReader reader1(kStation1, kBendingPlane);
526 AliMpSector* sector1 = reader1.BuildSector();
528 //Bool_t reflectZ = true;
529 Bool_t reflectZ = false;
530 //TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.);
531 TVector3 where = TVector3(fgkDeltaQuadLHC + fgkPadXOffsetBP,
532 fgkDeltaQuadLHC + fgkPadYOffsetBP, 0.);
533 PlaceSector(sector1, specialMap, where, reflectZ, chamber);
537 specialMap[76] = AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.);
538 specialMap[75] = AliMUONSt1SpecialMotif(TVector2(1.96, 0.17));
539 specialMap[47] = AliMUONSt1SpecialMotif(TVector2(2.18,-0.98));
540 specialMap[20] = AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08));
541 specialMap[46] = AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25));
542 specialMap[74] = AliMUONSt1SpecialMotif(TVector2(0.28, 0.21));
543 // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector
544 // in the true position)
545 // Was: specialMap[47] = AliMUONSt1SpecialMotif(TVector2(1.61,-1.18));
549 Int_t nb = AliMpConstants::ManuMask(kNonBendingPlane);
551 specialMap.Add(76 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.));
552 specialMap.Add(75 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.96, 0.17)));
553 specialMap.Add(47 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(2.18,-0.98)));
554 specialMap.Add(20 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08)));
555 specialMap.Add(46 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25)));
556 specialMap.Add(74 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.28, 0.21)));
557 // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector
558 // in the true position)
559 // Was: specialMap.Add(47,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.61,-1.18)));
562 AliMpSectorReader reader2(kStation1, kNonBendingPlane);
563 AliMpSector* sector2 = reader2.BuildSector();
567 TVector2 offset = sector2->Position();
568 where = TVector3(where.X()+offset.X(), where.Y()+offset.Y(), 0.);
569 // Add the half-pad shift of the non-bending plane wrt bending plane
570 // (The shift is defined in the mapping as sector offset)
571 // Fix (4) - was TVector3(where.X()+0.63/2, ... - now it is -0.63/2
572 PlaceSector(sector2, specialMap, where, reflectZ, chamber);
579 //______________________________________________________________________________
580 void AliMUONSt1GeometryBuilderV2::CreateFoamBox(
582 const TVector2& dimensions)
584 /// Create all the elements in the copper plane
586 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
587 Int_t idAir = idtmed[1100]; // medium 1
588 //Int_t idFoam = idtmed[1115]; // medium 16 = Foam
589 //Int_t idFR4 = idtmed[1114]; // medium 15 = FR4
590 Int_t idFoam = idtmed[1125]; // medium 26 = Foam
591 Int_t idFR4 = idtmed[1122]; // medium 23 = FR4
595 par[0] = dimensions.X();
596 par[1] = dimensions.Y();
597 par[2] = TotalHzPlane();
598 gMC->Gsvolu(PlaneSegmentName(segNumber).Data(),"BOX",idAir,par,3);
601 par[0] = dimensions.X();
602 par[1] = dimensions.Y();
604 gMC->Gsvolu(FoamBoxName(segNumber).Data(),"BOX",idFoam,par,3);
605 GReal_t posX,posY,posZ;
608 posZ = -TotalHzPlane() + fgkHzFoam;
609 gMC->Gspos(FoamBoxName(segNumber).Data(),1,
610 PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
612 // mechanical plane FR4 layer
613 par[0] = dimensions.X();
614 par[1] = dimensions.Y();
616 gMC->Gsvolu(FR4BoxName(segNumber).Data(),"BOX",idFR4,par,3);
619 posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4;
620 gMC->Gspos(FR4BoxName(segNumber).Data(),1,
621 PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
624 //______________________________________________________________________________
625 void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(Int_t segNumber,
626 const TVector2& dimensions,
629 /// Create a segment of a plane (this includes a foam layer,
630 /// holes in the foam to feed the kaptons through, kapton connectors
631 /// 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 \a chamber
650 /// Model and notation: \n
652 /// The Quadrant volume name starts with SQ \n
653 /// The volume segments are numbered 00 to XX \n
658 /// OutEdgeFrame / | \n
659 /// (SQ17-24) / | InVFrame (SQ00-01) \n
662 /// OutVFrame | _- - \n
663 /// (SQ25-39) | | InArcFrame (SQ42-45) \n
666 /// InHFrame (SQ40-41) \n
669 /// 06 February 2003 - Overlapping volumes resolved. \n
670 /// One quarter chamber is comprised of three TUBS volumes: SQMx, SQNx, and SQFx,
671 /// where SQMx is the Quadrant Middle layer for chamber \a chamber ( posZ in [-3.25,3.25]),
672 /// SQNx is the Quadrant Near side layer for chamber \a chamber ( posZ in [-6.25,3-.25) ), and
673 /// SQFx is the Quadrant Far side layer for chamber \a chamber ( posZ in (3.25,6.25] ).
675 const Float_t kNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin
678 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
680 Int_t idAir = idtmed[1100]; // medium 1
681 //Int_t idFrameEpoxy = idtmed[1115]; // medium 16 = Frame Epoxy ME730
682 //Int_t idInox = idtmed[1116]; // medium 17 Stainless Steel (18%Cr,9%Ni,Fe)
683 //Int_t idFR4 = idtmed[1110]; // medium 11 FR4
684 //Int_t idCopper = idtmed[1109]; // medium 10 Copper
685 //Int_t idAlu = idtmed[1103]; // medium 4 Aluminium
686 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
687 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
688 Int_t idFR4 = idtmed[1122]; // medium 23 FR4 // was 15 not 11
689 Int_t idCopper = idtmed[1121]; // medium 22 Copper
690 Int_t idAlu = idtmed[1120]; // medium 21 Aluminium
694 Int_t rot1, rot2, rot3;
697 fMUON->AliMatrix(rot1, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane
698 fMUON->AliMatrix(rot2, 90., 45., 90., 135., 0., 0.); // +45 deg in x-y plane
699 fMUON->AliMatrix(rot3, 90., 45., 90., 315.,180., 0.); // +45 deg in x-y + rotation 180° around y
701 // Translation matrices ... NOT USED
702 // fMUON->AliMatrix(trans1, 90., 0., 90., 90., 0., 0.); // X-> X; Y -> Y; Z -> Z
703 // fMUON->AliMatrix(trans2, 90., 180., 90., 90., 180., 0.); // X->-X; Y -> Y; Z ->-Z
704 // fMUON->AliMatrix(trans3, 90., 180., 90., 270., 0., 0.); // X->-X; Y ->-Y; Z -> Z
705 // fMUON->AliMatrix(trans4, 90., 0., 90., 270., 180., 0.); // X-> X; Y ->-Y; Z ->-Z
707 // ___________________Volume thicknesses________________________
709 const Float_t kHzFrameThickness = 1.59/2.; //equivalent thickness
710 const Float_t kHzOuterFrameEpoxy = 1.19/2.; //equivalent thickness
711 const Float_t kHzOuterFrameInox = 0.1/2.; //equivalent thickness
712 const Float_t kHzFoam = 2.083/2.; //evaluated elsewhere
713 // CHECK with fgkHzFoam
715 // Pertaining to the top outer area
716 const Float_t kHzTopAnodeSteel1 = 0.185/2.; //equivalent thickness
717 const Float_t kHzTopAnodeSteel2 = 0.51/2.; //equivalent thickness
718 const Float_t kHzAnodeFR4 = 0.08/2.; //equivalent thickness
719 const Float_t kHzTopEarthFaceCu = 0.364/2.; //equivalent thickness
720 const Float_t kHzTopEarthProfileCu = 1.1/2.; //equivalent thickness
721 const Float_t kHzTopPositionerSteel = 1.45/2.; //should really be 2.125/2.;
722 const Float_t kHzTopGasSupportAl = 0.85/2.; //equivalent thickness
724 // Pertaining to the vertical outer area
725 const Float_t kHzVerticalCradleAl = 0.8/2.; //equivalent thickness
726 const Float_t kHzLateralSightAl = 0.975/2.; //equivalent thickness
727 const Float_t kHzLateralPosnInoxFace = 2.125/2.;//equivalent thickness
728 const Float_t kHzLatPosInoxProfM = 6.4/2.; //equivalent thickness
729 const Float_t kHzLatPosInoxProfNF = 1.45/2.; //equivalent thickness
730 const Float_t kHzLateralPosnAl = 0.5/2.; //equivalent thickness
731 const Float_t kHzVertEarthFaceCu = 0.367/2.; //equivalent thickness
732 const Float_t kHzVertBarSteel = 0.198/2.; //equivalent thickness
733 const Float_t kHzVertEarthProfCu = 1.1/2.; //equivalent thickness
735 //_______________Parameter definitions in sequence _________
737 // InVFrame parameters
738 const Float_t kHxInVFrame = 1.85/2.;
739 const Float_t kHyInVFrame = 73.95/2.;
740 const Float_t kHzInVFrame = kHzFrameThickness;
742 //Flat 7.5mm vertical section
743 const Float_t kHxV1mm = 0.75/2.;
744 const Float_t kHyV1mm = 1.85/2.;
745 const Float_t kHzV1mm = kHzFrameThickness;
747 // OuterTopFrame Structure
750 // The frame is composed of a cuboid and two trapezoids
751 // (TopFrameAnode, TopFrameAnodeA, TopFrameAnodeB).
752 // Each shape is composed of two layers (Epoxy and Inox) and
753 // takes the frame's inner anode circuitry into account in the material budget.
756 // The overhanging anode part is composed froma cuboid and two trapezoids
757 // (TopAnode, TopAnode1, and TopAnode2). These surfaces neglect implanted
758 // resistors, but accounts for the major Cu, Pb/Sn, and FR4 material
760 // The stainless steel anode supports have been included.
762 // EARTHING (TopEarthFace, TopEarthProfile)
763 // Al GAS SUPPORT (TopGasSupport)
765 // ALIGNMENT (TopPositioner) - Alignment system, three sights per quarter
766 // chamber. This sight is forseen for the alignment of the horizontal level
767 // (parallel to the OY axis of LHC). Its position will be evaluated relative
768 // to a system of sights places on the cradles;
772 //TopFrameAnode parameters - cuboid, 2 layers
773 const Float_t kHxTFA = 34.1433/2.;
774 const Float_t kHyTFA = 7.75/2.;
775 const Float_t kHzTFAE = kHzOuterFrameEpoxy; // layer 1 thickness
776 const Float_t kHzTFAI = kHzOuterFrameInox; // layer 3 thickness
778 // TopFrameAnodeA parameters - trapezoid, 2 layers
779 const Float_t kHzFAAE = kHzOuterFrameEpoxy; // layer 1 thickness
780 const Float_t kHzFAAI = kHzOuterFrameInox; // layer 3 thickness
781 const Float_t kTetFAA = 0.;
782 const Float_t kPhiFAA = 0.;
783 const Float_t kH1FAA = 8.7/2.;
784 const Float_t kBl1FAA = 4.35/2.;
785 const Float_t kTl1FAA = 7.75/2.;
786 const Float_t kAlp1FAA = 11.06;
787 const Float_t kH2FAA = 8.7/2.;
788 const Float_t kBl2FAA = 4.35/2.;
789 const Float_t kTl2FAA = 7.75/2.;
790 const Float_t kAlp2FAA = 11.06;
792 // TopFrameAnodeB parameters - trapezoid, 2 layers
793 const Float_t kHzFABE = kHzOuterFrameEpoxy; // layer 1 thickness
794 const Float_t kHzFABI = kHzOuterFrameInox; // layer 3 thickness
795 const Float_t kTetFAB = 0.;
796 const Float_t kPhiFAB = 0.;
797 const Float_t kH1FAB = 8.70/2.;
798 const Float_t kBl1FAB = 0.;
799 const Float_t kTl1FAB = 4.35/2.;
800 const Float_t kAlp1FAB = 14.03;
801 const Float_t kH2FAB = 8.70/2.;
802 const Float_t kBl2FAB = 0.;
803 const Float_t kTl2FAB = 4.35/2.;
804 const Float_t kAlp2FAB = 14.03;
806 // TopAnode parameters - cuboid (part 1 of 3 parts)
807 const Float_t kHxTA1 = 16.2/2.;
808 const Float_t kHyTA1 = 3.5/2.;
809 const Float_t kHzTA11 = kHzTopAnodeSteel1; // layer 1
810 const Float_t kHzTA12 = kHzAnodeFR4; // layer 2
812 // TopAnode parameters - trapezoid 1 (part 2 of 3 parts)
813 const Float_t kHzTA21 = kHzTopAnodeSteel2; // layer 1
814 const Float_t kHzTA22 = kHzAnodeFR4; // layer 2
815 const Float_t kTetTA2 = 0.;
816 const Float_t kPhiTA2= 0.;
817 const Float_t kH1TA2 = 7.268/2.;
818 const Float_t kBl1TA2 = 2.03/2.;
819 const Float_t kTl1TA2 = 3.5/2.;
820 const Float_t kAlp1TA2 = 5.78;
821 const Float_t kH2TA2 = 7.268/2.;
822 const Float_t kBl2TA2 = 2.03/2.;
823 const Float_t kTl2TA2 = 3.5/2.;
824 const Float_t kAlp2TA2 = 5.78;
826 // TopAnode parameters - trapezoid 2 (part 3 of 3 parts)
827 const Float_t kHzTA3 = kHzAnodeFR4; // layer 1
828 const Float_t kTetTA3 = 0.;
829 const Float_t kPhiTA3 = 0.;
830 const Float_t kH1TA3 = 7.268/2.;
831 const Float_t kBl1TA3 = 0.;
832 const Float_t kTl1TA3 = 2.03/2.;
833 const Float_t kAlp1TA3 = 7.95;
834 const Float_t kH2TA3 = 7.268/2.;
835 const Float_t kBl2TA3 = 0.;
836 const Float_t kTl2TA3 = 2.03/2.;
837 const Float_t kAlp2TA3 = 7.95;
839 // TopEarthFace parameters - single trapezoid
840 const Float_t kHzTEF = kHzTopEarthFaceCu;
841 const Float_t kTetTEF = 0.;
842 const Float_t kPhiTEF = 0.;
843 const Float_t kH1TEF = 1.200/2.;
844 const Float_t kBl1TEF = 21.323/2.;
845 const Float_t kTl1TEF = 17.963/2.;
846 const Float_t kAlp1TEF = -54.46;
847 const Float_t kH2TEF = 1.200/2.;
848 const Float_t kBl2TEF = 21.323/2.;
849 const Float_t kTl2TEF = 17.963/2.;
850 const Float_t kAlp2TEF = -54.46;
852 // TopEarthProfile parameters - single trapezoid
853 const Float_t kHzTEP = kHzTopEarthProfileCu;
854 const Float_t kTetTEP = 0.;
855 const Float_t kPhiTEP = 0.;
856 const Float_t kH1TEP = 0.40/2.;
857 const Float_t kBl1TEP = 31.766/2.;
858 const Float_t kTl1TEP = 30.535/2.;
859 const Float_t kAlp1TEP = -56.98;
860 const Float_t kH2TEP = 0.40/2.;
861 const Float_t kBl2TEP = 31.766/2.;
862 const Float_t kTl2TEP = 30.535/2.;
863 const Float_t kAlp2TEP = -56.98;
865 // TopPositioner parameters - single Stainless Steel trapezoid
866 const Float_t kHzTP = kHzTopPositionerSteel;
867 const Float_t kTetTP = 0.;
868 const Float_t kPhiTP = 0.;
869 const Float_t kH1TP = 3.00/2.;
870 const Float_t kBl1TP = 7.023/2.;
871 const Float_t kTl1TP = 7.314/2.;
872 const Float_t kAlp1TP = 2.78;
873 const Float_t kH2TP = 3.00/2.;
874 const Float_t kBl2TP = 7.023/2.;
875 const Float_t kTl2TP = 7.314/2.;
876 const Float_t kAlp2TP = 2.78;
878 // TopGasSupport parameters - single cuboid
879 const Float_t kHxTGS = 8.50/2.;
880 const Float_t kHyTGS = 3.00/2.;
881 const Float_t kHzTGS = kHzTopGasSupportAl;
883 // OutEdgeFrame parameters - 4 trapezoidal sections, 2 layers of material
888 const Float_t kHzOETFE = kHzOuterFrameEpoxy; // layer 1
889 const Float_t kHzOETFI = kHzOuterFrameInox; // layer 3
891 const Float_t kTetOETF = 0.; // common to all 4 trapezoids
892 const Float_t kPhiOETF = 0.; // common to all 4 trapezoids
894 const Float_t kH1OETF = 7.196/2.; // common to all 4 trapezoids
895 const Float_t kH2OETF = 7.196/2.; // common to all 4 trapezoids
897 const Float_t kBl1OETF1 = 3.75/2;
898 const Float_t kTl1OETF1 = 3.996/2.;
899 const Float_t kAlp1OETF1 = 0.98;
901 const Float_t kBl2OETF1 = 3.75/2;
902 const Float_t kTl2OETF1 = 3.996/2.;
903 const Float_t kAlp2OETF1 = 0.98;
906 const Float_t kBl1OETF2 = 3.01/2.;
907 const Float_t kTl1OETF2 = 3.75/2;
908 const Float_t kAlp1OETF2 = 2.94;
910 const Float_t kBl2OETF2 = 3.01/2.;
911 const Float_t kTl2OETF2 = 3.75/2;
912 const Float_t kAlp2OETF2 = 2.94;
915 //const Float_t kBl1OETF3 = 1.767/2.;
916 //const Float_t kTl1OETF3 = 3.01/2.;
917 const Float_t kBl1OETF3 = 1.117/2.;
918 const Float_t kTl1OETF3 = 2.36/2.;
919 const Float_t kAlp1OETF3 = 4.94;
920 // Fix (5) - overlap of SQ21 with 041M and 125M
922 //const Float_t kBl2OETF3 = 1.767/2.;
923 //const Float_t kTl2OETF3 = 3.01/2.;
924 const Float_t kBl2OETF3 = 1.117/2.;
925 const Float_t kTl2OETF3 = 2.36/2.;
926 const Float_t kAlp2OETF3 = 4.94;
927 // Fix (5) - overlap of SQ21 with 041M and 125M
930 const Float_t kBl1OETF4 = 0.;
931 const Float_t kTl1OETF4 = 1.77/2.;
932 const Float_t kAlp1OETF4 = 7.01;
934 const Float_t kBl2OETF4 = 0.;
935 const Float_t kTl2OETF4 = 1.77/2.;
936 const Float_t kAlp2OETF4 = 7.01;
938 // Frame Structure (OutVFrame):
940 // OutVFrame and corner (OutVFrame cuboid, OutVFrame trapezoid)
941 // EARTHING (VertEarthFaceCu,VertEarthSteel,VertEarthProfCu),
942 // DETECTOR POSITIONNING (SuppLateralPositionner, LateralPositionner),
943 // CRADLE (VertCradle), and
944 // ALIGNMENT (LateralSightSupport, LateralSight)
948 // OutVFrame parameters - cuboid
949 const Float_t kHxOutVFrame = 1.85/2.;
950 const Float_t kHyOutVFrame = 46.23/2.;
951 const Float_t kHzOutVFrame = kHzFrameThickness;
953 // OutVFrame corner parameters - trapezoid
954 const Float_t kHzOCTF = kHzFrameThickness;
955 const Float_t kTetOCTF = 0.;
956 const Float_t kPhiOCTF = 0.;
957 const Float_t kH1OCTF = 1.85/2.;
958 const Float_t kBl1OCTF = 0.;
959 const Float_t kTl1OCTF = 3.66/2.;
960 const Float_t kAlp1OCTF = 44.67;
961 const Float_t kH2OCTF = 1.85/2.;
962 const Float_t kBl2OCTF = 0.;
963 const Float_t kTl2OCTF = 3.66/2.;
964 const Float_t kAlp2OCTF = 44.67;
966 // VertEarthFaceCu parameters - single trapezoid
967 const Float_t kHzVFC = kHzVertEarthFaceCu;
968 const Float_t kTetVFC = 0.;
969 const Float_t kPhiVFC = 0.;
970 const Float_t kH1VFC = 1.200/2.;
971 const Float_t kBl1VFC = 46.11/2.;
972 const Float_t kTl1VFC = 48.236/2.;
973 const Float_t kAlp1VFC = 41.54;
974 const Float_t kH2VFC = 1.200/2.;
975 const Float_t kBl2VFC = 46.11/2.;
976 const Float_t kTl2VFC = 48.236/2.;
977 const Float_t kAlp2VFC = 41.54;
979 // VertEarthSteel parameters - single trapezoid
980 const Float_t kHzVES = kHzVertBarSteel;
981 const Float_t kTetVES = 0.;
982 const Float_t kPhiVES = 0.;
983 const Float_t kH1VES = 1.200/2.;
984 const Float_t kBl1VES = 30.486/2.;
985 const Float_t kTl1VES = 32.777/2.;
986 const Float_t kAlp1VES = 43.67;
987 const Float_t kH2VES = 1.200/2.;
988 const Float_t kBl2VES = 30.486/2.;
989 const Float_t kTl2VES = 32.777/2.;
990 const Float_t kAlp2VES = 43.67;
992 // VertEarthProfCu parameters - single trapezoid
993 const Float_t kHzVPC = kHzVertEarthProfCu;
994 const Float_t kTetVPC = 0.;
995 const Float_t kPhiVPC = 0.;
996 const Float_t kH1VPC = 0.400/2.;
997 const Float_t kBl1VPC = 29.287/2.;
998 const Float_t kTl1VPC = 30.091/2.;
999 const Float_t kAlp1VPC = 45.14;
1000 const Float_t kH2VPC = 0.400/2.;
1001 const Float_t kBl2VPC = 29.287/2.;
1002 const Float_t kTl2VPC = 30.091/2.;
1003 const Float_t kAlp2VPC = 45.14;
1005 // SuppLateralPositionner - single cuboid
1006 const Float_t kHxSLP = 2.80/2.;
1007 const Float_t kHySLP = 5.00/2.;
1008 const Float_t kHzSLP = kHzLateralPosnAl;
1010 // LateralPositionner - squared off U bend, face view
1011 const Float_t kHxLPF = 5.2/2.;
1012 const Float_t kHyLPF = 3.0/2.;
1013 const Float_t kHzLPF = kHzLateralPosnInoxFace;
1015 // LateralPositionner - squared off U bend, profile view
1016 const Float_t kHxLPP = 0.425/2.;
1017 const Float_t kHyLPP = 3.0/2.;
1018 const Float_t kHzLPP = kHzLatPosInoxProfM; // middle layer
1019 const Float_t kHzLPNF = kHzLatPosInoxProfNF; // near and far layers
1021 // VertCradle, 3 layers (copies), each composed of 4 trapezoids
1023 const Float_t kHzVC1 = kHzVerticalCradleAl;
1024 const Float_t kTetVC1 = 0.;
1025 const Float_t kPhiVC1 = 0.;
1026 const Float_t kH1VC1 = 10.25/2.;
1027 const Float_t kBl1VC1 = 3.70/2.;
1028 const Float_t kTl1VC1 = 0.;
1029 const Float_t kAlp1VC1 = -10.23;
1030 const Float_t kH2VC1 = 10.25/2.;
1031 const Float_t kBl2VC1 = 3.70/2.;
1032 const Float_t kTl2VC1 = 0.;
1033 const Float_t kAlp2VC1 = -10.23;
1036 const Float_t kHzVC2 = kHzVerticalCradleAl;
1037 const Float_t kTetVC2 = 0.;
1038 const Float_t kPhiVC2 = 0.;
1039 const Float_t kH1VC2 = 10.25/2.;
1040 const Float_t kBl1VC2 = 6.266/2.;
1041 const Float_t kTl1VC2 = 3.70/2.;
1042 const Float_t kAlp1VC2 = -7.13;
1043 const Float_t kH2VC2 = 10.25/2.;
1044 const Float_t kBl2VC2 = 6.266/2.;
1045 const Float_t kTl2VC2 = 3.70/2.;
1046 const Float_t kAlp2VC2 = -7.13;
1049 const Float_t kHzVC3 = kHzVerticalCradleAl;
1050 const Float_t kTetVC3 = 0.;
1051 const Float_t kPhiVC3 = 0.;
1052 const Float_t kH1VC3 = 10.25/2.;
1053 const Float_t kBl1VC3 = 7.75/2.;
1054 const Float_t kTl1VC3 = 6.266/2.;
1055 const Float_t kAlp1VC3 = -4.14;
1056 const Float_t kH2VC3 = 10.25/2.;
1057 const Float_t kBl2VC3 = 7.75/2.;
1058 const Float_t kTl2VC3 = 6.266/2.;
1059 const Float_t kAlp2VC3 = -4.14;
1062 const Float_t kHzVC4 = kHzVerticalCradleAl;
1063 const Float_t kTetVC4 = 0.;
1064 const Float_t kPhiVC4 = 0.;
1065 const Float_t kH1VC4 = 10.27/2.;
1066 const Float_t kBl1VC4 = 8.273/2.;
1067 const Float_t kTl1VC4 = 7.75/2.;
1068 const Float_t kAlp1VC4 = -1.46;
1069 const Float_t kH2VC4 = 10.27/2.;
1070 const Float_t kBl2VC4 = 8.273/2.;
1071 const Float_t kTl2VC4 = 7.75/2.;
1072 const Float_t kAlp2VC4 = -1.46;
1074 // LateralSightSupport - single trapezoid
1075 const Float_t kHzVSS = kHzLateralSightAl;
1076 const Float_t kTetVSS = 0.;
1077 const Float_t kPhiVSS = 0.;
1078 const Float_t kH1VSS = 5.00/2.;
1079 const Float_t kBl1VSS = 7.747/2;
1080 const Float_t kTl1VSS = 7.188/2.;
1081 const Float_t kAlp1VSS = -3.20;
1082 const Float_t kH2VSS = 5.00/2.;
1083 const Float_t kBl2VSS = 7.747/2.;
1084 const Float_t kTl2VSS = 7.188/2.;
1085 const Float_t kAlp2VSS = -3.20;
1087 // LateralSight (reference point) - 3 per quadrant, only 1 programmed for now
1088 const Float_t kVSInRad = 0.6;
1089 const Float_t kVSOutRad = 1.3;
1090 const Float_t kVSLen = kHzFrameThickness;
1094 // InHFrame parameters
1095 const Float_t kHxInHFrame = 75.8/2.;
1096 const Float_t kHyInHFrame = 1.85/2.;
1097 const Float_t kHzInHFrame = kHzFrameThickness;
1099 //Flat 7.5mm horizontal section
1100 const Float_t kHxH1mm = 1.85/2.;
1101 const Float_t kHyH1mm = 0.75/2.;
1102 const Float_t kHzH1mm = kHzFrameThickness;
1106 // InArcFrame parameters
1107 const Float_t kIAF = 15.70;
1108 const Float_t kOAF = 17.55;
1109 const Float_t kHzAF = kHzFrameThickness;
1110 const Float_t kAFphi1 = 0.0;
1111 const Float_t kAFphi2 = 90.0;
1115 // ScrewsInFrame parameters HEAD
1116 const Float_t kSCRUHMI = 0.;
1117 const Float_t kSCRUHMA = 0.690/2.;
1118 const Float_t kSCRUHLE = 0.4/2.;
1119 // ScrewsInFrame parameters MIDDLE
1120 const Float_t kSCRUMMI = 0.;
1121 const Float_t kSCRUMMA = 0.39/2.;
1122 const Float_t kSCRUMLE = kHzFrameThickness;
1123 // ScrewsInFrame parameters NUT
1124 const Float_t kSCRUNMI = 0.;
1125 const Float_t kSCRUNMA = 0.78/2.;
1126 const Float_t kSCRUNLE = 0.8/2.;
1128 // ___________________Make volumes________________________
1131 Float_t posX,posY,posZ;
1133 // Quadrant volume TUBS1, positioned at the end
1134 par[0] = fgkMotherIR1;
1135 par[1] = fgkMotherOR1;
1136 par[2] = fgkMotherThick1;
1137 par[3] = fgkMotherPhiL1;
1138 par[4] = fgkMotherPhiU1;
1139 gMC->Gsvolu(QuadrantMLayerName(chamber),"TUBS",idAir,par,5);
1141 // Replace the volume shape with a composite shape
1142 // with substracted overlap with beam shield (YMOT)
1144 if ( gMC->IsRootGeometrySupported() &&
1145 TString(gMC->ClassName()) != "TGeant4") {
1149 = gGeoManager->FindVolumeFast(QuadrantMLayerName(chamber));
1152 << "Quadrant volume " << QuadrantMLayerName(chamber) << " not found"
1156 TGeoShape* quadrant = mlayer->GetShape();
1157 quadrant->SetName("quadrant");
1159 // Beam shield recess
1162 par[2] = fgkMotherThick1;
1163 new TGeoTube("shield_tube", par[0], par[1], par[2]);
1169 TGeoTranslation* displacement
1170 = new TGeoTranslation("TR", posX, posY, posZ);
1171 displacement->RegisterYourself();
1174 TGeoShape* composite
1175 = new TGeoCompositeShape("composite", "quadrant-shield_tube:TR");
1177 // Reset shape to volume
1178 mlayer->SetShape(composite);
1182 // Quadrant volume TUBS2, positioned at the end
1183 par[0] = fgkMotherIR2;
1184 par[1] = fgkMotherOR2;
1185 par[2] = fgkMotherThick2;
1186 par[3] = fgkMotherPhiL2;
1187 par[4] = fgkMotherPhiU2;
1189 gMC->Gsvolu(QuadrantNLayerName(chamber),"TUBS",idAir,par,5);
1190 gMC->Gsvolu(QuadrantFLayerName(chamber),"TUBS",idAir,par,5);
1194 par[0] = kHxInVFrame;
1195 par[1] = kHyInVFrame;
1196 par[2] = kHzInVFrame;
1197 gMC->Gsvolu("SQ00","BOX",idFrameEpoxy,par,3);
1199 //Flat 1mm vertical section
1203 gMC->Gsvolu("SQ01","BOX",idFrameEpoxy,par,3);
1207 // - 3 components (a cuboid and 2 trapezes) and 2 layers (Epoxy/Inox)
1211 // TopFrameAnode - layer 1 of 2
1215 gMC->Gsvolu("SQ02","BOX",idFrameEpoxy,par,3);
1217 // TopFrameAnode - layer 2 of 2
1219 gMC->Gsvolu("SQ03","BOX",idInox,par,3);
1221 // TopFrameAnodeA - layer 1 of 2
1233 gMC->Gsvolu("SQ04","TRAP",idFrameEpoxy,par,11);
1235 // TopFrameAnodeA - layer 2 of 2
1237 gMC->Gsvolu("SQ05","TRAP",idInox,par,11);
1239 // TopFrameAnodeB - layer 1 of 2
1251 gMC->Gsvolu("SQ06","TRAP",idFrameEpoxy,par,11);
1253 // OutTopTrapFrameB - layer 2 of 2
1255 gMC->Gsvolu("SQ07","TRAP",idInox,par,11);
1257 // TopAnode1 - layer 1 of 2
1261 gMC->Gsvolu("SQ08","BOX",idInox,par,3);
1263 // TopAnode1 - layer 2 of 2
1265 gMC->Gsvolu("SQ09","BOX",idFR4,par,11);
1267 // TopAnode2 - layer 1 of 2
1279 gMC->Gsvolu("SQ10","TRAP",idInox,par,11);
1281 // TopAnode2 - layer 2 of 2
1283 gMC->Gsvolu("SQ11","TRAP",idFR4,par,11);
1285 // TopAnode3 - layer 1 of 1
1297 gMC->Gsvolu("SQ12","TRAP",idFR4,par,11);
1311 gMC->Gsvolu("SQ13","TRAP",idCopper,par,11);
1325 gMC->Gsvolu("SQ14","TRAP",idCopper,par,11);
1331 gMC->Gsvolu("SQ15","BOX",idAlu,par,3);
1333 // TopPositioner parameters - single Stainless Steel trapezoid
1345 gMC->Gsvolu("SQ16","TRAP",idInox,par,11);
1348 // OutEdgeTrapFrame Epoxy = (4 trapezes)*2 copies*2 layers (Epoxy/Inox)
1351 // Trapezoid 1 - 2 layers
1357 par[6] = kAlp1OETF1;
1361 par[10] = kAlp2OETF1;
1364 gMC->Gsvolu("SQ17","TRAP",idFrameEpoxy,par,11);
1366 gMC->Gsvolu("SQ18","TRAP",idInox,par,11);
1368 // Trapezoid 2 - 2 layers
1371 par[6] = kAlp1OETF2;
1375 par[10] = kAlp2OETF2;
1378 gMC->Gsvolu("SQ19","TRAP",idFrameEpoxy,par,11);
1380 gMC->Gsvolu("SQ20","TRAP",idInox,par,11);
1382 // Trapezoid 3 - 2 layers
1385 par[6] = kAlp1OETF3;
1389 par[10] = kAlp2OETF3;
1392 gMC->Gsvolu("SQ21","TRAP",idFrameEpoxy,par,11);
1394 gMC->Gsvolu("SQ22","TRAP",idInox,par,11);
1396 // Trapezoid 4 - 2 layers
1400 par[6] = kAlp1OETF4;
1404 par[10] = kAlp2OETF4;
1407 gMC->Gsvolu("SQ23","TRAP",idFrameEpoxy,par,11);
1409 gMC->Gsvolu("SQ24","TRAP",idInox,par,11);
1413 par[0] = kHxOutVFrame;
1414 par[1] = kHyOutVFrame;
1415 par[2] = kHzOutVFrame;
1416 gMC->Gsvolu("SQ25","BOX",idFrameEpoxy,par,3);
1429 par[10] = kAlp2OCTF;
1430 gMC->Gsvolu("SQ26","TRAP",idFrameEpoxy,par,11);
1432 // EarthFaceCu trapezoid
1444 gMC->Gsvolu("SQ27","TRAP",idCopper,par,11);
1446 // VertEarthSteel trapezoid
1458 gMC->Gsvolu("SQ28","TRAP",idInox,par,11);
1460 // VertEarthProfCu trapezoid
1472 gMC->Gsvolu("SQ29","TRAP",idCopper,par,11);
1474 // SuppLateralPositionner cuboid
1478 gMC->Gsvolu("SQ30","BOX",idAlu,par,3);
1480 // LateralPositionerFace
1484 gMC->Gsvolu("SQ31","BOX",idInox,par,3);
1486 // LateralPositionerProfile
1490 gMC->Gsvolu("SQ32","BOX",idInox,par,3); // middle layer
1495 gMC->Gsvolu("SQ33","BOX",idInox,par,3); // near and far layers
1497 // VertCradleA - 1st trapezoid
1509 gMC->Gsvolu("SQ34","TRAP",idAlu,par,11);
1511 // VertCradleB - 2nd trapezoid
1523 gMC->Gsvolu("SQ35","TRAP",idAlu,par,11);
1525 // VertCradleC - 3rd trapezoid
1537 gMC->Gsvolu("SQ36","TRAP",idAlu,par,11);
1539 // VertCradleD - 4th trapezoid
1551 gMC->Gsvolu("SQ37","TRAP",idAlu,par,11);
1553 // LateralSightSupport trapezoid
1565 gMC->Gsvolu("SQ38","TRAP",idAlu,par,11);
1571 gMC->Gsvolu("SQ39","TUBE",idFrameEpoxy,par,3);
1575 par[0] = kHxInHFrame;
1576 par[1] = kHyInHFrame;
1577 par[2] = kHzInHFrame;
1578 gMC->Gsvolu("SQ40","BOX",idFrameEpoxy,par,3);
1580 //Flat 7.5mm horizontal section
1584 gMC->Gsvolu("SQ41","BOX",idFrameEpoxy,par,3);
1593 gMC->Gsvolu("SQ42","TUBS",idFrameEpoxy,par,5);
1596 // ScrewsInFrame - 3 sections in order to avoid overlapping volumes
1597 // Screw Head, in air
1602 gMC->Gsvolu("SQ43","TUBE",idInox,par,3);
1604 // Middle part, in the Epoxy
1608 gMC->Gsvolu("SQ44","TUBE",idInox,par,3);
1610 // Screw nut, in air
1614 gMC->Gsvolu("SQ45","TUBE",idInox,par,3);
1617 // __________________Place volumes in the quadrant ____________
1621 posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyInVFrame;
1623 gMC->Gspos("SQ00",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1625 // keep memory of the mid position. Used for placing screws
1626 const GReal_t kMidVposX = posX;
1627 const GReal_t kMidVposY = posY;
1628 const GReal_t kMidVposZ = posZ;
1630 //Flat 7.5mm vertical section
1631 posX = 2.0*kHxInVFrame+kHxV1mm;
1632 posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyV1mm;
1634 gMC->Gspos("SQ01",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
1636 // TopFrameAnode place 2 layers of TopFrameAnode cuboids
1638 posY = 2.*kHyInHFrame+2.*kHyH1mm+kIAF+2.*kHyInVFrame+kHyTFA;
1639 posZ = kHzOuterFrameInox;
1640 gMC->Gspos("SQ02",1,QuadrantMLayerName(chamber),posX, posY, posZ,0,"ONLY");
1641 posZ = posZ+kHzOuterFrameInox;
1642 gMC->Gspos("SQ03",1,QuadrantMLayerName(chamber),posX, posY, posZ,0,"ONLY");
1644 // place 2 layers of TopFrameAnodeA trapezoids
1645 posX = 35.8932+fgkDeltaQuadLHC;
1646 posY = 92.6745+fgkDeltaQuadLHC;
1647 posZ = kHzOuterFrameInox;
1648 gMC->Gspos("SQ04",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1649 posZ = posZ+kHzOuterFrameInox;
1650 gMC->Gspos("SQ05",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1652 // place 2 layers of TopFrameAnodeB trapezoids
1653 posX = 44.593+fgkDeltaQuadLHC;
1654 posY = 90.737+fgkDeltaQuadLHC;
1655 posZ = kHzOuterFrameInox;
1656 gMC->Gspos("SQ06",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1657 posZ = posZ+kHzOuterFrameInox;
1658 gMC->Gspos("SQ07",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1660 // TopAnode1 place 2 layers
1661 posX = 6.8+fgkDeltaQuadLHC;
1662 posY = 99.85+fgkDeltaQuadLHC;
1663 posZ = -1.*kHzAnodeFR4;
1664 gMC->Gspos("SQ08",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1665 posZ = posZ+kHzTopAnodeSteel1;
1666 gMC->Gspos("SQ09",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1668 // TopAnode2 place 2 layers
1669 posX = 18.534+fgkDeltaQuadLHC;
1670 posY = 99.482+fgkDeltaQuadLHC;
1671 posZ = -1.*kHzAnodeFR4;
1672 gMC->Gspos("SQ10",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1673 posZ = posZ+kHzTopAnodeSteel2;
1674 gMC->Gspos("SQ11",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1676 // TopAnode3 place 1 layer
1677 posX = 25.80+fgkDeltaQuadLHC;
1678 posY = 98.61+fgkDeltaQuadLHC;
1680 gMC->Gspos("SQ12",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1682 // TopEarthFace - 2 copies
1683 posX = 23.122+fgkDeltaQuadLHC;
1684 posY = 96.90+fgkDeltaQuadLHC;
1685 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopEarthFaceCu;
1686 gMC->Gspos("SQ13",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1688 gMC->Gspos("SQ13",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1691 posX = 14.475+fgkDeltaQuadLHC;
1692 posY = 97.900+fgkDeltaQuadLHC;
1693 posZ = kHzTopEarthProfileCu;
1694 gMC->Gspos("SQ14",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1696 gMC->Gspos("SQ14",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1698 // TopGasSupport - 2 copies
1699 posX = 4.9500+fgkDeltaQuadLHC;
1700 posY = 96.200+fgkDeltaQuadLHC;
1701 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopGasSupportAl;
1702 gMC->Gspos("SQ15",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1704 gMC->Gspos("SQ15",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1706 // TopPositioner parameters - single Stainless Steel trapezoid - 2 copies
1707 posX = 7.60+fgkDeltaQuadLHC;
1708 posY = 98.98+fgkDeltaQuadLHC;
1709 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+2.*kHzTopGasSupportAl+kHzTopPositionerSteel;
1710 gMC->Gspos("SQ16",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1712 gMC->Gspos("SQ16",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1718 xCenter[0] = 73.201 + fgkDeltaQuadLHC;
1719 xCenter[1] = 78.124 + fgkDeltaQuadLHC;
1720 //xCenter[2] = 82.862 + fgkDeltaQuadLHC;
1721 xCenter[2] = 83.102 + fgkDeltaQuadLHC;
1722 xCenter[3] = 87.418 + fgkDeltaQuadLHC;
1723 // Fix (5) - overlap of SQ21 with 041M and 125M
1725 yCenter[0] = 68.122 + fgkDeltaQuadLHC;
1726 yCenter[1] = 62.860 + fgkDeltaQuadLHC;
1727 //yCenter[2] = 57.420 + fgkDeltaQuadLHC;
1728 yCenter[2] = 57.660 + fgkDeltaQuadLHC;
1729 yCenter[3] = 51.800 + fgkDeltaQuadLHC;
1730 // Fix (5) - overlap of SQ21 with 041M and 125M
1732 xCenter[4] = 68.122 + fgkDeltaQuadLHC;
1733 xCenter[5] = 62.860 + fgkDeltaQuadLHC;
1734 xCenter[6] = 57.420 + fgkDeltaQuadLHC;
1735 xCenter[7] = 51.800 + fgkDeltaQuadLHC;
1737 yCenter[4] = 73.210 + fgkDeltaQuadLHC;
1738 yCenter[5] = 78.124 + fgkDeltaQuadLHC;
1739 yCenter[6] = 82.862 + fgkDeltaQuadLHC;
1740 yCenter[7] = 87.418 + fgkDeltaQuadLHC;
1742 posZ = -1.0*kHzOuterFrameInox;
1743 gMC->Gspos("SQ17",1,QuadrantMLayerName(chamber), xCenter[0], yCenter[0], posZ, rot2,"ONLY");
1744 gMC->Gspos("SQ17",2,QuadrantMLayerName(chamber), xCenter[4], yCenter[4], posZ, rot3,"ONLY");
1746 gMC->Gspos("SQ19",1,QuadrantMLayerName(chamber), xCenter[1], yCenter[1], posZ, rot2,"ONLY");
1747 gMC->Gspos("SQ19",2,QuadrantMLayerName(chamber), xCenter[5], yCenter[5], posZ, rot3,"ONLY");
1749 gMC->Gspos("SQ21",1,QuadrantMLayerName(chamber), xCenter[2], yCenter[2], posZ, rot2,"ONLY");
1750 gMC->Gspos("SQ21",2,QuadrantMLayerName(chamber), xCenter[6], yCenter[6], posZ, rot3,"ONLY");
1752 gMC->Gspos("SQ23",1,QuadrantMLayerName(chamber), xCenter[3], yCenter[3], posZ, rot2,"ONLY");
1753 gMC->Gspos("SQ23",2,QuadrantMLayerName(chamber), xCenter[7], yCenter[7], posZ, rot3,"ONLY");
1755 posZ = posZ+kHzOuterFrameEpoxy;
1757 gMC->Gspos("SQ18",1,QuadrantMLayerName(chamber), xCenter[0], yCenter[0], posZ, rot2,"ONLY");
1758 gMC->Gspos("SQ18",2,QuadrantMLayerName(chamber), xCenter[4], yCenter[4], posZ, rot3,"ONLY");
1760 gMC->Gspos("SQ20",1,QuadrantMLayerName(chamber), xCenter[1], yCenter[1], posZ, rot2,"ONLY");
1761 gMC->Gspos("SQ20",2,QuadrantMLayerName(chamber), xCenter[5], yCenter[5], posZ, rot3,"ONLY");
1763 gMC->Gspos("SQ22",1,QuadrantMLayerName(chamber), xCenter[2], yCenter[2], posZ, rot2,"ONLY");
1764 gMC->Gspos("SQ22",2,QuadrantMLayerName(chamber), xCenter[6], yCenter[6], posZ, rot3,"ONLY");
1766 gMC->Gspos("SQ24",1,QuadrantMLayerName(chamber), xCenter[3], yCenter[3], posZ, rot2,"ONLY");
1767 gMC->Gspos("SQ24",2,QuadrantMLayerName(chamber), xCenter[7], yCenter[7], posZ, rot3,"ONLY");
1772 posX = 2.*kHxInVFrame+kIAF+2.*kHxInHFrame-kHxOutVFrame+2.*kHxV1mm;
1773 posY = 2.*kHyInHFrame+kHyOutVFrame;
1775 gMC->Gspos("SQ25",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1777 // keep memory of the mid position. Used for placing screws
1778 const GReal_t kMidOVposX = posX;
1779 const GReal_t kMidOVposY = posY;
1780 const GReal_t kMidOVposZ = posZ;
1782 const Float_t kTOPY = posY+kHyOutVFrame;
1783 const Float_t kOUTX = posX;
1787 posY = kTOPY+((kBl1OCTF+kTl1OCTF)/2.);
1789 gMC->Gspos("SQ26",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1791 // VertEarthFaceCu - 2 copies
1792 posX = 89.4000+fgkDeltaQuadLHC;
1793 posY = 25.79+fgkDeltaQuadLHC;
1794 posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertEarthFaceCu;
1795 gMC->Gspos("SQ27",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1797 gMC->Gspos("SQ27",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1799 // VertEarthSteel - 2 copies
1800 posX = 91.00+fgkDeltaQuadLHC;
1801 posY = 30.616+fgkDeltaQuadLHC;
1802 posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertBarSteel;
1803 gMC->Gspos("SQ28",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1805 gMC->Gspos("SQ28",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1807 // VertEarthProfCu - 2 copies
1808 posX = 92.000+fgkDeltaQuadLHC;
1809 posY = 29.64+fgkDeltaQuadLHC;
1810 posZ = kHzFrameThickness;
1811 gMC->Gspos("SQ29",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1813 gMC->Gspos("SQ29",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1815 // SuppLateralPositionner - 2 copies
1816 posX = 90.2-kNearFarLHC;
1817 posY = 5.00-kNearFarLHC;
1818 posZ = kHzLateralPosnAl-fgkMotherThick2;
1819 gMC->Gspos("SQ30",1,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1821 gMC->Gspos("SQ30",2,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1823 // LateralPositionner - 2 copies - Face view
1824 posX = 92.175-kNearFarLHC-2.*kHxLPP;
1825 posY = 5.00-kNearFarLHC;
1826 posZ =2.0*kHzLateralPosnAl+kHzLateralPosnInoxFace-fgkMotherThick2;
1827 gMC->Gspos("SQ31",1,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1829 gMC->Gspos("SQ31",2,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1831 // LateralPositionner - Profile view
1832 posX = 92.175+fgkDeltaQuadLHC+kHxLPF-kHxLPP;
1833 posY = 5.00+fgkDeltaQuadLHC;
1835 gMC->Gspos("SQ32",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // middle layer
1837 posX = 92.175-kNearFarLHC+kHxLPF-kHxLPP;
1838 posY = 5.0000-kNearFarLHC;
1839 posZ = fgkMotherThick2-kHzLPNF;
1840 gMC->Gspos("SQ33",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // near layer
1842 gMC->Gspos("SQ33",2,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // far layer
1844 // VertCradleA 1st Trapezoid - 3 copies
1845 posX = 95.73+fgkDeltaQuadLHC;
1846 posY = 33.26+fgkDeltaQuadLHC;
1848 gMC->Gspos("SQ34",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1850 posX = 95.73-kNearFarLHC;
1851 posY = 33.26-kNearFarLHC;
1852 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
1853 gMC->Gspos("SQ34",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1855 gMC->Gspos("SQ34",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1857 // VertCradleB 2nd Trapezoid - 3 copies
1858 posX = 97.29+fgkDeltaQuadLHC;
1859 posY = 23.02+fgkDeltaQuadLHC;
1861 gMC->Gspos("SQ35",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1863 posX = 97.29-kNearFarLHC;
1864 posY = 23.02-kNearFarLHC;
1865 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
1866 gMC->Gspos("SQ35",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1868 gMC->Gspos("SQ35",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1870 // OutVertCradleC 3rd Trapeze - 3 copies
1871 posX = 98.31+fgkDeltaQuadLHC;
1872 posY = 12.77+fgkDeltaQuadLHC;
1874 gMC->Gspos("SQ36",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1876 posX = 98.05-kNearFarLHC;
1877 posY = 12.77-kNearFarLHC;
1878 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
1879 // Fix (2) of extrusion SQ36 from SQN1, SQN2, SQF1, SQF2
1880 // (was posX = 98.31 ...)
1881 gMC->Gspos("SQ36",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1883 gMC->Gspos("SQ36",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1885 // OutVertCradleD 4th Trapeze - 3 copies
1886 posX = 98.81+fgkDeltaQuadLHC;
1887 posY = 2.52+fgkDeltaQuadLHC;
1889 gMC->Gspos("SQ37",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1891 posZ = fgkMotherThick1-kHzVerticalCradleAl;
1892 gMC->Gspos("SQ37",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1894 gMC->Gspos("SQ37",3,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1896 // LateralSightSupport - 2 copies
1897 posX = 98.33-kNearFarLHC;
1898 posY = 10.00-kNearFarLHC;
1899 posZ = kHzLateralSightAl-fgkMotherThick2;
1900 // Fix (3) of extrusion SQ38 from SQN1, SQN2, SQF1, SQF2
1901 // (was posX = 98.53 ...)
1902 gMC->Gspos("SQ38",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1904 gMC->Gspos("SQ38",2,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1907 posX = 92.84+fgkDeltaQuadLHC;
1908 posY = 8.13+fgkDeltaQuadLHC;
1910 gMC->Gspos("SQ39",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1915 posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxInHFrame;
1918 gMC->Gspos("SQ40",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1920 // keep memory of the mid position. Used for placing screws
1921 const GReal_t kMidHposX = posX;
1922 const GReal_t kMidHposY = posY;
1923 const GReal_t kMidHposZ = posZ;
1925 // Flat 7.5mm horizontal section
1926 posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxH1mm;
1927 posY = 2.0*kHyInHFrame+kHyH1mm;
1929 gMC->Gspos("SQ41",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
1932 posX = 2.0*kHxInVFrame+2.*kHxV1mm;
1933 posY = 2.0*kHyInHFrame+2.*kHyH1mm;
1935 gMC->Gspos("SQ42",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
1937 // keep memory of the mid position. Used for placing screws
1938 const GReal_t kMidArcposX = posX;
1939 const GReal_t kMidArcposY = posY;
1940 const GReal_t kMidArcposZ = posZ;
1942 // ScrewsInFrame - in sensitive volume
1947 // Screws on IHEpoxyFrame
1949 const Int_t kNumberOfScrewsIH = 14; // no. of screws on the IHEpoxyFrame
1950 const Float_t kOffX = 5.; // inter-screw distance
1952 // first screw coordinates
1955 // other screw coordinates
1956 for (Int_t i = 1;i<kNumberOfScrewsIH;i++){
1957 scruX[i] = scruX[i-1]+kOffX;
1958 scruY[i] = scruY[0];
1960 // Position the volumes on the frames
1961 for (Int_t i = 0;i<kNumberOfScrewsIH;i++){
1962 posX = fgkDeltaQuadLHC + scruX[i];
1963 posY = fgkDeltaQuadLHC + scruY[i];
1965 gMC->Gspos("SQ43",i+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1967 gMC->Gspos("SQ44",i+1,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
1968 gMC->Gspos("SQ45",i+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1970 // special screw coordinates
1973 posX = fgkDeltaQuadLHC + scruX[63];
1974 posY = fgkDeltaQuadLHC + scruY[63];
1976 gMC->Gspos("SQ43",64,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1978 gMC->Gspos("SQ44",64,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
1979 gMC->Gspos("SQ45",64,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1981 // Screws on the IVEpoxyFrame
1983 const Int_t kNumberOfScrewsIV = 15; // no. of screws on the IVEpoxyFrame
1984 const Float_t kOffY = 5.; // inter-screw distance
1985 Int_t firstScrew = 58;
1986 Int_t lastScrew = 44;
1988 // first (special) screw coordinates
1989 scruX[firstScrew-1] = -2.23;
1990 scruY[firstScrew-1] = 16.3;
1991 // second (repetitive) screw coordinates
1992 scruX[firstScrew-2] = -2.23;
1993 scruY[firstScrew-2] = 21.07;
1994 // other screw coordinates
1995 for (Int_t i = firstScrew-3;i>lastScrew-2;i--){
1996 scruX[i] = scruX[firstScrew-2];
1997 scruY[i] = scruY[i+1]+kOffY;
2000 for (Int_t i = 0;i<kNumberOfScrewsIV;i++){
2001 posX = fgkDeltaQuadLHC + scruX[i+lastScrew-1];
2002 posY = fgkDeltaQuadLHC + scruY[i+lastScrew-1];
2004 gMC->Gspos("SQ43",i+lastScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2006 gMC->Gspos("SQ44",i+lastScrew,"SQ00",posX+0.1-kMidVposX, posY+0.1-kMidVposY, posZ-kMidVposZ, 0, "ONLY");
2007 gMC->Gspos("SQ45",i+lastScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
2010 // Screws on the OVEpoxyFrame
2012 const Int_t kNumberOfScrewsOV = 10; // no. of screws on the OVEpoxyFrame
2017 // first (repetitive) screw coordinates
2018 // notes: 1st screw should be placed in volume 40 (InnerHorizFrame)
2019 scruX[firstScrew-1] = 90.9;
2020 scruY[firstScrew-1] = -2.23; // true value
2022 // other screw coordinates
2023 for (Int_t i = firstScrew; i<lastScrew; i++ ){
2024 scruX[i] = scruX[firstScrew-1];
2025 scruY[i] = scruY[i-1]+kOffY;
2027 for (Int_t i = 1;i<kNumberOfScrewsOV;i++){
2028 posX = fgkDeltaQuadLHC + scruX[i+firstScrew-1];
2029 posY = fgkDeltaQuadLHC + scruY[i+firstScrew-1];
2031 gMC->Gspos("SQ43",i+firstScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2034 gMC->Gspos("SQ44",i+firstScrew,"SQ25",posX+0.1-kMidOVposX, posY+0.1-kMidOVposY, posZ-kMidOVposZ, 0, "ONLY");
2035 gMC->Gspos("SQ45",i+firstScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
2037 // special case for 1st screw, inside the horizontal frame (volume 40)
2038 posX = fgkDeltaQuadLHC + scruX[firstScrew-1];
2039 posY = fgkDeltaQuadLHC + scruY[firstScrew-1];
2042 gMC->Gspos("SQ44",firstScrew,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
2044 // Inner Arc of Frame, screw positions and numbers-1
2045 scruX[62] = 16.009; scruY[62] = 1.401;
2046 scruX[61] = 14.564; scruY[61] = 6.791;
2047 scruX[60] = 11.363; scruY[60] = 11.363;
2048 scruX[59] = 6.791 ; scruY[59] = 14.564;
2049 scruX[58] = 1.401 ; scruY[58] = 16.009;
2051 for (Int_t i = 0;i<5;i++){
2052 posX = fgkDeltaQuadLHC + scruX[i+58];
2053 posY = fgkDeltaQuadLHC + scruY[i+58];
2055 gMC->Gspos("SQ43",i+58+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2057 gMC->Gspos("SQ44",i+58+1,"SQ42",posX+0.1-kMidArcposX, posY+0.1-kMidArcposY, posZ-kMidArcposZ, 0, "ONLY");
2058 gMC->Gspos("SQ45",i+58+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
2062 //______________________________________________________________________________
2063 void AliMUONSt1GeometryBuilderV2::PlaceInnerLayers(Int_t chamber)
2065 /// Place the gas and copper layers for the specified chamber.
2067 // Rotation Matrices
2068 Int_t rot1, rot2, rot3, rot4;
2070 fMUON->AliMatrix(rot1, 90., 315., 90., 45., 0., 0.); // -45 deg
2071 fMUON->AliMatrix(rot2, 90., 90., 90., 180., 0., 0.); // 90 deg
2072 fMUON->AliMatrix(rot3, 90., 270., 90., 0., 0., 0.); // -90 deg
2073 fMUON->AliMatrix(rot4, 90., 45., 90., 135., 0., 0.); // deg
2078 GReal_t zc = fgkHzGas + fgkHzPadPlane;
2079 Int_t dpos = (chamber-1)*2;
2082 x = 14.53 + fgkDeltaQuadLHC;
2083 y = 53.34 + fgkDeltaQuadLHC;
2084 name = GasVolumeName("SAG", chamber);
2085 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2086 gMC->Gspos("SA1C", 1+dpos, QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2087 gMC->Gspos("SA1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2089 x = 40.67 + fgkDeltaQuadLHC;
2090 y = 40.66 + fgkDeltaQuadLHC;
2091 name = GasVolumeName("SBG", chamber);
2092 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot1,"ONLY");
2093 gMC->Gspos("SB1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot1,"ONLY");
2094 gMC->Gspos("SB1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,rot1,"ONLY");
2096 x = 53.34 + fgkDeltaQuadLHC;
2097 y = 14.52 + fgkDeltaQuadLHC;
2098 name = GasVolumeName("SCG", chamber);
2099 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot2,"ONLY");
2100 gMC->Gspos("SC1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot2,"ONLY");
2101 gMC->Gspos("SC1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot2,"ONLY");
2103 x = 5.83 + fgkDeltaQuadLHC;
2104 y = 17.29 + fgkDeltaQuadLHC;
2105 name = GasVolumeName("SDG", chamber);
2106 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot3,"ONLY");
2107 gMC->Gspos("SD1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot3,"ONLY");
2108 gMC->Gspos("SD1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot3,"ONLY");
2110 x = 9.04 + fgkDeltaQuadLHC;
2111 y = 16.91 + fgkDeltaQuadLHC;
2112 name = GasVolumeName("SEG", chamber);
2113 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2114 gMC->Gspos("SE1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2115 gMC->Gspos("SE1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2117 x = 10.12 + fgkDeltaQuadLHC;
2118 y = 14.67 + fgkDeltaQuadLHC;
2119 name = GasVolumeName("SFG", chamber);
2120 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2121 gMC->Gspos("SF1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2122 gMC->Gspos("SF1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2124 x = 8.2042 + fgkDeltaQuadLHC;
2125 y = 16.19 + fgkDeltaQuadLHC;
2126 name = GasVolumeName("SGG", chamber);
2127 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2128 gMC->Gspos("SG1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2129 gMC->Gspos("SG1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2131 x = 14.68 + fgkDeltaQuadLHC;
2132 y = 10.10 + fgkDeltaQuadLHC;
2133 name = GasVolumeName("SHG", chamber);
2134 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2135 gMC->Gspos("SH1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2136 gMC->Gspos("SH1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2138 x = 16.21 + fgkDeltaQuadLHC;
2139 y = 8.17 + fgkDeltaQuadLHC;
2140 name = GasVolumeName("SIG", chamber);
2141 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2142 gMC->Gspos("SI1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2143 gMC->Gspos("SI1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2145 x = 16.92 + fgkDeltaQuadLHC;
2146 y = 9.02 + fgkDeltaQuadLHC;
2147 name = GasVolumeName("SJG", chamber);
2148 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot3,"ONLY");
2149 gMC->Gspos("SJ1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot3,"ONLY");
2150 gMC->Gspos("SJ1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot3,"ONLY");
2152 x = 17.30 + fgkDeltaQuadLHC;
2153 y = 5.85 + fgkDeltaQuadLHC;
2154 name = GasVolumeName("SKG", chamber);
2155 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2156 gMC->Gspos("SK1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2157 gMC->Gspos("SK1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2160 //______________________________________________________________________________
2161 void AliMUONSt1GeometryBuilderV2::PlaceSector(AliMpSector* sector,SpecialMap specialMap,
2162 const TVector3& where, Bool_t reflectZ, Int_t chamber)
2164 /// Place all the segments in the mother volume, at the position defined
2165 /// by the sector's data.
2169 static Int_t segNum=1;
2176 reflZ=0; // no reflection along z... nothing
2177 fMUON->AliMatrix(rotMat, 90.,90.,90,180.,0.,0.); // 90° rotation around z, NO reflection along z
2180 fMUON->AliMatrix(reflZ, 90.,0.,90,90.,180.,0.); // reflection along z
2181 fMUON->AliMatrix(rotMat, 90.,90.,90,180.,180.,0.); // 90° rotation around z AND reflection along z
2184 GReal_t posX,posY,posZ;
2187 vector<Int_t> alreadyDone;
2191 TArrayI alreadyDone(20);
2192 Int_t nofAlreadyDone = 0;
2195 for (Int_t irow=0;irow<sector->GetNofRows();irow++){ // for each row
2196 AliMpRow* row = sector->GetRow(irow);
2199 for (Int_t iseg=0;iseg<row->GetNofRowSegments();iseg++){ // for each row segment
2200 AliMpVRowSegment* seg = row->GetRowSegment(iseg);
2203 SpecialMap::iterator iter
2204 = specialMap.find(seg->GetMotifPositionId(0));
2206 if ( iter == specialMap.end()){ //if this is a normal segment (ie. not part of <specialMap>)
2210 Long_t value = specialMap.GetValue(seg->GetMotifPositionId(0));
2212 if ( value == 0 ){ //if this is a normal segment (ie. not part of <specialMap>)
2215 // create the cathode part
2216 CreatePlaneSegment(segNum, seg->Dimensions(), seg->GetNofMotifs());
2218 posX = where.X() + seg->Position().X();
2219 posY = where.Y() + seg->Position().Y();
2220 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
2221 gMC->Gspos(PlaneSegmentName(segNum).Data(), 1,
2222 QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2224 // and place all the daughter boards of this segment
2225 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {
2228 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2229 AliMpMotifPosition* motifPos =
2230 sector->GetMotifMap()->FindMotifPosition(motifPosId);
2231 Int_t copyNo = motifPosId;
2232 if ( sector->GetDirection() == kX) copyNo += fgkDaughterCopyNoOffset;
2235 posX = where.X() + motifPos->Position().X() + fgkOffsetX;
2236 posY = where.Y() + motifPos->Position().Y() + fgkOffsetY;
2237 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
2239 gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2245 // if this is a special segment
2246 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {// for each motif
2248 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2251 if (find(alreadyDone.begin(),alreadyDone.end(),motifPosId)
2252 != alreadyDone.end()) continue; // don't treat the same motif twice
2254 AliMUONSt1SpecialMotif spMot = specialMap[motifPosId];
2257 Bool_t isDone = false;
2259 while (i<nofAlreadyDone && !isDone) {
2260 if (alreadyDone.At(i) == motifPosId) isDone=true;
2263 if (isDone) continue; // don't treat the same motif twice
2265 AliMUONSt1SpecialMotif spMot = *((AliMUONSt1SpecialMotif*)specialMap.GetValue(motifPosId));
2268 // cout << chamber << " processing special motif: " << motifPosId << endl;
2270 AliMpMotifPosition* motifPos = sector->GetMotifMap()->FindMotifPosition(motifPosId);
2273 Int_t copyNo = motifPosId;
2274 if ( sector->GetDirection() == kX) copyNo += fgkDaughterCopyNoOffset;
2276 // place the hole for the motif, wrt the requested rotation angle
2277 Int_t rot = ( spMot.GetRotAngle()<0.1 ) ? reflZ:rotMat;
2279 posX = where.X() + motifPos->Position().X() + spMot.GetDelta().X();
2280 posY = where.Y() + motifPos->Position().Y() + spMot.GetDelta().Y();
2281 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
2282 gMC->Gspos(fgkHoleName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
2284 // then place the daughter board for the motif, wrt the requested rotation angle
2285 posX = posX+fgkDeltaFilleEtamX;
2286 posY = posY+fgkDeltaFilleEtamY;
2287 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
2288 gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
2291 alreadyDone.push_back(motifPosId);// mark this motif as done
2294 if (nofAlreadyDone == alreadyDone.GetSize())
2295 alreadyDone.Set(2*nofAlreadyDone);
2296 alreadyDone.AddAt(motifPosId, nofAlreadyDone++);
2299 // cout << chamber << " processed motifPosId: " << motifPosId << endl;
2301 }// end of special motif case
2307 //______________________________________________________________________________
2308 TString AliMUONSt1GeometryBuilderV2::GasVolumeName(const TString& name, Int_t chamber) const
2310 /// Insert the chamber number into the name.
2312 TString newString(name);
2317 newString.Insert(2, number);
2326 //______________________________________________________________________________
2327 void AliMUONSt1GeometryBuilderV2::CreateMaterials()
2329 /// Define materials specific to station 1
2331 // Materials and medias defined in MUONv1:
2333 // AliMaterial( 9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
2334 // AliMaterial(10, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
2335 // AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
2336 // AliMixture( 19, "Bakelite$", abak, zbak, dbak, -3, wbak);
2337 // AliMixture( 20, "ArC4H10 GAS$", ag, zg, dg, 3, wg);
2338 // AliMixture( 21, "TRIG GAS$", atrig, ztrig, dtrig, -5, wtrig);
2339 // AliMixture( 22, "ArCO2 80%$", ag1, zg1, dg1, 3, wg1);
2340 // AliMixture( 23, "Ar-freon $", atr1, ztr1, dtr1, 4, wtr1);
2341 // AliMixture( 24, "ArCO2 GAS$", agas, zgas, dgas, 3, wgas);
2342 // AliMaterial(31, "COPPER$", 63.54, 29., 8.96, 1.4, 0.);
2343 // AliMixture( 32, "Vetronite$",aglass, zglass, dglass, 5, wglass);
2344 // AliMaterial(33, "Carbon$", 12.01, 6., 2.265, 18.8, 49.9);
2345 // AliMixture( 34, "Rohacell$", arohac, zrohac, drohac, -4, wrohac);
2347 // AliMedium( 1, "AIR_CH_US ", 15, 1, iSXFLD, ...
2348 // AliMedium( 4, "ALU_CH_US ", 9, 0, iSXFLD, ...
2349 // AliMedium( 5, "ALU_CH_US ", 10, 0, iSXFLD, ...
2350 // AliMedium( 6, "AR_CH_US ", 20, 1, iSXFLD, ...
2351 // AliMedium( 7, "GAS_CH_TRIGGER ", 21, 1, iSXFLD, ...
2352 // AliMedium( 8, "BAKE_CH_TRIGGER ", 19, 0, iSXFLD, ...
2353 // AliMedium( 9, "ARG_CO2 ", 22, 1, iSXFLD, ...
2354 // AliMedium(11, "PCB_COPPER ", 31, 0, iSXFLD, ...
2355 // AliMedium(12, "VETRONITE ", 32, 0, iSXFLD, ...
2356 // AliMedium(13, "CARBON ", 33, 0, iSXFLD, ...
2357 // AliMedium(14, "Rohacell ", 34, 0, iSXFLD, ...
2360 // --- Define materials for GEANT ---
2363 fMUON->AliMaterial(41, "Aluminium II$", 26.98, 13., 2.7, -8.9, 26.1);
2365 // from PDG and "The Particle Detector BriefBook", Bock and Vasilescu, P.18
2366 // ??? same but the last but one argument < 0
2368 // --- Define mixtures for GEANT ---
2371 // Ar-CO2 gas II (80%+20%)
2372 Float_t ag1[2] = { 39.95, 44.01};
2373 Float_t zg1[2] = { 18., 22.};
2374 Float_t wg1[2] = { .8, 0.2};
2375 Float_t dg1 = .001821;
2376 fMUON->AliMixture(45, "ArCO2 II 80%$", ag1, zg1, dg1, 2, wg1);
2378 // use wg1 weighting factors (6th arg > 0)
2380 // Rohacell 51 II - imide methacrylique
2381 Float_t aRohacell51[4] = { 12.01, 1.01, 16.00, 14.01};
2382 Float_t zRohacell51[4] = { 6., 1., 8., 7.};
2383 Float_t wRohacell51[4] = { 9., 13., 2., 1.};
2384 Float_t dRohacell51 = 0.052;
2385 fMUON->AliMixture(46, "FOAM$",aRohacell51,zRohacell51,dRohacell51,-4,wRohacell51);
2387 // use relative A (molecular) values (6th arg < 0)
2389 Float_t aSnPb[2] = { 118.69, 207.19};
2390 Float_t zSnPb[2] = { 50, 82};
2391 Float_t wSnPb[2] = { 0.6, 0.4} ;
2392 Float_t dSnPb = 8.926;
2393 fMUON->AliMixture(47, "SnPb$", aSnPb,zSnPb,dSnPb,2,wSnPb);
2395 // use wSnPb weighting factors (6th arg > 0)
2397 // plastic definition from K5, Freiburg (found on web)
2398 Float_t aPlastic[2]={ 1.01, 12.01};
2399 Float_t zPlastic[2]={ 1, 6};
2400 Float_t wPlastic[2]={ 1, 1};
2401 Float_t denPlastic=1.107;
2402 fMUON->AliMixture(48, "Plastic$",aPlastic,zPlastic,denPlastic,-2,wPlastic);
2404 // use relative A (molecular) values (6th arg < 0)...no other info...
2406 // Not used, to be removed
2410 // Inox/Stainless Steel (18%Cr, 9%Ni)
2411 Float_t aInox[3] = {55.847, 51.9961, 58.6934};
2412 Float_t zInox[3] = {26., 24., 28.};
2413 Float_t wInox[3] = {0.73, 0.18, 0.09};
2414 Float_t denInox = 7.930;
2415 fMUON->AliMixture(50, "StainlessSteel$",aInox,zInox,denInox,3,wInox);
2417 // use wInox weighting factors (6th arg > 0)
2418 // from CERN note NUFACT Note023, Oct.2000
2420 // End - Not used, to be removed
2423 // --- Define the tracking medias for GEANT ---
2426 GReal_t epsil = .001; // Tracking precision,
2427 //GReal_t stemax = -1.; // Maximum displacement for multiple scat
2428 GReal_t tmaxfd = -20.; // Maximum angle due to field deflection
2429 //GReal_t deemax = -.3; // Maximum fractional energy loss, DLS
2430 GReal_t stmin = -.8;
2431 GReal_t maxStepAlu = fMUON->GetMaxStepAlu();
2432 GReal_t maxDestepAlu = fMUON->GetMaxDestepAlu();
2433 GReal_t maxStepGas = fMUON->GetMaxStepGas();
2434 Int_t iSXFLD = gAlice->Field()->PrecInteg();
2435 Float_t sXMGMX = gAlice->Field()->Max();
2437 fMUON->AliMedium(21, "ALU_II$", 41, 0, iSXFLD, sXMGMX,
2438 tmaxfd, maxStepAlu, maxDestepAlu, epsil, stmin);
2440 // was med: 15 mat: 31
2441 fMUON->AliMedium(24, "FrameCH$", 44, 1, iSXFLD, sXMGMX,
2442 10.0, 0.001, 0.001, 0.001, 0.001);
2443 // was med: 20 mat: 36
2444 fMUON->AliMedium(25, "ARG_CO2_II", 45, 1, iSXFLD, sXMGMX,
2445 tmaxfd, maxStepGas, maxDestepAlu, epsil, stmin);
2446 // was med: 9 mat: 22
2447 fMUON->AliMedium(26, "FOAM_CH$", 46, 0, iSXFLD, sXMGMX,
2448 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ;
2449 // was med: 16 mat: 32
2450 fMUON->AliMedium(27, "SnPb$", 47, 0, iSXFLD, sXMGMX,
2451 10.0, 0.01, 1.0, 0.003, 0.003);
2452 // was med: 19 mat: 35
2453 fMUON->AliMedium(28, "Plastic$", 48, 0, iSXFLD, sXMGMX,
2454 10.0, 0.01, 1.0, 0.003, 0.003);
2455 // was med: 17 mat: 33
2457 // Not used, to be romoved
2460 fMUON->AliMedium(30, "InoxBolts$", 50, 1, iSXFLD, sXMGMX,
2461 10.0, 0.01, 1.0, 0.003, 0.003);
2462 // was med: 21 mat: 37
2464 // End - Not used, to be removed
2467 //______________________________________________________________________________
2468 void AliMUONSt1GeometryBuilderV2::CreateGeometry()
2470 /// Create the detailed GEANT geometry for the dimuon arm station1
2472 AliDebug(1,"Called");
2474 // Define chamber volumes as virtual
2477 // Create basic volumes
2480 CreateDaughterBoard();
2481 CreateInnerLayers();
2483 // Create reflexion matrices
2486 Int_t reflXZ, reflYZ, reflXY;
2487 fMUON->AliMatrix(reflXZ, 90., 180., 90., 90., 180., 0.);
2488 fMUON->AliMatrix(reflYZ, 90., 0., 90.,-90., 180., 0.);
2489 fMUON->AliMatrix(reflXY, 90., 180., 90., 270., 0., 0.);
2491 // Define transformations for each quadrant
2492 // In old coordinate system: In new coordinate system:
2495 // II. | I. I. | II.
2497 // _____ | ____ _____ | ____
2499 // III. | IV. IV. | III.
2504 rotm[0]=0; // quadrant I
2505 rotm[1]=reflXZ; // quadrant II
2506 rotm[2]=reflXY; // quadrant III
2507 rotm[3]=reflYZ; // quadrant IV
2509 TGeoRotation rotm[4];
2510 rotm[0] = TGeoRotation("identity");
2511 rotm[1] = TGeoRotation("reflXZ", 90., 180., 90., 90., 180., 0.);
2512 rotm[2] = TGeoRotation("reflXY", 90., 180., 90., 270., 0., 0.);
2513 rotm[3] = TGeoRotation("reflYZ", 90., 0., 90.,-90., 180., 0.);
2516 scale[0] = TVector3( 1, 1, 1); // quadrant I
2517 scale[1] = TVector3(-1, 1, -1); // quadrant II
2518 scale[2] = TVector3(-1, -1, 1); // quadrant III
2519 scale[3] = TVector3( 1, -1, -1); // quadrant IV
2522 detElemId[0] = 1; // quadrant I
2523 detElemId[1] = 0; // quadrant II
2524 detElemId[2] = 3; // quadrant III
2525 detElemId[3] = 2; // quadrant IV
2527 // Shift in Z of the middle layer
2528 Double_t deltaZ = 7.5/2.;
2530 // Position of quadrant I wrt to the chamber position
2531 // TVector3 pos0(-fgkDeltaQuadLHC, -fgkDeltaQuadLHC, deltaZ);
2533 // Shift for near/far layers
2534 GReal_t shiftXY = fgkFrameOffset;
2535 GReal_t shiftZ = fgkMotherThick1+fgkMotherThick2;
2537 // Build two chambers
2539 for (Int_t ich=1; ich<3; ich++) {
2541 // Create quadrant volume
2542 CreateQuadrant(ich);
2544 // Place gas volumes
2545 PlaceInnerLayers(ich);
2547 // Place the quadrant
2548 for (Int_t i=0; i<4; i++) {
2551 GReal_t posx0, posy0, posz0;
2552 posx0 = fgkPadXOffsetBP * scale[i].X();
2553 posy0 = fgkPadYOffsetBP * scale[i].Y();;
2554 posz0 = deltaZ * scale[i].Z();
2556 ->AddEnvelope(QuadrantEnvelopeName(ich,i), detElemId[i] + ich*100, true,
2557 TGeoTranslation(posx0, posy0, posz0), rotm[i]);
2560 GReal_t posx, posy, posz;
2561 posx = -fgkDeltaQuadLHC - fgkPadXOffsetBP;
2562 posy = -fgkDeltaQuadLHC - fgkPadYOffsetBP;
2565 ->AddEnvelopeConstituent(QuadrantMLayerName(ich), QuadrantEnvelopeName(ich,i),
2566 i+1, TGeoTranslation(posx, posy, posz));
2569 GReal_t posx2 = posx + shiftXY;;
2570 GReal_t posy2 = posy + shiftXY;;
2571 GReal_t posz2 = posz - shiftZ;;
2572 //gMC->Gspos(QuadrantNLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
2574 ->AddEnvelopeConstituent(QuadrantNLayerName(ich), QuadrantEnvelopeName(ich,i),
2575 i+1, TGeoTranslation(posx2, posy2, posz2));
2577 posz2 = posz + shiftZ;
2578 //gMC->Gspos(QuadrantFLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
2580 ->AddEnvelopeConstituent(QuadrantFLayerName(ich), QuadrantEnvelopeName(ich,i),
2581 i+1, TGeoTranslation(posx2, posy2, posz2));
2586 //______________________________________________________________________________
2587 void AliMUONSt1GeometryBuilderV2::SetTransformations()
2589 /// Define the transformations for the station2 chambers.
2591 if (gAlice->GetModule("SHIL")) {
2592 SetMotherVolume(0, "YOUT1");
2593 SetMotherVolume(1, "YOUT1");
2596 SetVolume(0, "SC01", true);
2597 SetVolume(1, "SC02", true);
2599 Double_t zpos1 = - AliMUONConstants::DefaultChamberZ(0);
2600 SetTranslation(0, TGeoTranslation(0., 0., zpos1));
2602 Double_t zpos2 = - AliMUONConstants::DefaultChamberZ(1);
2603 SetTranslation(1, TGeoTranslation(0., 0., zpos2));
2606 //______________________________________________________________________________
2607 void AliMUONSt1GeometryBuilderV2::SetSensitiveVolumes()
2609 /// Define the sensitive volumes for station2 chambers.
2611 GetGeometry(0)->SetSensitiveVolume("SA1G");
2612 GetGeometry(0)->SetSensitiveVolume("SB1G");
2613 GetGeometry(0)->SetSensitiveVolume("SC1G");
2614 GetGeometry(0)->SetSensitiveVolume("SD1G");
2615 GetGeometry(0)->SetSensitiveVolume("SE1G");
2616 GetGeometry(0)->SetSensitiveVolume("SF1G");
2617 GetGeometry(0)->SetSensitiveVolume("SG1G");
2618 GetGeometry(0)->SetSensitiveVolume("SH1G");
2619 GetGeometry(0)->SetSensitiveVolume("SI1G");
2620 GetGeometry(0)->SetSensitiveVolume("SJ1G");
2621 GetGeometry(0)->SetSensitiveVolume("SK1G");
2623 GetGeometry(1)->SetSensitiveVolume("SA2G");
2624 GetGeometry(1)->SetSensitiveVolume("SB2G");
2625 GetGeometry(1)->SetSensitiveVolume("SC2G");
2626 GetGeometry(1)->SetSensitiveVolume("SD2G");
2627 GetGeometry(1)->SetSensitiveVolume("SE2G");
2628 GetGeometry(1)->SetSensitiveVolume("SF2G");
2629 GetGeometry(1)->SetSensitiveVolume("SG2G");
2630 GetGeometry(1)->SetSensitiveVolume("SH2G");
2631 GetGeometry(1)->SetSensitiveVolume("SI2G");
2632 GetGeometry(1)->SetSensitiveVolume("SJ2G");
2633 GetGeometry(1)->SetSensitiveVolume("SK2G");