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