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