]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - MUON/AliMUONSt1GeometryBuilderV2.cxx
Added commented line for activation the fast raw data decoder.
[u/mrichter/AliRoot.git] / MUON / AliMUONSt1GeometryBuilderV2.cxx
... / ...
Content-type: text/html ]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - MUON/AliMUONSt1GeometryBuilderV2.cxx


500 - Internal Server Error

Malformed UTF-8 character (fatal) at (eval 5) line 1, <$fd> line 824.
CommitLineData
1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16// $Id$
17//
18//-----------------------------------------------------------------------------
19// Class AliMUONSt1GeometryBuilderV2
20// ---------------------------------
21// MUON Station1 detailed geometry construction class.
22// (Originally defined in AliMUONv2.cxx - now removed.)
23// Included in AliRoot 2004/01/23
24// Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
25//-----------------------------------------------------------------------------
26
27#include "AliMUONSt1GeometryBuilderV2.h"
28#include "AliMUONSt1SpecialMotif.h"
29#include "AliMUON.h"
30#include "AliMUONConstants.h"
31#include "AliMUONGeometryModule.h"
32#include "AliMUONGeometryEnvelopeStore.h"
33
34#include "AliMpSegmentation.h"
35#include "AliMpDEManager.h"
36#include "AliMpContainers.h"
37#include "AliMpConstants.h"
38#include "AliMpCDB.h"
39#include "AliMpSectorSegmentation.h"
40#include "AliMpSector.h"
41#include "AliMpRow.h"
42#include "AliMpVRowSegment.h"
43#include "AliMpMotifMap.h"
44#include "AliMpMotifPosition.h"
45#include "AliMpPlaneType.h"
46
47#include "AliRun.h"
48#include "AliMagF.h"
49#include "AliLog.h"
50
51#include <TVector2.h>
52#include <TVector3.h>
53#include <TGeoMatrix.h>
54#include <TClonesArray.h>
55#include <Riostream.h>
56#include <TSystem.h>
57#include <TVirtualMC.h>
58#include <TGeoManager.h>
59#include <TGeoVolume.h>
60#include <TGeoTube.h>
61#include <TGeoCompositeShape.h>
62
63#ifdef WITH_STL
64 #include <vector>
65#endif
66
67#ifdef WITH_ROOT
68 #include "TArrayI.h"
69#endif
70
71/// \cond CLASSIMP
72ClassImp(AliMUONSt1GeometryBuilderV2)
73/// \endcond
74
75// Thickness Constants
76const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzPadPlane=0.0148/2.; //Pad plane
77const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFoam = 2.503/2.; //Foam of mechanicalplane
78const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFR4 = 0.062/2.; //FR4 of mechanical plane
79const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzSnPb = 0.0091/2.; //Pad/Kapton connection (66 pt)
80const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzKapton = 0.0122/2.; //Kapton
81const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergPlastic = 0.3062/2.;//Berg connector
82const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergCopper = 0.1882/2.; //Berg connector
83const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzDaughter = 0.0156/2.; //Daughter board
84const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzGas = 0.42/2.; //Gas thickness
85
86// Quadrant Mother volume - TUBS1 - Middle layer of model
87const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR1 = 18.3;
88const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR1 = 105.673;
89const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick1 = 6.5/2;
90const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL1 = 0.;
91const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU1 = 90.;
92
93// Quadrant Mother volume - TUBS2 - near and far layers of model
94const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR2 = 20.7;
95const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR2 = 100.073;
96const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick2 = 3.0/2;
97const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL2 = 0.;
98const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU2 = 90.;
99
100// Sensitive copper pads, foam layer, PCB and electronics model parameters
101const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxHole=1.5/2.;
102const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyHole=6./2.;
103const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergPlastic=0.74/2.;
104const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergPlastic=5.09/2.;
105const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergCopper=0.25/2.;
106const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergCopper=3.6/2.;
107const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxKapton=0.8/2.;
108const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyKapton=5.7/2.;
109const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxDaughter=2.3/2.;
110const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyDaughter=6.3/2.;
111const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetX=1.46;
112const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetY=0.71;
113const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamX=1.46;
114const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamY=0.051;
115
116const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaQuadLHC=2.6; // LHC Origin wrt Quadrant Origin
117const GReal_t AliMUONSt1GeometryBuilderV2::fgkFrameOffset=5.2;
118 // Fix (1) of overlap SQN* layers with SQM* ones (was 5.0)
119
120// Pad planes offsets
121const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadXOffsetBP = 0.50 - 0.63/2; // = 0.185
122const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadYOffsetBP = -0.31 - 0.42/2; // =-0.52
123
124const char* AliMUONSt1GeometryBuilderV2::fgkHoleName="SCHL";
125const char* AliMUONSt1GeometryBuilderV2::fgkDaughterName="SCDB";
126const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantEnvelopeName="SE";
127const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMLayerName="SQM";
128const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantNLayerName="SQN";
129const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantFLayerName="SQF";
130const Int_t AliMUONSt1GeometryBuilderV2::fgkFoamBoxNameOffset=200;
131const Int_t AliMUONSt1GeometryBuilderV2::fgkFR4BoxNameOffset=400;
132const Int_t AliMUONSt1GeometryBuilderV2::fgkDaughterCopyNoOffset=1000;
133
134//______________________________________________________________________________
135AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon)
136 : AliMUONVGeometryBuilder(0, 2),
137 fMUON(muon)
138{
139/// Standard constructor
140}
141
142//______________________________________________________________________________
143AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2()
144 : AliMUONVGeometryBuilder(),
145 fMUON(0)
146{
147/// Default Constructor
148}
149
150//______________________________________________________________________________
151AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2()
152{
153/// Destructor
154}
155
156
157//
158// Private methods
159//
160
161//______________________________________________________________________________
162TString
163AliMUONSt1GeometryBuilderV2::QuadrantEnvelopeName(Int_t chamber, Int_t quadrant) const
164{
165/// Generate unique envelope name from chamber Id and quadrant number
166
167 return Form("%s%d", Form("%s%d",fgkQuadrantEnvelopeName,chamber), quadrant);
168}
169
170//______________________________________________________________________________
171void AliMUONSt1GeometryBuilderV2::CreateHole()
172{
173/// Create all the elements found inside a foam hole
174
175 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
176 Int_t idAir = idtmed[1100]; // medium 1
177 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
178 Int_t idCopper = idtmed[1121]; // medium 22 = copper
179
180 GReal_t par[3];
181 GReal_t posX,posY,posZ;
182
183 par[0] = fgkHxHole;
184 par[1] = fgkHyHole;
185 par[2] = fgkHzFoam;
186 gMC->Gsvolu(fgkHoleName,"BOX",idAir,par,3);
187
188 par[0] = fgkHxKapton;
189 par[1] = fgkHyKapton;
190 par[2] = fgkHzSnPb;
191 gMC->Gsvolu("SNPB", "BOX", idCopper, par, 3);
192 posX = 0.;
193 posY = 0.;
194 posZ = -fgkHzFoam+fgkHzSnPb;
195 gMC->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
196
197 par[0] = fgkHxHole;
198 par[1] = fgkHyBergPlastic;
199 par[2] = fgkHzKapton;
200 gMC->Gsvolu("SKPT", "BOX", idCopper, par, 3);
201 posX = 0.;
202 posY = 0.;
203 posZ = 0.;
204 gMC->Gspos("SKPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
205}
206
207//______________________________________________________________________________
208void AliMUONSt1GeometryBuilderV2::CreateDaughterBoard()
209{
210/// Create all the elements in a daughter board
211
212 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
213 Int_t idAir = idtmed[1100]; // medium 1
214 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
215 //Int_t idPlastic =idtmed[1116]; // medium 17 = Plastic
216 Int_t idCopper = idtmed[1121]; // medium 22 = copper
217 Int_t idPlastic =idtmed[1127]; // medium 28 = Plastic
218
219 GReal_t par[3];
220 GReal_t posX,posY,posZ;
221
222 par[0]=fgkHxDaughter;
223 par[1]=fgkHyDaughter;
224 par[2]=TotalHzDaughter();
225 gMC->Gsvolu(fgkDaughterName,"BOX",idAir,par,3);
226
227 par[0]=fgkHxBergPlastic;
228 par[1]=fgkHyBergPlastic;
229 par[2]=fgkHzBergPlastic;
230 gMC->Gsvolu("SBGP","BOX",idPlastic,par,3);
231 posX=0.;
232 posY=0.;
233 posZ = -TotalHzDaughter() + fgkHzBergPlastic;
234 gMC->Gspos("SBGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
235
236 par[0]=fgkHxBergCopper;
237 par[1]=fgkHyBergCopper;
238 par[2]=fgkHzBergCopper;
239 gMC->Gsvolu("SBGC","BOX",idCopper,par,3);
240 posX=0.;
241 posY=0.;
242 posZ=0.;
243 gMC->Gspos("SBGC",1,"SBGP",posX,posY,posZ,0,"ONLY");
244
245 par[0]=fgkHxDaughter;
246 par[1]=fgkHyDaughter;
247 par[2]=fgkHzDaughter;
248 gMC->Gsvolu("SDGH","BOX",idCopper,par,3);
249 posX=0.;
250 posY=0.;
251 posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter;
252 gMC->Gspos("SDGH",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
253}
254
255//______________________________________________________________________________
256void AliMUONSt1GeometryBuilderV2::CreateInnerLayers()
257{
258/// Create the layer of sensitive volumes with gas
259/// and the copper layer.
260
261// Gas Medium
262 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
263 Int_t idArCO2 = idtmed[1108]; // medium 9 (ArCO2 80%)
264 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
265 //Int_t idArCO2 = idtmed[1124]; // medium 25 (ArCO2 80%)
266 Int_t idCopper = idtmed[1121]; // medium 22 = copper
267
268 Float_t par[11];
269
270//Make gas volume - composed of 11 trapezoids
271// section 1 of 11
272 par[0] = fgkHzGas;
273 par[1] = 0.;
274 par[2] = 0.;
275 par[3] = 71.33/2.;
276 par[4] = 9.76/2.;
277 par[5] = 48.77/2.;
278 par[6] = 15.3;
279 par[7] = 71.33/2.;
280 par[8] = 9.76/2.;
281 par[9] = 48.77/2.;
282 par[10] = 15.3;
283
284 gMC->Gsvolu("SA1G", "TRAP", idArCO2, par, 11);
285 gMC->Gsvolu("SA2G", "TRAP", idArCO2, par, 11);
286
287 par[0] = fgkHzPadPlane;
288 gMC->Gsvolu("SA1C", "TRAP", idCopper,par, 11);
289
290// section 2 of 11
291 par[0] = fgkHzGas;
292 par[1] = 0.;
293 par[2] = 0.;
294 par[3] = 79.68/2.;
295 par[4] = 10.4/2.;
296 par[5] = 57.0/2.;
297 par[6] = 0.;
298 par[7] = 79.68/2.;
299 par[8] = 10.4/2.;
300 par[9] = 57.0/2.;
301 par[10] = 0.;
302 gMC->Gsvolu("SB1G", "TRAP", idArCO2, par, 11);
303 gMC->Gsvolu("SB2G", "TRAP", idArCO2, par, 11);
304
305 par[0] = fgkHzPadPlane;
306 gMC->Gsvolu("SB1C", "TRAP", idCopper,par, 11);
307
308// section 3 of 11
309 par[0] = fgkHzGas;
310 par[1] = 0.;
311 par[2] = 0.;
312 par[3] = 71.33/2.;
313 par[4] = 48.77/2.;
314 par[5] = 9.73/2.;
315 par[6] = -15.3;
316 par[7] = 71.33/2.;
317 par[8] = 48.77/2.;
318 par[9] = 9.73/2.;
319 par[10] = -15.3;
320
321 gMC->Gsvolu("SC1G", "TRAP", idArCO2, par, 11);
322 gMC->Gsvolu("SC2G", "TRAP", idArCO2, par, 11);
323
324 par[0] = fgkHzPadPlane;
325 gMC->Gsvolu("SC1C", "TRAP", idCopper,par, 11);
326
327// section 4 of 11
328 par[0] = fgkHzGas;
329 par[1] = 0.;
330 par[2] = 0.;
331 par[3] = 6.00/2.;
332 par[4] = 0.;
333 par[5] = 1.56/2.;
334 par[6] = 7.41;
335 par[7] = 6.00/2.;
336 par[8] = 0.;
337 par[9] = 1.56/2.;
338 par[10] = 7.41;
339 gMC->Gsvolu("SD1G", "TRAP", idArCO2, par, 11);
340 gMC->Gsvolu("SD2G", "TRAP", idArCO2, par, 11);
341
342 par[0] = fgkHzPadPlane;
343 gMC->Gsvolu("SD1C", "TRAP", idCopper,par, 11);
344
345// section 5 of 11
346 par[0] = fgkHzGas;
347 par[1] = 0.;
348 par[2] = 0.;
349 par[3] = 1.516/2.;
350 par[4] = 0.;
351 par[5] = 0.829/2.;
352 par[6] = 15.3;
353 par[7] = 1.516/2.;
354 par[8] = 0.;
355 par[9] = 0.829/2.;
356 par[10] = 15.3;
357 gMC->Gsvolu("SE1G", "TRAP", idArCO2, par, 11);
358 gMC->Gsvolu("SE2G", "TRAP", idArCO2, par, 11);
359
360 par[0] = fgkHzPadPlane;
361 gMC->Gsvolu("SE1C", "TRAP", idCopper,par, 11);
362
363// section 6 of 11
364 par[0] = fgkHzGas;
365 par[1] = 0.;
366 par[2] = 0.;
367 par[3] = 3.92/2.;
368 par[4] = 0.;
369 par[5] = 0.562/2.;
370 par[6] = -4.1;
371 par[7] = 3.92/2.;
372 par[8] = 0.;
373 par[9] = 0.562/2.;
374 par[10] = -4.1;
375 gMC->Gsvolu("SF1G", "TRAP", idArCO2, par, 11);
376 gMC->Gsvolu("SF2G", "TRAP", idArCO2, par, 11);
377
378 par[0] = fgkHzPadPlane;
379 gMC->Gsvolu("SF1C", "TRAP", idCopper,par, 11);
380
381// section 7 of 11
382 par[0] = fgkHzGas;
383 par[1] = 0.;
384 par[2] = 0.;
385 par[3] = 0.941/2.;
386 par[4] = 0.562/2.;
387 par[5] = 0.;
388 par[6] = -16.6;
389 par[7] = 0.941/2.;
390 par[8] = 0.562/2.;
391 par[9] = 0.;
392 par[10] =-16.6;
393 gMC->Gsvolu("SG1G", "TRAP", idArCO2, par, 11);
394 gMC->Gsvolu("SG2G", "TRAP", idArCO2, par, 11);
395
396 par[0] = fgkHzPadPlane;
397 gMC->Gsvolu("SG1C", "TRAP", idCopper,par, 11);
398
399// section 8 of 11
400 par[0] = fgkHzGas;
401 par[1] = 0.;
402 par[2] = 0.;
403 par[3] = 3.94/2.;
404 par[4] = 0.57/2.;
405 par[5] = 0.;
406 par[6] = 4.14;
407 par[7] = 3.94/2.;
408 par[8] = 0.57/2.;
409 par[9] = 0.;
410 par[10] = 4.14;
411 gMC->Gsvolu("SH1G", "TRAP", idArCO2, par, 11);
412 gMC->Gsvolu("SH2G", "TRAP", idArCO2, par, 11);
413
414 par[0] = fgkHzPadPlane;
415 gMC->Gsvolu("SH1C", "TRAP", idCopper,par, 11);
416
417// section 9 of 11
418 par[0] = fgkHzGas;
419 par[1] = 0.;
420 par[2] = 0.;
421 par[3] = 0.95/2.;
422 par[4] = 0.;
423 par[5] = 0.57/2;
424 par[6] = 16.7;
425 par[7] = 0.95/2.;
426 par[8] = 0.;
427 par[9] = 0.57/2;
428 par[10] = 16.7;
429 gMC->Gsvolu("SI1G", "TRAP", idArCO2, par, 11);
430 gMC->Gsvolu("SI2G", "TRAP", idArCO2, par, 11);
431
432 par[0] = fgkHzPadPlane;
433 gMC->Gsvolu("SI1C", "TRAP", idCopper,par, 11);
434
435// section 10 of 11
436 par[0] = fgkHzGas;
437 par[1] = 0.;
438 par[2] = 0.;
439 par[3] = 1.49/2.;
440 par[4] = 0.;
441 par[5] = 0.817/2.;
442 par[6] = -15.4;
443 par[7] = 1.49/2.;
444 par[8] = 0.;
445 par[9] = 0.817/2.;
446 par[10] = -15.4;
447 gMC->Gsvolu("SJ1G", "TRAP", idArCO2, par, 11);
448 gMC->Gsvolu("SJ2G", "TRAP", idArCO2, par, 11);
449
450 par[0] = fgkHzPadPlane;
451 gMC->Gsvolu("SJ1C", "TRAP", idCopper,par, 11);
452
453// section 11 of 11
454 par[0] = fgkHzGas;
455 par[1] = 0.;
456 par[2] = 0.;
457 par[3] = 5.93/2.;
458 par[4] = 0.;
459 par[5] = 1.49/2.;
460 par[6] = -7.16;
461 par[7] = 5.93/2.;
462 par[8] = 0.;
463 par[9] = 1.49/2.;
464 par[10] = -7.16;
465 gMC->Gsvolu("SK1G", "TRAP", idArCO2, par, 11);
466 gMC->Gsvolu("SK2G", "TRAP", idArCO2, par, 11);
467
468 par[0] = fgkHzPadPlane;
469 gMC->Gsvolu("SK1C", "TRAP", idCopper,par, 11);
470}
471
472//______________________________________________________________________________
473void AliMUONSt1GeometryBuilderV2::CreateSpacer0()
474{
475/// The spacer volumes are defined according to the input prepared by Nicole Willis
476/// without any modifications
477/// <pre>
478/// No. Type Material Center (mm) Dimensions (mm) (half lengths)
479/// 5 BOX EPOXY 408.2 430.4 522.41 5.75 1.5 25.5
480/// 5P BOX EPOXY 408.2 445.4 522.41 5.75 1.5 25.5
481/// 6 BOX EPOXY 408.2 437.9 519.76 5.75 15.0 1.0
482/// 6P BOX EPOXY 408.2 437.9 525.06 5.75 15.0 1.0
483/// 7 CYL INOX 408.2 437.9 522.41 r=3.0 hz=20.63
484
485 // tracking medias
486 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
487 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
488 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
489
490 GReal_t par[3];
491 par[0] = 0.575;
492 par[1] = 0.150;
493 par[2] = 2.550;
494 gMC->Gsvolu("Spacer05","BOX",idFrameEpoxy,par,3);
495
496 par[0] = 0.575;
497 par[1] = 1.500;
498 par[2] = 0.100;
499 gMC->Gsvolu("Spacer06","BOX",idFrameEpoxy,par,3);
500
501 par[0] = 0.000;
502 par[1] = 0.300;
503 par[2] = 2.063;
504 gMC->Gsvolu("Spacer07","TUBE",idInox,par,3);
505}
506
507
508//______________________________________________________________________________
509void AliMUONSt1GeometryBuilderV2::CreateSpacer()
510{
511/// The spacer volumes are defined according to the input prepared by Nicole Willis
512/// with modifications needed to fit into existing geometry.
513/// <pre>
514/// No. Type Material Center (mm) Dimensions (mm) (half lengths)
515/// 5 BOX EPOXY 408.2 430.4 522.41 5.75 1.5 25.5
516/// 5P BOX EPOXY 408.2 445.4 522.41 5.75 1.5 25.5
517/// 6 BOX EPOXY 408.2 437.9 519.76 5.75 15.0 1.0
518/// 6P BOX EPOXY 408.2 437.9 525.06 5.75 15.0 1.0
519/// 7 CYL INOX 408.2 437.9 522.41 r=3.0 hz=20.63
520/// </pre>
521/// To fit in existing volumes the volumes 5 and 7 are represented by 2 volumes
522/// with half size in z (5A, &A); the dimensions of the volume 5A were also modified
523/// to avoid overlaps (x made smaller, y larger to abotain the identical volume)
524
525 // tracking medias
526 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
527 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
528 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
529
530 //GReal_t par[3];
531 //par[0] = 0.575;
532 //par[1] = 0.150;
533 //par[2] = 2.550;
534 //gMC->Gsvolu("Spacer5","BOX",idFrameEpoxy,par,3);
535
536 GReal_t par[3];
537 par[0] = 0.510;
538 par[1] = 0.170;
539 par[2] = 1.275;
540 gMC->Gsvolu("Spacer5A","BOX",idFrameEpoxy,par,3);
541
542 par[0] = 0.575;
543 par[1] = 1.500;
544 par[2] = 0.100;
545 gMC->Gsvolu("Spacer6","BOX",idFrameEpoxy,par,3);
546
547 //par[0] = 0.000;
548 //par[1] = 0.300;
549 //par[2] = 2.063;
550 //gMC->Gsvolu("Spacer7","TUBE",idInox,par,3);
551
552 par[0] = 0.000;
553 par[1] = 0.300;
554 par[2] = 1.0315;
555 gMC->Gsvolu("Spacer7A","TUBE",idInox,par,3);
556}
557
558//______________________________________________________________________________
559void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber)
560{
561/// Create the quadrant (bending and non-bending planes)
562/// for the given chamber
563
564 CreateFrame(chamber);
565
566#ifdef WITH_STL
567 SpecialMap specialMap;
568 specialMap[76] = AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.);
569 specialMap[75] = AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36));
570 specialMap[47] = AliMUONSt1SpecialMotif(TVector2(1.01, 0.36));
571#endif
572
573#ifdef WITH_ROOT
574 SpecialMap specialMap;
575 specialMap.Add(76, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.));
576 specialMap.Add(75, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36)));
577 specialMap.Add(47, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36)));
578#endif
579
580 // Load mapping from OCDB
581 if ( ! AliMpSegmentation::Instance() ) {
582 AliFatal("Mapping has to be loaded first !");
583 }
584
585 const AliMpSectorSegmentation* kSegmentation1
586 = dynamic_cast<const AliMpSectorSegmentation*>(
587 AliMpSegmentation::Instance()
588 ->GetMpSegmentation(100, AliMpDEManager::GetCathod(100, AliMp::kBendingPlane)));
589 if ( ! kSegmentation1 ) {
590 AliFatal("Could not access sector segmentation !");
591 }
592
593 const AliMpSector* kSector1 = kSegmentation1->GetSector();
594/*
595 AliMpSectorReader reader1(AliMp::kStation1, AliMp::kBendingPlane);
596 AliMpSector* kSector1 = reader1.BuildSector();
597*/
598 //Bool_t reflectZ = true;
599 Bool_t reflectZ = false;
600 //TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.);
601 TVector3 where = TVector3(fgkDeltaQuadLHC + fgkPadXOffsetBP,
602 fgkDeltaQuadLHC + fgkPadYOffsetBP, 0.);
603 PlaceSector(kSector1, specialMap, where, reflectZ, chamber);
604
605#ifdef WITH_STL
606 specialMap.clear();
607 specialMap[76] = AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.);
608 specialMap[75] = AliMUONSt1SpecialMotif(TVector2(1.96, 0.17));
609 specialMap[47] = AliMUONSt1SpecialMotif(TVector2(2.18,-0.98));
610 specialMap[20] = AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08));
611 specialMap[46] = AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25));
612 specialMap[74] = AliMUONSt1SpecialMotif(TVector2(0.28, 0.21));
613 // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector
614 // in the true position)
615 // Was: specialMap[47] = AliMUONSt1SpecialMotif(TVector2(1.61,-1.18));
616#endif
617
618#ifdef WITH_ROOT
619 Int_t nb = AliMpConstants::ManuMask(AliMp::kNonBendingPlane);
620 TExMapIter it(&specialMap);
621 Long_t key;
622 Long_t value;
623 while ( it.Next(key,value) == kTRUE ) {
624 delete reinterpret_cast<AliMUONSt1SpecialMotif*>(value);
625 }
626 specialMap.Delete();
627 specialMap.Add(76 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.));
628 specialMap.Add(75 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.96, 0.17)));
629 specialMap.Add(47 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(2.18,-0.98)));
630 specialMap.Add(20 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08)));
631 specialMap.Add(46 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25)));
632 specialMap.Add(74 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.28, 0.21)));
633 // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector
634 // in the true position)
635 // Was: specialMap.Add(47,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.61,-1.18)));
636#endif
637/*
638 AliMpSectorReader reader2(AliMp::kStation1, AliMp::kNonBendingPlane);
639 AliMpSector* sector2 = reader2.BuildSector();
640*/
641 const AliMpSectorSegmentation* kSegmentation2
642 = dynamic_cast<const AliMpSectorSegmentation*>(
643 AliMpSegmentation::Instance()
644 ->GetMpSegmentation(100, AliMpDEManager::GetCathod(100, AliMp::kNonBendingPlane)));
645 if ( ! kSegmentation2 ) {
646 AliFatal("Could not access sector segmentation !");
647 }
648
649 const AliMpSector* kSector2 = kSegmentation2->GetSector();
650
651 //reflectZ = false;
652 reflectZ = true;
653 TVector2 offset = kSector2->Position();
654 where = TVector3(where.X()+offset.X(), where.Y()+offset.Y(), 0.);
655 // Add the half-pad shift of the non-bending plane wrt bending plane
656 // (The shift is defined in the mapping as sector offset)
657 // Fix (4) - was TVector3(where.X()+0.63/2, ... - now it is -0.63/2
658 PlaceSector(kSector2, specialMap, where, reflectZ, chamber);
659
660#ifdef WITH_ROOT
661 it.Reset();
662 while ( it.Next(key,value) == kTRUE ) {
663 delete reinterpret_cast<AliMUONSt1SpecialMotif*>(value);
664 }
665 specialMap.Delete();
666#endif
667}
668
669//______________________________________________________________________________
670void AliMUONSt1GeometryBuilderV2::CreateFoamBox(
671 Int_t segNumber,
672 const TVector2& dimensions)
673{
674/// Create all the elements in the copper plane
675
676 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
677 Int_t idAir = idtmed[1100]; // medium 1
678 //Int_t idFoam = idtmed[1115]; // medium 16 = Foam
679 //Int_t idFR4 = idtmed[1114]; // medium 15 = FR4
680 Int_t idFoam = idtmed[1125]; // medium 26 = Foam
681 Int_t idFR4 = idtmed[1122]; // medium 23 = FR4
682
683 // mother volume
684 GReal_t par[3];
685 par[0] = dimensions.X();
686 par[1] = dimensions.Y();
687 par[2] = TotalHzPlane();
688 gMC->Gsvolu(PlaneSegmentName(segNumber).Data(),"BOX",idAir,par,3);
689
690 // foam layer
691 par[0] = dimensions.X();
692 par[1] = dimensions.Y();
693 par[2] = fgkHzFoam;
694 gMC->Gsvolu(FoamBoxName(segNumber).Data(),"BOX",idFoam,par,3);
695 GReal_t posX,posY,posZ;
696 posX=0.;
697 posY=0.;
698 posZ = -TotalHzPlane() + fgkHzFoam;
699 gMC->Gspos(FoamBoxName(segNumber).Data(),1,
700 PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
701
702 // mechanical plane FR4 layer
703 par[0] = dimensions.X();
704 par[1] = dimensions.Y();
705 par[2] = fgkHzFR4;
706 gMC->Gsvolu(FR4BoxName(segNumber).Data(),"BOX",idFR4,par,3);
707 posX=0.;
708 posY=0.;
709 posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4;
710 gMC->Gspos(FR4BoxName(segNumber).Data(),1,
711 PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
712}
713
714//______________________________________________________________________________
715void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(Int_t segNumber,
716 const TVector2& dimensions,
717 Int_t nofHoles)
718{
719/// Create a segment of a plane (this includes a foam layer,
720/// holes in the foam to feed the kaptons through, kapton connectors
721/// and the mother board.)
722
723 CreateFoamBox(segNumber,dimensions);
724
725 // Place spacer in the concrete plane segments:
726 // S225 (in S025), S267 (in S067) in chamber1 and S309 (in S109). S351(in S151)
727 // in chamber2
728 // The segments were found as those which caused overlaps when we placed
729 // the spacer in global coordinates via PlaceSpacer0
730 //
731 // <posXYZ X_Y_Z=" 12.6000; 0.75000; 0.0000"> <volume name="Spacer5A"/>
732 // <posXYZ X_Y_Z=" 12.6000; -0.75000; 0.0000"> <volume name="Spacer5A"/>
733 // <posXYZ X_Y_Z=" 12.6000; 0.0000; 1.1515"> <volume name="Spacer6"/>
734 // <posXYZ X_Y_Z=" 12.6000; 0.0000; 0.0000"> <volume name="Spacer7A"/>
735
736 if ( FoamBoxName(segNumber) == "S225" ||
737 FoamBoxName(segNumber) == "S267" ||
738 FoamBoxName(segNumber) == "S309" ||
739 FoamBoxName(segNumber) == "S351" )
740 {
741 GReal_t posX = 12.6;
742 GReal_t posY = 0.75;
743 GReal_t posZ = 0.0;
744 gMC->Gspos("Spacer5A", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY");
745
746 posY = -0.75;
747 gMC->Gspos("Spacer5A", 2, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY");
748
749 posY = 0.0;
750 posZ = 1.1515;
751 if ( FoamBoxName(segNumber) == "S267" ||
752 FoamBoxName(segNumber) == "S351" ) posZ *= -1.0;
753 gMC->Gspos("Spacer6", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY");
754
755 posY = 0.0;
756 posZ = 0.0;
757 gMC->Gspos("Spacer7A", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY");
758 }
759
760 for (Int_t holeNum=0;holeNum<nofHoles;holeNum++) {
761 GReal_t posX = ((2.*holeNum+1.)/nofHoles-1.)*dimensions.X();
762 GReal_t posY = 0.;
763 GReal_t posZ = 0.;
764
765 gMC->Gspos(fgkHoleName,holeNum+1,
766 FoamBoxName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
767 }
768}
769
770//______________________________________________________________________________
771void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber)
772{
773/// Create the non-sensitive elements of the frame for the \a chamber
774///
775/// Model and notation: \n
776/// \n
777/// The Quadrant volume name starts with SQ \n
778/// The volume segments are numbered 00 to XX \n
779/// \n
780/// OutTopFrame \n
781/// (SQ02-16) \n
782/// ------------ \n
783/// OutEdgeFrame / | \n
784/// (SQ17-24) / | InVFrame (SQ00-01) \n
785/// / | \n
786/// | | \n
787/// OutVFrame | _- - \n
788/// (SQ25-39) | | InArcFrame (SQ42-45) \n
789/// | | \n
790/// ------------- \n
791/// InHFrame (SQ40-41) \n
792/// \n
793/// \n
794/// 06 February 2003 - Overlapping volumes resolved. \n
795/// One quarter chamber is comprised of three TUBS volumes: SQMx, SQNx, and SQFx,
796/// where SQMx is the Quadrant Middle layer for chamber \a chamber ( posZ in [-3.25,3.25]),
797/// SQNx is the Quadrant Near side layer for chamber \a chamber ( posZ in [-6.25,3-.25) ), and
798/// SQFx is the Quadrant Far side layer for chamber \a chamber ( posZ in (3.25,6.25] ).
799
800 const Float_t kNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin
801
802 // tracking medias
803 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
804
805 Int_t idAir = idtmed[1100]; // medium 1
806 //Int_t idFrameEpoxy = idtmed[1115]; // medium 16 = Frame Epoxy ME730
807 //Int_t idInox = idtmed[1116]; // medium 17 Stainless Steel (18%Cr,9%Ni,Fe)
808 //Int_t idFR4 = idtmed[1110]; // medium 11 FR4
809 //Int_t idCopper = idtmed[1109]; // medium 10 Copper
810 //Int_t idAlu = idtmed[1103]; // medium 4 Aluminium
811 Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16
812 Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17
813 Int_t idFR4 = idtmed[1122]; // medium 23 FR4 // was 15 not 11
814 Int_t idCopper = idtmed[1121]; // medium 22 Copper
815 Int_t idAlu = idtmed[1120]; // medium 21 Aluminium
816
817
818// Rotation Matrices
819 Int_t rot1, rot2, rot3;
820
821// Rotation matrices
822 fMUON->AliMatrix(rot1, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane
823 fMUON->AliMatrix(rot2, 90., 45., 90., 135., 0., 0.); // +45 deg in x-y plane
824