Code for MUON Station1 (I.Hrivnacova)
[u/mrichter/AliRoot.git] / MUON / AliMUONv2.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
16/*
17$Log$
18*/
19
20// Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
21//
22// Class AliMUONv2
23// ---------------
24// Inherits from AliMUONv1 but with a more detailed
25// geometrical description of station 1
26
27#include <algorithm>
5f91c9e8 28#include <string>
ba030c0e 29
30#include <TVector2.h>
31#include <TClonesArray.h>
32#include <TLorentzVector.h>
5f91c9e8 33#include <TArrayI.h>
34#include <Riostream.h>
35#include <TSystem.h>
ba030c0e 36
5f91c9e8 37#include "AliMpFiles.h"
38#include "AliMpReader.h"
39#include "AliMpSector.h"
40#include "AliMpRow.h"
41#include "AliMpVRowSegment.h"
42#include "AliMpMotifMap.h"
43#include "AliMpMotifPosition.h"
ba030c0e 44
45#include "AliMUONv2.h"
46#include "AliMUONConstants.h"
47#include "AliMUONHit.h"
48#include "AliRun.h"
49#include "AliMagF.h"
50#include "AliConst.h"
5f91c9e8 51#include "AliMUONChamber.h"
ba030c0e 52
53ClassImp(AliMUONv2)
54
5f91c9e8 55// Thickness Constants
56const GReal_t AliMUONv2::fgkHzPadPlane=0.0148/2.; //Pad plane
57const GReal_t AliMUONv2::fgkHzFoam = 2.083/2.; //Foam of mechanicalplane
58const GReal_t AliMUONv2::fgkHzFR4 = 0.0031/2.; //FR4 of mechanical plane
59const GReal_t AliMUONv2::fgkHzSnPb = 0.0091/2.; //Pad/Kapton connection (66 pt)
60const GReal_t AliMUONv2::fgkHzKapton = 0.0122/2.; //Kapton
61const GReal_t AliMUONv2::fgkHzBergPlastic = 0.3062/2.;//Berg connector
ba030c0e 62const GReal_t AliMUONv2::fgkHzBergCopper = 0.1882/2.; //Berg connector
5f91c9e8 63const GReal_t AliMUONv2::fgkHzDaughter = 0.0156/2.; //Daughter board
64const GReal_t AliMUONv2::fgkHzGas = 0.2/2.; //Gas thickness
65
66// Quadrant Mother volume - TUBS1 - Middle layer of model
67const GReal_t AliMUONv2::fgkMotherIR1 = 18.3;
68const GReal_t AliMUONv2::fgkMotherOR1 = 105.673;
69const GReal_t AliMUONv2::fgkMotherThick1 = 6.5/2;
70const GReal_t AliMUONv2::fgkMotherPhiL1 = 0.;
71const GReal_t AliMUONv2::fgkMotherPhiU1 = 90.;
72
73// Quadrant Mother volume - TUBS2 - near and far layers of model
74const GReal_t AliMUONv2::fgkMotherIR2 = 20.7;
75const GReal_t AliMUONv2::fgkMotherOR2 = 100.073;
76const GReal_t AliMUONv2::fgkMotherThick2 = 3.0/2;
77const GReal_t AliMUONv2::fgkMotherPhiL2 = 0.;
78const GReal_t AliMUONv2::fgkMotherPhiU2 = 90.;
79
80// Sensitive copper pads, foam layer, PCB and electronics model parameters
ba030c0e 81const GReal_t AliMUONv2::fgkHxHole=1.5/2.;
82const GReal_t AliMUONv2::fgkHyHole=6./2.;
83const GReal_t AliMUONv2::fgkHxBergPlastic=0.74/2.;
84const GReal_t AliMUONv2::fgkHyBergPlastic=5.09/2.;
85const GReal_t AliMUONv2::fgkHxBergCopper=0.25/2.;
86const GReal_t AliMUONv2::fgkHyBergCopper=3.6/2.;
87const GReal_t AliMUONv2::fgkHxKapton=0.8/2.;
88const GReal_t AliMUONv2::fgkHyKapton=5.7/2.;
89const GReal_t AliMUONv2::fgkHxDaughter=2.3/2.;
90const GReal_t AliMUONv2::fgkHyDaughter=6.3/2.;
91const GReal_t AliMUONv2::fgkOffsetX=1.46;
92const GReal_t AliMUONv2::fgkOffsetY=0.71;
5f91c9e8 93const GReal_t AliMUONv2::fgkDeltaFilleEtamX=1.46;
94const GReal_t AliMUONv2::fgkDeltaFilleEtamY=0.051;
ba030c0e 95
5f91c9e8 96const GReal_t AliMUONv2::fgkDeltaQuadLHC=2.6; // LHC Origin wrt Quadrant Origin
97const GReal_t AliMUONv2::fgkFrameOffset=5.0;
ba030c0e 98
5f91c9e8 99const char* AliMUONv2::fgkHoleName="MCHL";
100const char* AliMUONv2::fgkDaughterName="MCDB";
101const char AliMUONv2::fgkFoamLayerSuffix='F'; // prefix for automatic volume naming
102const char* AliMUONv2::fgkQuadrantMLayerName="SQM";
103const char* AliMUONv2::fgkQuadrantNLayerName="SQN";
104const char* AliMUONv2::fgkQuadrantFLayerName="SQF";
105
106//______________________________________________________________________________
ba030c0e 107AliMUONv2::AliMUONv2()
5f91c9e8 108 : AliMUONv1()
ba030c0e 109{
110// Default Constructor
5f91c9e8 111// --
112 fChamberV2[0] = 0;
113 fChamberV2[1] = 0;
114
ba030c0e 115 // keep secondaries
116 SetIshunt(0);
5f91c9e8 117
118 // set path to mapping data files
119 if (! gSystem->Getenv("MINSTALL")) {
120 TString dirPath = gSystem->Getenv("ALICE_ROOT");
121 dirPath += "/MUON/mapping";
122 AliMpFiles::Instance()->SetTopPath(dirPath);
123 gSystem->Setenv("MINSTALL", dirPath.Data());
124 //cout << "AliMpFiles top path set to " << dirPath << endl;
125 }
126 //else
127 // cout << gSystem->Getenv("MINSTALL") << endl;
ba030c0e 128}
129
5f91c9e8 130//______________________________________________________________________________
ba030c0e 131AliMUONv2::AliMUONv2(const char *name, const char *title)
5f91c9e8 132 : AliMUONv1(name,title)
ba030c0e 133{
5f91c9e8 134 fChamberV2[0] = 0;
135 fChamberV2[1] = 0;
136
ba030c0e 137 // keep secondaries
138 SetIshunt(0);
5f91c9e8 139
140 // set path to mapping data files
141 if (! gSystem->Getenv("MINSTALL")) {
142 TString dirPath = gSystem->Getenv("ALICE_ROOT");
143 dirPath += "/MUON/mapping";
144 AliMpFiles::Instance()->SetTopPath(dirPath);
145 gSystem->Setenv("MINSTALL", dirPath.Data());
146 //cout << "AliMpFiles top path set to " << dirPath << endl;
147 }
148 //else
149 // cout << gSystem->Getenv("MINSTALL") << endl;
ba030c0e 150}
151
5f91c9e8 152//______________________________________________________________________________
ba030c0e 153AliMUONv2::AliMUONv2(const AliMUONv2& rMUON)
154{
155// Dummy copy constructor
156}
157
5f91c9e8 158//______________________________________________________________________________
ba030c0e 159AliMUONv2::~AliMUONv2()
160{
161// Destructor
ba030c0e 162}
163
5f91c9e8 164//
165// Private methods
166//
167
168//______________________________________________________________________________
169void AliMUONv2::CreateHole()
ba030c0e 170{
5f91c9e8 171// Create all the elements found inside a foam hole
ba030c0e 172// --
ba030c0e 173 Int_t* idtmed = fIdtmed->GetArray()-1099;
5f91c9e8 174 Int_t idAir = idtmed[1100]; // medium 1
175 Int_t idCopper = idtmed[1109]; // medium 10 = copper
ba030c0e 176
5f91c9e8 177 GReal_t par[3];
178 GReal_t posX,posY,posZ;
179
180 par[0] = fgkHxHole;
181 par[1] = fgkHyHole;
182 par[2] = fgkHzFoam;
183 gMC->Gsvolu(fgkHoleName,"BOX",idAir,par,3);
184
185 par[0] = fgkHxKapton;
186 par[1] = fgkHyKapton;
187 par[2] = fgkHzSnPb;
188 gMC->Gsvolu("SNPB", "BOX", idCopper, par, 3);
189 posX = 0.;
190 posY = 0.;
191 posZ = -fgkHzFoam+fgkHzSnPb;
192 gMC->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
ba030c0e 193
5f91c9e8 194 par[0] = fgkHxHole;
195 par[1] = fgkHyBergPlastic;
196 par[2] = fgkHzKapton;
197 gMC->Gsvolu("KAPT", "BOX", idCopper, par, 3);
198 posX = 0.;
199 posY = 0.;
200 posZ = 0.;
201 gMC->Gspos("KAPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
202}
ba030c0e 203
5f91c9e8 204//______________________________________________________________________________
205void AliMUONv2::CreateDaughterBoard()
206{
207// Create all the elements in a daughter board
208// --
209 Int_t* idtmed = fIdtmed->GetArray()-1099;
210 Int_t idAir = idtmed[1100]; // medium 1
211 Int_t idCopper = idtmed[1109]; // medium 10 = copper
212 Int_t idPlastic =idtmed[1116]; // medium 17 = Plastic
ba030c0e 213
5f91c9e8 214 GReal_t par[3];
215 GReal_t posX,posY,posZ;
ba030c0e 216
5f91c9e8 217 par[0]=fgkHxDaughter;
218 par[1]=fgkHyDaughter;
219 par[2]=TotalHzDaughter();
220 gMC->Gsvolu(fgkDaughterName,"BOX",idAir,par,3);
ba030c0e 221
5f91c9e8 222 par[0]=fgkHxBergPlastic;
223 par[1]=fgkHyBergPlastic;
224 par[2]=fgkHzBergPlastic;
225 gMC->Gsvolu("BRGP","BOX",idPlastic,par,3);
226 posX=0.;
227 posY=0.;
228 posZ = -TotalHzDaughter() + fgkHzBergPlastic;
229 gMC->Gspos("BRGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
230
231 par[0]=fgkHxBergCopper;
232 par[1]=fgkHyBergCopper;
233 par[2]=fgkHzBergCopper;
234 gMC->Gsvolu("BRGC","BOX",idCopper,par,3);
235 posX=0.;
236 posY=0.;
237 posZ=0.;
238 gMC->Gspos("BRGC",1,"BRGP",posX,posY,posZ,0,"ONLY");
239
240 par[0]=fgkHxDaughter;
241 par[1]=fgkHyDaughter;
242 par[2]=fgkHzDaughter;
243 gMC->Gsvolu("DGHT","BOX",idCopper,par,3);
244 posX=0.;
245 posY=0.;
246 posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter;
247 gMC->Gspos("DGHT",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
248}
249
250//______________________________________________________________________________
251void AliMUONv2::CreateInnerLayers()
252{
253// Create the layer of sensitive volumes with gas
254// and the copper layer.
255// --
256
257// Gas Medium
258 Int_t* idtmed = fIdtmed->GetArray()-1099;
259 Int_t idArCO2 = idtmed[1108]; // medium 9 (ArCO2 80%)
260 Int_t idCopper = idtmed[1109]; // medium 10 = copper
261
262 Float_t par[11];
263
264//Make gas volume - composed of 11 trapezoids
265// section 1 of 11
266 par[0] = fgkHzGas;
267 par[1] = 0.;
268 par[2] = 0.;
269 par[3] = 71.33/2.;
270 par[4] = 9.76/2.;
271 par[5] = 48.77/2.;
272 par[6] = 15.3;
273 par[7] = 71.33/2.;
274 par[8] = 9.76/2.;
275 par[9] = 48.77/2.;
276 par[10] = 15.3;
277
278 gMC->Gsvolu("SA1G", "TRAP", idArCO2, par, 11);
279 gMC->Gsvolu("SA2G", "TRAP", idArCO2, par, 11);
ba030c0e 280
5f91c9e8 281 par[0] = fgkHzPadPlane;
282 gMC->Gsvolu("SA1C", "TRAP", idCopper,par, 11);
283
284// section 2 of 11
285 par[0] = fgkHzGas;
286 par[1] = 0.;
287 par[2] = 0.;
288 par[3] = 79.68/2.;
289 par[4] = 10.4/2.;
290 par[5] = 57.0/2.;
291 par[6] = 0.;
292 par[7] = 79.68/2.;
293 par[8] = 10.4/2.;
294 par[9] = 57.0/2.;
295 par[10] = 0.;
296 gMC->Gsvolu("SB1G", "TRAP", idArCO2, par, 11);
297 gMC->Gsvolu("SB2G", "TRAP", idArCO2, par, 11);
298
299 par[0] = fgkHzPadPlane;
300 gMC->Gsvolu("SB1C", "TRAP", idCopper,par, 11);
301
302// section 3 of 11
303 par[0] = fgkHzGas;
304 par[1] = 0.;
305 par[2] = 0.;
306 par[3] = 71.33/2.;
307 par[4] = 48.77/2.;
308 par[5] = 9.73/2.;
309 par[6] = -15.3;
310 par[7] = 71.33/2.;
311 par[8] = 48.77/2.;
312 par[9] = 9.73/2.;
313 par[10] = -15.3;
314
315 gMC->Gsvolu("SC1G", "TRAP", idArCO2, par, 11);
316 gMC->Gsvolu("SC2G", "TRAP", idArCO2, par, 11);
317
318 par[0] = fgkHzPadPlane;
319 gMC->Gsvolu("SC1C", "TRAP", idCopper,par, 11);
320
321// section 4 of 11
322 par[0] = fgkHzGas;
323 par[1] = 0.;
324 par[2] = 0.;
325 par[3] = 6.00/2.;
326 par[4] = 0.;
327 par[5] = 1.56/2.;
328 par[6] = 7.41;
329 par[7] = 6.00/2.;
330 par[8] = 0.;
331 par[9] = 1.56/2.;
332 par[10] = 7.41;
333 gMC->Gsvolu("SD1G", "TRAP", idArCO2, par, 11);
334 gMC->Gsvolu("SD2G", "TRAP", idArCO2, par, 11);
335
336 par[0] = fgkHzPadPlane;
337 gMC->Gsvolu("SD1C", "TRAP", idCopper,par, 11);
338
339// section 5 of 11
340 par[0] = fgkHzGas;
341 par[1] = 0.;
342 par[2] = 0.;
343 par[3] = 1.516/2.;
344 par[4] = 0.;
345 par[5] = 0.829/2.;
346 par[6] = 15.3;
347 par[7] = 1.516/2.;
348 par[8] = 0.;
349 par[9] = 0.829/2.;
350 par[10] = 15.3;
351 gMC->Gsvolu("SE1G", "TRAP", idArCO2, par, 11);
352 gMC->Gsvolu("SE2G", "TRAP", idArCO2, par, 11);
353
354 par[0] = fgkHzPadPlane;
355 gMC->Gsvolu("SE1C", "TRAP", idCopper,par, 11);
356
357// section 6 of 11
358 par[0] = fgkHzGas;
359 par[1] = 0.;
360 par[2] = 0.;
361 par[3] = 3.92/2.;
362 par[4] = 0.;
363 par[5] = 0.562/2.;
364 par[6] = -4.1;
365 par[7] = 3.92/2.;
366 par[8] = 0.;
367 par[9] = 0.562/2.;
368 par[10] = -4.1;
369 gMC->Gsvolu("SF1G", "TRAP", idArCO2, par, 11);
370 gMC->Gsvolu("SF2G", "TRAP", idArCO2, par, 11);
371
372 par[0] = fgkHzPadPlane;
373 gMC->Gsvolu("SF1C", "TRAP", idCopper,par, 11);
374
375// section 7 of 11
376 par[0] = fgkHzGas;
377 par[1] = 0.;
378 par[2] = 0.;
379 par[3] = 0.941/2.;
380 par[4] = 0.562/2.;
381 par[5] = 0.;
382 par[6] = -16.6;
383 par[7] = 0.941/2.;
384 par[8] = 0.562/2.;
385 par[9] = 0.;
386 par[10] =-16.6;
387 gMC->Gsvolu("SG1G", "TRAP", idArCO2, par, 11);
388 gMC->Gsvolu("SG2G", "TRAP", idArCO2, par, 11);
389
390 par[0] = fgkHzPadPlane;
391 gMC->Gsvolu("SG1C", "TRAP", idCopper,par, 11);
392
393// section 8 of 11
394 par[0] = fgkHzGas;
395 par[1] = 0.;
396 par[2] = 0.;
397 par[3] = 3.94/2.;
398 par[4] = 0.57/2.;
399 par[5] = 0.;
400 par[6] = 4.14;
401 par[7] = 3.94/2.;
402 par[8] = 0.57/2.;
403 par[9] = 0.;
404 par[10] = 4.14;
405 gMC->Gsvolu("SH1G", "TRAP", idArCO2, par, 11);
406 gMC->Gsvolu("SH2G", "TRAP", idArCO2, par, 11);
407
408 par[0] = fgkHzPadPlane;
409 gMC->Gsvolu("SH1C", "TRAP", idCopper,par, 11);
410
411// section 9 of 11
412 par[0] = fgkHzGas;
413 par[1] = 0.;
414 par[2] = 0.;
415 par[3] = 0.95/2.;
416 par[4] = 0.;
417 par[5] = 0.57/2;
418 par[6] = 16.7;
419 par[7] = 0.95/2.;
420 par[8] = 0.;
421 par[9] = 0.57/2;
422 par[10] = 16.7;
423 gMC->Gsvolu("SI1G", "TRAP", idArCO2, par, 11);
424 gMC->Gsvolu("SI2G", "TRAP", idArCO2, par, 11);
425
426 par[0] = fgkHzPadPlane;
427 gMC->Gsvolu("SI1C", "TRAP", idCopper,par, 11);
428
429// section 10 of 11
430 par[0] = fgkHzGas;
431 par[1] = 0.;
432 par[2] = 0.;
433 par[3] = 1.49/2.;
434 par[4] = 0.;
435 par[5] = 0.817/2.;
436 par[6] = -15.4;
437 par[7] = 1.49/2.;
438 par[8] = 0.;
439 par[9] = 0.817/2.;
440 par[10] = -15.4;
441 gMC->Gsvolu("SJ1G", "TRAP", idArCO2, par, 11);
442 gMC->Gsvolu("SJ2G", "TRAP", idArCO2, par, 11);
443
444 par[0] = fgkHzPadPlane;
445 gMC->Gsvolu("SJ1C", "TRAP", idCopper,par, 11);
446
447// section 11 of 11
448 par[0] = fgkHzGas;
449 par[1] = 0.;
450 par[2] = 0.;
451 par[3] = 5.93/2.;
452 par[4] = 0.;
453 par[5] = 1.49/2.;
454 par[6] = -7.16;
455 par[7] = 5.93/2.;
456 par[8] = 0.;
457 par[9] = 1.49/2.;
458 par[10] = -7.16;
459 gMC->Gsvolu("SK1G", "TRAP", idArCO2, par, 11);
460 gMC->Gsvolu("SK2G", "TRAP", idArCO2, par, 11);
461
462 par[0] = fgkHzPadPlane;
463 gMC->Gsvolu("SK1C", "TRAP", idCopper,par, 11);
ba030c0e 464}
5f91c9e8 465
466//______________________________________________________________________________
ba030c0e 467void AliMUONv2::CreateQuadrant(Int_t chamber)
468{
469// create the quadrant (bending and non-bending planes)
470// for the given chamber
471// --
5f91c9e8 472
ba030c0e 473 CreateFrame(chamber);
474
5f91c9e8 475 TSpecialMap specialMap;
476 specialMap[1001] = AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.);
477 specialMap[1002] = AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36));
478 specialMap[1003] = AliMUONSt1SpecialMotif(TVector2(1.01, 0.36));
479 AliMpReader reader1(kBendingPlane);
480 AliMpSector* sector1 = reader1.BuildSector();
ba030c0e 481
5f91c9e8 482 Bool_t reflectZ = true;
483 TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.);
484 PlaceSector(sector1, specialMap, where, reflectZ, chamber);
ba030c0e 485
ba030c0e 486 specialMap.clear();
487 specialMap[4001] = AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.);
488 specialMap[4002] = AliMUONSt1SpecialMotif(TVector2(1.96, 0.17));
489 specialMap[4003] = AliMUONSt1SpecialMotif(TVector2(1.61,-1.18));
490 specialMap[4004] = AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08));
491 specialMap[4005] = AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25));
492 specialMap[4006] = AliMUONSt1SpecialMotif(TVector2(0.28, 0.21));
5f91c9e8 493 AliMpReader reader2(kNonBendingPlane);
494 AliMpSector* sector2 = reader2.BuildSector();
ba030c0e 495
5f91c9e8 496 reflectZ = false;
497 where = TVector3(where.X()+0.63/2.,where.Y()+0.42/2., 0.); //add a half pad shift
498 PlaceSector(sector2, specialMap, where, reflectZ, chamber);
ba030c0e 499}
500
5f91c9e8 501//______________________________________________________________________________
502void AliMUONv2::CreateFoamBox(const char* name,const TVector2& dimensions)
ba030c0e 503{
5f91c9e8 504// create all the elements in the copper plane
505// --
ba030c0e 506
5f91c9e8 507 Int_t* idtmed = fIdtmed->GetArray()-1099;
508 Int_t idAir = idtmed[1100]; // medium 1
509 Int_t idFoam = idtmed[1115]; // medium 16 = Foam
510 Int_t idFR4 = idtmed[1114]; // medium 15 = FR4
ba030c0e 511
5f91c9e8 512 // mother volume
513 GReal_t par[3];
514 par[0] = dimensions.X();
515 par[1] = dimensions.Y();
516 par[2] = TotalHzPlane();
517 gMC->Gsvolu(name,"BOX",idAir,par,3);
518
519 // foam layer
520 GReal_t posX,posY,posZ;
521 char eName[5];
522 strcpy(eName,name);
523 eName[3]=fgkFoamLayerSuffix;
524 par[0] = dimensions.X();
525 par[1] = dimensions.Y();
526 par[2] = fgkHzFoam;
527 gMC->Gsvolu(eName,"BOX",idFoam,par,3);
528 posX=0.;
529 posY=0.;
530 posZ = -TotalHzPlane() + fgkHzFoam;
531 gMC->Gspos(eName,1,name,posX,posY,posZ,0,"ONLY");
ba030c0e 532
5f91c9e8 533 // mechanical plane FR4 layer
534 eName[3]='R';
535 par[0] = dimensions.X();
536 par[1] = dimensions.Y();
537 par[2] = fgkHzFR4;
538 gMC->Gsvolu(eName,"BOX",idFR4,par,3);
539 posX=0.;
540 posY=0.;
541 posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4;
542 gMC->Gspos(eName,1,name,posX,posY,posZ,0,"ONLY");
543}
ba030c0e 544
5f91c9e8 545//______________________________________________________________________________
546void AliMUONv2::CreatePlaneSegment(const char* name,const TVector2& dimensions,
547 Int_t nofHoles)
548{
549// Create a segment of a plane (this includes a foam layer,
550// holes in the foam to feed the kaptons through, kapton connectors
551// and the mother board.)
552// --
ba030c0e 553
5f91c9e8 554 CreateFoamBox(name,dimensions);
ba030c0e 555
5f91c9e8 556 char eName[5];
557 strcpy(eName,name);
558 eName[3]=fgkFoamLayerSuffix;
ba030c0e 559
5f91c9e8 560 for (Int_t holeNum=0;holeNum<nofHoles;holeNum++) {
561 GReal_t posX = ((2.*holeNum+1.)/nofHoles-1.)*dimensions.X();
562 GReal_t posY = 0.;
563 GReal_t posZ = 0.;
ba030c0e 564
5f91c9e8 565 gMC->Gspos(fgkHoleName,holeNum+1,eName,posX,posY,posZ,0,"ONLY");
566 }
ba030c0e 567}
568
5f91c9e8 569//______________________________________________________________________________
ba030c0e 570void AliMUONv2::CreateFrame(Int_t chamber)
571{
572// Create the non-sensitive elements of the frame for the <chamber>
5f91c9e8 573//
574//
575// Model and notation:
576//
577// The Quadrant volume name starts with SQ
578// The volume segments are numbered 00 to XX.
579//
580// OutTopFrame
581// (SQ02-16)
582// ------------
583// OutEdgeFrame / |
584// (SQ17-24) / | InVFrame (SQ00-01)
585// / |
586// | |
587// OutVFrame | _- -
588// (SQ25-39) | | InArcFrame (SQ42-45)
589// | |
590// -------------
591// InHFrame (SQ40-41)
592//
593//
594// 06 February 2003 - Overlapping volumes resolved.
595// One quarter chamber is comprised of three TUBS volumes: SQMx, SQNx, and SQFx,
596// where SQMx is the Quadrant Middle layer for chamber <x> ( posZ in [-3.25,3.25]),
597// SQNx is the Quadrant Near side layer for chamber <x> ( posZ in [-6.25,3-.25) ), and
598// SQFx is the Quadrant Far side layer for chamber <x> ( posZ in (3.25,6.25] ).
599//---
ba030c0e 600
5f91c9e8 601const Float_t fgkNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin
ba030c0e 602
ba030c0e 603 // tracking medias
604 Int_t* idtmed = fIdtmed->GetArray()-1099;
5f91c9e8 605
ba030c0e 606 Int_t idAir = idtmed[1100]; // medium 1
5f91c9e8 607 Int_t idFrameEpoxy = idtmed[1115]; // medium 16 = Frame Epoxy ME730
608 Int_t idInox = idtmed[1116]; // medium 17 Stainless Steel (18%Cr,9%Ni,Fe)
609 Int_t idFR4 = idtmed[1110]; // medium 11 FR4
610 Int_t idCopper = idtmed[1109]; // medium 10 Copper
611 Int_t idAlu = idtmed[1103]; // medium 4 Aluminium
612
613
614// Rotation Matrices
615 Int_t rot1, rot2, rot3;
616
617// Rotation matrices
618 AliMatrix(rot1, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane
619 AliMatrix(rot2, 90., 45., 90., 135., 0., 0.); // +45 deg in x-y plane
620 AliMatrix(rot3, 90., 45., 90., 315.,180., 0.); // +45 deg in x-y + rotation 180° around y
621
622// Translation matrices ... NOT USED
623// AliMatrix(trans1, 90., 0., 90., 90., 0., 0.); // X-> X; Y -> Y; Z -> Z
624// AliMatrix(trans2, 90., 180., 90., 90., 180., 0.); // X->-X; Y -> Y; Z ->-Z
625// AliMatrix(trans3, 90., 180., 90., 270., 0., 0.); // X->-X; Y ->-Y; Z -> Z
626// AliMatrix(trans4, 90., 0., 90., 270., 180., 0.); // X-> X; Y ->-Y; Z ->-Z
ba030c0e 627//
5f91c9e8 628 // ___________________Volume thicknesses________________________
ba030c0e 629
5f91c9e8 630 const Float_t hzFrameThickness = 1.59/2.; //equivalent thickness
631 const Float_t hzOuterFrameEpoxy = 1.19/2.; //equivalent thickness
632 const Float_t hzOuterFrameInox = 0.1/2.; //equivalent thickness
633 const Float_t hzFoam = 2.083/2.; //evaluated elsewhere
634
635// Pertaining to the top outer area
636 const Float_t hzTopAnodeSteel1 = 0.185/2.; //equivalent thickness
637 const Float_t hzTopAnodeSteel2 = 0.51/2.; //equivalent thickness
638 const Float_t hzAnodeFR4 = 0.08/2.; //equivalent thickness
639 const Float_t hzTopEarthFaceCu = 0.364/2.; //equivalent thickness
640 const Float_t hzTopEarthProfileCu = 1.1/2.; //equivalent thickness
641 const Float_t hzTopPositionerSteel = 1.45/2.; //should really be 2.125/2.;
642 const Float_t hzTopGasSupportAl = 0.85/2.; //equivalent thickness
643
644// Pertaining to the vertical outer area
645 const Float_t hzVerticalCradleAl = 0.8/2.; //equivalent thickness
646 const Float_t hzLateralSightAl = 0.975/2.; //equivalent thickness
647 const Float_t hzLateralPosnInoxFace = 2.125/2.;//equivalent thickness
648 const Float_t hzLatPosInoxProfM = 6.4/2.; //equivalent thickness
649 const Float_t hzLatPosInoxProfNF = 1.45/2.; //equivalent thickness
650 const Float_t hzLateralPosnAl = 0.5/2.; //equivalent thickness
651 const Float_t hzVertEarthFaceCu = 0.367/2.; //equivalent thickness
652 const Float_t hzVertBarSteel = 0.198/2.; //equivalent thickness
653 const Float_t hzVertEarthProfCu = 1.1/2.; //equivalent thickness
654
655 //_______________Parameter definitions in sequence _________
656
657// InVFrame parameters
658 const Float_t hxInVFrame = 1.85/2.;
659 const Float_t hyInVFrame = 73.95/2.;
ba030c0e 660 const Float_t hzInVFrame = hzFrameThickness;
661
5f91c9e8 662//Flat 7.5mm vertical section
663 const Float_t hxV1mm = 0.75/2.;
664 const Float_t hyV1mm = 1.85/2.;
ba030c0e 665 const Float_t hzV1mm = hzFrameThickness;
ba030c0e 666
5f91c9e8 667// OuterTopFrame Structure
668//
669// FRAME
670// The frame is composed of a cuboid and two trapezoids
671// (TopFrameAnode, TopFrameAnodeA, TopFrameAnodeB).
672// Each shape is composed of two layers (Epoxy and Inox) and
673// takes the frame's inner anode circuitry into account in the material budget.
674//
675// ANODE
676// The overhanging anode part is composed froma cuboid and two trapezoids
677// (TopAnode, TopAnode1, and TopAnode2). These surfaces neglect implanted
678// resistors, but accounts for the major Cu, Pb/Sn, and FR4 material
679// contributions.
680// The stainless steel anode supports have been included.
681//
682// EARTHING (TopEarthFace, TopEarthProfile)
683// Al GAS SUPPORT (TopGasSupport)
684//
685// ALIGNMENT (TopPositioner) - Alignment system, three sights per quarter
686// chamber. This sight is forseen for the alignment of the horizontal level
687// (parallel to the OY axis of LHC). Its position will be evaluated relative
688// to a system of sights places on the cradles;
689//
690//---
ba030c0e 691
5f91c9e8 692//TopFrameAnode parameters - cuboid, 2 layers
693 const Float_t hxTFA = 34.1433/2.;
694 const Float_t hyTFA = 7.75/2.;
695 const Float_t hzTFAE = hzOuterFrameEpoxy; // layer 1 thickness
696 const Float_t hzTFAI = hzOuterFrameInox; // layer 3 thickness
ba030c0e 697
5f91c9e8 698// TopFrameAnodeA parameters - trapezoid, 2 layers
699 const Float_t hzFAAE = hzOuterFrameEpoxy; // layer 1 thickness
700 const Float_t hzFAAI = hzOuterFrameInox; // layer 3 thickness
701 const Float_t tetFAA = 0.;
702 const Float_t phiFAA = 0.;
703 const Float_t h1FAA = 8.7/2.;
704 const Float_t bl1FAA = 4.35/2.;
705 const Float_t tl1FAA = 7.75/2.;
706 const Float_t alp1FAA = 11.06;
707 const Float_t h2FAA = 8.7/2.;
708 const Float_t bl2FAA = 4.35/2.;
709 const Float_t tl2FAA = 7.75/2.;
710 const Float_t alp2FAA = 11.06;
ba030c0e 711
5f91c9e8 712// TopFrameAnodeB parameters - trapezoid, 2 layers
713 const Float_t hzFABE = hzOuterFrameEpoxy; // layer 1 thickness
714 const Float_t hzFABI = hzOuterFrameInox; // layer 3 thickness
715 const Float_t tetFAB = 0.;
716 const Float_t phiFAB = 0.;
717 const Float_t h1FAB = 8.70/2.;
718 const Float_t bl1FAB = 0.;
719 const Float_t tl1FAB = 4.35/2.;
720 const Float_t alp1FAB = 14.03;
721 const Float_t h2FAB = 8.70/2.;
722 const Float_t bl2FAB = 0.;
723 const Float_t tl2FAB = 4.35/2.;
724 const Float_t alp2FAB = 14.03;
ba030c0e 725
5f91c9e8 726// TopAnode parameters - cuboid (part 1 of 3 parts)
727 const Float_t hxTA1 = 16.2/2.;
728 const Float_t hyTA1 = 3.5/2.;
729 const Float_t hzTA11 = hzTopAnodeSteel1; // layer 1
730 const Float_t hzTA12 = hzAnodeFR4; // layer 2
731
732// TopAnode parameters - trapezoid 1 (part 2 of 3 parts)
733 const Float_t hzTA21 = hzTopAnodeSteel2; // layer 1
734 const Float_t hzTA22 = hzAnodeFR4; // layer 2
735 const Float_t tetTA2 = 0.;
736 const Float_t phiTA2= 0.;
737 const Float_t h1TA2 = 7.268/2.;
738 const Float_t bl1TA2 = 2.03/2.;
739 const Float_t tl1TA2 = 3.5/2.;
740 const Float_t alp1TA2 = 5.78;
741 const Float_t h2TA2 = 7.268/2.;
742 const Float_t bl2TA2 = 2.03/2.;
743 const Float_t tl2TA2 = 3.5/2.;
744 const Float_t alp2TA2 = 5.78;
745
746// TopAnode parameters - trapezoid 2 (part 3 of 3 parts)
747 const Float_t hzTA3 = hzAnodeFR4; // layer 1
748 const Float_t tetTA3 = 0.;
749 const Float_t phiTA3 = 0.;
750 const Float_t h1TA3 = 7.268/2.;
751 const Float_t bl1TA3 = 0.;
752 const Float_t tl1TA3 = 2.03/2.;
753 const Float_t alp1TA3 = 7.95;
754 const Float_t h2TA3 = 7.268/2.;
755 const Float_t bl2TA3 = 0.;
756 const Float_t tl2TA3 = 2.03/2.;
757 const Float_t alp2TA3 = 7.95;
ba030c0e 758
5f91c9e8 759// TopEarthFace parameters - single trapezoid
760 const Float_t hzTEF = hzTopEarthFaceCu;
761 const Float_t tetTEF = 0.;
762 const Float_t phiTEF = 0.;
763 const Float_t h1TEF = 1.200/2.;
764 const Float_t bl1TEF = 21.323/2.;
765 const Float_t tl1TEF = 17.963/2.;
766 const Float_t alp1TEF = -54.46;
767 const Float_t h2TEF = 1.200/2.;
768 const Float_t bl2TEF = 21.323/2.;
769 const Float_t tl2TEF = 17.963/2.;
770 const Float_t alp2TEF = -54.46;
771
772// TopEarthProfile parameters - single trapezoid
773 const Float_t hzTEP = hzTopEarthProfileCu;
774 const Float_t tetTEP = 0.;
775 const Float_t phiTEP = 0.;
776 const Float_t h1TEP = 0.40/2.;
777 const Float_t bl1TEP = 31.766/2.;
778 const Float_t tl1TEP = 30.535/2.;
779 const Float_t alp1TEP = -56.98;
780 const Float_t h2TEP = 0.40/2.;
781 const Float_t bl2TEP = 31.766/2.;
782 const Float_t tl2TEP = 30.535/2.;
783 const Float_t alp2TEP = -56.98;
784
785// TopPositioner parameters - single Stainless Steel trapezoid
786 const Float_t hzTP = hzTopPositionerSteel;
787 const Float_t tetTP = 0.;
788 const Float_t phiTP = 0.;
789 const Float_t h1TP = 3.00/2.;
790 const Float_t bl1TP = 7.023/2.;
791 const Float_t tl1TP = 7.314/2.;
792 const Float_t alp1TP = 2.78;
793 const Float_t h2TP = 3.00/2.;
794 const Float_t bl2TP = 7.023/2.;
795 const Float_t tl2TP = 7.314/2.;
796 const Float_t alp2TP = 2.78;
797
798// TopGasSupport parameters - single cuboid
799 const Float_t hxTGS = 8.50/2.;
800 const Float_t hyTGS = 3.00/2.;
801 const Float_t hzTGS = hzTopGasSupportAl;
802
803// OutEdgeFrame parameters - 4 trapezoidal sections, 2 layers of material
804//
805//---
806
807// Trapezoid 1
808 const Float_t hzOETFE = hzOuterFrameEpoxy; // layer 1
809 const Float_t hzOETFI = hzOuterFrameInox; // layer 3
ba030c0e 810
5f91c9e8 811 const Float_t tetOETF = 0.; // common to all 4 trapezoids
812 const Float_t phiOETF = 0.; // common to all 4 trapezoids
813
814 const Float_t h1OETF = 7.196/2.; // common to all 4 trapezoids
815 const Float_t h2OETF = 7.196/2.; // common to all 4 trapezoids
816
817 const Float_t bl1OETF1 = 3.75/2;
818 const Float_t tl1OETF1 = 3.996/2.;
819 const Float_t alp1OETF1 = 0.98;
820
821 const Float_t bl2OETF1 = 3.75/2;
822 const Float_t tl2OETF1 = 3.996/2.;
823 const Float_t alp2OETF1 = 0.98;
824
825// Trapezoid 2
826 const Float_t bl1OETF2 = 3.01/2.;
827 const Float_t tl1OETF2 = 3.75/2;
828 const Float_t alp1OETF2 = 2.94;
829
830 const Float_t bl2OETF2 = 3.01/2.;
831 const Float_t tl2OETF2 = 3.75/2;
832 const Float_t alp2OETF2 = 2.94;
833
834// Trapezoid 3
835 const Float_t bl1OETF3 = 1.767/2.;
836 const Float_t tl1OETF3 = 3.01/2.;
837 const Float_t alp1OETF3 = 4.94;
ba030c0e 838
5f91c9e8 839 const Float_t bl2OETF3 = 1.767/2.;
840 const Float_t tl2OETF3 = 3.01/2.;
841 const Float_t alp2OETF3 = 4.94;
ba030c0e 842
5f91c9e8 843// Trapezoid 4
ba030c0e 844 const Float_t bl1OETF4 = 0.;
5f91c9e8 845 const Float_t tl1OETF4 = 1.77/2.;
846 const Float_t alp1OETF4 = 7.01;
ba030c0e 847
848 const Float_t bl2OETF4 = 0.;
5f91c9e8 849 const Float_t tl2OETF4 = 1.77/2.;
850 const Float_t alp2OETF4 = 7.01;
851
852// Frame Structure (OutVFrame):
853//
854// OutVFrame and corner (OutVFrame cuboid, OutVFrame trapezoid)
855// EARTHING (VertEarthFaceCu,VertEarthSteel,VertEarthProfCu),
856// DETECTOR POSITIONNING (SuppLateralPositionner, LateralPositionner),
857// CRADLE (VertCradle), and
858// ALIGNMENT (LateralSightSupport, LateralSight)
859//
860//---
861
862// OutVFrame parameters - cuboid
863 const Float_t hxOutVFrame = 1.85/2.;
864 const Float_t hyOutVFrame = 46.23/2.;
865 const Float_t hzOutVFrame = hzFrameThickness;
866
867// OutVFrame corner parameters - trapezoid
ba030c0e 868 const Float_t hzOCTF = hzFrameThickness;
869 const Float_t tetOCTF = 0.;
870 const Float_t phiOCTF = 0.;
5f91c9e8 871 const Float_t h1OCTF = 1.85/2.;
ba030c0e 872 const Float_t bl1OCTF = 0.;
5f91c9e8 873 const Float_t tl1OCTF = 3.66/2.;
874 const Float_t alp1OCTF = 44.67;
875 const Float_t h2OCTF = 1.85/2.;
ba030c0e 876 const Float_t bl2OCTF = 0.;
5f91c9e8 877 const Float_t tl2OCTF = 3.66/2.;
878 const Float_t alp2OCTF = 44.67;
879
880// VertEarthFaceCu parameters - single trapezoid
881 const Float_t hzVFC = hzVertEarthFaceCu;
882 const Float_t tetVFC = 0.;
883 const Float_t phiVFC = 0.;
884 const Float_t h1VFC = 1.200/2.;
885 const Float_t bl1VFC = 46.11/2.;
886 const Float_t tl1VFC = 48.236/2.;
887 const Float_t alp1VFC = 41.54;
888 const Float_t h2VFC = 1.200/2.;
889 const Float_t bl2VFC = 46.11/2.;
890 const Float_t tl2VFC = 48.236/2.;
891 const Float_t alp2VFC = 41.54;
892
893// VertEarthSteel parameters - single trapezoid
894 const Float_t hzVES = hzVertBarSteel;
895 const Float_t tetVES = 0.;
896 const Float_t phiVES = 0.;
897 const Float_t h1VES = 1.200/2.;
898 const Float_t bl1VES = 30.486/2.;
899 const Float_t tl1VES = 32.777/2.;
900 const Float_t alp1VES = 43.67;
901 const Float_t h2VES = 1.200/2.;
902 const Float_t bl2VES = 30.486/2.;
903 const Float_t tl2VES = 32.777/2.;
904 const Float_t alp2VES = 43.67;
905
906// VertEarthProfCu parameters - single trapezoid
907 const Float_t hzVPC = hzVertEarthProfCu;
908 const Float_t tetVPC = 0.;
909 const Float_t phiVPC = 0.;
910 const Float_t h1VPC = 0.400/2.;
911 const Float_t bl1VPC = 29.287/2.;
912 const Float_t tl1VPC = 30.091/2.;
913 const Float_t alp1VPC = 45.14;
914 const Float_t h2VPC = 0.400/2.;
915 const Float_t bl2VPC = 29.287/2.;
916 const Float_t tl2VPC = 30.091/2.;
917 const Float_t alp2VPC = 45.14;
918
919// SuppLateralPositionner - single cuboid
920 const Float_t hxSLP = 2.80/2.;
921 const Float_t hySLP = 5.00/2.;
922 const Float_t hzSLP = hzLateralPosnAl;
923
924// LateralPositionner - squared off U bend, face view
925 const Float_t hxLPF = 5.2/2.;
926 const Float_t hyLPF = 3.0/2.;
927 const Float_t hzLPF = hzLateralPosnInoxFace;
928
929// LateralPositionner - squared off U bend, profile view
930 const Float_t hxLPP = 0.425/2.;
931 const Float_t hyLPP = 3.0/2.;
932 const Float_t hzLPP = hzLatPosInoxProfM; // middle layer
933 const Float_t hzLPNF = hzLatPosInoxProfNF; // near and far layers
934
935// VertCradle, 3 layers (copies), each composed of 4 trapezoids
936// VertCradleA
937 const Float_t hzVC1 = hzVerticalCradleAl;
938 const Float_t tetVC1 = 0.;
939 const Float_t phiVC1 = 0.;
940 const Float_t h1VC1 = 10.25/2.;
941 const Float_t bl1VC1 = 3.70/2.;
942 const Float_t tl1VC1 = 0.;
943 const Float_t alp1VC1 = -10.23;
944 const Float_t h2VC1 = 10.25/2.;
945 const Float_t bl2VC1 = 3.70/2.;
946 const Float_t tl2VC1 = 0.;
947 const Float_t alp2VC1 = -10.23;
948
949// VertCradleB
950 const Float_t hzVC2 = hzVerticalCradleAl;
951 const Float_t tetVC2 = 0.;
952 const Float_t phiVC2 = 0.;
953 const Float_t h1VC2 = 10.25/2.;
954 const Float_t bl1VC2 = 6.266/2.;
955 const Float_t tl1VC2 = 3.70/2.;
956 const Float_t alp1VC2 = -7.13;
957 const Float_t h2VC2 = 10.25/2.;
958 const Float_t bl2VC2 = 6.266/2.;
959 const Float_t tl2VC2 = 3.70/2.;
960 const Float_t alp2VC2 = -7.13;
961
962// VertCradleC
963 const Float_t hzVC3 = hzVerticalCradleAl;
964 const Float_t tetVC3 = 0.;
965 const Float_t phiVC3 = 0.;
966 const Float_t h1VC3 = 10.25/2.;
967 const Float_t bl1VC3 = 7.75/2.;
968 const Float_t tl1VC3 = 6.266/2.;
969 const Float_t alp1VC3 = -4.14;
970 const Float_t h2VC3 = 10.25/2.;
971 const Float_t bl2VC3 = 7.75/2.;
972 const Float_t tl2VC3 = 6.266/2.;
973 const Float_t alp2VC3 = -4.14;
974
975// VertCradleD
976 const Float_t hzVC4 = hzVerticalCradleAl;
977 const Float_t tetVC4 = 0.;
978 const Float_t phiVC4 = 0.;
979 const Float_t h1VC4 = 10.27/2.;
980 const Float_t bl1VC4 = 8.273/2.;
981 const Float_t tl1VC4 = 7.75/2.;
982 const Float_t alp1VC4 = -1.46;
983 const Float_t h2VC4 = 10.27/2.;
984 const Float_t bl2VC4 = 8.273/2.;
985 const Float_t tl2VC4 = 7.75/2.;
986 const Float_t alp2VC4 = -1.46;
987
988// LateralSightSupport - single trapezoid
989 const Float_t hzVSS = hzLateralSightAl;
990 const Float_t tetVSS = 0.;
991 const Float_t phiVSS = 0.;
992 const Float_t h1VSS = 5.00/2.;
993 const Float_t bl1VSS = 7.747/2;
994 const Float_t tl1VSS = 7.188/2.;
995 const Float_t alp1VSS = -3.20;
996 const Float_t h2VSS = 5.00/2.;
997 const Float_t bl2VSS = 7.747/2.;
998 const Float_t tl2VSS = 7.188/2.;
999 const Float_t alp2VSS = -3.20;
1000
1001// LateralSight (reference point) - 3 per quadrant, only 1 programmed for now
1002 const Float_t VSInRad = 0.6;
1003 const Float_t VSOutRad = 1.3;
1004 const Float_t VSLen = hzFrameThickness;
1005
1006//---
ba030c0e 1007
5f91c9e8 1008// InHFrame parameters
1009 const Float_t hxInHFrame = 75.8/2.;
1010 const Float_t hyInHFrame = 1.85/2.;
1011 const Float_t hzInHFrame = hzFrameThickness;
1012
1013//Flat 7.5mm horizontal section
1014 const Float_t hxH1mm = 1.85/2.;
1015 const Float_t hyH1mm = 0.75/2.;
1016 const Float_t hzH1mm = hzFrameThickness;
ba030c0e 1017
5f91c9e8 1018//---
ba030c0e 1019
5f91c9e8 1020// InArcFrame parameters
1021 const Float_t IAF = 15.70;
1022 const Float_t OAF = 17.55;
1023 const Float_t hzAF = hzFrameThickness;
1024 const Float_t AFphi1 = 0.0;
1025 const Float_t AFphi2 = 90.0;
ba030c0e 1026
5f91c9e8 1027//---
ba030c0e 1028
5f91c9e8 1029// ScrewsInFrame parameters HEAD
1030 const Float_t SCRUHMI = 0.;
1031 const Float_t SCRUHMA = 0.690/2.;
1032 const Float_t SCRUHLE = 0.4/2.;
1033// ScrewsInFrame parameters MIDDLE
1034 const Float_t SCRUMMI = 0.;
1035 const Float_t SCRUMMA = 0.39/2.;
1036 const Float_t SCRUMLE = hzFrameThickness;
1037// ScrewsInFrame parameters NUT
1038 const Float_t SCRUNMI = 0.;
1039 const Float_t SCRUNMA = 0.78/2.;
1040 const Float_t SCRUNLE = 0.8/2.;
1041
1042 // ___________________Make volumes________________________
ba030c0e 1043
5f91c9e8 1044 Float_t par[11];
1045 Float_t posX,posY,posZ;
ba030c0e 1046
5f91c9e8 1047// Quadrant volume TUBS1, positioned at the end
1048 par[0] = fgkMotherIR1;
1049 par[1] = fgkMotherOR1;
1050 par[2] = fgkMotherThick1;
1051 par[3] = fgkMotherPhiL1;
1052 par[4] = fgkMotherPhiU1;
1053 gMC->Gsvolu(QuadrantMLayerName(chamber),"TUBS",idAir,par,5);
ba030c0e 1054
5f91c9e8 1055// Quadrant volume TUBS2, positioned at the end
1056 par[0] = fgkMotherIR2;
1057 par[1] = fgkMotherOR2;
1058 par[2] = fgkMotherThick2;
1059 par[3] = fgkMotherPhiL2;
1060 par[4] = fgkMotherPhiU2;
ba030c0e 1061
5f91c9e8 1062 gMC->Gsvolu(QuadrantNLayerName(chamber),"TUBS",idAir,par,5);
1063 gMC->Gsvolu(QuadrantFLayerName(chamber),"TUBS",idAir,par,5);
ba030c0e 1064
5f91c9e8 1065 if (chamber==1) {
1066 // InVFrame
1067 par[0] = hxInVFrame;
1068 par[1] = hyInVFrame;
1069 par[2] = hzInVFrame;
1070 gMC->Gsvolu("SQ00","BOX",idFrameEpoxy,par,3);
1071
1072 //Flat 1mm vertical section
1073 par[0] = hxV1mm;
1074 par[1] = hyV1mm;
1075 par[2] = hzV1mm;
1076 gMC->Gsvolu("SQ01","BOX",idFrameEpoxy,par,3);
1077
1078// OutTopFrame
1079//
1080// - 3 components (a cuboid and 2 trapezes) and 2 layers (Epoxy/Inox)
1081//
1082//---
ba030c0e 1083
5f91c9e8 1084 // TopFrameAnode - layer 1 of 2
1085 par[0] = hxTFA;
1086 par[1] = hyTFA;
1087 par[2] = hzTFAE;
1088 gMC->Gsvolu("SQ02","BOX",idFrameEpoxy,par,3);
1089
1090 // TopFrameAnode - layer 2 of 2
1091 par[2] = hzTFAI;
1092 gMC->Gsvolu("SQ03","BOX",idInox,par,3);
1093
1094 // TopFrameAnodeA - layer 1 of 2
1095 par[0] = hzFAAE;
1096 par[1] = tetFAA;
1097 par[2] = phiFAA;
1098 par[3] = h1FAA;
1099 par[4] = bl1FAA;
1100 par[5] = tl1FAA;
1101 par[6] = alp1FAA;
1102 par[7] = h2FAA;
1103 par[8] = bl2FAA;
1104 par[9] = tl2FAA;
1105 par[10] = alp2FAA;
1106 gMC->Gsvolu("SQ04","TRAP",idFrameEpoxy,par,11);
1107
1108 // TopFrameAnodeA - layer 2 of 2
1109 par[0] = hzFAAI;
1110 gMC->Gsvolu("SQ05","TRAP",idInox,par,11);
ba030c0e 1111
5f91c9e8 1112 // TopFrameAnodeB - layer 1 of 2
1113 par[0] = hzFABE;
1114 par[1] = tetFAB;
1115 par[2] = phiFAB;
1116 par[3] = h1FAB;
1117 par[4] = bl1FAB;
1118 par[5] = tl1FAB;
1119 par[6] = alp1FAB;
1120 par[7] = h2FAB;
1121 par[8] = bl2FAB;
1122 par[9] = tl2FAB;
1123 par[10] = alp2FAB;
1124 gMC->Gsvolu("SQ06","TRAP",idFrameEpoxy,par,11);
1125
1126 // OutTopTrapFrameB - layer 2 of 2
1127 par[0] = hzFABI;
1128 gMC->Gsvolu("SQ07","TRAP",idInox,par,11);
1129
1130 // TopAnode1 - layer 1 of 2
1131 par[0] = hxTA1;
1132 par[1] = hyTA1;
1133 par[2] = hzTA11;
1134 gMC->Gsvolu("SQ08","BOX",idInox,par,3);
1135
1136 // TopAnode1 - layer 2 of 2
1137 par[2] = hzTA12;
1138 gMC->Gsvolu("SQ09","BOX",idFR4,par,11);
1139
1140 // TopAnode2 - layer 1 of 2
1141 par[0] = hzTA21;
1142 par[1] = tetTA2;
1143 par[2] = phiTA2;
1144 par[3] = h1TA2;
1145 par[4] = bl1TA2;
1146 par[5] = tl1TA2;
1147 par[6] = alp1TA2;
1148 par[7] = h2TA2;
1149 par[8] = bl2TA2;
1150 par[9] = tl2TA2;
1151 par[10] = alp2TA2;
1152 gMC->Gsvolu("SQ10","TRAP",idInox,par,11);
1153
1154 // TopAnode2 - layer 2 of 2
1155 par[0] = hzTA22;
1156 gMC->Gsvolu("SQ11","TRAP",idFR4,par,11);
1157
1158 // TopAnode3 - layer 1 of 1
1159 par[0] = hzTA3;
1160 par[1] = tetTA3;
1161 par[2] = phiTA3;
1162 par[3] = h1TA3;
1163 par[4] = bl1TA3;
1164 par[5] = tl1TA3;
1165 par[6] = alp1TA3;
1166 par[7] = h2TA3;
1167 par[8] = bl2TA3;
1168 par[9] = tl2TA3;
1169 par[10] = alp2TA3;
1170 gMC->Gsvolu("SQ12","TRAP",idFR4,par,11);
1171
1172 // TopEarthFace
1173 par[0] = hzTEF;
1174 par[1] = tetTEF;
1175 par[2] = phiTEF;
1176 par[3] = h1TEF;
1177 par[4] = bl1TEF;
1178 par[5] = tl1TEF;
1179 par[6] = alp1TEF;
1180 par[7] = h2TEF;
1181 par[8] = bl2TEF;
1182 par[9] = tl2TEF;
1183 par[10] = alp2TEF;
1184 gMC->Gsvolu("SQ13","TRAP",idCopper,par,11);
1185
1186 // TopEarthProfile
1187 par[0] = hzTEP;
1188 par[1] = tetTEP;
1189 par[2] = phiTEP;
1190 par[3] = h1TEP;
1191 par[4] = bl1TEP;
1192 par[5] = tl1TEP;
1193 par[6] = alp1TEP;
1194 par[7] = h2TEP;
1195 par[8] = bl2TEP;
1196 par[9] = tl2TEP;
1197 par[10] = alp2TEP;
1198 gMC->Gsvolu("SQ14","TRAP",idCopper,par,11);
1199
1200 // TopGasSupport
1201 par[0] = hxTGS;
1202 par[1] = hyTGS;
1203 par[2] = hzTGS;
1204 gMC->Gsvolu("SQ15","BOX",idAlu,par,3);
1205
1206 // TopPositioner parameters - single Stainless Steel trapezoid
1207 par[0] = hzTP;
1208 par[1] = tetTP;
1209 par[2] = phiTP;
1210 par[3] = h1TP;
1211 par[4] = bl1TP;
1212 par[5] = tl1TP;
1213 par[6] = alp1TP;
1214 par[7] = h2TP;
1215 par[8] = bl2TP;
1216 par[9] = tl2TP;
1217 par[10] = alp2TP;
1218 gMC->Gsvolu("SQ16","TRAP",idInox,par,11);
ba030c0e 1219
5f91c9e8 1220//
1221// OutEdgeTrapFrame Epoxy = (4 trapezes)*2 copies*2 layers (Epoxy/Inox)
1222//
1223//---
1224 // Trapezoid 1 - 2 layers
1225 par[1] = tetOETF;
1226 par[2] = phiOETF;
1227 par[3] = h1OETF;
1228 par[4] = bl1OETF1;
1229 par[5] = tl1OETF1;
1230 par[6] = alp1OETF1;
1231 par[7] = h2OETF;
1232 par[8] = bl2OETF1;
1233 par[9] = tl2OETF1;
1234 par[10] = alp2OETF1;
1235
1236 par[0] = hzOETFE;
1237 gMC->Gsvolu("SQ17","TRAP",idFrameEpoxy,par,11);
1238 par[0] = hzOETFI;
1239 gMC->Gsvolu("SQ18","TRAP",idInox,par,11);
1240
1241 // Trapezoid 2 - 2 layers
1242 par[4] = bl1OETF2;
1243 par[5] = tl1OETF2;
1244 par[6] = alp1OETF2;
1245
1246 par[8] = bl2OETF2;
1247 par[9] = tl2OETF2;
1248 par[10] = alp2OETF2;
1249
1250 par[0] = hzOETFE;
1251 gMC->Gsvolu("SQ19","TRAP",idFrameEpoxy,par,11);
1252 par[0] = hzOETFI;
1253 gMC->Gsvolu("SQ20","TRAP",idInox,par,11);
1254
1255 // Trapezoid 3 - 2 layers
1256 par[4] = bl1OETF3;
1257 par[5] = tl1OETF3;
1258 par[6] = alp1OETF3;
1259
1260 par[8] = bl2OETF3;
1261 par[9] = tl2OETF3;
1262 par[10] = alp2OETF3;
1263
1264 par[0] = hzOETFE;
1265 gMC->Gsvolu("SQ21","TRAP",idFrameEpoxy,par,11);
1266 par[0] = hzOETFI;
1267 gMC->Gsvolu("SQ22","TRAP",idInox,par,11);
1268
1269 // Trapezoid 4 - 2 layers
ba030c0e 1270
5f91c9e8 1271 par[4] = bl1OETF4;
1272 par[5] = tl1OETF4;
1273 par[6] = alp1OETF4;
ba030c0e 1274
5f91c9e8 1275 par[8] = bl2OETF4;
1276 par[9] = tl2OETF4;
1277 par[10] = alp2OETF4;
1278
1279 par[0] = hzOETFE;
1280 gMC->Gsvolu("SQ23","TRAP",idFrameEpoxy,par,11);
1281 par[0] = hzOETFI;
1282 gMC->Gsvolu("SQ24","TRAP",idInox,par,11);
ba030c0e 1283
5f91c9e8 1284//---
1285 // OutVFrame
1286 par[0] = hxOutVFrame;
1287 par[1] = hyOutVFrame;
1288 par[2] = hzOutVFrame;
1289 gMC->Gsvolu("SQ25","BOX",idFrameEpoxy,par,3);
1290
1291 // OutVFrame corner
1292 par[0] = hzOCTF;
1293 par[1] = tetOCTF;
1294 par[2] = phiOCTF;
1295 par[3] = h1OCTF;
1296 par[4] = bl1OCTF;
1297 par[5] = tl1OCTF;
1298 par[6] = alp1OCTF;
1299 par[7] = h2OCTF;
1300 par[8] = bl2OCTF;
1301 par[9] = tl2OCTF;
1302 par[10] = alp2OCTF;
1303 gMC->Gsvolu("SQ26","TRAP",idFrameEpoxy,par,11);
1304
1305 // EarthFaceCu trapezoid
1306 par[0] = hzVFC;
1307 par[1] = tetVFC;
1308 par[2] = phiVFC;
1309 par[3] = h1VFC;
1310 par[4] = bl1VFC;
1311 par[5] = tl1VFC;
1312 par[6] = alp1VFC;
1313 par[7] = h2VFC;
1314 par[8] = bl2VFC;
1315 par[9] = tl2VFC;
1316 par[10] = alp2VFC;
1317 gMC->Gsvolu("SQ27","TRAP",idCopper,par,11);
1318
1319 // VertEarthSteel trapezoid
1320 par[0] = hzVES;
1321 par[1] = tetVES;
1322 par[2] = phiVES;
1323 par[3] = h1VES;
1324 par[4] = bl1VES;
1325 par[5] = tl1VES;
1326 par[6] = alp1VES;
1327 par[7] = h2VES;
1328 par[8] = bl2VES;
1329 par[9] = tl2VES;
1330 par[10] = alp2VES;
1331 gMC->Gsvolu("SQ28","TRAP",idInox,par,11);
1332
1333 // VertEarthProfCu trapezoid
1334 par[0] = hzVPC;
1335 par[1] = tetVPC;
1336 par[2] = phiVPC;
1337 par[3] = h1VPC;
1338 par[4] = bl1VPC;
1339 par[5] = tl1VPC;
1340 par[6] = alp1VPC;
1341 par[7] = h2VPC;
1342 par[8] = bl2VPC;
1343 par[9] = tl2VPC;
1344 par[10] = alp2VPC;
1345 gMC->Gsvolu("SQ29","TRAP",idCopper,par,11);
1346
1347 // SuppLateralPositionner cuboid
1348 par[0] = hxSLP;
1349 par[1] = hySLP;
1350 par[2] = hzSLP;
1351 gMC->Gsvolu("SQ30","BOX",idAlu,par,3);
1352
1353 // LateralPositionerFace
1354 par[0] = hxLPF;
1355 par[1] = hyLPF;
1356 par[2] = hzLPF;
1357 gMC->Gsvolu("SQ31","BOX",idInox,par,3);
1358
1359 // LateralPositionerProfile
1360 par[0] = hxLPP;
1361 par[1] = hyLPP;
1362 par[2] = hzLPP;
1363 gMC->Gsvolu("SQ32","BOX",idInox,par,3); // middle layer
1364
1365 par[0] = hxLPP;
1366 par[1] = hyLPP;
1367 par[2] = hzLPNF;
1368 gMC->Gsvolu("SQ33","BOX",idInox,par,3); // near and far layers
1369
1370 // VertCradleA - 1st trapezoid
1371 par[0] = hzVC1;
1372 par[1] = tetVC1;
1373 par[2] = phiVC1;
1374 par[3] = h1VC1;
1375 par[4] = bl1VC1;
1376 par[5] = tl1VC1;
1377 par[6] = alp1VC1;
1378 par[7] = h2VC1;
1379 par[8] = bl2VC1;
1380 par[9] = tl2VC1;
1381 par[10] = alp2VC1;
1382 gMC->Gsvolu("SQ34","TRAP",idAlu,par,11);
ba030c0e 1383
5f91c9e8 1384 // VertCradleB - 2nd trapezoid
1385 par[0] = hzVC2;
1386 par[1] = tetVC2;
1387 par[2] = phiVC2;
1388 par[3] = h1VC2;
1389 par[4] = bl1VC2;
1390 par[5] = tl1VC2;
1391 par[6] = alp1VC2;
1392 par[7] = h2VC2;
1393 par[8] = bl2VC2;
1394 par[9] = tl2VC2;
1395 par[10] = alp2VC2;
1396 gMC->Gsvolu("SQ35","TRAP",idAlu,par,11);
1397
1398 // VertCradleC - 3rd trapezoid
1399 par[0] = hzVC3;
1400 par[1] = tetVC3;
1401 par[2] = phiVC3;
1402 par[3] = h1VC3;
1403 par[4] = bl1VC3;
1404 par[5] = tl1VC3;
1405 par[6] = alp1VC3;
1406 par[7] = h2VC3;
1407 par[8] = bl2VC3;
1408 par[9] = tl2VC3;
1409 par[10] = alp2VC3;
1410 gMC->Gsvolu("SQ36","TRAP",idAlu,par,11);
1411
1412 // VertCradleD - 4th trapezoid
1413 par[0] = hzVC4;
1414 par[1] = tetVC4;
1415 par[2] = phiVC4;
1416 par[3] = h1VC4;
1417 par[4] = bl1VC4;
1418 par[5] = tl1VC4;
1419 par[6] = alp1VC4;
1420 par[7] = h2VC4;
1421 par[8] = bl2VC4;
1422 par[9] = tl2VC4;
1423 par[10] = alp2VC4;
1424 gMC->Gsvolu("SQ37","TRAP",idAlu,par,11);
1425
1426 // LateralSightSupport trapezoid
1427 par[0] = hzVSS;
1428 par[1] = tetVSS;
1429 par[2] = phiVSS;
1430 par[3] = h1VSS;
1431 par[4] = bl1VSS;
1432 par[5] = tl1VSS;
1433 par[6] = alp1VSS;
1434 par[7] = h2VSS;
1435 par[8] = bl2VSS;
1436 par[9] = tl2VSS;
1437 par[10] = alp2VSS;
1438 gMC->Gsvolu("SQ38","TRAP",idAlu,par,11);
1439
1440 // LateralSight
1441 par[0] = VSInRad;
1442 par[1] = VSOutRad;
1443 par[2] = VSLen;
1444 gMC->Gsvolu("SQ39","TUBE",idFrameEpoxy,par,3);
1445
1446//---
1447 // InHFrame
1448 par[0] = hxInHFrame;
1449 par[1] = hyInHFrame;
1450 par[2] = hzInHFrame;
1451 gMC->Gsvolu("SQ40","BOX",idFrameEpoxy,par,3);
1452
1453 //Flat 7.5mm horizontal section
1454 par[0] = hxH1mm;
1455 par[1] = hyH1mm;
1456 par[2] = hzH1mm;
1457 gMC->Gsvolu("SQ41","BOX",idFrameEpoxy,par,3);
1458
1459 // InArcFrame
1460 par[0] = IAF;
1461 par[1] = OAF;
1462 par[2] = hzAF;
1463 par[3] = AFphi1;
1464 par[4] = AFphi2;
1465
1466 gMC->Gsvolu("SQ42","TUBS",idFrameEpoxy,par,5);
1467
1468//---
1469 // ScrewsInFrame - 3 sections in order to avoid overlapping volumes
1470 // Screw Head, in air
1471 par[0] = SCRUHMI;
1472 par[1] = SCRUHMA;
1473 par[2] = SCRUHLE;
1474
1475 gMC->Gsvolu("SQ43","TUBE",idInox,par,3);
1476
1477 // Middle part, in the Epoxy
1478 par[0] = SCRUMMI;
1479 par[1] = SCRUMMA;
1480 par[2] = SCRUMLE;
1481 gMC->Gsvolu("SQ44","TUBE",idInox,par,3);
1482
1483 // Screw nut, in air
1484 par[0] = SCRUNMI;
1485 par[1] = SCRUNMA;
1486 par[2] = SCRUNLE;
1487 gMC->Gsvolu("SQ45","TUBE",idInox,par,3);
1488 }
1489
1490// __________________Place volumes in the quadrant ____________
1491
1492 // InVFrame
ba030c0e 1493 posX = hxInVFrame;
1494 posY = 2.0*hyInHFrame+2.*hyH1mm+IAF+hyInVFrame;
5f91c9e8 1495 posZ = 0.;
1496 gMC->Gspos("SQ00",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
ba030c0e 1497
5f91c9e8 1498 //Flat 7.5mm vertical section
1499 posX = 2.0*hxInVFrame+hxV1mm;
1500 posY = 2.0*hyInHFrame+2.*hyH1mm+IAF+hyV1mm;
1501 posZ = 0.;
1502 gMC->Gspos("SQ01",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
1503
1504 // TopFrameAnode place 2 layers of TopFrameAnode cuboids
1505 posX = hxTFA;
1506 posY = 2.*hyInHFrame+2.*hyH1mm+IAF+2.*hyInVFrame+hyTFA;
1507 posZ = hzOuterFrameInox;
1508 gMC->Gspos("SQ02",1,QuadrantMLayerName(chamber),posX, posY, posZ,0,"ONLY");
1509 posZ = posZ+hzOuterFrameInox;
1510 gMC->Gspos("SQ03",1,QuadrantMLayerName(chamber),posX, posY, posZ,0,"ONLY");
1511
1512 // place 2 layers of TopFrameAnodeA trapezoids
1513 posX = 35.8932+fgkDeltaQuadLHC;
1514 posY = 92.6745+fgkDeltaQuadLHC;
1515 posZ = hzOuterFrameInox;
1516 gMC->Gspos("SQ04",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1517 posZ = posZ+hzOuterFrameInox;
1518 gMC->Gspos("SQ05",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1519
1520 // place 2 layers of TopFrameAnodeB trapezoids
1521 posX = 44.593+fgkDeltaQuadLHC;
1522 posY = 90.737+fgkDeltaQuadLHC;
1523 posZ = hzOuterFrameInox;
1524 gMC->Gspos("SQ06",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1525 posZ = posZ+hzOuterFrameInox;
1526 gMC->Gspos("SQ07",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1527
1528 // TopAnode1 place 2 layers
1529 posX = 6.8+fgkDeltaQuadLHC;
1530 posY = 99.85+fgkDeltaQuadLHC;
1531 posZ = -1.*hzAnodeFR4;
1532 gMC->Gspos("SQ08",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1533 posZ = posZ+hzTopAnodeSteel1;
1534 gMC->Gspos("SQ09",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1535
1536 // TopAnode2 place 2 layers
1537 posX = 18.534+fgkDeltaQuadLHC;
1538 posY = 99.482+fgkDeltaQuadLHC;
1539 posZ = -1.*hzAnodeFR4;
1540 gMC->Gspos("SQ10",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1541 posZ = posZ+hzTopAnodeSteel2;
1542 gMC->Gspos("SQ11",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1543
1544 // TopAnode3 place 1 layer
1545 posX = 25.80+fgkDeltaQuadLHC;
1546 posY = 98.61+fgkDeltaQuadLHC;
1547 posZ = 0.;
1548 gMC->Gspos("SQ12",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1549
1550 // TopEarthFace - 2 copies
1551 posX = 23.122+fgkDeltaQuadLHC;
1552 posY = 96.90+fgkDeltaQuadLHC;
1553 posZ = hzOuterFrameEpoxy+hzOuterFrameInox+hzTopEarthFaceCu;
1554 gMC->Gspos("SQ13",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1555 posZ = -1.*posZ;
1556 gMC->Gspos("SQ13",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1557
1558 // TopEarthProfile
1559 posX = 14.475+fgkDeltaQuadLHC;
1560 posY = 97.900+fgkDeltaQuadLHC;
1561 posZ = hzTopEarthProfileCu;
1562 gMC->Gspos("SQ14",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1563 posZ = -1.0*posZ;
1564 gMC->Gspos("SQ14",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1565
1566 // TopGasSupport - 2 copies
1567 posX = 4.9500+fgkDeltaQuadLHC;
1568 posY = 96.200+fgkDeltaQuadLHC;
1569 posZ = hzOuterFrameEpoxy+hzOuterFrameInox+hzTopGasSupportAl;
1570 gMC->Gspos("SQ15",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1571 posZ = -1.*posZ;
1572 gMC->Gspos("SQ15",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1573
1574 // TopPositioner parameters - single Stainless Steel trapezoid - 2 copies
1575 posX = 7.60+fgkDeltaQuadLHC;
1576 posY = 98.98+fgkDeltaQuadLHC;
1577 posZ = hzOuterFrameEpoxy+hzOuterFrameInox+2.*hzTopGasSupportAl+hzTopPositionerSteel;
1578 gMC->Gspos("SQ16",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1579 posZ = -1.*posZ;
1580 gMC->Gspos("SQ16",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1581
1582 // OutEdgeFrame
1583 Float_t XCenter[8];
1584 Float_t YCenter[8];
1585
1586 XCenter[0] = 73.201 + fgkDeltaQuadLHC;
1587 XCenter[1] = 78.124 + fgkDeltaQuadLHC;
1588 XCenter[2] = 82.862 + fgkDeltaQuadLHC;
1589 XCenter[3] = 87.418 + fgkDeltaQuadLHC;
1590
1591 YCenter[0] = 68.122 + fgkDeltaQuadLHC;
1592 YCenter[1] = 62.860 + fgkDeltaQuadLHC;
1593 YCenter[2] = 57.420 + fgkDeltaQuadLHC;
1594 YCenter[3] = 51.800 + fgkDeltaQuadLHC;
1595
1596 XCenter[4] = 68.122 + fgkDeltaQuadLHC;
1597 XCenter[5] = 62.860 + fgkDeltaQuadLHC;
1598 XCenter[6] = 57.420 + fgkDeltaQuadLHC;
1599 XCenter[7] = 51.800 + fgkDeltaQuadLHC;
1600
1601 YCenter[4] = 73.210 + fgkDeltaQuadLHC;
1602 YCenter[5] = 78.124 + fgkDeltaQuadLHC;
1603 YCenter[6] = 82.862 + fgkDeltaQuadLHC;
1604 YCenter[7] = 87.418 + fgkDeltaQuadLHC;
1605
1606 posZ = -1.0*hzOuterFrameInox;
1607 gMC->Gspos("SQ17",1,QuadrantMLayerName(chamber), XCenter[0], YCenter[0], posZ, rot2,"ONLY");
1608 gMC->Gspos("SQ17",2,QuadrantMLayerName(chamber), XCenter[4], YCenter[4], posZ, rot3,"ONLY");
1609
1610 gMC->Gspos("SQ19",1,QuadrantMLayerName(chamber), XCenter[1], YCenter[1], posZ, rot2,"ONLY");
1611 gMC->Gspos("SQ19",2,QuadrantMLayerName(chamber), XCenter[5], YCenter[5], posZ, rot3,"ONLY");
1612
1613 gMC->Gspos("SQ21",1,QuadrantMLayerName(chamber), XCenter[2], YCenter[2], posZ, rot2,"ONLY");
1614 gMC->Gspos("SQ21",2,QuadrantMLayerName(chamber), XCenter[6], YCenter[6], posZ, rot3,"ONLY");
ba030c0e 1615
5f91c9e8 1616 gMC->Gspos("SQ23",1,QuadrantMLayerName(chamber), XCenter[3], YCenter[3], posZ, rot2,"ONLY");
1617 gMC->Gspos("SQ23",2,QuadrantMLayerName(chamber), XCenter[7], YCenter[7], posZ, rot3,"ONLY");
1618
1619 posZ = posZ+hzOuterFrameEpoxy;
1620
1621 gMC->Gspos("SQ18",1,QuadrantMLayerName(chamber), XCenter[0], YCenter[0], posZ, rot2,"ONLY");
1622 gMC->Gspos("SQ18",2,QuadrantMLayerName(chamber), XCenter[4], YCenter[4], posZ, rot3,"ONLY");
1623
1624 gMC->Gspos("SQ20",1,QuadrantMLayerName(chamber), XCenter[1], YCenter[1], posZ, rot2,"ONLY");
1625 gMC->Gspos("SQ20",2,QuadrantMLayerName(chamber), XCenter[5], YCenter[5], posZ, rot3,"ONLY");
1626
1627 gMC->Gspos("SQ22",1,QuadrantMLayerName(chamber), XCenter[2], YCenter[2], posZ, rot2,"ONLY");
1628 gMC->Gspos("SQ22",2,QuadrantMLayerName(chamber), XCenter[6], YCenter[6], posZ, rot3,"ONLY");
1629
1630 gMC->Gspos("SQ24",1,QuadrantMLayerName(chamber), XCenter[3], YCenter[3], posZ, rot2,"ONLY");
1631 gMC->Gspos("SQ24",2,QuadrantMLayerName(chamber), XCenter[7], YCenter[7], posZ, rot3,"ONLY");
1632
1633//---
1634
ba030c0e 1635// OutVFrame
1636 posX = 2.*hxInVFrame+IAF+2.*hxInHFrame-hxOutVFrame+2.*hxV1mm;
1637 posY = 2.*hyInHFrame+hyOutVFrame;
1638 posZ = 0.;
5f91c9e8 1639 gMC->Gspos("SQ25",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1640
ba030c0e 1641 const Float_t TOPY = posY+hyOutVFrame;
1642 const Float_t OUTX = posX;
1643
5f91c9e8 1644// OutVFrame corner
1645 posX = OUTX;
1646 posY = TOPY+((bl1OCTF+tl1OCTF)/2.);
1647 posZ = 0.;
1648 gMC->Gspos("SQ26",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1,"ONLY");
1649
1650// VertEarthFaceCu - 2 copies
1651 posX = 89.4000+fgkDeltaQuadLHC;
1652 posY = 25.79+fgkDeltaQuadLHC;
1653 posZ = hzFrameThickness+2.0*hzFoam+hzVertEarthFaceCu;
1654 gMC->Gspos("SQ27",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1655 posZ = -1.0*posZ;
1656 gMC->Gspos("SQ27",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1657
1658// VertEarthSteel - 2 copies
1659 posX = 91.00+fgkDeltaQuadLHC;
1660 posY = 30.616+fgkDeltaQuadLHC;
1661 posZ = hzFrameThickness+2.0*hzFoam+hzVertBarSteel;
1662 gMC->Gspos("SQ28",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1663 posZ = -1.0*posZ;
1664 gMC->Gspos("SQ28",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1665
1666// VertEarthProfCu - 2 copies
1667 posX = 92.000+fgkDeltaQuadLHC;
1668 posY = 29.64+fgkDeltaQuadLHC;
1669 posZ = hzFrameThickness;
1670 gMC->Gspos("SQ29",1,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1671 posZ = -1.0*posZ;
1672 gMC->Gspos("SQ29",2,QuadrantMLayerName(chamber),posX, posY, posZ, rot1, "ONLY");
1673
1674// SuppLateralPositionner - 2 copies
1675 posX = 90.2-fgkNearFarLHC;
1676 posY = 5.00-fgkNearFarLHC;
1677 posZ = hzLateralPosnAl-fgkMotherThick2;
1678 gMC->Gspos("SQ30",1,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1679 posZ = -1.0*posZ;
1680 gMC->Gspos("SQ30",2,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1681
1682// LateralPositionner - 2 copies - Face view
1683 posX = 92.175-fgkNearFarLHC-2.*hxLPP;
1684 posY = 5.00-fgkNearFarLHC;
1685 posZ =2.0*hzLateralPosnAl+hzLateralPosnInoxFace-fgkMotherThick2;
1686 gMC->Gspos("SQ31",1,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1687 posZ = -1.0*posZ;
1688 gMC->Gspos("SQ31",2,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1689
1690// LateralPositionner - Profile view
1691 posX = 92.175+fgkDeltaQuadLHC+hxLPF-hxLPP;
1692 posY = 5.00+fgkDeltaQuadLHC;
1693 posZ = 0.;
1694 gMC->Gspos("SQ32",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // middle layer
1695
1696 posX = 92.175-fgkNearFarLHC+hxLPF-hxLPP;
1697 posY = 5.0000-fgkNearFarLHC;
1698 posZ = fgkMotherThick2-hzLPNF;
1699 gMC->Gspos("SQ33",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // near layer
1700 posZ = -1.*posZ;
1701 gMC->Gspos("SQ33",2,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY"); // far layer
1702
1703// VertCradleA 1st Trapezoid - 3 copies
1704 posX = 95.73+fgkDeltaQuadLHC;
1705 posY = 33.26+fgkDeltaQuadLHC;
1706 posZ = 0.;
1707 gMC->Gspos("SQ34",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1708
1709 posX = 95.73-fgkNearFarLHC;
1710 posY = 33.26-fgkNearFarLHC;
1711 posZ = 2.0*hzLateralSightAl+hzVerticalCradleAl-fgkMotherThick2;
1712 gMC->Gspos("SQ34",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1713 posZ = -1.0*posZ;
1714 gMC->Gspos("SQ34",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1715
1716// VertCradleB 2nd Trapezoid - 3 copies
1717 posX = 97.29+fgkDeltaQuadLHC;
1718 posY = 23.02+fgkDeltaQuadLHC;
1719 posZ = 0.;
1720 gMC->Gspos("SQ35",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1721
1722 posX = 97.29-fgkNearFarLHC;
1723 posY = 23.02-fgkNearFarLHC;
1724 posZ = 2.0*hzLateralSightAl+hzVerticalCradleAl-fgkMotherThick2;
1725 gMC->Gspos("SQ35",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1726 posZ = -1.0*posZ;
1727 gMC->Gspos("SQ35",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1728
1729// OutVertCradleC 3rd Trapeze - 3 copies
1730 posX = 98.31+fgkDeltaQuadLHC;
1731 posY = 12.77+fgkDeltaQuadLHC;
1732 posZ = 0.;
1733 gMC->Gspos("SQ36",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1734
1735 posX = 98.31-fgkNearFarLHC;
1736 posY = 12.77-fgkNearFarLHC;
1737
1738 posZ = 2.0*hzLateralSightAl+hzVerticalCradleAl-fgkMotherThick2;
1739 gMC->Gspos("SQ36",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1740 posZ = -1.0*posZ;
1741 gMC->Gspos("SQ36",3,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1742
1743// OutVertCradleD 4th Trapeze - 3 copies
1744 posX = 98.81+fgkDeltaQuadLHC;
1745 posY = 2.52+fgkDeltaQuadLHC;
1746 posZ = 0.;
1747 gMC->Gspos("SQ37",2,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1748
1749 posZ = fgkMotherThick1-hzVerticalCradleAl;
1750 gMC->Gspos("SQ37",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1751 posZ = -1.0*posZ;
1752 gMC->Gspos("SQ37",3,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1753
1754// LateralSightSupport - 2 copies
1755 posX = 98.53-fgkNearFarLHC;
1756 posY = 10.00-fgkNearFarLHC;
1757 posZ = hzLateralSightAl-fgkMotherThick2;
1758 gMC->Gspos("SQ38",1,QuadrantNLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1759 posZ = -1.0*posZ;
1760 gMC->Gspos("SQ38",2,QuadrantFLayerName(chamber),posX, posY, posZ, 0, "ONLY");
1761
1762// Mire placement
1763 posX = 92.84+fgkDeltaQuadLHC;
1764 posY = 8.13+fgkDeltaQuadLHC;
ba030c0e 1765 posZ = 0.;
5f91c9e8 1766 gMC->Gspos("SQ39",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0,"ONLY");
1767
1768//---
1769
1770// InHFrame
1771 posX = 2.0*hxInVFrame+2.*hxV1mm+IAF+hxInHFrame;
1772 posY = hyInHFrame;
1773 posZ = 0.;
1774 gMC->Gspos("SQ40",1,QuadrantMLayerName(chamber),posX, posY, posZ, 0, "ONLY");
ba030c0e 1775
5f91c9e8 1776// Flat 7.5mm horizontal section
ba030c0e 1777 posX = 2.0*hxInVFrame+2.*hxV1mm+IAF+hxH1mm;
1778 posY = 2.0*hyInHFrame+hyH1mm;
1779 posZ = 0.;
5f91c9e8 1780 gMC->Gspos("SQ41",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
ba030c0e 1781
1782// InArcFrame
1783 posX = 2.0*hxInVFrame+2.*hxV1mm;
1784 posY = 2.0*hyInHFrame+2.*hyH1mm;
1785 posZ = 0.;
5f91c9e8 1786 gMC->Gspos("SQ42",1,QuadrantMLayerName(chamber),posX, posY, posZ,0, "ONLY");
ba030c0e 1787
5f91c9e8 1788// ScrewsInFrame - in sensitive volume
ba030c0e 1789
1790 Float_t scruX[64];
1791 Float_t scruY[64];
1792
1793// Screws on IHEpoxyFrame
1794
1795 const Int_t NumberOfScrewsIH = 14; // no. of screws on the IHEpoxyFrame
1796 const Float_t offX = 5.; // inter-screw distance
1797
1798 // first screw coordinates
1799 scruX[0] = 21.07;
1800 scruY[0] = -2.23;
1801 // other screw coordinates
1802 for (Int_t i = 1;i<NumberOfScrewsIH;i++){
1803 scruX[i] = scruX[i-1]+offX;
1804 scruY[i] = scruY[0];
1805 }
1806 // Position the volumes on the frames
1807 for (Int_t i = 0;i<NumberOfScrewsIH;i++){
5f91c9e8 1808 posX = fgkDeltaQuadLHC + scruX[i];
1809 posY = fgkDeltaQuadLHC + scruY[i];
ba030c0e 1810 posZ = 0.;
5f91c9e8 1811 gMC->Gspos("SQ43",i+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-hzInHFrame-SCRUHLE, 0, "ONLY");
1812 gMC->Gspos("SQ44",i+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ, 0, "ONLY");
1813 gMC->Gspos("SQ45",i+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+hzInHFrame+SCRUNLE, 0, "ONLY");
ba030c0e 1814 }
1815 // special screw coordinates
1816 scruX[63] = 16.3;
1817 scruY[63] = -2.23;
5f91c9e8 1818 posX = fgkDeltaQuadLHC + scruX[63];
1819 posY = fgkDeltaQuadLHC + scruY[63];
ba030c0e 1820 posZ = 0.;
5f91c9e8 1821 gMC->Gspos("SQ43",64,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-hzInHFrame-SCRUHLE, 0, "ONLY");
1822 gMC->Gspos("SQ44",64,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ, 0, "ONLY");
1823 gMC->Gspos("SQ45",64,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+hzInHFrame+SCRUNLE, 0, "ONLY");
ba030c0e 1824
1825// Screws on the IVEpoxyFrame
1826
1827 const Int_t NumberOfScrewsIV = 15; // no. of screws on the IVEpoxyFrame
1828 const Float_t offY = 5.; // inter-screw distance
1829 Int_t FirstScrew = 58;
1830 Int_t LastScrew = 44;
1831
1832 // first (special) screw coordinates
1833 scruX[FirstScrew-1] = -2.23;
1834 scruY[FirstScrew-1] = 16.3;
1835 // second (repetitive) screw coordinates
1836 scruX[FirstScrew-2] = -2.23;
1837 scruY[FirstScrew-2] = 21.07;
1838 // other screw coordinates
1839 for (Int_t i = FirstScrew-3;i>LastScrew-2;i--){
1840 scruX[i] = scruX[FirstScrew-2];
1841 scruY[i] = scruY[i+1]+offY;
1842 }
1843
1844 for (Int_t i = 0;i<NumberOfScrewsIV;i++){
5f91c9e8 1845 posX = fgkDeltaQuadLHC + scruX[i+LastScrew-1];
1846 posY = fgkDeltaQuadLHC + scruY[i+LastScrew-1];
ba030c0e 1847 posZ = 0.;
5f91c9e8 1848 gMC->Gspos("SQ43",i+LastScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-hzInHFrame-SCRUHLE, 0, "ONLY");
1849 gMC->Gspos("SQ44",i+LastScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ, 0, "ONLY");
1850 gMC->Gspos("SQ45",i+LastScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+hzInHFrame+SCRUNLE, 0, "ONLY");
ba030c0e 1851 }
1852
1853// Screws on the OVEpoxyFrame
1854
1855 const Int_t NumberOfScrewsOV = 10; // no. of screws on the OVEpoxyFrame
1856
1857 FirstScrew = 15;
1858 LastScrew = 25;
1859
1860 // first (repetitive) screw coordinates
1861 scruX[FirstScrew-1] = 90.9;
1862 scruY[FirstScrew-1] = -2.23; // true value
1863
1864 // other screw coordinates
1865 for (Int_t i = FirstScrew; i<LastScrew; i++ ){
1866 scruX[i] = scruX[FirstScrew-1];
1867 scruY[i] = scruY[i-1]+offY;
1868 }
1869 for (Int_t i = 0;i<NumberOfScrewsOV;i++){
5f91c9e8 1870 posX = fgkDeltaQuadLHC + scruX[i+FirstScrew-1];
1871 posY = fgkDeltaQuadLHC + scruY[i+FirstScrew-1];
ba030c0e 1872 posZ = 0.;
5f91c9e8 1873 gMC->Gspos("SQ43",i+FirstScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-hzInHFrame-SCRUHLE, 0, "ONLY");
1874 gMC->Gspos("SQ44",i+FirstScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ, 0, "ONLY");
1875 gMC->Gspos("SQ45",i+FirstScrew,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+hzInHFrame+SCRUNLE, 0, "ONLY");
ba030c0e 1876 }
1877
1878// Inner Arc of Frame, screw positions and numbers-1
1879 scruX[62] = 16.009; scruY[62] = 1.401;
1880 scruX[61] = 14.564; scruY[61] = 6.791;
1881 scruX[60] = 11.363; scruY[60] = 11.363;
1882 scruX[59] = 6.791 ; scruY[59] = 14.564;
1883 scruX[58] = 1.401 ; scruY[58] = 16.009;
1884
1885 for (Int_t i = 0;i<5;i++){
5f91c9e8 1886 posX = fgkDeltaQuadLHC + scruX[i+58];
1887 posY = fgkDeltaQuadLHC + scruY[i+58];
ba030c0e 1888 posZ = 0.;
5f91c9e8 1889 gMC->Gspos("SQ43",i+58+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ-hzInHFrame-SCRUHLE, 0, "ONLY");
1890 gMC->Gspos("SQ44",i+58+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ, 0, "ONLY");
1891 gMC->Gspos("SQ45",i+58+1,QuadrantMLayerName(chamber),posX+0.1, posY+0.1, posZ+hzInHFrame+SCRUNLE, 0, "ONLY");
1892 }
1893}
ba030c0e 1894
5f91c9e8 1895//______________________________________________________________________________
1896void AliMUONv2::PlaceInnerLayers(Int_t chamber)
1897{
1898// Place the gas and copper layers for the specified chamber.
1899// --
ba030c0e 1900
5f91c9e8 1901// Rotation Matrices
1902 Int_t rot1, rot2, rot3, rot4;
ba030c0e 1903
5f91c9e8 1904 AliMatrix(rot1, 90., 315., 90., 45., 0., 0.); // -45 deg
1905 AliMatrix(rot2, 90., 90., 90., 180., 0., 0.); // 90 deg
1906 AliMatrix(rot3, 90., 270., 90., 0., 0., 0.); // -90 deg
1907 AliMatrix(rot4, 90., 45., 90., 135., 0., 0.); // deg
ba030c0e 1908
5f91c9e8 1909 GReal_t x;
1910 GReal_t y;
1911 GReal_t zg = 0.;
1912 GReal_t zc = fgkHzGas + fgkHzPadPlane;
1913 Int_t dpos = (chamber-1)*2;
1914 TString name;
ba030c0e 1915
5f91c9e8 1916 x = 14.53 + fgkDeltaQuadLHC;
1917 y = 53.34 + fgkDeltaQuadLHC;
1918 name = GasVolumeName("SAG", chamber);
1919 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
1920 gMC->Gspos("SA1C", 1+dpos, QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
1921 gMC->Gspos("SA1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
1922
1923 x = 40.67 + fgkDeltaQuadLHC;
1924 y = 40.66 + fgkDeltaQuadLHC;
1925 name = GasVolumeName("SBG", chamber);
1926 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot1,"ONLY");
1927 gMC->Gspos("SB1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot1,"ONLY");
1928 gMC->Gspos("SB1C", 2+dpos, QuadrantMLayerName(chamber),x,y,-zc,rot1,"ONLY");
1929
1930 x = 53.34 + fgkDeltaQuadLHC;
1931 y = 14.52 + fgkDeltaQuadLHC;
1932 name = GasVolumeName("SCG", chamber);
1933 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot2,"ONLY");
1934 gMC->Gspos("SC1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot2,"ONLY");
1935 gMC->Gspos("SC1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot2,"ONLY");
1936
1937 x = 5.83 + fgkDeltaQuadLHC;
1938 y = 17.29 + fgkDeltaQuadLHC;
1939 name = GasVolumeName("SDG", chamber);
1940 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot3,"ONLY");
1941 gMC->Gspos("SD1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot3,"ONLY");
1942 gMC->Gspos("SD1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot3,"ONLY");
1943
1944 x = 9.04 + fgkDeltaQuadLHC;
1945 y = 16.91 + fgkDeltaQuadLHC;
1946 name = GasVolumeName("SEG", chamber);
1947 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
1948 gMC->Gspos("SE1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
1949 gMC->Gspos("SE1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
1950
1951 x = 10.12 + fgkDeltaQuadLHC;
1952 y = 14.67 + fgkDeltaQuadLHC;
1953 name = GasVolumeName("SFG", chamber);
1954 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
1955 gMC->Gspos("SF1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
1956 gMC->Gspos("SF1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
1957
1958 x = 8.2042 + fgkDeltaQuadLHC;
1959 y = 16.19 + fgkDeltaQuadLHC;
1960 name = GasVolumeName("SGG", chamber);
1961 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
1962 gMC->Gspos("SG1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
1963 gMC->Gspos("SG1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
1964
1965 x = 14.68 + fgkDeltaQuadLHC;
1966 y = 10.10 + fgkDeltaQuadLHC;
1967 name = GasVolumeName("SHG", chamber);
1968 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
1969 gMC->Gspos("SH1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
1970 gMC->Gspos("SH1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
1971
1972 x = 16.21 + fgkDeltaQuadLHC;
1973 y = 8.17 + fgkDeltaQuadLHC;
1974 name = GasVolumeName("SIG", chamber);
1975 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot4,"ONLY");
1976 gMC->Gspos("SI1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot4,"ONLY");
1977 gMC->Gspos("SI1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot4,"ONLY");
1978
1979 x = 16.92 + fgkDeltaQuadLHC;
1980 y = 9.02 + fgkDeltaQuadLHC;
1981 name = GasVolumeName("SJG", chamber);
1982 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,rot3,"ONLY");
1983 gMC->Gspos("SJ1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,rot3,"ONLY");
1984 gMC->Gspos("SJ1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,rot3,"ONLY");
1985
1986 x = 17.30 + fgkDeltaQuadLHC;
1987 y = 5.85 + fgkDeltaQuadLHC;
1988 name = GasVolumeName("SKG", chamber);
1989 gMC->Gspos(name,1,QuadrantMLayerName(chamber),x,y,zg,0,"ONLY");
1990 gMC->Gspos("SK1C", 1+dpos ,QuadrantMLayerName(chamber),x,y, zc,0,"ONLY");
1991 gMC->Gspos("SK1C", 2+dpos ,QuadrantMLayerName(chamber),x,y,-zc,0,"ONLY");
ba030c0e 1992}
1993
5f91c9e8 1994//______________________________________________________________________________
1995void AliMUONv2::PlaceSector(AliMpSector* sector,TSpecialMap specialMap,
1996 const TVector3& where, Bool_t reflectZ, Int_t chamber)
ba030c0e 1997{
5f91c9e8 1998// Place all the segments in the mother volume, at the position defined
1999// by the sector's data.
ba030c0e 2000// --
ba030c0e 2001
5f91c9e8 2002 static Int_t segNum=1;
2003 Int_t sgn;
2004 Int_t reflZ;
2005 Int_t rotMat;
2006
2007 if (!reflectZ) {
2008 sgn= 1;
2009 reflZ=0; // no reflection along z... nothing
2010 AliMatrix(rotMat, 90.,90.,90,180.,0.,0.); // 90° rotation around z, NO reflection along z
2011 } else {
2012 sgn=-1;
2013 AliMatrix(reflZ, 90.,0.,90,90.,180.,0.); // reflection along z
2014 AliMatrix(rotMat, 90.,90.,90,180.,180.,0.); // 90° rotation around z AND reflection along z
2015 }
2016
ba030c0e 2017 GReal_t posX,posY,posZ;
2018
5f91c9e8 2019 IntVector already_done;
2020 for (Int_t irow=0;irow<sector->GetNofRows();irow++){ // for each row
2021 AliMpRow* row = sector->GetRow(irow);
ba030c0e 2022
ba030c0e 2023
5f91c9e8 2024 for (Int_t iseg=0;iseg<row->GetNofRowSegments();iseg++){ // for each row segment
2025 AliMpVRowSegment* seg = row->GetRowSegment(iseg);
2026 char segName[5];
2027
2028 TSpecialMap::iterator iter
2029 = specialMap.find(seg->GetMotifPositionId(0));
ba030c0e 2030
5f91c9e8 2031 if ( iter == specialMap.end()){ //if this is a normal segment (ie. not part of <specialMap>)
2032
2033 // create the cathode part
2034 sprintf(segName,"%.3dM", segNum);
2035 CreatePlaneSegment(segName, seg->Dimensions()/10., seg->GetNofMotifs());
2036
2037 posX = where.X() + seg->Position().X()/10.;
2038 posY = where.Y() + seg->Position().Y()/10.;
2039 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
2040 gMC->Gspos(segName, 1, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2041
2042 // and place all the daughter boards of this segment
2043 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {
2044 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2045 AliMpMotifPosition* motifPos =
2046 sector->GetMotifMap()->FindMotifPosition(motifPosId);
2047
2048 posX = where.X() + motifPos->Position().X()/10.+fgkOffsetX;
2049 posY = where.Y() + motifPos->Position().Y()/10.+fgkOffsetY;
2050 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
2051 gMC->Gspos(fgkDaughterName, motifPosId, QuadrantMLayerName(chamber), posX, posY, posZ, reflZ, "ONLY");
2052 }
2053 segNum++;
2054
2055 } else {
2056
2057 // if this is a special segment
2058 for (Int_t motifNum=0;motifNum<seg->GetNofMotifs();motifNum++) {// for each motif
2059
2060 Int_t motifPosId = seg->GetMotifPositionId(motifNum);
2061
2062 if (find(already_done.begin(),already_done.end(),motifPosId)
2063 != already_done.end()) continue; // don't treat the same motif twice
2064
2065 AliMUONSt1SpecialMotif spMot = specialMap[motifPosId];
2066 AliMpMotifPosition* motifPos = sector->GetMotifMap()->FindMotifPosition(motifPosId);
2067
2068 // place the hole for the motif, wrt the requested rotation angle
2069 Int_t rot = ( spMot.GetRotAngle()<0.1 ) ? reflZ:rotMat;
2070
2071 posX = where.X() + motifPos->Position().X()/10.+spMot.GetDelta().X();
2072 posY = where.Y() + motifPos->Position().Y()/10.+spMot.GetDelta().Y();
2073 posZ = where.Z() + sgn * (TotalHzPlane() + fgkHzGas + 2.*fgkHzPadPlane);
2074 gMC->Gspos(fgkHoleName, motifPosId, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
2075
2076 // then place the daughter board for the motif, wrt the requested rotation angle
2077 posX = posX+fgkDeltaFilleEtamX;
2078 posY = posY+fgkDeltaFilleEtamY;
2079 posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
2080 gMC->Gspos(fgkDaughterName, motifPosId, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
2081
2082 already_done.push_back(motifPosId);// mark this motif as done
2083 }
2084 }// end of special motif case
2085 }
2086 }
2087}
2088
2089//______________________________________________________________________________
2090TString AliMUONv2::GasVolumeName(const TString& name, Int_t chamber) const
ba030c0e 2091{
5f91c9e8 2092// Inserts the chamber number into the name.
2093// ---
ba030c0e 2094
5f91c9e8 2095 TString newString(name);
2096
2097 TString number("");
2098 number += chamber;
ba030c0e 2099
5f91c9e8 2100 newString.Insert(2, number);
ba030c0e 2101
5f91c9e8 2102 return newString;
ba030c0e 2103}
2104
5f91c9e8 2105//______________________________________________________________________________
2106Bool_t AliMUONv2::IsInChamber(Int_t ich, Int_t volGid) const
ba030c0e 2107{
5f91c9e8 2108// True if volume <volGid> is part of the sensitive
2109// volumes of chamber <ich>
2110// ---
2111 for (Int_t i = 0; i < fChamberV2[ich]->GetSize(); i++) {
2112 if (fChamberV2[ich]->At(i) == volGid) return kTRUE;
2113 }
2114 return kFALSE;
2115}
ba030c0e 2116
5f91c9e8 2117//
2118// protected methods
2119//
ba030c0e 2120
5f91c9e8 2121//______________________________________________________________________________
2122Int_t AliMUONv2::GetChamberId(Int_t volId) const
2123{
2124// Check if the volume with specified volId is a sensitive volume (gas)
2125// of some chamber and returns the chamber number;
2126// if not sensitive volume - return 0.
2127// ---
2128
2129 for (Int_t i = 1; i <=2; i++)
2130 if (IsInChamber(i-1,volId)) return i;
ba030c0e 2131
5f91c9e8 2132 for (Int_t i = 3; i <= AliMUONConstants::NCh(); i++)
2133 if (volId==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()) return i;
ba030c0e 2134
5f91c9e8 2135 return 0;
ba030c0e 2136}
2137
5f91c9e8 2138//
2139// public methods
2140//
2141
2142//______________________________________________________________________________
2143void AliMUONv2::CreateMaterials()
ba030c0e 2144{
5f91c9e8 2145// --- Define the various mixtures for GEANT ---
ba030c0e 2146
5f91c9e8 2147 // Ar-CO2 gas (80%+20%)
2148 Float_t ag1[2] = { 39.95,44.01};
2149 Float_t zg1[2] = { 18.,22.};
2150 Float_t dg1 = .001821;
2151 Float_t wg1[2] = { .8,0.2};
2152 // use wg1 weighting factors (6th arg > 0)
2153 AliMixture(22, "ArCO2 80%$", ag1, zg1, dg1, 2, wg1);
ba030c0e 2154
5f91c9e8 2155 // Ar-buthane-freon gas -- trigger chambers
2156 Float_t atr1[4] = { 39.95,12.01,1.01,19. };
2157 Float_t ztr1[4] = { 18.,6.,1.,9. };
2158 Float_t wtr1[4] = { .56,.1262857,.2857143,.028 };
2159 Float_t dtr1 = .002599;
2160 AliMixture(23, "Ar-freon $", atr1, ztr1, dtr1, 4, wtr1);
ba030c0e 2161
5f91c9e8 2162 // Rohacell 51 - imide methacrylique
2163 Float_t aRohacell51[4] = {12.01,1.01,16.00,14.01};
2164 Float_t zRohacell51[4] = {6.,1.,8.,7.};
2165 Float_t dRohacell51 = 0.052;
2166 Float_t wRohacell51[4] = {9.,13.,2.,1.};
2167 // use relative A (molecular) values (6th arg < 0)
2168 AliMixture(32, "FOAM$",aRohacell51,zRohacell51,dRohacell51,-4,wRohacell51);
2169
2170 Float_t aSnPb[2] = {118.69,207.19};
2171 Float_t zSnPb[2] = {50,82};
2172 Float_t dSnPb = 8.926;
2173 Float_t wSnPb[2] = {0.6, 0.4} ;
2174 // use wSnPb weighting factors (6th arg > 0)
2175 AliMixture(35, "SnPb$", aSnPb,zSnPb,dSnPb,2,wSnPb);
ba030c0e 2176
5f91c9e8 2177 // plastic definition from K5, Freiburg (found on web)
2178 Float_t aPlastic[2]={1.01,12.01};
2179 Float_t zPlastic[2]={1,6};
2180 Float_t denPlastic=1.107;
2181 Float_t wPlastic[2]={1,1};
2182 // use relative A (molecular) values (6th arg < 0)...no other info...
2183 AliMixture( 33, "Plastic$",aPlastic,zPlastic,denPlastic,-2,wPlastic);
2184
2185 // from CERN note NUFACT Note023, Oct.2000
2186 // Inox/Stainless Steel (18%Cr, 9%Ni)
2187 Float_t aInox[3] = {55.847,51.9961,58.6934};
2188 Float_t zInox[3] = {26.,24.,28.};
2189 Float_t denInox = 7.930;
2190 Float_t wInox[3] = {0.73,0.18,0.09};
2191 // use wInox weighting factors (6th arg > 0)
2192 AliMixture(37, "StainlessSteel$",aInox,zInox,denInox,3,wInox);
2193
2194 // bakelite
2195 Float_t abak[3] = {12.01 , 1.01 , 16.};
2196 Float_t zbak[3] = {6. , 1. , 8.};
2197 Float_t wbak[3] = {6. , 6. , 1.};
2198 Float_t dbak = 1.4;
2199 AliMixture(19, "Bakelite$", abak, zbak, dbak, -3, wbak);
ba030c0e 2200
5f91c9e8 2201 // Ar-Isobutane gas (80%+20%)
2202 Float_t ag[3] = { 39.95,12.01,1.01 };
2203 Float_t zg[3] = { 18.,6.,1. };
2204 Float_t wg[3] = { .8,.057,.143 };
2205 Float_t dg = .0019596;
2206 AliMixture(20, "ArC4H10 GAS$", ag, zg, dg, 3, wg);
2207
2208 // Ar-Isobutane-Forane-SF6 gas (49%+7%+40%+4%) -- trigger
2209 Float_t atrig[5] = { 39.95,12.01,1.01,19.,32.066 };
2210 Float_t ztrig[5] = { 18.,6.,1.,9.,16. };
2211 Float_t wtrig[5] = { .49,1.08,1.5,1.84,0.04 };
2212 Float_t dtrig = .0031463;
2213 AliMixture(21, "TRIG GAS$", atrig, ztrig, dtrig, -5, wtrig);
2214
2215// --- Define the various AliMaterials for GEANT ---
2216 // from PDG and "The Particle Detector BriefBook", Bock and Vasilescu, P.18
2217 AliMaterial( 9, "Aluminium$", 26.98, 13., 2.7, -8.9, 26.1);
2218 AliMaterial(10, "Aluminium$", 26.98, 13., 2.7, -8.9, 26.1);
2219 AliMaterial(15, "air$", 14.61, 7.3, .001205, -30423.24, 67500);
2220 AliMaterial(30, "Copper$", 63.546,29.,8.96,-1.43,9.6);
2221 AliMaterial(31, "FR4$", 17.749, 8.875, 1.7, -19.4, 999.); // from DPG
2222 AliMaterial(34, "Kapton$", 12.01,6,1.42,-28.6,999); // from DPG
2223 // Density of FrameEpoxy only from manufacturer's specifications
2224 // Frame composite epoxy , X0 in g/cm**2 (guestimation!)
2225 AliMaterial(36, "FrameEpoxy",12.24,6.0,1.85,-19.14,999);// use 16.75cm
ba030c0e 2226
5f91c9e8 2227// --- Define the tracking medias (AliMediums) for GEANT ---
2228 GReal_t epsil = .001; // Tracking precision,
2229 GReal_t stemax = -1.; // Maximum displacement for multiple scat
2230 GReal_t tmaxfd = -20.; // Maximum angle due to field deflection
2231 GReal_t deemax = -.3; // Maximum fractional energy loss, DLS
2232 GReal_t stmin = -.8;
2233 GReal_t maxStepAlu = 0.001; // from AliMUON.cxx
2234 GReal_t maxDestepAlu = -1.; // from AliMUON.cxx
2235 GReal_t maxStepGas=0.01; // from AliMUON.cxx
2236
2237 Int_t iSXFLD = gAlice->Field()->Integ();
2238 Float_t sXMGMX = gAlice->Field()->Max();
2239
2240 AliMedium(1, "AIR_CH_US$", 15, 1, iSXFLD, sXMGMX, tmaxfd,
2241 stemax, deemax, epsil, stmin);
2242 AliMedium(4, "ALU_CH_US$", 9, 0, iSXFLD, sXMGMX, tmaxfd,
2243 maxStepAlu, maxDestepAlu, epsil, stmin);
2244 AliMedium(5, "ALU_CH_US$", 10, 0, iSXFLD, sXMGMX, tmaxfd,
2245 maxStepAlu,maxDestepAlu, epsil, stmin);
2246 AliMedium(6, "AR_CH_US ", 20, 1, iSXFLD, sXMGMX,
2247 tmaxfd, fMaxStepGas,fMaxDestepGas, epsil, stmin);
2248
2249 // Ar-Isobuthane-Forane-SF6 gas
2250 AliMedium(7, "GAS_CH_TRIGGER ", 21, 1, iSXFLD, sXMGMX,
2251 tmaxfd, stemax, deemax, epsil, stmin);
2252 AliMedium(8, "BAKE_CH_TRIGGER ", 19, 0, iSXFLD, sXMGMX,
2253 tmaxfd, fMaxStepAlu, fMaxDestepAlu, epsil, stmin);
2254
2255 AliMedium(9, "ArCO2 80%$", 22, 1, iSXFLD, sXMGMX, tmaxfd, maxStepGas,
2256 maxDestepAlu, epsil, stmin);
2257 AliMedium(10, "COPPER_CH$", 30, 0, iSXFLD, sXMGMX, tmaxfd,
2258 maxStepAlu, maxDestepAlu, epsil, stmin);
2259 AliMedium(11, "PCB_COPPER ", 31, 0, iSXFLD, sXMGMX, tmaxfd,
2260 fMaxStepAlu, fMaxDestepAlu, epsil, stmin);
2261 AliMedium(12, "VETRONITE ", 32, 0, iSXFLD, sXMGMX, tmaxfd,
2262 fMaxStepAlu, fMaxDestepAlu, epsil, stmin);
2263 AliMedium(13, "CARBON ", 33, 0, iSXFLD, sXMGMX, tmaxfd,
2264 fMaxStepAlu, fMaxDestepAlu, epsil, stmin);
2265 AliMedium(14, "Rohacell ", 34, 0, iSXFLD, sXMGMX, tmaxfd,
2266 fMaxStepAlu, fMaxDestepAlu, epsil, stmin);
2267 AliMedium(15, "FR4_CH$", 31, 0,iSXFLD, sXMGMX, 10., .01,.1, .003, .003);
2268 AliMedium(16, "FOAM_CH$", 32, 0,
2269 iSXFLD, sXMGMX, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ;
2270 AliMedium(17, "Plastic$", 33, 0,iSXFLD, sXMGMX, 10., .01, 1., .003, .003);
2271 AliMedium(18, "Kapton$", 34, 0,iSXFLD, sXMGMX, 10., .01, 1., .003, .003);
2272 AliMedium(19, "SnPb$", 35, 0,iSXFLD, sXMGMX, 10., .01, 1., .003, .003);
2273 AliMedium(20, "FrameCH$", 36, 1,iSXFLD, sXMGMX, 10., .001, 0.001, .001, .001);
2274 AliMedium(21, "InoxBolts$", 37,1,iSXFLD, sXMGMX, 10., .01, 1., .003, .003);
2275
2276// store the parameters
2277 Float_t a, z, dens, absl;
2278 char matName[5];
2279 AliGetMaterial(30,matName,a,z,dens,fRadlCopper,absl);
2280 AliGetMaterial(31,matName,a,z,dens,fRadlFR4,absl);
2281 AliGetMaterial(32,matName,a,z,dens,fRadlFoam,absl);
ba030c0e 2282}
2283
5f91c9e8 2284//______________________________________________________________________________
2285void AliMUONv2::CreateGeometry()
ba030c0e 2286{
5f91c9e8 2287// Create the GEANT geometry for the dimuon arm.
2288// Use the parent's method for stations 2, 3, 4 and 5.
2289// Use the detailed code for the first station.
ba030c0e 2290// --
5f91c9e8 2291 cout << "AliMUONv2::CreateGeometry()" << endl;
2292 cout << "_________________________________________" << endl;
2293
2294 // Create basic volumes
2295 //
2296 CreateHole();
2297 CreateDaughterBoard();
2298 CreateInnerLayers();
ba030c0e 2299
5f91c9e8 2300 // Create reflexion matrices
2301 //
2302 Int_t reflXZ, reflYZ, reflXY;
2303 AliMatrix(reflXZ, 90., 180., 90., 90., 180., 0.);
2304 AliMatrix(reflYZ, 90., 0., 90.,-90., 180., 0.);
2305 AliMatrix(reflXY, 90., 180., 90., 270., 0., 0.);
2306
2307 // Define transformations for each quadrant
2308 //
2309 // II. | I.
2310 // _____ | ____
2311 // |
2312 // III. | IV.
2313 //
2314 Int_t rotm[4];
2315 rotm[0]=0; // quadrant I
2316 rotm[1]=reflXZ; // quadrant II
2317 rotm[2]=reflXY; // quadrant III
2318 rotm[3]=reflYZ; // quadrant IV
ba030c0e 2319
5f91c9e8 2320 TVector3 scale[4];
2321 scale[0] = TVector3( 1, 1, 1); // quadrant I
2322 scale[1] = TVector3(-1, 1, -1); // quadrant II
2323 scale[2] = TVector3(-1, -1, 1); // quadrant III
2324 scale[3] = TVector3( 1, -1, -1); // quadrant IV
ba030c0e 2325
5f91c9e8 2326 // Shift in Z of the middle layer
2327 Double_t deltaZ = 6.5/2.;
2328
2329 // Position of quadrant I wrt to the chamber position
2330 TVector3 pos0(-fgkDeltaQuadLHC, -fgkDeltaQuadLHC, deltaZ);
2331
2332 // Shift for near/far layers
2333 GReal_t shiftXY = fgkFrameOffset;
2334 GReal_t shiftZ = fgkMotherThick1+fgkMotherThick2;
2335
2336 // Build two chambers
2337 //
2338 for (Int_t ich=1; ich<3; ich++) {
2339
2340 // Create quadrant volume
2341 CreateQuadrant(ich);
2342
2343 // Place gas volumes
2344 PlaceInnerLayers(ich);
2345
2346 // Place the quadrant
2347 for (Int_t i=0; i<4; i++) {
2348
2349 // Middle layer
2350 GReal_t posx = pos0.X() * scale[i].X();
2351 GReal_t posy = pos0.Y() * scale[i].Y();
2352 GReal_t posz = pos0.Z() * scale[i].Z() + AliMUONConstants::DefaultChamberZ(ich-1);
2353 gMC->Gspos(QuadrantMLayerName(ich), i+1, "ALIC", posx, posy, posz, rotm[i], "ONLY");
2354
2355 // Near/far layers
2356 Real_t posx2 = posx + shiftXY * scale[i].X();
2357 Real_t posy2 = posy + shiftXY * scale[i].Y();
2358 Real_t posz2 = posz - scale[i].Z()*shiftZ;
2359 gMC->Gspos(QuadrantNLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
2360
2361 posz2 = posz + scale[i].Z()*shiftZ;
2362 gMC->Gspos(QuadrantFLayerName(ich), i+1, "ALIC", posx2, posy2, posz2, rotm[i],"ONLY");
2363 }
2364 }
2365
2366 static Int_t stations[5]={0,1,1,1,1};
2367 fStations=stations;
2368 AliMUONv1::CreateGeometry();
2369}
2370
2371//______________________________________________________________________________
2372void AliMUONv2::Init()
2373{
2374 // Initialize Station 1 Tracking Chambers
2375
2376 //
2377 // Set the chamber (sensitive region) GEANT identifier
2378 fChamberV2[0] = new TArrayI(11); // Chamber 1 sensitive volume Id array
2379 fChamberV2[1] = new TArrayI(11); // Chamber 2 sensitive volume Id array
2380
2381 AddChamberGid(0,gMC->VolId("SA1G"),0);
2382 AddChamberGid(0,gMC->VolId("SB1G"),1);
2383 AddChamberGid(0,gMC->VolId("SC1G"),2);
2384 AddChamberGid(0,gMC->VolId("SD1G"),3);
2385 AddChamberGid(0,gMC->VolId("SE1G"),4);
2386 AddChamberGid(0,gMC->VolId("SF1G"),5);
2387 AddChamberGid(0,gMC->VolId("SG1G"),6);
2388 AddChamberGid(0,gMC->VolId("SH1G"),7);
2389 AddChamberGid(0,gMC->VolId("SI1G"),8);
2390 AddChamberGid(0,gMC->VolId("SJ1G"),9);
2391 AddChamberGid(0,gMC->VolId("SK1G"),10);
2392
2393
2394 AddChamberGid(1,gMC->VolId("SA2G"),0);
2395 AddChamberGid(1,gMC->VolId("SB2G"),1);
2396 AddChamberGid(1,gMC->VolId("SC2G"),2);
2397 AddChamberGid(1,gMC->VolId("SD2G"),3);
2398 AddChamberGid(1,gMC->VolId("SE2G"),4);
2399 AddChamberGid(1,gMC->VolId("SF2G"),5);
2400 AddChamberGid(1,gMC->VolId("SG2G"),6);
2401 AddChamberGid(1,gMC->VolId("SH2G"),7);
2402 AddChamberGid(1,gMC->VolId("SI2G"),8);
2403 AddChamberGid(1,gMC->VolId("SJ2G"),9);
2404 AddChamberGid(1,gMC->VolId("SK2G"),10);
2405
2406 Int_t i;
2407// now do the other stations as in AliMUONv1
2408 for (i=0; i<AliMUONConstants::NCh(); i++) {
2409 ( (AliMUONChamber*) (*fChambers)[i])->Init();
2410 }
2411
2412 //
2413 // Set the chamber (sensitive region) GEANT identifier
2414 ((AliMUONChamber*)(*fChambers)[0])->SetGid(-1); // joker
2415 ((AliMUONChamber*)(*fChambers)[1])->SetGid(-1); // joker
2416
2417 ((AliMUONChamber*)(*fChambers)[2])->SetGid(gMC->VolId("S03G"));
2418 ((AliMUONChamber*)(*fChambers)[3])->SetGid(gMC->VolId("S04G"));
2419
2420 ((AliMUONChamber*)(*fChambers)[4])->SetGid(gMC->VolId("S05G"));
2421 ((AliMUONChamber*)(*fChambers)[5])->SetGid(gMC->VolId("S06G"));
2422
2423 ((AliMUONChamber*)(*fChambers)[6])->SetGid(gMC->VolId("S07G"));
2424 ((AliMUONChamber*)(*fChambers)[7])->SetGid(gMC->VolId("S08G"));
2425
2426 ((AliMUONChamber*)(*fChambers)[8])->SetGid(gMC->VolId("S09G"));
2427 ((AliMUONChamber*)(*fChambers)[9])->SetGid(gMC->VolId("S10G"));
2428
2429 ((AliMUONChamber*)(*fChambers)[10])->SetGid(gMC->VolId("SG1A"));
2430 ((AliMUONChamber*)(*fChambers)[11])->SetGid(gMC->VolId("SG2A"));
2431 ((AliMUONChamber*)(*fChambers)[12])->SetGid(gMC->VolId("SG3A"));
2432 ((AliMUONChamber*)(*fChambers)[13])->SetGid(gMC->VolId("SG4A"));
2433
ba030c0e 2434}
5f91c9e8 2435