]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSt1GeometryBuilderV2.cxx
Extendened class description to include at least 5 subsequent lines required by rule...
[u/mrichter/AliRoot.git] / MUON / AliMUONSt1GeometryBuilderV2.cxx
Content-type: text/html ]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSt1GeometryBuilderV2.cxx


500 - Internal Server Error

Malformed UTF-8 character (fatal) at (eval 5) line 1, <$fd> line 1391.
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"
ba030c0e 55#include "AliMUONConstants.h"
ba030c0e 56#include "AliRun.h"
57#include "AliMagF.h"
ba030c0e 58
d1cd2474 59ClassImp(AliMUONSt1GeometryBuilderV2)
ba030c0e 60
5f91c9e8 61// Thickness Constants
d1cd2474 62const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzPadPlane=0.0148/2.; //Pad plane
63const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFoam = 2.083/2.; //Foam of mechanicalplane
64const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFR4 = 0.0031/2.; //FR4 of mechanical plane
65const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzSnPb = 0.0091/2.; //Pad/Kapton connection (66 pt)
66const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzKapton = 0.0122/2.; //Kapton
67const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergPlastic = 0.3062/2.;//Berg connector
68const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergCopper = 0.1882/2.; //Berg connector
69const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzDaughter = 0.0156/2.; //Daughter board
70const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzGas = 0.2/2.; //Gas thickness
5f91c9e8 71
72// Quadrant Mother volume - TUBS1 - Middle layer of model
d1cd2474 73const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR1 = 18.3;
74const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR1 = 105.673;
75const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick1 = 6.5/2;
76const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL1 = 0.;
77const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU1 = 90.;
5f91c9e8 78
79// Quadrant Mother volume - TUBS2 - near and far layers of model
d1cd2474 80const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR2 = 20.7;
81const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR2 = 100.073;
82const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick2 = 3.0/2;
83const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL2 = 0.;
84const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU2 = 90.;
5f91c9e8 85
86// Sensitive copper pads, foam layer, PCB and electronics model parameters
d1cd2474 87const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxHole=1.5/2.;
88const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyHole=6./2.;
89const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergPlastic=0.74/2.;
90const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergPlastic=5.09/2.;
91const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergCopper=0.25/2.;
92const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergCopper=3.6/2.;
93const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxKapton=0.8/2.;
94const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyKapton=5.7/2.;
95const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxDaughter=2.3/2.;
96const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyDaughter=6.3/2.;
97const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetX=1.46;
98const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetY=0.71;
99const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamX=1.46;
100const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamY=0.051;
101
102const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaQuadLHC=2.6; // LHC Origin wrt Quadrant Origin
103const GReal_t AliMUONSt1GeometryBuilderV2::fgkFrameOffset=5.0;
104
105const char* AliMUONSt1GeometryBuilderV2::fgkHoleName="MCHL";
106const char* AliMUONSt1GeometryBuilderV2::fgkDaughterName="MCDB";
107const char AliMUONSt1GeometryBuilderV2::fgkFoamLayerSuffix='F'; // prefix for automatic volume naming
108const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMLayerName="SQM";
109const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantNLayerName="SQN";
110const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantFLayerName="SQF";
5f91c9e8 111
112//______________________________________________________________________________
d1cd2474 113AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon)
114 : AliMUONVGeometryBuilder(&muon->Chamber(0), &muon->Chamber(1)),
115 fMUON(muon)
ba030c0e 116{
5f91c9e8 117 // set path to mapping data files
118 if (! gSystem->Getenv("MINSTALL")) {
119 TString dirPath = gSystem->Getenv("ALICE_ROOT");
120 dirPath += "/MUON/mapping";
121 AliMpFiles::Instance()->SetTopPath(dirPath);
122 gSystem->Setenv("MINSTALL", dirPath.Data());
123 //cout << "AliMpFiles top path set to " << dirPath << endl;
124 }
125 //else
d1cd2474 126 // cout << gSystem->Getenv("MINSTALL") << endl;
ba030c0e 127}
128
5f91c9e8 129//______________________________________________________________________________
d1cd2474 130AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2()
131 : AliMUONVGeometryBuilder(),
132 fMUON(0)
ba030c0e 133{
d1cd2474 134// Default Constructor
135// --
ba030c0e 136}
137
5f91c9e8 138//______________________________________________________________________________
d1cd2474 139AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(const AliMUONSt1GeometryBuilderV2& rhs)
140 : AliMUONVGeometryBuilder(rhs)
ba030c0e 141{
142// Dummy copy constructor
d1cd2474 143
144 Fatal("Copy constructor",
145 "Copy constructor is not implemented.");
ba030c0e 146}
147
5f91c9e8 148//______________________________________________________________________________
d1cd2474 149AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2()
ba030c0e 150{
151// Destructor
ba030c0e 152}
153
d1cd2474 154
155//______________________________________________________________________________
156AliMUONSt1GeometryBuilderV2&
157AliMUONSt1GeometryBuilderV2::operator = (const AliMUONSt1GeometryBuilderV2& rhs)
158{
159 // check assignement to self
160 if (this == &rhs) return *this;
161
162 Fatal("operator=",
163 "Assignment operator is not implemented.");
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);
ba030c0e 189
5f91c9e8 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;
223
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 }
605}
ba030c0e 606
5f91c9e8 607//______________________________________________________________________________
d1cd2474 608void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber)
5f91c9e8 609{
610// Create the non-sensitive elements of the frame for the <chamber>
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