]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSt1GeometryBuilderV2.cxx
New methods to display tracking informations have been added
[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 1404.
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"
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)
a432117a 114 : AliMUONVGeometryBuilder("st1V2.dat",
115 &muon->Chamber(0), &muon->Chamber(1)),
d1cd2474 116 fMUON(muon)
ba030c0e 117{
5f91c9e8 118 // set path to mapping data files
119 if (! gSystem->Getenv("MINSTALL")) {
120 TString dirPath = gSystem->Getenv("ALICE_ROOT");
121 dirPath += "/MUON/mapping";
122 AliMpFiles::Instance()->SetTopPath(dirPath);
123 gSystem->Setenv("MINSTALL", dirPath.Data());
124 //cout << "AliMpFiles top path set to " << dirPath << endl;
125 }
126 //else
d1cd2474 127 // cout << gSystem->Getenv("MINSTALL") << endl;
ba030c0e 128}
129
5f91c9e8 130//______________________________________________________________________________
d1cd2474 131AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2()
132 : AliMUONVGeometryBuilder(),
133 fMUON(0)
ba030c0e 134{
d1cd2474 135// Default Constructor
136// --
ba030c0e 137}
138
5f91c9e8 139//______________________________________________________________________________
d1cd2474 140AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(const AliMUONSt1GeometryBuilderV2& rhs)
141 : AliMUONVGeometryBuilder(rhs)
ba030c0e 142{
143// Dummy copy constructor
d1cd2474 144
145 Fatal("Copy constructor",
146 "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
163 Fatal("operator=",
164 "Assignment operator is not implemented.");
165
166 return *this;
167}
168
5f91c9e8 169//
170// Private methods
171//
172
173//______________________________________________________________________________
d1cd2474 174void AliMUONSt1GeometryBuilderV2::CreateHole()
ba030c0e 175{
5f91c9e8 176// Create all the elements found inside a foam hole
ba030c0e 177// --
d1cd2474 178 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
179 Int_t idAir = idtmed[1100]; // medium 1
180 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
181 Int_t idCopper = idtmed[1121]; // medium 22 = copper
ba030c0e 182
5f91c9e8 183 GReal_t par[3];
184 GReal_t posX,posY,posZ;
185
186 par[0] = fgkHxHole;
187 par[1] = fgkHyHole;
188 par[2] = fgkHzFoam;
189 gMC->Gsvolu(fgkHoleName,"BOX",idAir,par,3);
ba030c0e 190
5f91c9e8 191 par[0] = fgkHxKapton;
192 par[1] = fgkHyKapton;
193 par[2] = fgkHzSnPb;
194 gMC->Gsvolu("SNPB", "BOX", idCopper, par, 3);
195 posX = 0.;
196 posY = 0.;
197 posZ = -fgkHzFoam+fgkHzSnPb;
198 gMC->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
ba030c0e 199
5f91c9e8 200 par[0] = fgkHxHole;
201 par[1] = fgkHyBergPlastic;
202 par[2] = fgkHzKapton;
203 gMC->Gsvolu("KAPT", "BOX", idCopper, par, 3);
204 posX = 0.;
205 posY = 0.;
206 posZ = 0.;
207 gMC->Gspos("KAPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
208}
ba030c0e 209
5f91c9e8 210//______________________________________________________________________________
d1cd2474 211void AliMUONSt1GeometryBuilderV2::CreateDaughterBoard()
5f91c9e8 212{
213// Create all the elements in a daughter board
214// --
d1cd2474 215 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
5f91c9e8 216 Int_t idAir = idtmed[1100]; // medium 1
d1cd2474 217 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
218 //Int_t idPlastic =idtmed[1116]; // medium 17 = Plastic
219 Int_t idCopper = idtmed[1121]; // medium 22 = copper
220 Int_t idPlastic =idtmed[1127]; // medium 28 = Plastic
ba030c0e 221
5f91c9e8 222 GReal_t par[3];
223 GReal_t posX,posY,posZ;
224
225 par[0]=fgkHxDaughter;
226 par[1]=fgkHyDaughter;
227 par[2]=TotalHzDaughter();
228 gMC->Gsvolu(fgkDaughterName,"BOX",idAir,par,3);
ba030c0e 229
5f91c9e8 230 par[0]=fgkHxBergPlastic;
231 par[1]=fgkHyBergPlastic;
232 par[2]=fgkHzBergPlastic;
233 gMC->Gsvolu("BRGP","BOX",idPlastic,par,3);
234 posX=0.;
235 posY=0.;
236 posZ = -TotalHzDaughter() + fgkHzBergPlastic;
237 gMC->Gspos("BRGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
238
239 par[0]=fgkHxBergCopper;
240 par[1]=fgkHyBergCopper;
241 par[2]=fgkHzBergCopper;
242 gMC->Gsvolu("BRGC","BOX",idCopper,par,3);
243 posX=0.;
244 posY=0.;
245 posZ=0.;
246 gMC->Gspos("BRGC",1,"BRGP",posX,posY,posZ,0,"ONLY");
247
248 par[0]=fgkHxDaughter;
249 par[1]=fgkHyDaughter;
250 par[2]=fgkHzDaughter;
251 gMC->Gsvolu("DGHT","BOX",idCopper,par,3);
252 posX=0.;
253 posY=0.;
254 posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter;
255 gMC->Gspos("DGHT",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
256}
257
258//______________________________________________________________________________
d1cd2474 259void AliMUONSt1GeometryBuilderV2::CreateInnerLayers()
5f91c9e8 260{
261// Create the layer of sensitive volumes with gas
262// and the copper layer.
263// --
264
265// Gas Medium
d1cd2474 266 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
267 //Int_t idArCO2 = idtmed[1108]; // medium 9 (ArCO2 80%)
268 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
269 Int_t idArCO2 = idtmed[1124]; // medium 25 (ArCO2 80%)
270 Int_t idCopper = idtmed[1121]; // medium 22 = copper
5f91c9e8 271
272 Float_t par[11];
273
274//Make gas volume - composed of 11 trapezoids
275// section 1 of 11
276 par[0] = fgkHzGas;
277 par[1] = 0.;
278 par[2] = 0.;
279 par[3] = 71.33/2.;
280 par[4] = 9.76/2.;
281 par[5] = 48.77/2.;
282 par[6] = 15.3;
283 par[7] = 71.33/2.;
284 par[8] = 9.76/2.;
285 par[9] = 48.77/2.;
286 par[10] = 15.3;
287
288 gMC->Gsvolu("SA1G", "TRAP", idArCO2, par, 11);
289 gMC->Gsvolu("SA2G", "TRAP", idArCO2, par, 11);
ba030c0e 290
5f91c9e8 291 par[0] = fgkHzPadPlane;
292 gMC->Gsvolu("SA1C", "TRAP", idCopper,par, 11);
293
294// section 2 of 11
295 par[0] = fgkHzGas;
296 par[1] = 0.;
297 par[2] = 0.;
298 par[3] = 79.68/2.;
299 par[4] = 10.4/2.;
300 par[5] = 57.0/2.;
301 par[6] = 0.;
302 par[7] = 79.68/2.;
303 par[8] = 10.4/2.;
304 par[9] = 57.0/2.;
305 par[10] = 0.;
306 gMC->Gsvolu("SB1G", "TRAP", idArCO2, par, 11);
307 gMC->Gsvolu("SB2G", "TRAP", idArCO2, par, 11);
308
309 par[0] = fgkHzPadPlane;
310 gMC->Gsvolu("SB1C", "TRAP", idCopper,par, 11);
311
312// section 3 of 11
313 par[0] = fgkHzGas;
314 par[1] = 0.;
315 par[2] = 0.;
316 par[3] = 71.33/2.;
317 par[4] = 48.77/2.;
318 par[5] = 9.73/2.;
319 par[6] = -15.3;
320 par[7] = 71.33/2.;
321 par[8] = 48.77/2.;
322 par[9] = 9.73/2.;
323 par[10] = -15.3;
324
325 gMC->Gsvolu("SC1G", "TRAP", idArCO2, par, 11);
326 gMC->Gsvolu("SC2G", "TRAP", idArCO2, par, 11);
327
328 par[0] = fgkHzPadPlane;
329 gMC->Gsvolu("SC1C", "TRAP", idCopper,par, 11);
330
331// section 4 of 11
332 par[0] = fgkHzGas;
333 par[1] = 0.;
334 par[2] = 0.;
335 par[3] = 6.00/2.;
336 par[4] = 0.;
337 par[5] = 1.56/2.;
338 par[6] = 7.41;
339 par[7] = 6.00/2.;
340 par[8] = 0.;
341 par[9] = 1.56/2.;
342 par[10] = 7.41;
343 gMC->Gsvolu("SD1G", "TRAP", idArCO2, par, 11);
344 gMC->Gsvolu("SD2G", "TRAP", idArCO2, par, 11);
345
346 par[0] = fgkHzPadPlane;
347 gMC->Gsvolu("SD1C", "TRAP", idCopper,par, 11);
348
349// section 5 of 11
350 par[0] = fgkHzGas;
351 par[1] = 0.;
352 par[2] = 0.;
353 par[3] = 1.516/2.;
354 par[4] = 0.;
355 par[5] = 0.829/2.;
356 par[6] = 15.3;
357 par[7] = 1.516/2.;
358 par[8] = 0.;
359 par[9] = 0.829/2.;
360 par[10] = 15.3;
361 gMC->Gsvolu("SE1G", "TRAP", idArCO2, par, 11);
362 gMC->Gsvolu("SE2G", "TRAP", idArCO2, par, 11);
363
364 par[0] = fgkHzPadPlane;
365 gMC->Gsvolu("SE1C", "TRAP", idCopper,par, 11);
366
367// section 6 of 11
368 par[0] = fgkHzGas;
369 par[1] = 0.;
370 par[2] = 0.;
371 par[3] = 3.92/2.;
372 par[4] = 0.;
373 par[5] = 0.562/2.;
374 par[6] = -4.1;
375 par[7] = 3.92/2.;
376 par[8] = 0.;
377 par[9] = 0.562/2.;
378 par[10] = -4.1;
379 gMC->Gsvolu("SF1G", "TRAP", idArCO2, par, 11);
380 gMC->Gsvolu("SF2G", "TRAP", idArCO2, par, 11);
381
382 par[0] = fgkHzPadPlane;
383 gMC->Gsvolu("SF1C", "TRAP", idCopper,par, 11);
384
385// section 7 of 11
386 par[0] = fgkHzGas;
387 par[1] = 0.;
388 par[2] = 0.;
389 par[3] = 0.941/2.;
390 par[4] = 0.562/2.;
391 par[5] = 0.;
392 par[6] = -16.6;
393 par[7] = 0.941/2.;
394 par[8] = 0.562/2.;
395 par[9] = 0.;
396 par[10] =-16.6;
397 gMC->Gsvolu("SG1G", "TRAP", idArCO2, par, 11);
398 gMC->Gsvolu("SG2G", "TRAP", idArCO2, par, 11);
399
400 par[0] = fgkHzPadPlane;
401 gMC->Gsvolu("SG1C", "TRAP", idCopper,par, 11);
402
403// section 8 of 11
404 par[0] = fgkHzGas;
405 par[1] = 0.;
406 par[2] = 0.;
407 par[3] = 3.94/2.;
408 par[4] = 0.57/2.;
409 par[5] = 0.;
410 par[6] = 4.14;
411 par[7] = 3.94/2.;
412 par[8] = 0.57/2.;
413 par[9] = 0.;
414 par[10] = 4.14;
415 gMC->Gsvolu("SH1G", "TRAP", idArCO2, par, 11);
416 gMC->Gsvolu("SH2G", "TRAP", idArCO2, par, 11);
417
418 par[0] = fgkHzPadPlane;
419 gMC->Gsvolu("SH1C", "TRAP", idCopper,par, 11);
420
421// section 9 of 11
422 par[0] = fgkHzGas;
423 par[1] = 0.;
424 par[2] = 0.;
425 par[3] = 0.95/2.;
426 par[4] = 0.;
427 par[5] = 0.57/2;
428 par[6] = 16.7;
429 par[7] = 0.95/2.;
430 par[8] = 0.;
431 par[9] = 0.57/2;
432 par[10] = 16.7;
433 gMC->Gsvolu("SI1G", "TRAP", idArCO2, par, 11);
434 gMC->Gsvolu("SI2G", "TRAP", idArCO2, par, 11);
435
436 par[0] = fgkHzPadPlane;
437 gMC->Gsvolu("SI1C", "TRAP", idCopper,par, 11);
438
439// section 10 of 11
440 par[0] = fgkHzGas;
441 par[1] = 0.;
442 par[2] = 0.;
443 par[3] = 1.49/2.;
444 par[4] = 0.;
445 par[5] = 0.817/2.;
446 par[6] = -15.4;
447 par[7] = 1.49/2.;
448 par[8] = 0.;
449 par[9] = 0.817/2.;
450 par[10] = -15.4;
451 gMC->Gsvolu("SJ1G", "TRAP", idArCO2, par, 11);
452 gMC->Gsvolu("SJ2G", "TRAP", idArCO2, par, 11);
453
454 par[0] = fgkHzPadPlane;
455 gMC->Gsvolu("SJ1C", "TRAP", idCopper,par, 11);
456
457// section 11 of 11
458 par[0] = fgkHzGas;
459 par[1] = 0.;
460 par[2] = 0.;
461 par[3] = 5.93/2.;
462 par[4] = 0.;
463 par[5] = 1.49/2.;
464 par[6] = -7.16;
465 par[7] = 5.93/2.;
466 par[8] = 0.;
467 par[9] = 1.49/2.;
468 par[10] = -7.16;
469 gMC->Gsvolu("SK1G", "TRAP", idArCO2, par, 11);
470 gMC->Gsvolu("SK2G", "TRAP", idArCO2, par, 11);
471
472 par[0] = fgkHzPadPlane;
473 gMC->Gsvolu("SK1C", "TRAP", idCopper,par, 11);
ba030c0e 474}
5f91c9e8 475
476//______________________________________________________________________________
d1cd2474 477void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber)
ba030c0e 478{
479// create the quadrant (bending and non-bending planes)
480// for the given chamber
481// --
5f91c9e8 482
ba030c0e 483 CreateFrame(chamber);
484
d1cd2474 485#ifdef ST1_WITH_STL
486 SpecialMap specialMap;
5f91c9e8 487 specialMap[1001] = AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.);
488 specialMap[1002] = AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36));
489 specialMap[1003] = AliMUONSt1SpecialMotif(TVector2(1.01, 0.36));
d1cd2474 490#endif
491
492#ifdef ST1_WITH_ROOT
493 SpecialMap specialMap;
494 specialMap.Add(1001, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.));
495 specialMap.Add(1002, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36)));
496 specialMap.Add(1003, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36)));
497#endif
498
4a147321 499 AliMpReader reader1(kStation1, kBendingPlane);
5f91c9e8 500 AliMpSector* sector1 = reader1.BuildSector();
ba030c0e 501
5f91c9e8 502 Bool_t reflectZ = true;
503 TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.);
504 PlaceSector(sector1, specialMap, where, reflectZ, chamber);
ba030c0e 505
d1cd2474 506#ifdef ST1_WITH_STL
ba030c0e 507 specialMap.clear();
508 specialMap[4001] = AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.);
509 specialMap[4002] = AliMUONSt1SpecialMotif(TVector2(1.96, 0.17));
510 specialMap[4003] = AliMUONSt1SpecialMotif(TVector2(1.61,-1.18));
511 specialMap[4004] = AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08));
512 specialMap[4005] = AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25));
513 specialMap[4006] = AliMUONSt1SpecialMotif(TVector2(0.28, 0.21));
d1cd2474 514#endif
515
516#ifdef ST1_WITH_ROOT
517 specialMap.Delete();
518 specialMap.Add(4001,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.));
519 specialMap.Add(4002,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.96, 0.17)));
520 specialMap.Add(4003,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.61,-1.18)));
521 specialMap.Add(4004,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08)));
522 specialMap.Add(4005,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25)));
523 specialMap.Add(4006,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.28, 0.21)));
524#endif
525
4a147321 526 AliMpReader reader2(kStation1, kNonBendingPlane);
5f91c9e8 527 AliMpSector* sector2 = reader2.BuildSector();
ba030c0e 528
5f91c9e8 529 reflectZ = false;
530 where = TVector3(where.X()+0.63/2.,where.Y()+0.42/2., 0.); //add a half pad shift
531 PlaceSector(sector2, specialMap, where, reflectZ, chamber);
d1cd2474 532
533#ifdef ST1_WITH_ROOT
534 specialMap.Delete();
535#endif
ba030c0e 536}
537
5f91c9e8 538//______________________________________________________________________________
d1cd2474 539void AliMUONSt1GeometryBuilderV2::CreateFoamBox(const char* name,const TVector2& dimensions)
ba030c0e 540{
5f91c9e8 541// create all the elements in the copper plane
542// --
ba030c0e 543
d1cd2474 544 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
5f91c9e8 545 Int_t idAir = idtmed[1100]; // medium 1
d1cd2474 546 //Int_t idFoam = idtmed[1115]; // medium 16 = Foam
547 //Int_t idFR4 = idtmed[1114]; // medium 15 = FR4
548 Int_t idFoam = idtmed[1125]; // medium 26 = Foam
549 Int_t idFR4 = idtmed[1122]; // medium 23 = FR4
ba030c0e 550
5f91c9e8 551 // mother volume
552 GReal_t par[3];
553 par[0] = dimensions.X();
554 par[1] = dimensions.Y();
555 par[2] = TotalHzPlane();
556 gMC->Gsvolu(name,"BOX",idAir,par,3);
557
558 // foam layer
559 GReal_t posX,posY,posZ;
560 char eName[5];
561 strcpy(eName,name);
562 eName[3]=fgkFoamLayerSuffix;
563 par[0] = dimensions.X();
564 par[1] = dimensions.Y();
565 par[2] = fgkHzFoam;
566 gMC->Gsvolu(eName,"BOX",idFoam,par,3);
567 posX=0.;
568 posY=0.;
569 posZ = -TotalHzPlane() + fgkHzFoam;
570 gMC->Gspos(eName,1,name,posX,posY,posZ,0,"ONLY");
ba030c0e 571
5f91c9e8 572 // mechanical plane FR4 layer
573 eName[3]='R';
574 par[0] = dimensions.X();
575 par[1] = dimensions.Y();
576 par[2] = fgkHzFR4;
577 gMC->Gsvolu(eName,"BOX",idFR4,par,3);
578 posX=0.;
579 posY=0.;
580 posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4;
581 gMC->Gspos(eName,1,name,posX,posY,posZ,0,"ONLY");
582}
ba030c0e 583
5f91c9e8 584//______________________________________________________________________________
d1cd2474 585void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(const char* name,const TVector2& dimensions,
5f91c9e8 586 Int_t nofHoles)
587{
588// Create a segment of a plane (this includes a foam layer,
589// holes in the foam to feed the kaptons through, kapton connectors
590// and the mother board.)
591// --
ba030c0e 592
5f91c9e8 593 CreateFoamBox(name,dimensions);
ba030c0e 594
5f91c9e8 595 char eName[5];
596 strcpy(eName,name);
597 eName[3]=fgkFoamLayerSuffix;
ba030c0e 598
5f91c9e8 599 for (Int_t holeNum=0;holeNum<nofHoles;holeNum++) {
600 GReal_t posX = ((2.*holeNum+1.)/nofHoles-1.)*dimensions.X();
601 GReal_t posY = 0.;
602 GReal_t posZ = 0.;
ba030c0e 603
5f91c9e8 604 gMC->Gspos(fgkHoleName,holeNum+1,eName,posX,posY,posZ,0,"ONLY");
605 }
606}
ba030c0e 607
5f91c9e8 608//______________________________________________________________________________
d1cd2474 609void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber)
5f91c9e8 610{
611// Create the non-sensitive elements of the frame for the <chamber>
612//
613//
614// Model and notation:
615//
616// The Quadrant volume name starts with SQ
617// The volume segments are numbered 00 to XX.
618//
619// OutTopFrame
620// (SQ02-16)
621// ------------
622// OutEdgeFrame / |
623// (SQ17-24) / | InVFrame (SQ00-01)
624// / |
625// | |
626// OutVFrame | _- -
627// (SQ25-39) | | InArcFrame (SQ42-45)
628// | |
629// -------------
630// InHFrame (SQ40-41)
631//
632//
633// 06 February 2003 - Overlapping volumes resolved.
634// One quarter chamber is comprised of three TUBS volumes: SQMx, SQNx, and SQFx,
635// where SQMx is the Quadrant Middle layer for chamber <x> ( posZ in [-3.25,3.25]),
636// SQNx is the Quadrant Near side layer for chamber <x> ( posZ in [-6.25,3-.25) ), and
637// SQFx is the Quadrant Far side layer for chamber <x> ( posZ in (3.25,6.25] ).
638//---
ba030c0e 639
d1cd2474 640 const Float_t kNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin
ba030c0e 641
ba030c0e 642 // tracking medias
d1cd2474 643 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
5f91c9e8 644
ba030c0e 645 Int_t idAir = idtmed[1100]; // medium 1
d1cd2474 646 //Int_t idFrameEpoxy = idtmed[1115]; // medium 16 = Frame Epoxy ME730
647 //Int_t idInox = idtmed[1116]; // medium 17 Stainless Steel (18%Cr,9%Ni,Fe)
648 //Int_t idFR4 = idtmed[1110]; // medium 11 FR4
649 //Int_t idCopper = idtmed[1109]; // medium 10 Copper
650 //Int_t idAlu = idtmed[1103]; // medium 4 Aluminium
651 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
652 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
653 Int_t idFR4 = idtmed[1122]; // medium 23 FR4 // was 15 not 11
654 Int_t idCopper = idtmed[1121]; // medium 22 Copper
655 Int_t idAlu = idtmed[1120]; // medium 21 Aluminium
5f91c9e8 656
657
658// Rotation Matrices
659 Int_t rot1, rot2, rot3;
660
661// Rotation matrices
d1cd2474 662 fMUON->AliMatrix(rot1, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane
663 fMUON->AliMatrix(rot2, 90., 45., 90., 135., 0., 0.); // +45 deg in x-y plane
664