]> git.uio.no Git - u/mrichter/AliRoot.git/blame - 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 - MUON/AliMUONSt1GeometryBuilderV2.cxx


500 - Internal Server Error

Malformed UTF-8 character (fatal) at (eval 5) line 1, <$fd> line 1900.
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//
3d1463c8 18//-----------------------------------------------------------------------------
d1cd2474 19// Class AliMUONSt1GeometryBuilderV2
20// ---------------------------------
21// MUON Station1 detailed geometry construction class.
5f1df83a 22// (Originally defined in AliMUONv2.cxx - now removed.)
23// Included in AliRoot 2004/01/23
3d1463c8 24// Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
25//-----------------------------------------------------------------------------
d1cd2474 26
adbabf6d 27#include "AliMUONSt1GeometryBuilderV2.h"
28#include "AliMUONSt1SpecialMotif.h"
29#include "AliMUON.h"
30#include "AliMUONConstants.h"
31#include "AliMUONGeometryModule.h"
32#include "AliMUONGeometryEnvelopeStore.h"
ba030c0e 33
331a617a 34#include "AliMpSegmentation.h"
35#include "AliMpDEManager.h"
86488ea7 36#include "AliMpContainers.h"
4d8c279c 37#include "AliMpConstants.h"
331a617a 38#include "AliMpCDB.h"
39#include "AliMpSectorSegmentation.h"
adbabf6d 40#include "AliMpSector.h"
41#include "AliMpRow.h"
42#include "AliMpVRowSegment.h"
43#include "AliMpMotifMap.h"
44#include "AliMpMotifPosition.h"
4d8c279c 45#include "AliMpPlaneType.h"
adbabf6d 46
47#include "AliRun.h"
48#include "AliMagF.h"
49#include "AliLog.h"
ba030c0e 50
51#include <TVector2.h>
d1cd2474 52#include <TVector3.h>
53#include <TGeoMatrix.h>
ba030c0e 54#include <TClonesArray.h>
5f91c9e8 55#include <Riostream.h>
56#include <TSystem.h>
5d12ce38 57#include <TVirtualMC.h>
91111b9c 58#include <TGeoManager.h>
59#include <TGeoVolume.h>
60#include <TGeoTube.h>
61#include <TGeoCompositeShape.h>
ba030c0e 62
86488ea7 63#ifdef WITH_STL
adbabf6d 64 #include <vector>
65#endif
e118b27e 66
86488ea7 67#ifdef WITH_ROOT
adbabf6d 68 #include "TArrayI.h"
69#endif
ba030c0e 70
5398f946 71/// \cond CLASSIMP
72ClassImp(AliMUONSt1GeometryBuilderV2)
73/// \endcond
74
5f91c9e8 75// Thickness Constants
d1cd2474 76const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzPadPlane=0.0148/2.; //Pad plane
1c4b9c4c 77const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFoam = 2.503/2.; //Foam of mechanicalplane
78const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFR4 = 0.062/2.; //FR4 of mechanical plane
d1cd2474 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
b367fd8f 84const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzGas = 0.42/2.; //Gas thickness
5f91c9e8 85
86// Quadrant Mother volume - TUBS1 - Middle layer of model
d1cd2474 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.;
5f91c9e8 92
93// Quadrant Mother volume - TUBS2 - near and far layers of model
d1cd2474 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.;
5f91c9e8 99
100// Sensitive copper pads, foam layer, PCB and electronics model parameters
d1cd2474 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
b367fd8f 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
d1cd2474 123
62c708bf 124const char* AliMUONSt1GeometryBuilderV2::fgkHoleName="SCHL";
125const char* AliMUONSt1GeometryBuilderV2::fgkDaughterName="SCDB";
b367fd8f 126const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantEnvelopeName="SE";
d1cd2474 127const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMLayerName="SQM";
128const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantNLayerName="SQN";
129const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantFLayerName="SQF";
62c708bf 130const Int_t AliMUONSt1GeometryBuilderV2::fgkFoamBoxNameOffset=200;
131const Int_t AliMUONSt1GeometryBuilderV2::fgkFR4BoxNameOffset=400;
e8c253a0 132const Int_t AliMUONSt1GeometryBuilderV2::fgkDaughterCopyNoOffset=1000;
5f91c9e8 133
134//______________________________________________________________________________
d1cd2474 135AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon)
8cf07955 136 : AliMUONVGeometryBuilder(0, 2),
d1cd2474 137 fMUON(muon)
ba030c0e 138{
5398f946 139/// Standard constructor
ba030c0e 140}
141
5f91c9e8 142//______________________________________________________________________________
d1cd2474 143AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2()
144 : AliMUONVGeometryBuilder(),
145 fMUON(0)
ba030c0e 146{
5398f946 147/// Default Constructor
ba030c0e 148}
ba030c0e 149
5f91c9e8 150//______________________________________________________________________________
d1cd2474 151AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2()
ba030c0e 152{
5398f946 153/// Destructor
ba030c0e 154}
155
d1cd2474 156
5f91c9e8 157//
158// Private methods
159//
160
b367fd8f 161//______________________________________________________________________________
162TString
163AliMUONSt1GeometryBuilderV2::QuadrantEnvelopeName(Int_t chamber, Int_t quadrant) const
164{
5398f946 165/// Generate unique envelope name from chamber Id and quadrant number
b367fd8f 166
167 return Form("%s%d", Form("%s%d",fgkQuadrantEnvelopeName,chamber), quadrant);
168}
169
5f91c9e8 170//______________________________________________________________________________
d1cd2474 171void AliMUONSt1GeometryBuilderV2::CreateHole()
ba030c0e 172{
5398f946 173/// Create all the elements found inside a foam hole
174
d1cd2474 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
ba030c0e 179
5f91c9e8 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);
ba030c0e 187
5f91c9e8 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");
ba030c0e 196
5f91c9e8 197 par[0] = fgkHxHole;
198 par[1] = fgkHyBergPlastic;
199 par[2] = fgkHzKapton;
62c708bf 200 gMC->Gsvolu("SKPT", "BOX", idCopper, par, 3);
5f91c9e8 201 posX = 0.;
202 posY = 0.;
203 posZ = 0.;
62c708bf 204 gMC->Gspos("SKPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY");
5f91c9e8 205}
ba030c0e 206
5f91c9e8 207//______________________________________________________________________________
d1cd2474 208void AliMUONSt1GeometryBuilderV2::CreateDaughterBoard()
5f91c9e8 209{
5398f946 210/// Create all the elements in a daughter board
211
d1cd2474 212 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
5f91c9e8 213 Int_t idAir = idtmed[1100]; // medium 1
d1cd2474 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
ba030c0e 218
5f91c9e8 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);
ba030c0e 226
5f91c9e8 227 par[0]=fgkHxBergPlastic;
228 par[1]=fgkHyBergPlastic;
229 par[2]=fgkHzBergPlastic;
62c708bf 230 gMC->Gsvolu("SBGP","BOX",idPlastic,par,3);
5f91c9e8 231 posX=0.;
232 posY=0.;
233 posZ = -TotalHzDaughter() + fgkHzBergPlastic;
62c708bf 234 gMC->Gspos("SBGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
5f91c9e8 235
236 par[0]=fgkHxBergCopper;
237 par[1]=fgkHyBergCopper;
238 par[2]=fgkHzBergCopper;
62c708bf 239 gMC->Gsvolu("SBGC","BOX",idCopper,par,3);
5f91c9e8 240 posX=0.;
241 posY=0.;
242 posZ=0.;
62c708bf 243 gMC->Gspos("SBGC",1,"SBGP",posX,posY,posZ,0,"ONLY");
5f91c9e8 244
245 par[0]=fgkHxDaughter;
246 par[1]=fgkHyDaughter;
247 par[2]=fgkHzDaughter;
62c708bf 248 gMC->Gsvolu("SDGH","BOX",idCopper,par,3);
5f91c9e8 249 posX=0.;
250 posY=0.;
251 posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter;
62c708bf 252 gMC->Gspos("SDGH",1,fgkDaughterName,posX,posY,posZ,0,"ONLY");
5f91c9e8 253}
254
255//______________________________________________________________________________
d1cd2474 256void AliMUONSt1GeometryBuilderV2::CreateInnerLayers()
5f91c9e8 257{
5398f946 258/// Create the layer of sensitive volumes with gas
259/// and the copper layer.
5f91c9e8 260
261// Gas Medium
d1cd2474 262 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
79be0537 263 Int_t idArCO2 = idtmed[1108]; // medium 9 (ArCO2 80%)
d1cd2474 264 //Int_t idCopper = idtmed[1109]; // medium 10 = copper
79be0537 265 //Int_t idArCO2 = idtmed[1124]; // medium 25 (ArCO2 80%)
d1cd2474 266 Int_t idCopper = idtmed[1121]; // medium 22 = copper
5f91c9e8 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);
ba030c0e 286
5f91c9e8 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);
ba030c0e 470}
5f91c9e8 471
fdbaed6e 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
5f91c9e8 558//______________________________________________________________________________
d1cd2474 559void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber)
ba030c0e 560{
5398f946 561/// Create the quadrant (bending and non-bending planes)
562/// for the given chamber
5f91c9e8 563
ba030c0e 564 CreateFrame(chamber);
565
86488ea7 566#ifdef WITH_STL
d1cd2474 567 SpecialMap specialMap;
e8c253a0 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));
d1cd2474 571#endif
572
86488ea7 573#ifdef WITH_ROOT
d1cd2474 574 SpecialMap specialMap;
e8c253a0 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)));
d1cd2474 578#endif
579
331a617a 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/*
866c3232 595 AliMpSectorReader reader1(AliMp::kStation1, AliMp::kBendingPlane);
331a617a 596 AliMpSector* kSector1 = reader1.BuildSector();
597*/
b367fd8f 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.);
331a617a 603 PlaceSector(kSector1, specialMap, where, reflectZ, chamber);
ba030c0e 604
86488ea7 605#ifdef WITH_STL
ba030c0e 606 specialMap.clear();
e8c253a0 607 specialMap[76] = AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.);
608 specialMap[75] = AliMUONSt1SpecialMotif(TVector2(1.96, 0.17));
b367fd8f 609 specialMap[47] = AliMUONSt1SpecialMotif(TVector2(2.18,-0.98));
e8c253a0 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));
b367fd8f 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));
d1cd2474 616#endif
617
86488ea7 618#ifdef WITH_ROOT
866c3232 619 Int_t nb = AliMpConstants::ManuMask(AliMp::kNonBendingPlane);
cd872630 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 }
d1cd2474 626 specialMap.Delete();
4d8c279c 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)));
b367fd8f 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)));
d1cd2474 636#endif
331a617a 637/*
866c3232 638 AliMpSectorReader reader2(AliMp::kStation1, AliMp::kNonBendingPlane);
5f91c9e8 639 AliMpSector* sector2 = reader2.BuildSector();
331a617a 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
b367fd8f 651 //reflectZ = false;
652 reflectZ = true;
331a617a 653 TVector2 offset = kSector2->Position();
e77b6d6b 654 where = TVector3(where.X()+offset.X(), where.Y()+offset.Y(), 0.);
b367fd8f 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
331a617a 658 PlaceSector(kSector2, specialMap, where, reflectZ, chamber);
d1cd2474 659
86488ea7 660#ifdef WITH_ROOT
cd872630 661 it.Reset();
662 while ( it.Next(key,value) == kTRUE ) {
663 delete reinterpret_cast<AliMUONSt1SpecialMotif*>(value);
664 }
d1cd2474 665 specialMap.Delete();
666#endif
ba030c0e 667}
668
5f91c9e8 669//______________________________________________________________________________
62c708bf 670void AliMUONSt1GeometryBuilderV2::CreateFoamBox(
671 Int_t segNumber,
672 const TVector2& dimensions)
ba030c0e 673{
5398f946 674/// Create all the elements in the copper plane
ba030c0e 675
d1cd2474 676 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
5f91c9e8 677 Int_t idAir = idtmed[1100]; // medium 1
d1cd2474 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
ba030c0e 682
5f91c9e8 683 // mother volume
684 GReal_t par[3];
685 par[0] = dimensions.X();
686 par[1] = dimensions.Y();
687 par[2] = TotalHzPlane();
62c708bf 688 gMC->Gsvolu(PlaneSegmentName(segNumber).Data(),"BOX",idAir,par,3);
5f91c9e8 689
690 // foam layer
5f91c9e8 691 par[0] = dimensions.X();
692 par[1] = dimensions.Y();
693 par[2] = fgkHzFoam;
62c708bf 694 gMC->Gsvolu(FoamBoxName(segNumber).Data(),"BOX",idFoam,par,3);
695 GReal_t posX,posY,posZ;
5f91c9e8 696 posX=0.;
697 posY=0.;
698 posZ = -TotalHzPlane() + fgkHzFoam;
62c708bf 699 gMC->Gspos(FoamBoxName(segNumber).Data(),1,
700 PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
ba030c0e 701
5f91c9e8 702 // mechanical plane FR4 layer
5f91c9e8 703 par[0] = dimensions.X();
704 par[1] = dimensions.Y();
705 par[2] = fgkHzFR4;
62c708bf 706 gMC->Gsvolu(FR4BoxName(segNumber).Data(),"BOX",idFR4,par,3);
5f91c9e8 707 posX=0.;
708 posY=0.;
709 posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4;
62c708bf 710 gMC->Gspos(FR4BoxName(segNumber).Data(),1,
711 PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
5f91c9e8 712}
ba030c0e 713
5f91c9e8 714//______________________________________________________________________________
62c708bf 715void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(Int_t segNumber,
716 const TVector2& dimensions,
717 Int_t nofHoles)
5f91c9e8 718{
5398f946 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.)
ba030c0e 722
62c708bf 723 CreateFoamBox(segNumber,dimensions);
fdbaed6e 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 }
ba030c0e 759
5f91c9e8 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.;
ba030c0e 764
62c708bf 765 gMC->Gspos(fgkHoleName,holeNum+1,
766 FoamBoxName(segNumber).Data(),posX,posY,posZ,0,"ONLY");
5f91c9e8 767 }
768}
ba030c0e 769
5f91c9e8 770//______________________________________________________________________________
d1cd2474 771void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber)
5f91c9e8 772{
5398f946 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] ).
ba030c0e 799
d1cd2474 800 const Float_t kNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin
ba030c0e 801
ba030c0e 802 // tracking medias
d1cd2474 803 Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099;
5f91c9e8 804
ba030c0e 805 Int_t idAir = idtmed[1100]; // medium 1
d1cd2474 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
5f91c9e8 816
817
818// Rotation Matrices
819 Int_t rot1, rot2, rot3;
820
821// Rotation matrices
d1cd2474 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