]>
Commit | Line | Data |
---|---|---|
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 "AliMpContainers.h" | |
35 | #include "AliMpConstants.h" | |
36 | #include "AliMpFiles.h" | |
37 | #include "AliMpSectorReader.h" | |
38 | #include "AliMpSector.h" | |
39 | #include "AliMpRow.h" | |
40 | #include "AliMpVRowSegment.h" | |
41 | #include "AliMpMotifMap.h" | |
42 | #include "AliMpMotifPosition.h" | |
43 | #include "AliMpPlaneType.h" | |
44 | ||
45 | #include "AliRun.h" | |
46 | #include "AliMagF.h" | |
47 | #include "AliLog.h" | |
48 | ||
49 | #include <TVector2.h> | |
50 | #include <TVector3.h> | |
51 | #include <TGeoMatrix.h> | |
52 | #include <TClonesArray.h> | |
53 | #include <Riostream.h> | |
54 | #include <TSystem.h> | |
55 | #include <TVirtualMC.h> | |
56 | #include <TGeoManager.h> | |
57 | #include <TGeoVolume.h> | |
58 | #include <TGeoTube.h> | |
59 | #include <TGeoCompositeShape.h> | |
60 | ||
61 | #ifdef WITH_STL | |
62 | #include <vector> | |
63 | #endif | |
64 | ||
65 | #ifdef WITH_ROOT | |
66 | #include "TArrayI.h" | |
67 | #endif | |
68 | ||
69 | /// \cond CLASSIMP | |
70 | ClassImp(AliMUONSt1GeometryBuilderV2) | |
71 | /// \endcond | |
72 | ||
73 | // Thickness Constants | |
74 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzPadPlane=0.0148/2.; //Pad plane | |
75 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFoam = 2.503/2.; //Foam of mechanicalplane | |
76 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFR4 = 0.062/2.; //FR4 of mechanical plane | |
77 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzSnPb = 0.0091/2.; //Pad/Kapton connection (66 pt) | |
78 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzKapton = 0.0122/2.; //Kapton | |
79 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergPlastic = 0.3062/2.;//Berg connector | |
80 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergCopper = 0.1882/2.; //Berg connector | |
81 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzDaughter = 0.0156/2.; //Daughter board | |
82 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzGas = 0.42/2.; //Gas thickness | |
83 | ||
84 | // Quadrant Mother volume - TUBS1 - Middle layer of model | |
85 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR1 = 18.3; | |
86 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR1 = 105.673; | |
87 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick1 = 6.5/2; | |
88 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL1 = 0.; | |
89 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU1 = 90.; | |
90 | ||
91 | // Quadrant Mother volume - TUBS2 - near and far layers of model | |
92 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR2 = 20.7; | |
93 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR2 = 100.073; | |
94 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick2 = 3.0/2; | |
95 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL2 = 0.; | |
96 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU2 = 90.; | |
97 | ||
98 | // Sensitive copper pads, foam layer, PCB and electronics model parameters | |
99 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxHole=1.5/2.; | |
100 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyHole=6./2.; | |
101 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergPlastic=0.74/2.; | |
102 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergPlastic=5.09/2.; | |
103 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergCopper=0.25/2.; | |
104 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergCopper=3.6/2.; | |
105 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxKapton=0.8/2.; | |
106 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyKapton=5.7/2.; | |
107 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxDaughter=2.3/2.; | |
108 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyDaughter=6.3/2.; | |
109 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetX=1.46; | |
110 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetY=0.71; | |
111 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamX=1.46; | |
112 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamY=0.051; | |
113 | ||
114 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaQuadLHC=2.6; // LHC Origin wrt Quadrant Origin | |
115 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkFrameOffset=5.2; | |
116 | // Fix (1) of overlap SQN* layers with SQM* ones (was 5.0) | |
117 | ||
118 | // Pad planes offsets | |
119 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadXOffsetBP = 0.50 - 0.63/2; // = 0.185 | |
120 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadYOffsetBP = -0.31 - 0.42/2; // =-0.52 | |
121 | ||
122 | const char* AliMUONSt1GeometryBuilderV2::fgkHoleName="SCHL"; | |
123 | const char* AliMUONSt1GeometryBuilderV2::fgkDaughterName="SCDB"; | |
124 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantEnvelopeName="SE"; | |
125 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMLayerName="SQM"; | |
126 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantNLayerName="SQN"; | |
127 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantFLayerName="SQF"; | |
128 | const Int_t AliMUONSt1GeometryBuilderV2::fgkFoamBoxNameOffset=200; | |
129 | const Int_t AliMUONSt1GeometryBuilderV2::fgkFR4BoxNameOffset=400; | |
130 | const Int_t AliMUONSt1GeometryBuilderV2::fgkDaughterCopyNoOffset=1000; | |
131 | ||
132 | //______________________________________________________________________________ | |
133 | AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon) | |
134 | : AliMUONVGeometryBuilder(0, 2), | |
135 | fMUON(muon) | |
136 | { | |
137 | /// Standard constructor | |
138 | ||
139 | // set path to mapping data files | |
140 | if (! gSystem->Getenv("MINSTALL")) { | |
141 | TString dirPath = gSystem->Getenv("ALICE_ROOT"); | |
142 | dirPath += "/MUON/mapping"; | |
143 | AliMpFiles::SetTopPath(dirPath); | |
144 | gSystem->Setenv("MINSTALL", dirPath.Data()); | |
145 | //cout << "AliMpFiles top path set to " << dirPath << endl; | |
146 | } | |
147 | //else | |
148 | // cout << gSystem->Getenv("MINSTALL") << endl; | |
149 | } | |
150 | ||
151 | //______________________________________________________________________________ | |
152 | AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2() | |
153 | : AliMUONVGeometryBuilder(), | |
154 | fMUON(0) | |
155 | { | |
156 | /// Default Constructor | |
157 | } | |
158 | ||
159 | //______________________________________________________________________________ | |
160 | AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2() | |
161 | { | |
162 | /// Destructor | |
163 | } | |
164 | ||
165 | ||
166 | // | |
167 | // Private methods | |
168 | // | |
169 | ||
170 | //______________________________________________________________________________ | |
171 | TString | |
172 | AliMUONSt1GeometryBuilderV2::QuadrantEnvelopeName(Int_t chamber, Int_t quadrant) const | |
173 | { | |
174 | /// Generate unique envelope name from chamber Id and quadrant number | |
175 | ||
176 | return Form("%s%d", Form("%s%d",fgkQuadrantEnvelopeName,chamber), quadrant); | |
177 | } | |
178 | ||
179 | //______________________________________________________________________________ | |
180 | void AliMUONSt1GeometryBuilderV2::CreateHole() | |
181 | { | |
182 | /// Create all the elements found inside a foam hole | |
183 | ||
184 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; | |
185 | Int_t idAir = idtmed[1100]; // medium 1 | |
186 | //Int_t idCopper = idtmed[1109]; // medium 10 = copper | |
187 | Int_t idCopper = idtmed[1121]; // medium 22 = copper | |
188 | ||
189 | GReal_t par[3]; | |
190 | GReal_t posX,posY,posZ; | |
191 | ||
192 | par[0] = fgkHxHole; | |
193 | par[1] = fgkHyHole; | |
194 | par[2] = fgkHzFoam; | |
195 | gMC->Gsvolu(fgkHoleName,"BOX",idAir,par,3); | |
196 | ||
197 | par[0] = fgkHxKapton; | |
198 | par[1] = fgkHyKapton; | |
199 | par[2] = fgkHzSnPb; | |
200 | gMC->Gsvolu("SNPB", "BOX", idCopper, par, 3); | |
201 | posX = 0.; | |
202 | posY = 0.; | |
203 | posZ = -fgkHzFoam+fgkHzSnPb; | |
204 | gMC->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY"); | |
205 | ||
206 | par[0] = fgkHxHole; | |
207 | par[1] = fgkHyBergPlastic; | |
208 | par[2] = fgkHzKapton; | |
209 | gMC->Gsvolu("SKPT", "BOX", idCopper, par, 3); | |
210 | posX = 0.; | |
211 | posY = 0.; | |
212 | posZ = 0.; | |
213 | gMC->Gspos("SKPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY"); | |
214 | } | |
215 | ||
216 | //______________________________________________________________________________ | |
217 | void AliMUONSt1GeometryBuilderV2::CreateDaughterBoard() | |
218 | { | |
219 | /// Create all the elements in a daughter board | |
220 | ||
221 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; | |
222 | Int_t idAir = idtmed[1100]; // medium 1 | |
223 | //Int_t idCopper = idtmed[1109]; // medium 10 = copper | |
224 | //Int_t idPlastic =idtmed[1116]; // medium 17 = Plastic | |
225 | Int_t idCopper = idtmed[1121]; // medium 22 = copper | |
226 | Int_t idPlastic =idtmed[1127]; // medium 28 = Plastic | |
227 | ||
228 | GReal_t par[3]; | |
229 | GReal_t posX,posY,posZ; | |
230 | ||
231 | par[0]=fgkHxDaughter; | |
232 | par[1]=fgkHyDaughter; | |
233 | par[2]=TotalHzDaughter(); | |
234 | gMC->Gsvolu(fgkDaughterName,"BOX",idAir,par,3); | |
235 | ||
236 | par[0]=fgkHxBergPlastic; | |
237 | par[1]=fgkHyBergPlastic; | |
238 | par[2]=fgkHzBergPlastic; | |
239 | gMC->Gsvolu("SBGP","BOX",idPlastic,par,3); | |
240 | posX=0.; | |
241 | posY=0.; | |
242 | posZ = -TotalHzDaughter() + fgkHzBergPlastic; | |
243 | gMC->Gspos("SBGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY"); | |
244 | ||
245 | par[0]=fgkHxBergCopper; | |
246 | par[1]=fgkHyBergCopper; | |
247 | par[2]=fgkHzBergCopper; | |
248 | gMC->Gsvolu("SBGC","BOX",idCopper,par,3); | |
249 | posX=0.; | |
250 | posY=0.; | |
251 | posZ=0.; | |
252 | gMC->Gspos("SBGC",1,"SBGP",posX,posY,posZ,0,"ONLY"); | |
253 | ||
254 | par[0]=fgkHxDaughter; | |
255 | par[1]=fgkHyDaughter; | |
256 | par[2]=fgkHzDaughter; | |
257 | gMC->Gsvolu("SDGH","BOX",idCopper,par,3); | |
258 | posX=0.; | |
259 | posY=0.; | |
260 | posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter; | |
261 | gMC->Gspos("SDGH",1,fgkDaughterName,posX,posY,posZ,0,"ONLY"); | |
262 | } | |
263 | ||
264 | //______________________________________________________________________________ | |
265 | void AliMUONSt1GeometryBuilderV2::CreateInnerLayers() | |
266 | { | |
267 | /// Create the layer of sensitive volumes with gas | |
268 | /// and the copper layer. | |
269 | ||
270 | // Gas Medium | |
271 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; | |
272 | Int_t idArCO2 = idtmed[1108]; // medium 9 (ArCO2 80%) | |
273 | //Int_t idCopper = idtmed[1109]; // medium 10 = copper | |
274 | //Int_t idArCO2 = idtmed[1124]; // medium 25 (ArCO2 80%) | |
275 | Int_t idCopper = idtmed[1121]; // medium 22 = copper | |
276 | ||
277 | Float_t par[11]; | |
278 | ||
279 | //Make gas volume - composed of 11 trapezoids | |
280 | // section 1 of 11 | |
281 | par[0] = fgkHzGas; | |
282 | par[1] = 0.; | |
283 | par[2] = 0.; | |
284 | par[3] = 71.33/2.; | |
285 | par[4] = 9.76/2.; | |
286 | par[5] = 48.77/2.; | |
287 | par[6] = 15.3; | |
288 | par[7] = 71.33/2.; | |
289 | par[8] = 9.76/2.; | |
290 | par[9] = 48.77/2.; | |
291 | par[10] = 15.3; | |
292 | ||
293 | gMC->Gsvolu("SA1G", "TRAP", idArCO2, par, 11); | |
294 | gMC->Gsvolu("SA2G", "TRAP", idArCO2, par, 11); | |
295 | ||
296 | par[0] = fgkHzPadPlane; | |
297 | gMC->Gsvolu("SA1C", "TRAP", idCopper,par, 11); | |
298 | ||
299 | // section 2 of 11 | |
300 | par[0] = fgkHzGas; | |
301 | par[1] = 0.; | |
302 | par[2] = 0.; | |
303 | par[3] = 79.68/2.; | |
304 | par[4] = 10.4/2.; | |
305 | par[5] = 57.0/2.; | |
306 | par[6] = 0.; | |
307 | par[7] = 79.68/2.; | |
308 | par[8] = 10.4/2.; | |
309 | par[9] = 57.0/2.; | |
310 | par[10] = 0.; | |
311 | gMC->Gsvolu("SB1G", "TRAP", idArCO2, par, 11); | |
312 | gMC->Gsvolu("SB2G", "TRAP", idArCO2, par, 11); | |
313 | ||
314 | par[0] = fgkHzPadPlane; | |
315 | gMC->Gsvolu("SB1C", "TRAP", idCopper,par, 11); | |
316 | ||
317 | // section 3 of 11 | |
318 | par[0] = fgkHzGas; | |
319 | par[1] = 0.; | |
320 | par[2] = 0.; | |
321 | par[3] = 71.33/2.; | |
322 | par[4] = 48.77/2.; | |
323 | par[5] = 9.73/2.; | |
324 | par[6] = -15.3; | |
325 | par[7] = 71.33/2.; | |
326 | par[8] = 48.77/2.; | |
327 | par[9] = 9.73/2.; | |
328 | par[10] = -15.3; | |
329 | ||
330 | gMC->Gsvolu("SC1G", "TRAP", idArCO2, par, 11); | |
331 | gMC->Gsvolu("SC2G", "TRAP", idArCO2, par, 11); | |
332 | ||
333 | par[0] = fgkHzPadPlane; | |
334 | gMC->Gsvolu("SC1C", "TRAP", idCopper,par, 11); | |
335 | ||
336 | // section 4 of 11 | |
337 | par[0] = fgkHzGas; | |
338 | par[1] = 0.; | |
339 | par[2] = 0.; | |
340 | par[3] = 6.00/2.; | |
341 | par[4] = 0.; | |
342 | par[5] = 1.56/2.; | |
343 | par[6] = 7.41; | |
344 | par[7] = 6.00/2.; | |
345 | par[8] = 0.; | |
346 | par[9] = 1.56/2.; | |
347 | par[10] = 7.41; | |
348 | gMC->Gsvolu("SD1G", "TRAP", idArCO2, par, 11); | |
349 | gMC->Gsvolu("SD2G", "TRAP", idArCO2, par, 11); | |
350 | ||
351 | par[0] = fgkHzPadPlane; | |
352 | gMC->Gsvolu("SD1C", "TRAP", idCopper,par, 11); | |
353 | ||
354 | // section 5 of 11 | |
355 | par[0] = fgkHzGas; | |
356 | par[1] = 0.; | |
357 | par[2] = 0.; | |
358 | par[3] = 1.516/2.; | |
359 | par[4] = 0.; | |
360 | par[5] = 0.829/2.; | |
361 | par[6] = 15.3; | |
362 | par[7] = 1.516/2.; | |
363 | par[8] = 0.; | |
364 | par[9] = 0.829/2.; | |
365 | par[10] = 15.3; | |
366 | gMC->Gsvolu("SE1G", "TRAP", idArCO2, par, 11); | |
367 | gMC->Gsvolu("SE2G", "TRAP", idArCO2, par, 11); | |
368 | ||
369 | par[0] = fgkHzPadPlane; | |
370 | gMC->Gsvolu("SE1C", "TRAP", idCopper,par, 11); | |
371 | ||
372 | // section 6 of 11 | |
373 | par[0] = fgkHzGas; | |
374 | par[1] = 0.; | |
375 | par[2] = 0.; | |
376 | par[3] = 3.92/2.; | |
377 | par[4] = 0.; | |
378 | par[5] = 0.562/2.; | |
379 | par[6] = -4.1; | |
380 | par[7] = 3.92/2.; | |
381 | par[8] = 0.; | |
382 | par[9] = 0.562/2.; | |
383 | par[10] = -4.1; | |
384 | gMC->Gsvolu("SF1G", "TRAP", idArCO2, par, 11); | |
385 | gMC->Gsvolu("SF2G", "TRAP", idArCO2, par, 11); | |
386 | ||
387 | par[0] = fgkHzPadPlane; | |
388 | gMC->Gsvolu("SF1C", "TRAP", idCopper,par, 11); | |
389 | ||
390 | // section 7 of 11 | |
391 | par[0] = fgkHzGas; | |
392 | par[1] = 0.; | |
393 | par[2] = 0.; | |
394 | par[3] = 0.941/2.; | |
395 | par[4] = 0.562/2.; | |
396 | par[5] = 0.; | |
397 | par[6] = -16.6; | |
398 | par[7] = 0.941/2.; | |
399 | par[8] = 0.562/2.; | |
400 | par[9] = 0.; | |
401 | par[10] =-16.6; | |
402 | gMC->Gsvolu("SG1G", "TRAP", idArCO2, par, 11); | |
403 | gMC->Gsvolu("SG2G", "TRAP", idArCO2, par, 11); | |
404 | ||
405 | par[0] = fgkHzPadPlane; | |
406 | gMC->Gsvolu("SG1C", "TRAP", idCopper,par, 11); | |
407 | ||
408 | // section 8 of 11 | |
409 | par[0] = fgkHzGas; | |
410 | par[1] = 0.; | |
411 | par[2] = 0.; | |
412 | par[3] = 3.94/2.; | |
413 | par[4] = 0.57/2.; | |
414 | par[5] = 0.; | |
415 | par[6] = 4.14; | |
416 | par[7] = 3.94/2.; | |
417 | par[8] = 0.57/2.; | |
418 | par[9] = 0.; | |
419 | par[10] = 4.14; | |
420 | gMC->Gsvolu("SH1G", "TRAP", idArCO2, par, 11); | |
421 | gMC->Gsvolu("SH2G", "TRAP", idArCO2, par, 11); | |
422 | ||
423 | par[0] = fgkHzPadPlane; | |
424 | gMC->Gsvolu("SH1C", "TRAP", idCopper,par, 11); | |
425 | ||
426 | // section 9 of 11 | |
427 | par[0] = fgkHzGas; | |
428 | par[1] = 0.; | |
429 | par[2] = 0.; | |
430 | par[3] = 0.95/2.; | |
431 | par[4] = 0.; | |
432 | par[5] = 0.57/2; | |
433 | par[6] = 16.7; | |
434 | par[7] = 0.95/2.; | |
435 | par[8] = 0.; | |
436 | par[9] = 0.57/2; | |
437 | par[10] = 16.7; | |
438 | gMC->Gsvolu("SI1G", "TRAP", idArCO2, par, 11); | |
439 | gMC->Gsvolu("SI2G", "TRAP", idArCO2, par, 11); | |
440 | ||
441 | par[0] = fgkHzPadPlane; | |
442 | gMC->Gsvolu("SI1C", "TRAP", idCopper,par, 11); | |
443 | ||
444 | // section 10 of 11 | |
445 | par[0] = fgkHzGas; | |
446 | par[1] = 0.; | |
447 | par[2] = 0.; | |
448 | par[3] = 1.49/2.; | |
449 | par[4] = 0.; | |
450 | par[5] = 0.817/2.; | |
451 | par[6] = -15.4; | |
452 | par[7] = 1.49/2.; | |
453 | par[8] = 0.; | |
454 | par[9] = 0.817/2.; | |
455 | par[10] = -15.4; | |
456 | gMC->Gsvolu("SJ1G", "TRAP", idArCO2, par, 11); | |
457 | gMC->Gsvolu("SJ2G", "TRAP", idArCO2, par, 11); | |
458 | ||
459 | par[0] = fgkHzPadPlane; | |
460 | gMC->Gsvolu("SJ1C", "TRAP", idCopper,par, 11); | |
461 | ||
462 | // section 11 of 11 | |
463 | par[0] = fgkHzGas; | |
464 | par[1] = 0.; | |
465 | par[2] = 0.; | |
466 | par[3] = 5.93/2.; | |
467 | par[4] = 0.; | |
468 | par[5] = 1.49/2.; | |
469 | par[6] = -7.16; | |
470 | par[7] = 5.93/2.; | |
471 | par[8] = 0.; | |
472 | par[9] = 1.49/2.; | |
473 | par[10] = -7.16; | |
474 | gMC->Gsvolu("SK1G", "TRAP", idArCO2, par, 11); | |
475 | gMC->Gsvolu("SK2G", "TRAP", idArCO2, par, 11); | |
476 | ||
477 | par[0] = fgkHzPadPlane; | |
478 | gMC->Gsvolu("SK1C", "TRAP", idCopper,par, 11); | |
479 | } | |
480 | ||
481 | //______________________________________________________________________________ | |
482 | void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber) | |
483 | { | |
484 | /// Create the quadrant (bending and non-bending planes) | |
485 | /// for the given chamber | |
486 | ||
487 | CreateFrame(chamber); | |
488 | ||
489 | #ifdef WITH_STL | |
490 | SpecialMap specialMap; | |
491 | specialMap[76] = AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.); | |
492 | specialMap[75] = AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36)); | |
493 | specialMap[47] = AliMUONSt1SpecialMotif(TVector2(1.01, 0.36)); | |
494 | #endif | |
495 | ||
496 | #ifdef WITH_ROOT | |
497 | SpecialMap specialMap; | |
498 | specialMap.Add(76, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.)); | |
499 | specialMap.Add(75, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36))); | |
500 | specialMap.Add(47, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36))); | |
501 | #endif | |
502 | ||
503 | AliMpSectorReader reader1(AliMp::kStation1, AliMp::kBendingPlane); | |
504 | AliMpSector* sector1 = reader1.BuildSector(); | |
505 | ||
506 | //Bool_t reflectZ = true; | |
507 | Bool_t reflectZ = false; | |
508 | //TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.); | |
509 | TVector3 where = TVector3(fgkDeltaQuadLHC + fgkPadXOffsetBP, | |
510 | fgkDeltaQuadLHC + fgkPadYOffsetBP, 0.); | |
511 | PlaceSector(sector1, specialMap, where, reflectZ, chamber); | |
512 | ||
513 | #ifdef WITH_STL | |
514 | specialMap.clear(); | |
515 | specialMap[76] = AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.); | |
516 | specialMap[75] = AliMUONSt1SpecialMotif(TVector2(1.96, 0.17)); | |
517 | specialMap[47] = AliMUONSt1SpecialMotif(TVector2(2.18,-0.98)); | |
518 | specialMap[20] = AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08)); | |
519 | specialMap[46] = AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25)); | |
520 | specialMap[74] = AliMUONSt1SpecialMotif(TVector2(0.28, 0.21)); | |
521 | // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector | |
522 | // in the true position) | |
523 | // Was: specialMap[47] = AliMUONSt1SpecialMotif(TVector2(1.61,-1.18)); | |
524 | #endif | |
525 | ||
526 | #ifdef WITH_ROOT | |
527 | Int_t nb = AliMpConstants::ManuMask(AliMp::kNonBendingPlane); | |
528 | specialMap.Delete(); | |
529 | specialMap.Add(76 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.)); | |
530 | specialMap.Add(75 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.96, 0.17))); | |
531 | specialMap.Add(47 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(2.18,-0.98))); | |
532 | specialMap.Add(20 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08))); | |
533 | specialMap.Add(46 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25))); | |
534 | specialMap.Add(74 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.28, 0.21))); | |
535 | // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector | |
536 | // in the true position) | |
537 | // Was: specialMap.Add(47,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.61,-1.18))); | |
538 | #endif | |
539 | ||
540 | AliMpSectorReader reader2(AliMp::kStation1, AliMp::kNonBendingPlane); | |
541 | AliMpSector* sector2 = reader2.BuildSector(); | |
542 | ||
543 | //reflectZ = false; | |
544 | reflectZ = true; | |
545 | TVector2 offset = sector2->Position(); | |
546 | where = TVector3(where.X()+offset.X(), where.Y()+offset.Y(), 0.); | |
547 | // Add the half-pad shift of the non-bending plane wrt bending plane | |
548 | // (The shift is defined in the mapping as sector offset) | |
549 | // Fix (4) - was TVector3(where.X()+0.63/2, ... - now it is -0.63/2 | |
550 | PlaceSector(sector2, specialMap, where, reflectZ, chamber); | |
551 | ||
552 | #ifdef WITH_ROOT | |
553 | specialMap.Delete(); | |
554 | #endif | |
555 | } | |
556 | ||
557 | //______________________________________________________________________________ | |
558 | void AliMUONSt1GeometryBuilderV2::CreateFoamBox( | |
559 | Int_t segNumber, | |
560 | const TVector2& dimensions) | |
561 | { | |
562 | /// Create all the elements in the copper plane | |
563 | ||
564 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; | |
565 | Int_t idAir = idtmed[1100]; // medium 1 | |
566 | //Int_t idFoam = idtmed[1115]; // medium 16 = Foam | |
567 | //Int_t idFR4 = idtmed[1114]; // medium 15 = FR4 | |
568 | Int_t idFoam = idtmed[1125]; // medium 26 = Foam | |
569 | Int_t idFR4 = idtmed[1122]; // medium 23 = FR4 | |
570 | ||
571 | // mother volume | |
572 | GReal_t par[3]; | |
573 | par[0] = dimensions.X(); | |
574 | par[1] = dimensions.Y(); | |
575 | par[2] = TotalHzPlane(); | |
576 | gMC->Gsvolu(PlaneSegmentName(segNumber).Data(),"BOX",idAir,par,3); | |
577 | ||
578 | // foam layer | |
579 | par[0] = dimensions.X(); | |
580 | par[1] = dimensions.Y(); | |
581 | par[2] = fgkHzFoam; | |
582 | gMC->Gsvolu(FoamBoxName(segNumber).Data(),"BOX",idFoam,par,3); | |
583 | GReal_t posX,posY,posZ; | |
584 | posX=0.; | |
585 | posY=0.; | |
586 | posZ = -TotalHzPlane() + fgkHzFoam; | |
587 | gMC->Gspos(FoamBoxName(segNumber).Data(),1, | |
588 | PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY"); | |
589 | ||
590 | // mechanical plane FR4 layer | |
591 | par[0] = dimensions.X(); | |
592 | par[1] = dimensions.Y(); | |
593 | par[2] = fgkHzFR4; | |
594 | gMC->Gsvolu(FR4BoxName(segNumber).Data(),"BOX",idFR4,par,3); | |
595 | posX=0.; | |
596 | posY=0.; | |
597 | posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4; | |
598 | gMC->Gspos(FR4BoxName(segNumber).Data(),1, | |
599 | PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY"); | |
600 | } | |
601 | ||
602 | //______________________________________________________________________________ | |
603 | void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(Int_t segNumber, | |
604 | const TVector2& dimensions, | |
605 | Int_t nofHoles) | |
606 | { | |
607 | /// Create a segment of a plane (this includes a foam layer, | |
608 | /// holes in the foam to feed the kaptons through, kapton connectors | |
609 | /// and the mother board.) | |
610 | ||
611 | CreateFoamBox(segNumber,dimensions); | |
612 | ||
613 | for (Int_t holeNum=0;holeNum<nofHoles;holeNum++) { | |
614 | GReal_t posX = ((2.*holeNum+1.)/nofHoles-1.)*dimensions.X(); | |
615 | GReal_t posY = 0.; | |
616 | GReal_t posZ = 0.; | |
617 | ||
618 | gMC->Gspos(fgkHoleName,holeNum+1, | |
619 | FoamBoxName(segNumber).Data(),posX,posY,posZ,0,"ONLY"); | |
620 | } | |
621 | } | |
622 | ||
623 | //______________________________________________________________________________ | |
624 | void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) | |
625 | { | |
626 | /// Create the non-sensitive elements of the frame for the \a chamber | |
627 | /// | |
628 | /// Model and notation: \n | |
629 | /// \n | |
630 | /// The Quadrant volume name starts with SQ \n | |
631 | /// The volume segments are numbered 00 to XX \n | |
632 | /// \n | |
633 | /// OutTopFrame \n | |
634 | /// (SQ02-16) \n | |
635 | /// ------------ \n | |
636 | /// OutEdgeFrame / | \n | |
637 | /// (SQ17-24) / | InVFrame (SQ00-01) \n | |
638 | /// / | \n | |
639 | /// | | \n | |
640 | /// OutVFrame | _- - \n | |
641 | /// (SQ25-39) | | InArcFrame (SQ42-45) \n | |
642 | /// | | \n | |
643 | /// ------------- \n | |
644 | /// InHFrame (SQ40-41) \n | |
645 | /// \n | |
646 | /// \n | |
647 | /// 06 February 2003 - Overlapping volumes resolved. \n | |
648 | /// One quarter chamber is comprised of three TUBS volumes: SQMx, SQNx, and SQFx, | |
649 | /// where SQMx is the Quadrant Middle layer for chamber \a chamber ( posZ in [-3.25,3.25]), | |
650 | /// SQNx is the Quadrant Near side layer for chamber \a chamber ( posZ in [-6.25,3-.25) ), and | |
651 | /// SQFx is the Quadrant Far side layer for chamber \a chamber ( posZ in (3.25,6.25] ). | |
652 | ||
653 | const Float_t kNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin | |
654 | ||
655 | // tracking medias | |
656 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; | |
657 | ||
658 | Int_t idAir = idtmed[1100]; // medium 1 | |
659 | //Int_t idFrameEpoxy = idtmed[1115]; // medium 16 = Frame Epoxy ME730 | |
660 | //Int_t idInox = idtmed[1116]; // medium 17 Stainless Steel (18%Cr,9%Ni,Fe) | |
661 | //Int_t idFR4 = idtmed[1110]; // medium 11 FR4 | |
662 | //Int_t idCopper = idtmed[1109]; // medium 10 Copper | |
663 | //Int_t idAlu = idtmed[1103]; // medium 4 Aluminium | |
664 | Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16 | |
665 | Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17 | |
666 | Int_t idFR4 = idtmed[1122]; // medium 23 FR4 // was 15 not 11 | |
667 | Int_t idCopper = idtmed[1121]; // medium 22 Copper | |
668 | Int_t idAlu = idtmed[1120]; // medium 21 Aluminium | |
669 | ||
670 | ||
671 | // Rotation Matrices | |
672 | Int_t rot1, rot2, rot3; | |
673 | ||
674 | // Rotation matrices | |
675 | fMUON->AliMatrix(rot1, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane | |
676 | fMUON->AliMatrix(rot2, 90., 45., 90., 135., 0., 0.); // +45 deg in x-y plane | |
677 | Content-type: text/html ]>