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
36 #include <TGeoMatrix.h>
37 #include <TClonesArray.h>
38 #include <Riostream.h>
40 #include <TVirtualMC.h>
42 #include "AliMpFiles.h"
43 #include "AliMpReader.h"
44 #include "AliMpSector.h"
46 #include "AliMpVRowSegment.h"
47 #include "AliMpMotifMap.h"
48 #include "AliMpMotifPosition.h"
50 #include "AliMUONSt1GeometryBuilderV2.h"
51 #include "AliMUONSt1SpecialMotif.h"
53 #include "AliMUONChamber.h"
54 #include "AliMUONChamberGeometry.h"
55 #include "AliMUONGeometryEnvelopeStore.h"
59 ClassImp(AliMUONSt1GeometryBuilderV2)
61 // Thickness Constants
62 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzPadPlane=0.0148/2.; //Pad plane
63 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFoam = 2.083/2.; //Foam of mechanicalplane
64 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFR4 = 0.0031/2.; //FR4 of mechanical plane
65 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzSnPb = 0.0091/2.; //Pad/Kapton connection (66 pt)
66 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzKapton = 0.0122/2.; //Kapton
67 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergPlastic = 0.3062/2.;//Berg connector
68 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergCopper = 0.1882/2.; //Berg connector
69 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzDaughter = 0.0156/2.; //Daughter board
70 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzGas = 0.2/2.; //Gas thickness
72 // Quadrant Mother volume - TUBS1 - Middle layer of model
73 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR1 = 18.3;
74 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR1 = 105.673;
75 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick1 = 6.5/2;
76 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL1 = 0.;
77 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU1 = 90.;
79 // Quadrant Mother volume - TUBS2 - near and far layers of model
80 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR2 = 20.7;
81 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR2 = 100.073;
82 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick2 = 3.0/2;
83 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL2 = 0.;
84 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU2 = 90.;
86 // Sensitive copper pads, foam layer, PCB and electronics model parameters
87 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxHole=1.5/2.;
88 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyHole=6./2.;
89 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergPlastic=0.74/2.;
90 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergPlastic=5.09/2.;
91 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergCopper=0.25/2.;
92 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergCopper=3.6/2.;
93 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxKapton=0.8/2.;
94 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyKapton=5.7/2.;
95 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxDaughter=2.3/2.;
96 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyDaughter=6.3/2.;
97 const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetX=1.46;
98 const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetY=0.71;
99 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamX=1.46;
100 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamY=0.051;
102 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaQuadLHC=2.6; // LHC Origin wrt Quadrant Origin
103 const GReal_t AliMUONSt1GeometryBuilderV2::fgkFrameOffset=5.0;
105 const char* AliMUONSt1GeometryBuilderV2::fgkHoleName="MCHL";
106 const char* AliMUONSt1GeometryBuilderV2::fgkDaughterName="MCDB";
107 const char AliMUONSt1GeometryBuilderV2::fgkFoamLayerSuffix='F'; // prefix for automatic volume naming
108 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMLayerName="SQM";
109 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantNLayerName="SQN";
110 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantFLayerName="SQF";
112 //______________________________________________________________________________
113 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon)
114 : AliMUONVGeometryBuilder("st1V2.dat",
115 &muon->Chamber(0), &muon->Chamber(1)),
118 // set path to mapping data files
119 if (! gSystem->Getenv("MINSTALL")) {
120 TString dirPath = gSystem->Getenv("ALICE_ROOT");
121 dirPath += "/MUON/mapping";
122 AliMpFiles::Instance()->SetTopPath(dirPath);
123 gSystem->Setenv("MINSTALL", dirPath.Data());
124 //cout << "AliMpFiles top path set to " << dirPath << endl;
127 // cout << gSystem->Getenv("MINSTALL") << endl;
130 //______________________________________________________________________________
131 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2()
132 : AliMUONVGeometryBuilder(),
135 // Default Constructor
139 //______________________________________________________________________________
140 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(const AliMUONSt1GeometryBuilderV2& rhs)
141 : AliMUONVGeometryBuilder(rhs)
143 // Dummy copy constructor
145 Fatal("Copy constructor",
146 "Copy constructor is not implemented.");
149 //______________________________________________________________________________
150 AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2()
156 //______________________________________________________________________________
157 AliMUONSt1GeometryBuilderV2&
158 AliMUONSt1GeometryBuilderV2::operator = (const AliMUONSt1GeometryBuilderV2& rhs)
160 // check assignement to self
161 if (this == &rhs) return *this;
164 "Assignment operator is not implemented.");
173 //______________________________________________________________________________
174 void AliMUONSt1GeometryBuilderV2::CreateHole()
176 // Create all the elements found inside a foam hole
178 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
179 Int_t idAir = idtmed[1100]; // medium 1
180 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
181 Int_t idCopper = idtmed[1121]; // medium 22 = copper
184 GReal_t posX,posY,posZ;
189 gMC->Gsvolu(fgkHoleName,"BOX",idAir,par,3);
191 par[0] = fgkHxKapton;
192 par[1] = fgkHyKapton;
194 gMC->Gsvolu("SNPB", "BOX", idCopper, par, 3);
197 posZ = -fgkHzFoam+fgkHzSnPb;
198 gMC->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
201 par[1] = fgkHyBergPlastic;
202 par[2] = fgkHzKapton;
203 gMC->Gsvolu("KAPT", "BOX", idCopper, par, 3);
207 gMC->Gspos("KAPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
210 //______________________________________________________________________________
211 void AliMUONSt1GeometryBuilderV2::CreateDaughterBoard()
213 // Create all the elements in a daughter board
215 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
216 Int_t idAir = idtmed[1100]; // medium 1
217 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
218 //Int_t idPlastic =idtmed[1116]; // medium 17 = Plastic
219 Int_t idCopper = idtmed[1121]; // medium 22 = copper
220 Int_t idPlastic =idtmed[1127]; // medium 28 = Plastic
223 GReal_t posX,posY,posZ;
225 par[0]=fgkHxDaughter;
226 par[1]=fgkHyDaughter;
227 par[2]=TotalHzDaughter();
228 gMC->Gsvolu(fgkDaughterName,"BOX",idAir,par,3);
230 par[0]=fgkHxBergPlastic;
231 par[1]=fgkHyBergPlastic;
232 par[2]=fgkHzBergPlastic;
233 gMC->Gsvolu("BRGP","BOX",idPlastic,par,3);
236 posZ = -TotalHzDaughter() + fgkHzBergPlastic;
237 gMC->Gspos("BRGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
239 par[0]=fgkHxBergCopper;
240 par[1]=fgkHyBergCopper;
241 par[2]=fgkHzBergCopper;
242 gMC->Gsvolu("BRGC","BOX",idCopper,par,3);
246 gMC->Gspos("BRGC",1,"BRGP",posX,posY,posZ,0,"ONLY");
248 par[0]=fgkHxDaughter;
249 par[1]=fgkHyDaughter;
250 par[2]=fgkHzDaughter;
251 gMC->Gsvolu("DGHT","BOX",idCopper,par,3);
254 posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter;
255 gMC->Gspos("DGHT",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
258 //______________________________________________________________________________
259 void AliMUONSt1GeometryBuilderV2::CreateInnerLayers()
261 // Create the layer of sensitive volumes with gas
262 // and the copper layer.
266 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
267 //Int_t idArCO2 = idtmed[1108]; // medium 9 (ArCO2 80%)
268 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
269 Int_t idArCO2 = idtmed[1124]; // medium 25 (ArCO2 80%)
270 Int_t idCopper = idtmed[1121]; // medium 22 = copper
274 //Make gas volume - composed of 11 trapezoids
288 gMC->Gsvolu("SA1G", "TRAP", idArCO2, par, 11);
289 gMC->Gsvolu("SA2G", "TRAP", idArCO2, par, 11);
291 par[0] = fgkHzPadPlane;
292 gMC->Gsvolu("SA1C", "TRAP", idCopper,par, 11);
306 gMC->Gsvolu("SB1G", "TRAP", idArCO2, par, 11);
307 gMC->Gsvolu("SB2G", "TRAP", idArCO2, par, 11);
309 par[0] = fgkHzPadPlane;
310 gMC->Gsvolu("SB1C", "TRAP", idCopper,par, 11);
325 gMC->Gsvolu("SC1G", "TRAP", idArCO2, par, 11);
326 gMC->Gsvolu("SC2G", "TRAP", idArCO2, par, 11);
328 par[0] = fgkHzPadPlane;
329 gMC->Gsvolu("SC1C", "TRAP", idCopper,par, 11);
343 gMC->Gsvolu("SD1G", "TRAP", idArCO2, par, 11);
344 gMC->Gsvolu("SD2G", "TRAP", idArCO2, par, 11);
346 par[0] = fgkHzPadPlane;
347 gMC->Gsvolu("SD1C", "TRAP", idCopper,par, 11);
361 gMC->Gsvolu("SE1G", "TRAP", idArCO2, par, 11);
362 gMC->Gsvolu("SE2G", "TRAP", idArCO2, par, 11);
364 par[0] = fgkHzPadPlane;
365 gMC->Gsvolu("SE1C", "TRAP", idCopper,par, 11);
379 gMC->Gsvolu("SF1G", "TRAP", idArCO2, par, 11);
380 gMC->Gsvolu("SF2G", "TRAP", idArCO2, par, 11);
382 par[0] = fgkHzPadPlane;
383 gMC->Gsvolu("SF1C", "TRAP", idCopper,par, 11);
397 gMC->Gsvolu("SG1G", "TRAP", idArCO2, par, 11);
398 gMC->Gsvolu("SG2G", "TRAP", idArCO2, par, 11);
400 par[0] = fgkHzPadPlane;
401 gMC->Gsvolu("SG1C", "TRAP", idCopper,par, 11);
415 gMC->Gsvolu("SH1G", "TRAP", idArCO2, par, 11);
416 gMC->Gsvolu("SH2G", "TRAP", idArCO2, par, 11);
418 par[0] = fgkHzPadPlane;
419 gMC->Gsvolu("SH1C", "TRAP", idCopper,par, 11);
433 gMC->Gsvolu("SI1G", "TRAP", idArCO2, par, 11);
434 gMC->Gsvolu("SI2G", "TRAP", idArCO2, par, 11);
436 par[0] = fgkHzPadPlane;
437 gMC->Gsvolu("SI1C", "TRAP", idCopper,par, 11);
451 gMC->Gsvolu("SJ1G", "TRAP", idArCO2, par, 11);
452 gMC->Gsvolu("SJ2G", "TRAP", idArCO2, par, 11);
454 par[0] = fgkHzPadPlane;
455 gMC->Gsvolu("SJ1C", "TRAP", idCopper,par, 11);
469 gMC->Gsvolu("SK1G", "TRAP", idArCO2, par, 11);
470 gMC->Gsvolu("SK2G", "TRAP", idArCO2, par, 11);
472 par[0] = fgkHzPadPlane;
473 gMC->Gsvolu("SK1C", "TRAP", idCopper,par, 11);
476 //______________________________________________________________________________
477 void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber)
479 // create the quadrant (bending and non-bending planes)
480 // for the given chamber
483 CreateFrame(chamber);
486 SpecialMap specialMap;
487 specialMap[1001] = AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.);
488 specialMap[1002] = AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36));
489 specialMap[1003] = AliMUONSt1SpecialMotif(TVector2(1.01, 0.36));
493 SpecialMap specialMap;
494 specialMap.Add(1001, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.));
495 specialMap.Add(1002, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36)));
496 specialMap.Add(1003, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36)));
499 AliMpReader reader1(kStation1, kBendingPlane);
500 AliMpSector* sector1 = reader1.BuildSector();
502 Bool_t reflectZ = true;
503 TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.);
504 PlaceSector(sector1, specialMap, where, reflectZ, chamber);
508 specialMap[4001] = AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.);
509 specialMap[4002] = AliMUONSt1SpecialMotif(TVector2(1.96, 0.17));
510 specialMap[4003] = AliMUONSt1SpecialMotif(TVector2(1.61,-1.18));
511 specialMap[4004] = AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08));
512 specialMap[4005] = AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25));
513 specialMap[4006] = AliMUONSt1SpecialMotif(TVector2(0.28, 0.21));
518 specialMap.Add(4001,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.));
519 specialMap.Add(4002,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.96, 0.17)));
520 specialMap.Add(4003,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.61,-1.18)));
521 specialMap.Add(4004,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08)));
522 specialMap.Add(4005,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25)));
523 specialMap.Add(4006,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.28, 0.21)));
526 AliMpReader reader2(kStation1, kNonBendingPlane);
527 AliMpSector* sector2 = reader2.BuildSector();
530 where = TVector3(where.X()+0.63/2.,where.Y()+0.42/2., 0.); //add a half pad shift
531 PlaceSector(sector2, specialMap, where, reflectZ, chamber);
538 //______________________________________________________________________________
539 void AliMUONSt1GeometryBuilderV2::CreateFoamBox(const char* name,const TVector2& dimensions)
541 // create all the elements in the copper plane
544 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
545 Int_t idAir = idtmed[1100]; // medium 1
546 //Int_t idFoam = idtmed[1115]; // medium 16 = Foam
547 //Int_t idFR4 = idtmed[1114]; // medium 15 = FR4
548 Int_t idFoam = idtmed[1125]; // medium 26 = Foam
549 Int_t idFR4 = idtmed[1122]; // medium 23 = FR4
553 par[0] = dimensions.X();
554 par[1] = dimensions.Y();
555 par[2] = TotalHzPlane();
556 gMC->Gsvolu(name,"BOX",idAir,par,3);
559 GReal_t posX,posY,posZ;
562 eName[3]=fgkFoamLayerSuffix;
563 par[0] = dimensions.X();
564 par[1] = dimensions.Y();
566 gMC->Gsvolu(eName,"BOX",idFoam,par,3);
569 posZ = -TotalHzPlane() + fgkHzFoam;
570 gMC->Gspos(eName,1,name,posX,posY,posZ,0,"ONLY");
572 // mechanical plane FR4 layer
574 par[0] = dimensions.X();
575 par[1] = dimensions.Y();
577 gMC->Gsvolu(eName,"BOX",idFR4,par,3);
580 posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4;
581 gMC->Gspos(eName,1,name,posX,posY,posZ,0,"ONLY");
584 //______________________________________________________________________________
585 void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(const char* name,const TVector2& dimensions,
588 // Create a segment of a plane (this includes a foam layer,
589 // holes in the foam to feed the kaptons through, kapton connectors
590 // and the mother board.)
593 CreateFoamBox(name,dimensions);
597 eName[3]=fgkFoamLayerSuffix;
599 for (Int_t holeNum=0;holeNum<nofHoles;holeNum++) {
600 GReal_t posX = ((2.*holeNum+1.)/nofHoles-1.)*dimensions.X();
604 gMC->Gspos(fgkHoleName,holeNum+1,eName,posX,posY,posZ,0,"ONLY");
608 //______________________________________________________________________________
609 void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber)
611 // Create the non-sensitive elements of the frame for the <chamber>
614 // Model and notation:
616 // The Quadrant volume name starts with SQ
617 // The volume segments are numbered 00 to XX.
623 // (SQ17-24) / | InVFrame (SQ00-01)
627 // (SQ25-39) | | InArcFrame (SQ42-45)
630 // InHFrame (SQ40-41)
633 // 06 February 2003 - Overlapping volumes resolved.
634 // One quarter chamber is comprised of three TUBS volumes: SQMx, SQNx, and SQFx,
635 // where SQMx is the Quadrant Middle layer for chamber <x> ( posZ in [-3.25,3.25]),
636 // SQNx is the Quadrant Near side layer for chamber <x> ( posZ in [-6.25,3-.25) ), and
637 // SQFx is the Quadrant Far side layer for chamber <x> ( posZ in (3.25,6.25] ).
640 const Float_t kNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin
643 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
645 Int_t idAir = idtmed[1100]; // medium 1
646 //Int_t idFrameEpoxy = idtmed[1115]; // medium 16 = Frame Epoxy ME730
647 //Int_t idInox = idtmed[1116]; // medium 17 Stainless Steel (18%Cr,9%Ni,Fe)
648 //Int_t idFR4 = idtmed[1110]; // medium 11 FR4
649 //Int_t idCopper = idtmed[1109]; // medium 10 Copper
650 //Int_t idAlu = idtmed[1103]; // medium 4 Aluminium
651 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
652 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
653 Int_t idFR4 = idtmed[1122]; // medium 23 FR4 // was 15 not 11
654 Int_t idCopper = idtmed[1121]; // medium 22 Copper
655 Int_t idAlu = idtmed[1120]; // medium 21 Aluminium
659 Int_t rot1, rot2, rot3;
662 fMUON->AliMatrix(rot1, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane
663 fMUON->AliMatrix(rot2, 90., 45., 90., 135., 0., 0.); // +45 deg in x-y plane
664 fMUON->AliMatrix(rot3, 90., 45., 90., 315.,180., 0.); // +45 deg in x-y + rotation 180° around y
666 // Translation matrices ... NOT USED
667 // fMUON->AliMatrix(trans1, 90., 0., 90., 90., 0., 0.); // X-> X; Y -> Y; Z -> Z
668 // fMUON->AliMatrix(trans2, 90., 180., 90., 90., 180., 0.); // X->-X; Y -> Y; Z ->-Z
669 // fMUON->AliMatrix(trans3, 90., 180., 90., 270., 0., 0.); // X->-X; Y ->-Y; Z -> Z
670 // fMUON->AliMatrix(trans4, 90., 0., 90., 270., 180., 0.); // X-> X; Y ->-Y; Z ->-Z
672 // ___________________Volume thicknesses________________________
674 const Float_t kHzFrameThickness = 1.59/2.; //equivalent thickness
675 const Float_t kHzOuterFrameEpoxy = 1.19/2.; //equivalent thickness
676 const Float_t kHzOuterFrameInox = 0.1/2.; //equivalent thickness
677 const Float_t kHzFoam = 2.083/2.; //evaluated elsewhere
678 // CHECK with fgkHzFoam
680 // Pertaining to the top outer area
681 const Float_t kHzTopAnodeSteel1 = 0.185/2.; //equivalent thickness
682 const Float_t kHzTopAnodeSteel2 = 0.51/2.; //equivalent thickness
683 const Float_t kHzAnodeFR4 = 0.08/2.; //equivalent thickness
684 const Float_t kHzTopEarthFaceCu = 0.364/2.; //equivalent thickness
685 const Float_t kHzTopEarthProfileCu = 1.1/2.; //equivalent thickness
686 const Float_t kHzTopPositionerSteel = 1.45/2.; //should really be 2.125/2.;
687 const Float_t kHzTopGasSupportAl = 0.85/2.; //equivalent thickness
689 // Pertaining to the vertical outer area
690 const Float_t kHzVerticalCradleAl = 0.8/2.; //equivalent thickness
691 const Float_t kHzLateralSightAl = 0.975/2.; //equivalent thickness
692 const Float_t kHzLateralPosnInoxFace = 2.125/2.;//equivalent thickness
693 const Float_t kHzLatPosInoxProfM = 6.4/2.; //equivalent thickness
694 const Float_t kHzLatPosInoxProfNF = 1.45/2.; //equivalent thickness
695 const Float_t kHzLateralPosnAl = 0.5/2.; //equivalent thickness
696 const Float_t kHzVertEarthFaceCu = 0.367/2.; //equivalent thickness
697 const Float_t kHzVertBarSteel = 0.198/2.; //equivalent thickness
698 const Float_t kHzVertEarthProfCu = 1.1/2.; //equivalent thickness
700 //_______________Parameter definitions in sequence _________
702 // InVFrame parameters
703 const Float_t kHxInVFrame = 1.85/2.;
704 const Float_t kHyInVFrame = 73.95/2.;
705 const Float_t kHzInVFrame = kHzFrameThickness;
707 //Flat 7.5mm vertical section
708 const Float_t kHxV1mm = 0.75/2.;
709 const Float_t kHyV1mm = 1.85/2.;
710 const Float_t kHzV1mm = kHzFrameThickness;
712 // OuterTopFrame Structure
715 // The frame is composed of a cuboid and two trapezoids
716 // (TopFrameAnode, TopFrameAnodeA, TopFrameAnodeB).
717 // Each shape is composed of two layers (Epoxy and Inox) and
718 // takes the frame's inner anode circuitry into account in the material budget.
721 // The overhanging anode part is composed froma cuboid and two trapezoids
722 // (TopAnode, TopAnode1, and TopAnode2). These surfaces neglect implanted
723 // resistors, but accounts for the major Cu, Pb/Sn, and FR4 material
725 // The stainless steel anode supports have been included.
727 // EARTHING (TopEarthFace, TopEarthProfile)
728 // Al GAS SUPPORT (TopGasSupport)
730 // ALIGNMENT (TopPositioner) - Alignment system, three sights per quarter
731 // chamber. This sight is forseen for the alignment of the horizontal level
732 // (parallel to the OY axis of LHC). Its position will be evaluated relative
733 // to a system of sights places on the cradles;
737 //TopFrameAnode parameters - cuboid, 2 layers
738 const Float_t kHxTFA = 34.1433/2.;
739 const Float_t kHyTFA = 7.75/2.;
740 const Float_t kHzTFAE = kHzOuterFrameEpoxy; // layer 1 thickness
741 const Float_t kHzTFAI = kHzOuterFrameInox; // layer 3 thickness
743 // TopFrameAnodeA parameters - trapezoid, 2 layers
744 const Float_t kHzFAAE = kHzOuterFrameEpoxy; // layer 1 thickness
745 const Float_t kHzFAAI = kHzOuterFrameInox; // layer 3 thickness
746 const Float_t kTetFAA = 0.;
747 const Float_t kPhiFAA = 0.;
748 const Float_t kH1FAA = 8.7/2.;
749 const Float_t kBl1FAA = 4.35/2.;
750 const Float_t kTl1FAA = 7.75/2.;
751 const Float_t kAlp1FAA = 11.06;
752 const Float_t kH2FAA = 8.7/2.;
753 const Float_t kBl2FAA = 4.35/2.;
754 const Float_t kTl2FAA = 7.75/2.;
755 const Float_t kAlp2FAA = 11.06;
757 // TopFrameAnodeB parameters - trapezoid, 2 layers
758 const Float_t kHzFABE = kHzOuterFrameEpoxy; // layer 1 thickness
759 const Float_t kHzFABI = kHzOuterFrameInox; // layer 3 thickness
760 const Float_t kTetFAB = 0.;
761 const Float_t kPhiFAB = 0.;
762 const Float_t kH1FAB = 8.70/2.;
763 const Float_t kBl1FAB = 0.;
764 const Float_t kTl1FAB = 4.35/2.;
765 const Float_t kAlp1FAB = 14.03;
766 const Float_t kH2FAB = 8.70/2.;
767 const Float_t kBl2FAB = 0.;
768 const Float_t kTl2FAB = 4.35/2.;
769 const Float_t kAlp2FAB = 14.03;
771 // TopAnode parameters - cuboid (part 1 of 3 parts)
772 const Float_t kHxTA1 = 16.2/2.;
773 const Float_t kHyTA1 = 3.5/2.;
774 const Float_t kHzTA11 = kHzTopAnodeSteel1; // layer 1
775 const Float_t kHzTA12 = kHzAnodeFR4; // layer 2
777 // TopAnode parameters - trapezoid 1 (part 2 of 3 parts)
778 const Float_t kHzTA21 = kHzTopAnodeSteel2; // layer 1
779 const Float_t kHzTA22 = kHzAnodeFR4; // layer 2
780 const Float_t kTetTA2 = 0.;
781 const Float_t kPhiTA2= 0.;
782 const Float_t kH1TA2 = 7.268/2.;
783 const Float_t kBl1TA2 = 2.03/2.;
784 const Float_t kTl1TA2 = 3.5/2.;
785 const Float_t kAlp1TA2 = 5.78;
786 const Float_t kH2TA2 = 7.268/2.;
787 const Float_t kBl2TA2 = 2.03/2.;
788 const Float_t kTl2TA2 = 3.5/2.;
789 const Float_t kAlp2TA2 = 5.78;
791 // TopAnode parameters - trapezoid 2 (part 3 of 3 parts)
792 const Float_t kHzTA3 = kHzAnodeFR4; // layer 1
793 const Float_t kTetTA3 = 0.;
794 const Float_t kPhiTA3 = 0.;
795 const Float_t kH1TA3 = 7.268/2.;
796 const Float_t kBl1TA3 = 0.;
797 const Float_t kTl1TA3 = 2.03/2.;
798 const Float_t kAlp1TA3 = 7.95;
799 const Float_t kH2TA3 = 7.268/2.;
800 const Float_t kBl2TA3 = 0.;
801 const Float_t kTl2TA3 = 2.03/2.;
802 const Float_t kAlp2TA3 = 7.95;
804 // TopEarthFace parameters - single trapezoid
805 const Float_t kHzTEF = kHzTopEarthFaceCu;
806 const Float_t kTetTEF = 0.;
807 const Float_t kPhiTEF = 0.;
808 const Float_t kH1TEF = 1.200/2.;
809 const Float_t kBl1TEF = 21.323/2.;
810 const Float_t kTl1TEF = 17.963/2.;
811 const Float_t kAlp1TEF = -54.46;
812 const Float_t kH2TEF = 1.200/2.;
813 const Float_t kBl2TEF = 21.323/2.;
814 const Float_t kTl2TEF = 17.963/2.;
815 const Float_t kAlp2TEF = -54.46;
817 // TopEarthProfile parameters - single trapezoid
818 const Float_t kHzTEP = kHzTopEarthProfileCu;
819 const Float_t kTetTEP = 0.;
820 const Float_t kPhiTEP = 0.;
821 const Float_t kH1TEP = 0.40/2.;
822 const Float_t kBl1TEP = 31.766/2.;
823 const Float_t kTl1TEP = 30.535/2.;
824 const Float_t kAlp1TEP = -56.98;
825 const Float_t kH2TEP = 0.40/2.;
826 const Float_t kBl2TEP = 31.766/2.;
827 const Float_t kTl2TEP = 30.535/2.;
828 const Float_t kAlp2TEP = -56.98;
830 // TopPositioner parameters - single Stainless Steel trapezoid
831 const Float_t kHzTP = kHzTopPositionerSteel;
832 const Float_t kTetTP = 0.;
833 const Float_t kPhiTP = 0.;
834 const Float_t kH1TP = 3.00/2.;
835 const Float_t kBl1TP = 7.023/2.;
836 const Float_t kTl1TP = 7.314/2.;
837 const Float_t kAlp1TP = 2.78;
838 const Float_t kH2TP = 3.00/2.;
839 const Float_t kBl2TP = 7.023/2.;
840 const Float_t kTl2TP = 7.314/2.;
841 const Float_t kAlp2TP = 2.78;
843 // TopGasSupport parameters - single cuboid
844 const Float_t kHxTGS = 8.50/2.;
845 const Float_t kHyTGS = 3.00/2.;
846 const Float_t kHzTGS = kHzTopGasSupportAl;
848 // OutEdgeFrame parameters - 4 trapezoidal sections, 2 layers of material
853 const Float_t kHzOETFE = kHzOuterFrameEpoxy; // layer 1
854 const Float_t kHzOETFI = kHzOuterFrameInox; // layer 3
856 const Float_t kTetOETF = 0.; // common to all 4 trapezoids
857 const Float_t kPhiOETF = 0.; // common to all 4 trapezoids
859 const Float_t kH1OETF = 7.196/2.; // common to all 4 trapezoids
860 const Float_t kH2OETF = 7.196/2.; // common to all 4 trapezoids
862 const Float_t kBl1OETF1 = 3.75/2;
863 const Float_t kTl1OETF1 = 3.996/2.;
864 const Float_t kAlp1OETF1 = 0.98;
866 const Float_t kBl2OETF1 = 3.75/2;
867 const Float_t kTl2OETF1 = 3.996/2.;
868 const Float_t kAlp2OETF1 = 0.98;
871 const Float_t kBl1OETF2 = 3.01/2.;
872 const Float_t kTl1OETF2 = 3.75/2;
873 const Float_t kAlp1OETF2 = 2.94;
875 const Float_t kBl2OETF2 = 3.01/2.;
876 const Float_t kTl2OETF2 = 3.75/2;
877 const Float_t kAlp2OETF2 = 2.94;
880 const Float_t kBl1OETF3 = 1.767/2.;
881 const Float_t kTl1OETF3 = 3.01/2.;
882 const Float_t kAlp1OETF3 = 4.94;
884 const Float_t kBl2OETF3 = 1.767/2.;
885 const Float_t kTl2OETF3 = 3.01/2.;
886 const Float_t kAlp2OETF3 = 4.94;
889 const Float_t kBl1OETF4 = 0.;
890 const Float_t kTl1OETF4 = 1.77/2.;
891 const Float_t kAlp1OETF4 = 7.01;
893 const Float_t kBl2OETF4 = 0.;
894 const Float_t kTl2OETF4 = 1.77/2.;
895 const Float_t kAlp2OETF4 = 7.01;
897 // Frame Structure (OutVFrame):
899 // OutVFrame and corner (OutVFrame cuboid, OutVFrame trapezoid)
900 // EARTHING (VertEarthFaceCu,VertEarthSteel,VertEarthProfCu),
901 // DETECTOR POSITIONNING (SuppLateralPositionner, LateralPositionner),
902 // CRADLE (VertCradle), and
903 // ALIGNMENT (LateralSightSupport, LateralSight)
907 // OutVFrame parameters - cuboid
908 const Float_t kHxOutVFrame = 1.85/2.;
909 const Float_t kHyOutVFrame = 46.23/2.;
910 const Float_t kHzOutVFrame = kHzFrameThickness;
912 // OutVFrame corner parameters - trapezoid
913 const Float_t kHzOCTF = kHzFrameThickness;
914 const Float_t kTetOCTF = 0.;
915 const Float_t kPhiOCTF = 0.;
916 const Float_t kH1OCTF = 1.85/2.;
917 const Float_t kBl1OCTF = 0.;
918 const Float_t kTl1OCTF = 3.66/2.;
919 const Float_t kAlp1OCTF = 44.67;
920 const Float_t kH2OCTF = 1.85/2.;
921 const Float_t kBl2OCTF = 0.;
922 const Float_t kTl2OCTF = 3.66/2.;
923 const Float_t kAlp2OCTF = 44.67;
925 // VertEarthFaceCu parameters - single trapezoid
926 const Float_t kHzVFC = kHzVertEarthFaceCu;
927 const Float_t kTetVFC = 0.;
928 const Float_t kPhiVFC = 0.;
929 const Float_t kH1VFC = 1.200/2.;
930 const Float_t kBl1VFC = 46.11/2.;
931 const Float_t kTl1VFC = 48.236/2.;
932 const Float_t kAlp1VFC = 41.54;
933 const Float_t kH2VFC = 1.200/2.;
934 const Float_t kBl2VFC = 46.11/2.;
935 const Float_t kTl2VFC = 48.236/2.;
936 const Float_t kAlp2VFC = 41.54;
938 // VertEarthSteel parameters - single trapezoid
939 const Float_t kHzVES = kHzVertBarSteel;
940 const Float_t kTetVES = 0.;
941 const Float_t kPhiVES = 0.;
942 const Float_t kH1VES = 1.200/2.;
943 const Float_t kBl1VES = 30.486/2.;
944 const Float_t kTl1VES = 32.777/2.;
945 const Float_t kAlp1VES = 43.67;
946 const Float_t kH2VES = 1.200/2.;
947 const Float_t kBl2VES = 30.486/2.;
948 const Float_t kTl2VES = 32.777/2.;
949 const Float_t kAlp2VES = 43.67;
951 // VertEarthProfCu parameters - single trapezoid
952 const Float_t kHzVPC = kHzVertEarthProfCu;
953 const Float_t kTetVPC = 0.;
954 const Float_t kPhiVPC = 0.;
955 const Float_t kH1VPC = 0.400/2.;
956 const Float_t kBl1VPC = 29.287/2.;
957 const Float_t kTl1VPC = 30.091/2.;
958 const Float_t kAlp1VPC = 45.14;
959 const Float_t kH2VPC = 0.400/2.;
960 const Float_t kBl2VPC = 29.287/2.;
961 const Float_t kTl2VPC = 30.091/2.;
962 const Float_t kAlp2VPC = 45.14;
964 // SuppLateralPositionner - single cuboid
965 const Float_t kHxSLP = 2.80/2.;
966 const Float_t kHySLP = 5.00/2.;
967 const Float_t kHzSLP = kHzLateralPosnAl;
969 // LateralPositionner - squared off U bend, face view
970 const Float_t kHxLPF = 5.2/2.;
971 const Float_t kHyLPF = 3.0/2.;
972 const Float_t kHzLPF = kHzLateralPosnInoxFace;
974 // LateralPositionner - squared off U bend, profile view
975 const Float_t kHxLPP = 0.425/2.;
976 const Float_t kHyLPP = 3.0/2.;
977 const Float_t kHzLPP = kHzLatPosInoxProfM; // middle layer
978 const Float_t kHzLPNF = kHzLatPosInoxProfNF; // near and far layers
980 // VertCradle, 3 layers (copies), each composed of 4 trapezoids
982 const Float_t kHzVC1 = kHzVerticalCradleAl;
983 const Float_t kTetVC1 = 0.;
984 const Float_t kPhiVC1 = 0.;
985 const Float_t kH1VC1 = 10.25/2.;
986 const Float_t kBl1VC1 = 3.70/2.;
987 const Float_t kTl1VC1 = 0.;
988 const Float_t kAlp1VC1 = -10.23;
989 const Float_t kH2VC1 = 10.25/2.;
990 const Float_t kBl2VC1 = 3.70/2.;
991 const Float_t kTl2VC1 = 0.;
992 const Float_t kAlp2VC1 = -10.23;
995 const Float_t kHzVC2 = kHzVerticalCradleAl;
996 const Float_t kTetVC2 = 0.;
997 const Float_t kPhiVC2 = 0.;
998 const Float_t kH1VC2 = 10.25/2.;
999 const Float_t kBl1VC2 = 6.266/2.;
1000 const Float_t kTl1VC2 = 3.70/2.;
1001 const Float_t kAlp1VC2 = -7.13;
1002 const Float_t kH2VC2 = 10.25/2.;
1003 const Float_t kBl2VC2 = 6.266/2.;
1004 const Float_t kTl2VC2 = 3.70/2.;
1005 const Float_t kAlp2VC2 = -7.13;
1008 const Float_t kHzVC3 = kHzVerticalCradleAl;
1009 const Float_t kTetVC3 = 0.;
1010 const Float_t kPhiVC3 = 0.;
1011 const Float_t kH1VC3 = 10.25/2.;
1012 const Float_t kBl1VC3 = 7.75/2.;
1013 const Float_t kTl1VC3 = 6.266/2.;
1014 const Float_t kAlp1VC3 = -4.14;
1015 const Float_t kH2VC3 = 10.25/2.;
1016 const Float_t kBl2VC3 = 7.75/2.;
1017 const Float_t kTl2VC3 = 6.266/2.;
1018 const Float_t kAlp2VC3 = -4.14;
1021 const Float_t kHzVC4 = kHzVerticalCradleAl;
1022 const Float_t kTetVC4 = 0.;
1023 const Float_t kPhiVC4 = 0.;
1024 const Float_t kH1VC4 = 10.27/2.;
1025 const Float_t kBl1VC4 = 8.273/2.;
1026 const Float_t kTl1VC4 = 7.75/2.;
1027 const Float_t kAlp1VC4 = -1.46;
1028 const Float_t kH2VC4 = 10.27/2.;
1029 const Float_t kBl2VC4 = 8.273/2.;
1030 const Float_t kTl2VC4 = 7.75/2.;
1031 const Float_t kAlp2VC4 = -1.46;
1033 // LateralSightSupport - single trapezoid
1034 const Float_t kHzVSS = kHzLateralSightAl;
1035 const Float_t kTetVSS = 0.;
1036 const Float_t kPhiVSS = 0.;
1037 const Float_t kH1VSS = 5.00/2.;
1038 const Float_t kBl1VSS = 7.747/2;
1039 const Float_t kTl1VSS = 7.188/2.;
1040 const Float_t kAlp1VSS = -3.20;
1041 const Float_t kH2VSS = 5.00/2.;
1042 const Float_t kBl2VSS = 7.747/2.;
1043 const Float_t kTl2VSS = 7.188/2.;
1044 const Float_t kAlp2VSS = -3.20;
1046 // LateralSight (reference point) - 3 per quadrant, only 1 programmed for now
1047 const Float_t kVSInRad = 0.6;
1048 const Float_t kVSOutRad = 1.3;
1049 const Float_t kVSLen = kHzFrameThickness;
1053 // InHFrame parameters
1054 const Float_t kHxInHFrame = 75.8/2.;
1055 const Float_t kHyInHFrame = 1.85/2.;
1056 const Float_t kHzInHFrame = kHzFrameThickness;
1058 //Flat 7.5mm horizontal section
1059 const Float_t kHxH1mm = 1.85/2.;
1060 const Float_t kHyH1mm = 0.75/2.;
1061 const Float_t kHzH1mm = kHzFrameThickness;
1065 // InArcFrame parameters
1066 const Float_t kIAF = 15.70;
1067 const Float_t kOAF = 17.55;
1068 const Float_t kHzAF = kHzFrameThickness;
1069 const Float_t kAFphi1 = 0.0;
1070 const Float_t kAFphi2 = 90.0;
1074 // ScrewsInFrame parameters HEAD
1075 const Float_t kSCRUHMI = 0.;
1076 const Float_t kSCRUHMA = 0.690/2.;
1077 const Float_t kSCRUHLE = 0.4/2.;
1078 // ScrewsInFrame parameters MIDDLE
1079 const Float_t kSCRUMMI = 0.;
1080 const Float_t kSCRUMMA = 0.39/2.;
1081 const Float_t kSCRUMLE = kHzFrameThickness;
1082 // ScrewsInFrame parameters NUT
1083 const Float_t kSCRUNMI = 0.;
1084 const Float_t kSCRUNMA = 0.78/2.;
1085 const Float_t kSCRUNLE = 0.8/2.;
1087 // ___________________Make volumes________________________
1090 Float_t posX,posY,posZ;
1092 // Quadrant volume TUBS1, positioned at the end
1093 par[0] = fgkMotherIR1;
1094 par[1] = fgkMotherOR1;
1095 par[2] = fgkMotherThick1;
1096 par[3] = fgkMotherPhiL1;
1097 par[4] = fgkMotherPhiU1;
1098 gMC->Gsvolu(QuadrantMLayerName(chamber),"TUBS",idAir,par,5);
1100 // Quadrant volume TUBS2, positioned at the end
1101 par[0] = fgkMotherIR2;
1102 par[1] = fgkMotherOR2;
1103 par[2] = fgkMotherThick2;
1104 par[3] = fgkMotherPhiL2;
1105 par[4] = fgkMotherPhiU2;
1107 gMC->Gsvolu(QuadrantNLayerName(chamber),"TUBS",idAir,par,5);
1108 gMC->Gsvolu(QuadrantFLayerName(chamber),"TUBS",idAir,par,5);
1112 par[0] = kHxInVFrame;
1113 par[1] = kHyInVFrame;
1114 par[2] = kHzInVFrame;
1115 gMC->Gsvolu("SQ00","BOX",idFrameEpoxy,par,3);
1117 //Flat 1mm vertical section
1121 gMC->Gsvolu("SQ01","BOX",idFrameEpoxy,par,3);
1125 // - 3 components (a cuboid and 2 trapezes) and 2 layers (Epoxy/Inox)
1129 // TopFrameAnode - layer 1 of 2
1133 gMC->Gsvolu("SQ02","BOX",idFrameEpoxy,par,3);
1135 // TopFrameAnode - layer 2 of 2
1137 gMC->Gsvolu("SQ03","BOX",idInox,par,3);
1139 // TopFrameAnodeA - layer 1 of 2
1151 gMC->Gsvolu("SQ04","TRAP",idFrameEpoxy,par,11);
1153 // TopFrameAnodeA - layer 2 of 2
1155 gMC->Gsvolu("SQ05","TRAP",idInox,par,11);
1157 // TopFrameAnodeB - layer 1 of 2
1169 gMC->Gsvolu("SQ06","TRAP",idFrameEpoxy,par,11);
1171 // OutTopTrapFrameB - layer 2 of 2
1173 gMC->Gsvolu("SQ07","TRAP",idInox,par,11);
1175 // TopAnode1 - layer 1 of 2
1179 gMC->Gsvolu("SQ08","BOX",idInox,par,3);
1181 // TopAnode1 - layer 2 of 2
1183 gMC->Gsvolu("SQ09","BOX",idFR4,par,11);
1185 // TopAnode2 - layer 1 of 2
1197 gMC->Gsvolu("SQ10","TRAP",idInox,par,11);
1199 // TopAnode2 - layer 2 of 2
1201 gMC->Gsvolu("SQ11","TRAP",idFR4,par,11);
1203 // TopAnode3 - layer 1 of 1
1215 gMC->Gsvolu("SQ12","TRAP",idFR4,par,11);
1229 gMC->Gsvolu("SQ13","TRAP",idCopper,par,11);
1243 gMC->Gsvolu("SQ14","TRAP",idCopper,par,11);
1249 gMC->Gsvolu("SQ15","BOX",idAlu,par,3);
1251 // TopPositioner parameters - single Stainless Steel trapezoid
1263 gMC->Gsvolu("SQ16","TRAP",idInox,par,11);
1266 // OutEdgeTrapFrame Epoxy = (4 trapezes)*2 copies*2 layers (Epoxy/Inox)
1269 // Trapezoid 1 - 2 layers
1275 par[6] = kAlp1OETF1;
1279 par[10] = kAlp2OETF1;
1282 gMC->Gsvolu("SQ17","TRAP",idFrameEpoxy,par,11);
1284 gMC->Gsvolu("SQ18","TRAP",idInox,par,11);
1286 // Trapezoid 2 - 2 layers
1289 par[6] = kAlp1OETF2;
1293 par[10] = kAlp2OETF2;
1296 gMC->Gsvolu("SQ19","TRAP",idFrameEpoxy,par,11);
1298 gMC->Gsvolu("SQ20","TRAP",idInox,par,11);
1300 // Trapezoid 3 - 2 layers
1303 par[6] = kAlp1OETF3;
1307 par[10] = kAlp2OETF3;
1310 gMC->Gsvolu("SQ21","TRAP",idFrameEpoxy,par,11);
1312 gMC->Gsvolu("SQ22","TRAP",idInox,par,11);
1314 // Trapezoid 4 - 2 layers
1318 par[6] = kAlp1OETF4;
1322 par[10] = kAlp2OETF4;
1325 gMC->Gsvolu("SQ23","TRAP",idFrameEpoxy,par,11);
1327 gMC->Gsvolu("SQ24","TRAP",idInox,par,11);
1331 par[0] = kHxOutVFrame;
1332 par[1] = kHyOutVFrame;
1333 par[2] = kHzOutVFrame;
1334 gMC->Gsvolu("SQ25","BOX",idFrameEpoxy,par,3);
1347 par[10] = kAlp2OCTF;
1348 gMC->Gsvolu("SQ26","TRAP",idFrameEpoxy,par,11);
1350 // EarthFaceCu trapezoid
1362 gMC->Gsvolu("SQ27","TRAP",idCopper,par,11);
1364 // VertEarthSteel trapezoid
1376 gMC->Gsvolu("SQ28","TRAP",idInox,par,11);
1378 // VertEarthProfCu trapezoid
1390 gMC->Gsvolu("SQ29","TRAP",idCopper,par,11);
1392 // SuppLateralPositionner cuboid
1396 gMC->Gsvolu("SQ30","BOX",idAlu,par,3);
1398 // LateralPositionerFace
1402 gMC->Gsvolu("SQ31","BOX",idInox,par,3);
1404 // LateralPositionerProfile
1408 gMC->Gsvolu("SQ32","BOX",idInox,par,3); // middle layer
1413 gMC->Gsvolu("SQ33","BOX",idInox,par,3); // near and far layers
1415 // VertCradleA - 1st trapezoid
1427 gMC->Gsvolu("SQ34","TRAP",idAlu,par,11);
1429 // VertCradleB - 2nd trapezoid
1441 gMC->Gsvolu("SQ35","TRAP",idAlu,par,11);
1443 // VertCradleC - 3rd trapezoid
1455 gMC->Gsvolu("SQ36","TRAP",idAlu,par,11);
1457 // VertCradleD - 4th trapezoid
1469 gMC->Gsvolu("SQ37","TRAP",idAlu,par,11);
1471 // LateralSightSupport trapezoid
1483 gMC->Gsvolu("SQ38","TRAP",idAlu,par,11);
1489 gMC->Gsvolu("SQ39","TUBE",idFrameEpoxy,par,3);
1493 par[0] = kHxInHFrame;
1494 par[1] = kHyInHFrame;
1495 par[2] = kHzInHFrame;
1496 gMC->Gsvolu("SQ40","BOX",idFrameEpoxy,par,3);
1498 //Flat 7.5mm horizontal section
1502 gMC->Gsvolu("SQ41","BOX",idFrameEpoxy,par,3);
1511 gMC->Gsvolu("SQ42","TUBS",idFrameEpoxy,par,5);
1514 // ScrewsInFrame - 3 sections in order to avoid overlapping volumes
1515 // Screw Head, in air
1520 gMC->Gsvolu("SQ43","TUBE",idInox,par,3);
1522 // Middle part, in the Epoxy
1526 gMC->Gsvolu("SQ44","TUBE",idInox,par,3);
1528 // Screw nut, in air
1532 gMC->Gsvolu("SQ45","TUBE",idInox,par,3);
1535 // __________________Place volumes in the quadrant ____________
1539 posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyInVFrame;
1541 gMC->Gspos("SQ00",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1543 // keep memory of the mid position. Used for placing screws
1544 const GReal_t kMidVposX = posX;
1545 const GReal_t kMidVposY = posY;
1546 const GReal_t kMidVposZ = posZ;
1548 //Flat 7.5mm vertical section
1549 posX = 2.0*kHxInVFrame+kHxV1mm;
1550 posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyV1mm;
1552 gMC->Gspos("SQ01",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
1554 // TopFrameAnode place 2 layers of TopFrameAnode cuboids
1556 posY = 2.*kHyInHFrame+2.*kHyH1mm+kIAF+2.*kHyInVFrame+kHyTFA;
1557 posZ = kHzOuterFrameInox;
1558 gMC->Gspos("SQ02",1,QuadrantMLayerName(chamber),posX, posY, posZ,0,"ONLY");
1559 posZ = posZ+kHzOuterFrameInox;
1560 gMC->Gspos("SQ03",1,QuadrantMLayerName(chamber),posX, posY, posZ,0,"ONLY");
1562 // place 2 layers of TopFrameAnodeA trapezoids
1563 posX = 35.8932+fgkDeltaQuadLHC;
1564 posY = 92.6745+fgkDeltaQuadLHC;
1565 posZ = kHzOuterFrameInox;
1566 gMC->Gspos("SQ04",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1567 posZ = posZ+kHzOuterFrameInox;
1568 gMC->Gspos("SQ05",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1570 // place 2 layers of TopFrameAnodeB trapezoids
1571 posX = 44.593+fgkDeltaQuadLHC;
1572 posY = 90.737+fgkDeltaQuadLHC;
1573 posZ = kHzOuterFrameInox;
1574 gMC->Gspos("SQ06",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1575 posZ = posZ+kHzOuterFrameInox;
1576 gMC->Gspos("SQ07",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1578 // TopAnode1 place 2 layers
1579 posX = 6.8+fgkDeltaQuadLHC;
1580 posY = 99.85+fgkDeltaQuadLHC;
1581 posZ = -1.*kHzAnodeFR4;
1582 gMC->Gspos("SQ08",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1583 posZ = posZ+kHzTopAnodeSteel1;
1584 gMC->Gspos("SQ09",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1586 // TopAnode2 place 2 layers
1587 posX = 18.534+fgkDeltaQuadLHC;
1588 posY = 99.482+fgkDeltaQuadLHC;
1589 posZ = -1.*kHzAnodeFR4;
1590 gMC->Gspos("SQ10",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1591 posZ = posZ+kHzTopAnodeSteel2;
1592 gMC->Gspos("SQ11",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1594 // TopAnode3 place 1 layer
1595 posX = 25.80+fgkDeltaQuadLHC;
1596 posY = 98.61+fgkDeltaQuadLHC;
1598 gMC->Gspos("SQ12",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1600 // TopEarthFace - 2 copies
1601 posX = 23.122+fgkDeltaQuadLHC;
1602 posY = 96.90+fgkDeltaQuadLHC;
1603 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopEarthFaceCu;
1604 gMC->Gspos("SQ13",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1606 gMC->Gspos("SQ13",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1609 posX = 14.475+fgkDeltaQuadLHC;
1610 posY = 97.900+fgkDeltaQuadLHC;
1611 posZ = kHzTopEarthProfileCu;
1612 gMC->Gspos("SQ14",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1614 gMC->Gspos("SQ14",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1616 // TopGasSupport - 2 copies
1617 posX = 4.9500+fgkDeltaQuadLHC;
1618 posY = 96.200+fgkDeltaQuadLHC;
1619 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopGasSupportAl;
1620 gMC->Gspos("SQ15",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1622 gMC->Gspos("SQ15",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1624 // TopPositioner parameters - single Stainless Steel trapezoid - 2 copies
1625 posX = 7.60+fgkDeltaQuadLHC;
1626 posY = 98.98+fgkDeltaQuadLHC;
1627 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+2.*kHzTopGasSupportAl+kHzTopPositionerSteel;
1628 gMC->Gspos("SQ16",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1630 gMC->Gspos("SQ16",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1636 xCenter[0] = 73.201 + fgkDeltaQuadLHC;
1637 xCenter[1] = 78.124 + fgkDeltaQuadLHC;
1638 xCenter[2] = 82.862 + fgkDeltaQuadLHC;
1639 xCenter[3] = 87.418 + fgkDeltaQuadLHC;
1641 yCenter[0] = 68.122 + fgkDeltaQuadLHC;
1642 yCenter[1] = 62.860 + fgkDeltaQuadLHC;
1643 yCenter[2] = 57.420 + fgkDeltaQuadLHC;
1644 yCenter[3] = 51.800 + fgkDeltaQuadLHC;
1646 xCenter[4] = 68.122 + fgkDeltaQuadLHC;
1647 xCenter[5] = 62.860 + fgkDeltaQuadLHC;
1648 xCenter[6] = 57.420 + fgkDeltaQuadLHC;
1649 xCenter[7] = 51.800 + fgkDeltaQuadLHC;
1651 yCenter[4] = 73.210 + fgkDeltaQuadLHC;
1652 yCenter[5] = 78.124 + fgkDeltaQuadLHC;
1653 yCenter[6] = 82.862 + fgkDeltaQuadLHC;
1654 yCenter[7] = 87.418 + fgkDeltaQuadLHC;
1656 posZ = -1.0*kHzOuterFrameInox;
1657 gMC->Gspos("SQ17",1,QuadrantMLayerName(chamber), xCenter[0], yCenter[0], posZ, rot2,"ONLY");
1658 gMC->Gspos("SQ17",2,QuadrantMLayerName(chamber), xCenter[4], yCenter[4], posZ, rot3,"ONLY");
1660 gMC->Gspos("SQ19",1,QuadrantMLayerName(chamber), xCenter[1], yCenter[1], posZ, rot2,"ONLY");
1661 gMC->Gspos("SQ19",2,QuadrantMLayerName(chamber), xCenter[5], yCenter[5], posZ, rot3,"ONLY");
1663 gMC->Gspos("SQ21",1,QuadrantMLayerName(chamber), xCenter[2], yCenter[2], posZ, rot2,"ONLY");
1664 gMC->Gspos("SQ21",2,QuadrantMLayerName(chamber), xCenter[6], yCenter[6], posZ, rot3,"ONLY");
1666 gMC->Gspos("SQ23",1,QuadrantMLayerName(chamber), xCenter[3], yCenter[3], posZ, rot2,"ONLY");
1667 gMC->Gspos("SQ23",2,QuadrantMLayerName(chamber), xCenter[7], yCenter[7], posZ, rot3,"ONLY");
1669 posZ = posZ+kHzOuterFrameEpoxy;
1671 gMC->Gspos("SQ18",1,QuadrantMLayerName(chamber), xCenter[0], yCenter[0], posZ, rot2,"ONLY");
1672 gMC->Gspos("SQ18",2,QuadrantMLayerName(chamber), xCenter[4], yCenter[4], posZ, rot3,"ONLY");
1674 gMC->Gspos("SQ20",1,QuadrantMLayerName(chamber), xCenter[1], yCenter[1], posZ, rot2,"ONLY");
1675 gMC->Gspos("SQ20",2,QuadrantMLayerName(chamber), xCenter[5], yCenter[5], posZ, rot3,"ONLY");
1677 gMC->Gspos("SQ22",1,QuadrantMLayerName(chamber), xCenter[2], yCenter[2], posZ, rot2,"ONLY");
1678 gMC->Gspos("SQ22",2,QuadrantMLayerName(chamber), xCenter[6], yCenter[6], posZ, rot3,"ONLY");
1680 gMC->Gspos("SQ24",1,QuadrantMLayerName(chamber), xCenter[3], yCenter[3], posZ, rot2,"ONLY");
1681 gMC->Gspos("SQ24",2,QuadrantMLayerName(chamber), xCenter[7], yCenter[7], posZ, rot3,"ONLY");
1686 posX = 2.*kHxInVFrame+kIAF+2.*kHxInHFrame-kHxOutVFrame+2.*kHxV1mm;
1687 posY = 2.*kHyInHFrame+kHyOutVFrame;
1689 gMC->Gspos("SQ25",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1691 // keep memory of the mid position. Used for placing screws
1692 const GReal_t kMidOVposX = posX;
1693 const GReal_t kMidOVposY = posY;
1694 const GReal_t kMidOVposZ = posZ;
1696 const Float_t kTOPY = posY+kHyOutVFrame;
1697 const Float_t kOUTX = posX;
1701 posY = kTOPY+((kBl1OCTF+kTl1OCTF)/2.);
1703 gMC->Gspos("SQ26",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1705 // VertEarthFaceCu - 2 copies
1706 posX = 89.4000+fgkDeltaQuadLHC;
1707 posY = 25.79+fgkDeltaQuadLHC;
1708 posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertEarthFaceCu;
1709 gMC->Gspos("SQ27",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1711 gMC->Gspos("SQ27",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1713 // VertEarthSteel - 2 copies
1714 posX = 91.00+fgkDeltaQuadLHC;
1715 posY = 30.616+fgkDeltaQuadLHC;
1716 posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertBarSteel;
1717 gMC->Gspos("SQ28",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1719 gMC->Gspos("SQ28",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1721 // VertEarthProfCu - 2 copies
1722 posX = 92.000+fgkDeltaQuadLHC;
1723 posY = 29.64+fgkDeltaQuadLHC;
1724 posZ = kHzFrameThickness;
1725 gMC->Gspos("SQ29",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1727 gMC->Gspos("SQ29",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1729 // SuppLateralPositionner - 2 copies
1730 posX = 90.2-kNearFarLHC;
1731 posY = 5.00-kNearFarLHC;
1732 posZ = kHzLateralPosnAl-fgkMotherThick2;
1733 gMC->Gspos("SQ30",1,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1735 gMC->Gspos("SQ30",2,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1737 // LateralPositionner - 2 copies - Face view
1738 posX = 92.175-kNearFarLHC-2.*kHxLPP;
1739 posY = 5.00-kNearFarLHC;
1740 posZ =2.0*kHzLateralPosnAl+kHzLateralPosnInoxFace-fgkMotherThick2;
1741 gMC->Gspos("SQ31",1,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1743 gMC->Gspos("SQ31",2,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1745 // LateralPositionner - Profile view
1746 posX = 92.175+fgkDeltaQuadLHC+kHxLPF-kHxLPP;
1747 posY = 5.00+fgkDeltaQuadLHC;
1749 gMC->Gspos("SQ32",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // middle layer
1751 posX = 92.175-kNearFarLHC+kHxLPF-kHxLPP;
1752 posY = 5.0000-kNearFarLHC;
1753 posZ = fgkMotherThick2-kHzLPNF;
1754 gMC->Gspos("SQ33",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // near layer
1756 gMC->Gspos("SQ33",2,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // far layer
1758 // VertCradleA 1st Trapezoid - 3 copies
1759 posX = 95.73+fgkDeltaQuadLHC;
1760 posY = 33.26+fgkDeltaQuadLHC;
1762 gMC->Gspos("SQ34",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1764 posX = 95.73-kNearFarLHC;
1765 posY = 33.26-kNearFarLHC;
1766 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
1767 gMC->Gspos("SQ34",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1769 gMC->Gspos("SQ34",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1771 // VertCradleB 2nd Trapezoid - 3 copies
1772 posX = 97.29+fgkDeltaQuadLHC;
1773 posY = 23.02+fgkDeltaQuadLHC;
1775 gMC->Gspos("SQ35",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1777 posX = 97.29-kNearFarLHC;
1778 posY = 23.02-kNearFarLHC;
1779 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
1780 gMC->Gspos("SQ35",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1782 gMC->Gspos("SQ35",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1784 // OutVertCradleC 3rd Trapeze - 3 copies
1785 posX = 98.31+fgkDeltaQuadLHC;
1786 posY = 12.77+fgkDeltaQuadLHC;
1788 gMC->Gspos("SQ36",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1790 posX = 98.31-kNearFarLHC;
1791 posY = 12.77-kNearFarLHC;
1793 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
1794 gMC->Gspos("SQ36",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1796 gMC->Gspos("SQ36",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1798 // OutVertCradleD 4th Trapeze - 3 copies
1799 posX = 98.81+fgkDeltaQuadLHC;
1800 posY = 2.52+fgkDeltaQuadLHC;
1802 gMC->Gspos("SQ37",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1804 posZ = fgkMotherThick1-kHzVerticalCradleAl;
1805 gMC->Gspos("SQ37",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1807 gMC->Gspos("SQ37",3,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1809 // LateralSightSupport - 2 copies
1810 posX = 98.53-kNearFarLHC;
1811 posY = 10.00-kNearFarLHC;
1812 posZ = kHzLateralSightAl-fgkMotherThick2;
1813 gMC->Gspos("SQ38",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1815 gMC->Gspos("SQ38",2,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1818 posX = 92.84+fgkDeltaQuadLHC;
1819 posY = 8.13+fgkDeltaQuadLHC;
1821 gMC->Gspos("SQ39",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1826 posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxInHFrame;
1829 gMC->Gspos("SQ40",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1831 // keep memory of the mid position. Used for placing screws
1832 const GReal_t kMidHposX = posX;
1833 const GReal_t kMidHposY = posY;
1834 const GReal_t kMidHposZ = posZ;
1836 // Flat 7.5mm horizontal section
1837 posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxH1mm;
1838 posY = 2.0*kHyInHFrame+kHyH1mm;
1840 gMC->Gspos("SQ41",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
1843 posX = 2.0*kHxInVFrame+2.*kHxV1mm;
1844 posY = 2.0*kHyInHFrame+2.*kHyH1mm;
1846 gMC->Gspos("SQ42",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
1848 // keep memory of the mid position. Used for placing screws
1849 const GReal_t kMidArcposX = posX;
1850 const GReal_t kMidArcposY = posY;
1851 const GReal_t kMidArcposZ = posZ;
1853 // ScrewsInFrame - in sensitive volume
1858 // Screws on IHEpoxyFrame
1860 const Int_t kNumberOfScrewsIH = 14; // no. of screws on the IHEpoxyFrame
1861 const Float_t kOffX = 5.; // inter-screw distance
1863 // first screw coordinates
1866 // other screw coordinates
1867 for (Int_t i = 1;i<kNumberOfScrewsIH;i++){
1868 scruX[i] = scruX[i-1]+kOffX;
1869 scruY[i] = scruY[0];
1871 // Position the volumes on the frames
1872 for (Int_t i = 0;i<kNumberOfScrewsIH;i++){
1873 posX = fgkDeltaQuadLHC + scruX[i];
1874 posY = fgkDeltaQuadLHC + scruY[i];
1876 gMC->Gspos("SQ43",i+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1878 gMC->Gspos("SQ44",i+1,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
1879 gMC->Gspos("SQ45",i+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1881 // special screw coordinates
1884 posX = fgkDeltaQuadLHC + scruX[63];
1885 posY = fgkDeltaQuadLHC + scruY[63];
1887 gMC->Gspos("SQ43",64,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1889 gMC->Gspos("SQ44",64,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
1890 gMC->Gspos("SQ45",64,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1892 // Screws on the IVEpoxyFrame
1894 const Int_t kNumberOfScrewsIV = 15; // no. of screws on the IVEpoxyFrame
1895 const Float_t kOffY = 5.; // inter-screw distance
1896 Int_t firstScrew = 58;
1897 Int_t lastScrew = 44;
1899 // first (special) screw coordinates
1900 scruX[firstScrew-1] = -2.23;
1901 scruY[firstScrew-1] = 16.3;
1902 // second (repetitive) screw coordinates
1903 scruX[firstScrew-2] = -2.23;
1904 scruY[firstScrew-2] = 21.07;
1905 // other screw coordinates
1906 for (Int_t i = firstScrew-3;i>lastScrew-2;i--){
1907 scruX[i] = scruX[firstScrew-2];
1908 scruY[i] = scruY[i+1]+kOffY;
1911 for (Int_t i = 0;i<kNumberOfScrewsIV;i++){
1912 posX = fgkDeltaQuadLHC + scruX[i+lastScrew-1];
1913 posY = fgkDeltaQuadLHC + scruY[i+lastScrew-1];
1915 gMC->Gspos("SQ43",i+lastScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1917 gMC->Gspos("SQ44",i+lastScrew,"SQ00",posX+0.1-kMidVposX, posY+0.1-kMidVposY, posZ-kMidVposZ, 0, "ONLY");
1918 gMC->Gspos("SQ45",i+lastScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1921 // Screws on the OVEpoxyFrame
1923 const Int_t kNumberOfScrewsOV = 10; // no. of screws on the OVEpoxyFrame
1928 // first (repetitive) screw coordinates
1929 // notes: 1st screw should be placed in volume 40 (InnerHorizFrame)
1930 scruX[firstScrew-1] = 90.9;
1931 scruY[firstScrew-1] = -2.23; // true value
1933 // other screw coordinates
1934 for (Int_t i = firstScrew; i<lastScrew; i++ ){
1935 scruX[i] = scruX[firstScrew-1];
1936 scruY[i] = scruY[i-1]+kOffY;
1938 for (Int_t i = 1;i<kNumberOfScrewsOV;i++){
1939 posX = fgkDeltaQuadLHC + scruX[i+firstScrew-1];
1940 posY = fgkDeltaQuadLHC + scruY[i+firstScrew-1];
1942 gMC->Gspos("SQ43",i+firstScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1945 gMC->Gspos("SQ44",i+firstScrew,"SQ25",posX+0.1-kMidOVposX, posY+0.1-kMidOVposY, posZ-kMidOVposZ, 0, "ONLY");
1946 gMC->Gspos("SQ45",i+firstScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1948 // special case for 1st screw, inside the horizontal frame (volume 40)
1949 posX = fgkDeltaQuadLHC + scruX[firstScrew-1];
1950 posY = fgkDeltaQuadLHC + scruY[firstScrew-1];
1953 gMC->Gspos("SQ44",firstScrew,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
1955 // Inner Arc of Frame, screw positions and numbers-1
1956 scruX[62] = 16.009; scruY[62] = 1.401;
1957 scruX[61] = 14.564; scruY[61] = 6.791;
1958 scruX[60] = 11.363; scruY[60] = 11.363;
1959 scruX[59] = 6.791 ; scruY[59] = 14.564;
1960 scruX[58] = 1.401 ; scruY[58] = 16.009;
1962 for (Int_t i = 0;i<5;i++){
1963 posX = fgkDeltaQuadLHC + scruX[i+58];
1964 posY = fgkDeltaQuadLHC + scruY[i+58];
1966 gMC->Gspos("SQ43",i+58+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1968 gMC->Gspos("SQ44",i+58+1,"SQ42",posX+0.1-kMidArcposX, posY+0.1-kMidArcposY, posZ-kMidArcposZ, 0, "ONLY");
1969 gMC->Gspos("SQ45",i+58+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1973 //______________________________________________________________________________
1974 void AliMUONSt1GeometryBuilderV2::PlaceInnerLayers(Int_t chamber)
1976 // Place the gas and copper layers for the specified chamber.
1979 // Rotation Matrices
1980 Int_t rot1, rot2, rot3, rot4;
1982 fMUON->AliMatrix(rot1, 90., 315., 90., 45., 0., 0.); // -45 deg
1983 fMUON->AliMatrix(rot2, 90., 90., 90., 180., 0., 0.); // 90 deg
1984 fMUON->AliMatrix(rot3, 90., 270., 90., 0., 0., 0.); // -90 deg
1985 fMUON->AliMatrix(rot4, 90., 45., 90., 135., 0., 0.); // deg
1990 GReal_t zc = fgkHzGas + fgkHzPadPlane;
1991 Int_t dpos = (chamber-1)*2;
1994 x = 14.53 + fgkDeltaQuadLHC;
1995 y = 53.34 + fgkDeltaQuadLHC;
1996 name = GasVolumeName("SAG", chamber);
1997 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
1998 gMC->Gspos("SA1C", 1+dpos, QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
1999 gMC->Gspos("SA1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2001 x = 40.67 + fgkDeltaQuadLHC;
2002 y = 40.66 + fgkDeltaQuadLHC;
2003 name = GasVolumeName("SBG", chamber);
2004 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot1,"ONLY");
2005 gMC->Gspos("SB1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot1,"ONLY");
2006 gMC->Gspos("SB1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,rot1,"ONLY");
2008 x = 53.34 + fgkDeltaQuadLHC;
2009 y = 14.52 + fgkDeltaQuadLHC;
2010 name = GasVolumeName("SCG", chamber);
2011 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot2,"ONLY");
2012 gMC->Gspos("SC1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot2,"ONLY");
2013 gMC->Gspos("SC1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot2,"ONLY");
2015 x = 5.83 + fgkDeltaQuadLHC;
2016 y = 17.29 + fgkDeltaQuadLHC;
2017 name = GasVolumeName("SDG", chamber);
2018 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot3,"ONLY");
2019 gMC->Gspos("SD1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot3,"ONLY");
2020 gMC->Gspos("SD1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot3,"ONLY");
2022 x = 9.04 + fgkDeltaQuadLHC;
2023 y = 16.91 + fgkDeltaQuadLHC;
2024 name = GasVolumeName("SEG", chamber);
2025 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2026 gMC->Gspos("SE1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2027 gMC->Gspos("SE1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2029 x = 10.12 + fgkDeltaQuadLHC;
2030 y = 14.67 + fgkDeltaQuadLHC;
2031 name = GasVolumeName("SFG", chamber);
2032 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2033 gMC->Gspos("SF1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2034 gMC->Gspos("SF1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2036 x = 8.2042 + fgkDeltaQuadLHC;
2037 y = 16.19 + fgkDeltaQuadLHC;
2038 name = GasVolumeName("SGG", chamber);
2039 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2040 gMC->Gspos("SG1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2041 gMC->Gspos("SG1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2043 x = 14.68 + fgkDeltaQuadLHC;
2044 y = 10.10 + fgkDeltaQuadLHC;
2045 name = GasVolumeName("SHG", chamber);
2046 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2047 gMC->Gspos("SH1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2048 gMC->Gspos("SH1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2050 x = 16.21 + fgkDeltaQuadLHC;
2051 y = 8.17 + fgkDeltaQuadLHC;
2052 name = GasVolumeName("SIG", chamber);
2053 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2054 gMC->Gspos("SI1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2055 gMC->Gspos("SI1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2057 x = 16.92 + fgkDeltaQuadLHC;
2058 y = 9.02 + fgkDeltaQuadLHC;
2059 name = GasVolumeName("SJG", chamber);
2060 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot3,"ONLY");
2061 gMC->Gspos("SJ1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot3,"ONLY");
2062 gMC->Gspos("SJ1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot3,"ONLY");
2064 x = 17.30 + fgkDeltaQuadLHC;
2065 y = 5.85 + fgkDeltaQuadLHC;
2066 name = GasVolumeName("SKG", chamber);
2067 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2068 gMC->Gspos("SK1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2069 gMC->Gspos("SK1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2072 //______________________________________________________________________________
2073 void AliMUONSt1GeometryBuilderV2::PlaceSector(AliMpSector* sector,SpecialMap specialMap,
2074 const TVector3& where, Bool_t reflectZ, Int_t chamber)
2076 // Place all the segments in the mother volume, at the position defined
2077 // by the sector's data.
2080 static Int_t segNum=1;
2087 reflZ=0; // no reflection along z... nothing
2088 fMUON->AliMatrix(rotMat, 90.,90.,90,180.,0.,0.); // 90° rotation around z, NO reflection along z
2091 fMUON->AliMatrix(reflZ, 90.,0.,90,90.,180.,0.); // reflection along z
2092 fMUON->AliMatrix(rotMat, 90.,90.,90,180.,180.,0.); // 90° rotation around z AND reflection along z
2095 GReal_t posX,posY,posZ;
2098 vector<Int_t> alreadyDone;
2101 #ifdef ST1_WITH_ROOT
2102 TArrayI alreadyDone(20);
2103 Int_t nofAlreadyDone = 0;
2106 for (Int_t irow=0;irow<sector->GetNofRows();irow++){ // for each row
2107 AliMpRow* row = sector->GetRow(irow);
2110 for (Int_t iseg=0;iseg<row->GetNofRowSegments();iseg++){ // for each row segment
2111 AliMpVRowSegment* seg = row->GetRowSegment(iseg);
2115 SpecialMap::iterator iter
2116 = specialMap.find(seg->GetMotifPositionId(0));
2118 if ( iter == specialMap.end()){ //if this is a normal segment (ie. not part of <specialMap>)
2121 #ifdef ST1_WITH_ROOT
2122 Long_t value = specialMap.GetValue(seg->GetMotifPositionId(0));
2124 if ( value == 0 ){ //if this is a normal segment (ie. not part of <specialMap>)
2127 // create the cathode part
2128 sprintf(segName,"%.3dM", segNum);
2129 CreatePlaneSegment(segName, seg->Dimensions()/10., seg->GetNofMotifs());
2131 posX = where.X() + seg->Position().X()/10.;
2132 posY = where.Y() + seg->Position().Y()/10.;
2133 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
2134 gMC->Gspos(segName, 1, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2136 // and place all the daughter boards of this segment
2137 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {
2138 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2139 AliMpMotifPosition* motifPos =
2140 sector->GetMotifMap()->FindMotifPosition(motifPosId);
2142 posX = where.X() + motifPos->Position().X()/10.+fgkOffsetX;
2143 posY = where.Y() + motifPos->Position().Y()/10.+fgkOffsetY;
2144 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
2145 gMC->Gspos(fgkDaughterName, motifPosId, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2151 // if this is a special segment
2152 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {// for each motif
2154 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2157 if (find(alreadyDone.begin(),alreadyDone.end(),motifPosId)
2158 != alreadyDone.end()) continue; // don't treat the same motif twice
2160 AliMUONSt1SpecialMotif spMot = specialMap[motifPosId];
2162 #ifdef ST1_WITH_ROOT
2163 Bool_t isDone = false;
2165 while (i<nofAlreadyDone && !isDone) {
2166 if (alreadyDone.At(i) == motifPosId) isDone=true;
2169 if (isDone) continue; // don't treat the same motif twice
2171 AliMUONSt1SpecialMotif spMot = *((AliMUONSt1SpecialMotif*)specialMap.GetValue(motifPosId));
2174 // cout << chamber << " processing special motif: " << motifPosId << endl;
2176 AliMpMotifPosition* motifPos = sector->GetMotifMap()->FindMotifPosition(motifPosId);
2178 // place the hole for the motif, wrt the requested rotation angle
2179 Int_t rot = ( spMot.GetRotAngle()<0.1 ) ? reflZ:rotMat;
2181 posX = where.X() + motifPos->Position().X()/10.+spMot.GetDelta().X();
2182 posY = where.Y() + motifPos->Position().Y()/10.+spMot.GetDelta().Y();
2183 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
2184 gMC->Gspos(fgkHoleName, motifPosId, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
2186 // then place the daughter board for the motif, wrt the requested rotation angle
2187 posX = posX+fgkDeltaFilleEtamX;
2188 posY = posY+fgkDeltaFilleEtamY;
2189 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
2190 gMC->Gspos(fgkDaughterName, motifPosId, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
2193 alreadyDone.push_back(motifPosId);// mark this motif as done
2195 #ifdef ST1_WITH_ROOT
2196 if (nofAlreadyDone == alreadyDone.GetSize())
2197 alreadyDone.Set(2*nofAlreadyDone);
2198 alreadyDone.AddAt(motifPosId, nofAlreadyDone++);
2201 // cout << chamber << " processed motifPosId: " << motifPosId << endl;
2203 }// end of special motif case
2208 //______________________________________________________________________________
2209 TString AliMUONSt1GeometryBuilderV2::GasVolumeName(const TString& name, Int_t chamber) const
2211 // Inserts the chamber number into the name.
2214 TString newString(name);
2219 newString.Insert(2, number);
2225 //______________________________________________________________________________
2226 Bool_t AliMUONSt1GeometryBuilderV2::IsInChamber(Int_t ich, Int_t volGid) const
2228 // True if volume <volGid> is part of the sensitive
2229 // volumes of chamber <ich>
2231 for (Int_t i = 0; i < fChamberV2[ich]->GetSize(); i++) {
2232 if (fChamberV2[ich]->At(i) == volGid) return kTRUE;
2239 // protected methods
2243 //______________________________________________________________________________
2244 Int_t AliMUONSt1GeometryBuilderV2::GetChamberId(Int_t volId) const
2246 // Check if the volume with specified volId is a sensitive volume (gas)
2247 // of some chamber and returns the chamber number;
2248 // if not sensitive volume - return 0.
2251 for (Int_t i = 1; i <=2; i++)
2252 if (IsInChamber(i-1,volId)) return i;
2254 for (Int_t i = 3; i <= AliMUONConstants::NCh(); i++)
2255 if (volId==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()) return i;
2265 //______________________________________________________________________________
2266 void AliMUONSt1GeometryBuilderV2::CreateMaterials()
2268 // Materials and medias defined in MUONv1:
2270 // AliMaterial( 9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
2271 // AliMaterial(10, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
2272 // AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
2273 // AliMixture( 19, "Bakelite$", abak, zbak, dbak, -3, wbak);
2274 // AliMixture( 20, "ArC4H10 GAS$", ag, zg, dg, 3, wg);
2275 // AliMixture( 21, "TRIG GAS$", atrig, ztrig, dtrig, -5, wtrig);
2276 // AliMixture( 22, "ArCO2 80%$", ag1, zg1, dg1, 3, wg1);
2277 // AliMixture( 23, "Ar-freon $", atr1, ztr1, dtr1, 4, wtr1);
2278 // AliMixture( 24, "ArCO2 GAS$", agas, zgas, dgas, 3, wgas);
2279 // AliMaterial(31, "COPPER$", 63.54, 29., 8.96, 1.4, 0.);
2280 // AliMixture( 32, "Vetronite$",aglass, zglass, dglass, 5, wglass);
2281 // AliMaterial(33, "Carbon$", 12.01, 6., 2.265, 18.8, 49.9);
2282 // AliMixture( 34, "Rohacell$", arohac, zrohac, drohac, -4, wrohac);
2284 // AliMedium( 1, "AIR_CH_US ", 15, 1, iSXFLD, ...
2285 // AliMedium( 4, "ALU_CH_US ", 9, 0, iSXFLD, ...
2286 // AliMedium( 5, "ALU_CH_US ", 10, 0, iSXFLD, ...
2287 // AliMedium( 6, "AR_CH_US ", 20, 1, iSXFLD, ...
2288 // AliMedium( 7, "GAS_CH_TRIGGER ", 21, 1, iSXFLD, ...
2289 // AliMedium( 8, "BAKE_CH_TRIGGER ", 19, 0, iSXFLD, ...
2290 // AliMedium( 9, "ARG_CO2 ", 22, 1, iSXFLD, ...
2291 // AliMedium(11, "PCB_COPPER ", 31, 0, iSXFLD, ...
2292 // AliMedium(12, "VETRONITE ", 32, 0, iSXFLD, ...
2293 // AliMedium(13, "CARBON ", 33, 0, iSXFLD, ...
2294 // AliMedium(14, "Rohacell ", 34, 0, iSXFLD, ...
2297 // --- Define materials for GEANT ---
2300 fMUON->AliMaterial(41, "Aluminium II$", 26.98, 13., 2.7, -8.9, 26.1);
2302 // from PDG and "The Particle Detector BriefBook", Bock and Vasilescu, P.18
2303 // ??? same but the last but one argument < 0
2305 fMUON->AliMaterial(42, "Copper$", 63.546,29.,8.96,-1.43,9.6);
2308 fMUON->AliMaterial(43, "FR4$", 17.749, 8.875, 1.7, -19.4, 999.); // from DPG
2311 fMUON->AliMaterial(44, "FrameEpoxy",12.24,6.0,1.85,-19.14,999);// use 16.75cm
2313 // Density of FrameEpoxy only from manufacturer's specifications
2314 // Frame composite epoxy , X0 in g/cm**2 (guestimation!)
2317 // --- Define mixtures for GEANT ---
2320 // Ar-CO2 gas II (80%+20%)
2321 Float_t ag1[2] = { 39.95, 44.01};
2322 Float_t zg1[2] = { 18., 22.};
2323 Float_t wg1[2] = { .8, 0.2};
2324 Float_t dg1 = .001821;
2325 fMUON->AliMixture(45, "ArCO2 II 80%$", ag1, zg1, dg1, 2, wg1);
2327 // use wg1 weighting factors (6th arg > 0)
2329 // Rohacell 51 II - imide methacrylique
2330 Float_t aRohacell51[4] = { 12.01, 1.01, 16.00, 14.01};
2331 Float_t zRohacell51[4] = { 6., 1., 8., 7.};
2332 Float_t wRohacell51[4] = { 9., 13., 2., 1.};
2333 Float_t dRohacell51 = 0.052;
2334 fMUON->AliMixture(46, "FOAM$",aRohacell51,zRohacell51,dRohacell51,-4,wRohacell51);
2336 // use relative A (molecular) values (6th arg < 0)
2338 Float_t aSnPb[2] = { 118.69, 207.19};
2339 Float_t zSnPb[2] = { 50, 82};
2340 Float_t wSnPb[2] = { 0.6, 0.4} ;
2341 Float_t dSnPb = 8.926;
2342 fMUON->AliMixture(47, "SnPb$", aSnPb,zSnPb,dSnPb,2,wSnPb);
2344 // use wSnPb weighting factors (6th arg > 0)
2346 // plastic definition from K5, Freiburg (found on web)
2347 Float_t aPlastic[2]={ 1.01, 12.01};
2348 Float_t zPlastic[2]={ 1, 6};
2349 Float_t wPlastic[2]={ 1, 1};
2350 Float_t denPlastic=1.107;
2351 fMUON->AliMixture(48, "Plastic$",aPlastic,zPlastic,denPlastic,-2,wPlastic);
2353 // use relative A (molecular) values (6th arg < 0)...no other info...
2355 // Not used, to be removed
2357 fMUON->AliMaterial(49, "Kapton$", 12.01,6,1.42,-28.6,999); // from DPG
2360 // Inox/Stainless Steel (18%Cr, 9%Ni)
2361 Float_t aInox[3] = {55.847, 51.9961, 58.6934};
2362 Float_t zInox[3] = {26., 24., 28.};
2363 Float_t wInox[3] = {0.73, 0.18, 0.09};
2364 Float_t denInox = 7.930;
2365 fMUON->AliMixture(50, "StainlessSteel$",aInox,zInox,denInox,3,wInox);
2367 // use wInox weighting factors (6th arg > 0)
2368 // from CERN note NUFACT Note023, Oct.2000
2370 // End - Not used, to be removed
2373 // --- Define the tracking medias for GEANT ---
2376 GReal_t epsil = .001; // Tracking precision,
2377 //GReal_t stemax = -1.; // Maximum displacement for multiple scat
2378 GReal_t tmaxfd = -20.; // Maximum angle due to field deflection
2379 //GReal_t deemax = -.3; // Maximum fractional energy loss, DLS
2380 GReal_t stmin = -.8;
2381 GReal_t maxStepAlu = fMUON->GetMaxStepAlu();
2382 GReal_t maxDestepAlu = fMUON->GetMaxDestepAlu();
2383 GReal_t maxStepGas = fMUON->GetMaxStepGas();
2384 Int_t iSXFLD = gAlice->Field()->Integ();
2385 Float_t sXMGMX = gAlice->Field()->Max();
2387 fMUON->AliMedium(21, "ALU_II$", 41, 0, iSXFLD, sXMGMX,
2388 tmaxfd, maxStepAlu, maxDestepAlu, epsil, stmin);
2389 // was med: 4 mat: 9
2390 fMUON->AliMedium(22, "COPPER_II$", 42, 0, iSXFLD, sXMGMX,
2391 tmaxfd, maxStepAlu, maxDestepAlu, epsil, stmin);
2392 // was med: 10 mat: 30
2393 fMUON->AliMedium(23, "FR4_CH$", 43, 0, iSXFLD, sXMGMX,
2394 10.0, 0.01, 0.1, 0.003, 0.003);
2395 // was med: 15 mat: 31
2396 fMUON->AliMedium(24, "FrameCH$", 44, 1, iSXFLD, sXMGMX,
2397 10.0, 0.001, 0.001, 0.001, 0.001);
2398 // was med: 20 mat: 36
2399 fMUON->AliMedium(25, "ARG_CO2_II", 45, 1, iSXFLD, sXMGMX,
2400 tmaxfd, maxStepGas, maxDestepAlu, epsil, stmin);
2401 // was med: 9 mat: 22
2402 fMUON->AliMedium(26, "FOAM_CH$", 46, 0, iSXFLD, sXMGMX,
2403 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ;
2404 // was med: 16 mat: 32
2405 fMUON->AliMedium(27, "SnPb$", 47, 0, iSXFLD, sXMGMX,
2406 10.0, 0.01, 1.0, 0.003, 0.003);
2407 // was med: 19 mat: 35
2408 fMUON->AliMedium(28, "Plastic$", 48, 0, iSXFLD, sXMGMX,
2409 10.0, 0.01, 1.0, 0.003, 0.003);
2410 // was med: 17 mat: 33
2412 // Not used, to be romoved
2414 fMUON->AliMedium(29, "Kapton$", 49, 0, iSXFLD, sXMGMX,
2415 10.0, 0.01, 1.0, 0.003, 0.003);
2416 // was med: 18 mat: 34
2417 fMUON->AliMedium(30, "InoxBolts$", 50, 1, iSXFLD, sXMGMX,
2418 10.0, 0.01, 1.0, 0.003, 0.003);
2419 // was med: 21 mat: 37
2421 // End - Not used, to be removed
2424 //______________________________________________________________________________
2425 void AliMUONSt1GeometryBuilderV2::CreateGeometry()
2427 // Create the detailed GEANT geometry for the dimuon arm station1
2429 cout << "AliMUONSt1GeometryBuilderV2::CreateGeometry()" << endl;
2430 cout << "_________________________________________" << endl;
2432 // Create basic volumes
2435 CreateDaughterBoard();
2436 CreateInnerLayers();
2438 // Create reflexion matrices
2441 Int_t reflXZ, reflYZ, reflXY;
2442 fMUON->AliMatrix(reflXZ, 90., 180., 90., 90., 180., 0.);
2443 fMUON->AliMatrix(reflYZ, 90., 0., 90.,-90., 180., 0.);
2444 fMUON->AliMatrix(reflXY, 90., 180., 90., 270., 0., 0.);
2446 // Define transformations for each quadrant
2455 rotm[0]=0; // quadrant I
2456 rotm[1]=reflXZ; // quadrant II
2457 rotm[2]=reflXY; // quadrant III
2458 rotm[3]=reflYZ; // quadrant IV
2460 TGeoRotation rotm[4];
2461 rotm[0] = TGeoRotation("identity");
2462 rotm[1] = TGeoRotation("reflXZ", 90., 180., 90., 90., 180., 0.);
2463 rotm[2] = TGeoRotation("reflXY", 90., 180., 90., 270., 0., 0.);
2464 rotm[3] = TGeoRotation("reflYZ", 90., 0., 90.,-90., 180., 0.);
2467 scale[0] = TVector3( 1, 1, 1); // quadrant I
2468 scale[1] = TVector3(-1, 1, -1); // quadrant II
2469 scale[2] = TVector3(-1, -1, 1); // quadrant III
2470 scale[3] = TVector3( 1, -1, -1); // quadrant IV
2473 detElemId[0] = 0; // quadrant I
2474 detElemId[1] = 51; // quadrant II
2475 detElemId[2] = 50; // quadrant III
2476 detElemId[3] = 1; // quadrant IV
2478 // Shift in Z of the middle layer
2479 Double_t deltaZ = 6.5/2.;
2481 // Position of quadrant I wrt to the chamber position
2482 TVector3 pos0(-fgkDeltaQuadLHC, -fgkDeltaQuadLHC, deltaZ);
2484 // Shift for near/far layers
2485 GReal_t shiftXY = fgkFrameOffset;
2486 GReal_t shiftZ = fgkMotherThick1+fgkMotherThick2;
2488 // Build two chambers
2490 for (Int_t ich=1; ich<3; ich++) {
2492 // Create quadrant volume
2493 CreateQuadrant(ich);
2495 // Place gas volumes
2496 PlaceInnerLayers(ich);
2498 // Place the quadrant
2499 for (Int_t i=0; i<4; i++) {
2502 GReal_t posx, posy, posz;
2503 posx = pos0.X() * scale[i].X();
2504 posy = pos0.Y() * scale[i].Y();
2505 //posz = pos0.Z() * scale[i].Z() + AliMUONConstants::DefaultChamberZ(ich-1);
2506 //gMC->Gspos(QuadrantMLayerName(ich), i+1, "ALIC", posx, posy, posz, rotm[i], "ONLY");
2507 posz = pos0.Z() * scale[i].Z();
2509 ->AddEnvelope(QuadrantMLayerName(ich), detElemId[i] + ich*100, i+1,
2510 TGeoTranslation(posx, posy, posz), rotm[i]);
2513 Real_t posx2 = posx + shiftXY * scale[i].X();
2514 Real_t posy2 = posy + shiftXY * scale[i].Y();
2515 Real_t posz2 = posz - scale[i].Z()*shiftZ;
2516 //gMC->Gspos(QuadrantNLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
2518 ->AddEnvelope(QuadrantNLayerName(ich), 0, i+1, TGeoTranslation(posx2, posy2, posz2), rotm[i]);
2520 posz2 = posz + scale[i].Z()*shiftZ;
2521 //gMC->Gspos(QuadrantFLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
2523 ->AddEnvelope(QuadrantFLayerName(ich), 0, i+1, TGeoTranslation(posx2, posy2, posz2), rotm[i]);
2528 //______________________________________________________________________________
2529 void AliMUONSt1GeometryBuilderV2::SetTransformations()
2531 // Defines the transformations for the station2 chambers.
2534 AliMUONChamber* iChamber1 = GetChamber(0);
2535 Double_t zpos1 = - iChamber1->Z();
2536 iChamber1->GetGeometry()
2537 ->SetTranslation(TGeoTranslation(0., 0., zpos1));
2539 AliMUONChamber* iChamber2 = GetChamber(1);
2540 Double_t zpos2 = - iChamber2->Z();
2541 iChamber2->GetGeometry()
2542 ->SetTranslation(TGeoTranslation(0., 0., zpos2));
2545 //______________________________________________________________________________
2546 void AliMUONSt1GeometryBuilderV2::SetSensitiveVolumes()
2548 // Defines the sensitive volumes for station2 chambers.
2551 GetChamber(0)->GetGeometry()->SetSensitiveVolume("SA1G");
2552 GetChamber(0)->GetGeometry()->SetSensitiveVolume("SB1G");
2553 GetChamber(0)->GetGeometry()->SetSensitiveVolume("SC1G");
2554 GetChamber(0)->GetGeometry()->SetSensitiveVolume("SD1G");
2555 GetChamber(0)->GetGeometry()->SetSensitiveVolume("SE1G");
2556 GetChamber(0)->GetGeometry()->SetSensitiveVolume("SF1G");
2557 GetChamber(0)->GetGeometry()->SetSensitiveVolume("SG1G");
2558 GetChamber(0)->GetGeometry()->SetSensitiveVolume("SH1G");
2559 GetChamber(0)->GetGeometry()->SetSensitiveVolume("SI1G");
2560 GetChamber(0)->GetGeometry()->SetSensitiveVolume("SJ1G");
2561 GetChamber(0)->GetGeometry()->SetSensitiveVolume("SK1G");
2563 GetChamber(1)->GetGeometry()->SetSensitiveVolume("SA2G");
2564 GetChamber(1)->GetGeometry()->SetSensitiveVolume("SB2G");
2565 GetChamber(1)->GetGeometry()->SetSensitiveVolume("SC2G");
2566 GetChamber(1)->GetGeometry()->SetSensitiveVolume("SD2G");
2567 GetChamber(1)->GetGeometry()->SetSensitiveVolume("SE2G");
2568 GetChamber(1)->GetGeometry()->SetSensitiveVolume("SF2G");
2569 GetChamber(1)->GetGeometry()->SetSensitiveVolume("SG2G");
2570 GetChamber(1)->GetGeometry()->SetSensitiveVolume("SH2G");
2571 GetChamber(1)->GetGeometry()->SetSensitiveVolume("SI2G");
2572 GetChamber(1)->GetGeometry()->SetSensitiveVolume("SJ2G");
2573 GetChamber(1)->GetGeometry()->SetSensitiveVolume("SK2G");