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 //-----------------------------------------------------------------------------
19 // Class AliMUONSt1GeometryBuilderV2
20 // ---------------------------------
21 // MUON Station1 detailed geometry construction class.
22 // (Originally defined in AliMUONv2.cxx - now removed.)
23 // Included in AliRoot 2004/01/23
24 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
25 //-----------------------------------------------------------------------------
27 #include "AliMUONSt1GeometryBuilderV2.h"
28 #include "AliMUONSt1SpecialMotif.h"
30 #include "AliMUONConstants.h"
31 #include "AliMUONGeometryModule.h"
32 #include "AliMUONGeometryEnvelopeStore.h"
34 #include "AliMpSegmentation.h"
35 #include "AliMpDEManager.h"
36 #include "AliMpContainers.h"
37 #include "AliMpConstants.h"
39 #include "AliMpSectorSegmentation.h"
40 #include "AliMpSector.h"
42 #include "AliMpVRowSegment.h"
43 #include "AliMpMotifMap.h"
44 #include "AliMpMotifPosition.h"
45 #include "AliMpPlaneType.h"
53 #include <TGeoMatrix.h>
54 #include <TClonesArray.h>
55 #include <Riostream.h>
57 #include <TVirtualMC.h>
58 #include <TGeoManager.h>
59 #include <TGeoVolume.h>
61 #include <TGeoCompositeShape.h>
72 ClassImp(AliMUONSt1GeometryBuilderV2)
75 // Thickness Constants
76 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzPadPlane=0.0148/2.; //Pad plane
77 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFoam = 2.503/2.; //Foam of mechanicalplane
78 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFR4 = 0.062/2.; //FR4 of mechanical plane
79 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzSnPb = 0.0091/2.; //Pad/Kapton connection (66 pt)
80 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzKapton = 0.0122/2.; //Kapton
81 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergPlastic = 0.3062/2.;//Berg connector
82 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergCopper = 0.1882/2.; //Berg connector
83 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzDaughter = 0.0156/2.; //Daughter board
84 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzGas = 0.42/2.; //Gas thickness
86 // Quadrant Mother volume - TUBS1 - Middle layer of model
87 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR1 = 18.3;
88 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR1 = 105.673;
89 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick1 = 6.5/2;
90 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL1 = 0.;
91 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU1 = 90.;
93 // Quadrant Mother volume - TUBS2 - near and far layers of model
94 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR2 = 20.7;
95 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR2 = 100.073;
96 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick2 = 3.0/2;
97 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL2 = 0.;
98 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU2 = 90.;
100 // Sensitive copper pads, foam layer, PCB and electronics model parameters
101 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxHole=1.5/2.;
102 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyHole=6./2.;
103 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergPlastic=0.74/2.;
104 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergPlastic=5.09/2.;
105 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergCopper=0.25/2.;
106 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergCopper=3.6/2.;
107 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxKapton=0.8/2.;
108 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyKapton=5.7/2.;
109 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxDaughter=2.3/2.;
110 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyDaughter=6.3/2.;
111 const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetX=1.46;
112 const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetY=0.71;
113 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamX=1.00;
114 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamY=0.051;
116 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaQuadLHC=2.6; // LHC Origin wrt Quadrant Origin
117 const GReal_t AliMUONSt1GeometryBuilderV2::fgkFrameOffset=5.2;
118 // Fix (1) of overlap SQN* layers with SQM* ones (was 5.0)
120 // Pad planes offsets
121 const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadXOffsetBP = 0.50 - 0.63/2; // = 0.185
122 const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadYOffsetBP = -0.31 - 0.42/2; // =-0.52
124 const char* AliMUONSt1GeometryBuilderV2::fgkHoleName="SCHL";
125 const char* AliMUONSt1GeometryBuilderV2::fgkDaughterName="SCDB";
126 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantEnvelopeName="SE";
127 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMLayerName="SQM";
128 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantNLayerName="SQN";
129 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantFLayerName="SQF";
130 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMFLayerName="SQMF";
131 const Int_t AliMUONSt1GeometryBuilderV2::fgkFoamBoxNameOffset=200;
132 const Int_t AliMUONSt1GeometryBuilderV2::fgkFR4BoxNameOffset=400;
133 const Int_t AliMUONSt1GeometryBuilderV2::fgkDaughterCopyNoOffset=1000;
135 //______________________________________________________________________________
136 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon)
137 : AliMUONVGeometryBuilder(0, 2),
140 /// Standard constructor
143 //______________________________________________________________________________
144 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2()
145 : AliMUONVGeometryBuilder(),
148 /// Default Constructor
151 //______________________________________________________________________________
152 AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2()
162 //______________________________________________________________________________
164 AliMUONSt1GeometryBuilderV2::QuadrantEnvelopeName(Int_t chamber, Int_t quadrant) const
166 /// Generate unique envelope name from chamber Id and quadrant number
168 return Form("%s%d", Form("%s%d",fgkQuadrantEnvelopeName,chamber), quadrant);
171 //______________________________________________________________________________
172 void AliMUONSt1GeometryBuilderV2::CreateHole()
174 /// Create all the elements found inside a foam hole
176 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
177 Int_t idAir = idtmed[1100]; // medium 1
178 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
179 Int_t idCopper = idtmed[1121]; // medium 22 = copper
182 GReal_t posX,posY,posZ;
187 gMC->Gsvolu(fgkHoleName,"BOX",idAir,par,3);
189 par[0] = fgkHxKapton;
190 par[1] = fgkHyKapton;
192 gMC->Gsvolu("SNPB", "BOX", idCopper, par, 3);
195 posZ = -fgkHzFoam+fgkHzSnPb;
196 gMC->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
199 par[1] = fgkHyBergPlastic;
200 par[2] = fgkHzKapton;
201 gMC->Gsvolu("SKPT", "BOX", idCopper, par, 3);
205 gMC->Gspos("SKPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
208 //______________________________________________________________________________
209 void AliMUONSt1GeometryBuilderV2::CreateDaughterBoard()
211 /// Create all the elements in a daughter board
213 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
214 Int_t idAir = idtmed[1100]; // medium 1
215 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
216 //Int_t idPlastic =idtmed[1116]; // medium 17 = Plastic
217 Int_t idCopper = idtmed[1121]; // medium 22 = copper
218 Int_t idPlastic =idtmed[1127]; // medium 28 = Plastic
221 GReal_t posX,posY,posZ;
223 par[0]=fgkHxDaughter;
224 par[1]=fgkHyDaughter;
225 par[2]=TotalHzDaughter();
226 gMC->Gsvolu(fgkDaughterName,"BOX",idAir,par,3);
228 par[0]=fgkHxBergPlastic;
229 par[1]=fgkHyBergPlastic;
230 par[2]=fgkHzBergPlastic;
231 gMC->Gsvolu("SBGP","BOX",idPlastic,par,3);
234 posZ = -TotalHzDaughter() + fgkHzBergPlastic;
235 gMC->Gspos("SBGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
237 par[0]=fgkHxBergCopper;
238 par[1]=fgkHyBergCopper;
239 par[2]=fgkHzBergCopper;
240 gMC->Gsvolu("SBGC","BOX",idCopper,par,3);
244 gMC->Gspos("SBGC",1,"SBGP",posX,posY,posZ,0,"ONLY");
246 par[0]=fgkHxDaughter;
247 par[1]=fgkHyDaughter;
248 par[2]=fgkHzDaughter;
249 gMC->Gsvolu("SDGH","BOX",idCopper,par,3);
252 posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter;
253 gMC->Gspos("SDGH",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
256 //______________________________________________________________________________
257 void AliMUONSt1GeometryBuilderV2::CreateInnerLayers()
259 /// Create the layer of sensitive volumes with gas
260 /// and the copper layer.
263 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
264 Int_t idArCO2 = idtmed[1108]; // medium 9 (ArCO2 80%)
265 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
266 //Int_t idArCO2 = idtmed[1124]; // medium 25 (ArCO2 80%)
267 Int_t idCopper = idtmed[1121]; // medium 22 = copper
271 //Make gas volume - composed of 11 trapezoids
285 gMC->Gsvolu("SA1G", "TRAP", idArCO2, par, 11);
286 gMC->Gsvolu("SA2G", "TRAP", idArCO2, par, 11);
288 par[0] = fgkHzPadPlane;
289 gMC->Gsvolu("SA1C", "TRAP", idCopper,par, 11);
303 gMC->Gsvolu("SB1G", "TRAP", idArCO2, par, 11);
304 gMC->Gsvolu("SB2G", "TRAP", idArCO2, par, 11);
306 par[0] = fgkHzPadPlane;
307 gMC->Gsvolu("SB1C", "TRAP", idCopper,par, 11);
322 gMC->Gsvolu("SC1G", "TRAP", idArCO2, par, 11);
323 gMC->Gsvolu("SC2G", "TRAP", idArCO2, par, 11);
325 par[0] = fgkHzPadPlane;
326 gMC->Gsvolu("SC1C", "TRAP", idCopper,par, 11);
340 gMC->Gsvolu("SD1G", "TRAP", idArCO2, par, 11);
341 gMC->Gsvolu("SD2G", "TRAP", idArCO2, par, 11);
343 par[0] = fgkHzPadPlane;
344 gMC->Gsvolu("SD1C", "TRAP", idCopper,par, 11);
358 gMC->Gsvolu("SE1G", "TRAP", idArCO2, par, 11);
359 gMC->Gsvolu("SE2G", "TRAP", idArCO2, par, 11);
361 par[0] = fgkHzPadPlane;
362 gMC->Gsvolu("SE1C", "TRAP", idCopper,par, 11);
376 gMC->Gsvolu("SF1G", "TRAP", idArCO2, par, 11);
377 gMC->Gsvolu("SF2G", "TRAP", idArCO2, par, 11);
379 par[0] = fgkHzPadPlane;
380 gMC->Gsvolu("SF1C", "TRAP", idCopper,par, 11);
394 gMC->Gsvolu("SG1G", "TRAP", idArCO2, par, 11);
395 gMC->Gsvolu("SG2G", "TRAP", idArCO2, par, 11);
397 par[0] = fgkHzPadPlane;
398 gMC->Gsvolu("SG1C", "TRAP", idCopper,par, 11);
412 gMC->Gsvolu("SH1G", "TRAP", idArCO2, par, 11);
413 gMC->Gsvolu("SH2G", "TRAP", idArCO2, par, 11);
415 par[0] = fgkHzPadPlane;
416 gMC->Gsvolu("SH1C", "TRAP", idCopper,par, 11);
430 gMC->Gsvolu("SI1G", "TRAP", idArCO2, par, 11);
431 gMC->Gsvolu("SI2G", "TRAP", idArCO2, par, 11);
433 par[0] = fgkHzPadPlane;
434 gMC->Gsvolu("SI1C", "TRAP", idCopper,par, 11);
448 gMC->Gsvolu("SJ1G", "TRAP", idArCO2, par, 11);
449 gMC->Gsvolu("SJ2G", "TRAP", idArCO2, par, 11);
451 par[0] = fgkHzPadPlane;
452 gMC->Gsvolu("SJ1C", "TRAP", idCopper,par, 11);
466 gMC->Gsvolu("SK1G", "TRAP", idArCO2, par, 11);
467 gMC->Gsvolu("SK2G", "TRAP", idArCO2, par, 11);
469 par[0] = fgkHzPadPlane;
470 gMC->Gsvolu("SK1C", "TRAP", idCopper,par, 11);
473 //______________________________________________________________________________
474 void AliMUONSt1GeometryBuilderV2::CreateSpacer0()
476 /// The spacer volumes are defined according to the input prepared by Nicole Willis
477 /// without any modifications
479 /// No. Type Material Center (mm) Dimensions (mm) (half lengths)
480 /// 5 BOX EPOXY 408.2 430.4 522.41 5.75 1.5 25.5
481 /// 5P BOX EPOXY 408.2 445.4 522.41 5.75 1.5 25.5
482 /// 6 BOX EPOXY 408.2 437.9 519.76 5.75 15.0 1.0
483 /// 6P BOX EPOXY 408.2 437.9 525.06 5.75 15.0 1.0
484 /// 7 CYL INOX 408.2 437.9 522.41 r=3.0 hz=20.63
488 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
489 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
490 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
496 gMC->Gsvolu("Spacer05","BOX",idFrameEpoxy,par,3);
501 gMC->Gsvolu("Spacer06","BOX",idFrameEpoxy,par,3);
506 gMC->Gsvolu("Spacer07","TUBE",idInox,par,3);
510 //______________________________________________________________________________
511 void AliMUONSt1GeometryBuilderV2::CreateSpacer()
513 /// The spacer volumes are defined according to the input prepared by Nicole Willis
514 /// with modifications needed to fit into existing geometry.
516 /// No. Type Material Center (mm) Dimensions (mm) (half lengths)
517 /// 5 BOX EPOXY 408.2 430.4 522.41 5.75 1.5 25.5
518 /// 5P BOX EPOXY 408.2 445.4 522.41 5.75 1.5 25.5
519 /// 6 BOX EPOXY 408.2 437.9 519.76 5.75 15.0 1.0
520 /// 6P BOX EPOXY 408.2 437.9 525.06 5.75 15.0 1.0
521 /// 7 CYL INOX 408.2 437.9 522.41 r=3.0 hz=20.63
523 /// To fit in existing volumes the volumes 5 and 7 are represented by 2 volumes
524 /// with half size in z (5A, &A); the dimensions of the volume 5A were also modified
525 /// to avoid overlaps (x made smaller, y larger to abotain the identical volume)
528 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
529 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
530 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
536 //gMC->Gsvolu("Spacer5","BOX",idFrameEpoxy,par,3);
542 gMC->Gsvolu("Spacer5A","BOX",idFrameEpoxy,par,3);
547 gMC->Gsvolu("Spacer6","BOX",idFrameEpoxy,par,3);
552 //gMC->Gsvolu("Spacer7","TUBE",idInox,par,3);
557 gMC->Gsvolu("Spacer7A","TUBE",idInox,par,3);
560 //______________________________________________________________________________
561 void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber)
563 /// Create the quadrant (bending and non-bending planes)
564 /// for the given chamber
566 // CreateQuadrantLayersAsVolumes(chamber);
567 CreateQuadrantLayersAsAssemblies(chamber);
569 CreateFrame(chamber);
572 specialMap.Add(76, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.1, 0.72), 90.));
573 specialMap.Add(75, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.7, 0.36)));
574 specialMap.Add(47, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36)));
576 // Load mapping from OCDB
577 if ( ! AliMpSegmentation::Instance() ) {
578 AliFatal("Mapping has to be loaded first !");
581 const AliMpSectorSegmentation* kSegmentation1
582 = dynamic_cast<const AliMpSectorSegmentation*>(
583 AliMpSegmentation::Instance()
584 ->GetMpSegmentation(100, AliMpDEManager::GetCathod(100, AliMp::kBendingPlane)));
585 if ( ! kSegmentation1 ) {
586 AliFatal("Could not access sector segmentation !");
589 const AliMpSector* kSector1 = kSegmentation1->GetSector();
591 //Bool_t reflectZ = true;
592 Bool_t reflectZ = false;
593 //TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.);
594 TVector3 where = TVector3(fgkDeltaQuadLHC + fgkPadXOffsetBP,
595 fgkDeltaQuadLHC + fgkPadYOffsetBP, 0.);
596 PlaceSector(kSector1, specialMap, where, reflectZ, chamber);
598 Int_t nb = AliMpConstants::ManuMask(AliMp::kNonBendingPlane);
599 TExMapIter it(&specialMap);
602 while ( it.Next(key,value) == kTRUE ) {
603 delete reinterpret_cast<AliMUONSt1SpecialMotif*>(value);
606 specialMap.Add(76 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.51),90.));
607 specialMap.Add(75 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(2.20,-0.08)));
608 specialMap.Add(47 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(2.40,-1.11)));
609 specialMap.Add(20 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08)));
610 specialMap.Add(46 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.92 , 0.17)));
611 specialMap.Add(74 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.405, -0.10)));
612 // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector
613 // in the true position)
615 const AliMpSectorSegmentation* kSegmentation2
616 = dynamic_cast<const AliMpSectorSegmentation*>(
617 AliMpSegmentation::Instance()
618 ->GetMpSegmentation(100, AliMpDEManager::GetCathod(100, AliMp::kNonBendingPlane)));
619 if ( ! kSegmentation2 ) {
620 AliFatal("Could not access sector segmentation !");
623 const AliMpSector* kSector2 = kSegmentation2->GetSector();
627 TVector2 offset = kSector2->Position();
628 where = TVector3(where.X()+offset.X(), where.Y()+offset.Y(), 0.);
629 // Add the half-pad shift of the non-bending plane wrt bending plane
630 // (The shift is defined in the mapping as sector offset)
631 // Fix (4) - was TVector3(where.X()+0.63/2, ... - now it is -0.63/2
632 PlaceSector(kSector2, specialMap, where, reflectZ, chamber);
635 while ( it.Next(key,value) == kTRUE ) {
636 delete reinterpret_cast<AliMUONSt1SpecialMotif*>(value);
641 //______________________________________________________________________________
642 void AliMUONSt1GeometryBuilderV2::CreateFoamBox(
644 const TVector2& dimensions)
646 /// Create all the elements in the copper plane
648 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
649 Int_t idAir = idtmed[1100]; // medium 1
650 //Int_t idFoam = idtmed[1115]; // medium 16 = Foam
651 //Int_t idFR4 = idtmed[1114]; // medium 15 = FR4
652 Int_t idFoam = idtmed[1125]; // medium 26 = Foam
653 Int_t idFR4 = idtmed[1122]; // medium 23 = FR4
657 par[0] = dimensions.X();
658 par[1] = dimensions.Y();
659 par[2] = TotalHzPlane();
660 gMC->Gsvolu(PlaneSegmentName(segNumber).Data(),"BOX",idAir,par,3);
663 par[0] = dimensions.X();
664 par[1] = dimensions.Y();
666 gMC->Gsvolu(FoamBoxName(segNumber).Data(),"BOX",idFoam,par,3);
667 GReal_t posX,posY,posZ;
670 posZ = -TotalHzPlane() + fgkHzFoam;
671 gMC->Gspos(FoamBoxName(segNumber).Data(),1,
672 PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
674 // mechanical plane FR4 layer
675 par[0] = dimensions.X();
676 par[1] = dimensions.Y();
678 gMC->Gsvolu(FR4BoxName(segNumber).Data(),"BOX",idFR4,par,3);
681 posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4;
682 gMC->Gspos(FR4BoxName(segNumber).Data(),1,
683 PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
686 //______________________________________________________________________________
687 void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(Int_t segNumber,
688 const TVector2& dimensions,
691 /// Create a segment of a plane (this includes a foam layer,
692 /// holes in the foam to feed the kaptons through, kapton connectors
693 /// and the mother board.)
695 CreateFoamBox(segNumber,dimensions);
697 // Place spacer in the concrete plane segments:
698 // S225 (in S025), S267 (in S067) in chamber1 and S309 (in S109). S351(in S151)
700 // The segments were found as those which caused overlaps when we placed
701 // the spacer in global coordinates via PlaceSpacer0
703 // <posXYZ X_Y_Z=" 12.6000; 0.75000; 0.0000"> <volume name="Spacer5A"/>
704 // <posXYZ X_Y_Z=" 12.6000; -0.75000; 0.0000"> <volume name="Spacer5A"/>
705 // <posXYZ X_Y_Z=" 12.6000; 0.0000; 1.1515"> <volume name="Spacer6"/>
706 // <posXYZ X_Y_Z=" 12.6000; 0.0000; 0.0000"> <volume name="Spacer7A"/>
708 if ( FoamBoxName(segNumber) == "S225" ||
709 FoamBoxName(segNumber) == "S267" ||
710 FoamBoxName(segNumber) == "S309" ||
711 FoamBoxName(segNumber) == "S351" )
716 if ( FoamBoxName(segNumber) == "S267" ||
717 FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP;
718 gMC->Gspos("Spacer5A", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY");
721 if ( FoamBoxName(segNumber) == "S267" ||
722 FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP;
723 gMC->Gspos("Spacer5A", 2, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY");
727 if ( FoamBoxName(segNumber) == "S267" ||
728 FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP;
729 gMC->Gspos("Spacer6", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY");
733 if ( FoamBoxName(segNumber) == "S267" ||
734 FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP;
735 gMC->Gspos("Spacer7A", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY");
738 for (Int_t holeNum=0;holeNum<nofHoles;holeNum++) {
739 GReal_t posX = ((2.*holeNum+1.)/nofHoles-1.)*dimensions.X();
743 gMC->Gspos(fgkHoleName,holeNum+1,
744 FoamBoxName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
748 //______________________________________________________________________________
749 void AliMUONSt1GeometryBuilderV2::CreateQuadrantLayersAsVolumes(Int_t chamber)
751 /// Create the three main layers as real volumes.
752 /// Not used anymore.
755 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
756 Int_t idAir = idtmed[1100]; // medium 1
759 Float_t posX,posY,posZ;
761 // Quadrant volume TUBS1, positioned at the end
762 par[0] = fgkMotherIR1;
763 par[1] = fgkMotherOR1;
764 par[2] = fgkMotherThick1;
765 par[3] = fgkMotherPhiL1;
766 par[4] = fgkMotherPhiU1;
767 gMC->Gsvolu(QuadrantMLayerName(chamber),"TUBS",idAir,par,5);
768 // gMC->Gsvolu(QuadrantMFLayerName(chamber),"TUBS",idAir,par,5);
770 // Replace the volume shape with a composite shape
771 // with substracted overlap with beam shield (YMOT)
773 if ( gMC->IsRootGeometrySupported() ) {
777 = gGeoManager->FindVolumeFast(QuadrantMLayerName(chamber));
780 << "Quadrant volume " << QuadrantMLayerName(chamber) << " not found"
784 TGeoShape* quadrant = mlayer->GetShape();
785 quadrant->SetName("quadrant");
787 // Beam shield recess
790 par[2] = fgkMotherThick1;
791 new TGeoTube("shield_tube", par[0], par[1], par[2]);
797 TGeoTranslation* displacement
798 = new TGeoTranslation("TR", posX, posY, posZ);
799 displacement->RegisterYourself();
803 = new TGeoCompositeShape("composite", "quadrant-shield_tube:TR");
805 // Reset shape to volume
806 mlayer->SetShape(composite);
810 = gGeoManager->FindVolumeFast(QuadrantMFLayerName(chamber));
813 << "Quadrant volume " << QuadrantMFLayerName(chamber) << " not found"
817 TGeoShape* quadrant = malayer->GetShape();
818 quadrant->SetName("quadrant");
820 // Beam shield recess
823 par[2] = fgkMotherThick1;
824 new TGeoTube("shield_tube", par[0], par[1], par[2]);
830 TGeoTranslation* displacement
831 = new TGeoTranslation("TR", posX, posY, posZ);
832 displacement->RegisterYourself();
836 = new TGeoCompositeShape("composite", "quadrant-shield_tube:TR");
838 // Reset shape to volume
839 malayer->SetShape(composite);
843 // Quadrant volume TUBS2, positioned at the end
844 par[0] = fgkMotherIR2;
845 par[1] = fgkMotherOR2;
846 par[2] = fgkMotherThick2;
847 par[3] = fgkMotherPhiL2;
848 par[4] = fgkMotherPhiU2;
850 gMC->Gsvolu(QuadrantNLayerName(chamber),"TUBS",idAir,par,5);
851 gMC->Gsvolu(QuadrantFLayerName(chamber),"TUBS",idAir,par,5);
854 //______________________________________________________________________________
855 void AliMUONSt1GeometryBuilderV2::CreateQuadrantLayersAsAssemblies(Int_t chamber)
857 /// Create the three main layers as assemblies
859 gGeoManager->MakeVolumeAssembly(QuadrantMLayerName(chamber).Data());
860 gGeoManager->MakeVolumeAssembly(QuadrantMFLayerName(chamber).Data());
861 gGeoManager->MakeVolumeAssembly(QuadrantNLayerName(chamber).Data());
862 gGeoManager->MakeVolumeAssembly(QuadrantFLayerName(chamber).Data());
865 //______________________________________________________________________________
866 void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber)
868 /// Create the non-sensitive elements of the frame for the \a chamber
870 /// Model and notation: \n
872 /// The Quadrant volume name starts with SQ \n
873 /// The volume segments are numbered 00 to XX \n
878 /// OutEdgeFrame / | \n
879 /// (SQ17-24) / | InVFrame (SQ00-01) \n
882 /// OutVFrame | _- - \n
883 /// (SQ25-39) | | InArcFrame (SQ42-45) \n
886 /// InHFrame (SQ40-41) \n
889 /// 06 February 2003 - Overlapping volumes resolved. \n
890 /// One quarter chamber is comprised of three TUBS volumes: SQMx, SQNx, and SQFx,
891 /// where SQMx is the Quadrant Middle layer for chamber \a chamber ( posZ in [-3.25,3.25]),
892 /// SQNx is the Quadrant Near side layer for chamber \a chamber ( posZ in [-6.25,3-.25) ), and
893 /// SQFx is the Quadrant Far side layer for chamber \a chamber ( posZ in (3.25,6.25] ).
895 // TString quadrantMLayerName = QuadrantMLayerName(chamber);
897 TString quadrantMLayerName = QuadrantMFLayerName(chamber);
898 TString quadrantNLayerName = QuadrantNLayerName(chamber);
899 TString quadrantFLayerName = QuadrantFLayerName(chamber);
901 const Float_t kNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin
904 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
906 //Int_t idAir = idtmed[1100]; // medium 1
907 //Int_t idFrameEpoxy = idtmed[1115]; // medium 16 = Frame Epoxy ME730
908 //Int_t idInox = idtmed[1116]; // medium 17 Stainless Steel (18%Cr,9%Ni,Fe)
909 //Int_t idFR4 = idtmed[1110]; // medium 11 FR4
910 //Int_t idCopper = idtmed[1109]; // medium 10 Copper
911 //Int_t idAlu = idtmed[1103]; // medium 4 Aluminium
912 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
913 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
914 Int_t idFR4 = idtmed[1122]; // medium 23 FR4 // was 15 not 11
915 Int_t idCopper = idtmed[1121]; // medium 22 Copper
916 Int_t idAlu = idtmed[1120]; // medium 21 Aluminium
920 Int_t rot1, rot2, rot3;
923 fMUON->AliMatrix(rot1, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane
924 fMUON->AliMatrix(rot2, 90., 45., 90., 135., 0., 0.); // +45 deg in x-y plane
925 fMUON->AliMatrix(rot3, 90., 45., 90., 315.,180., 0.); // +45 deg in x-y + rotation 180° around y
927 // Translation matrices ... NOT USED
928 // fMUON->AliMatrix(trans1, 90., 0., 90., 90., 0., 0.); // X-> X; Y -> Y; Z -> Z
929 // fMUON->AliMatrix(trans2, 90., 180., 90., 90., 180., 0.); // X->-X; Y -> Y; Z ->-Z
930 // fMUON->AliMatrix(trans3, 90., 180., 90., 270., 0., 0.); // X->-X; Y ->-Y; Z -> Z
931 // fMUON->AliMatrix(trans4, 90., 0., 90., 270., 180., 0.); // X-> X; Y ->-Y; Z ->-Z
933 // ___________________Volume thicknesses________________________
935 const Float_t kHzFrameThickness = 1.59/2.; //equivalent thickness
936 const Float_t kHzOuterFrameEpoxy = 1.19/2.; //equivalent thickness
937 const Float_t kHzOuterFrameInox = 0.1/2.; //equivalent thickness
938 const Float_t kHzFoam = 2.083/2.; //evaluated elsewhere
939 // CHECK with fgkHzFoam
941 // Pertaining to the top outer area
942 const Float_t kHzTopAnodeSteel1 = 0.185/2.; //equivalent thickness
943 const Float_t kHzTopAnodeSteel2 = 0.51/2.; //equivalent thickness
944 const Float_t kHzAnodeFR4 = 0.08/2.; //equivalent thickness
945 const Float_t kHzTopEarthFaceCu = 0.364/2.; //equivalent thickness
946 const Float_t kHzTopEarthProfileCu = 1.1/2.; //equivalent thickness
947 const Float_t kHzTopPositionerSteel = 1.45/2.; //should really be 2.125/2.;
948 const Float_t kHzTopGasSupportAl = 0.85/2.; //equivalent thickness
950 // Pertaining to the vertical outer area
951 const Float_t kHzVerticalCradleAl = 0.8/2.; //equivalent thickness
952 const Float_t kHzLateralSightAl = 0.975/2.; //equivalent thickness
953 const Float_t kHzLateralPosnInoxFace = 2.125/2.;//equivalent thickness
954 const Float_t kHzLatPosInoxProfM = 6.4/2.; //equivalent thickness
955 const Float_t kHzLatPosInoxProfNF = 1.45/2.; //equivalent thickness
956 const Float_t kHzLateralPosnAl = 0.5/2.; //equivalent thickness
957 const Float_t kHzVertEarthFaceCu = 0.367/2.; //equivalent thickness
958 const Float_t kHzVertBarSteel = 0.198/2.; //equivalent thickness
959 const Float_t kHzVertEarthProfCu = 1.1/2.; //equivalent thickness
961 //_______________Parameter definitions in sequence _________
963 // InVFrame parameters
964 const Float_t kHxInVFrame = 1.85/2.;
965 const Float_t kHyInVFrame = 73.95/2.;
966 const Float_t kHzInVFrame = kHzFrameThickness;
968 //Flat 7.5mm vertical section
969 const Float_t kHxV1mm = 0.75/2.;
970 const Float_t kHyV1mm = 1.85/2.;
971 const Float_t kHzV1mm = kHzFrameThickness;
973 // OuterTopFrame Structure
976 // The frame is composed of a cuboid and two trapezoids
977 // (TopFrameAnode, TopFrameAnodeA, TopFrameAnodeB).
978 // Each shape is composed of two layers (Epoxy and Inox) and
979 // takes the frame's inner anode circuitry into account in the material budget.
982 // The overhanging anode part is composed froma cuboid and two trapezoids
983 // (TopAnode, TopAnode1, and TopAnode2). These surfaces neglect implanted
984 // resistors, but accounts for the major Cu, Pb/Sn, and FR4 material
986 // The stainless steel anode supports have been included.
988 // EARTHING (TopEarthFace, TopEarthProfile)
989 // Al GAS SUPPORT (TopGasSupport)
991 // ALIGNMENT (TopPositioner) - Alignment system, three sights per quarter
992 // chamber. This sight is forseen for the alignment of the horizontal level
993 // (parallel to the OY axis of LHC). Its position will be evaluated relative
994 // to a system of sights places on the cradles;
998 //TopFrameAnode parameters - cuboid, 2 layers
999 const Float_t kHxTFA = 34.1433/2.;
1000 const Float_t kHyTFA = 7.75/2.;
1001 const Float_t kHzTFAE = kHzOuterFrameEpoxy; // layer 1 thickness
1002 const Float_t kHzTFAI = kHzOuterFrameInox; // layer 3 thickness
1004 // TopFrameAnodeA parameters - trapezoid, 2 layers
1005 const Float_t kHzFAAE = kHzOuterFrameEpoxy; // layer 1 thickness
1006 const Float_t kHzFAAI = kHzOuterFrameInox; // layer 3 thickness
1007 const Float_t kTetFAA = 0.;
1008 const Float_t kPhiFAA = 0.;
1009 const Float_t kH1FAA = 8.7/2.;
1010 const Float_t kBl1FAA = 4.35/2.;
1011 const Float_t kTl1FAA = 7.75/2.;
1012 const Float_t kAlp1FAA = 11.06;
1013 const Float_t kH2FAA = 8.7/2.;
1014 const Float_t kBl2FAA = 4.35/2.;
1015 const Float_t kTl2FAA = 7.75/2.;
1016 const Float_t kAlp2FAA = 11.06;
1018 // TopFrameAnodeB parameters - trapezoid, 2 layers
1019 const Float_t kHzFABE = kHzOuterFrameEpoxy; // layer 1 thickness
1020 const Float_t kHzFABI = kHzOuterFrameInox; // layer 3 thickness
1021 const Float_t kTetFAB = 0.;
1022 const Float_t kPhiFAB = 0.;
1023 const Float_t kH1FAB = 8.70/2.;
1024 const Float_t kBl1FAB = 0.;
1025 const Float_t kTl1FAB = 4.35/2.;
1026 const Float_t kAlp1FAB = 14.03;
1027 const Float_t kH2FAB = 8.70/2.;
1028 const Float_t kBl2FAB = 0.;
1029 const Float_t kTl2FAB = 4.35/2.;
1030 const Float_t kAlp2FAB = 14.03;
1032 // TopAnode parameters - cuboid (part 1 of 3 parts)
1033 const Float_t kHxTA1 = 16.2/2.;
1034 const Float_t kHyTA1 = 3.5/2.;
1035 const Float_t kHzTA11 = kHzTopAnodeSteel1; // layer 1
1036 const Float_t kHzTA12 = kHzAnodeFR4; // layer 2
1038 // TopAnode parameters - trapezoid 1 (part 2 of 3 parts)
1039 const Float_t kHzTA21 = kHzTopAnodeSteel2; // layer 1
1040 const Float_t kHzTA22 = kHzAnodeFR4; // layer 2
1041 const Float_t kTetTA2 = 0.;
1042 const Float_t kPhiTA2= 0.;
1043 const Float_t kH1TA2 = 7.268/2.;
1044 const Float_t kBl1TA2 = 2.03/2.;
1045 const Float_t kTl1TA2 = 3.5/2.;
1046 const Float_t kAlp1TA2 = 5.78;
1047 const Float_t kH2TA2 = 7.268/2.;
1048 const Float_t kBl2TA2 = 2.03/2.;
1049 const Float_t kTl2TA2 = 3.5/2.;
1050 const Float_t kAlp2TA2 = 5.78;
1052 // TopAnode parameters - trapezoid 2 (part 3 of 3 parts)
1053 const Float_t kHzTA3 = kHzAnodeFR4; // layer 1
1054 const Float_t kTetTA3 = 0.;
1055 const Float_t kPhiTA3 = 0.;
1056 const Float_t kH1TA3 = 7.268/2.;
1057 const Float_t kBl1TA3 = 0.;
1058 const Float_t kTl1TA3 = 2.03/2.;
1059 const Float_t kAlp1TA3 = 7.95;
1060 const Float_t kH2TA3 = 7.268/2.;
1061 const Float_t kBl2TA3 = 0.;
1062 const Float_t kTl2TA3 = 2.03/2.;
1063 const Float_t kAlp2TA3 = 7.95;
1065 // TopEarthFace parameters - single trapezoid
1066 const Float_t kHzTEF = kHzTopEarthFaceCu;
1067 const Float_t kTetTEF = 0.;
1068 const Float_t kPhiTEF = 0.;
1069 const Float_t kH1TEF = 1.200/2.;
1070 const Float_t kBl1TEF = 21.323/2.;
1071 const Float_t kTl1TEF = 17.963/2.;
1072 const Float_t kAlp1TEF = -54.46;
1073 const Float_t kH2TEF = 1.200/2.;
1074 const Float_t kBl2TEF = 21.323/2.;
1075 const Float_t kTl2TEF = 17.963/2.;
1076 const Float_t kAlp2TEF = -54.46;
1078 // TopEarthProfile parameters - single trapezoid
1079 const Float_t kHzTEP = kHzTopEarthProfileCu;
1080 const Float_t kTetTEP = 0.;
1081 const Float_t kPhiTEP = 0.;
1082 const Float_t kH1TEP = 0.40/2.;
1083 const Float_t kBl1TEP = 31.766/2.;
1084 const Float_t kTl1TEP = 30.535/2.;
1085 const Float_t kAlp1TEP = -56.98;
1086 const Float_t kH2TEP = 0.40/2.;
1087 const Float_t kBl2TEP = 31.766/2.;
1088 const Float_t kTl2TEP = 30.535/2.;
1089 const Float_t kAlp2TEP = -56.98;
1091 // TopPositioner parameters - single Stainless Steel trapezoid
1092 const Float_t kHzTP = kHzTopPositionerSteel;
1093 const Float_t kTetTP = 0.;
1094 const Float_t kPhiTP = 0.;
1095 const Float_t kH1TP = 3.00/2.;
1096 const Float_t kBl1TP = 7.023/2.;
1097 const Float_t kTl1TP = 7.314/2.;
1098 const Float_t kAlp1TP = 2.78;
1099 const Float_t kH2TP = 3.00/2.;
1100 const Float_t kBl2TP = 7.023/2.;
1101 const Float_t kTl2TP = 7.314/2.;
1102 const Float_t kAlp2TP = 2.78;
1104 // TopGasSupport parameters - single cuboid
1105 const Float_t kHxTGS = 8.50/2.;
1106 const Float_t kHyTGS = 3.00/2.;
1107 const Float_t kHzTGS = kHzTopGasSupportAl;
1109 // OutEdgeFrame parameters - 4 trapezoidal sections, 2 layers of material
1114 const Float_t kHzOETFE = kHzOuterFrameEpoxy; // layer 1
1115 const Float_t kHzOETFI = kHzOuterFrameInox; // layer 3
1117 const Float_t kTetOETF = 0.; // common to all 4 trapezoids
1118 const Float_t kPhiOETF = 0.; // common to all 4 trapezoids
1120 const Float_t kH1OETF = 7.196/2.; // common to all 4 trapezoids
1121 const Float_t kH2OETF = 7.196/2.; // common to all 4 trapezoids
1123 const Float_t kBl1OETF1 = 3.75/2;
1124 const Float_t kTl1OETF1 = 3.996/2.;
1125 const Float_t kAlp1OETF1 = 0.98;
1127 const Float_t kBl2OETF1 = 3.75/2;
1128 const Float_t kTl2OETF1 = 3.996/2.;
1129 const Float_t kAlp2OETF1 = 0.98;
1132 const Float_t kBl1OETF2 = 3.01/2.;
1133 const Float_t kTl1OETF2 = 3.75/2;
1134 const Float_t kAlp1OETF2 = 2.94;
1136 const Float_t kBl2OETF2 = 3.01/2.;
1137 const Float_t kTl2OETF2 = 3.75/2;
1138 const Float_t kAlp2OETF2 = 2.94;
1141 //const Float_t kBl1OETF3 = 1.767/2.;
1142 //const Float_t kTl1OETF3 = 3.01/2.;
1143 const Float_t kBl1OETF3 = 1.117/2.;
1144 const Float_t kTl1OETF3 = 2.36/2.;
1145 const Float_t kAlp1OETF3 = 4.94;
1146 // Fix (5) - overlap of SQ21 with 041M and 125M
1148 //const Float_t kBl2OETF3 = 1.767/2.;
1149 //const Float_t kTl2OETF3 = 3.01/2.;
1150 const Float_t kBl2OETF3 = 1.117/2.;
1151 const Float_t kTl2OETF3 = 2.36/2.;
1152 const Float_t kAlp2OETF3 = 4.94;
1153 // Fix (5) - overlap of SQ21 with 041M and 125M
1156 const Float_t kBl1OETF4 = 0.;
1157 const Float_t kTl1OETF4 = 1.77/2.;
1158 const Float_t kAlp1OETF4 = 7.01;
1160 const Float_t kBl2OETF4 = 0.;
1161 const Float_t kTl2OETF4 = 1.77/2.;
1162 const Float_t kAlp2OETF4 = 7.01;
1164 // Frame Structure (OutVFrame):
1166 // OutVFrame and corner (OutVFrame cuboid, OutVFrame trapezoid)
1167 // EARTHING (VertEarthFaceCu,VertEarthSteel,VertEarthProfCu),
1168 // DETECTOR POSITIONNING (SuppLateralPositionner, LateralPositionner),
1169 // CRADLE (VertCradle), and
1170 // ALIGNMENT (LateralSightSupport, LateralSight)
1174 // OutVFrame parameters - cuboid
1175 const Float_t kHxOutVFrame = 1.85/2.;
1176 const Float_t kHyOutVFrame = 46.23/2.;
1177 const Float_t kHzOutVFrame = kHzFrameThickness;
1179 // OutVFrame corner parameters - trapezoid
1180 const Float_t kHzOCTF = kHzFrameThickness;
1181 const Float_t kTetOCTF = 0.;
1182 const Float_t kPhiOCTF = 0.;
1183 const Float_t kH1OCTF = 1.85/2.;
1184 const Float_t kBl1OCTF = 0.;
1185 const Float_t kTl1OCTF = 3.66/2.;
1186 const Float_t kAlp1OCTF = 44.67;
1187 const Float_t kH2OCTF = 1.85/2.;
1188 const Float_t kBl2OCTF = 0.;
1189 const Float_t kTl2OCTF = 3.66/2.;
1190 const Float_t kAlp2OCTF = 44.67;
1192 // VertEarthFaceCu parameters - single trapezoid
1193 const Float_t kHzVFC = kHzVertEarthFaceCu;
1194 const Float_t kTetVFC = 0.;
1195 const Float_t kPhiVFC = 0.;
1196 const Float_t kH1VFC = 1.200/2.;
1197 const Float_t kBl1VFC = 46.11/2.;
1198 const Float_t kTl1VFC = 48.236/2.;
1199 const Float_t kAlp1VFC = 41.54;
1200 const Float_t kH2VFC = 1.200/2.;
1201 const Float_t kBl2VFC = 46.11/2.;
1202 const Float_t kTl2VFC = 48.236/2.;
1203 const Float_t kAlp2VFC = 41.54;
1205 // VertEarthSteel parameters - single trapezoid
1206 const Float_t kHzVES = kHzVertBarSteel;
1207 const Float_t kTetVES = 0.;
1208 const Float_t kPhiVES = 0.;
1209 const Float_t kH1VES = 1.200/2.;
1210 const Float_t kBl1VES = 30.486/2.;
1211 const Float_t kTl1VES = 32.777/2.;
1212 const Float_t kAlp1VES = 43.67;
1213 const Float_t kH2VES = 1.200/2.;
1214 const Float_t kBl2VES = 30.486/2.;
1215 const Float_t kTl2VES = 32.777/2.;
1216 const Float_t kAlp2VES = 43.67;
1218 // VertEarthProfCu parameters - single trapezoid
1219 const Float_t kHzVPC = kHzVertEarthProfCu;
1220 const Float_t kTetVPC = 0.;
1221 const Float_t kPhiVPC = 0.;
1222 const Float_t kH1VPC = 0.400/2.;
1223 const Float_t kBl1VPC = 29.287/2.;
1224 const Float_t kTl1VPC = 30.091/2.;
1225 const Float_t kAlp1VPC = 45.14;
1226 const Float_t kH2VPC = 0.400/2.;
1227 const Float_t kBl2VPC = 29.287/2.;
1228 const Float_t kTl2VPC = 30.091/2.;
1229 const Float_t kAlp2VPC = 45.14;
1231 // SuppLateralPositionner - single cuboid
1232 const Float_t kHxSLP = 2.80/2.;
1233 const Float_t kHySLP = 5.00/2.;
1234 const Float_t kHzSLP = kHzLateralPosnAl;
1236 // LateralPositionner - squared off U bend, face view
1237 const Float_t kHxLPF = 5.2/2.;
1238 const Float_t kHyLPF = 3.0/2.;
1239 const Float_t kHzLPF = kHzLateralPosnInoxFace;
1241 // LateralPositionner - squared off U bend, profile view
1242 const Float_t kHxLPP = 0.425/2.;
1243 const Float_t kHyLPP = 3.0/2.;
1244 const Float_t kHzLPP = kHzLatPosInoxProfM; // middle layer
1245 const Float_t kHzLPNF = kHzLatPosInoxProfNF; // near and far layers
1247 // VertCradle, 3 layers (copies), each composed of 4 trapezoids
1249 const Float_t kHzVC1 = kHzVerticalCradleAl;
1250 const Float_t kTetVC1 = 0.;
1251 const Float_t kPhiVC1 = 0.;
1252 const Float_t kH1VC1 = 10.25/2.;
1253 const Float_t kBl1VC1 = 3.70/2.;
1254 const Float_t kTl1VC1 = 0.;
1255 const Float_t kAlp1VC1 = -10.23;
1256 const Float_t kH2VC1 = 10.25/2.;
1257 const Float_t kBl2VC1 = 3.70/2.;
1258 const Float_t kTl2VC1 = 0.;
1259 const Float_t kAlp2VC1 = -10.23;
1262 const Float_t kHzVC2 = kHzVerticalCradleAl;
1263 const Float_t kTetVC2 = 0.;
1264 const Float_t kPhiVC2 = 0.;
1265 const Float_t kH1VC2 = 10.25/2.;
1266 const Float_t kBl1VC2 = 6.266/2.;
1267 const Float_t kTl1VC2 = 3.70/2.;
1268 const Float_t kAlp1VC2 = -7.13;
1269 const Float_t kH2VC2 = 10.25/2.;
1270 const Float_t kBl2VC2 = 6.266/2.;
1271 const Float_t kTl2VC2 = 3.70/2.;
1272 const Float_t kAlp2VC2 = -7.13;
1275 const Float_t kHzVC3 = kHzVerticalCradleAl;
1276 const Float_t kTetVC3 = 0.;
1277 const Float_t kPhiVC3 = 0.;
1278 const Float_t kH1VC3 = 10.25/2.;
1279 const Float_t kBl1VC3 = 7.75/2.;
1280 const Float_t kTl1VC3 = 6.266/2.;
1281 const Float_t kAlp1VC3 = -4.14;
1282 const Float_t kH2VC3 = 10.25/2.;
1283 const Float_t kBl2VC3 = 7.75/2.;
1284 const Float_t kTl2VC3 = 6.266/2.;
1285 const Float_t kAlp2VC3 = -4.14;
1288 const Float_t kHzVC4 = kHzVerticalCradleAl;
1289 const Float_t kTetVC4 = 0.;
1290 const Float_t kPhiVC4 = 0.;
1291 const Float_t kH1VC4 = 10.27/2.;
1292 const Float_t kBl1VC4 = 8.273/2.;
1293 const Float_t kTl1VC4 = 7.75/2.;
1294 const Float_t kAlp1VC4 = -1.46;
1295 const Float_t kH2VC4 = 10.27/2.;
1296 const Float_t kBl2VC4 = 8.273/2.;
1297 const Float_t kTl2VC4 = 7.75/2.;
1298 const Float_t kAlp2VC4 = -1.46;
1300 // LateralSightSupport - single trapezoid
1301 const Float_t kHzVSS = kHzLateralSightAl;
1302 const Float_t kTetVSS = 0.;
1303 const Float_t kPhiVSS = 0.;
1304 const Float_t kH1VSS = 5.00/2.;
1305 const Float_t kBl1VSS = 7.747/2;
1306 const Float_t kTl1VSS = 7.188/2.;
1307 const Float_t kAlp1VSS = -3.20;
1308 const Float_t kH2VSS = 5.00/2.;
1309 const Float_t kBl2VSS = 7.747/2.;
1310 const Float_t kTl2VSS = 7.188/2.;
1311 const Float_t kAlp2VSS = -3.20;
1313 // LateralSight (reference point) - 3 per quadrant, only 1 programmed for now
1314 const Float_t kVSInRad = 0.6;
1315 const Float_t kVSOutRad = 1.3;
1316 const Float_t kVSLen = kHzFrameThickness;
1320 // InHFrame parameters
1321 const Float_t kHxInHFrame = 75.8/2.;
1322 const Float_t kHyInHFrame = 1.85/2.;
1323 const Float_t kHzInHFrame = kHzFrameThickness;
1325 //Flat 7.5mm horizontal section
1326 const Float_t kHxH1mm = 1.85/2.;
1327 const Float_t kHyH1mm = 0.75/2.;
1328 const Float_t kHzH1mm = kHzFrameThickness;
1332 // InArcFrame parameters
1333 const Float_t kIAF = 15.70;
1334 const Float_t kOAF = 17.55;
1335 const Float_t kHzAF = kHzFrameThickness;
1336 const Float_t kAFphi1 = 0.0;
1337 const Float_t kAFphi2 = 90.0;
1341 // ScrewsInFrame parameters HEAD
1342 const Float_t kSCRUHMI = 0.;
1343 const Float_t kSCRUHMA = 0.690/2.;
1344 const Float_t kSCRUHLE = 0.4/2.;
1345 // ScrewsInFrame parameters MIDDLE
1346 const Float_t kSCRUMMI = 0.;
1347 const Float_t kSCRUMMA = 0.39/2.;
1348 const Float_t kSCRUMLE = kHzFrameThickness;
1349 // ScrewsInFrame parameters NUT
1350 const Float_t kSCRUNMI = 0.;
1351 const Float_t kSCRUNMA = 0.78/2.;
1352 const Float_t kSCRUNLE = 0.8/2.;
1354 // ___________________Make volumes________________________
1357 Float_t posX,posY,posZ;
1361 par[0] = kHxInVFrame;
1362 par[1] = kHyInVFrame;
1363 par[2] = kHzInVFrame;
1364 gMC->Gsvolu("SQ00","BOX",idFrameEpoxy,par,3);
1366 //Flat 1mm vertical section
1370 gMC->Gsvolu("SQ01","BOX",idFrameEpoxy,par,3);
1374 // - 3 components (a cuboid and 2 trapezes) and 2 layers (Epoxy/Inox)
1378 // TopFrameAnode - layer 1 of 2
1382 gMC->Gsvolu("SQ02","BOX",idFrameEpoxy,par,3);
1384 // TopFrameAnode - layer 2 of 2
1386 gMC->Gsvolu("SQ03","BOX",idInox,par,3);
1388 // TopFrameAnodeA - layer 1 of 2
1400 gMC->Gsvolu("SQ04","TRAP",idFrameEpoxy,par,11);
1402 // TopFrameAnodeA - layer 2 of 2
1404 gMC->Gsvolu("SQ05","TRAP",idInox,par,11);
1406 // TopFrameAnodeB - layer 1 of 2
1418 gMC->Gsvolu("SQ06","TRAP",idFrameEpoxy,par,11);
1420 // OutTopTrapFrameB - layer 2 of 2
1422 gMC->Gsvolu("SQ07","TRAP",idInox,par,11);
1424 // TopAnode1 - layer 1 of 2
1428 gMC->Gsvolu("SQ08","BOX",idInox,par,3);
1430 // TopAnode1 - layer 2 of 2
1432 gMC->Gsvolu("SQ09","BOX",idFR4,par,11);
1434 // TopAnode2 - layer 1 of 2
1446 gMC->Gsvolu("SQ10","TRAP",idInox,par,11);
1448 // TopAnode2 - layer 2 of 2
1450 gMC->Gsvolu("SQ11","TRAP",idFR4,par,11);
1452 // TopAnode3 - layer 1 of 1
1464 gMC->Gsvolu("SQ12","TRAP",idFR4,par,11);
1478 gMC->Gsvolu("SQ13","TRAP",idCopper,par,11);
1492 gMC->Gsvolu("SQ14","TRAP",idCopper,par,11);
1498 gMC->Gsvolu("SQ15","BOX",idAlu,par,3);
1500 // TopPositioner parameters - single Stainless Steel trapezoid
1512 gMC->Gsvolu("SQ16","TRAP",idInox,par,11);
1515 // OutEdgeTrapFrame Epoxy = (4 trapezes)*2 copies*2 layers (Epoxy/Inox)
1518 // Trapezoid 1 - 2 layers
1524 par[6] = kAlp1OETF1;
1528 par[10] = kAlp2OETF1;
1531 gMC->Gsvolu("SQ17","TRAP",idFrameEpoxy,par,11);
1533 gMC->Gsvolu("SQ18","TRAP",idInox,par,11);
1535 // Trapezoid 2 - 2 layers
1538 par[6] = kAlp1OETF2;
1542 par[10] = kAlp2OETF2;
1545 gMC->Gsvolu("SQ19","TRAP",idFrameEpoxy,par,11);
1547 gMC->Gsvolu("SQ20","TRAP",idInox,par,11);
1549 // Trapezoid 3 - 2 layers
1552 par[6] = kAlp1OETF3;
1556 par[10] = kAlp2OETF3;
1559 gMC->Gsvolu("SQ21","TRAP",idFrameEpoxy,par,11);
1561 gMC->Gsvolu("SQ22","TRAP",idInox,par,11);
1563 // Trapezoid 4 - 2 layers
1567 par[6] = kAlp1OETF4;
1571 par[10] = kAlp2OETF4;
1574 gMC->Gsvolu("SQ23","TRAP",idFrameEpoxy,par,11);
1576 gMC->Gsvolu("SQ24","TRAP",idInox,par,11);
1580 par[0] = kHxOutVFrame;
1581 par[1] = kHyOutVFrame;
1582 par[2] = kHzOutVFrame;
1583 gMC->Gsvolu("SQ25","BOX",idFrameEpoxy,par,3);
1596 par[10] = kAlp2OCTF;
1597 gMC->Gsvolu("SQ26","TRAP",idFrameEpoxy,par,11);
1599 // EarthFaceCu trapezoid
1611 gMC->Gsvolu("SQ27","TRAP",idCopper,par,11);
1613 // VertEarthSteel trapezoid
1625 gMC->Gsvolu("SQ28","TRAP",idInox,par,11);
1627 // VertEarthProfCu trapezoid
1639 gMC->Gsvolu("SQ29","TRAP",idCopper,par,11);
1641 // SuppLateralPositionner cuboid
1645 gMC->Gsvolu("SQ30","BOX",idAlu,par,3);
1647 // LateralPositionerFace
1651 gMC->Gsvolu("SQ31","BOX",idInox,par,3);
1653 // LateralPositionerProfile
1657 gMC->Gsvolu("SQ32","BOX",idInox,par,3); // middle layer
1662 gMC->Gsvolu("SQ33","BOX",idInox,par,3); // near and far layers
1664 // VertCradleA - 1st trapezoid
1676 gMC->Gsvolu("SQ34","TRAP",idAlu,par,11);
1678 // VertCradleB - 2nd trapezoid
1690 gMC->Gsvolu("SQ35","TRAP",idAlu,par,11);
1692 // VertCradleC - 3rd trapezoid
1704 gMC->Gsvolu("SQ36","TRAP",idAlu,par,11);
1706 // VertCradleD - 4th trapezoid
1718 gMC->Gsvolu("SQ37","TRAP",idAlu,par,11);
1720 // LateralSightSupport trapezoid
1732 gMC->Gsvolu("SQ38","TRAP",idAlu,par,11);
1738 gMC->Gsvolu("SQ39","TUBE",idFrameEpoxy,par,3);
1742 par[0] = kHxInHFrame;
1743 par[1] = kHyInHFrame;
1744 par[2] = kHzInHFrame;
1745 gMC->Gsvolu("SQ40","BOX",idFrameEpoxy,par,3);
1747 //Flat 7.5mm horizontal section
1751 gMC->Gsvolu("SQ41","BOX",idFrameEpoxy,par,3);
1760 gMC->Gsvolu("SQ42","TUBS",idFrameEpoxy,par,5);
1763 // ScrewsInFrame - 3 sections in order to avoid overlapping volumes
1764 // Screw Head, in air
1769 gMC->Gsvolu("SQ43","TUBE",idInox,par,3);
1771 // Middle part, in the Epoxy
1775 gMC->Gsvolu("SQ44","TUBE",idInox,par,3);
1777 // Screw nut, in air
1781 gMC->Gsvolu("SQ45","TUBE",idInox,par,3);
1784 // __________________Place volumes in the quadrant ____________
1788 posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyInVFrame;
1790 gMC->Gspos("SQ00",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
1792 // keep memory of the mid position. Used for placing screws
1793 const GReal_t kMidVposX = posX;
1794 const GReal_t kMidVposY = posY;
1795 const GReal_t kMidVposZ = posZ;
1797 //Flat 7.5mm vertical section
1798 posX = 2.0*kHxInVFrame+kHxV1mm;
1799 posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyV1mm;
1801 gMC->Gspos("SQ01",1,quadrantMLayerName,posX, posY, posZ,0, "ONLY");
1803 // TopFrameAnode place 2 layers of TopFrameAnode cuboids
1805 posY = 2.*kHyInHFrame+2.*kHyH1mm+kIAF+2.*kHyInVFrame+kHyTFA;
1806 posZ = -kHzOuterFrameInox;
1807 gMC->Gspos("SQ02",1,quadrantMLayerName,posX, posY, posZ,0,"ONLY");
1808 posZ = kHzOuterFrameEpoxy;
1809 gMC->Gspos("SQ03",1,quadrantMLayerName,posX, posY, posZ,0,"ONLY");
1811 // place 2 layers of TopFrameAnodeA trapezoids
1812 posX = 35.8932+fgkDeltaQuadLHC;
1813 posY = 92.6745+fgkDeltaQuadLHC;
1814 posZ = -kHzOuterFrameInox;
1815 gMC->Gspos("SQ04",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1816 posZ = kHzOuterFrameEpoxy;
1817 gMC->Gspos("SQ05",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1819 // place 2 layers of TopFrameAnodeB trapezoids
1820 posX = 44.593+fgkDeltaQuadLHC;
1821 posY = 90.737+fgkDeltaQuadLHC;
1822 posZ = -kHzOuterFrameInox;
1823 gMC->Gspos("SQ06",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1824 posZ = kHzOuterFrameEpoxy;
1825 gMC->Gspos("SQ07",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1827 // TopAnode1 place 2 layers
1828 posX = 6.8+fgkDeltaQuadLHC;
1829 posY = 99.85+fgkDeltaQuadLHC;
1830 posZ = -1.*kHzAnodeFR4;
1831 gMC->Gspos("SQ08",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1832 posZ = kHzTopAnodeSteel1;
1833 gMC->Gspos("SQ09",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1835 // TopAnode2 place 2 layers
1836 posX = 18.534+fgkDeltaQuadLHC;
1837 posY = 99.482+fgkDeltaQuadLHC;
1838 posZ = -1.*kHzAnodeFR4;
1839 gMC->Gspos("SQ10",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1840 posZ = kHzTopAnodeSteel2;
1841 gMC->Gspos("SQ11",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1843 // TopAnode3 place 1 layer
1844 posX = 25.804+fgkDeltaQuadLHC;
1845 posY = 98.61+fgkDeltaQuadLHC;
1847 gMC->Gspos("SQ12",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1849 // TopEarthFace - 2 copies
1850 posX = 23.122+fgkDeltaQuadLHC;
1851 posY = 96.90+fgkDeltaQuadLHC;
1852 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopEarthFaceCu;
1853 gMC->Gspos("SQ13",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1855 gMC->Gspos("SQ13",2,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1858 posX = 14.475+fgkDeltaQuadLHC;
1859 posY = 97.900+fgkDeltaQuadLHC;
1860 posZ = kHzTopEarthProfileCu;
1861 gMC->Gspos("SQ14",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1863 gMC->Gspos("SQ14",2,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1865 // TopGasSupport - 2 copies
1866 posX = 4.9500+fgkDeltaQuadLHC;
1867 posY = 96.200+fgkDeltaQuadLHC;
1868 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopGasSupportAl;
1869 gMC->Gspos("SQ15",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1871 gMC->Gspos("SQ15",2,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1873 // TopPositioner parameters - single Stainless Steel trapezoid - 2 copies
1874 posX = 7.60+fgkDeltaQuadLHC;
1875 posY = 98.98+fgkDeltaQuadLHC;
1876 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+2.*kHzTopGasSupportAl+kHzTopPositionerSteel;
1877 gMC->Gspos("SQ16",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1879 gMC->Gspos("SQ16",2,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1885 xCenter[0] = 73.201 + fgkDeltaQuadLHC;
1886 xCenter[1] = 78.124 + fgkDeltaQuadLHC;
1887 //xCenter[2] = 82.862 + fgkDeltaQuadLHC;
1888 xCenter[2] = 83.102 + fgkDeltaQuadLHC;
1889 xCenter[3] = 87.418 + fgkDeltaQuadLHC;
1890 // Fix (5) - overlap of SQ21 with 041M and 125M
1892 yCenter[0] = 68.122 + fgkDeltaQuadLHC;
1893 yCenter[1] = 62.860 + fgkDeltaQuadLHC;
1894 //yCenter[2] = 57.420 + fgkDeltaQuadLHC;
1895 yCenter[2] = 57.660 + fgkDeltaQuadLHC;
1896 yCenter[3] = 51.800 + fgkDeltaQuadLHC;
1897 // Fix (5) - overlap of SQ21 with 041M and 125M
1899 xCenter[4] = 68.122 + fgkDeltaQuadLHC;
1900 xCenter[5] = 62.860 + fgkDeltaQuadLHC;
1901 xCenter[6] = 57.420 + fgkDeltaQuadLHC;
1902 xCenter[7] = 51.800 + fgkDeltaQuadLHC;
1904 yCenter[4] = 73.210 + fgkDeltaQuadLHC;
1905 yCenter[5] = 78.124 + fgkDeltaQuadLHC;
1906 yCenter[6] = 82.862 + fgkDeltaQuadLHC;
1907 yCenter[7] = 87.418 + fgkDeltaQuadLHC;
1909 posZ = -1.0*kHzOuterFrameInox;
1910 gMC->Gspos("SQ17",1,quadrantMLayerName, xCenter[0], yCenter[0], posZ, rot2,"ONLY");
1911 gMC->Gspos("SQ17",2,quadrantMLayerName, xCenter[4], yCenter[4], posZ, rot3,"ONLY");
1913 gMC->Gspos("SQ19",1,quadrantMLayerName, xCenter[1], yCenter[1], posZ, rot2,"ONLY");
1914 gMC->Gspos("SQ19",2,quadrantMLayerName, xCenter[5], yCenter[5], posZ, rot3,"ONLY");
1916 gMC->Gspos("SQ21",1,quadrantMLayerName, xCenter[2], yCenter[2], posZ, rot2,"ONLY");
1917 gMC->Gspos("SQ21",2,quadrantMLayerName, xCenter[6], yCenter[6], posZ, rot3,"ONLY");
1919 gMC->Gspos("SQ23",1,quadrantMLayerName, xCenter[3], yCenter[3], posZ, rot2,"ONLY");
1920 gMC->Gspos("SQ23",2,quadrantMLayerName, xCenter[7], yCenter[7], posZ, rot3,"ONLY");
1922 posZ = kHzOuterFrameEpoxy;
1924 gMC->Gspos("SQ18",1,quadrantMLayerName, xCenter[0], yCenter[0], posZ, rot2,"ONLY");
1925 gMC->Gspos("SQ18",2,quadrantMLayerName, xCenter[4], yCenter[4], posZ, rot3,"ONLY");
1927 gMC->Gspos("SQ20",1,quadrantMLayerName, xCenter[1], yCenter[1], posZ, rot2,"ONLY");
1928 gMC->Gspos("SQ20",2,quadrantMLayerName, xCenter[5], yCenter[5], posZ, rot3,"ONLY");
1930 gMC->Gspos("SQ22",1,quadrantMLayerName, xCenter[2], yCenter[2], posZ, rot2,"ONLY");
1931 gMC->Gspos("SQ22",2,quadrantMLayerName, xCenter[6], yCenter[6], posZ, rot3,"ONLY");
1933 gMC->Gspos("SQ24",1,quadrantMLayerName, xCenter[3], yCenter[3], posZ, rot2,"ONLY");
1934 gMC->Gspos("SQ24",2,quadrantMLayerName, xCenter[7], yCenter[7], posZ, rot3,"ONLY");
1939 posX = 2.*kHxInVFrame+kIAF+2.*kHxInHFrame-kHxOutVFrame+2.*kHxV1mm;
1940 posY = 2.*kHyInHFrame+kHyOutVFrame;
1942 gMC->Gspos("SQ25",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
1944 // keep memory of the mid position. Used for placing screws
1945 const GReal_t kMidOVposX = posX;
1946 const GReal_t kMidOVposY = posY;
1947 const GReal_t kMidOVposZ = posZ;
1949 const Float_t kTOPY = posY+kHyOutVFrame;
1950 const Float_t kOUTX = posX;
1954 posY = kTOPY+((kBl1OCTF+kTl1OCTF)/2.);
1956 gMC->Gspos("SQ26",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1958 // VertEarthFaceCu - 2 copies
1959 posX = 89.4000+fgkDeltaQuadLHC;
1960 posY = 25.79+fgkDeltaQuadLHC;
1961 posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertEarthFaceCu;
1962 gMC->Gspos("SQ27",1,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY");
1964 gMC->Gspos("SQ27",2,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY");
1966 // VertEarthSteel - 2 copies
1967 posX = 91.00+fgkDeltaQuadLHC;
1968 posY = 30.616+fgkDeltaQuadLHC;
1969 posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertBarSteel;
1970 gMC->Gspos("SQ28",1,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY");
1972 gMC->Gspos("SQ28",2,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY");
1974 // VertEarthProfCu - 2 copies
1975 posX = 92.000+fgkDeltaQuadLHC;
1976 posY = 29.64+fgkDeltaQuadLHC;
1977 posZ = kHzFrameThickness;
1978 gMC->Gspos("SQ29",1,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY");
1980 gMC->Gspos("SQ29",2,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY");
1982 // SuppLateralPositionner - 2 copies
1983 posX = 90.2-kNearFarLHC;
1984 posY = 5.00-kNearFarLHC;
1985 posZ = kHzLateralPosnAl-fgkMotherThick2;
1986 gMC->Gspos("SQ30",1,quadrantFLayerName,posX, posY, posZ, 0, "ONLY");
1988 gMC->Gspos("SQ30",2,quadrantNLayerName,posX, posY, posZ, 0, "ONLY");
1990 // LateralPositionner - 2 copies - Face view
1991 posX = 92.175-kNearFarLHC-2.*kHxLPP;
1992 posY = 5.00-kNearFarLHC;
1993 posZ =2.0*kHzLateralPosnAl+kHzLateralPosnInoxFace-fgkMotherThick2;
1994 gMC->Gspos("SQ31",1,quadrantFLayerName,posX, posY, posZ, 0, "ONLY");
1996 gMC->Gspos("SQ31",2,quadrantNLayerName,posX, posY, posZ, 0, "ONLY");
1998 // LateralPositionner - Profile view
1999 posX = 92.175+fgkDeltaQuadLHC+kHxLPF-kHxLPP;
2000 posY = 5.00+fgkDeltaQuadLHC;
2002 gMC->Gspos("SQ32",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); // middle layer
2004 posX = 92.175-kNearFarLHC+kHxLPF-kHxLPP;
2005 posY = 5.0000-kNearFarLHC;
2006 posZ = fgkMotherThick2-kHzLPNF;
2007 gMC->Gspos("SQ33",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY"); // near layer
2009 gMC->Gspos("SQ33",2,quadrantFLayerName,posX, posY, posZ, 0, "ONLY"); // far layer
2011 // VertCradleA 1st Trapezoid - 3 copies
2012 posX = 95.73+fgkDeltaQuadLHC;
2013 posY = 33.26+fgkDeltaQuadLHC;
2015 gMC->Gspos("SQ34",2,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
2017 posX = 95.73-kNearFarLHC;
2018 posY = 33.26-kNearFarLHC;
2019 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
2020 gMC->Gspos("SQ34",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY");
2022 gMC->Gspos("SQ34",3,quadrantFLayerName,posX, posY, posZ, 0, "ONLY");
2024 // VertCradleB 2nd Trapezoid - 3 copies
2025 posX = 97.29+fgkDeltaQuadLHC;
2026 posY = 23.02+fgkDeltaQuadLHC;
2028 gMC->Gspos("SQ35",2,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
2030 posX = 97.29-kNearFarLHC;
2031 posY = 23.02-kNearFarLHC;
2032 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
2033 gMC->Gspos("SQ35",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY");
2035 gMC->Gspos("SQ35",3,quadrantFLayerName,posX, posY, posZ, 0, "ONLY");
2037 // OutVertCradleC 3rd Trapeze - 3 copies
2038 posX = 98.31+fgkDeltaQuadLHC;
2039 posY = 12.77+fgkDeltaQuadLHC;
2041 gMC->Gspos("SQ36",2,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
2043 posX = 98.05-kNearFarLHC;
2044 posY = 12.77-kNearFarLHC;
2045 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
2046 // Fix (2) of extrusion SQ36 from SQN1, SQN2, SQF1, SQF2
2047 // (was posX = 98.31 ...)
2048 gMC->Gspos("SQ36",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY");
2050 gMC->Gspos("SQ36",3,quadrantFLayerName,posX, posY, posZ, 0, "ONLY");
2052 // OutVertCradleD 4th Trapeze - 3 copies
2053 posX = 98.81+fgkDeltaQuadLHC;
2054 posY = 2.52+fgkDeltaQuadLHC;
2056 gMC->Gspos("SQ37",2,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
2058 posZ = fgkMotherThick1-kHzVerticalCradleAl;
2059 gMC->Gspos("SQ37",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
2061 gMC->Gspos("SQ37",3,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
2063 // LateralSightSupport - 2 copies
2064 posX = 98.33-kNearFarLHC;
2065 posY = 10.00-kNearFarLHC;
2066 posZ = kHzLateralSightAl-fgkMotherThick2;
2067 // Fix (3) of extrusion SQ38 from SQN1, SQN2, SQF1, SQF2
2068 // (was posX = 98.53 ...)
2069 gMC->Gspos("SQ38",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY");
2071 gMC->Gspos("SQ38",2,quadrantFLayerName,posX, posY, posZ, 0, "ONLY");
2074 posX = 92.84+fgkDeltaQuadLHC;
2075 posY = 8.13+fgkDeltaQuadLHC;
2077 gMC->Gspos("SQ39",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
2082 posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxInHFrame;
2085 gMC->Gspos("SQ40",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
2087 // keep memory of the mid position. Used for placing screws
2088 const GReal_t kMidHposX = posX;
2089 const GReal_t kMidHposY = posY;
2090 const GReal_t kMidHposZ = posZ;
2092 // Flat 7.5mm horizontal section
2093 posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxH1mm;
2094 posY = 2.0*kHyInHFrame+kHyH1mm;
2096 gMC->Gspos("SQ41",1,quadrantMLayerName,posX, posY, posZ,0, "ONLY");
2099 posX = 2.0*kHxInVFrame+2.*kHxV1mm;
2100 posY = 2.0*kHyInHFrame+2.*kHyH1mm;
2102 gMC->Gspos("SQ42",1,quadrantMLayerName,posX, posY, posZ,0, "ONLY");
2104 // keep memory of the mid position. Used for placing screws
2105 const GReal_t kMidArcposX = posX;
2106 const GReal_t kMidArcposY = posY;
2107 const GReal_t kMidArcposZ = posZ;
2109 // ScrewsInFrame - in sensitive volume
2114 // Screws on IHEpoxyFrame
2116 const Int_t kNumberOfScrewsIH = 14; // no. of screws on the IHEpoxyFrame
2117 const Float_t kOffX = 5.; // inter-screw distance
2119 // first screw coordinates
2122 // other screw coordinates
2123 for (Int_t i = 1;i<kNumberOfScrewsIH;i++){
2124 scruX[i] = scruX[i-1]+kOffX;
2125 scruY[i] = scruY[0];
2127 // Position the volumes on the frames
2128 for (Int_t i = 0;i<kNumberOfScrewsIH;i++){
2129 posX = fgkDeltaQuadLHC + scruX[i];
2130 posY = fgkDeltaQuadLHC + scruY[i];
2132 gMC->Gspos("SQ43",i+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2134 gMC->Gspos("SQ44",i+1,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
2135 gMC->Gspos("SQ45",i+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
2137 // special screw coordinates
2140 posX = fgkDeltaQuadLHC + scruX[63];
2141 posY = fgkDeltaQuadLHC + scruY[63];
2143 gMC->Gspos("SQ43",64,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2145 gMC->Gspos("SQ44",64,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
2146 gMC->Gspos("SQ45",64,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
2148 // Screws on the IVEpoxyFrame
2150 const Int_t kNumberOfScrewsIV = 15; // no. of screws on the IVEpoxyFrame
2151 const Float_t kOffY = 5.; // inter-screw distance
2152 Int_t firstScrew = 58;
2153 Int_t lastScrew = 44;
2155 // first (special) screw coordinates
2156 scruX[firstScrew-1] = -2.23;
2157 scruY[firstScrew-1] = 16.3;
2158 // second (repetitive) screw coordinates
2159 scruX[firstScrew-2] = -2.23;
2160 scruY[firstScrew-2] = 21.07;
2161 // other screw coordinates
2162 for (Int_t i = firstScrew-3;i>lastScrew-2;i--){
2163 scruX[i] = scruX[firstScrew-2];
2164 scruY[i] = scruY[i+1]+kOffY;
2167 for (Int_t i = 0;i<kNumberOfScrewsIV;i++){
2168 posX = fgkDeltaQuadLHC + scruX[i+lastScrew-1];
2169 posY = fgkDeltaQuadLHC + scruY[i+lastScrew-1];
2171 gMC->Gspos("SQ43",i+lastScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2173 gMC->Gspos("SQ44",i+lastScrew,"SQ00",posX+0.1-kMidVposX, posY+0.1-kMidVposY, posZ-kMidVposZ, 0, "ONLY");
2174 gMC->Gspos("SQ45",i+lastScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
2177 // Screws on the OVEpoxyFrame
2179 const Int_t kNumberOfScrewsOV = 10; // no. of screws on the OVEpoxyFrame
2184 // first (repetitive) screw coordinates
2185 // notes: 1st screw should be placed in volume 40 (InnerHorizFrame)
2186 scruX[firstScrew-1] = 90.9;
2187 scruY[firstScrew-1] = -2.23; // true value
2189 // other screw coordinates
2190 for (Int_t i = firstScrew; i<lastScrew; i++ ){
2191 scruX[i] = scruX[firstScrew-1];
2192 scruY[i] = scruY[i-1]+kOffY;
2194 for (Int_t i = 1;i<kNumberOfScrewsOV;i++){
2195 posX = fgkDeltaQuadLHC + scruX[i+firstScrew-1];
2196 posY = fgkDeltaQuadLHC + scruY[i+firstScrew-1];
2198 gMC->Gspos("SQ43",i+firstScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2201 gMC->Gspos("SQ44",i+firstScrew,"SQ25",posX+0.1-kMidOVposX, posY+0.1-kMidOVposY, posZ-kMidOVposZ, 0, "ONLY");
2202 gMC->Gspos("SQ45",i+firstScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
2204 // special case for 1st screw, inside the horizontal frame (volume 40)
2205 posX = fgkDeltaQuadLHC + scruX[firstScrew-1];
2206 posY = fgkDeltaQuadLHC + scruY[firstScrew-1];
2209 gMC->Gspos("SQ44",firstScrew,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
2211 // Inner Arc of Frame, screw positions and numbers-1
2212 scruX[62] = 16.009; scruY[62] = 1.401;
2213 scruX[61] = 14.564; scruY[61] = 6.791;
2214 scruX[60] = 11.363; scruY[60] = 11.363;
2215 scruX[59] = 6.791 ; scruY[59] = 14.564;
2216 scruX[58] = 1.401 ; scruY[58] = 16.009;
2218 for (Int_t i = 0;i<5;i++){
2219 posX = fgkDeltaQuadLHC + scruX[i+58];
2220 posY = fgkDeltaQuadLHC + scruY[i+58];
2222 gMC->Gspos("SQ43",i+58+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2224 gMC->Gspos("SQ44",i+58+1,"SQ42",posX+0.1-kMidArcposX, posY+0.1-kMidArcposY, posZ-kMidArcposZ, 0, "ONLY");
2225 gMC->Gspos("SQ45",i+58+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
2229 //______________________________________________________________________________
2230 void AliMUONSt1GeometryBuilderV2::PlaceInnerLayers(Int_t chamber)
2232 /// Place the gas and copper layers for the specified chamber.
2234 // Rotation Matrices
2235 Int_t rot1, rot2, rot3, rot4;
2237 fMUON->AliMatrix(rot1, 90., 315., 90., 45., 0., 0.); // -45 deg
2238 fMUON->AliMatrix(rot2, 90., 90., 90., 180., 0., 0.); // 90 deg
2239 fMUON->AliMatrix(rot3, 90., 270., 90., 0., 0., 0.); // -90 deg
2240 fMUON->AliMatrix(rot4, 90., 45., 90., 135., 0., 0.); // deg
2245 GReal_t zc = fgkHzGas + fgkHzPadPlane;
2246 Int_t dpos = (chamber-1)*2;
2249 x = 14.53 + fgkDeltaQuadLHC;
2250 y = 53.34 + fgkDeltaQuadLHC;
2251 name = GasVolumeName("SAG", chamber);
2252 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2253 gMC->Gspos("SA1C", 1+dpos, QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2254 gMC->Gspos("SA1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2256 x = 40.67 + fgkDeltaQuadLHC;
2257 y = 40.66 + fgkDeltaQuadLHC;
2258 name = GasVolumeName("SBG", chamber);
2259 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot1,"ONLY");
2260 gMC->Gspos("SB1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot1,"ONLY");
2261 gMC->Gspos("SB1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,rot1,"ONLY");
2263 x = 53.34 + fgkDeltaQuadLHC;
2264 y = 14.52 + fgkDeltaQuadLHC;
2265 name = GasVolumeName("SCG", chamber);
2266 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot2,"ONLY");
2267 gMC->Gspos("SC1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot2,"ONLY");
2268 gMC->Gspos("SC1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot2,"ONLY");
2270 x = 5.83 + fgkDeltaQuadLHC;
2271 y = 17.29 + fgkDeltaQuadLHC;
2272 name = GasVolumeName("SDG", chamber);
2273 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot3,"ONLY");
2274 gMC->Gspos("SD1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot3,"ONLY");
2275 gMC->Gspos("SD1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot3,"ONLY");
2277 x = 9.04 + fgkDeltaQuadLHC;
2278 y = 16.91 + fgkDeltaQuadLHC;
2279 name = GasVolumeName("SEG", chamber);
2280 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2281 gMC->Gspos("SE1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2282 gMC->Gspos("SE1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2284 x = 10.12 + fgkDeltaQuadLHC;
2285 y = 14.67 + fgkDeltaQuadLHC;
2286 name = GasVolumeName("SFG", chamber);
2287 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2288 gMC->Gspos("SF1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2289 gMC->Gspos("SF1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2291 x = 8.2042 + fgkDeltaQuadLHC;
2292 y = 16.19 + fgkDeltaQuadLHC;
2293 name = GasVolumeName("SGG", chamber);
2294 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2295 gMC->Gspos("SG1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2296 gMC->Gspos("SG1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2298 x = 14.68 + fgkDeltaQuadLHC;
2299 y = 10.10 + fgkDeltaQuadLHC;
2300 name = GasVolumeName("SHG", chamber);
2301 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2302 gMC->Gspos("SH1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2303 gMC->Gspos("SH1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2305 x = 16.21 + fgkDeltaQuadLHC;
2306 y = 8.17 + fgkDeltaQuadLHC;
2307 name = GasVolumeName("SIG", chamber);
2308 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2309 gMC->Gspos("SI1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2310 gMC->Gspos("SI1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2312 x = 16.92 + fgkDeltaQuadLHC;
2313 y = 9.02 + fgkDeltaQuadLHC;
2314 name = GasVolumeName("SJG", chamber);
2315 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot3,"ONLY");
2316 gMC->Gspos("SJ1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot3,"ONLY");
2317 gMC->Gspos("SJ1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot3,"ONLY");
2319 x = 17.30 + fgkDeltaQuadLHC;
2320 y = 5.85 + fgkDeltaQuadLHC;
2321 name = GasVolumeName("SKG", chamber);
2322 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2323 gMC->Gspos("SK1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2324 gMC->Gspos("SK1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2328 //______________________________________________________________________________
2329 void AliMUONSt1GeometryBuilderV2::PlaceSpacer0(Int_t chamber)
2331 /// Place the spacer defined in global positions
2332 /// !! This method should be used only to find out the right mother volume
2333 /// for the spacer if geometry is changed and the plane segment volumes
2334 /// will change their numbering
2336 // Global position of mother volume for the QuadrantMLayer
2337 // SQM1: (-2.6, -2.6, -522.41)
2338 // SQM2: (-2.6, -2.6, -541.49)
2341 GReal_t mz = 522.41;
2347 AliDebugStream(2) << "spacer05 pos1: " << x << ", " << y << ", " << z << endl;
2348 gMC->Gspos("Spacer05", 1, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY");
2351 AliDebugStream(2) << "spacer05 pos2: " << x << ", " << y << ", " << z << endl;
2352 gMC->Gspos("Spacer05", 2, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY");
2357 AliDebugStream(2) << "spacer06 pos1: " << x << ", " << y << ", " << z << endl;
2358 gMC->Gspos("Spacer06", 1, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY");
2361 AliDebugStream(2) << "spacer06 pos2: " << x << ", " << y << ", " << z << endl;
2362 gMC->Gspos("Spacer06", 2, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY");
2367 AliDebugStream(2) << "spacer07 pos1: " << x << ", " << y << ", " << z << endl;
2368 gMC->Gspos("Spacer07", 1, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY");
2371 //______________________________________________________________________________
2372 void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector,
2374 const TVector3& where, Bool_t reflectZ, Int_t chamber)
2376 /// Place all the segments in the mother volume, at the position defined
2377 /// by the sector's data. \n
2378 /// The lines with comments COMMENT OUT BEGIN/END indicates blocks
2379 /// which can be commented out in order to reduce the number of volumes
2380 /// in a sector to the plane segments corresponding to regular motifs only.
2382 static Int_t segNum=1;
2389 reflZ=0; // no reflection along z... nothing
2390 fMUON->AliMatrix(rotMat, 90.,90.,90,180.,0.,0.); // 90° rotation around z, NO reflection along z
2393 fMUON->AliMatrix(reflZ, 90.,0.,90,90.,180.,0.); // reflection along z
2394 fMUON->AliMatrix(rotMat, 90.,90.,90,180.,180.,0.); // 90° rotation around z AND reflection along z
2397 GReal_t posX,posY,posZ;
2400 vector<Int_t> alreadyDone;
2404 TArrayI alreadyDone(20);
2405 Int_t nofAlreadyDone = 0;
2408 for (Int_t irow=0;irow<sector->GetNofRows();irow++){ // for each row
2409 AliMpRow* row = sector->GetRow(irow);
2412 for (Int_t iseg=0;iseg<row->GetNofRowSegments();iseg++){ // for each row segment
2413 AliMpVRowSegment* seg = row->GetRowSegment(iseg);
2415 Long_t value = specialMap.GetValue(seg->GetMotifPositionId(0));
2417 if ( value == 0 ){ //if this is a normal segment (ie. not part of <specialMap>)
2419 // create the cathode part
2420 CreatePlaneSegment(segNum, seg->Dimensions(), seg->GetNofMotifs());
2422 posX = where.X() + seg->Position().X();
2423 posY = where.Y() + seg->Position().Y();
2424 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
2425 gMC->Gspos(PlaneSegmentName(segNum).Data(), 1,
2426 QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2428 // and place all the daughter boards of this segment
2430 // COMMENT OUT BEGIN
2431 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {
2434 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2435 AliMpMotifPosition* motifPos =
2436 sector->GetMotifMap()->FindMotifPosition(motifPosId);
2437 Int_t copyNo = motifPosId;
2438 if ( sector->GetDirection() == AliMp::kX) copyNo += fgkDaughterCopyNoOffset;
2441 posX = where.X() + motifPos->Position().X() + fgkOffsetX;
2442 posY = where.Y() + motifPos->Position().Y() + fgkOffsetY;
2443 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
2444 gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2452 // COMMENT OUT BEGIN
2453 // if this is a special segment
2454 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {// for each motif
2456 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2459 if (find(alreadyDone.begin(),alreadyDone.end(),motifPosId)
2460 != alreadyDone.end()) continue; // don't treat the same motif twice
2464 Bool_t isDone = false;
2466 while (i<nofAlreadyDone && !isDone) {
2467 if (alreadyDone.At(i) == motifPosId) isDone=true;
2470 if (isDone) continue; // don't treat the same motif twice
2473 AliMUONSt1SpecialMotif spMot = *((AliMUONSt1SpecialMotif*)specialMap.GetValue(motifPosId));
2474 AliDebugStream(2) << chamber << " processing special motif: " << motifPosId << endl;
2476 AliMpMotifPosition* motifPos = sector->GetMotifMap()->FindMotifPosition(motifPosId);
2479 Int_t copyNo = motifPosId;
2480 if ( sector->GetDirection() == AliMp::kX) copyNo += fgkDaughterCopyNoOffset;
2482 // place the hole for the motif, wrt the requested rotation angle
2483 Int_t rot = ( spMot.GetRotAngle()<0.1 ) ? reflZ:rotMat;
2485 posX = where.X() + motifPos->Position().X() + spMot.GetDelta().X();
2486 posY = where.Y() + motifPos->Position().Y() + spMot.GetDelta().Y();
2487 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
2488 // Shift the hole for special motif 46 to avoid debording into S047
2489 if ( copyNo == 2070 ) posX -= 0.1;
2490 gMC->Gspos(fgkHoleName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
2492 // then place the daughter board for the motif, wrt the requested rotation angle
2493 posX = posX+fgkDeltaFilleEtamX;
2494 posY = posY+fgkDeltaFilleEtamY;
2495 // Do not shift the daughter board
2496 if ( copyNo == 2070 ) posX += 0.1;
2497 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
2498 gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
2501 alreadyDone.push_back(motifPosId);// mark this motif as done
2504 if (nofAlreadyDone == alreadyDone.GetSize())
2505 alreadyDone.Set(2*nofAlreadyDone);
2506 alreadyDone.AddAt(motifPosId, nofAlreadyDone++);
2508 AliDebugStream(2) << chamber << " processed motifPosId: " << motifPosId << endl;
2512 }// end of special motif case
2518 //______________________________________________________________________________
2519 TString AliMUONSt1GeometryBuilderV2::GasVolumeName(const TString& name, Int_t chamber) const
2521 /// Insert the chamber number into the name.
2523 TString newString(name);
2528 newString.Insert(2, number);
2537 //______________________________________________________________________________
2538 void AliMUONSt1GeometryBuilderV2::CreateMaterials()
2540 /// Define materials specific to station 1
2542 // Materials and medias defined in MUONv1:
2544 // AliMaterial( 9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
2545 // AliMaterial(10, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
2546 // AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
2547 // AliMixture( 19, "Bakelite$", abak, zbak, dbak, -3, wbak);
2548 // AliMixture( 20, "ArC4H10 GAS$", ag, zg, dg, 3, wg);
2549 // AliMixture( 21, "TRIG GAS$", atrig, ztrig, dtrig, -5, wtrig);
2550 // AliMixture( 22, "ArCO2 80%$", ag1, zg1, dg1, 3, wg1);
2551 // AliMixture( 23, "Ar-freon $", atr1, ztr1, dtr1, 4, wtr1);
2552 // AliMixture( 24, "ArCO2 GAS$", agas, zgas, dgas, 3, wgas);
2553 // AliMaterial(31, "COPPER$", 63.54, 29., 8.96, 1.4, 0.);
2554 // AliMixture( 32, "Vetronite$",aglass, zglass, dglass, 5, wglass);
2555 // AliMaterial(33, "Carbon$", 12.01, 6., 2.265, 18.8, 49.9);
2556 // AliMixture( 34, "Rohacell$", arohac, zrohac, drohac, -4, wrohac);
2558 // AliMedium( 1, "AIR_CH_US ", 15, 1, iSXFLD, ...
2559 // AliMedium( 4, "ALU_CH_US ", 9, 0, iSXFLD, ...
2560 // AliMedium( 5, "ALU_CH_US ", 10, 0, iSXFLD, ...
2561 // AliMedium( 6, "AR_CH_US ", 20, 1, iSXFLD, ...
2562 // AliMedium( 7, "GAS_CH_TRIGGER ", 21, 1, iSXFLD, ...
2563 // AliMedium( 8, "BAKE_CH_TRIGGER ", 19, 0, iSXFLD, ...
2564 // AliMedium( 9, "ARG_CO2 ", 22, 1, iSXFLD, ...
2565 // AliMedium(11, "PCB_COPPER ", 31, 0, iSXFLD, ...
2566 // AliMedium(12, "VETRONITE ", 32, 0, iSXFLD, ...
2567 // AliMedium(13, "CARBON ", 33, 0, iSXFLD, ...
2568 // AliMedium(14, "Rohacell ", 34, 0, iSXFLD, ...
2569 // AliMedium(24, "FrameCH$ ", 44, 1, iSXFLD, ...
2572 // --- Define materials for GEANT ---
2575 fMUON->AliMaterial(41, "Aluminium II$", 26.98, 13., 2.7, -8.9, 26.1);
2577 // from PDG and "The Particle Detector BriefBook", Bock and Vasilescu, P.18
2578 // ??? same but the last but one argument < 0
2580 // --- Define mixtures for GEANT ---
2583 // // Ar-CO2 gas II (80%+20%)
2584 // Float_t ag1[2] = { 39.95, 44.01};
2585 // Float_t zg1[2] = { 18., 22.};
2586 // Float_t wg1[2] = { .8, 0.2};
2587 // Float_t dg1 = .001821;
2588 // fMUON->AliMixture(45, "ArCO2 II 80%$", ag1, zg1, dg1, 2, wg1);
2590 // // use wg1 weighting factors (6th arg > 0)
2592 // Rohacell 51 II - imide methacrylique
2593 Float_t aRohacell51[4] = { 12.01, 1.01, 16.00, 14.01};
2594 Float_t zRohacell51[4] = { 6., 1., 8., 7.};
2595 Float_t wRohacell51[4] = { 9., 13., 2., 1.};
2596 Float_t dRohacell51 = 0.052;
2597 fMUON->AliMixture(46, "FOAM$",aRohacell51,zRohacell51,dRohacell51,-4,wRohacell51);
2599 // use relative A (molecular) values (6th arg < 0)
2601 Float_t aSnPb[2] = { 118.69, 207.19};
2602 Float_t zSnPb[2] = { 50, 82};
2603 Float_t wSnPb[2] = { 0.6, 0.4} ;
2604 Float_t dSnPb = 8.926;
2605 fMUON->AliMixture(47, "SnPb$", aSnPb,zSnPb,dSnPb,2,wSnPb);
2607 // use wSnPb weighting factors (6th arg > 0)
2609 // plastic definition from K5, Freiburg (found on web)
2610 Float_t aPlastic[2]={ 1.01, 12.01};
2611 Float_t zPlastic[2]={ 1, 6};
2612 Float_t wPlastic[2]={ 1, 1};
2613 Float_t denPlastic=1.107;
2614 fMUON->AliMixture(48, "Plastic$",aPlastic,zPlastic,denPlastic,-2,wPlastic);
2616 // use relative A (molecular) values (6th arg < 0)...no other info...
2618 // Not used, to be removed
2622 // Inox/Stainless Steel (18%Cr, 9%Ni)
2623 Float_t aInox[3] = {55.847, 51.9961, 58.6934};
2624 Float_t zInox[3] = {26., 24., 28.};
2625 Float_t wInox[3] = {0.73, 0.18, 0.09};
2626 Float_t denInox = 7.930;
2627 fMUON->AliMixture(50, "StainlessSteel$",aInox,zInox,denInox,3,wInox);
2629 // use wInox weighting factors (6th arg > 0)
2630 // from CERN note NUFACT Note023, Oct.2000
2632 // End - Not used, to be removed
2635 // --- Define the tracking medias for GEANT ---
2638 GReal_t epsil = .001; // Tracking precision,
2639 //GReal_t stemax = -1.; // Maximum displacement for multiple scat
2640 GReal_t tmaxfd = -20.; // Maximum angle due to field deflection
2641 //GReal_t deemax = -.3; // Maximum fractional energy loss, DLS
2642 GReal_t stmin = -.8;
2643 GReal_t maxStepAlu = fMUON->GetMaxStepAlu();
2644 GReal_t maxDestepAlu = fMUON->GetMaxDestepAlu();
2645 // GReal_t maxStepGas = fMUON->GetMaxStepGas();
2646 Int_t iSXFLD = gAlice->Field()->PrecInteg();
2647 Float_t sXMGMX = gAlice->Field()->Max();
2649 fMUON->AliMedium(21, "ALU_II$", 41, 0, iSXFLD, sXMGMX,
2650 tmaxfd, maxStepAlu, maxDestepAlu, epsil, stmin);
2652 // was med: 20 mat: 36
2653 // fMUON->AliMedium(25, "ARG_CO2_II", 45, 1, iSXFLD, sXMGMX,
2654 // tmaxfd, maxStepGas, maxDestepAlu, epsil, stmin);
2655 // // was med: 9 mat: 22
2656 fMUON->AliMedium(26, "FOAM_CH$", 46, 0, iSXFLD, sXMGMX,
2657 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ;
2658 // was med: 16 mat: 32
2659 fMUON->AliMedium(27, "SnPb$", 47, 0, iSXFLD, sXMGMX,
2660 10.0, 0.01, 1.0, 0.003, 0.003);
2661 // was med: 19 mat: 35
2662 fMUON->AliMedium(28, "Plastic$", 48, 0, iSXFLD, sXMGMX,
2663 10.0, 0.01, 1.0, 0.003, 0.003);
2664 // was med: 17 mat: 33
2666 // Not used, to be romoved
2669 fMUON->AliMedium(30, "InoxBolts$", 50, 1, iSXFLD, sXMGMX,
2670 10.0, 0.01, 1.0, 0.003, 0.003);
2671 // was med: 21 mat: 37
2673 // End - Not used, to be removed
2676 //______________________________________________________________________________
2677 void AliMUONSt1GeometryBuilderV2::CreateGeometry()
2679 /// Create the detailed GEANT geometry for the dimuon arm station1
2681 AliDebug(1,"Called");
2683 // Define chamber volumes as virtual
2686 // Create basic volumes
2689 CreateDaughterBoard();
2690 CreateInnerLayers();
2694 // Create reflexion matrices
2697 Int_t reflXZ, reflYZ, reflXY;
2698 fMUON->AliMatrix(reflXZ, 90., 180., 90., 90., 180., 0.);
2699 fMUON->AliMatrix(reflYZ, 90., 0., 90.,-90., 180., 0.);
2700 fMUON->AliMatrix(reflXY, 90., 180., 90., 270., 0., 0.);
2702 // Define transformations for each quadrant
2703 // In old coordinate system: In new coordinate system:
2706 // II. | I. I. | II.
2708 // _____ | ____ _____ | ____
2710 // III. | IV. IV. | III.
2715 rotm[0]=0; // quadrant I
2716 rotm[1]=reflXZ; // quadrant II
2717 rotm[2]=reflXY; // quadrant III
2718 rotm[3]=reflYZ; // quadrant IV
2720 TGeoRotation rotm[4];
2721 rotm[0] = TGeoRotation("identity");
2722 rotm[1] = TGeoRotation("reflXZ", 90., 180., 90., 90., 180., 0.);
2723 rotm[2] = TGeoRotation("reflXY", 90., 180., 90., 270., 0., 0.);
2724 rotm[3] = TGeoRotation("reflYZ", 90., 0., 90.,-90., 180., 0.);
2727 scale[0] = TVector3( 1, 1, 1); // quadrant I
2728 scale[1] = TVector3(-1, 1, -1); // quadrant II
2729 scale[2] = TVector3(-1, -1, 1); // quadrant III
2730 scale[3] = TVector3( 1, -1, -1); // quadrant IV
2733 detElemId[0] = 1; // quadrant I
2734 detElemId[1] = 0; // quadrant II
2735 detElemId[2] = 3; // quadrant III
2736 detElemId[3] = 2; // quadrant IV
2738 // Shift in Z of the middle layer
2739 Double_t deltaZ = 7.5/2.;
2741 // Position of quadrant I wrt to the chamber position
2742 // TVector3 pos0(-fgkDeltaQuadLHC, -fgkDeltaQuadLHC, deltaZ);
2744 // Shift for near/far layers
2745 GReal_t shiftXY = fgkFrameOffset;
2746 GReal_t shiftZ = fgkMotherThick1+fgkMotherThick2;
2748 // Build two chambers
2750 for (Int_t ich=1; ich<3; ich++) {
2752 // Create quadrant volume
2753 CreateQuadrant(ich);
2755 // Place gas volumes
2756 PlaceInnerLayers(ich);
2758 // Place the quadrant
2759 for (Int_t i=0; i<4; i++) {
2761 GReal_t posx0, posy0, posz0;
2762 posx0 = fgkPadXOffsetBP * scale[i].X();
2763 posy0 = fgkPadYOffsetBP * scale[i].Y();;
2764 posz0 = deltaZ * scale[i].Z();
2766 ->AddEnvelope(QuadrantEnvelopeName(ich,i), detElemId[i] + ich*100, true,
2767 TGeoTranslation(posx0, posy0, posz0), rotm[i]);
2770 GReal_t posx, posy, posz;
2771 posx = -fgkDeltaQuadLHC - fgkPadXOffsetBP;
2772 posy = -fgkDeltaQuadLHC - fgkPadYOffsetBP;
2775 ->AddEnvelopeConstituent(QuadrantMLayerName(ich), QuadrantEnvelopeName(ich,i),
2776 i+1, TGeoTranslation(posx, posy, posz));
2778 ->AddEnvelopeConstituent(QuadrantMFLayerName(ich), QuadrantEnvelopeName(ich,i),
2779 i+5, TGeoTranslation(posx, posy, posz));
2782 GReal_t posx2 = posx + shiftXY;;
2783 GReal_t posy2 = posy + shiftXY;;
2784 GReal_t posz2 = posz - shiftZ;;
2785 //gMC->Gspos(QuadrantNLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
2787 ->AddEnvelopeConstituent(QuadrantNLayerName(ich), QuadrantEnvelopeName(ich,i),
2788 i+1, TGeoTranslation(posx2, posy2, posz2));
2790 posz2 = posz + shiftZ;
2791 //gMC->Gspos(QuadrantFLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
2793 ->AddEnvelopeConstituent(QuadrantFLayerName(ich), QuadrantEnvelopeName(ich,i),
2794 i+1, TGeoTranslation(posx2, posy2, posz2));
2796 // Place spacer in global coordinates in the first non rotated quadrant
2797 // if ( detElemId[i] == 0 ) PlaceSpacer0(ich);
2798 // !! This placement should be used only to find out the right mother volume
2799 // for the spacer if geometry is changed and the plane segment volumes
2800 // will change their numbering
2801 // The call to the method CreateSpacer0(); above haa to be uncommented, too
2806 //______________________________________________________________________________
2807 void AliMUONSt1GeometryBuilderV2::SetVolumes()
2809 /// Define the volumes for the station2 chambers.
2811 if (gAlice->GetModule("SHIL")) {
2812 SetMotherVolume(0, "YOUT1");
2813 SetMotherVolume(1, "YOUT1");
2816 SetVolume(0, "SC01", true);
2817 SetVolume(1, "SC02", true);
2820 //______________________________________________________________________________
2821 void AliMUONSt1GeometryBuilderV2::SetTransformations()
2823 /// Define the transformations for the station2 chambers.
2825 Double_t zpos1 = - AliMUONConstants::DefaultChamberZ(0);
2826 SetTranslation(0, TGeoTranslation(0., 0., zpos1));
2828 Double_t zpos2 = - AliMUONConstants::DefaultChamberZ(1);
2829 SetTranslation(1, TGeoTranslation(0., 0., zpos2));
2832 //______________________________________________________________________________
2833 void AliMUONSt1GeometryBuilderV2::SetSensitiveVolumes()
2835 /// Define the sensitive volumes for station2 chambers.
2837 GetGeometry(0)->SetSensitiveVolume("SA1G");
2838 GetGeometry(0)->SetSensitiveVolume("SB1G");
2839 GetGeometry(0)->SetSensitiveVolume("SC1G");
2840 GetGeometry(0)->SetSensitiveVolume("SD1G");
2841 GetGeometry(0)->SetSensitiveVolume("SE1G");
2842 GetGeometry(0)->SetSensitiveVolume("SF1G");
2843 GetGeometry(0)->SetSensitiveVolume("SG1G");
2844 GetGeometry(0)->SetSensitiveVolume("SH1G");
2845 GetGeometry(0)->SetSensitiveVolume("SI1G");
2846 GetGeometry(0)->SetSensitiveVolume("SJ1G");
2847 GetGeometry(0)->SetSensitiveVolume("SK1G");
2849 GetGeometry(1)->SetSensitiveVolume("SA2G");
2850 GetGeometry(1)->SetSensitiveVolume("SB2G");
2851 GetGeometry(1)->SetSensitiveVolume("SC2G");
2852 GetGeometry(1)->SetSensitiveVolume("SD2G");
2853 GetGeometry(1)->SetSensitiveVolume("SE2G");
2854 GetGeometry(1)->SetSensitiveVolume("SF2G");
2855 GetGeometry(1)->SetSensitiveVolume("SG2G");
2856 GetGeometry(1)->SetSensitiveVolume("SH2G");
2857 GetGeometry(1)->SetSensitiveVolume("SI2G");
2858 GetGeometry(1)->SetSensitiveVolume("SJ2G");
2859 GetGeometry(1)->SetSensitiveVolume("SK2G");