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 "AliMpConstants.h"
38 #include "AliMpSector.h"
40 #include "AliMpVRowSegment.h"
41 #include "AliMpMotifMap.h"
42 #include "AliMpMotifPosition.h"
43 #include "AliMpPlaneType.h"
49 #include <Riostream.h>
50 #include <TClonesArray.h>
51 #include <TGeoCompositeShape.h>
52 #include <TGeoGlobalMagField.h>
53 #include <TGeoManager.h>
54 #include <TGeoMatrix.h>
56 #include <TGeoVolume.h>
61 #include <TVirtualMC.h>
65 ClassImp(AliMUONSt1GeometryBuilderV2)
68 // Thickness Constants
69 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzPadPlane=0.0148/2.; //Pad plane
70 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFoam = 2.503/2.; //Foam of mechanicalplane
71 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFR4 = 0.062/2.; //FR4 of mechanical plane
72 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzSnPb = 0.0091/2.; //Pad/Kapton connection (66 pt)
73 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzKapton = 0.0122/2.; //Kapton
74 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergPlastic = 0.3062/2.;//Berg connector
75 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergCopper = 0.1882/2.; //Berg connector
76 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzDaughter = 0.0156/2.; //Daughter board
77 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzGas = 0.42/2.; //Gas thickness
79 // Quadrant Mother volume - TUBS1 - Middle layer of model
80 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR1 = 18.3;
81 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR1 = 105.673;
82 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick1 = 6.5/2;
83 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL1 = 0.;
84 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU1 = 90.;
86 // Quadrant Mother volume - TUBS2 - near and far layers of model
87 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR2 = 20.7;
88 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR2 = 100.073;
89 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick2 = 3.0/2;
90 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL2 = 0.;
91 const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU2 = 90.;
93 // Sensitive copper pads, foam layer, PCB and electronics model parameters
94 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxHole=1.5/2.;
95 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyHole=6./2.;
96 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergPlastic=0.74/2.;
97 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergPlastic=5.09/2.;
98 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergCopper=0.25/2.;
99 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergCopper=3.6/2.;
100 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxKapton=0.8/2.;
101 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyKapton=5.7/2.;
102 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxDaughter=2.3/2.;
103 const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyDaughter=6.3/2.;
104 const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetX=1.46;
105 const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetY=0.71;
106 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamX=1.00;
107 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamY=0.051;
109 const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaQuadLHC=2.6; // LHC Origin wrt Quadrant Origin
110 const GReal_t AliMUONSt1GeometryBuilderV2::fgkFrameOffset=5.2;
111 // Fix (1) of overlap SQN* layers with SQM* ones (was 5.0)
113 // Pad planes offsets
114 const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadXOffsetBP = 0.50 - 0.63/2; // = 0.185
115 const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadYOffsetBP = -0.31 - 0.42/2; // =-0.52
117 const char* AliMUONSt1GeometryBuilderV2::fgkHoleName="SCHL";
118 const char* AliMUONSt1GeometryBuilderV2::fgkDaughterName="SCDB";
119 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantEnvelopeName="SE";
120 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMLayerName="SQM";
121 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantNLayerName="SQN";
122 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantFLayerName="SQF";
123 const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMFLayerName="SQMF";
124 const Int_t AliMUONSt1GeometryBuilderV2::fgkFoamBoxNameOffset=200;
125 const Int_t AliMUONSt1GeometryBuilderV2::fgkFR4BoxNameOffset=400;
126 const Int_t AliMUONSt1GeometryBuilderV2::fgkDaughterCopyNoOffset=1000;
128 //______________________________________________________________________________
129 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon)
130 : AliMUONVGeometryBuilder(0, 2),
133 /// Standard constructor
136 //______________________________________________________________________________
137 AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2()
138 : AliMUONVGeometryBuilder(),
141 /// Default Constructor
144 //______________________________________________________________________________
145 AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2()
155 //______________________________________________________________________________
157 AliMUONSt1GeometryBuilderV2::QuadrantEnvelopeName(Int_t chamber, Int_t quadrant) const
159 /// Generate unique envelope name from chamber Id and quadrant number
161 return Form("%s%d", Form("%s%d",fgkQuadrantEnvelopeName,chamber), quadrant);
164 //______________________________________________________________________________
165 void AliMUONSt1GeometryBuilderV2::CreateHole()
167 /// Create all the elements found inside a foam hole
169 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
170 Int_t idAir = idtmed[1100]; // medium 1
171 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
172 Int_t idCopper = idtmed[1121]; // medium 22 = copper
175 GReal_t posX,posY,posZ;
180 gMC->Gsvolu(fgkHoleName,"BOX",idAir,par,3);
182 par[0] = fgkHxKapton;
183 par[1] = fgkHyKapton;
185 gMC->Gsvolu("SNPB", "BOX", idCopper, par, 3);
188 posZ = -fgkHzFoam+fgkHzSnPb;
189 gMC->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
192 par[1] = fgkHyBergPlastic;
193 par[2] = fgkHzKapton;
194 gMC->Gsvolu("SKPT", "BOX", idCopper, par, 3);
198 gMC->Gspos("SKPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
201 //______________________________________________________________________________
202 void AliMUONSt1GeometryBuilderV2::CreateDaughterBoard()
204 /// Create all the elements in a daughter board
206 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
207 Int_t idAir = idtmed[1100]; // medium 1
208 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
209 //Int_t idPlastic =idtmed[1116]; // medium 17 = Plastic
210 Int_t idCopper = idtmed[1121]; // medium 22 = copper
211 Int_t idPlastic =idtmed[1127]; // medium 28 = Plastic
214 GReal_t posX,posY,posZ;
216 par[0]=fgkHxDaughter;
217 par[1]=fgkHyDaughter;
218 par[2]=TotalHzDaughter();
219 gMC->Gsvolu(fgkDaughterName,"BOX",idAir,par,3);
221 par[0]=fgkHxBergPlastic;
222 par[1]=fgkHyBergPlastic;
223 par[2]=fgkHzBergPlastic;
224 gMC->Gsvolu("SBGP","BOX",idPlastic,par,3);
227 posZ = -TotalHzDaughter() + fgkHzBergPlastic;
228 gMC->Gspos("SBGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
230 par[0]=fgkHxBergCopper;
231 par[1]=fgkHyBergCopper;
232 par[2]=fgkHzBergCopper;
233 gMC->Gsvolu("SBGC","BOX",idCopper,par,3);
237 gMC->Gspos("SBGC",1,"SBGP",posX,posY,posZ,0,"ONLY");
239 par[0]=fgkHxDaughter;
240 par[1]=fgkHyDaughter;
241 par[2]=fgkHzDaughter;
242 gMC->Gsvolu("SDGH","BOX",idCopper,par,3);
245 posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter;
246 gMC->Gspos("SDGH",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
249 //______________________________________________________________________________
250 void AliMUONSt1GeometryBuilderV2::CreateInnerLayers()
252 /// Create the layer of sensitive volumes with gas
253 /// and the copper layer.
254 /// The shape of the sensitive area is defined as an extruded
255 /// solid substracted with tube (to get inner circular shape).
257 TGeoMedium* kMedArCO2 = gGeoManager->GetMedium("MUON_ARG_CO2");
258 TGeoMedium* kMedCopper = gGeoManager->GetMedium("MUON_COPPER_II");
261 Double_t rmax = fgkMotherIR1;
262 Double_t hz = fgkHzPadPlane + fgkHzGas;
263 new TGeoTube("cutTube",rmin, rmax, hz);
265 Double_t maxXY = 89.0;
266 Double_t xy1 = 77.33;
267 Double_t xy2 = 48.77;
268 Double_t dxy1 = maxXY - xy1;
272 Double_t vx[6] = { 0.0, 0.0, xy2, maxXY, maxXY, dxy1 };
273 Double_t vy[6] = { dxy1, maxXY, maxXY, xy2, 0.0, 0.0 };
275 TGeoXtru* xtruS1 = new TGeoXtru(nz);
276 xtruS1->SetName("xtruS1");
277 xtruS1->DefinePolygon(nv, vx, vy);
278 xtruS1->DefineSection(0, -fgkHzGas, 0.0, 0.0, 1.0);
279 xtruS1->DefineSection(1, fgkHzGas, 0.0, 0.0, 1.0);
280 TGeoCompositeShape* layerS1 = new TGeoCompositeShape("layerS1", "xtruS1-cutTube");
281 new TGeoVolume("SA1G", layerS1, kMedArCO2 );
283 TGeoXtru* xtruS2 = new TGeoXtru(nz);
284 xtruS2->SetName("xtruS2");
285 xtruS2->DefinePolygon(nv, vx, vy);
286 xtruS2->DefineSection(0, -fgkHzGas, 0.0, 0.0, 1.0);
287 xtruS2->DefineSection(1, fgkHzGas, 0.0, 0.0, 1.0);
288 TGeoCompositeShape* layerS2 = new TGeoCompositeShape("layerS2", "xtruS2-cutTube");
289 new TGeoVolume("SA2G", layerS2, kMedArCO2 );
291 TGeoXtru* xtruS3 = new TGeoXtru(nz);
292 xtruS3->SetName("xtruS3");
293 xtruS3->DefinePolygon(nv, vx, vy);
294 xtruS3->DefineSection(0, -fgkHzPadPlane, 0.0, 0.0, 1.0);
295 xtruS3->DefineSection(1, fgkHzPadPlane, 0.0, 0.0, 1.0);
296 TGeoCompositeShape* layerS3 = new TGeoCompositeShape("layerS3", "xtruS3-cutTube");
297 new TGeoVolume("SA1C", layerS3, kMedCopper );
301 //______________________________________________________________________________
302 void AliMUONSt1GeometryBuilderV2::CreateSpacer0()
304 /// The spacer volumes are defined according to the input prepared by Nicole Willis
305 /// without any modifications
307 /// No. Type Material Center (mm) Dimensions (mm) (half lengths)
308 /// 5 BOX EPOXY 408.2 430.4 522.41 5.75 1.5 25.5
309 /// 5P BOX EPOXY 408.2 445.4 522.41 5.75 1.5 25.5
310 /// 6 BOX EPOXY 408.2 437.9 519.76 5.75 15.0 1.0
311 /// 6P BOX EPOXY 408.2 437.9 525.06 5.75 15.0 1.0
312 /// 7 CYL INOX 408.2 437.9 522.41 r=3.0 hz=20.63
316 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
317 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
318 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
324 gMC->Gsvolu("Spacer05","BOX",idFrameEpoxy,par,3);
329 gMC->Gsvolu("Spacer06","BOX",idFrameEpoxy,par,3);
334 gMC->Gsvolu("Spacer07","TUBE",idInox,par,3);
338 //______________________________________________________________________________
339 void AliMUONSt1GeometryBuilderV2::CreateSpacer()
341 /// The spacer volumes are defined according to the input prepared by Nicole Willis
342 /// with modifications needed to fit into existing geometry.
344 /// No. Type Material Center (mm) Dimensions (mm) (half lengths)
345 /// 5 BOX EPOXY 408.2 430.4 522.41 5.75 1.5 25.5
346 /// 5P BOX EPOXY 408.2 445.4 522.41 5.75 1.5 25.5
347 /// 6 BOX EPOXY 408.2 437.9 519.76 5.75 15.0 1.0
348 /// 6P BOX EPOXY 408.2 437.9 525.06 5.75 15.0 1.0
349 /// 7 CYL INOX 408.2 437.9 522.41 r=3.0 hz=20.63
351 /// To fit in existing volumes the volumes 5 and 7 are represented by 2 volumes
352 /// with half size in z (5A, &A); the dimensions of the volume 5A were also modified
353 /// to avoid overlaps (x made smaller, y larger to abotain the identical volume)
356 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
357 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
358 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
364 //gMC->Gsvolu("Spacer5","BOX",idFrameEpoxy,par,3);
370 gMC->Gsvolu("Spacer5A","BOX",idFrameEpoxy,par,3);
375 gMC->Gsvolu("Spacer6","BOX",idFrameEpoxy,par,3);
380 //gMC->Gsvolu("Spacer7","TUBE",idInox,par,3);
385 gMC->Gsvolu("Spacer7A","TUBE",idInox,par,3);
388 //______________________________________________________________________________
389 void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber)
391 /// Create the quadrant (bending and non-bending planes)
392 /// for the given chamber
394 // CreateQuadrantLayersAsVolumes(chamber);
395 CreateQuadrantLayersAsAssemblies(chamber);
397 CreateFrame(chamber);
400 specialMap.Add(76, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.1, 0.72), 90.));
401 specialMap.Add(75, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.7, 0.36)));
402 specialMap.Add(47, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36)));
404 // Load mapping from OCDB
405 if ( ! AliMpSegmentation::Instance() ) {
406 AliFatal("Mapping has to be loaded first !");
409 const AliMpSector* kSector1
410 = AliMpSegmentation::Instance()->GetSector(100, AliMpDEManager::GetCathod(100, AliMp::kBendingPlane));
412 AliFatal("Could not access sector segmentation !");
415 //Bool_t reflectZ = true;
416 Bool_t reflectZ = false;
417 //TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.);
418 TVector3 where = TVector3(fgkDeltaQuadLHC + fgkPadXOffsetBP,
419 fgkDeltaQuadLHC + fgkPadYOffsetBP, 0.);
420 PlaceSector(kSector1, specialMap, where, reflectZ, chamber);
422 Int_t nb = AliMpConstants::ManuMask(AliMp::kNonBendingPlane);
423 TExMapIter it(&specialMap);
424 #if ROOT_VERSION_CODE >= 334081
425 //#if ROOT_VERSION_CODE >= 333824 // needed with Root v5.24.00-patches
433 while ( it.Next(key,value) == kTRUE ) {
434 delete reinterpret_cast<AliMUONSt1SpecialMotif*>(value);
437 specialMap.Add(76 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.51),90.));
438 specialMap.Add(75 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(2.20,-0.08)));
439 specialMap.Add(47 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(2.40,-1.11)));
440 specialMap.Add(20 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08)));
441 specialMap.Add(46 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.92 , 0.17)));
442 specialMap.Add(74 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.405, -0.10)));
443 // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector
444 // in the true position)
446 const AliMpSector* kSector2
447 = AliMpSegmentation::Instance()
448 ->GetSector(100, AliMpDEManager::GetCathod(100, AliMp::kNonBendingPlane));
450 AliFatal("Could not access sector !");
455 TVector2 offset = TVector2(kSector2->GetPositionX(), kSector2->GetPositionY());
456 where = TVector3(where.X()+offset.X(), where.Y()+offset.Y(), 0.);
457 // Add the half-pad shift of the non-bending plane wrt bending plane
458 // (The shift is defined in the mapping as sector offset)
459 // Fix (4) - was TVector3(where.X()+0.63/2, ... - now it is -0.63/2
460 PlaceSector(kSector2, specialMap, where, reflectZ, chamber);
463 while ( it.Next(key,value) == kTRUE ) {
464 delete reinterpret_cast<AliMUONSt1SpecialMotif*>(value);
469 //______________________________________________________________________________
470 void AliMUONSt1GeometryBuilderV2::CreateFoamBox(
472 const TVector2& dimensions)
474 /// Create all the elements in the copper plane
476 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
477 Int_t idAir = idtmed[1100]; // medium 1
478 //Int_t idFoam = idtmed[1115]; // medium 16 = Foam
479 //Int_t idFR4 = idtmed[1114]; // medium 15 = FR4
480 Int_t idFoam = idtmed[1125]; // medium 26 = Foam
481 Int_t idFR4 = idtmed[1122]; // medium 23 = FR4
485 par[0] = dimensions.X();
486 par[1] = dimensions.Y();
487 par[2] = TotalHzPlane();
488 gMC->Gsvolu(PlaneSegmentName(segNumber).Data(),"BOX",idAir,par,3);
491 par[0] = dimensions.X();
492 par[1] = dimensions.Y();
494 gMC->Gsvolu(FoamBoxName(segNumber).Data(),"BOX",idFoam,par,3);
495 GReal_t posX,posY,posZ;
498 posZ = -TotalHzPlane() + fgkHzFoam;
499 gMC->Gspos(FoamBoxName(segNumber).Data(),1,
500 PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
502 // mechanical plane FR4 layer
503 par[0] = dimensions.X();
504 par[1] = dimensions.Y();
506 gMC->Gsvolu(FR4BoxName(segNumber).Data(),"BOX",idFR4,par,3);
509 posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4;
510 gMC->Gspos(FR4BoxName(segNumber).Data(),1,
511 PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
514 //______________________________________________________________________________
515 void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(Int_t segNumber,
516 const TVector2& dimensions,
519 /// Create a segment of a plane (this includes a foam layer,
520 /// holes in the foam to feed the kaptons through, kapton connectors
521 /// and the mother board.)
523 CreateFoamBox(segNumber,dimensions);
525 // Place spacer in the concrete plane segments:
526 // S225 (in S025), S267 (in S067) in chamber1 and S309 (in S109). S351(in S151)
528 // The segments were found as those which caused overlaps when we placed
529 // the spacer in global coordinates via PlaceSpacer0
531 // <posXYZ X_Y_Z=" 12.6000; 0.75000; 0.0000"> <volume name="Spacer5A"/>
532 // <posXYZ X_Y_Z=" 12.6000; -0.75000; 0.0000"> <volume name="Spacer5A"/>
533 // <posXYZ X_Y_Z=" 12.6000; 0.0000; 1.1515"> <volume name="Spacer6"/>
534 // <posXYZ X_Y_Z=" 12.6000; 0.0000; 0.0000"> <volume name="Spacer7A"/>
536 if ( FoamBoxName(segNumber) == "S225" ||
537 FoamBoxName(segNumber) == "S267" ||
538 FoamBoxName(segNumber) == "S309" ||
539 FoamBoxName(segNumber) == "S351" )
544 if ( FoamBoxName(segNumber) == "S267" ||
545 FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP;
546 gMC->Gspos("Spacer5A", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY");
549 if ( FoamBoxName(segNumber) == "S267" ||
550 FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP;
551 gMC->Gspos("Spacer5A", 2, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY");
555 if ( FoamBoxName(segNumber) == "S267" ||
556 FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP;
557 gMC->Gspos("Spacer6", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY");
561 if ( FoamBoxName(segNumber) == "S267" ||
562 FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP;
563 gMC->Gspos("Spacer7A", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY");
566 for (Int_t holeNum=0;holeNum<nofHoles;holeNum++) {
567 GReal_t posX = ((2.*holeNum+1.)/nofHoles-1.)*dimensions.X();
571 gMC->Gspos(fgkHoleName,holeNum+1,
572 FoamBoxName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
576 //______________________________________________________________________________
577 void AliMUONSt1GeometryBuilderV2::CreateQuadrantLayersAsVolumes(Int_t chamber)
579 /// Create the three main layers as real volumes.
580 /// Not used anymore.
583 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
584 Int_t idAir = idtmed[1100]; // medium 1
587 Float_t posX,posY,posZ;
589 // Quadrant volume TUBS1, positioned at the end
590 par[0] = fgkMotherIR1;
591 par[1] = fgkMotherOR1;
592 par[2] = fgkMotherThick1;
593 par[3] = fgkMotherPhiL1;
594 par[4] = fgkMotherPhiU1;
595 gMC->Gsvolu(QuadrantMLayerName(chamber),"TUBS",idAir,par,5);
596 // gMC->Gsvolu(QuadrantMFLayerName(chamber),"TUBS",idAir,par,5);
598 // Replace the volume shape with a composite shape
599 // with substracted overlap with beam shield (YMOT)
601 if ( gMC->IsRootGeometrySupported() ) {
605 = gGeoManager->FindVolumeFast(QuadrantMLayerName(chamber));
608 << "Quadrant volume " << QuadrantMLayerName(chamber) << " not found"
612 TGeoShape* quadrant = mlayer->GetShape();
613 quadrant->SetName("quadrant");
615 // Beam shield recess
618 par[2] = fgkMotherThick1;
619 new TGeoTube("shield_tube", par[0], par[1], par[2]);
625 TGeoTranslation* displacement
626 = new TGeoTranslation("TR", posX, posY, posZ);
627 displacement->RegisterYourself();
631 = new TGeoCompositeShape("composite", "quadrant-shield_tube:TR");
633 // Reset shape to volume
634 mlayer->SetShape(composite);
638 = gGeoManager->FindVolumeFast(QuadrantMFLayerName(chamber));
641 << "Quadrant volume " << QuadrantMFLayerName(chamber) << " not found"
645 TGeoShape* quadrant = malayer->GetShape();
646 quadrant->SetName("quadrant");
648 // Beam shield recess
651 par[2] = fgkMotherThick1;
652 new TGeoTube("shield_tube", par[0], par[1], par[2]);
658 TGeoTranslation* displacement
659 = new TGeoTranslation("TR", posX, posY, posZ);
660 displacement->RegisterYourself();
664 = new TGeoCompositeShape("composite", "quadrant-shield_tube:TR");
666 // Reset shape to volume
667 malayer->SetShape(composite);
671 // Quadrant volume TUBS2, positioned at the end
672 par[0] = fgkMotherIR2;
673 par[1] = fgkMotherOR2;
674 par[2] = fgkMotherThick2;
675 par[3] = fgkMotherPhiL2;
676 par[4] = fgkMotherPhiU2;
678 gMC->Gsvolu(QuadrantNLayerName(chamber),"TUBS",idAir,par,5);
679 gMC->Gsvolu(QuadrantFLayerName(chamber),"TUBS",idAir,par,5);
682 //______________________________________________________________________________
683 void AliMUONSt1GeometryBuilderV2::CreateQuadrantLayersAsAssemblies(Int_t chamber)
685 /// Create the three main layers as assemblies
687 gGeoManager->MakeVolumeAssembly(QuadrantMLayerName(chamber).Data());
688 gGeoManager->MakeVolumeAssembly(QuadrantMFLayerName(chamber).Data());
689 gGeoManager->MakeVolumeAssembly(QuadrantNLayerName(chamber).Data());
690 gGeoManager->MakeVolumeAssembly(QuadrantFLayerName(chamber).Data());
693 //______________________________________________________________________________
694 void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber)
696 /// Create the non-sensitive elements of the frame for the \a chamber
698 /// Model and notation: \n
700 /// The Quadrant volume name starts with SQ \n
701 /// The volume segments are numbered 00 to XX \n
706 /// OutEdgeFrame / | \n
707 /// (SQ17-24) / | InVFrame (SQ00-01) \n
710 /// OutVFrame | _- - \n
711 /// (SQ25-39) | | InArcFrame (SQ42-45) \n
714 /// InHFrame (SQ40-41) \n
717 /// 06 February 2003 - Overlapping volumes resolved. \n
718 /// One quarter chamber is comprised of three TUBS volumes: SQMx, SQNx, and SQFx,
719 /// where SQMx is the Quadrant Middle layer for chamber \a chamber ( posZ in [-3.25,3.25]),
720 /// SQNx is the Quadrant Near side layer for chamber \a chamber ( posZ in [-6.25,3-.25) ), and
721 /// SQFx is the Quadrant Far side layer for chamber \a chamber ( posZ in (3.25,6.25] ).
723 // TString quadrantMLayerName = QuadrantMLayerName(chamber);
725 TString quadrantMLayerName = QuadrantMFLayerName(chamber);
726 TString quadrantNLayerName = QuadrantNLayerName(chamber);
727 TString quadrantFLayerName = QuadrantFLayerName(chamber);
729 const Float_t kNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin
732 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
734 //Int_t idAir = idtmed[1100]; // medium 1
735 //Int_t idFrameEpoxy = idtmed[1115]; // medium 16 = Frame Epoxy ME730
736 //Int_t idInox = idtmed[1116]; // medium 17 Stainless Steel (18%Cr,9%Ni,Fe)
737 //Int_t idFR4 = idtmed[1110]; // medium 11 FR4
738 //Int_t idCopper = idtmed[1109]; // medium 10 Copper
739 //Int_t idAlu = idtmed[1103]; // medium 4 Aluminium
740 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
741 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
742 Int_t idFR4 = idtmed[1122]; // medium 23 FR4 // was 15 not 11
743 Int_t idCopper = idtmed[1121]; // medium 22 Copper
744 Int_t idAlu = idtmed[1120]; // medium 21 Aluminium
747 TGeoMedium* kMedEpoxy = gGeoManager->GetMedium("MUON_FrameCH$");
748 TGeoMedium* kMedInox = gGeoManager->GetMedium("MUON_Kapton");
749 TGeoMedium* kMedAlu = gGeoManager->GetMedium("MUON_ALU_II$");
753 Int_t rot1, rot2, rot3, rot4;
756 fMUON->AliMatrix(rot1, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane
757 fMUON->AliMatrix(rot2, 90., 45., 90., 135., 0., 0.); // +45 deg in x-y plane
758 fMUON->AliMatrix(rot3, 90., 45., 90., 315.,180., 0.); // +45 deg in x-y + rotation 180° around y
759 fMUON->AliMatrix(rot4, 90., 315., 90., 45., 0., 0.); // -45 deg in x-y plane
761 // ___________________Volume thicknesses________________________
763 const Float_t kHzFrameThickness = 1.59/2.; //equivalent thickness
764 const Float_t kHzOuterFrameEpoxy = 1.19/2.; //equivalent thickness
765 const Float_t kHzOuterFrameInox = 0.1/2.; //equivalent thickness
766 const Float_t kHzFoam = 2.083/2.; //evaluated elsewhere
767 // CHECK with fgkHzFoam
769 // Pertaining to the top outer area
770 const Float_t kHzTopAnodeSteel1 = 0.185/2.; //equivalent thickness
771 const Float_t kHzTopAnodeSteel2 = 0.51/2.; //equivalent thickness
772 const Float_t kHzAnodeFR4 = 0.08/2.; //equivalent thickness
773 const Float_t kHzTopEarthFaceCu = 0.364/2.; //equivalent thickness
774 const Float_t kHzTopEarthProfileCu = 1.1/2.; //equivalent thickness
775 const Float_t kHzTopPositionerSteel = 1.45/2.; //should really be 2.125/2.;
776 const Float_t kHzTopGasSupportAl = 0.85/2.; //equivalent thickness
778 // Pertaining to the vertical outer area
779 const Float_t kHzVerticalCradleAl = 0.8/2.; //equivalent thickness
780 const Float_t kHzLateralSightAl = 0.975/2.; //equivalent thickness
781 const Float_t kHzLateralPosnInoxFace = 2.125/2.;//equivalent thickness
782 const Float_t kHzLatPosInoxProfM = 6.4/2.; //equivalent thickness
783 const Float_t kHzLatPosInoxProfNF = 1.45/2.; //equivalent thickness
784 const Float_t kHzLateralPosnAl = 0.5/2.; //equivalent thickness
785 const Float_t kHzVertEarthFaceCu = 0.367/2.; //equivalent thickness
786 const Float_t kHzVertBarSteel = 0.198/2.; //equivalent thickness
787 const Float_t kHzVertEarthProfCu = 1.1/2.; //equivalent thickness
789 //_______________Parameter definitions in sequence _________
791 // InVFrame parameters
792 const Float_t kHxInVFrame = 1.85/2.;
793 const Float_t kHyInVFrame = 73.95/2.;
794 const Float_t kHzInVFrame = kHzFrameThickness;
796 //Flat 7.5mm vertical section
797 const Float_t kHxV1mm = 0.75/2.;
798 const Float_t kHyV1mm = 1.85/2.;
799 const Float_t kHzV1mm = kHzFrameThickness;
801 // OuterTopFrame Structure
804 // The frame is composed of a cuboid and two trapezoids
805 // (TopFrameAnode, TopFrameAnodeA, TopFrameAnodeB).
806 // Each shape is composed of two layers (Epoxy and Inox) and
807 // takes the frame's inner anode circuitry into account in the material budget.
810 // The overhanging anode part is composed froma cuboid and two trapezoids
811 // (TopAnode, TopAnode1, and TopAnode2). These surfaces neglect implanted
812 // resistors, but accounts for the major Cu, Pb/Sn, and FR4 material
814 // The stainless steel anode supports have been included.
816 // EARTHING (TopEarthFace, TopEarthProfile)
817 // Al GAS SUPPORT (TopGasSupport)
819 // ALIGNMENT (TopPositioner) - Alignment system, three sights per quarter
820 // chamber. This sight is forseen for the alignment of the horizontal level
821 // (parallel to the OY axis of LHC). Its position will be evaluated relative
822 // to a system of sights places on the cradles;
826 //TopFrameAnode parameters - cuboid, 2 layers
827 const Float_t kHxTFA = 34.1433/2.;
828 const Float_t kHyTFA = 7.75/2.;
829 const Float_t kHzTFAE = kHzOuterFrameEpoxy; // layer 1 thickness
830 const Float_t kHzTFAI = kHzOuterFrameInox; // layer 3 thickness
832 // TopFrameAnode parameters - 2 trapezoids, 2 layers
833 // (redefined with TGeoXtru shape)
834 const Float_t kH1FAA = 8.7/2.;
835 const Float_t kTl1FAB = 4.35/2.;
836 const Float_t kTl1FAA = 7.75/2.;
838 // TopAnode parameters - cuboid (part 1 of 3 parts)
839 const Float_t kHxTA1 = 16.2/2.;
840 const Float_t kHyTA1 = 3.5/2.;
841 const Float_t kHzTA11 = kHzTopAnodeSteel1; // layer 1
842 const Float_t kHzTA12 = kHzAnodeFR4; // layer 2
844 // TopAnode parameters - trapezoid 1 (part 2 of 3 parts)
845 const Float_t kHzTA21 = kHzTopAnodeSteel2; // layer 1
846 const Float_t kHzTA22 = kHzAnodeFR4; // layer 2
847 const Float_t kTetTA2 = 0.;
848 const Float_t kPhiTA2= 0.;
849 const Float_t kH1TA2 = 7.268/2.;
850 const Float_t kBl1TA2 = 2.03/2.;
851 const Float_t kTl1TA2 = 3.5/2.;
852 const Float_t kAlp1TA2 = 5.78;
853 const Float_t kH2TA2 = 7.268/2.;
854 const Float_t kBl2TA2 = 2.03/2.;
855 const Float_t kTl2TA2 = 3.5/2.;
856 const Float_t kAlp2TA2 = 5.78;
858 // TopAnode parameters - trapezoid 2 (part 3 of 3 parts)
859 const Float_t kHzTA3 = kHzAnodeFR4; // layer 1
860 const Float_t kTetTA3 = 0.;
861 const Float_t kPhiTA3 = 0.;
862 const Float_t kH1TA3 = 7.268/2.;
863 const Float_t kBl1TA3 = 0.;
864 const Float_t kTl1TA3 = 2.03/2.;
865 const Float_t kAlp1TA3 = 7.95;
866 const Float_t kH2TA3 = 7.268/2.;
867 const Float_t kBl2TA3 = 0.;
868 const Float_t kTl2TA3 = 2.03/2.;
869 const Float_t kAlp2TA3 = 7.95;
871 // TopEarthFace parameters - single trapezoid
872 const Float_t kHzTEF = kHzTopEarthFaceCu;
873 const Float_t kTetTEF = 0.;
874 const Float_t kPhiTEF = 0.;
875 const Float_t kH1TEF = 1.200/2.;
876 const Float_t kBl1TEF = 21.323/2.;
877 const Float_t kTl1TEF = 17.963/2.;
878 const Float_t kAlp1TEF = -54.46;
879 const Float_t kH2TEF = 1.200/2.;
880 const Float_t kBl2TEF = 21.323/2.;
881 const Float_t kTl2TEF = 17.963/2.;
882 const Float_t kAlp2TEF = -54.46;
884 // TopEarthProfile parameters - single trapezoid
885 const Float_t kHzTEP = kHzTopEarthProfileCu;
886 const Float_t kTetTEP = 0.;
887 const Float_t kPhiTEP = 0.;
888 const Float_t kH1TEP = 0.40/2.;
889 const Float_t kBl1TEP = 31.766/2.;
890 const Float_t kTl1TEP = 30.535/2.;
891 const Float_t kAlp1TEP = -56.98;
892 const Float_t kH2TEP = 0.40/2.;
893 const Float_t kBl2TEP = 31.766/2.;
894 const Float_t kTl2TEP = 30.535/2.;
895 const Float_t kAlp2TEP = -56.98;
897 // TopPositioner parameters - single Stainless Steel trapezoid
898 const Float_t kHzTP = kHzTopPositionerSteel;
899 const Float_t kTetTP = 0.;
900 const Float_t kPhiTP = 0.;
901 const Float_t kH1TP = 3.00/2.;
902 const Float_t kBl1TP = 7.023/2.;
903 const Float_t kTl1TP = 7.314/2.;
904 const Float_t kAlp1TP = 2.78;
905 const Float_t kH2TP = 3.00/2.;
906 const Float_t kBl2TP = 7.023/2.;
907 const Float_t kTl2TP = 7.314/2.;
908 const Float_t kAlp2TP = 2.78;
910 // TopGasSupport parameters - single cuboid
911 const Float_t kHxTGS = 8.50/2.;
912 const Float_t kHyTGS = 3.00/2.;
913 const Float_t kHzTGS = kHzTopGasSupportAl;
915 // OutEdgeFrame parameters - 4 trapezoidal sections, 2 layers of material
916 // (redefined with TGeoXtru shape)
918 const Float_t kH1OETF = 7.196/2.; // common to all 4 trapezoids
919 const Float_t kTl1OETF1 = 3.996/2.; // Trapezoid 1
920 const Float_t kTl1OETF2 = 3.75/2; // Trapezoid 2
921 const Float_t kTl1OETF3 = 3.01/2.; // Trapezoid 3
922 const Float_t kTl1OETF4 = 1.77/2.; // Trapezoid 4
925 // Frame Structure (OutVFrame):
927 // OutVFrame and corner (OutVFrame cuboid, OutVFrame trapezoid)
928 // EARTHING (VertEarthFaceCu,VertEarthSteel,VertEarthProfCu),
929 // DETECTOR POSITIONNING (SuppLateralPositionner, LateralPositionner),
930 // CRADLE (VertCradle), and
931 // ALIGNMENT (LateralSightSupport, LateralSight)
935 // OutVFrame parameters - cuboid
936 const Float_t kHxOutVFrame = 1.85/2.;
937 const Float_t kHyOutVFrame = 46.23/2.;
938 const Float_t kHzOutVFrame = kHzFrameThickness;
940 // OutVFrame corner parameters - trapezoid
941 const Float_t kHzOCTF = kHzFrameThickness;
942 const Float_t kTetOCTF = 0.;
943 const Float_t kPhiOCTF = 0.;
944 const Float_t kH1OCTF = 1.85/2.;
945 const Float_t kBl1OCTF = 0.;
946 const Float_t kTl1OCTF = 3.66/2.;
947 const Float_t kAlp1OCTF = 44.67;
948 const Float_t kH2OCTF = 1.85/2.;
949 const Float_t kBl2OCTF = 0.;
950 const Float_t kTl2OCTF = 3.66/2.;
951 const Float_t kAlp2OCTF = 44.67;
953 // VertEarthFaceCu parameters - single trapezoid
954 const Float_t kHzVFC = kHzVertEarthFaceCu;
955 const Float_t kTetVFC = 0.;
956 const Float_t kPhiVFC = 0.;
957 const Float_t kH1VFC = 1.200/2.;
958 const Float_t kBl1VFC = 46.11/2.;
959 const Float_t kTl1VFC = 48.236/2.;
960 const Float_t kAlp1VFC = 41.54;
961 const Float_t kH2VFC = 1.200/2.;
962 const Float_t kBl2VFC = 46.11/2.;
963 const Float_t kTl2VFC = 48.236/2.;
964 const Float_t kAlp2VFC = 41.54;
966 // VertEarthSteel parameters - single trapezoid
967 const Float_t kHzVES = kHzVertBarSteel;
968 const Float_t kTetVES = 0.;
969 const Float_t kPhiVES = 0.;
970 const Float_t kH1VES = 1.200/2.;
971 const Float_t kBl1VES = 30.486/2.;
972 const Float_t kTl1VES = 32.777/2.;
973 const Float_t kAlp1VES = 43.67;
974 const Float_t kH2VES = 1.200/2.;
975 const Float_t kBl2VES = 30.486/2.;
976 const Float_t kTl2VES = 32.777/2.;
977 const Float_t kAlp2VES = 43.67;
979 // VertEarthProfCu parameters - single trapezoid
980 const Float_t kHzVPC = kHzVertEarthProfCu;
981 const Float_t kTetVPC = 0.;
982 const Float_t kPhiVPC = 0.;
983 const Float_t kH1VPC = 0.400/2.;
984 const Float_t kBl1VPC = 29.287/2.;
985 const Float_t kTl1VPC = 30.091/2.;
986 const Float_t kAlp1VPC = 45.14;
987 const Float_t kH2VPC = 0.400/2.;
988 const Float_t kBl2VPC = 29.287/2.;
989 const Float_t kTl2VPC = 30.091/2.;
990 const Float_t kAlp2VPC = 45.14;
992 // SuppLateralPositionner - single cuboid
993 const Float_t kHxSLP = 2.80/2.;
994 const Float_t kHySLP = 5.00/2.;
995 const Float_t kHzSLP = kHzLateralPosnAl;
997 // LateralPositionner - squared off U bend, face view
998 const Float_t kHxLPF = 5.2/2.;
999 const Float_t kHyLPF = 3.0/2.;
1000 const Float_t kHzLPF = kHzLateralPosnInoxFace;
1002 // LateralPositionner - squared off U bend, profile view
1003 const Float_t kHxLPP = 0.425/2.;
1004 const Float_t kHyLPP = 3.0/2.;
1005 const Float_t kHzLPP = kHzLatPosInoxProfM; // middle layer
1006 const Float_t kHzLPNF = kHzLatPosInoxProfNF; // near and far layers
1008 // VertCradle, 3 layers (copies), each composed of 4 trapezoids
1009 // (redefined with TGeoXtru shape)
1011 const Float_t kH1VC1 = 10.25/2.; // all cradles
1012 const Float_t kBl1VC1 = 3.70/2.; // VertCradleA
1013 const Float_t kBl1VC2 = 6.266/2.; // VertCradleB
1014 const Float_t kBl1VC3 = 7.75/2.; // VertCradleC
1017 const Float_t kHzVC4 = kHzVerticalCradleAl;
1018 const Float_t kTetVC4 = 0.;
1019 const Float_t kPhiVC4 = 0.;
1020 const Float_t kH1VC4 = 10.27/2.;
1021 const Float_t kBl1VC4 = 8.273/2.;
1022 const Float_t kTl1VC4 = 7.75/2.;
1023 const Float_t kAlp1VC4 = -1.46;
1024 const Float_t kH2VC4 = 10.27/2.;
1025 const Float_t kBl2VC4 = 8.273/2.;
1026 const Float_t kTl2VC4 = 7.75/2.;
1027 const Float_t kAlp2VC4 = -1.46;
1029 // LateralSightSupport - single trapezoid
1030 const Float_t kHzVSS = kHzLateralSightAl;
1031 const Float_t kTetVSS = 0.;
1032 const Float_t kPhiVSS = 0.;
1033 const Float_t kH1VSS = 5.00/2.;
1034 const Float_t kBl1VSS = 7.747/2;
1035 const Float_t kTl1VSS = 7.188/2.;
1036 const Float_t kAlp1VSS = -3.20;
1037 const Float_t kH2VSS = 5.00/2.;
1038 const Float_t kBl2VSS = 7.747/2.;
1039 const Float_t kTl2VSS = 7.188/2.;
1040 const Float_t kAlp2VSS = -3.20;
1042 // LateralSight (reference point) - 3 per quadrant, only 1 programmed for now
1043 const Float_t kVSInRad = 0.6;
1044 const Float_t kVSOutRad = 1.3;
1045 const Float_t kVSLen = kHzFrameThickness;
1049 // InHFrame parameters
1050 const Float_t kHxInHFrame = 75.8/2.;
1051 const Float_t kHyInHFrame = 1.85/2.;
1052 const Float_t kHzInHFrame = kHzFrameThickness;
1054 //Flat 7.5mm horizontal section
1055 const Float_t kHxH1mm = 1.85/2.;
1056 const Float_t kHyH1mm = 0.75/2.;
1057 const Float_t kHzH1mm = kHzFrameThickness;
1061 // InArcFrame parameters
1062 const Float_t kIAF = 15.70;
1063 const Float_t kOAF = 17.55;
1064 const Float_t kHzAF = kHzFrameThickness;
1065 const Float_t kAFphi1 = 0.0;
1066 const Float_t kAFphi2 = 90.0;
1070 // ScrewsInFrame parameters HEAD
1071 const Float_t kSCRUHMI = 0.;
1072 const Float_t kSCRUHMA = 0.690/2.;
1073 const Float_t kSCRUHLE = 0.4/2.;
1074 // ScrewsInFrame parameters MIDDLE
1075 const Float_t kSCRUMMI = 0.;
1076 const Float_t kSCRUMMA = 0.39/2.;
1077 const Float_t kSCRUMLE = kHzFrameThickness;
1078 // ScrewsInFrame parameters NUT
1079 const Float_t kSCRUNMI = 0.;
1080 const Float_t kSCRUNMA = 0.78/2.;
1081 const Float_t kSCRUNLE = 0.8/2.;
1083 // ___________________Make volumes________________________
1086 Float_t posX,posY,posZ;
1090 par[0] = kHxInVFrame;
1091 par[1] = kHyInVFrame;
1092 par[2] = kHzInVFrame;
1093 gMC->Gsvolu("SQ00","BOX",idFrameEpoxy,par,3);
1095 //Flat 1mm vertical section
1099 gMC->Gsvolu("SQ01","BOX",idFrameEpoxy,par,3);
1103 // - 3 components (a cuboid and 2 trapezes) and 2 layers (Epoxy/Inox)
1107 // TopFrameAnode - layer 1 of 2
1111 gMC->Gsvolu("SQ02","BOX",idFrameEpoxy,par,3);
1113 // TopFrameAnode - layer 2 of 2
1115 gMC->Gsvolu("SQ03","BOX",idInox,par,3);
1118 // Common declarations for TGeoXtru parameters
1119 Double_t dx, dx0, dx1, dx2, dx3;
1120 Double_t dy, dy1, dy2, dy3, dy4;
1126 // SQ04to06 and SQ05to07
1134 vx[0] = 0.0; vy[0] = 0.0;
1135 vx[1] = 0.0; vy[1] = dy1;
1136 vx[2] = dx; vy[2] = dy2;
1137 vx[3] = 2*dx; vy[3] = 0.0;
1138 vx[4] = dx; vy[4] = 0.0;
1140 // Shift center in the middle
1141 for ( Int_t i=0; i<nv; i++ ) {
1146 TGeoXtru* xtruS5 = new TGeoXtru(nz);
1147 xtruS5->DefinePolygon(nv, vx, vy);
1148 xtruS5->DefineSection(0, -kHzOuterFrameEpoxy, 0.0, 0.0, 1.0);
1149 xtruS5->DefineSection(1, kHzOuterFrameEpoxy, 0.0, 0.0, 1.0);
1150 new TGeoVolume("SQ04toSQ06", xtruS5, kMedEpoxy);
1152 TGeoXtru* xtruS6 = new TGeoXtru(nz);
1153 xtruS6->DefinePolygon(nv, vx, vy);
1154 xtruS6->DefineSection(0, -kHzOuterFrameInox, 0.0, 0.0, 1.0);
1155 xtruS6->DefineSection(1, kHzOuterFrameInox, 0.0, 0.0, 1.0);
1156 new TGeoVolume("SQ05toSQ07", xtruS6, kMedInox);
1159 // TopAnode1 - layer 1 of 2
1163 gMC->Gsvolu("SQ08","BOX",idInox,par,3);
1165 // TopAnode1 - layer 2 of 2
1167 gMC->Gsvolu("SQ09","BOX",idFR4,par,3);
1169 // TopAnode2 - layer 1 of 2
1181 gMC->Gsvolu("SQ10","TRAP",idInox,par,11);
1183 // TopAnode2 - layer 2 of 2
1185 gMC->Gsvolu("SQ11","TRAP",idFR4,par,11);
1187 // TopAnode3 - layer 1 of 1
1199 gMC->Gsvolu("SQ12","TRAP",idFR4,par,11);
1213 gMC->Gsvolu("SQ13","TRAP",idCopper,par,11);
1227 gMC->Gsvolu("SQ14","TRAP",idCopper,par,11);
1233 gMC->Gsvolu("SQ15","BOX",idAlu,par,3);
1235 // TopPositioner parameters - single Stainless Steel trapezoid
1247 gMC->Gsvolu("SQ16","TRAP",idInox,par,11);
1250 // OutEdgeTrapFrame Epoxy = (4 trapezes)*2 copies*2 layers (Epoxy/Inox)
1251 // (redefined with TGeoXtru shape )
1262 vx[0] = -4*dx; vy[0] = 0.0;
1263 vx[1] = -3*dx; vy[1] = dy1;
1264 vx[2] = -2*dx; vy[2] = dy2;
1265 vx[3] = -1*dx; vy[3] = dy3;
1266 vx[4] = 0.0; vy[4] = dy4;
1267 vx[5] = dx; vy[5] = dy3;
1268 vx[6] = 2*dx; vy[6] = dy2;
1269 vx[7] = 3*dx; vy[7] = dy1;
1270 vx[8] = 4*dx; vy[8] = 0.0;
1271 vx[9] = 3*dx; vy[9] = 0.0;
1272 vx[10] = 2*dx; vy[10] = 0.0;
1273 vx[11] = dx; vy[11] = 0.0;
1274 vx[12] = 0.0; vy[12] = 0.0;
1275 vx[13] = -1*dx; vy[13] = 0.0;
1276 vx[14] = -2*dx; vy[14] = 0.0;
1277 vx[15] = -3*dx; vy[15] = 0.0;
1279 // Shift center in the middle
1280 for ( Int_t i=0; i<nv; i++ ) vy[i] += dy4/2.0;
1282 TGeoXtru* xtruS1 = new TGeoXtru(nz);
1283 xtruS1->DefinePolygon(nv, vx, vy);
1284 xtruS1->DefineSection(0, -kHzOuterFrameEpoxy, 0.0, 0.0, 1.0);
1285 xtruS1->DefineSection(1, kHzOuterFrameEpoxy, 0.0, 0.0, 1.0);
1286 new TGeoVolume("SQ17to23", xtruS1, kMedEpoxy );
1288 TGeoXtru* xtruS2 = new TGeoXtru(nz);
1289 xtruS2->DefinePolygon(nv, vx, vy);
1290 xtruS2->DefineSection(0, -kHzOuterFrameInox, 0.0, 0.0, 1.0);
1291 xtruS2->DefineSection(1, kHzOuterFrameInox, 0.0, 0.0, 1.0);
1292 new TGeoVolume("SQ18to24", xtruS2, kMedInox );
1295 // OutEdgeTrapFrame Epoxy = (4 trapezes)*2 copies*2 layers (Epoxy/Inox)
1298 par[0] = kHxOutVFrame;
1299 par[1] = kHyOutVFrame;
1300 par[2] = kHzOutVFrame;
1301 gMC->Gsvolu("SQ25","BOX",idFrameEpoxy,par,3);
1314 par[10] = kAlp2OCTF;
1315 gMC->Gsvolu("SQ26","TRAP",idFrameEpoxy,par,11);
1317 // EarthFaceCu trapezoid
1329 gMC->Gsvolu("SQ27","TRAP",idCopper,par,11);
1331 // VertEarthSteel trapezoid
1343 gMC->Gsvolu("SQ28","TRAP",idInox,par,11);
1345 // VertEarthProfCu trapezoid
1357 gMC->Gsvolu("SQ29","TRAP",idCopper,par,11);
1359 // SuppLateralPositionner cuboid
1363 gMC->Gsvolu("SQ30","BOX",idAlu,par,3);
1365 // LateralPositionerFace
1369 gMC->Gsvolu("SQ31","BOX",idInox,par,3);
1371 // LateralPositionerProfile
1375 gMC->Gsvolu("SQ32","BOX",idInox,par,3); // middle layer
1380 gMC->Gsvolu("SQ33","BOX",idInox,par,3); // near and far layers
1389 // (Trapezoids SQ34 to SQ36 or SQ37 redefined with TGeoXtru shape)
1393 vx[0] = 0.0; vy[0] = 0.0;
1394 vx[1] = 0.0; vy[1] = dy;
1395 vx[2] = 0.0; vy[2] = 2*dy;
1396 vx[3] = 0.0; vy[3] = 3*dy;
1397 vx[4] = dx3; vy[4] = 2*dy;
1398 vx[5] = dx2; vy[5] = dy;
1399 vx[6] = dx1; vy[6] = 0.0;
1401 // Shift center in the middle
1402 for ( Int_t i=0; i<nv; i++ ) {
1407 TGeoXtru* xtruS3 = new TGeoXtru(nz);
1408 xtruS3->DefinePolygon(nv, vx, vy);
1409 xtruS3->DefineSection(0, -kHzVerticalCradleAl, 0.0, 0.0, 1.0);
1410 xtruS3->DefineSection(1, kHzVerticalCradleAl, 0.0, 0.0, 1.0);
1411 new TGeoVolume("SQ34to36", xtruS3, kMedAlu);
1413 // Trapezoids SQ34 to SQ37;
1414 // (keeping the same coordinate system as for SQ34to36)
1418 vx[0] = 0.0; vy[0] =-1.0*dy;
1419 vx[1] = 0.0; vy[1] = 0.0;
1420 vx[2] = 0.0; vy[2] = dy;
1421 vx[3] = 0.0; vy[3] = 2*dy;
1422 vx[4] = 0.0; vy[4] = 3*dy;
1423 vx[5] = dx3; vy[5] = 2*dy;
1424 vx[6] = dx2; vy[6] = dy;
1425 vx[7] = dx1; vy[7] = 0.0;
1426 vx[8] = dx0; vy[8] =-1.0*dy;
1428 // Shift center in the middle (of SQ34to36!!)
1429 for ( Int_t i=0; i<nv; i++ ) {
1434 TGeoXtru* xtruS4 = new TGeoXtru(nz);
1435 xtruS4->DefinePolygon(nv, vx, vy);
1436 xtruS4->DefineSection(0, -kHzVerticalCradleAl, 0.0, 0.0, 1.0);
1437 xtruS4->DefineSection(1, kHzVerticalCradleAl, 0.0, 0.0, 1.0);
1438 new TGeoVolume("SQ34to37", xtruS4, kMedAlu);
1440 // VertCradleD - 4th trapezoid
1452 gMC->Gsvolu("SQ37","TRAP",idAlu,par,11);
1454 // LateralSightSupport trapezoid
1466 gMC->Gsvolu("SQ38","TRAP",idAlu,par,11);
1472 gMC->Gsvolu("SQ39","TUBE",idFrameEpoxy,par,3);
1476 par[0] = kHxInHFrame;
1477 par[1] = kHyInHFrame;
1478 par[2] = kHzInHFrame;
1479 gMC->Gsvolu("SQ40","BOX",idFrameEpoxy,par,3);
1481 //Flat 7.5mm horizontal section
1485 gMC->Gsvolu("SQ41","BOX",idFrameEpoxy,par,3);
1494 gMC->Gsvolu("SQ42","TUBS",idFrameEpoxy,par,5);
1497 // ScrewsInFrame - 3 sections in order to avoid overlapping volumes
1498 // Screw Head, in air
1503 gMC->Gsvolu("SQ43","TUBE",idInox,par,3);
1505 // Middle part, in the Epoxy
1509 gMC->Gsvolu("SQ44","TUBE",idInox,par,3);
1511 // Screw nut, in air
1515 gMC->Gsvolu("SQ45","TUBE",idInox,par,3);
1518 // __________________Place volumes in the quadrant ____________
1522 posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyInVFrame;
1524 gMC->Gspos("SQ00",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
1526 // keep memory of the mid position. Used for placing screws
1527 const GReal_t kMidVposX = posX;
1528 const GReal_t kMidVposY = posY;
1529 const GReal_t kMidVposZ = posZ;
1531 //Flat 7.5mm vertical section
1532 posX = 2.0*kHxInVFrame+kHxV1mm;
1533 posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyV1mm;
1535 gMC->Gspos("SQ01",1,quadrantMLayerName,posX, posY, posZ,0, "ONLY");
1537 // TopFrameAnode place 2 layers of TopFrameAnode cuboids
1539 posY = 2.*kHyInHFrame+2.*kHyH1mm+kIAF+2.*kHyInVFrame+kHyTFA;
1540 posZ = -kHzOuterFrameInox;
1541 gMC->Gspos("SQ02",1,quadrantMLayerName,posX, posY, posZ,0,"ONLY");
1542 posZ = kHzOuterFrameEpoxy;
1543 gMC->Gspos("SQ03",1,quadrantMLayerName,posX, posY, posZ,0,"ONLY");
1545 // TopFrameAnode - place 2 layers of 2 trapezoids
1547 posX += kHxTFA + 2.*kH1FAA;
1548 posZ = -kHzOuterFrameInox;
1549 gMC->Gspos("SQ04toSQ06",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1550 posZ = kHzOuterFrameEpoxy;
1551 gMC->Gspos("SQ05toSQ07",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1553 // TopAnode1 place 2 layers
1554 posX = 6.8+fgkDeltaQuadLHC;
1555 posY = 99.85+fgkDeltaQuadLHC;
1556 posZ = -1.*kHzAnodeFR4;
1557 gMC->Gspos("SQ08",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1558 posZ = kHzTopAnodeSteel1;
1559 gMC->Gspos("SQ09",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1561 // TopAnode2 place 2 layers
1562 posX = 18.534+fgkDeltaQuadLHC;
1563 posY = 99.482+fgkDeltaQuadLHC;
1564 posZ = -1.*kHzAnodeFR4;
1565 // shift up to solve overlap with SQ14
1567 gMC->Gspos("SQ10",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1568 posZ = kHzTopAnodeSteel2;
1569 gMC->Gspos("SQ11",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1571 // TopAnode3 place 1 layer
1572 posX = 25.804+fgkDeltaQuadLHC;
1573 posY = 98.61+fgkDeltaQuadLHC;
1575 gMC->Gspos("SQ12",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1577 // TopEarthFace - 2 copies
1578 posX = 23.122+fgkDeltaQuadLHC;
1579 posY = 96.90+fgkDeltaQuadLHC;
1580 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopEarthFaceCu;
1581 gMC->Gspos("SQ13",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1583 gMC->Gspos("SQ13",2,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1586 posX = 14.475+fgkDeltaQuadLHC;
1587 posY = 97.900+fgkDeltaQuadLHC;
1588 posZ = kHzTopEarthProfileCu;
1589 gMC->Gspos("SQ14",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1591 gMC->Gspos("SQ14",2,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1593 // TopGasSupport - 2 copies
1594 posX = 4.9500+fgkDeltaQuadLHC;
1595 posY = 96.200+fgkDeltaQuadLHC;
1596 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopGasSupportAl;
1597 gMC->Gspos("SQ15",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1599 gMC->Gspos("SQ15",2,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1601 // TopPositioner parameters - single Stainless Steel trapezoid - 2 copies
1602 posX = 7.60+fgkDeltaQuadLHC;
1603 posY = 98.98+fgkDeltaQuadLHC;
1604 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+2.*kHzTopGasSupportAl+kHzTopPositionerSteel;
1605 gMC->Gspos("SQ16",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1607 gMC->Gspos("SQ16",2,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1611 posZ = -1.0*kHzOuterFrameInox;
1612 //Double_t xCenterAll = 70.6615;
1613 Double_t xCenterAll = 70.500;
1614 Double_t yCenterAll = 70.350;
1615 gMC->Gspos("SQ17to23",1,quadrantMLayerName, xCenterAll, yCenterAll, posZ, rot4,"ONLY");
1617 posZ = kHzOuterFrameEpoxy;
1618 gMC->Gspos("SQ18to24",1,quadrantMLayerName, xCenterAll, yCenterAll, posZ, rot4,"ONLY");
1623 posX = 2.*kHxInVFrame+kIAF+2.*kHxInHFrame-kHxOutVFrame+2.*kHxV1mm;
1624 posY = 2.*kHyInHFrame+kHyOutVFrame;
1626 gMC->Gspos("SQ25",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
1628 // keep memory of the mid position. Used for placing screws
1629 const GReal_t kMidOVposX = posX;
1630 const GReal_t kMidOVposY = posY;
1631 const GReal_t kMidOVposZ = posZ;
1633 const Float_t kTOPY = posY+kHyOutVFrame;
1634 const Float_t kOUTX = posX;
1638 posY = kTOPY+((kBl1OCTF+kTl1OCTF)/2.);
1640 // shift to solve overlap with SQ17to23 and SQ18to24
1642 gMC->Gspos("SQ26",1,quadrantMLayerName,posX, posY, posZ, rot1,"ONLY");
1644 // VertEarthFaceCu - 2 copies
1645 posX = 89.4000+fgkDeltaQuadLHC;
1646 posY = 25.79+fgkDeltaQuadLHC;
1647 posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertEarthFaceCu;
1648 gMC->Gspos("SQ27",1,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY");
1650 gMC->Gspos("SQ27",2,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY");
1652 // VertEarthSteel - 2 copies
1653 posX = 91.00+fgkDeltaQuadLHC;
1654 posY = 30.616+fgkDeltaQuadLHC;
1655 posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertBarSteel;
1656 gMC->Gspos("SQ28",1,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY");
1658 gMC->Gspos("SQ28",2,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY");
1660 // VertEarthProfCu - 2 copies
1661 posX = 92.000+fgkDeltaQuadLHC;
1662 posY = 29.64+fgkDeltaQuadLHC;
1663 posZ = kHzFrameThickness;
1664 gMC->Gspos("SQ29",1,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY");
1666 gMC->Gspos("SQ29",2,quadrantMLayerName,posX, posY, posZ, rot1, "ONLY");
1668 // SuppLateralPositionner - 2 copies
1669 posX = 90.2-kNearFarLHC;
1670 posY = 5.00-kNearFarLHC;
1671 posZ = kHzLateralPosnAl-fgkMotherThick2;
1672 gMC->Gspos("SQ30",1,quadrantFLayerName,posX, posY, posZ, 0, "ONLY");
1674 gMC->Gspos("SQ30",2,quadrantNLayerName,posX, posY, posZ, 0, "ONLY");
1676 // LateralPositionner - 2 copies - Face view
1677 posX = 92.175-kNearFarLHC-2.*kHxLPP;
1678 posY = 5.00-kNearFarLHC;
1679 posZ =2.0*kHzLateralPosnAl+kHzLateralPosnInoxFace-fgkMotherThick2;
1680 gMC->Gspos("SQ31",1,quadrantFLayerName,posX, posY, posZ, 0, "ONLY");
1682 gMC->Gspos("SQ31",2,quadrantNLayerName,posX, posY, posZ, 0, "ONLY");
1684 // LateralPositionner - Profile view
1685 posX = 92.175+fgkDeltaQuadLHC+kHxLPF-kHxLPP;
1686 posY = 5.00+fgkDeltaQuadLHC;
1688 gMC->Gspos("SQ32",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY"); // middle layer
1690 posX = 92.175-kNearFarLHC+kHxLPF-kHxLPP;
1691 posY = 5.0000-kNearFarLHC;
1692 posZ = fgkMotherThick2-kHzLPNF;
1693 gMC->Gspos("SQ33",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY"); // near layer
1695 gMC->Gspos("SQ33",2,quadrantFLayerName,posX, posY, posZ, 0, "ONLY"); // far layer
1698 // VertCradle - 3 (or 4 ) trapezoids redefined with TGeoXtru shape
1700 posX = 97.29+fgkDeltaQuadLHC;
1701 posY = 23.02+fgkDeltaQuadLHC;
1704 gMC->Gspos("SQ34to37",2,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
1706 posX = 97.29-kNearFarLHC;
1707 posY = 23.02-kNearFarLHC;
1708 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
1710 gMC->Gspos("SQ34to36",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY");
1713 gMC->Gspos("SQ34to36",3,quadrantFLayerName,posX, posY, posZ, 0, "ONLY");
1716 // OutVertCradleD 4th Trapeze - 3 copies
1718 posX = 98.81+fgkDeltaQuadLHC;
1719 posY = 2.52+fgkDeltaQuadLHC;
1720 posZ = fgkMotherThick1-kHzVerticalCradleAl;
1721 gMC->Gspos("SQ37",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
1723 gMC->Gspos("SQ37",3,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
1725 // LateralSightSupport - 2 copies
1726 posX = 98.33-kNearFarLHC;
1727 posY = 10.00-kNearFarLHC;
1728 posZ = kHzLateralSightAl-fgkMotherThick2;
1729 // Fix (3) of extrusion SQ38 from SQN1, SQN2, SQF1, SQF2
1730 // (was posX = 98.53 ...)
1731 gMC->Gspos("SQ38",1,quadrantNLayerName,posX, posY, posZ, 0, "ONLY");
1733 gMC->Gspos("SQ38",2,quadrantFLayerName,posX, posY, posZ, 0, "ONLY");
1736 posX = 92.84+fgkDeltaQuadLHC;
1737 posY = 8.13+fgkDeltaQuadLHC;
1739 gMC->Gspos("SQ39",1,quadrantMLayerName,posX, posY, posZ, 0,"ONLY");
1744 posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxInHFrame;
1747 gMC->Gspos("SQ40",1,quadrantMLayerName,posX, posY, posZ, 0, "ONLY");
1749 // keep memory of the mid position. Used for placing screws
1750 const GReal_t kMidHposX = posX;
1751 const GReal_t kMidHposY = posY;
1752 const GReal_t kMidHposZ = posZ;
1754 // Flat 7.5mm horizontal section
1755 posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxH1mm;
1756 posY = 2.0*kHyInHFrame+kHyH1mm;
1758 gMC->Gspos("SQ41",1,quadrantMLayerName,posX, posY, posZ,0, "ONLY");
1761 posX = 2.0*kHxInVFrame+2.*kHxV1mm;
1762 posY = 2.0*kHyInHFrame+2.*kHyH1mm;
1764 gMC->Gspos("SQ42",1,quadrantMLayerName,posX, posY, posZ,0, "ONLY");
1766 // keep memory of the mid position. Used for placing screws
1767 const GReal_t kMidArcposX = posX;
1768 const GReal_t kMidArcposY = posY;
1769 const GReal_t kMidArcposZ = posZ;
1771 // ScrewsInFrame - in sensitive volume
1776 // Screws on IHEpoxyFrame
1778 const Int_t kNumberOfScrewsIH = 14; // no. of screws on the IHEpoxyFrame
1779 const Float_t kOffX = 5.; // inter-screw distance
1781 // first screw coordinates
1784 // other screw coordinates
1785 for (Int_t i = 1;i<kNumberOfScrewsIH;i++){
1786 scruX[i] = scruX[i-1]+kOffX;
1787 scruY[i] = scruY[0];
1789 // Position the volumes on the frames
1790 for (Int_t i = 0;i<kNumberOfScrewsIH;i++){
1791 posX = fgkDeltaQuadLHC + scruX[i];
1792 posY = fgkDeltaQuadLHC + scruY[i];
1794 gMC->Gspos("SQ43",i+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1796 gMC->Gspos("SQ44",i+1,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
1797 gMC->Gspos("SQ45",i+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1799 // special screw coordinates
1802 posX = fgkDeltaQuadLHC + scruX[63];
1803 posY = fgkDeltaQuadLHC + scruY[63];
1805 gMC->Gspos("SQ43",64,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1807 gMC->Gspos("SQ44",64,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
1808 gMC->Gspos("SQ45",64,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1810 // Screws on the IVEpoxyFrame
1812 const Int_t kNumberOfScrewsIV = 15; // no. of screws on the IVEpoxyFrame
1813 const Float_t kOffY = 5.; // inter-screw distance
1814 Int_t firstScrew = 58;
1815 Int_t lastScrew = 44;
1817 // first (special) screw coordinates
1818 scruX[firstScrew-1] = -2.23;
1819 scruY[firstScrew-1] = 16.3;
1820 // second (repetitive) screw coordinates
1821 scruX[firstScrew-2] = -2.23;
1822 scruY[firstScrew-2] = 21.07;
1823 // other screw coordinates
1824 for (Int_t i = firstScrew-3;i>lastScrew-2;i--){
1825 scruX[i] = scruX[firstScrew-2];
1826 scruY[i] = scruY[i+1]+kOffY;
1829 for (Int_t i = 0;i<kNumberOfScrewsIV;i++){
1830 posX = fgkDeltaQuadLHC + scruX[i+lastScrew-1];
1831 posY = fgkDeltaQuadLHC + scruY[i+lastScrew-1];
1833 gMC->Gspos("SQ43",i+lastScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1835 gMC->Gspos("SQ44",i+lastScrew,"SQ00",posX+0.1-kMidVposX, posY+0.1-kMidVposY, posZ-kMidVposZ, 0, "ONLY");
1836 gMC->Gspos("SQ45",i+lastScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1839 // Screws on the OVEpoxyFrame
1841 const Int_t kNumberOfScrewsOV = 10; // no. of screws on the OVEpoxyFrame
1846 // first (repetitive) screw coordinates
1847 // notes: 1st screw should be placed in volume 40 (InnerHorizFrame)
1848 scruX[firstScrew-1] = 90.9;
1849 scruY[firstScrew-1] = -2.23; // true value
1851 // other screw coordinates
1852 for (Int_t i = firstScrew; i<lastScrew; i++ ){
1853 scruX[i] = scruX[firstScrew-1];
1854 scruY[i] = scruY[i-1]+kOffY;
1856 for (Int_t i = 1;i<kNumberOfScrewsOV;i++){
1857 posX = fgkDeltaQuadLHC + scruX[i+firstScrew-1];
1858 posY = fgkDeltaQuadLHC + scruY[i+firstScrew-1];
1860 gMC->Gspos("SQ43",i+firstScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1863 gMC->Gspos("SQ44",i+firstScrew,"SQ25",posX+0.1-kMidOVposX, posY+0.1-kMidOVposY, posZ-kMidOVposZ, 0, "ONLY");
1864 gMC->Gspos("SQ45",i+firstScrew,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1866 // special case for 1st screw, inside the horizontal frame (volume 40)
1867 posX = fgkDeltaQuadLHC + scruX[firstScrew-1];
1868 posY = fgkDeltaQuadLHC + scruY[firstScrew-1];
1871 gMC->Gspos("SQ44",firstScrew,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
1873 // Inner Arc of Frame, screw positions and numbers-1
1874 scruX[62] = 16.009; scruY[62] = 1.401;
1875 scruX[61] = 14.564; scruY[61] = 6.791;
1876 scruX[60] = 11.363; scruY[60] = 11.363;
1877 scruX[59] = 6.791 ; scruY[59] = 14.564;
1878 scruX[58] = 1.401 ; scruY[58] = 16.009;
1880 for (Int_t i = 0;i<5;i++){
1881 posX = fgkDeltaQuadLHC + scruX[i+58];
1882 posY = fgkDeltaQuadLHC + scruY[i+58];
1884 gMC->Gspos("SQ43",i+58+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1886 gMC->Gspos("SQ44",i+58+1,"SQ42",posX+0.1-kMidArcposX, posY+0.1-kMidArcposY, posZ-kMidArcposZ, 0, "ONLY");
1887 gMC->Gspos("SQ45",i+58+1,quadrantMLayerName,posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
1890 //______________________________________________________________________________
1891 void AliMUONSt1GeometryBuilderV2::PlaceInnerLayers(Int_t chamber)
1893 /// Place the gas and copper layers for the specified chamber.
1895 GReal_t x = fgkDeltaQuadLHC;
1896 GReal_t y = fgkDeltaQuadLHC;
1898 GReal_t zc = fgkHzGas + fgkHzPadPlane;
1899 Int_t dpos = (chamber-1)*2;
1901 TString name = GasVolumeName("SAG", chamber);
1902 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
1903 gMC->Gspos("SA1C", 1+dpos, QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
1904 gMC->Gspos("SA1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
1907 //______________________________________________________________________________
1908 void AliMUONSt1GeometryBuilderV2::PlaceSpacer0(Int_t chamber)
1910 /// Place the spacer defined in global positions
1911 /// !! This method should be used only to find out the right mother volume
1912 /// for the spacer if geometry is changed and the plane segment volumes
1913 /// will change their numbering
1915 // Global position of mother volume for the QuadrantMLayer
1916 // SQM1: (-2.6, -2.6, -522.41)
1917 // SQM2: (-2.6, -2.6, -541.49)
1920 GReal_t mz = 522.41;
1926 AliDebugStream(2) << "spacer05 pos1: " << x << ", " << y << ", " << z << endl;
1927 gMC->Gspos("Spacer05", 1, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY");
1930 AliDebugStream(2) << "spacer05 pos2: " << x << ", " << y << ", " << z << endl;
1931 gMC->Gspos("Spacer05", 2, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY");
1936 AliDebugStream(2) << "spacer06 pos1: " << x << ", " << y << ", " << z << endl;
1937 gMC->Gspos("Spacer06", 1, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY");
1940 AliDebugStream(2) << "spacer06 pos2: " << x << ", " << y << ", " << z << endl;
1941 gMC->Gspos("Spacer06", 2, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY");
1946 AliDebugStream(2) << "spacer07 pos1: " << x << ", " << y << ", " << z << endl;
1947 gMC->Gspos("Spacer07", 1, QuadrantMLayerName(chamber), x, y, z, 0, "ONLY");
1950 //______________________________________________________________________________
1951 void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector,
1953 const TVector3& where, Bool_t reflectZ, Int_t chamber)
1955 /// Place all the segments in the mother volume, at the position defined
1956 /// by the sector's data. \n
1957 /// The lines with comments COMMENT OUT BEGIN/END indicates blocks
1958 /// which can be commented out in order to reduce the number of volumes
1959 /// in a sector to the plane segments corresponding to regular motifs only.
1961 static Int_t segNum=1;
1968 reflZ=0; // no reflection along z... nothing
1969 fMUON->AliMatrix(rotMat, 90.,90.,90,180.,0.,0.); // 90° rotation around z, NO reflection along z
1972 fMUON->AliMatrix(reflZ, 90.,0.,90,90.,180.,0.); // reflection along z
1973 fMUON->AliMatrix(rotMat, 90.,90.,90,180.,180.,0.); // 90° rotation around z AND reflection along z
1976 GReal_t posX,posY,posZ;
1978 TArrayI alreadyDone(20);
1979 Int_t nofAlreadyDone = 0;
1981 for (Int_t irow=0;irow<sector->GetNofRows();irow++){ // for each row
1982 AliMpRow* row = sector->GetRow(irow);
1985 for (Int_t iseg=0;iseg<row->GetNofRowSegments();iseg++){ // for each row segment
1986 AliMpVRowSegment* seg = row->GetRowSegment(iseg);
1988 Long_t value = specialMap.GetValue(seg->GetMotifPositionId(0));
1990 if ( value == 0 ){ //if this is a normal segment (ie. not part of <specialMap>)
1992 // create the cathode part
1993 CreatePlaneSegment(segNum, TVector2(seg->GetDimensionX(),seg->GetDimensionY()),
1994 seg->GetNofMotifs());
1996 posX = where.X() + seg->GetPositionX();
1997 posY = where.Y() + seg->GetPositionY();
1998 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
1999 gMC->Gspos(PlaneSegmentName(segNum).Data(), 1,
2000 QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2002 // and place all the daughter boards of this segment
2004 // COMMENT OUT BEGIN
2005 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {
2008 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2009 AliMpMotifPosition* motifPos =
2010 sector->GetMotifMap()->FindMotifPosition(motifPosId);
2011 Int_t copyNo = motifPosId;
2012 if ( sector->GetDirection() == AliMp::kX) copyNo += fgkDaughterCopyNoOffset;
2015 posX = where.X() + motifPos->GetPositionX() + fgkOffsetX;
2016 posY = where.Y() + motifPos->GetPositionY() + fgkOffsetY;
2017 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
2018 gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2026 // COMMENT OUT BEGIN
2027 // if this is a special segment
2028 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {// for each motif
2030 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2032 Bool_t isDone = false;
2034 while (i<nofAlreadyDone && !isDone) {
2035 if (alreadyDone.At(i) == motifPosId) isDone=true;
2038 if (isDone) continue; // don't treat the same motif twice
2040 AliMUONSt1SpecialMotif spMot = *((AliMUONSt1SpecialMotif*)specialMap.GetValue(motifPosId));
2041 AliDebugStream(2) << chamber << " processing special motif: " << motifPosId << endl;
2043 AliMpMotifPosition* motifPos = sector->GetMotifMap()->FindMotifPosition(motifPosId);
2046 Int_t copyNo = motifPosId;
2047 if ( sector->GetDirection() == AliMp::kX) copyNo += fgkDaughterCopyNoOffset;
2049 // place the hole for the motif, wrt the requested rotation angle
2050 Int_t rot = ( spMot.GetRotAngle()<0.1 ) ? reflZ:rotMat;
2052 posX = where.X() + motifPos->GetPositionX() + spMot.GetDelta().X();
2053 posY = where.Y() + motifPos->GetPositionY() + spMot.GetDelta().Y();
2054 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
2055 // Shift the hole for special motif 46 to avoid debording into S047
2056 if ( copyNo == 2070 ) {
2060 gMC->Gspos(fgkHoleName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
2062 // then place the daughter board for the motif, wrt the requested rotation angle
2063 posX = posX+fgkDeltaFilleEtamX;
2064 posY = posY+fgkDeltaFilleEtamY;
2065 // Do not shift the daughter board
2066 if ( copyNo == 2070 ) {
2070 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
2071 gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
2073 if (nofAlreadyDone == alreadyDone.GetSize())
2074 alreadyDone.Set(2*nofAlreadyDone);
2075 alreadyDone.AddAt(motifPosId, nofAlreadyDone++);
2077 AliDebugStream(2) << chamber << " processed motifPosId: " << motifPosId << endl;
2081 }// end of special motif case
2086 //______________________________________________________________________________
2087 TString AliMUONSt1GeometryBuilderV2::GasVolumeName(const TString& name, Int_t chamber) const
2089 /// Insert the chamber number into the name.
2091 TString newString(name);
2096 newString.Insert(2, number);
2105 //______________________________________________________________________________
2106 void AliMUONSt1GeometryBuilderV2::CreateMaterials()
2108 /// Define materials specific to station 1
2110 // Materials and medias defined in MUONv1:
2112 // AliMaterial( 9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
2113 // AliMaterial(10, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
2114 // AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
2115 // AliMixture( 19, "Bakelite$", abak, zbak, dbak, -3, wbak);
2116 // AliMixture( 20, "ArC4H10 GAS$", ag, zg, dg, 3, wg);
2117 // AliMixture( 21, "TRIG GAS$", atrig, ztrig, dtrig, -5, wtrig);
2118 // AliMixture( 22, "ArCO2 80%$", ag1, zg1, dg1, 3, wg1);
2119 // AliMixture( 23, "Ar-freon $", atr1, ztr1, dtr1, 4, wtr1);
2120 // AliMixture( 24, "ArCO2 GAS$", agas, zgas, dgas, 3, wgas);
2121 // AliMaterial(31, "COPPER$", 63.54, 29., 8.96, 1.4, 0.);
2122 // AliMixture( 32, "Vetronite$",aglass, zglass, dglass, 5, wglass);
2123 // AliMaterial(33, "Carbon$", 12.01, 6., 2.265, 18.8, 49.9);
2124 // AliMixture( 34, "Rohacell$", arohac, zrohac, drohac, -4, wrohac);
2126 // AliMedium( 1, "AIR_CH_US ", 15, 1, iSXFLD, ...
2127 // AliMedium( 4, "ALU_CH_US ", 9, 0, iSXFLD, ...
2128 // AliMedium( 5, "ALU_CH_US ", 10, 0, iSXFLD, ...
2129 // AliMedium( 6, "AR_CH_US ", 20, 1, iSXFLD, ...
2130 // AliMedium( 7, "GAS_CH_TRIGGER ", 21, 1, iSXFLD, ...
2131 // AliMedium( 8, "BAKE_CH_TRIGGER ", 19, 0, iSXFLD, ...
2132 // AliMedium( 9, "ARG_CO2 ", 22, 1, iSXFLD, ...
2133 // AliMedium(11, "PCB_COPPER ", 31, 0, iSXFLD, ...
2134 // AliMedium(12, "VETRONITE ", 32, 0, iSXFLD, ...
2135 // AliMedium(13, "CARBON ", 33, 0, iSXFLD, ...
2136 // AliMedium(14, "Rohacell ", 34, 0, iSXFLD, ...
2137 // AliMedium(24, "FrameCH$ ", 44, 1, iSXFLD, ...
2140 // --- Define materials for GEANT ---
2143 fMUON->AliMaterial(41, "Aluminium II$", 26.98, 13., 2.7, -8.9, 26.1);
2145 // from PDG and "The Particle Detector BriefBook", Bock and Vasilescu, P.18
2146 // ??? same but the last but one argument < 0
2148 // --- Define mixtures for GEANT ---
2151 // // Ar-CO2 gas II (80%+20%)
2152 // Float_t ag1[2] = { 39.95, 44.01};
2153 // Float_t zg1[2] = { 18., 22.};
2154 // Float_t wg1[2] = { .8, 0.2};
2155 // Float_t dg1 = .001821;
2156 // fMUON->AliMixture(45, "ArCO2 II 80%$", ag1, zg1, dg1, 2, wg1);
2158 // // use wg1 weighting factors (6th arg > 0)
2160 // Rohacell 51 II - imide methacrylique
2161 Float_t aRohacell51[4] = { 12.01, 1.01, 16.00, 14.01};
2162 Float_t zRohacell51[4] = { 6., 1., 8., 7.};
2163 Float_t wRohacell51[4] = { 9., 13., 2., 1.};
2164 Float_t dRohacell51 = 0.052;
2165 fMUON->AliMixture(46, "FOAM$",aRohacell51,zRohacell51,dRohacell51,-4,wRohacell51);
2167 // use relative A (molecular) values (6th arg < 0)
2169 Float_t aSnPb[2] = { 118.69, 207.19};
2170 Float_t zSnPb[2] = { 50, 82};
2171 Float_t wSnPb[2] = { 0.6, 0.4} ;
2172 Float_t dSnPb = 8.926;
2173 fMUON->AliMixture(47, "SnPb$", aSnPb,zSnPb,dSnPb,2,wSnPb);
2175 // use wSnPb weighting factors (6th arg > 0)
2177 // plastic definition from K5, Freiburg (found on web)
2178 Float_t aPlastic[2]={ 1.01, 12.01};
2179 Float_t zPlastic[2]={ 1, 6};
2180 Float_t wPlastic[2]={ 1, 1};
2181 Float_t denPlastic=1.107;
2182 fMUON->AliMixture(48, "Plastic$",aPlastic,zPlastic,denPlastic,-2,wPlastic);
2184 // use relative A (molecular) values (6th arg < 0)...no other info...
2186 // Not used, to be removed
2190 // Inox/Stainless Steel (18%Cr, 9%Ni)
2191 Float_t aInox[3] = {55.847, 51.9961, 58.6934};
2192 Float_t zInox[3] = {26., 24., 28.};
2193 Float_t wInox[3] = {0.73, 0.18, 0.09};
2194 Float_t denInox = 7.930;
2195 fMUON->AliMixture(50, "StainlessSteel$",aInox,zInox,denInox,3,wInox);
2197 // use wInox weighting factors (6th arg > 0)
2198 // from CERN note NUFACT Note023, Oct.2000
2200 // End - Not used, to be removed
2203 // --- Define the tracking medias for GEANT ---
2206 GReal_t epsil = .001; // Tracking precision,
2207 //GReal_t stemax = -1.; // Maximum displacement for multiple scat
2208 GReal_t tmaxfd = -20.; // Maximum angle due to field deflection
2209 //GReal_t deemax = -.3; // Maximum fractional energy loss, DLS
2210 GReal_t stmin = -.8;
2211 GReal_t maxStepAlu = fMUON->GetMaxStepAlu();
2212 GReal_t maxDestepAlu = fMUON->GetMaxDestepAlu();
2213 // GReal_t maxStepGas = fMUON->GetMaxStepGas();
2214 Int_t iSXFLD = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->PrecInteg();
2215 Float_t sXMGMX = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
2217 fMUON->AliMedium(21, "ALU_II$", 41, 0, iSXFLD, sXMGMX,
2218 tmaxfd, maxStepAlu, maxDestepAlu, epsil, stmin);
2220 // was med: 20 mat: 36
2221 // fMUON->AliMedium(25, "ARG_CO2_II", 45, 1, iSXFLD, sXMGMX,
2222 // tmaxfd, maxStepGas, maxDestepAlu, epsil, stmin);
2223 // // was med: 9 mat: 22
2224 fMUON->AliMedium(26, "FOAM_CH$", 46, 0, iSXFLD, sXMGMX,
2225 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ;
2226 // was med: 16 mat: 32
2227 fMUON->AliMedium(27, "SnPb$", 47, 0, iSXFLD, sXMGMX,
2228 10.0, 0.01, 1.0, 0.003, 0.003);
2229 // was med: 19 mat: 35
2230 fMUON->AliMedium(28, "Plastic$", 48, 0, iSXFLD, sXMGMX,
2231 10.0, 0.01, 1.0, 0.003, 0.003);
2232 // was med: 17 mat: 33
2234 // Not used, to be romoved
2237 fMUON->AliMedium(30, "InoxBolts$", 50, 1, iSXFLD, sXMGMX,
2238 10.0, 0.01, 1.0, 0.003, 0.003);
2239 // was med: 21 mat: 37
2241 // End - Not used, to be removed
2244 //______________________________________________________________________________
2245 void AliMUONSt1GeometryBuilderV2::CreateGeometry()
2247 /// Create the detailed GEANT geometry for the dimuon arm station1
2249 AliDebug(1,"Called");
2251 // Define chamber volumes as virtual
2254 // Create basic volumes
2257 CreateDaughterBoard();
2258 CreateInnerLayers();
2262 // Create reflexion matrices
2265 Int_t reflXZ, reflYZ, reflXY;
2266 fMUON->AliMatrix(reflXZ, 90., 180., 90., 90., 180., 0.);
2267 fMUON->AliMatrix(reflYZ, 90., 0., 90.,-90., 180., 0.);
2268 fMUON->AliMatrix(reflXY, 90., 180., 90., 270., 0., 0.);
2270 // Define transformations for each quadrant
2271 // In old coordinate system: In new coordinate system:
2274 // II. | I. I. | II.
2276 // _____ | ____ _____ | ____
2278 // III. | IV. IV. | III.
2283 rotm[0]=0; // quadrant I
2284 rotm[1]=reflXZ; // quadrant II
2285 rotm[2]=reflXY; // quadrant III
2286 rotm[3]=reflYZ; // quadrant IV
2288 TGeoRotation rotm[4];
2289 rotm[0] = TGeoRotation("identity");
2290 rotm[1] = TGeoRotation("reflXZ", 90., 180., 90., 90., 180., 0.);
2291 rotm[2] = TGeoRotation("reflXY", 90., 180., 90., 270., 0., 0.);
2292 rotm[3] = TGeoRotation("reflYZ", 90., 0., 90.,-90., 180., 0.);
2295 scale[0] = TVector3( 1, 1, -1); // quadrant I
2296 scale[1] = TVector3(-1, 1, 1); // quadrant II
2297 scale[2] = TVector3(-1, -1, -1); // quadrant III
2298 scale[3] = TVector3( 1, -1, 1); // quadrant IV
2301 detElemId[0] = 1; // quadrant I
2302 detElemId[1] = 0; // quadrant II
2303 detElemId[2] = 3; // quadrant III
2304 detElemId[3] = 2; // quadrant IV
2306 // Shift in Z of the middle layer
2307 Double_t deltaZ = 7.5/2.;
2309 // Position of quadrant I wrt to the chamber position
2310 // TVector3 pos0(-fgkDeltaQuadLHC, -fgkDeltaQuadLHC, deltaZ);
2312 // Shift for near/far layers
2313 GReal_t shiftXY = fgkFrameOffset;
2314 GReal_t shiftZ = fgkMotherThick1+fgkMotherThick2;
2316 // Build two chambers
2318 for (Int_t ich=1; ich<3; ich++) {
2319 //for (Int_t ich=1; ich<2; ich++) {
2321 // Create quadrant volume
2322 CreateQuadrant(ich);
2324 // Place gas volumes
2325 PlaceInnerLayers(ich);
2327 // Place the quadrant
2328 for (Int_t i=0; i<4; i++) {
2329 //for (Int_t i=1; i<2; i++) {
2331 GReal_t posx0, posy0, posz0;
2332 posx0 = fgkPadXOffsetBP * scale[i].X();
2333 posy0 = fgkPadYOffsetBP * scale[i].Y();;
2334 posz0 = deltaZ * scale[i].Z();
2336 ->AddEnvelope(QuadrantEnvelopeName(ich,i), detElemId[i] + ich*100, true,
2337 TGeoTranslation(posx0, posy0, posz0), rotm[i]);
2340 GReal_t posx, posy, posz;
2341 posx = -fgkDeltaQuadLHC - fgkPadXOffsetBP;
2342 posy = -fgkDeltaQuadLHC - fgkPadYOffsetBP;
2345 ->AddEnvelopeConstituent(QuadrantMLayerName(ich), QuadrantEnvelopeName(ich,i),
2346 i+1, TGeoTranslation(posx, posy, posz));
2348 ->AddEnvelopeConstituent(QuadrantMFLayerName(ich), QuadrantEnvelopeName(ich,i),
2349 i+5, TGeoTranslation(posx, posy, posz));
2352 GReal_t posx2 = posx + shiftXY;;
2353 GReal_t posy2 = posy + shiftXY;;
2354 GReal_t posz2 = posz - shiftZ;;
2355 //gMC->Gspos(QuadrantNLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
2357 ->AddEnvelopeConstituent(QuadrantNLayerName(ich), QuadrantEnvelopeName(ich,i),
2358 i+1, TGeoTranslation(posx2, posy2, posz2));
2360 posz2 = posz + shiftZ;
2361 //gMC->Gspos(QuadrantFLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
2363 ->AddEnvelopeConstituent(QuadrantFLayerName(ich), QuadrantEnvelopeName(ich,i),
2364 i+1, TGeoTranslation(posx2, posy2, posz2));
2366 // Place spacer in global coordinates in the first non rotated quadrant
2367 // if ( detElemId[i] == 0 ) PlaceSpacer0(ich);
2368 // !! This placement should be used only to find out the right mother volume
2369 // for the spacer if geometry is changed and the plane segment volumes
2370 // will change their numbering
2371 // The call to the method CreateSpacer0(); above haa to be uncommented, too
2376 //______________________________________________________________________________
2377 void AliMUONSt1GeometryBuilderV2::SetVolumes()
2379 /// Define the volumes for the station2 chambers.
2381 if (gAlice->GetModule("SHIL")) {
2382 SetMotherVolume(0, "YOUT1");
2383 SetMotherVolume(1, "YOUT1");
2386 SetVolume(0, "SC01", true);
2387 SetVolume(1, "SC02", true);
2390 //______________________________________________________________________________
2391 void AliMUONSt1GeometryBuilderV2::SetTransformations()
2393 /// Define the transformations for the station2 chambers.
2395 Double_t zpos1 = - AliMUONConstants::DefaultChamberZ(0);
2396 SetTranslation(0, TGeoTranslation(0., 0., zpos1));
2398 Double_t zpos2 = - AliMUONConstants::DefaultChamberZ(1);
2399 SetTranslation(1, TGeoTranslation(0., 0., zpos2));
2402 //______________________________________________________________________________
2403 void AliMUONSt1GeometryBuilderV2::SetSensitiveVolumes()
2405 /// Define the sensitive volumes for station2 chambers.
2407 GetGeometry(0)->SetSensitiveVolume("SA1G");
2408 GetGeometry(1)->SetSensitiveVolume("SA2G");