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