No compression by default
[u/mrichter/AliRoot.git] / MUON / AliMUONSt1GeometryBuilderV2.cxx
CommitLineData
ba030c0e 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
d1cd2474 16// $Id$
17//
5f1df83a 18// Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
19//
d1cd2474 20// Class AliMUONSt1GeometryBuilderV2
21// ---------------------------------
22// MUON Station1 detailed geometry construction class.
5f1df83a 23// (Originally defined in AliMUONv2.cxx - now removed.)
24// Included in AliRoot 2004/01/23
d1cd2474 25
adbabf6d 26#include "AliMUONSt1GeometryBuilderV2.h"
27#include "AliMUONSt1SpecialMotif.h"
28#include "AliMUON.h"
29#include "AliMUONConstants.h"
30#include "AliMUONGeometryModule.h"
31#include "AliMUONGeometryEnvelopeStore.h"
ba030c0e 32
86488ea7 33#include "AliMpContainers.h"
4d8c279c 34#include "AliMpConstants.h"
adbabf6d 35#include "AliMpFiles.h"
36#include "AliMpSectorReader.h"
37#include "AliMpSector.h"
38#include "AliMpRow.h"
39#include "AliMpVRowSegment.h"
40#include "AliMpMotifMap.h"
41#include "AliMpMotifPosition.h"
4d8c279c 42#include "AliMpPlaneType.h"
adbabf6d 43
44#include "AliRun.h"
45#include "AliMagF.h"
46#include "AliLog.h"
ba030c0e 47
48#include <TVector2.h>
d1cd2474 49#include <TVector3.h>
50#include <TGeoMatrix.h>
ba030c0e 51#include <TClonesArray.h>
5f91c9e8 52#include <Riostream.h>
53#include <TSystem.h>
5d12ce38 54#include <TVirtualMC.h>
91111b9c 55#include <TGeoManager.h>
56#include <TGeoVolume.h>
57#include <TGeoTube.h>
58#include <TGeoCompositeShape.h>
ba030c0e 59
86488ea7 60#ifdef WITH_STL
adbabf6d 61 #include <vector>
62#endif
e118b27e 63
86488ea7 64#ifdef WITH_ROOT
adbabf6d 65 #include "TArrayI.h"
66#endif
ba030c0e 67
5f91c9e8 68// Thickness Constants
d1cd2474 69const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzPadPlane=0.0148/2.; //Pad plane
1c4b9c4c 70const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFoam = 2.503/2.; //Foam of mechanicalplane
71const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFR4 = 0.062/2.; //FR4 of mechanical plane
d1cd2474 72const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzSnPb = 0.0091/2.; //Pad/Kapton connection (66 pt)
73const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzKapton = 0.0122/2.; //Kapton
74const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergPlastic = 0.3062/2.;//Berg connector
75const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergCopper = 0.1882/2.; //Berg connector
76const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzDaughter = 0.0156/2.; //Daughter board
b367fd8f 77const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzGas = 0.42/2.; //Gas thickness
5f91c9e8 78
79// Quadrant Mother volume - TUBS1 - Middle layer of model
d1cd2474 80const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR1 = 18.3;
81const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR1 = 105.673;
82const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick1 = 6.5/2;
83const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL1 = 0.;
84const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU1 = 90.;
5f91c9e8 85
86// Quadrant Mother volume - TUBS2 - near and far layers of model
d1cd2474 87const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR2 = 20.7;
88const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR2 = 100.073;
89const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick2 = 3.0/2;
90const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL2 = 0.;
91const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU2 = 90.;
5f91c9e8 92
93// Sensitive copper pads, foam layer, PCB and electronics model parameters
d1cd2474 94const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxHole=1.5/2.;
95const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyHole=6./2.;
96const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergPlastic=0.74/2.;
97const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergPlastic=5.09/2.;
98const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergCopper=0.25/2.;
99const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergCopper=3.6/2.;
100const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxKapton=0.8/2.;
101const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyKapton=5.7/2.;
102const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxDaughter=2.3/2.;
103const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyDaughter=6.3/2.;
104const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetX=1.46;
105const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetY=0.71;
106const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamX=1.46;
107const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamY=0.051;
108
109const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaQuadLHC=2.6; // LHC Origin wrt Quadrant Origin
b367fd8f 110const GReal_t AliMUONSt1GeometryBuilderV2::fgkFrameOffset=5.2;
111 // Fix (1) of overlap SQN* layers with SQM* ones (was 5.0)
112
113// Pad planes offsets
114const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadXOffsetBP = 0.50 - 0.63/2; // = 0.185
115const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadYOffsetBP = -0.31 - 0.42/2; // =-0.52
d1cd2474 116
117const char* AliMUONSt1GeometryBuilderV2::fgkHoleName="MCHL";
118const char* AliMUONSt1GeometryBuilderV2::fgkDaughterName="MCDB";
119const char AliMUONSt1GeometryBuilderV2::fgkFoamLayerSuffix='F'; // prefix for automatic volume naming
b367fd8f 120const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantEnvelopeName="SE";
d1cd2474 121const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMLayerName="SQM";
122const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantNLayerName="SQN";
123const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantFLayerName="SQF";
e8c253a0 124const Int_t AliMUONSt1GeometryBuilderV2::fgkDaughterCopyNoOffset=1000;
5f91c9e8 125
4d8c279c 126ClassImp(AliMUONSt1GeometryBuilderV2)
127
5f91c9e8 128//______________________________________________________________________________
d1cd2474 129AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon)
b7ef3c96 130 : AliMUONVGeometryBuilder(0, 1),
d1cd2474 131 fMUON(muon)
ba030c0e 132{
5f91c9e8 133 // set path to mapping data files
134 if (! gSystem->Getenv("MINSTALL")) {
135 TString dirPath = gSystem->Getenv("ALICE_ROOT");
136 dirPath += "/MUON/mapping";
3d16af90 137 AliMpFiles::SetTopPath(dirPath);
5f91c9e8 138 gSystem->Setenv("MINSTALL", dirPath.Data());
139 //cout << "AliMpFiles top path set to " << dirPath << endl;
140 }
141 //else
d1cd2474 142 // cout << gSystem->Getenv("MINSTALL") << endl;
ba030c0e 143}
144
5f91c9e8 145//______________________________________________________________________________
d1cd2474 146AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2()
147 : AliMUONVGeometryBuilder(),
148 fMUON(0)
ba030c0e 149{
d1cd2474 150// Default Constructor
151// --
ba030c0e 152}
153
5f91c9e8 154//______________________________________________________________________________
d1cd2474 155AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(const AliMUONSt1GeometryBuilderV2& rhs)
156 : AliMUONVGeometryBuilder(rhs)
ba030c0e 157{
158// Dummy copy constructor
d1cd2474 159
8c343c7c 160 AliFatal("Copy constructor is not implemented.");
ba030c0e 161}
162
5f91c9e8 163//______________________________________________________________________________
d1cd2474 164AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2()
ba030c0e 165{
166// Destructor
ba030c0e 167}
168
d1cd2474 169
170//______________________________________________________________________________
171AliMUONSt1GeometryBuilderV2&
172AliMUONSt1GeometryBuilderV2::operator = (const AliMUONSt1GeometryBuilderV2& rhs)
173{
174 // check assignement to self
175 if (this == &rhs) return *this;
176
8c343c7c 177 AliFatal("Assignment operator is not implemented.");
d1cd2474 178
179 return *this;
180}
181
5f91c9e8 182//
183// Private methods
184//
185
186//______________________________________________________________________________
b367fd8f 187TString
188AliMUONSt1GeometryBuilderV2::QuadrantEnvelopeName(Int_t chamber, Int_t quadrant) const
189{
190// Generate unique envelope name from chamber Id and quadrant number
191// ---
192
193 return Form("%s%d", Form("%s%d",fgkQuadrantEnvelopeName,chamber), quadrant);
194}
195
196//______________________________________________________________________________
d1cd2474 197void AliMUONSt1GeometryBuilderV2::CreateHole()
ba030c0e 198{
5f91c9e8 199// Create all the elements found inside a foam hole
ba030c0e 200// --
d1cd2474 201 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
202 Int_t idAir = idtmed[1100]; // medium 1
203 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
204 Int_t idCopper = idtmed[1121]; // medium 22 = copper
ba030c0e 205
5f91c9e8 206 GReal_t par[3];
207 GReal_t posX,posY,posZ;
208
209 par[0] = fgkHxHole;
210 par[1] = fgkHyHole;
211 par[2] = fgkHzFoam;
212 gMC->Gsvolu(fgkHoleName,"BOX",idAir,par,3);
213
214 par[0] = fgkHxKapton;
215 par[1] = fgkHyKapton;
216 par[2] = fgkHzSnPb;
217 gMC->Gsvolu("SNPB", "BOX", idCopper, par, 3);
218 posX = 0.;
219 posY = 0.;
220 posZ = -fgkHzFoam+fgkHzSnPb;
221 gMC->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
ba030c0e 222
5f91c9e8 223 par[0] = fgkHxHole;
224 par[1] = fgkHyBergPlastic;
225 par[2] = fgkHzKapton;
226 gMC->Gsvolu("KAPT", "BOX", idCopper, par, 3);
227 posX = 0.;
228 posY = 0.;
229 posZ = 0.;
230 gMC->Gspos("KAPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
231}
ba030c0e 232
5f91c9e8 233//______________________________________________________________________________
d1cd2474 234void AliMUONSt1GeometryBuilderV2::CreateDaughterBoard()
5f91c9e8 235{
236// Create all the elements in a daughter board
237// --
d1cd2474 238 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
5f91c9e8 239 Int_t idAir = idtmed[1100]; // medium 1
d1cd2474 240 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
241 //Int_t idPlastic =idtmed[1116]; // medium 17 = Plastic
242 Int_t idCopper = idtmed[1121]; // medium 22 = copper
243 Int_t idPlastic =idtmed[1127]; // medium 28 = Plastic
ba030c0e 244
5f91c9e8 245 GReal_t par[3];
246 GReal_t posX,posY,posZ;
ba030c0e 247
5f91c9e8 248 par[0]=fgkHxDaughter;
249 par[1]=fgkHyDaughter;
250 par[2]=TotalHzDaughter();
251 gMC->Gsvolu(fgkDaughterName,"BOX",idAir,par,3);
ba030c0e 252
5f91c9e8 253 par[0]=fgkHxBergPlastic;
254 par[1]=fgkHyBergPlastic;
255 par[2]=fgkHzBergPlastic;
256 gMC->Gsvolu("BRGP","BOX",idPlastic,par,3);
257 posX=0.;
258 posY=0.;
259 posZ = -TotalHzDaughter() + fgkHzBergPlastic;
260 gMC->Gspos("BRGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
261
262 par[0]=fgkHxBergCopper;
263 par[1]=fgkHyBergCopper;
264 par[2]=fgkHzBergCopper;
265 gMC->Gsvolu("BRGC","BOX",idCopper,par,3);
266 posX=0.;
267 posY=0.;
268 posZ=0.;
269 gMC->Gspos("BRGC",1,"BRGP",posX,posY,posZ,0,"ONLY");
270
271 par[0]=fgkHxDaughter;
272 par[1]=fgkHyDaughter;
273 par[2]=fgkHzDaughter;
274 gMC->Gsvolu("DGHT","BOX",idCopper,par,3);
275 posX=0.;
276 posY=0.;
277 posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter;
278 gMC->Gspos("DGHT",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
279}
280
281//______________________________________________________________________________
d1cd2474 282void AliMUONSt1GeometryBuilderV2::CreateInnerLayers()
5f91c9e8 283{
284// Create the layer of sensitive volumes with gas
285// and the copper layer.
286// --
287
288// Gas Medium
d1cd2474 289 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
290 //Int_t idArCO2 = idtmed[1108]; // medium 9 (ArCO2 80%)
291 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
292 Int_t idArCO2 = idtmed[1124]; // medium 25 (ArCO2 80%)
293 Int_t idCopper = idtmed[1121]; // medium 22 = copper
5f91c9e8 294
295 Float_t par[11];
296
297//Make gas volume - composed of 11 trapezoids
298// section 1 of 11
299 par[0] = fgkHzGas;
300 par[1] = 0.;
301 par[2] = 0.;
302 par[3] = 71.33/2.;
303 par[4] = 9.76/2.;
304 par[5] = 48.77/2.;
305 par[6] = 15.3;
306 par[7] = 71.33/2.;
307 par[8] = 9.76/2.;
308 par[9] = 48.77/2.;
309 par[10] = 15.3;
310
311 gMC->Gsvolu("SA1G", "TRAP", idArCO2, par, 11);
312 gMC->Gsvolu("SA2G", "TRAP", idArCO2, par, 11);
ba030c0e 313
5f91c9e8 314 par[0] = fgkHzPadPlane;
315 gMC->Gsvolu("SA1C", "TRAP", idCopper,par, 11);
316
317// section 2 of 11
318 par[0] = fgkHzGas;
319 par[1] = 0.;
320 par[2] = 0.;
321 par[3] = 79.68/2.;
322 par[4] = 10.4/2.;
323 par[5] = 57.0/2.;
324 par[6] = 0.;
325 par[7] = 79.68/2.;
326 par[8] = 10.4/2.;
327 par[9] = 57.0/2.;
328 par[10] = 0.;
329 gMC->Gsvolu("SB1G", "TRAP", idArCO2, par, 11);
330 gMC->Gsvolu("SB2G", "TRAP", idArCO2, par, 11);
331
332 par[0] = fgkHzPadPlane;
333 gMC->Gsvolu("SB1C", "TRAP", idCopper,par, 11);
334
335// section 3 of 11
336 par[0] = fgkHzGas;
337 par[1] = 0.;
338 par[2] = 0.;
339 par[3] = 71.33/2.;
340 par[4] = 48.77/2.;
341 par[5] = 9.73/2.;
342 par[6] = -15.3;
343 par[7] = 71.33/2.;
344 par[8] = 48.77/2.;
345 par[9] = 9.73/2.;
346 par[10] = -15.3;
347
348 gMC->Gsvolu("SC1G", "TRAP", idArCO2, par, 11);
349 gMC->Gsvolu("SC2G", "TRAP", idArCO2, par, 11);
350
351 par[0] = fgkHzPadPlane;
352 gMC->Gsvolu("SC1C", "TRAP", idCopper,par, 11);
353
354// section 4 of 11
355 par[0] = fgkHzGas;
356 par[1] = 0.;
357 par[2] = 0.;
358 par[3] = 6.00/2.;
359 par[4] = 0.;
360 par[5] = 1.56/2.;
361 par[6] = 7.41;
362 par[7] = 6.00/2.;
363 par[8] = 0.;
364 par[9] = 1.56/2.;
365 par[10] = 7.41;
366 gMC->Gsvolu("SD1G", "TRAP", idArCO2, par, 11);
367 gMC->Gsvolu("SD2G", "TRAP", idArCO2, par, 11);
368
369 par[0] = fgkHzPadPlane;
370 gMC->Gsvolu("SD1C", "TRAP", idCopper,par, 11);
371
372// section 5 of 11
373 par[0] = fgkHzGas;
374 par[1] = 0.;
375 par[2] = 0.;
376 par[3] = 1.516/2.;
377 par[4] = 0.;
378 par[5] = 0.829/2.;
379 par[6] = 15.3;
380 par[7] = 1.516/2.;
381 par[8] = 0.;
382 par[9] = 0.829/2.;
383 par[10] = 15.3;
384 gMC->Gsvolu("SE1G", "TRAP", idArCO2, par, 11);
385 gMC->Gsvolu("SE2G", "TRAP", idArCO2, par, 11);
386
387 par[0] = fgkHzPadPlane;
388 gMC->Gsvolu("SE1C", "TRAP", idCopper,par, 11);
389
390// section 6 of 11
391 par[0] = fgkHzGas;
392 par[1] = 0.;
393 par[2] = 0.;
394 par[3] = 3.92/2.;
395 par[4] = 0.;
396 par[5] = 0.562/2.;
397 par[6] = -4.1;
398 par[7] = 3.92/2.;
399 par[8] = 0.;
400 par[9] = 0.562/2.;
401 par[10] = -4.1;
402 gMC->Gsvolu("SF1G", "TRAP", idArCO2, par, 11);
403 gMC->Gsvolu("SF2G", "TRAP", idArCO2, par, 11);
404
405 par[0] = fgkHzPadPlane;
406 gMC->Gsvolu("SF1C", "TRAP", idCopper,par, 11);
407
408// section 7 of 11
409 par[0] = fgkHzGas;
410 par[1] = 0.;
411 par[2] = 0.;
412 par[3] = 0.941/2.;
413 par[4] = 0.562/2.;
414 par[5] = 0.;
415 par[6] = -16.6;
416 par[7] = 0.941/2.;
417 par[8] = 0.562/2.;
418 par[9] = 0.;
419 par[10] =-16.6;
420 gMC->Gsvolu("SG1G", "TRAP", idArCO2, par, 11);
421 gMC->Gsvolu("SG2G", "TRAP", idArCO2, par, 11);
422
423 par[0] = fgkHzPadPlane;
424 gMC->Gsvolu("SG1C", "TRAP", idCopper,par, 11);
425
426// section 8 of 11
427 par[0] = fgkHzGas;
428 par[1] = 0.;
429 par[2] = 0.;
430 par[3] = 3.94/2.;
431 par[4] = 0.57/2.;
432 par[5] = 0.;
433 par[6] = 4.14;
434 par[7] = 3.94/2.;
435 par[8] = 0.57/2.;
436 par[9] = 0.;
437 par[10] = 4.14;
438 gMC->Gsvolu("SH1G", "TRAP", idArCO2, par, 11);
439 gMC->Gsvolu("SH2G", "TRAP", idArCO2, par, 11);
440
441 par[0] = fgkHzPadPlane;
442 gMC->Gsvolu("SH1C", "TRAP", idCopper,par, 11);
443
444// section 9 of 11
445 par[0] = fgkHzGas;
446 par[1] = 0.;
447 par[2] = 0.;
448 par[3] = 0.95/2.;
449 par[4] = 0.;
450 par[5] = 0.57/2;
451 par[6] = 16.7;
452 par[7] = 0.95/2.;
453 par[8] = 0.;
454 par[9] = 0.57/2;
455 par[10] = 16.7;
456 gMC->Gsvolu("SI1G", "TRAP", idArCO2, par, 11);
457 gMC->Gsvolu("SI2G", "TRAP", idArCO2, par, 11);
458
459 par[0] = fgkHzPadPlane;
460 gMC->Gsvolu("SI1C", "TRAP", idCopper,par, 11);
461
462// section 10 of 11
463 par[0] = fgkHzGas;
464 par[1] = 0.;
465 par[2] = 0.;
466 par[3] = 1.49/2.;
467 par[4] = 0.;
468 par[5] = 0.817/2.;
469 par[6] = -15.4;
470 par[7] = 1.49/2.;
471 par[8] = 0.;
472 par[9] = 0.817/2.;
473 par[10] = -15.4;
474 gMC->Gsvolu("SJ1G", "TRAP", idArCO2, par, 11);
475 gMC->Gsvolu("SJ2G", "TRAP", idArCO2, par, 11);
476
477 par[0] = fgkHzPadPlane;
478 gMC->Gsvolu("SJ1C", "TRAP", idCopper,par, 11);
479
480// section 11 of 11
481 par[0] = fgkHzGas;
482 par[1] = 0.;
483 par[2] = 0.;
484 par[3] = 5.93/2.;
485 par[4] = 0.;
486 par[5] = 1.49/2.;
487 par[6] = -7.16;
488 par[7] = 5.93/2.;
489 par[8] = 0.;
490 par[9] = 1.49/2.;
491 par[10] = -7.16;
492 gMC->Gsvolu("SK1G", "TRAP", idArCO2, par, 11);
493 gMC->Gsvolu("SK2G", "TRAP", idArCO2, par, 11);
494
495 par[0] = fgkHzPadPlane;
496 gMC->Gsvolu("SK1C", "TRAP", idCopper,par, 11);
ba030c0e 497}
5f91c9e8 498
499//______________________________________________________________________________
d1cd2474 500void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber)
ba030c0e 501{
502// create the quadrant (bending and non-bending planes)
503// for the given chamber
504// --
5f91c9e8 505
ba030c0e 506 CreateFrame(chamber);
507
86488ea7 508#ifdef WITH_STL
d1cd2474 509 SpecialMap specialMap;
e8c253a0 510 specialMap[76] = AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.);
511 specialMap[75] = AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36));
512 specialMap[47] = AliMUONSt1SpecialMotif(TVector2(1.01, 0.36));
d1cd2474 513#endif
514
86488ea7 515#ifdef WITH_ROOT
d1cd2474 516 SpecialMap specialMap;
e8c253a0 517 specialMap.Add(76, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.));
518 specialMap.Add(75, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36)));
519 specialMap.Add(47, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36)));
d1cd2474 520#endif
521
ab126d0a 522 AliMpSectorReader reader1(kStation1, kBendingPlane);
5f91c9e8 523 AliMpSector* sector1 = reader1.BuildSector();
ba030c0e 524
b367fd8f 525 //Bool_t reflectZ = true;
526 Bool_t reflectZ = false;
527 //TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.);
528 TVector3 where = TVector3(fgkDeltaQuadLHC + fgkPadXOffsetBP,
529 fgkDeltaQuadLHC + fgkPadYOffsetBP, 0.);
5f91c9e8 530 PlaceSector(sector1, specialMap, where, reflectZ, chamber);
ba030c0e 531
86488ea7 532#ifdef WITH_STL
ba030c0e 533 specialMap.clear();
e8c253a0 534 specialMap[76] = AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.);
535 specialMap[75] = AliMUONSt1SpecialMotif(TVector2(1.96, 0.17));
b367fd8f 536 specialMap[47] = AliMUONSt1SpecialMotif(TVector2(2.18,-0.98));
e8c253a0 537 specialMap[20] = AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08));
538 specialMap[46] = AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25));
539 specialMap[74] = AliMUONSt1SpecialMotif(TVector2(0.28, 0.21));
b367fd8f 540 // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector
541 // in the true position)
542 // Was: specialMap[47] = AliMUONSt1SpecialMotif(TVector2(1.61,-1.18));
d1cd2474 543#endif
544
86488ea7 545#ifdef WITH_ROOT
4d8c279c 546 Int_t nb = AliMpConstants::ManuMask(kNonBendingPlane);
d1cd2474 547 specialMap.Delete();
4d8c279c 548 specialMap.Add(76 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.));
549 specialMap.Add(75 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.96, 0.17)));
550 specialMap.Add(47 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(2.18,-0.98)));
551 specialMap.Add(20 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08)));
552 specialMap.Add(46 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25)));
553 specialMap.Add(74 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.28, 0.21)));
b367fd8f 554 // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector
555 // in the true position)
556 // Was: specialMap.Add(47,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.61,-1.18)));
d1cd2474 557#endif
558
ab126d0a 559 AliMpSectorReader reader2(kStation1, kNonBendingPlane);
5f91c9e8 560 AliMpSector* sector2 = reader2.BuildSector();
b367fd8f 561
562 //reflectZ = false;
563 reflectZ = true;
ab126d0a 564 TVector2 offset = sector2->Position();
e77b6d6b 565 where = TVector3(where.X()+offset.X(), where.Y()+offset.Y(), 0.);
b367fd8f 566 // Add the half-pad shift of the non-bending plane wrt bending plane
567 // (The shift is defined in the mapping as sector offset)
568 // Fix (4) - was TVector3(where.X()+0.63/2, ... - now it is -0.63/2
5f91c9e8 569 PlaceSector(sector2, specialMap, where, reflectZ, chamber);
d1cd2474 570
86488ea7 571#ifdef WITH_ROOT
d1cd2474 572 specialMap.Delete();
573#endif
ba030c0e 574}
575
5f91c9e8 576//______________________________________________________________________________
d1cd2474 577void AliMUONSt1GeometryBuilderV2::CreateFoamBox(const char* name,const TVector2& dimensions)
ba030c0e 578{
5f91c9e8 579// create all the elements in the copper plane
580// --
ba030c0e 581
d1cd2474 582 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
5f91c9e8 583 Int_t idAir = idtmed[1100]; // medium 1
d1cd2474 584 //Int_t idFoam = idtmed[1115]; // medium 16 = Foam
585 //Int_t idFR4 = idtmed[1114]; // medium 15 = FR4
586 Int_t idFoam = idtmed[1125]; // medium 26 = Foam
587 Int_t idFR4 = idtmed[1122]; // medium 23 = FR4
ba030c0e 588
5f91c9e8 589 // mother volume
590 GReal_t par[3];
591 par[0] = dimensions.X();
592 par[1] = dimensions.Y();
593 par[2] = TotalHzPlane();
594 gMC->Gsvolu(name,"BOX",idAir,par,3);
595
596 // foam layer
597 GReal_t posX,posY,posZ;
598 char eName[5];
599 strcpy(eName,name);
600 eName[3]=fgkFoamLayerSuffix;
601 par[0] = dimensions.X();
602 par[1] = dimensions.Y();
603 par[2] = fgkHzFoam;
604 gMC->Gsvolu(eName,"BOX",idFoam,par,3);
605 posX=0.;
606 posY=0.;
607 posZ = -TotalHzPlane() + fgkHzFoam;
608 gMC->Gspos(eName,1,name,posX,posY,posZ,0,"ONLY");
ba030c0e 609
5f91c9e8 610 // mechanical plane FR4 layer
611 eName[3]='R';
612 par[0] = dimensions.X();
613 par[1] = dimensions.Y();
614 par[2] = fgkHzFR4;
615 gMC->Gsvolu(eName,"BOX",idFR4,par,3);
616 posX=0.;
617 posY=0.;
618 posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4;
619 gMC->Gspos(eName,1,name,posX,posY,posZ,0,"ONLY");
620}
ba030c0e 621
5f91c9e8 622//______________________________________________________________________________
d1cd2474 623void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(const char* name,const TVector2& dimensions,
5f91c9e8 624 Int_t nofHoles)
625{
626// Create a segment of a plane (this includes a foam layer,
627// holes in the foam to feed the kaptons through, kapton connectors
628// and the mother board.)
629// --
ba030c0e 630
5f91c9e8 631 CreateFoamBox(name,dimensions);
ba030c0e 632
5f91c9e8 633 char eName[5];
634 strcpy(eName,name);
635 eName[3]=fgkFoamLayerSuffix;
ba030c0e 636
5f91c9e8 637 for (Int_t holeNum=0;holeNum<nofHoles;holeNum++) {
638 GReal_t posX = ((2.*holeNum+1.)/nofHoles-1.)*dimensions.X();
639 GReal_t posY = 0.;
640 GReal_t posZ = 0.;
ba030c0e 641
5f91c9e8 642 gMC->Gspos(fgkHoleName,holeNum+1,eName,posX,posY,posZ,0,"ONLY");
643 }
ba030c0e 644}
645
5f91c9e8 646//______________________________________________________________________________
d1cd2474 647void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber)
ba030c0e 648{
649// Create the non-sensitive elements of the frame for the <chamber>
5f91c9e8 650//
651//
652// Model and notation:
653//
654// The Quadrant volume name starts with SQ
655// The volume segments are numbered 00 to XX.
656//
657// OutTopFrame
658// (SQ02-16)
659// ------------
660// OutEdgeFrame / |
661// (SQ17-24) / | InVFrame (SQ00-01)
662// / |
663// | |
664// OutVFrame | _- -
665// (SQ25-39) | | InArcFrame (SQ42-45)
666// | |
667// -------------
668// InHFrame (SQ40-41)
669//
670//
671// 06 February 2003 - Overlapping volumes resolved.
672// One quarter chamber is comprised of three TUBS volumes: SQMx, SQNx, and SQFx,
673// where SQMx is the Quadrant Middle layer for chamber <x> ( posZ in [-3.25,3.25]),
674// SQNx is the Quadrant Near side layer for chamber <x> ( posZ in [-6.25,3-.25) ), and
675// SQFx is the Quadrant Far side layer for chamber <x> ( posZ in (3.25,6.25] ).
676//---
ba030c0e 677
d1cd2474 678 const Float_t kNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin
ba030c0e 679
ba030c0e 680 // tracking medias
d1cd2474 681 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
5f91c9e8 682
ba030c0e 683 Int_t idAir = idtmed[1100]; // medium 1
d1cd2474 684 //Int_t idFrameEpoxy = idtmed[1115]; // medium 16 = Frame Epoxy ME730
685 //Int_t idInox = idtmed[1116]; // medium 17 Stainless Steel (18%Cr,9%Ni,Fe)
686 //Int_t idFR4 = idtmed[1110]; // medium 11 FR4
687 //Int_t idCopper = idtmed[1109]; // medium 10 Copper
688 //Int_t idAlu = idtmed[1103]; // medium 4 Aluminium
689 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
690 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
691 Int_t idFR4 = idtmed[1122]; // medium 23 FR4 // was 15 not 11
692 Int_t idCopper = idtmed[1121]; // medium 22 Copper
693 Int_t idAlu = idtmed[1120]; // medium 21 Aluminium
5f91c9e8 694
695
696// Rotation Matrices
697 Int_t rot1, rot2, rot3;
698
699// Rotation matrices
d1cd2474 700 fMUON->AliMatrix(rot1, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane
701 fMUON->AliMatrix(rot2, 90., 45., 90., 135., 0., 0.); // +45 deg in x-y plane
702 fMUON->AliMatrix(rot3, 90., 45., 90., 315.,180., 0.); // +45 deg in x-y + rotation 180° around y
5f91c9e8 703
704// Translation matrices ... NOT USED
d1cd2474 705// fMUON->AliMatrix(trans1, 90., 0., 90., 90., 0., 0.); // X-> X; Y -> Y; Z -> Z
706// fMUON->AliMatrix(trans2, 90., 180., 90., 90., 180., 0.); // X->-X; Y -> Y; Z ->-Z
707// fMUON->AliMatrix(trans3, 90., 180., 90., 270., 0., 0.); // X->-X; Y ->-Y; Z -> Z
708// fMUON->AliMatrix(trans4, 90., 0., 90., 270., 180., 0.); // X-> X; Y ->-Y; Z ->-Z
ba030c0e 709//
5f91c9e8 710 // ___________________Volume thicknesses________________________
ba030c0e 711
d1cd2474 712 const Float_t kHzFrameThickness = 1.59/2.; //equivalent thickness
713 const Float_t kHzOuterFrameEpoxy = 1.19/2.; //equivalent thickness
714 const Float_t kHzOuterFrameInox = 0.1/2.; //equivalent thickness
715 const Float_t kHzFoam = 2.083/2.; //evaluated elsewhere
716 // CHECK with fgkHzFoam
5f91c9e8 717
718// Pertaining to the top outer area
d1cd2474 719 const Float_t kHzTopAnodeSteel1 = 0.185/2.; //equivalent thickness
720 const Float_t kHzTopAnodeSteel2 = 0.51/2.; //equivalent thickness
721 const Float_t kHzAnodeFR4 = 0.08/2.; //equivalent thickness
722 const Float_t kHzTopEarthFaceCu = 0.364/2.; //equivalent thickness
723 const Float_t kHzTopEarthProfileCu = 1.1/2.; //equivalent thickness
724 const Float_t kHzTopPositionerSteel = 1.45/2.; //should really be 2.125/2.;
725 const Float_t kHzTopGasSupportAl = 0.85/2.; //equivalent thickness
5f91c9e8 726
727// Pertaining to the vertical outer area
d1cd2474 728 const Float_t kHzVerticalCradleAl = 0.8/2.; //equivalent thickness
729 const Float_t kHzLateralSightAl = 0.975/2.; //equivalent thickness
730 const Float_t kHzLateralPosnInoxFace = 2.125/2.;//equivalent thickness
731 const Float_t kHzLatPosInoxProfM = 6.4/2.; //equivalent thickness
732 const Float_t kHzLatPosInoxProfNF = 1.45/2.; //equivalent thickness
733 const Float_t kHzLateralPosnAl = 0.5/2.; //equivalent thickness
734 const Float_t kHzVertEarthFaceCu = 0.367/2.; //equivalent thickness
735 const Float_t kHzVertBarSteel = 0.198/2.; //equivalent thickness
736 const Float_t kHzVertEarthProfCu = 1.1/2.; //equivalent thickness
5f91c9e8 737
738 //_______________Parameter definitions in sequence _________
739
740// InVFrame parameters
d1cd2474 741 const Float_t kHxInVFrame = 1.85/2.;
742 const Float_t kHyInVFrame = 73.95/2.;
743 const Float_t kHzInVFrame = kHzFrameThickness;
ba030c0e 744
5f91c9e8 745//Flat 7.5mm vertical section
d1cd2474 746 const Float_t kHxV1mm = 0.75/2.;
747 const Float_t kHyV1mm = 1.85/2.;
748 const Float_t kHzV1mm = kHzFrameThickness;
ba030c0e 749
5f91c9e8 750// OuterTopFrame Structure
751//
752// FRAME
753// The frame is composed of a cuboid and two trapezoids
754// (TopFrameAnode, TopFrameAnodeA, TopFrameAnodeB).
755// Each shape is composed of two layers (Epoxy and Inox) and
756// takes the frame's inner anode circuitry into account in the material budget.
757//
758// ANODE
759// The overhanging anode part is composed froma cuboid and two trapezoids
760// (TopAnode, TopAnode1, and TopAnode2). These surfaces neglect implanted
761// resistors, but accounts for the major Cu, Pb/Sn, and FR4 material
762// contributions.
763// The stainless steel anode supports have been included.
764//
765// EARTHING (TopEarthFace, TopEarthProfile)
766// Al GAS SUPPORT (TopGasSupport)
767//
768// ALIGNMENT (TopPositioner) - Alignment system, three sights per quarter
769// chamber. This sight is forseen for the alignment of the horizontal level
770// (parallel to the OY axis of LHC). Its position will be evaluated relative
771// to a system of sights places on the cradles;
772//
773//---
ba030c0e 774
5f91c9e8 775//TopFrameAnode parameters - cuboid, 2 layers
d1cd2474 776 const Float_t kHxTFA = 34.1433/2.;
777 const Float_t kHyTFA = 7.75/2.;
778 const Float_t kHzTFAE = kHzOuterFrameEpoxy; // layer 1 thickness
779 const Float_t kHzTFAI = kHzOuterFrameInox; // layer 3 thickness
ba030c0e 780
5f91c9e8 781// TopFrameAnodeA parameters - trapezoid, 2 layers
d1cd2474 782 const Float_t kHzFAAE = kHzOuterFrameEpoxy; // layer 1 thickness
783 const Float_t kHzFAAI = kHzOuterFrameInox; // layer 3 thickness
784 const Float_t kTetFAA = 0.;
785 const Float_t kPhiFAA = 0.;
786 const Float_t kH1FAA = 8.7/2.;
787 const Float_t kBl1FAA = 4.35/2.;
788 const Float_t kTl1FAA = 7.75/2.;
789 const Float_t kAlp1FAA = 11.06;
790 const Float_t kH2FAA = 8.7/2.;
791 const Float_t kBl2FAA = 4.35/2.;
792 const Float_t kTl2FAA = 7.75/2.;
793 const Float_t kAlp2FAA = 11.06;
ba030c0e 794
5f91c9e8 795// TopFrameAnodeB parameters - trapezoid, 2 layers
d1cd2474 796 const Float_t kHzFABE = kHzOuterFrameEpoxy; // layer 1 thickness
797 const Float_t kHzFABI = kHzOuterFrameInox; // layer 3 thickness
798 const Float_t kTetFAB = 0.;
799 const Float_t kPhiFAB = 0.;
800 const Float_t kH1FAB = 8.70/2.;
801 const Float_t kBl1FAB = 0.;
802 const Float_t kTl1FAB = 4.35/2.;
803 const Float_t kAlp1FAB = 14.03;
804 const Float_t kH2FAB = 8.70/2.;
805 const Float_t kBl2FAB = 0.;
806 const Float_t kTl2FAB = 4.35/2.;
807 const Float_t kAlp2FAB = 14.03;
ba030c0e 808
5f91c9e8 809// TopAnode parameters - cuboid (part 1 of 3 parts)
d1cd2474 810 const Float_t kHxTA1 = 16.2/2.;
811 const Float_t kHyTA1 = 3.5/2.;
812 const Float_t kHzTA11 = kHzTopAnodeSteel1; // layer 1
813 const Float_t kHzTA12 = kHzAnodeFR4; // layer 2
5f91c9e8 814
815// TopAnode parameters - trapezoid 1 (part 2 of 3 parts)
d1cd2474 816 const Float_t kHzTA21 = kHzTopAnodeSteel2; // layer 1
817 const Float_t kHzTA22 = kHzAnodeFR4; // layer 2
818 const Float_t kTetTA2 = 0.;
819 const Float_t kPhiTA2= 0.;
820 const Float_t kH1TA2 = 7.268/2.;
821 const Float_t kBl1TA2 = 2.03/2.;
822 const Float_t kTl1TA2 = 3.5/2.;
823 const Float_t kAlp1TA2 = 5.78;
824 const Float_t kH2TA2 = 7.268/2.;
825 const Float_t kBl2TA2 = 2.03/2.;
826 const Float_t kTl2TA2 = 3.5/2.;
827 const Float_t kAlp2TA2 = 5.78;
5f91c9e8 828
829// TopAnode parameters - trapezoid 2 (part 3 of 3 parts)
d1cd2474 830 const Float_t kHzTA3 = kHzAnodeFR4; // layer 1
831 const Float_t kTetTA3 = 0.;
832 const Float_t kPhiTA3 = 0.;
833 const Float_t kH1TA3 = 7.268/2.;
834 const Float_t kBl1TA3 = 0.;
835 const Float_t kTl1TA3 = 2.03/2.;
836 const Float_t kAlp1TA3 = 7.95;
837 const Float_t kH2TA3 = 7.268/2.;
838 const Float_t kBl2TA3 = 0.;
839 const Float_t kTl2TA3 = 2.03/2.;
840 const Float_t kAlp2TA3 = 7.95;
ba030c0e 841
5f91c9e8 842// TopEarthFace parameters - single trapezoid
d1cd2474 843 const Float_t kHzTEF = kHzTopEarthFaceCu;
844 const Float_t kTetTEF = 0.;
845 const Float_t kPhiTEF = 0.;
846 const Float_t kH1TEF = 1.200/2.;
847 const Float_t kBl1TEF = 21.323/2.;
848 const Float_t kTl1TEF = 17.963/2.;
849 const Float_t kAlp1TEF = -54.46;
850 const Float_t kH2TEF = 1.200/2.;
851 const Float_t kBl2TEF = 21.323/2.;
852 const Float_t kTl2TEF = 17.963/2.;
853 const Float_t kAlp2TEF = -54.46;
5f91c9e8 854
855// TopEarthProfile parameters - single trapezoid
d1cd2474 856 const Float_t kHzTEP = kHzTopEarthProfileCu;
857 const Float_t kTetTEP = 0.;
858 const Float_t kPhiTEP = 0.;
859 const Float_t kH1TEP = 0.40/2.;
860 const Float_t kBl1TEP = 31.766/2.;
861 const Float_t kTl1TEP = 30.535/2.;
862 const Float_t kAlp1TEP = -56.98;
863 const Float_t kH2TEP = 0.40/2.;
864 const Float_t kBl2TEP = 31.766/2.;
865 const Float_t kTl2TEP = 30.535/2.;
866 const Float_t kAlp2TEP = -56.98;
5f91c9e8 867
868// TopPositioner parameters - single Stainless Steel trapezoid
d1cd2474 869 const Float_t kHzTP = kHzTopPositionerSteel;
870 const Float_t kTetTP = 0.;
871 const Float_t kPhiTP = 0.;
872 const Float_t kH1TP = 3.00/2.;
873 const Float_t kBl1TP = 7.023/2.;
874 const Float_t kTl1TP = 7.314/2.;
875 const Float_t kAlp1TP = 2.78;
876 const Float_t kH2TP = 3.00/2.;
877 const Float_t kBl2TP = 7.023/2.;
878 const Float_t kTl2TP = 7.314/2.;
879 const Float_t kAlp2TP = 2.78;
5f91c9e8 880
881// TopGasSupport parameters - single cuboid
d1cd2474 882 const Float_t kHxTGS = 8.50/2.;
883 const Float_t kHyTGS = 3.00/2.;
884 const Float_t kHzTGS = kHzTopGasSupportAl;
5f91c9e8 885
886// OutEdgeFrame parameters - 4 trapezoidal sections, 2 layers of material
887//
888//---
889
890// Trapezoid 1
d1cd2474 891 const Float_t kHzOETFE = kHzOuterFrameEpoxy; // layer 1
892 const Float_t kHzOETFI = kHzOuterFrameInox; // layer 3
ba030c0e 893
d1cd2474 894 const Float_t kTetOETF = 0.; // common to all 4 trapezoids
895 const Float_t kPhiOETF = 0.; // common to all 4 trapezoids
5f91c9e8 896
d1cd2474 897 const Float_t kH1OETF = 7.196/2.; // common to all 4 trapezoids
898 const Float_t kH2OETF = 7.196/2.; // common to all 4 trapezoids
5f91c9e8 899
d1cd2474 900 const Float_t kBl1OETF1 = 3.75/2;
901 const Float_t kTl1OETF1 = 3.996/2.;
902 const Float_t kAlp1OETF1 = 0.98;
5f91c9e8 903
d1cd2474 904 const Float_t kBl2OETF1 = 3.75/2;
905 const Float_t kTl2OETF1 = 3.996/2.;
906 const Float_t kAlp2OETF1 = 0.98;
5f91c9e8 907
908// Trapezoid 2
d1cd2474 909 const Float_t kBl1OETF2 = 3.01/2.;
910 const Float_t kTl1OETF2 = 3.75/2;
911 const Float_t kAlp1OETF2 = 2.94;
5f91c9e8 912
d1cd2474 913 const Float_t kBl2OETF2 = 3.01/2.;
914 const Float_t kTl2OETF2 = 3.75/2;
915 const Float_t kAlp2OETF2 = 2.94;
5f91c9e8 916
917// Trapezoid 3
b367fd8f 918 //const Float_t kBl1OETF3 = 1.767/2.;
919 //const Float_t kTl1OETF3 = 3.01/2.;
920 const Float_t kBl1OETF3 = 1.117/2.;
921 const Float_t kTl1OETF3 = 2.36/2.;
d1cd2474 922 const Float_t kAlp1OETF3 = 4.94;
b367fd8f 923 // Fix (5) - overlap of SQ21 with 041M and 125M
ba030c0e 924
b367fd8f 925 //const Float_t kBl2OETF3 = 1.767/2.;
926 //const Float_t kTl2OETF3 = 3.01/2.;
927 const Float_t kBl2OETF3 = 1.117/2.;
928 const Float_t kTl2OETF3 = 2.36/2.;
d1cd2474 929 const Float_t kAlp2OETF3 = 4.94;
b367fd8f 930 // Fix (5) - overlap of SQ21 with 041M and 125M
ba030c0e 931
5f91c9e8 932// Trapezoid 4
d1cd2474 933 const Float_t kBl1OETF4 = 0.;
934 const Float_t kTl1OETF4 = 1.77/2.;
935 const Float_t kAlp1OETF4 = 7.01;
ba030c0e 936
d1cd2474 937 const Float_t kBl2OETF4 = 0.;
938 const Float_t kTl2OETF4 = 1.77/2.;
939 const Float_t kAlp2OETF4 = 7.01;
5f91c9e8 940
941// Frame Structure (OutVFrame):
942//
943// OutVFrame and corner (OutVFrame cuboid, OutVFrame trapezoid)
944// EARTHING (VertEarthFaceCu,VertEarthSteel,VertEarthProfCu),
945// DETECTOR POSITIONNING (SuppLateralPositionner, LateralPositionner),
946// CRADLE (VertCradle), and
947// ALIGNMENT (LateralSightSupport, LateralSight)
948//
949//---
950
951// OutVFrame parameters - cuboid
d1cd2474 952 const Float_t kHxOutVFrame = 1.85/2.;
953 const Float_t kHyOutVFrame = 46.23/2.;
954 const Float_t kHzOutVFrame = kHzFrameThickness;
5f91c9e8 955
956// OutVFrame corner parameters - trapezoid
d1cd2474 957 const Float_t kHzOCTF = kHzFrameThickness;
958 const Float_t kTetOCTF = 0.;
959 const Float_t kPhiOCTF = 0.;
960 const Float_t kH1OCTF = 1.85/2.;
961 const Float_t kBl1OCTF = 0.;
962 const Float_t kTl1OCTF = 3.66/2.;
963 const Float_t kAlp1OCTF = 44.67;
964 const Float_t kH2OCTF = 1.85/2.;
965 const Float_t kBl2OCTF = 0.;
966 const Float_t kTl2OCTF = 3.66/2.;
967 const Float_t kAlp2OCTF = 44.67;
5f91c9e8 968
969// VertEarthFaceCu parameters - single trapezoid
d1cd2474 970 const Float_t kHzVFC = kHzVertEarthFaceCu;
971 const Float_t kTetVFC = 0.;
972 const Float_t kPhiVFC = 0.;
973 const Float_t kH1VFC = 1.200/2.;
974 const Float_t kBl1VFC = 46.11/2.;
975 const Float_t kTl1VFC = 48.236/2.;
976 const Float_t kAlp1VFC = 41.54;
977 const Float_t kH2VFC = 1.200/2.;
978 const Float_t kBl2VFC = 46.11/2.;
979 const Float_t kTl2VFC = 48.236/2.;
980 const Float_t kAlp2VFC = 41.54;
5f91c9e8 981
982// VertEarthSteel parameters - single trapezoid
d1cd2474 983 const Float_t kHzVES = kHzVertBarSteel;
984 const Float_t kTetVES = 0.;
985 const Float_t kPhiVES = 0.;
986 const Float_t kH1VES = 1.200/2.;
987 const Float_t kBl1VES = 30.486/2.;
988 const Float_t kTl1VES = 32.777/2.;
989 const Float_t kAlp1VES = 43.67;
990 const Float_t kH2VES = 1.200/2.;
991 const Float_t kBl2VES = 30.486/2.;
992 const Float_t kTl2VES = 32.777/2.;
993 const Float_t kAlp2VES = 43.67;
5f91c9e8 994
995// VertEarthProfCu parameters - single trapezoid
d1cd2474 996 const Float_t kHzVPC = kHzVertEarthProfCu;
997 const Float_t kTetVPC = 0.;
998 const Float_t kPhiVPC = 0.;
999 const Float_t kH1VPC = 0.400/2.;
1000 const Float_t kBl1VPC = 29.287/2.;
1001 const Float_t kTl1VPC = 30.091/2.;
1002 const Float_t kAlp1VPC = 45.14;
1003 const Float_t kH2VPC = 0.400/2.;
1004 const Float_t kBl2VPC = 29.287/2.;
1005 const Float_t kTl2VPC = 30.091/2.;
1006 const Float_t kAlp2VPC = 45.14;
5f91c9e8 1007
1008// SuppLateralPositionner - single cuboid
d1cd2474 1009 const Float_t kHxSLP = 2.80/2.;
1010 const Float_t kHySLP = 5.00/2.;
1011 const Float_t kHzSLP = kHzLateralPosnAl;
5f91c9e8 1012
1013// LateralPositionner - squared off U bend, face view
d1cd2474 1014 const Float_t kHxLPF = 5.2/2.;
1015 const Float_t kHyLPF = 3.0/2.;
1016 const Float_t kHzLPF = kHzLateralPosnInoxFace;
5f91c9e8 1017
1018// LateralPositionner - squared off U bend, profile view
d1cd2474 1019 const Float_t kHxLPP = 0.425/2.;
1020 const Float_t kHyLPP = 3.0/2.;
1021 const Float_t kHzLPP = kHzLatPosInoxProfM; // middle layer
1022 const Float_t kHzLPNF = kHzLatPosInoxProfNF; // near and far layers
5f91c9e8 1023
1024// VertCradle, 3 layers (copies), each composed of 4 trapezoids
1025// VertCradleA
d1cd2474 1026 const Float_t kHzVC1 = kHzVerticalCradleAl;
1027 const Float_t kTetVC1 = 0.;
1028 const Float_t kPhiVC1 = 0.;
1029 const Float_t kH1VC1 = 10.25/2.;
1030 const Float_t kBl1VC1 = 3.70/2.;
1031 const Float_t kTl1VC1 = 0.;
1032 const Float_t kAlp1VC1 = -10.23;
1033 const Float_t kH2VC1 = 10.25/2.;
1034 const Float_t kBl2VC1 = 3.70/2.;
1035 const Float_t kTl2VC1 = 0.;
1036 const Float_t kAlp2VC1 = -10.23;
5f91c9e8 1037
1038// VertCradleB
d1cd2474 1039 const Float_t kHzVC2 = kHzVerticalCradleAl;
1040 const Float_t kTetVC2 = 0.;
1041 const Float_t kPhiVC2 = 0.;
1042 const Float_t kH1VC2 = 10.25/2.;
1043 const Float_t kBl1VC2 = 6.266/2.;
1044 const Float_t kTl1VC2 = 3.70/2.;
1045 const Float_t kAlp1VC2 = -7.13;
1046 const Float_t kH2VC2 = 10.25/2.;
1047 const Float_t kBl2VC2 = 6.266/2.;
1048 const Float_t kTl2VC2 = 3.70/2.;
1049 const Float_t kAlp2VC2 = -7.13;
5f91c9e8 1050
1051// VertCradleC
d1cd2474 1052 const Float_t kHzVC3 = kHzVerticalCradleAl;
1053 const Float_t kTetVC3 = 0.;
1054 const Float_t kPhiVC3 = 0.;
1055 const Float_t kH1VC3 = 10.25/2.;
1056 const Float_t kBl1VC3 = 7.75/2.;
1057 const Float_t kTl1VC3 = 6.266/2.;
1058 const Float_t kAlp1VC3 = -4.14;
1059 const Float_t kH2VC3 = 10.25/2.;
1060 const Float_t kBl2VC3 = 7.75/2.;
1061 const Float_t kTl2VC3 = 6.266/2.;
1062 const Float_t kAlp2VC3 = -4.14;
5f91c9e8 1063
1064// VertCradleD
d1cd2474 1065 const Float_t kHzVC4 = kHzVerticalCradleAl;
1066 const Float_t kTetVC4 = 0.;
1067 const Float_t kPhiVC4 = 0.;
1068 const Float_t kH1VC4 = 10.27/2.;
1069 const Float_t kBl1VC4 = 8.273/2.;
1070 const Float_t kTl1VC4 = 7.75/2.;
1071 const Float_t kAlp1VC4 = -1.46;
1072 const Float_t kH2VC4 = 10.27/2.;
1073 const Float_t kBl2VC4 = 8.273/2.;
1074 const Float_t kTl2VC4 = 7.75/2.;
1075 const Float_t kAlp2VC4 = -1.46;
5f91c9e8 1076
1077// LateralSightSupport - single trapezoid
d1cd2474 1078 const Float_t kHzVSS = kHzLateralSightAl;
1079 const Float_t kTetVSS = 0.;
1080 const Float_t kPhiVSS = 0.;
1081 const Float_t kH1VSS = 5.00/2.;
1082 const Float_t kBl1VSS = 7.747/2;
1083 const Float_t kTl1VSS = 7.188/2.;
1084 const Float_t kAlp1VSS = -3.20;
1085 const Float_t kH2VSS = 5.00/2.;
1086 const Float_t kBl2VSS = 7.747/2.;
1087 const Float_t kTl2VSS = 7.188/2.;
1088 const Float_t kAlp2VSS = -3.20;
5f91c9e8 1089
1090// LateralSight (reference point) - 3 per quadrant, only 1 programmed for now
d1cd2474 1091 const Float_t kVSInRad = 0.6;
1092 const Float_t kVSOutRad = 1.3;
1093 const Float_t kVSLen = kHzFrameThickness;
5f91c9e8 1094
1095//---
ba030c0e 1096
5f91c9e8 1097// InHFrame parameters
d1cd2474 1098 const Float_t kHxInHFrame = 75.8/2.;
1099 const Float_t kHyInHFrame = 1.85/2.;
1100 const Float_t kHzInHFrame = kHzFrameThickness;
5f91c9e8 1101
1102//Flat 7.5mm horizontal section
d1cd2474 1103 const Float_t kHxH1mm = 1.85/2.;
1104 const Float_t kHyH1mm = 0.75/2.;
1105 const Float_t kHzH1mm = kHzFrameThickness;
ba030c0e 1106
5f91c9e8 1107//---
ba030c0e 1108
5f91c9e8 1109// InArcFrame parameters
d1cd2474 1110 const Float_t kIAF = 15.70;
1111 const Float_t kOAF = 17.55;
1112 const Float_t kHzAF = kHzFrameThickness;
1113 const Float_t kAFphi1 = 0.0;
1114 const Float_t kAFphi2 = 90.0;
ba030c0e 1115
5f91c9e8 1116//---
ba030c0e 1117
5f91c9e8 1118// ScrewsInFrame parameters HEAD
d1cd2474 1119 const Float_t kSCRUHMI = 0.;
1120 const Float_t kSCRUHMA = 0.690/2.;
1121 const Float_t kSCRUHLE = 0.4/2.;
5f91c9e8 1122// ScrewsInFrame parameters MIDDLE
d1cd2474 1123 const Float_t kSCRUMMI = 0.;
1124 const Float_t kSCRUMMA = 0.39/2.;
1125 const Float_t kSCRUMLE = kHzFrameThickness;
5f91c9e8 1126// ScrewsInFrame parameters NUT
d1cd2474 1127 const Float_t kSCRUNMI = 0.;
1128 const Float_t kSCRUNMA = 0.78/2.;
1129 const Float_t kSCRUNLE = 0.8/2.;
5f91c9e8 1130
1131 // ___________________Make volumes________________________
ba030c0e 1132
5f91c9e8 1133 Float_t par[11];
1134 Float_t posX,posY,posZ;
ba030c0e 1135
5f91c9e8 1136// Quadrant volume TUBS1, positioned at the end
1137 par[0] = fgkMotherIR1;
1138 par[1] = fgkMotherOR1;
1139 par[2] = fgkMotherThick1;
1140 par[3] = fgkMotherPhiL1;
1141 par[4] = fgkMotherPhiU1;
1142 gMC->Gsvolu(QuadrantMLayerName(chamber),"TUBS",idAir,par,5);
ba030c0e 1143
91111b9c 1144// Replace the volume shape with a composite shape
1145// with substracted overlap with beam shield (YMOT)
1146
1147 if ( gMC->IsRootGeometrySupported() &&
1148 TString(gMC->ClassName()) != "TGeant4") {
1149
1150 // Get shape
1151 TGeoVolume* mlayer
1152 = gGeoManager->FindVolumeFast(QuadrantMLayerName(chamber));
1153 if ( !mlayer ) {
1154 AliErrorStream()
1155 << "Quadrant volume " << QuadrantMLayerName(chamber) << " not found"
1156 << endl;
1157 }
1158 else {
1159 TGeoShape* quadrant = mlayer->GetShape();
1160 quadrant->SetName("quadrant");
1161
1162 // Beam shield recess
1163 par[0] = 0;
1164 par[1] = 15.4;
1165 par[2] = fgkMotherThick1;
1166 new TGeoTube("shield_tube", par[0], par[1], par[2]);
1167
1168 // Displacement
1169 posX = 2.6;
1170 posY = 2.6;
1171 posZ = 0;
1172 TGeoTranslation* displacement
1173 = new TGeoTranslation("TR", posX, posY, posZ);
1174 displacement->RegisterYourself();
1175
1176 // Composite shape
1177 TGeoShape* composite
1178 = new TGeoCompositeShape("composite", "quadrant-shield_tube:TR");
1179
1180 // Reset shape to volume
1181 mlayer->SetShape(composite);
1182 }
1183 }
1184
5f91c9e8 1185// Quadrant volume TUBS2, positioned at the end
1186 par[0] = fgkMotherIR2;
1187 par[1] = fgkMotherOR2;
1188 par[2] = fgkMotherThick2;
1189 par[3] = fgkMotherPhiL2;
1190 par[4] = fgkMotherPhiU2;
ba030c0e 1191
5f91c9e8 1192 gMC->Gsvolu(QuadrantNLayerName(chamber),"TUBS",idAir,par,5);
1193 gMC->Gsvolu(QuadrantFLayerName(chamber),"TUBS",idAir,par,5);
ba030c0e 1194
5f91c9e8 1195 if (chamber==1) {
1196 // InVFrame
d1cd2474 1197 par[0] = kHxInVFrame;
1198 par[1] = kHyInVFrame;
1199 par[2] = kHzInVFrame;
5f91c9e8 1200 gMC->Gsvolu("SQ00","BOX",idFrameEpoxy,par,3);
1201
1202 //Flat 1mm vertical section
d1cd2474 1203 par[0] = kHxV1mm;
1204 par[1] = kHyV1mm;
1205 par[2] = kHzV1mm;
5f91c9e8 1206 gMC->Gsvolu("SQ01","BOX",idFrameEpoxy,par,3);
1207
1208// OutTopFrame
1209//
1210// - 3 components (a cuboid and 2 trapezes) and 2 layers (Epoxy/Inox)
1211//
1212//---
ba030c0e 1213
5f91c9e8 1214 // TopFrameAnode - layer 1 of 2
d1cd2474 1215 par[0] = kHxTFA;
1216 par[1] = kHyTFA;
1217 par[2] = kHzTFAE;
5f91c9e8 1218 gMC->Gsvolu("SQ02","BOX",idFrameEpoxy,par,3);
1219
1220 // TopFrameAnode - layer 2 of 2
d1cd2474 1221 par[2] = kHzTFAI;
5f91c9e8 1222 gMC->Gsvolu("SQ03","BOX",idInox,par,3);
1223
1224 // TopFrameAnodeA - layer 1 of 2
d1cd2474 1225 par[0] = kHzFAAE;
1226 par[1] = kTetFAA;
1227 par[2] = kPhiFAA;
1228 par[3] = kH1FAA;
1229 par[4] = kBl1FAA;
1230 par[5] = kTl1FAA;
1231 par[6] = kAlp1FAA;
1232 par[7] = kH2FAA;
1233 par[8] = kBl2FAA;
1234 par[9] = kTl2FAA;
1235 par[10] = kAlp2FAA;
5f91c9e8 1236 gMC->Gsvolu("SQ04","TRAP",idFrameEpoxy,par,11);
1237
1238 // TopFrameAnodeA - layer 2 of 2
d1cd2474 1239 par[0] = kHzFAAI;
5f91c9e8 1240 gMC->Gsvolu("SQ05","TRAP",idInox,par,11);
ba030c0e 1241
5f91c9e8 1242 // TopFrameAnodeB - layer 1 of 2
d1cd2474 1243 par[0] = kHzFABE;
1244 par[1] = kTetFAB;
1245 par[2] = kPhiFAB;
1246 par[3] = kH1FAB;
1247 par[4] = kBl1FAB;
1248 par[5] = kTl1FAB;
1249 par[6] = kAlp1FAB;
1250 par[7] = kH2FAB;
1251 par[8] = kBl2FAB;
1252 par[9] = kTl2FAB;
1253 par[10] = kAlp2FAB;
5f91c9e8 1254 gMC->Gsvolu("SQ06","TRAP",idFrameEpoxy,par,11);
1255
1256 // OutTopTrapFrameB - layer 2 of 2
d1cd2474 1257 par[0] = kHzFABI;
5f91c9e8 1258 gMC->Gsvolu("SQ07","TRAP",idInox,par,11);
1259
1260 // TopAnode1 - layer 1 of 2
d1cd2474 1261 par[0] = kHxTA1;
1262 par[1] = kHyTA1;
1263 par[2] = kHzTA11;
5f91c9e8 1264 gMC->Gsvolu("SQ08","BOX",idInox,par,3);
1265
1266 // TopAnode1 - layer 2 of 2
d1cd2474 1267 par[2] = kHzTA12;
5f91c9e8 1268 gMC->Gsvolu("SQ09","BOX",idFR4,par,11);
1269
1270 // TopAnode2 - layer 1 of 2
d1cd2474 1271 par[0] = kHzTA21;
1272 par[1] = kTetTA2;
1273 par[2] = kPhiTA2;
1274 par[3] = kH1TA2;
1275 par[4] = kBl1TA2;
1276 par[5] = kTl1TA2;
1277 par[6] = kAlp1TA2;
1278 par[7] = kH2TA2;
1279 par[8] = kBl2TA2;
1280 par[9] = kTl2TA2;
1281 par[10] = kAlp2TA2;
5f91c9e8 1282 gMC->Gsvolu("SQ10","TRAP",idInox,par,11);
1283
1284 // TopAnode2 - layer 2 of 2
d1cd2474 1285 par[0] = kHzTA22;
5f91c9e8 1286 gMC->Gsvolu("SQ11","TRAP",idFR4,par,11);
1287
1288 // TopAnode3 - layer 1 of 1
d1cd2474 1289 par[0] = kHzTA3;
1290 par[1] = kTetTA3;
1291 par[2] = kPhiTA3;
1292 par[3] = kH1TA3;
1293 par[4] = kBl1TA3;
1294 par[5] = kTl1TA3;
1295 par[6] = kAlp1TA3;
1296 par[7] = kH2TA3;
1297 par[8] = kBl2TA3;
1298 par[9] = kTl2TA3;
1299 par[10] = kAlp2TA3;
5f91c9e8 1300 gMC->Gsvolu("SQ12","TRAP",idFR4,par,11);
1301
1302 // TopEarthFace
d1cd2474 1303 par[0] = kHzTEF;
1304 par[1] = kTetTEF;
1305 par[2] = kPhiTEF;
1306 par[3] = kH1TEF;
1307 par[4] = kBl1TEF;
1308 par[5] = kTl1TEF;
1309 par[6] = kAlp1TEF;
1310 par[7] = kH2TEF;
1311 par[8] = kBl2TEF;
1312 par[9] = kTl2TEF;
1313 par[10] = kAlp2TEF;
5f91c9e8 1314 gMC->Gsvolu("SQ13","TRAP",idCopper,par,11);
1315
1316 // TopEarthProfile
d1cd2474 1317 par[0] = kHzTEP;
1318 par[1] = kTetTEP;
1319 par[2] = kPhiTEP;
1320 par[3] = kH1TEP;
1321 par[4] = kBl1TEP;
1322 par[5] = kTl1TEP;
1323 par[6] = kAlp1TEP;
1324 par[7] = kH2TEP;
1325 par[8] = kBl2TEP;
1326 par[9] = kTl2TEP;
1327 par[10] = kAlp2TEP;
5f91c9e8 1328 gMC->Gsvolu("SQ14","TRAP",idCopper,par,11);
1329
1330 // TopGasSupport
d1cd2474 1331 par[0] = kHxTGS;
1332 par[1] = kHyTGS;
1333 par[2] = kHzTGS;
5f91c9e8 1334 gMC->Gsvolu("SQ15","BOX",idAlu,par,3);
1335
1336 // TopPositioner parameters - single Stainless Steel trapezoid
d1cd2474 1337 par[0] = kHzTP;
1338 par[1] = kTetTP;
1339 par[2] = kPhiTP;
1340 par[3] = kH1TP;
1341 par[4] = kBl1TP;
1342 par[5] = kTl1TP;
1343 par[6] = kAlp1TP;
1344 par[7] = kH2TP;
1345 par[8] = kBl2TP;
1346 par[9] = kTl2TP;
1347 par[10] = kAlp2TP;
5f91c9e8 1348 gMC->Gsvolu("SQ16","TRAP",idInox,par,11);
ba030c0e 1349
5f91c9e8 1350//
1351// OutEdgeTrapFrame Epoxy = (4 trapezes)*2 copies*2 layers (Epoxy/Inox)
1352//
1353//---
1354 // Trapezoid 1 - 2 layers
d1cd2474 1355 par[1] = kTetOETF;
1356 par[2] = kPhiOETF;
1357 par[3] = kH1OETF;
1358 par[4] = kBl1OETF1;
1359 par[5] = kTl1OETF1;
1360 par[6] = kAlp1OETF1;
1361 par[7] = kH2OETF;
1362 par[8] = kBl2OETF1;
1363 par[9] = kTl2OETF1;
1364 par[10] = kAlp2OETF1;
5f91c9e8 1365
d1cd2474 1366 par[0] = kHzOETFE;
5f91c9e8 1367 gMC->Gsvolu("SQ17","TRAP",idFrameEpoxy,par,11);
d1cd2474 1368 par[0] = kHzOETFI;
5f91c9e8 1369 gMC->Gsvolu("SQ18","TRAP",idInox,par,11);
1370
1371 // Trapezoid 2 - 2 layers
d1cd2474 1372 par[4] = kBl1OETF2;
1373 par[5] = kTl1OETF2;
1374 par[6] = kAlp1OETF2;
5f91c9e8 1375
d1cd2474 1376 par[8] = kBl2OETF2;
1377 par[9] = kTl2OETF2;
1378 par[10] = kAlp2OETF2;
5f91c9e8 1379
d1cd2474 1380 par[0] = kHzOETFE;
5f91c9e8 1381 gMC->Gsvolu("SQ19","TRAP",idFrameEpoxy,par,11);
d1cd2474 1382 par[0] = kHzOETFI;
5f91c9e8 1383 gMC->Gsvolu("SQ20","TRAP",idInox,par,11);
1384
1385 // Trapezoid 3 - 2 layers
d1cd2474 1386 par[4] = kBl1OETF3;
1387 par[5] = kTl1OETF3;
1388 par[6] = kAlp1OETF3;
5f91c9e8 1389
d1cd2474 1390 par[8] = kBl2OETF3;
1391 par[9] = kTl2OETF3;
1392 par[10] = kAlp2OETF3;
5f91c9e8 1393
d1cd2474 1394 par[0] = kHzOETFE;
5f91c9e8 1395 gMC->Gsvolu("SQ21","TRAP",idFrameEpoxy,par,11);
d1cd2474 1396 par[0] = kHzOETFI;
5f91c9e8 1397 gMC->Gsvolu("SQ22","TRAP",idInox,par,11);
1398
1399 // Trapezoid 4 - 2 layers
ba030c0e 1400
d1cd2474 1401 par[4] = kBl1OETF4;
1402 par[5] = kTl1OETF4;
1403 par[6] = kAlp1OETF4;
ba030c0e 1404
d1cd2474 1405 par[8] = kBl2OETF4;
1406 par[9] = kTl2OETF4;
1407 par[10] = kAlp2OETF4;
5f91c9e8 1408
d1cd2474 1409 par[0] = kHzOETFE;
5f91c9e8 1410 gMC->Gsvolu("SQ23","TRAP",idFrameEpoxy,par,11);
d1cd2474 1411 par[0] = kHzOETFI;
5f91c9e8 1412 gMC->Gsvolu("SQ24","TRAP",idInox,par,11);
ba030c0e 1413
5f91c9e8 1414//---
1415 // OutVFrame
d1cd2474 1416 par[0] = kHxOutVFrame;
1417 par[1] = kHyOutVFrame;
1418 par[2] = kHzOutVFrame;
5f91c9e8 1419 gMC->Gsvolu("SQ25","BOX",idFrameEpoxy,par,3);
d1cd2474 1420
5f91c9e8 1421 // OutVFrame corner
d1cd2474 1422 par[0] = kHzOCTF;
1423 par[1] = kTetOCTF;
1424 par[2] = kPhiOCTF;
1425 par[3] = kH1OCTF;
1426 par[4] = kBl1OCTF;
1427 par[5] = kTl1OCTF;
1428 par[6] = kAlp1OCTF;
1429 par[7] = kH2OCTF;
1430 par[8] = kBl2OCTF;
1431 par[9] = kTl2OCTF;
1432 par[10] = kAlp2OCTF;
5f91c9e8 1433 gMC->Gsvolu("SQ26","TRAP",idFrameEpoxy,par,11);
1434
1435 // EarthFaceCu trapezoid
d1cd2474 1436 par[0] = kHzVFC;
1437 par[1] = kTetVFC;
1438 par[2] = kPhiVFC;
1439 par[3] = kH1VFC;
1440 par[4] = kBl1VFC;
1441 par[5] = kTl1VFC;
1442 par[6] = kAlp1VFC;
1443 par[7] = kH2VFC;
1444 par[8] = kBl2VFC;
1445 par[9] = kTl2VFC;
1446 par[10] = kAlp2VFC;
5f91c9e8 1447 gMC->Gsvolu("SQ27","TRAP",idCopper,par,11);
1448
1449 // VertEarthSteel trapezoid
d1cd2474 1450 par[0] = kHzVES;
1451 par[1] = kTetVES;
1452 par[2] = kPhiVES;
1453 par[3] = kH1VES;
1454 par[4] = kBl1VES;
1455 par[5] = kTl1VES;
1456 par[6] = kAlp1VES;
1457 par[7] = kH2VES;
1458 par[8] = kBl2VES;
1459 par[9] = kTl2VES;
1460 par[10] = kAlp2VES;
5f91c9e8 1461 gMC->Gsvolu("SQ28","TRAP",idInox,par,11);
1462
1463 // VertEarthProfCu trapezoid
d1cd2474 1464 par[0] = kHzVPC;
1465 par[1] = kTetVPC;
1466 par[2] = kPhiVPC;
1467 par[3] = kH1VPC;
1468 par[4] = kBl1VPC;
1469 par[5] = kTl1VPC;
1470 par[6] = kAlp1VPC;
1471 par[7] = kH2VPC;
1472 par[8] = kBl2VPC;
1473 par[9] = kTl2VPC;
1474 par[10] = kAlp2VPC;
5f91c9e8 1475 gMC->Gsvolu("SQ29","TRAP",idCopper,par,11);
1476
1477 // SuppLateralPositionner cuboid
d1cd2474 1478 par[0] = kHxSLP;
1479 par[1] = kHySLP;
1480 par[2] = kHzSLP;
5f91c9e8 1481 gMC->Gsvolu("SQ30","BOX",idAlu,par,3);
1482
1483 // LateralPositionerFace
d1cd2474 1484 par[0] = kHxLPF;
1485 par[1] = kHyLPF;
1486 par[2] = kHzLPF;
5f91c9e8 1487 gMC->Gsvolu("SQ31","BOX",idInox,par,3);
1488
1489 // LateralPositionerProfile
d1cd2474 1490 par[0] = kHxLPP;
1491 par[1] = kHyLPP;
1492 par[2] = kHzLPP;
5f91c9e8 1493 gMC->Gsvolu("SQ32","BOX",idInox,par,3); // middle layer
1494
d1cd2474 1495 par[0] = kHxLPP;
1496 par[1] = kHyLPP;
1497 par[2] = kHzLPNF;
5f91c9e8 1498 gMC->Gsvolu("SQ33","BOX",idInox,par,3); // near and far layers
1499
1500 // VertCradleA - 1st trapezoid
d1cd2474 1501 par[0] = kHzVC1;
1502 par[1] = kTetVC1;
1503 par[2] = kPhiVC1;
1504 par[3] = kH1VC1;
1505 par[4] = kBl1VC1;
1506 par[5] = kTl1VC1;
1507 par[6] = kAlp1VC1;
1508 par[7] = kH2VC1;
1509 par[8] = kBl2VC1;
1510 par[9] = kTl2VC1;
1511 par[10] = kAlp2VC1;
5f91c9e8 1512 gMC->Gsvolu("SQ34","TRAP",idAlu,par,11);
ba030c0e 1513
5f91c9e8 1514 // VertCradleB - 2nd trapezoid
d1cd2474 1515 par[0] = kHzVC2;
1516 par[1] = kTetVC2;
1517 par[2] = kPhiVC2;
1518 par[3] = kH1VC2;
1519 par[4] = kBl1VC2;
1520 par[5] = kTl1VC2;
1521 par[6] = kAlp1VC2;
1522 par[7] = kH2VC2;
1523 par[8] = kBl2VC2;
1524 par[9] = kTl2VC2;
1525 par[10] = kAlp2VC2;
5f91c9e8 1526 gMC->Gsvolu("SQ35","TRAP",idAlu,par,11);
1527
1528 // VertCradleC - 3rd trapezoid
d1cd2474 1529 par[0] = kHzVC3;
1530 par[1] = kTetVC3;
1531 par[2] = kPhiVC3;
1532 par[3] = kH1VC3;
1533 par[4] = kBl1VC3;
1534 par[5] = kTl1VC3;
1535 par[6] = kAlp1VC3;
1536 par[7] = kH2VC3;
1537 par[8] = kBl2VC3;
1538 par[9] = kTl2VC3;
1539 par[10] = kAlp2VC3;
5f91c9e8 1540 gMC->Gsvolu("SQ36","TRAP",idAlu,par,11);
1541
1542 // VertCradleD - 4th trapezoid
d1cd2474 1543 par[0] = kHzVC4;
1544 par[1] = kTetVC4;
1545 par[2] = kPhiVC4;
1546 par[3] = kH1VC4;
1547 par[4] = kBl1VC4;
1548 par[5] = kTl1VC4;
1549 par[6] = kAlp1VC4;
1550 par[7] = kH2VC4;
1551 par[8] = kBl2VC4;
1552 par[9] = kTl2VC4;
1553 par[10] = kAlp2VC4;
5f91c9e8 1554 gMC->Gsvolu("SQ37","TRAP",idAlu,par,11);
1555
1556 // LateralSightSupport trapezoid
d1cd2474 1557 par[0] = kHzVSS;
1558 par[1] = kTetVSS;
1559 par[2] = kPhiVSS;
1560 par[3] = kH1VSS;
1561 par[4] = kBl1VSS;
1562 par[5] = kTl1VSS;
1563 par[6] = kAlp1VSS;
1564 par[7] = kH2VSS;
1565 par[8] = kBl2VSS;
1566 par[9] = kTl2VSS;
1567 par[10] = kAlp2VSS;
5f91c9e8 1568 gMC->Gsvolu("SQ38","TRAP",idAlu,par,11);
1569
1570 // LateralSight
d1cd2474 1571 par[0] = kVSInRad;
1572 par[1] = kVSOutRad;
1573 par[2] = kVSLen;
5f91c9e8 1574 gMC->Gsvolu("SQ39","TUBE",idFrameEpoxy,par,3);
1575
1576//---
1577 // InHFrame
d1cd2474 1578 par[0] = kHxInHFrame;
1579 par[1] = kHyInHFrame;
1580 par[2] = kHzInHFrame;
5f91c9e8 1581 gMC->Gsvolu("SQ40","BOX",idFrameEpoxy,par,3);
1582
1583 //Flat 7.5mm horizontal section
d1cd2474 1584 par[0] = kHxH1mm;
1585 par[1] = kHyH1mm;
1586 par[2] = kHzH1mm;
5f91c9e8 1587 gMC->Gsvolu("SQ41","BOX",idFrameEpoxy,par,3);
1588
1589 // InArcFrame
d1cd2474 1590 par[0] = kIAF;
1591 par[1] = kOAF;
1592 par[2] = kHzAF;
1593 par[3] = kAFphi1;
1594 par[4] = kAFphi2;
5f91c9e8 1595
1596 gMC->Gsvolu("SQ42","TUBS",idFrameEpoxy,par,5);
1597
1598//---
1599 // ScrewsInFrame - 3 sections in order to avoid overlapping volumes
1600 // Screw Head, in air
d1cd2474 1601 par[0] = kSCRUHMI;
1602 par[1] = kSCRUHMA;
1603 par[2] = kSCRUHLE;
5f91c9e8 1604
1605 gMC->Gsvolu("SQ43","TUBE",idInox,par,3);
1606
1607 // Middle part, in the Epoxy
d1cd2474 1608 par[0] = kSCRUMMI;
1609 par[1] = kSCRUMMA;
1610 par[2] = kSCRUMLE;
5f91c9e8 1611 gMC->Gsvolu("SQ44","TUBE",idInox,par,3);
1612
1613 // Screw nut, in air
d1cd2474 1614 par[0] = kSCRUNMI;
1615 par[1] = kSCRUNMA;
1616 par[2] = kSCRUNLE;
5f91c9e8 1617 gMC->Gsvolu("SQ45","TUBE",idInox,par,3);
1618 }
1619
1620// __________________Place volumes in the quadrant ____________
1621
1622 // InVFrame
d1cd2474 1623 posX = kHxInVFrame;
1624 posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyInVFrame;
5f91c9e8 1625 posZ = 0.;
1626 gMC->Gspos("SQ00",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
ba030c0e 1627
d1cd2474 1628// keep memory of the mid position. Used for placing screws
1629 const GReal_t kMidVposX = posX;
1630 const GReal_t kMidVposY = posY;
1631 const GReal_t kMidVposZ = posZ;
1632
5f91c9e8 1633 //Flat 7.5mm vertical section
d1cd2474 1634 posX = 2.0*kHxInVFrame+kHxV1mm;
1635 posY = 2.0*kHyInHFrame+2.*kHyH1mm+kIAF+kHyV1mm;
5f91c9e8 1636 posZ = 0.;
1637 gMC->Gspos("SQ01",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
1638
1639 // TopFrameAnode place 2 layers of TopFrameAnode cuboids
d1cd2474 1640 posX = kHxTFA;
1641 posY = 2.*kHyInHFrame+2.*kHyH1mm+kIAF+2.*kHyInVFrame+kHyTFA;
1642 posZ = kHzOuterFrameInox;
5f91c9e8 1643 gMC->Gspos("SQ02",1,QuadrantMLayerName(chamber),posX, posY, posZ,0,"ONLY");
d1cd2474 1644 posZ = posZ+kHzOuterFrameInox;
5f91c9e8 1645 gMC->Gspos("SQ03",1,QuadrantMLayerName(chamber),posX, posY, posZ,0,"ONLY");
1646
1647 // place 2 layers of TopFrameAnodeA trapezoids
1648 posX = 35.8932+fgkDeltaQuadLHC;
1649 posY = 92.6745+fgkDeltaQuadLHC;
d1cd2474 1650 posZ = kHzOuterFrameInox;
5f91c9e8 1651 gMC->Gspos("SQ04",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
d1cd2474 1652 posZ = posZ+kHzOuterFrameInox;
5f91c9e8 1653 gMC->Gspos("SQ05",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1654
1655 // place 2 layers of TopFrameAnodeB trapezoids
1656 posX = 44.593+fgkDeltaQuadLHC;
1657 posY = 90.737+fgkDeltaQuadLHC;
d1cd2474 1658 posZ = kHzOuterFrameInox;
5f91c9e8 1659 gMC->Gspos("SQ06",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
d1cd2474 1660 posZ = posZ+kHzOuterFrameInox;
5f91c9e8 1661 gMC->Gspos("SQ07",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1662
1663 // TopAnode1 place 2 layers
1664 posX = 6.8+fgkDeltaQuadLHC;
1665 posY = 99.85+fgkDeltaQuadLHC;
d1cd2474 1666 posZ = -1.*kHzAnodeFR4;
5f91c9e8 1667 gMC->Gspos("SQ08",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
d1cd2474 1668 posZ = posZ+kHzTopAnodeSteel1;
5f91c9e8 1669 gMC->Gspos("SQ09",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1670
1671 // TopAnode2 place 2 layers
1672 posX = 18.534+fgkDeltaQuadLHC;
1673 posY = 99.482+fgkDeltaQuadLHC;
d1cd2474 1674 posZ = -1.*kHzAnodeFR4;
5f91c9e8 1675 gMC->Gspos("SQ10",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
d1cd2474 1676 posZ = posZ+kHzTopAnodeSteel2;
5f91c9e8 1677 gMC->Gspos("SQ11",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1678
1679 // TopAnode3 place 1 layer
1680 posX = 25.80+fgkDeltaQuadLHC;
1681 posY = 98.61+fgkDeltaQuadLHC;
1682 posZ = 0.;
1683 gMC->Gspos("SQ12",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1684
1685 // TopEarthFace - 2 copies
1686 posX = 23.122+fgkDeltaQuadLHC;
1687 posY = 96.90+fgkDeltaQuadLHC;
d1cd2474 1688 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopEarthFaceCu;
5f91c9e8 1689 gMC->Gspos("SQ13",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1690 posZ = -1.*posZ;
1691 gMC->Gspos("SQ13",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1692
1693 // TopEarthProfile
1694 posX = 14.475+fgkDeltaQuadLHC;
1695 posY = 97.900+fgkDeltaQuadLHC;
d1cd2474 1696 posZ = kHzTopEarthProfileCu;
5f91c9e8 1697 gMC->Gspos("SQ14",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1698 posZ = -1.0*posZ;
1699 gMC->Gspos("SQ14",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1700
1701 // TopGasSupport - 2 copies
1702 posX = 4.9500+fgkDeltaQuadLHC;
1703 posY = 96.200+fgkDeltaQuadLHC;
d1cd2474 1704 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+kHzTopGasSupportAl;
5f91c9e8 1705 gMC->Gspos("SQ15",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1706 posZ = -1.*posZ;
1707 gMC->Gspos("SQ15",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1708
1709 // TopPositioner parameters - single Stainless Steel trapezoid - 2 copies
1710 posX = 7.60+fgkDeltaQuadLHC;
1711 posY = 98.98+fgkDeltaQuadLHC;
d1cd2474 1712 posZ = kHzOuterFrameEpoxy+kHzOuterFrameInox+2.*kHzTopGasSupportAl+kHzTopPositionerSteel;
5f91c9e8 1713 gMC->Gspos("SQ16",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1714 posZ = -1.*posZ;
1715 gMC->Gspos("SQ16",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1716
1717 // OutEdgeFrame
c03e5213 1718 Float_t xCenter[8];
1719 Float_t yCenter[8];
5f91c9e8 1720
c03e5213 1721 xCenter[0] = 73.201 + fgkDeltaQuadLHC;
1722 xCenter[1] = 78.124 + fgkDeltaQuadLHC;
b367fd8f 1723 //xCenter[2] = 82.862 + fgkDeltaQuadLHC;
1724 xCenter[2] = 83.102 + fgkDeltaQuadLHC;
c03e5213 1725 xCenter[3] = 87.418 + fgkDeltaQuadLHC;
b367fd8f 1726 // Fix (5) - overlap of SQ21 with 041M and 125M
5f91c9e8 1727
c03e5213 1728 yCenter[0] = 68.122 + fgkDeltaQuadLHC;
1729 yCenter[1] = 62.860 + fgkDeltaQuadLHC;
b367fd8f 1730 //yCenter[2] = 57.420 + fgkDeltaQuadLHC;
1731 yCenter[2] = 57.660 + fgkDeltaQuadLHC;
c03e5213 1732 yCenter[3] = 51.800 + fgkDeltaQuadLHC;
b367fd8f 1733 // Fix (5) - overlap of SQ21 with 041M and 125M
5f91c9e8 1734
c03e5213 1735 xCenter[4] = 68.122 + fgkDeltaQuadLHC;
1736 xCenter[5] = 62.860 + fgkDeltaQuadLHC;
1737 xCenter[6] = 57.420 + fgkDeltaQuadLHC;
1738 xCenter[7] = 51.800 + fgkDeltaQuadLHC;
5f91c9e8 1739
c03e5213 1740 yCenter[4] = 73.210 + fgkDeltaQuadLHC;
1741 yCenter[5] = 78.124 + fgkDeltaQuadLHC;
1742 yCenter[6] = 82.862 + fgkDeltaQuadLHC;
1743 yCenter[7] = 87.418 + fgkDeltaQuadLHC;
5f91c9e8 1744
d1cd2474 1745 posZ = -1.0*kHzOuterFrameInox;
c03e5213 1746 gMC->Gspos("SQ17",1,QuadrantMLayerName(chamber), xCenter[0], yCenter[0], posZ, rot2,"ONLY");
1747 gMC->Gspos("SQ17",2,QuadrantMLayerName(chamber), xCenter[4], yCenter[4], posZ, rot3,"ONLY");
5f91c9e8 1748
c03e5213 1749 gMC->Gspos("SQ19",1,QuadrantMLayerName(chamber), xCenter[1], yCenter[1], posZ, rot2,"ONLY");
1750 gMC->Gspos("SQ19",2,QuadrantMLayerName(chamber), xCenter[5], yCenter[5], posZ, rot3,"ONLY");
5f91c9e8 1751
c03e5213 1752 gMC->Gspos("SQ21",1,QuadrantMLayerName(chamber), xCenter[2], yCenter[2], posZ, rot2,"ONLY");
1753 gMC->Gspos("SQ21",2,QuadrantMLayerName(chamber), xCenter[6], yCenter[6], posZ, rot3,"ONLY");
ba030c0e 1754
c03e5213 1755 gMC->Gspos("SQ23",1,QuadrantMLayerName(chamber), xCenter[3], yCenter[3], posZ, rot2,"ONLY");
1756 gMC->Gspos("SQ23",2,QuadrantMLayerName(chamber), xCenter[7], yCenter[7], posZ, rot3,"ONLY");
5f91c9e8 1757
d1cd2474 1758 posZ = posZ+kHzOuterFrameEpoxy;
5f91c9e8 1759
c03e5213 1760 gMC->Gspos("SQ18",1,QuadrantMLayerName(chamber), xCenter[0], yCenter[0], posZ, rot2,"ONLY");
1761 gMC->Gspos("SQ18",2,QuadrantMLayerName(chamber), xCenter[4], yCenter[4], posZ, rot3,"ONLY");
5f91c9e8 1762
c03e5213 1763 gMC->Gspos("SQ20",1,QuadrantMLayerName(chamber), xCenter[1], yCenter[1], posZ, rot2,"ONLY");
1764 gMC->Gspos("SQ20",2,QuadrantMLayerName(chamber), xCenter[5], yCenter[5], posZ, rot3,"ONLY");
5f91c9e8 1765
c03e5213 1766 gMC->Gspos("SQ22",1,QuadrantMLayerName(chamber), xCenter[2], yCenter[2], posZ, rot2,"ONLY");
1767 gMC->Gspos("SQ22",2,QuadrantMLayerName(chamber), xCenter[6], yCenter[6], posZ, rot3,"ONLY");
5f91c9e8 1768
c03e5213 1769 gMC->Gspos("SQ24",1,QuadrantMLayerName(chamber), xCenter[3], yCenter[3], posZ, rot2,"ONLY");
1770 gMC->Gspos("SQ24",2,QuadrantMLayerName(chamber), xCenter[7], yCenter[7], posZ, rot3,"ONLY");
5f91c9e8 1771
1772//---
1773
ba030c0e 1774// OutVFrame
d1cd2474 1775 posX = 2.*kHxInVFrame+kIAF+2.*kHxInHFrame-kHxOutVFrame+2.*kHxV1mm;
1776 posY = 2.*kHyInHFrame+kHyOutVFrame;
ba030c0e 1777 posZ = 0.;
5f91c9e8 1778 gMC->Gspos("SQ25",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1779
d1cd2474 1780 // keep memory of the mid position. Used for placing screws
1781 const GReal_t kMidOVposX = posX;
1782 const GReal_t kMidOVposY = posY;
1783 const GReal_t kMidOVposZ = posZ;
1784
1785 const Float_t kTOPY = posY+kHyOutVFrame;
1786 const Float_t kOUTX = posX;
ba030c0e 1787
5f91c9e8 1788// OutVFrame corner
d1cd2474 1789 posX = kOUTX;
1790 posY = kTOPY+((kBl1OCTF+kTl1OCTF)/2.);
5f91c9e8 1791 posZ = 0.;
1792 gMC->Gspos("SQ26",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1793
1794// VertEarthFaceCu - 2 copies
1795 posX = 89.4000+fgkDeltaQuadLHC;
1796 posY = 25.79+fgkDeltaQuadLHC;
d1cd2474 1797 posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertEarthFaceCu;
5f91c9e8 1798 gMC->Gspos("SQ27",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1799 posZ = -1.0*posZ;
1800 gMC->Gspos("SQ27",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1801
1802// VertEarthSteel - 2 copies
1803 posX = 91.00+fgkDeltaQuadLHC;
1804 posY = 30.616+fgkDeltaQuadLHC;
d1cd2474 1805 posZ = kHzFrameThickness+2.0*kHzFoam+kHzVertBarSteel;
5f91c9e8 1806 gMC->Gspos("SQ28",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1807 posZ = -1.0*posZ;
1808 gMC->Gspos("SQ28",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1809
1810// VertEarthProfCu - 2 copies
1811 posX = 92.000+fgkDeltaQuadLHC;
1812 posY = 29.64+fgkDeltaQuadLHC;
d1cd2474 1813 posZ = kHzFrameThickness;
5f91c9e8 1814 gMC->Gspos("SQ29",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1815 posZ = -1.0*posZ;
1816 gMC->Gspos("SQ29",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1817
1818// SuppLateralPositionner - 2 copies
d1cd2474 1819 posX = 90.2-kNearFarLHC;
1820 posY = 5.00-kNearFarLHC;
1821 posZ = kHzLateralPosnAl-fgkMotherThick2;
5f91c9e8 1822 gMC->Gspos("SQ30",1,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1823 posZ = -1.0*posZ;
1824 gMC->Gspos("SQ30",2,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1825
1826// LateralPositionner - 2 copies - Face view
d1cd2474 1827 posX = 92.175-kNearFarLHC-2.*kHxLPP;
1828 posY = 5.00-kNearFarLHC;
1829 posZ =2.0*kHzLateralPosnAl+kHzLateralPosnInoxFace-fgkMotherThick2;
5f91c9e8 1830 gMC->Gspos("SQ31",1,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1831 posZ = -1.0*posZ;
1832 gMC->Gspos("SQ31",2,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1833
1834// LateralPositionner - Profile view
d1cd2474 1835 posX = 92.175+fgkDeltaQuadLHC+kHxLPF-kHxLPP;
5f91c9e8 1836 posY = 5.00+fgkDeltaQuadLHC;
1837 posZ = 0.;
1838 gMC->Gspos("SQ32",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // middle layer
1839
d1cd2474 1840 posX = 92.175-kNearFarLHC+kHxLPF-kHxLPP;
1841 posY = 5.0000-kNearFarLHC;
1842 posZ = fgkMotherThick2-kHzLPNF;
5f91c9e8 1843 gMC->Gspos("SQ33",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // near layer
1844 posZ = -1.*posZ;
1845 gMC->Gspos("SQ33",2,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // far layer
1846
1847// VertCradleA 1st Trapezoid - 3 copies
1848 posX = 95.73+fgkDeltaQuadLHC;
1849 posY = 33.26+fgkDeltaQuadLHC;
1850 posZ = 0.;
1851 gMC->Gspos("SQ34",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1852
d1cd2474 1853 posX = 95.73-kNearFarLHC;
1854 posY = 33.26-kNearFarLHC;
1855 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
5f91c9e8 1856 gMC->Gspos("SQ34",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1857 posZ = -1.0*posZ;
1858 gMC->Gspos("SQ34",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1859
1860// VertCradleB 2nd Trapezoid - 3 copies
1861 posX = 97.29+fgkDeltaQuadLHC;
1862 posY = 23.02+fgkDeltaQuadLHC;
1863 posZ = 0.;
1864 gMC->Gspos("SQ35",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1865
d1cd2474 1866 posX = 97.29-kNearFarLHC;
1867 posY = 23.02-kNearFarLHC;
1868 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
5f91c9e8 1869 gMC->Gspos("SQ35",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1870 posZ = -1.0*posZ;
1871 gMC->Gspos("SQ35",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1872
1873// OutVertCradleC 3rd Trapeze - 3 copies
1874 posX = 98.31+fgkDeltaQuadLHC;
1875 posY = 12.77+fgkDeltaQuadLHC;
1876 posZ = 0.;
1877 gMC->Gspos("SQ36",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1878
b367fd8f 1879 posX = 98.05-kNearFarLHC;
d1cd2474 1880 posY = 12.77-kNearFarLHC;
d1cd2474 1881 posZ = 2.0*kHzLateralSightAl+kHzVerticalCradleAl-fgkMotherThick2;
b367fd8f 1882 // Fix (2) of extrusion SQ36 from SQN1, SQN2, SQF1, SQF2
1883 // (was posX = 98.31 ...)
5f91c9e8 1884 gMC->Gspos("SQ36",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1885 posZ = -1.0*posZ;
1886 gMC->Gspos("SQ36",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1887
1888// OutVertCradleD 4th Trapeze - 3 copies
1889 posX = 98.81+fgkDeltaQuadLHC;
1890 posY = 2.52+fgkDeltaQuadLHC;
1891 posZ = 0.;
1892 gMC->Gspos("SQ37",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1893
d1cd2474 1894 posZ = fgkMotherThick1-kHzVerticalCradleAl;
5f91c9e8 1895 gMC->Gspos("SQ37",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1896 posZ = -1.0*posZ;
1897 gMC->Gspos("SQ37",3,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1898
1899// LateralSightSupport - 2 copies
b367fd8f 1900 posX = 98.33-kNearFarLHC;
d1cd2474 1901 posY = 10.00-kNearFarLHC;
1902 posZ = kHzLateralSightAl-fgkMotherThick2;
b367fd8f 1903 // Fix (3) of extrusion SQ38 from SQN1, SQN2, SQF1, SQF2
1904 // (was posX = 98.53 ...)
5f91c9e8 1905 gMC->Gspos("SQ38",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1906 posZ = -1.0*posZ;
1907 gMC->Gspos("SQ38",2,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1908
1909// Mire placement
1910 posX = 92.84+fgkDeltaQuadLHC;
1911 posY = 8.13+fgkDeltaQuadLHC;
ba030c0e 1912 posZ = 0.;
5f91c9e8 1913 gMC->Gspos("SQ39",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1914
1915//---
1916
1917// InHFrame
d1cd2474 1918 posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxInHFrame;
1919 posY = kHyInHFrame;
5f91c9e8 1920 posZ = 0.;
1921 gMC->Gspos("SQ40",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
ba030c0e 1922
d1cd2474 1923 // keep memory of the mid position. Used for placing screws
1924 const GReal_t kMidHposX = posX;
1925 const GReal_t kMidHposY = posY;
1926 const GReal_t kMidHposZ = posZ;
1927
5f91c9e8 1928// Flat 7.5mm horizontal section
d1cd2474 1929 posX = 2.0*kHxInVFrame+2.*kHxV1mm+kIAF+kHxH1mm;
1930 posY = 2.0*kHyInHFrame+kHyH1mm;
ba030c0e 1931 posZ = 0.;
5f91c9e8 1932 gMC->Gspos("SQ41",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
ba030c0e 1933
1934// InArcFrame
d1cd2474 1935 posX = 2.0*kHxInVFrame+2.*kHxV1mm;
1936 posY = 2.0*kHyInHFrame+2.*kHyH1mm;
ba030c0e 1937 posZ = 0.;
5f91c9e8 1938 gMC->Gspos("SQ42",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
ba030c0e 1939
d1cd2474 1940// keep memory of the mid position. Used for placing screws
1941 const GReal_t kMidArcposX = posX;
1942 const GReal_t kMidArcposY = posY;
1943 const GReal_t kMidArcposZ = posZ;
1944
5f91c9e8 1945// ScrewsInFrame - in sensitive volume
ba030c0e 1946
1947 Float_t scruX[64];
1948 Float_t scruY[64];
1949
1950// Screws on IHEpoxyFrame
1951
d1cd2474 1952 const Int_t kNumberOfScrewsIH = 14; // no. of screws on the IHEpoxyFrame
1953 const Float_t kOffX = 5.; // inter-screw distance
ba030c0e 1954
1955 // first screw coordinates
1956 scruX[0] = 21.07;
1957 scruY[0] = -2.23;
1958 // other screw coordinates
d1cd2474 1959 for (Int_t i = 1;i<kNumberOfScrewsIH;i++){
1960 scruX[i] = scruX[i-1]+kOffX;
ba030c0e 1961 scruY[i] = scruY[0];
1962 }
1963 // Position the volumes on the frames
d1cd2474 1964 for (Int_t i = 0;i<kNumberOfScrewsIH;i++){
5f91c9e8 1965 posX = fgkDeltaQuadLHC + scruX[i];
1966 posY = fgkDeltaQuadLHC + scruY[i];
ba030c0e 1967 posZ = 0.;
d1cd2474 1968 gMC->Gspos("SQ43",i+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1969 if (chamber==1)
1970 gMC->Gspos("SQ44",i+1,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
1971 gMC->Gspos("SQ45",i+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
ba030c0e 1972 }
1973 // special screw coordinates
1974 scruX[63] = 16.3;
1975 scruY[63] = -2.23;
5f91c9e8 1976 posX = fgkDeltaQuadLHC + scruX[63];
1977 posY = fgkDeltaQuadLHC + scruY[63];
ba030c0e 1978 posZ = 0.;
d1cd2474 1979 gMC->Gspos("SQ43",64,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
1980 if (chamber==1)
1981 gMC->Gspos("SQ44",64,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
1982 gMC->Gspos("SQ45",64,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
ba030c0e 1983
1984// Screws on the IVEpoxyFrame
1985
d1cd2474 1986 const Int_t kNumberOfScrewsIV = 15; // no. of screws on the IVEpoxyFrame
1987 const Float_t kOffY = 5.; // inter-screw distance
c03e5213 1988 Int_t firstScrew = 58;
1989 Int_t lastScrew = 44;
ba030c0e 1990
1991 // first (special) screw coordinates
c03e5213 1992 scruX[firstScrew-1] = -2.23;
1993 scruY[firstScrew-1] = 16.3;
ba030c0e 1994 // second (repetitive) screw coordinates
c03e5213 1995 scruX[firstScrew-2] = -2.23;
1996 scruY[firstScrew-2] = 21.07;
ba030c0e 1997 // other screw coordinates
c03e5213 1998 for (Int_t i = firstScrew-3;i>lastScrew-2;i--){
1999 scruX[i] = scruX[firstScrew-2];
d1cd2474 2000 scruY[i] = scruY[i+1]+kOffY;
ba030c0e 2001 }
2002
d1cd2474 2003 for (Int_t i = 0;i<kNumberOfScrewsIV;i++){
c03e5213 2004 posX = fgkDeltaQuadLHC + scruX[i+lastScrew-1];
2005 posY = fgkDeltaQuadLHC + scruY[i+lastScrew-1];
ba030c0e 2006 posZ = 0.;
d1cd2474 2007 gMC->Gspos("SQ43",i+lastScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2008 if (chamber==1)
2009 gMC->Gspos("SQ44",i+lastScrew,"SQ00",posX+0.1-kMidVposX, posY+0.1-kMidVposY, posZ-kMidVposZ, 0, "ONLY");
2010 gMC->Gspos("SQ45",i+lastScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
ba030c0e 2011 }
2012
2013// Screws on the OVEpoxyFrame
2014
d1cd2474 2015 const Int_t kNumberOfScrewsOV = 10; // no. of screws on the OVEpoxyFrame
ba030c0e 2016
c03e5213 2017 firstScrew = 15;
2018 lastScrew = 25;
ba030c0e 2019
2020 // first (repetitive) screw coordinates
d1cd2474 2021 // notes: 1st screw should be placed in volume 40 (InnerHorizFrame)
c03e5213 2022 scruX[firstScrew-1] = 90.9;
2023 scruY[firstScrew-1] = -2.23; // true value
ba030c0e 2024
2025 // other screw coordinates
c03e5213 2026 for (Int_t i = firstScrew; i<lastScrew; i++ ){
2027 scruX[i] = scruX[firstScrew-1];
d1cd2474 2028 scruY[i] = scruY[i-1]+kOffY;
ba030c0e 2029 }
d1cd2474 2030 for (Int_t i = 1;i<kNumberOfScrewsOV;i++){
c03e5213 2031 posX = fgkDeltaQuadLHC + scruX[i+firstScrew-1];
2032 posY = fgkDeltaQuadLHC + scruY[i+firstScrew-1];
ba030c0e 2033 posZ = 0.;
d1cd2474 2034 gMC->Gspos("SQ43",i+firstScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2035 // ??
2036 if (chamber==1)
2037 gMC->Gspos("SQ44",i+firstScrew,"SQ25",posX+0.1-kMidOVposX, posY+0.1-kMidOVposY, posZ-kMidOVposZ, 0, "ONLY");
2038 gMC->Gspos("SQ45",i+firstScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
ba030c0e 2039 }
d1cd2474 2040 // special case for 1st screw, inside the horizontal frame (volume 40)
2041 posX = fgkDeltaQuadLHC + scruX[firstScrew-1];
2042 posY = fgkDeltaQuadLHC + scruY[firstScrew-1];
2043 posZ = 0.;
2044 if (chamber==1)
2045 gMC->Gspos("SQ44",firstScrew,"SQ40",posX+0.1-kMidHposX, posY+0.1-kMidHposY, posZ-kMidHposZ, 0, "ONLY");
2046
ba030c0e 2047// Inner Arc of Frame, screw positions and numbers-1
2048 scruX[62] = 16.009; scruY[62] = 1.401;
2049 scruX[61] = 14.564; scruY[61] = 6.791;
2050 scruX[60] = 11.363; scruY[60] = 11.363;
2051 scruX[59] = 6.791 ; scruY[59] = 14.564;
2052 scruX[58] = 1.401 ; scruY[58] = 16.009;
2053
2054 for (Int_t i = 0;i<5;i++){
5f91c9e8 2055 posX = fgkDeltaQuadLHC + scruX[i+58];
2056 posY = fgkDeltaQuadLHC + scruY[i+58];
ba030c0e 2057 posZ = 0.;
d1cd2474 2058 gMC->Gspos("SQ43",i+58+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-kHzInHFrame-kSCRUHLE, 0, "ONLY");
2059 if (chamber==1)
2060 gMC->Gspos("SQ44",i+58+1,"SQ42",posX+0.1-kMidArcposX, posY+0.1-kMidArcposY, posZ-kMidArcposZ, 0, "ONLY");
2061 gMC->Gspos("SQ45",i+58+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+kHzInHFrame+kSCRUNLE, 0, "ONLY");
5f91c9e8 2062 }
2063}
ba030c0e 2064
5f91c9e8 2065//______________________________________________________________________________
d1cd2474 2066void AliMUONSt1GeometryBuilderV2::PlaceInnerLayers(Int_t chamber)
5f91c9e8 2067{
2068// Place the gas and copper layers for the specified chamber.
2069// --
ba030c0e 2070
5f91c9e8 2071// Rotation Matrices
2072 Int_t rot1, rot2, rot3, rot4;
ba030c0e 2073
d1cd2474 2074 fMUON->AliMatrix(rot1, 90., 315., 90., 45., 0., 0.); // -45 deg
2075 fMUON->AliMatrix(rot2, 90., 90., 90., 180., 0., 0.); // 90 deg
2076 fMUON->AliMatrix(rot3, 90., 270., 90., 0., 0., 0.); // -90 deg
2077 fMUON->AliMatrix(rot4, 90., 45., 90., 135., 0., 0.); // deg
ba030c0e 2078
5f91c9e8 2079 GReal_t x;
2080 GReal_t y;
2081 GReal_t zg = 0.;
2082 GReal_t zc = fgkHzGas + fgkHzPadPlane;
2083 Int_t dpos = (chamber-1)*2;
2084 TString name;
ba030c0e 2085
5f91c9e8 2086 x = 14.53 + fgkDeltaQuadLHC;
2087 y = 53.34 + fgkDeltaQuadLHC;
2088 name = GasVolumeName("SAG", chamber);
2089 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2090 gMC->Gspos("SA1C", 1+dpos, QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2091 gMC->Gspos("SA1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2092
2093 x = 40.67 + fgkDeltaQuadLHC;
2094 y = 40.66 + fgkDeltaQuadLHC;
2095 name = GasVolumeName("SBG", chamber);
2096 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot1,"ONLY");
2097 gMC->Gspos("SB1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot1,"ONLY");
2098 gMC->Gspos("SB1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,rot1,"ONLY");
2099
2100 x = 53.34 + fgkDeltaQuadLHC;
2101 y = 14.52 + fgkDeltaQuadLHC;
2102 name = GasVolumeName("SCG", chamber);
2103 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot2,"ONLY");
2104 gMC->Gspos("SC1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot2,"ONLY");
2105 gMC->Gspos("SC1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot2,"ONLY");
2106
2107 x = 5.83 + fgkDeltaQuadLHC;
2108 y = 17.29 + fgkDeltaQuadLHC;
2109 name = GasVolumeName("SDG", chamber);
2110 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot3,"ONLY");
2111 gMC->Gspos("SD1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot3,"ONLY");
2112 gMC->Gspos("SD1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot3,"ONLY");
2113
2114 x = 9.04 + fgkDeltaQuadLHC;
2115 y = 16.91 + fgkDeltaQuadLHC;
2116 name = GasVolumeName("SEG", chamber);
2117 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2118 gMC->Gspos("SE1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2119 gMC->Gspos("SE1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
2120
2121 x = 10.12 + fgkDeltaQuadLHC;
2122 y = 14.67 + fgkDeltaQuadLHC;
2123 name = GasVolumeName("SFG", chamber);
2124 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2125 gMC->Gspos("SF1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2126 gMC->Gspos("SF1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2127
2128 x = 8.2042 + fgkDeltaQuadLHC;
2129 y = 16.19 + fgkDeltaQuadLHC;
2130 name = GasVolumeName("SGG", chamber);
2131 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2132 gMC->Gspos("SG1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2133 gMC->Gspos("SG1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2134
2135 x = 14.68 + fgkDeltaQuadLHC;
2136 y = 10.10 + fgkDeltaQuadLHC;
2137 name = GasVolumeName("SHG", chamber);
2138 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2139 gMC->Gspos("SH1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2140 gMC->Gspos("SH1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2141
2142 x = 16.21 + fgkDeltaQuadLHC;
2143 y = 8.17 + fgkDeltaQuadLHC;
2144 name = GasVolumeName("SIG", chamber);
2145 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
2146 gMC->Gspos("SI1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
2147 gMC->Gspos("SI1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
2148
2149 x = 16.92 + fgkDeltaQuadLHC;
2150 y = 9.02 + fgkDeltaQuadLHC;
2151 name = GasVolumeName("SJG", chamber);
2152 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot3,"ONLY");
2153 gMC->Gspos("SJ1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot3,"ONLY");
2154 gMC->Gspos("SJ1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot3,"ONLY");
2155
2156 x = 17.30 + fgkDeltaQuadLHC;
2157 y = 5.85 + fgkDeltaQuadLHC;
2158 name = GasVolumeName("SKG", chamber);
2159 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
2160 gMC->Gspos("SK1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
2161 gMC->Gspos("SK1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
ba030c0e 2162}
2163
5f91c9e8 2164//______________________________________________________________________________
d1cd2474 2165void AliMUONSt1GeometryBuilderV2::PlaceSector(AliMpSector* sector,SpecialMap specialMap,
5f91c9e8 2166 const TVector3& where, Bool_t reflectZ, Int_t chamber)
ba030c0e 2167{
5f91c9e8 2168// Place all the segments in the mother volume, at the position defined
2169// by the sector's data.
ba030c0e 2170// --
ba030c0e 2171
5f91c9e8 2172 static Int_t segNum=1;
2173 Int_t sgn;
2174 Int_t reflZ;
2175 Int_t rotMat;
2176
2177 if (!reflectZ) {
2178 sgn= 1;
2179 reflZ=0; // no reflection along z... nothing
d1cd2474 2180 fMUON->AliMatrix(rotMat, 90.,90.,90,180.,0.,0.); // 90° rotation around z, NO reflection along z
5f91c9e8 2181 } else {
2182 sgn=-1;
d1cd2474 2183 fMUON->AliMatrix(reflZ, 90.,0.,90,90.,180.,0.); // reflection along z
2184 fMUON->AliMatrix(rotMat, 90.,90.,90,180.,180.,0.); // 90° rotation around z AND reflection along z
5f91c9e8 2185 }
2186
ba030c0e 2187 GReal_t posX,posY,posZ;
2188
86488ea7 2189#ifdef WITH_STL
d1cd2474 2190 vector<Int_t> alreadyDone;
2191#endif
2192
86488ea7 2193#ifdef WITH_ROOT
d1cd2474 2194 TArrayI alreadyDone(20);
2195 Int_t nofAlreadyDone = 0;
2196#endif
2197
5f91c9e8 2198 for (Int_t irow=0;irow<sector->GetNofRows();irow++){ // for each row
2199 AliMpRow* row = sector->GetRow(irow);
ba030c0e 2200
ba030c0e 2201
5f91c9e8 2202 for (Int_t iseg=0;iseg<row->GetNofRowSegments();iseg++){ // for each row segment
2203 AliMpVRowSegment* seg = row->GetRowSegment(iseg);
2204 char segName[5];
2205
86488ea7 2206#ifdef WITH_STL
d1cd2474 2207 SpecialMap::iterator iter
5f91c9e8 2208 = specialMap.find(seg->GetMotifPositionId(0));
ba030c0e 2209
5f91c9e8 2210 if ( iter == specialMap.end()){ //if this is a normal segment (ie. not part of <specialMap>)
d1cd2474 2211#endif
2212
86488ea7 2213#ifdef WITH_ROOT
d1cd2474 2214 Long_t value = specialMap.GetValue(seg->GetMotifPositionId(0));
2215
2216 if ( value == 0 ){ //if this is a normal segment (ie. not part of <specialMap>)
2217#endif
5f91c9e8 2218
2219 // create the cathode part
2220 sprintf(segName,"%.3dM", segNum);
e77b6d6b 2221 CreatePlaneSegment(segName, seg->Dimensions(), seg->GetNofMotifs());
5f91c9e8 2222
e77b6d6b 2223 posX = where.X() + seg->Position().X();
2224 posY = where.Y() + seg->Position().Y();
5f91c9e8 2225 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
2226 gMC->Gspos(segName, 1, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2227
2228 // and place all the daughter boards of this segment
2229 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {
e8c253a0 2230
2231 // Copy number
5f91c9e8 2232 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2233 AliMpMotifPosition* motifPos =
2234 sector->GetMotifMap()->FindMotifPosition(motifPosId);
e8c253a0 2235 Int_t copyNo = motifPosId;
2236 if ( sector->GetDirection() == kX) copyNo += fgkDaughterCopyNoOffset;
5f91c9e8 2237
e8c253a0 2238 // Position
e77b6d6b 2239 posX = where.X() + motifPos->Position().X() + fgkOffsetX;
2240 posY = where.Y() + motifPos->Position().Y() + fgkOffsetY;
5f91c9e8 2241 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
e8c253a0 2242
2243 gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
5f91c9e8 2244 }
2245 segNum++;
2246
2247 } else {
2248
2249 // if this is a special segment
2250 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {// for each motif
2251
2252 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2253
86488ea7 2254#ifdef WITH_STL
d1cd2474 2255 if (find(alreadyDone.begin(),alreadyDone.end(),motifPosId)
2256 != alreadyDone.end()) continue; // don't treat the same motif twice
2257
5f91c9e8 2258 AliMUONSt1SpecialMotif spMot = specialMap[motifPosId];
d1cd2474 2259#endif
86488ea7 2260#ifdef WITH_ROOT
d1cd2474 2261 Bool_t isDone = false;
2262 Int_t i=0;
2263 while (i<nofAlreadyDone && !isDone) {
2264 if (alreadyDone.At(i) == motifPosId) isDone=true;
2265 i++;
2266 }
2267 if (isDone) continue; // don't treat the same motif twice
2268
2269 AliMUONSt1SpecialMotif spMot = *((AliMUONSt1SpecialMotif*)specialMap.GetValue(motifPosId));
2270#endif
2271 // check
2272 // cout << chamber << " processing special motif: " << motifPosId << endl;
2273
5f91c9e8 2274 AliMpMotifPosition* motifPos = sector->GetMotifMap()->FindMotifPosition(motifPosId);
2275
e8c253a0 2276 // Copy number
2277 Int_t copyNo = motifPosId;
2278 if ( sector->GetDirection() == kX) copyNo += fgkDaughterCopyNoOffset;
2279
5f91c9e8 2280 // place the hole for the motif, wrt the requested rotation angle
2281 Int_t rot = ( spMot.GetRotAngle()<0.1 ) ? reflZ:rotMat;
2282
e77b6d6b 2283 posX = where.X() + motifPos->Position().X() + spMot.GetDelta().X();
2284 posY = where.Y() + motifPos->Position().Y() + spMot.GetDelta().Y();
5f91c9e8 2285 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
e8c253a0 2286 gMC->Gspos(fgkHoleName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
5f91c9e8 2287
2288 // then place the daughter board for the motif, wrt the requested rotation angle
2289 posX = posX+fgkDeltaFilleEtamX;
2290 posY = posY+fgkDeltaFilleEtamY;
2291 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
e8c253a0 2292 gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
5f91c9e8 2293
86488ea7 2294#ifdef WITH_STL
d1cd2474 2295 alreadyDone.push_back(motifPosId);// mark this motif as done
2296#endif
86488ea7 2297#ifdef WITH_ROOT
d1cd2474 2298 if (nofAlreadyDone == alreadyDone.GetSize())
2299 alreadyDone.Set(2*nofAlreadyDone);
2300 alreadyDone.AddAt(motifPosId, nofAlreadyDone++);
2301#endif
2302 // check
2303 // cout << chamber << " processed motifPosId: " << motifPosId << endl;
5f91c9e8 2304 }
2305 }// end of special motif case
2306 }
2307 }
2308}
2309
2310//______________________________________________________________________________
d1cd2474 2311TString AliMUONSt1GeometryBuilderV2::GasVolumeName(const TString& name, Int_t chamber) const
ba030c0e 2312{
5f91c9e8 2313// Inserts the chamber number into the name.
2314// ---
ba030c0e 2315
5f91c9e8 2316 TString newString(name);
2317
2318 TString number("");
2319 number += chamber;
ba030c0e 2320
5f91c9e8 2321 newString.Insert(2, number);
ba030c0e 2322
5f91c9e8 2323 return newString;
ba030c0e 2324}
2325
d1cd2474 2326/*
5f91c9e8 2327//______________________________________________________________________________
d1cd2474 2328Bool_t AliMUONSt1GeometryBuilderV2::IsInChamber(Int_t ich, Int_t volGid) const
ba030c0e 2329{
5f91c9e8 2330// True if volume <volGid> is part of the sensitive
2331// volumes of chamber <ich>
2332// ---
2333 for (Int_t i = 0; i < fChamberV2[ich]->GetSize(); i++) {
2334 if (fChamberV2[ich]->At(i) == volGid) return kTRUE;
2335 }
2336 return kFALSE;
2337}
d1cd2474 2338*/
ba030c0e 2339
5f91c9e8 2340//
2341// protected methods
2342//
ba030c0e 2343
d1cd2474 2344/*
5f91c9e8 2345//______________________________________________________________________________
d1cd2474 2346Int_t AliMUONSt1GeometryBuilderV2::GetChamberId(Int_t volId) const
5f91c9e8 2347{
2348// Check if the volume with specified volId is a sensitive volume (gas)
2349// of some chamber and returns the chamber number;
2350// if not sensitive volume - return 0.
2351// ---
2352
2353 for (Int_t i = 1; i <=2; i++)
2354 if (IsInChamber(i-1,volId)) return i;
ba030c0e 2355
5f91c9e8 2356 for (Int_t i = 3; i <= AliMUONConstants::NCh(); i++)
2357 if (volId==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()) return i;
ba030c0e 2358
5f91c9e8 2359 return 0;
ba030c0e 2360}
d1cd2474 2361*/
ba030c0e 2362
5f91c9e8 2363//
2364// public methods
2365//
2366
2367//______________________________________________________________________________
d1cd2474 2368void AliMUONSt1GeometryBuilderV2::CreateMaterials()
ba030c0e 2369{
d1cd2474 2370// Materials and medias defined in MUONv1:
2371//
2372// AliMaterial( 9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
2373// AliMaterial(10, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2);
2374// AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500);
2375// AliMixture( 19, "Bakelite$", abak, zbak, dbak, -3, wbak);
2376// AliMixture( 20, "ArC4H10 GAS$", ag, zg, dg, 3, wg);
2377// AliMixture( 21, "TRIG GAS$", atrig, ztrig, dtrig, -5, wtrig);
2378// AliMixture( 22, "ArCO2 80%$", ag1, zg1, dg1, 3, wg1);
2379// AliMixture( 23, "Ar-freon $", atr1, ztr1, dtr1, 4, wtr1);
2380// AliMixture( 24, "ArCO2 GAS$", agas, zgas, dgas, 3, wgas);
2381// AliMaterial(31, "COPPER$", 63.54, 29., 8.96, 1.4, 0.);
2382// AliMixture( 32, "Vetronite$",aglass, zglass, dglass, 5, wglass);
2383// AliMaterial(33, "Carbon$", 12.01, 6., 2.265, 18.8, 49.9);
2384// AliMixture( 34, "Rohacell$", arohac, zrohac, drohac, -4, wrohac);
2385
2386// AliMedium( 1, "AIR_CH_US ", 15, 1, iSXFLD, ...
2387// AliMedium( 4, "ALU_CH_US ", 9, 0, iSXFLD, ...
2388// AliMedium( 5, "ALU_CH_US ", 10, 0, iSXFLD, ...
2389// AliMedium( 6, "AR_CH_US ", 20, 1, iSXFLD, ...
2390// AliMedium( 7, "GAS_CH_TRIGGER ", 21, 1, iSXFLD, ...
2391// AliMedium( 8, "BAKE_CH_TRIGGER ", 19, 0, iSXFLD, ...
2392// AliMedium( 9, "ARG_CO2 ", 22, 1, iSXFLD, ...
2393// AliMedium(11, "PCB_COPPER ", 31, 0, iSXFLD, ...
2394// AliMedium(12, "VETRONITE ", 32, 0, iSXFLD, ...
2395// AliMedium(13, "CARBON ", 33, 0, iSXFLD, ...
2396// AliMedium(14, "Rohacell ", 34, 0, iSXFLD, ...
2397
2398 //
2399 // --- Define materials for GEANT ---
2400 //
2401
2402 fMUON->AliMaterial(41, "Aluminium II$", 26.98, 13., 2.7, -8.9, 26.1);
2403 // was id: 9
2404 // from PDG and "The Particle Detector BriefBook", Bock and Vasilescu, P.18
2405 // ??? same but the last but one argument < 0
d1cd2474 2406 //
2407 // --- Define mixtures for GEANT ---
2408 //
2409
2410 // Ar-CO2 gas II (80%+20%)
2411 Float_t ag1[2] = { 39.95, 44.01};
2412 Float_t zg1[2] = { 18., 22.};
2413 Float_t wg1[2] = { .8, 0.2};
2414 Float_t dg1 = .001821;
2415 fMUON->AliMixture(45, "ArCO2 II 80%$", ag1, zg1, dg1, 2, wg1);
2416 // was id: 22
2417 // use wg1 weighting factors (6th arg > 0)
2418
2419 // Rohacell 51 II - imide methacrylique
2420 Float_t aRohacell51[4] = { 12.01, 1.01, 16.00, 14.01};
2421 Float_t zRohacell51[4] = { 6., 1., 8., 7.};
2422 Float_t wRohacell51[4] = { 9., 13., 2., 1.};
5f91c9e8 2423 Float_t dRohacell51 = 0.052;
d1cd2474 2424 fMUON->AliMixture(46, "FOAM$",aRohacell51,zRohacell51,dRohacell51,-4,wRohacell51);
2425 // was id: 32
2426 // use relative A (molecular) values (6th arg < 0)
5f91c9e8 2427
d1cd2474 2428 Float_t aSnPb[2] = { 118.69, 207.19};
2429 Float_t zSnPb[2] = { 50, 82};
2430 Float_t wSnPb[2] = { 0.6, 0.4} ;
5f91c9e8 2431 Float_t dSnPb = 8.926;
d1cd2474 2432 fMUON->AliMixture(47, "SnPb$", aSnPb,zSnPb,dSnPb,2,wSnPb);
2433 // was id: 35
2434 // use wSnPb weighting factors (6th arg > 0)
ba030c0e 2435
5f91c9e8 2436 // plastic definition from K5, Freiburg (found on web)
d1cd2474 2437 Float_t aPlastic[2]={ 1.01, 12.01};
2438 Float_t zPlastic[2]={ 1, 6};
2439 Float_t wPlastic[2]={ 1, 1};
5f91c9e8 2440 Float_t denPlastic=1.107;
d1cd2474 2441 fMUON->AliMixture(48, "Plastic$",aPlastic,zPlastic,denPlastic,-2,wPlastic);
2442 // was id: 33
2443 // use relative A (molecular) values (6th arg < 0)...no other info...
5f91c9e8 2444
d1cd2474 2445 // Not used, to be removed
2446 //
d1cd2474 2447 // was id: 34
2448
5f91c9e8 2449 // Inox/Stainless Steel (18%Cr, 9%Ni)
d1cd2474 2450 Float_t aInox[3] = {55.847, 51.9961, 58.6934};
2451 Float_t zInox[3] = {26., 24., 28.};
2452 Float_t wInox[3] = {0.73, 0.18, 0.09};
5f91c9e8 2453 Float_t denInox = 7.930;
d1cd2474 2454 fMUON->AliMixture(50, "StainlessSteel$",aInox,zInox,denInox,3,wInox);
2455 // was id: 37
2456 // use wInox weighting factors (6th arg > 0)
2457 // from CERN note NUFACT Note023, Oct.2000
2458 //
2459 // End - Not used, to be removed
2460
2461 //
2462 // --- Define the tracking medias for GEANT ---
2463 //
2464
5f91c9e8 2465 GReal_t epsil = .001; // Tracking precision,
d1cd2474 2466 //GReal_t stemax = -1.; // Maximum displacement for multiple scat
5f91c9e8 2467 GReal_t tmaxfd = -20.; // Maximum angle due to field deflection
d1cd2474 2468 //GReal_t deemax = -.3; // Maximum fractional energy loss, DLS
5f91c9e8 2469 GReal_t stmin = -.8;
d1cd2474 2470 GReal_t maxStepAlu = fMUON->GetMaxStepAlu();
2471 GReal_t maxDestepAlu = fMUON->GetMaxDestepAlu();
2472 GReal_t maxStepGas = fMUON->GetMaxStepGas();
5f91c9e8 2473 Int_t iSXFLD = gAlice->Field()->Integ();
2474 Float_t sXMGMX = gAlice->Field()->Max();
2475
d1cd2474 2476 fMUON->AliMedium(21, "ALU_II$", 41, 0, iSXFLD, sXMGMX,
2477 tmaxfd, maxStepAlu, maxDestepAlu, epsil, stmin);
f1501d74 2478
d1cd2474 2479 // was med: 15 mat: 31
2480 fMUON->AliMedium(24, "FrameCH$", 44, 1, iSXFLD, sXMGMX,
2481 10.0, 0.001, 0.001, 0.001, 0.001);
2482 // was med: 20 mat: 36
2483 fMUON->AliMedium(25, "ARG_CO2_II", 45, 1, iSXFLD, sXMGMX,
2484 tmaxfd, maxStepGas, maxDestepAlu, epsil, stmin);
2485 // was med: 9 mat: 22
2486 fMUON->AliMedium(26, "FOAM_CH$", 46, 0, iSXFLD, sXMGMX,
2487 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ;
2488 // was med: 16 mat: 32
2489 fMUON->AliMedium(27, "SnPb$", 47, 0, iSXFLD, sXMGMX,
2490 10.0, 0.01, 1.0, 0.003, 0.003);
2491 // was med: 19 mat: 35
2492 fMUON->AliMedium(28, "Plastic$", 48, 0, iSXFLD, sXMGMX,
2493 10.0, 0.01, 1.0, 0.003, 0.003);
2494 // was med: 17 mat: 33
2495
2496 // Not used, to be romoved
2497 //
f1501d74 2498
d1cd2474 2499 fMUON->AliMedium(30, "InoxBolts$", 50, 1, iSXFLD, sXMGMX,
2500 10.0, 0.01, 1.0, 0.003, 0.003);
2501 // was med: 21 mat: 37
2502 //
2503 // End - Not used, to be removed
ba030c0e 2504}
2505
5f91c9e8 2506//______________________________________________________________________________
d1cd2474 2507void AliMUONSt1GeometryBuilderV2::CreateGeometry()
ba030c0e 2508{
d1cd2474 2509// Create the detailed GEANT geometry for the dimuon arm station1
ba030c0e 2510// --
5a0e88a7 2511 AliDebug(1,"Called");
5f91c9e8 2512
adbabf6d 2513 // Define chamber volumes as virtual
2514 //
2515
5f91c9e8 2516 // Create basic volumes
2517 //
2518 CreateHole();
2519 CreateDaughterBoard();
2520 CreateInnerLayers();
ba030c0e 2521
5f91c9e8 2522 // Create reflexion matrices
2523 //
d1cd2474 2524/*
5f91c9e8 2525 Int_t reflXZ, reflYZ, reflXY;
d1cd2474 2526 fMUON->AliMatrix(reflXZ, 90., 180., 90., 90., 180., 0.);
2527 fMUON->AliMatrix(reflYZ, 90., 0., 90.,-90., 180., 0.);
2528 fMUON->AliMatrix(reflXY, 90., 180., 90., 270., 0., 0.);
2529*/
5f91c9e8 2530 // Define transformations for each quadrant
e7addd77 2531 // In old coordinate system: In new coordinate system:
5f91c9e8 2532 //
e7addd77 2533 //
2534 // II. | I. I. | II.
ecbcb19e 2535 // | (101) | (100)
e7addd77 2536 // _____ | ____ _____ | ____
2537 // | |
2538 // III. | IV. IV. | III.
ecbcb19e 2539 // (102) | (103)
5f91c9e8 2540 //
d1cd2474 2541/*
5f91c9e8 2542 Int_t rotm[4];
2543 rotm[0]=0; // quadrant I
2544 rotm[1]=reflXZ; // quadrant II
2545 rotm[2]=reflXY; // quadrant III
2546 rotm[3]=reflYZ; // quadrant IV
d1cd2474 2547*/
2548 TGeoRotation rotm[4];
2549 rotm[0] = TGeoRotation("identity");
2550 rotm[1] = TGeoRotation("reflXZ", 90., 180., 90., 90., 180., 0.);
2551 rotm[2] = TGeoRotation("reflXY", 90., 180., 90., 270., 0., 0.);
2552 rotm[3] = TGeoRotation("reflYZ", 90., 0., 90.,-90., 180., 0.);
ba030c0e 2553
5f91c9e8 2554 TVector3 scale[4];
2555 scale[0] = TVector3( 1, 1, 1); // quadrant I
2556 scale[1] = TVector3(-1, 1, -1); // quadrant II
2557 scale[2] = TVector3(-1, -1, 1); // quadrant III
2558 scale[3] = TVector3( 1, -1, -1); // quadrant IV
ba030c0e 2559
a432117a 2560 Int_t detElemId[4];
ecbcb19e 2561 detElemId[0] = 1; // quadrant I
e7addd77 2562 detElemId[1] = 0; // quadrant II
ecbcb19e 2563 detElemId[2] = 3; // quadrant III
2564 detElemId[3] = 2; // quadrant IV
a432117a 2565
5f91c9e8 2566 // Shift in Z of the middle layer
10bb087f 2567 Double_t deltaZ = 7.5/2.;
5f91c9e8 2568
2569 // Position of quadrant I wrt to the chamber position
b367fd8f 2570 // TVector3 pos0(-fgkDeltaQuadLHC, -fgkDeltaQuadLHC, deltaZ);
5f91c9e8 2571
2572 // Shift for near/far layers
2573 GReal_t shiftXY = fgkFrameOffset;
2574 GReal_t shiftZ = fgkMotherThick1+fgkMotherThick2;
2575
2576 // Build two chambers
2577 //
2578 for (Int_t ich=1; ich<3; ich++) {
2579
2580 // Create quadrant volume
2581 CreateQuadrant(ich);
2582
2583 // Place gas volumes
2584 PlaceInnerLayers(ich);
2585
2586 // Place the quadrant
2587 for (Int_t i=0; i<4; i++) {
2588
b367fd8f 2589 // DE envelope
2590 GReal_t posx0, posy0, posz0;
2591 posx0 = fgkPadXOffsetBP * scale[i].X();
2592 posy0 = fgkPadYOffsetBP * scale[i].Y();;
2593 posz0 = deltaZ * scale[i].Z();
2594 GetEnvelopes(ich-1)
2595 ->AddEnvelope(QuadrantEnvelopeName(ich,i), detElemId[i] + ich*100, true,
2596 TGeoTranslation(posx0, posy0, posz0), rotm[i]);
2597
5f91c9e8 2598 // Middle layer
a432117a 2599 GReal_t posx, posy, posz;
b367fd8f 2600 posx = -fgkDeltaQuadLHC - fgkPadXOffsetBP;
2601 posy = -fgkDeltaQuadLHC - fgkPadYOffsetBP;
2602 posz = 0.;
a432117a 2603 GetEnvelopes(ich-1)
b367fd8f 2604 ->AddEnvelopeConstituent(QuadrantMLayerName(ich), QuadrantEnvelopeName(ich,i),
2605 i+1, TGeoTranslation(posx, posy, posz));
5f91c9e8 2606
2607 // Near/far layers
b367fd8f 2608 GReal_t posx2 = posx + shiftXY;;
2609 GReal_t posy2 = posy + shiftXY;;
2610 GReal_t posz2 = posz - shiftZ;;
d1cd2474 2611 //gMC->Gspos(QuadrantNLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
a432117a 2612 GetEnvelopes(ich-1)
b367fd8f 2613 ->AddEnvelopeConstituent(QuadrantNLayerName(ich), QuadrantEnvelopeName(ich,i),
2614 i+1, TGeoTranslation(posx2, posy2, posz2));
5f91c9e8 2615
b367fd8f 2616 posz2 = posz + shiftZ;
d1cd2474 2617 //gMC->Gspos(QuadrantFLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
a432117a 2618 GetEnvelopes(ich-1)
b367fd8f 2619 ->AddEnvelopeConstituent(QuadrantFLayerName(ich), QuadrantEnvelopeName(ich,i),
2620 i+1, TGeoTranslation(posx2, posy2, posz2));
5f91c9e8 2621 }
2622 }
5f91c9e8 2623}
2624
2625//______________________________________________________________________________
d1cd2474 2626void AliMUONSt1GeometryBuilderV2::SetTransformations()
5f91c9e8 2627{
d1cd2474 2628// Defines the transformations for the station2 chambers.
2629// ---
5f91c9e8 2630
adbabf6d 2631 SetVolume(0, "SC01", true);
2632 SetVolume(1, "SC02", true);
2633
b7ef3c96 2634 Double_t zpos1 = - AliMUONConstants::DefaultChamberZ(0);
2635 SetTranslation(0, TGeoTranslation(0., 0., zpos1));
5f91c9e8 2636
b7ef3c96 2637 Double_t zpos2 = - AliMUONConstants::DefaultChamberZ(1);
2638 SetTranslation(1, TGeoTranslation(0., 0., zpos2));
d1cd2474 2639}
5f91c9e8 2640
d1cd2474 2641//______________________________________________________________________________
2642void AliMUONSt1GeometryBuilderV2::SetSensitiveVolumes()
2643{
2644// Defines the sensitive volumes for station2 chambers.
2645// ---
5f91c9e8 2646
e118b27e 2647 GetGeometry(0)->SetSensitiveVolume("SA1G");
2648 GetGeometry(0)->SetSensitiveVolume("SB1G");
2649 GetGeometry(0)->SetSensitiveVolume("SC1G");
2650 GetGeometry(0)->SetSensitiveVolume("SD1G");
2651 GetGeometry(0)->SetSensitiveVolume("SE1G");
2652 GetGeometry(0)->SetSensitiveVolume("SF1G");
2653 GetGeometry(0)->SetSensitiveVolume("SG1G");
2654 GetGeometry(0)->SetSensitiveVolume("SH1G");
2655 GetGeometry(0)->SetSensitiveVolume("SI1G");
2656 GetGeometry(0)->SetSensitiveVolume("SJ1G");
2657 GetGeometry(0)->SetSensitiveVolume("SK1G");
d1cd2474 2658
e118b27e 2659 GetGeometry(1)->SetSensitiveVolume("SA2G");
2660 GetGeometry(1)->SetSensitiveVolume("SB2G");
2661 GetGeometry(1)->SetSensitiveVolume("SC2G");
2662 GetGeometry(1)->SetSensitiveVolume("SD2G");
2663 GetGeometry(1)->SetSensitiveVolume("SE2G");
2664 GetGeometry(1)->SetSensitiveVolume("SF2G");
2665 GetGeometry(1)->SetSensitiveVolume("SG2G");
2666 GetGeometry(1)->SetSensitiveVolume("SH2G");
2667 GetGeometry(1)->SetSensitiveVolume("SI2G");
2668 GetGeometry(1)->SetSensitiveVolume("SJ2G");
2669 GetGeometry(1)->SetSensitiveVolume("SK2G");
ba030c0e 2670}
5f91c9e8 2671