]>
Commit | Line | Data |
---|---|---|
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 |
72 | ClassImp(AliMUONSt1GeometryBuilderV2) | |
73 | /// \endcond | |
74 | ||
5f91c9e8 | 75 | // Thickness Constants |
d1cd2474 | 76 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzPadPlane=0.0148/2.; //Pad plane |
1c4b9c4c | 77 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFoam = 2.503/2.; //Foam of mechanicalplane |
78 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFR4 = 0.062/2.; //FR4 of mechanical plane | |
d1cd2474 | 79 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzSnPb = 0.0091/2.; //Pad/Kapton connection (66 pt) |
80 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzKapton = 0.0122/2.; //Kapton | |
81 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergPlastic = 0.3062/2.;//Berg connector | |
82 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergCopper = 0.1882/2.; //Berg connector | |
83 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzDaughter = 0.0156/2.; //Daughter board | |
b367fd8f | 84 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzGas = 0.42/2.; //Gas thickness |
5f91c9e8 | 85 | |
86 | // Quadrant Mother volume - TUBS1 - Middle layer of model | |
d1cd2474 | 87 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR1 = 18.3; |
88 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR1 = 105.673; | |
89 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick1 = 6.5/2; | |
90 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL1 = 0.; | |
91 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU1 = 90.; | |
5f91c9e8 | 92 | |
93 | // Quadrant Mother volume - TUBS2 - near and far layers of model | |
d1cd2474 | 94 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR2 = 20.7; |
95 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR2 = 100.073; | |
96 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick2 = 3.0/2; | |
97 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL2 = 0.; | |
98 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU2 = 90.; | |
5f91c9e8 | 99 | |
100 | // Sensitive copper pads, foam layer, PCB and electronics model parameters | |
d1cd2474 | 101 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxHole=1.5/2.; |
102 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyHole=6./2.; | |
103 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergPlastic=0.74/2.; | |
104 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergPlastic=5.09/2.; | |
105 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergCopper=0.25/2.; | |
106 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergCopper=3.6/2.; | |
107 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxKapton=0.8/2.; | |
108 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyKapton=5.7/2.; | |
109 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxDaughter=2.3/2.; | |
110 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyDaughter=6.3/2.; | |
111 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetX=1.46; | |
112 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetY=0.71; | |
113 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamX=1.46; | |
114 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamY=0.051; | |
115 | ||
116 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaQuadLHC=2.6; // LHC Origin wrt Quadrant Origin | |
b367fd8f | 117 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkFrameOffset=5.2; |
118 | // Fix (1) of overlap SQN* layers with SQM* ones (was 5.0) | |
119 | ||
120 | // Pad planes offsets | |
121 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadXOffsetBP = 0.50 - 0.63/2; // = 0.185 | |
122 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadYOffsetBP = -0.31 - 0.42/2; // =-0.52 | |
d1cd2474 | 123 | |
62c708bf | 124 | const char* AliMUONSt1GeometryBuilderV2::fgkHoleName="SCHL"; |
125 | const char* AliMUONSt1GeometryBuilderV2::fgkDaughterName="SCDB"; | |
b367fd8f | 126 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantEnvelopeName="SE"; |
d1cd2474 | 127 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMLayerName="SQM"; |
128 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantNLayerName="SQN"; | |
129 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantFLayerName="SQF"; | |
62c708bf | 130 | const Int_t AliMUONSt1GeometryBuilderV2::fgkFoamBoxNameOffset=200; |
131 | const Int_t AliMUONSt1GeometryBuilderV2::fgkFR4BoxNameOffset=400; | |
e8c253a0 | 132 | const Int_t AliMUONSt1GeometryBuilderV2::fgkDaughterCopyNoOffset=1000; |
5f91c9e8 | 133 | |
134 | //______________________________________________________________________________ | |
d1cd2474 | 135 | AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon) |
8cf07955 | 136 | : AliMUONVGeometryBuilder(0, 2), |
d1cd2474 | 137 | fMUON(muon) |
ba030c0e | 138 | { |
5398f946 | 139 | /// Standard constructor |
ba030c0e | 140 | } |
141 | ||
5f91c9e8 | 142 | //______________________________________________________________________________ |
d1cd2474 | 143 | AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2() |
144 | : AliMUONVGeometryBuilder(), | |
145 | fMUON(0) | |
ba030c0e | 146 | { |
5398f946 | 147 | /// Default Constructor |
ba030c0e | 148 | } |
ba030c0e | 149 | |
5f91c9e8 | 150 | //______________________________________________________________________________ |
d1cd2474 | 151 | AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2() |
ba030c0e | 152 | { |
5398f946 | 153 | /// Destructor |
ba030c0e | 154 | } |
155 | ||
d1cd2474 | 156 | |
5f91c9e8 | 157 | // |
158 | // Private methods | |
159 | // | |
160 | ||
b367fd8f | 161 | //______________________________________________________________________________ |
162 | TString | |
163 | AliMUONSt1GeometryBuilderV2::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 | 171 | void 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 | 208 | void 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 | 256 | void 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 | |
472 | //______________________________________________________________________________ | |
d1cd2474 | 473 | void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber) |
ba030c0e | 474 | { |
5398f946 | 475 | /// Create the quadrant (bending and non-bending planes) |
476 | /// for the given chamber | |
5f91c9e8 | 477 | |
ba030c0e | 478 | CreateFrame(chamber); |
479 | ||
86488ea7 | 480 | #ifdef WITH_STL |
d1cd2474 | 481 | SpecialMap specialMap; |
e8c253a0 | 482 | specialMap[76] = AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.); |
483 | specialMap[75] = AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36)); | |
484 | specialMap[47] = AliMUONSt1SpecialMotif(TVector2(1.01, 0.36)); | |
d1cd2474 | 485 | #endif |
486 | ||
86488ea7 | 487 | #ifdef WITH_ROOT |
d1cd2474 | 488 | SpecialMap specialMap; |
e8c253a0 | 489 | specialMap.Add(76, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.1, 0.84), 90.)); |
490 | specialMap.Add(75, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.5, 0.36))); | |
491 | specialMap.Add(47, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36))); | |
d1cd2474 | 492 | #endif |
493 | ||
331a617a | 494 | // Load mapping from OCDB |
495 | if ( ! AliMpSegmentation::Instance() ) { | |
496 | AliFatal("Mapping has to be loaded first !"); | |
497 | } | |
498 | ||
499 | const AliMpSectorSegmentation* kSegmentation1 | |
500 | = dynamic_cast<const AliMpSectorSegmentation*>( | |
501 | AliMpSegmentation::Instance() | |
502 | ->GetMpSegmentation(100, AliMpDEManager::GetCathod(100, AliMp::kBendingPlane))); | |
503 | if ( ! kSegmentation1 ) { | |
504 | AliFatal("Could not access sector segmentation !"); | |
505 | } | |
506 | ||
507 | const AliMpSector* kSector1 = kSegmentation1->GetSector(); | |
508 | /* | |
866c3232 | 509 | AliMpSectorReader reader1(AliMp::kStation1, AliMp::kBendingPlane); |
331a617a | 510 | AliMpSector* kSector1 = reader1.BuildSector(); |
511 | */ | |
b367fd8f | 512 | //Bool_t reflectZ = true; |
513 | Bool_t reflectZ = false; | |
514 | //TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.); | |
515 | TVector3 where = TVector3(fgkDeltaQuadLHC + fgkPadXOffsetBP, | |
516 | fgkDeltaQuadLHC + fgkPadYOffsetBP, 0.); | |
331a617a | 517 | PlaceSector(kSector1, specialMap, where, reflectZ, chamber); |
ba030c0e | 518 | |
86488ea7 | 519 | #ifdef WITH_STL |
ba030c0e | 520 | specialMap.clear(); |
e8c253a0 | 521 | specialMap[76] = AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.); |
522 | specialMap[75] = AliMUONSt1SpecialMotif(TVector2(1.96, 0.17)); | |
b367fd8f | 523 | specialMap[47] = AliMUONSt1SpecialMotif(TVector2(2.18,-0.98)); |
e8c253a0 | 524 | specialMap[20] = AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08)); |
525 | specialMap[46] = AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25)); | |
526 | specialMap[74] = AliMUONSt1SpecialMotif(TVector2(0.28, 0.21)); | |
b367fd8f | 527 | // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector |
528 | // in the true position) | |
529 | // Was: specialMap[47] = AliMUONSt1SpecialMotif(TVector2(1.61,-1.18)); | |
d1cd2474 | 530 | #endif |
531 | ||
86488ea7 | 532 | #ifdef WITH_ROOT |
866c3232 | 533 | Int_t nb = AliMpConstants::ManuMask(AliMp::kNonBendingPlane); |
d1cd2474 | 534 | specialMap.Delete(); |
4d8c279c | 535 | specialMap.Add(76 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.)); |
536 | specialMap.Add(75 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.96, 0.17))); | |
537 | specialMap.Add(47 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(2.18,-0.98))); | |
538 | specialMap.Add(20 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08))); | |
539 | specialMap.Add(46 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 , 0.25))); | |
540 | specialMap.Add(74 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.28, 0.21))); | |
b367fd8f | 541 | // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector |
542 | // in the true position) | |
543 | // Was: specialMap.Add(47,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.61,-1.18))); | |
d1cd2474 | 544 | #endif |
331a617a | 545 | /* |
866c3232 | 546 | AliMpSectorReader reader2(AliMp::kStation1, AliMp::kNonBendingPlane); |
5f91c9e8 | 547 | AliMpSector* sector2 = reader2.BuildSector(); |
331a617a | 548 | */ |
549 | const AliMpSectorSegmentation* kSegmentation2 | |
550 | = dynamic_cast<const AliMpSectorSegmentation*>( | |
551 | AliMpSegmentation::Instance() | |
552 | ->GetMpSegmentation(100, AliMpDEManager::GetCathod(100, AliMp::kNonBendingPlane))); | |
553 | if ( ! kSegmentation2 ) { | |
554 | AliFatal("Could not access sector segmentation !"); | |
555 | } | |
556 | ||
557 | const AliMpSector* kSector2 = kSegmentation2->GetSector(); | |
558 | ||
b367fd8f | 559 | //reflectZ = false; |
560 | reflectZ = true; | |
331a617a | 561 | TVector2 offset = kSector2->Position(); |
e77b6d6b | 562 | where = TVector3(where.X()+offset.X(), where.Y()+offset.Y(), 0.); |
b367fd8f | 563 | // Add the half-pad shift of the non-bending plane wrt bending plane |
564 | // (The shift is defined in the mapping as sector offset) | |
565 | // Fix (4) - was TVector3(where.X()+0.63/2, ... - now it is -0.63/2 | |
331a617a | 566 | PlaceSector(kSector2, specialMap, where, reflectZ, chamber); |
d1cd2474 | 567 | |
86488ea7 | 568 | #ifdef WITH_ROOT |
d1cd2474 | 569 | specialMap.Delete(); |
570 | #endif | |
ba030c0e | 571 | } |
572 | ||
5f91c9e8 | 573 | //______________________________________________________________________________ |
62c708bf | 574 | void AliMUONSt1GeometryBuilderV2::CreateFoamBox( |
575 | Int_t segNumber, | |
576 | const TVector2& dimensions) | |
ba030c0e | 577 | { |
5398f946 | 578 | /// Create all the elements in the copper plane |
ba030c0e | 579 | |
d1cd2474 | 580 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; |
5f91c9e8 | 581 | Int_t idAir = idtmed[1100]; // medium 1 |
d1cd2474 | 582 | //Int_t idFoam = idtmed[1115]; // medium 16 = Foam |
583 | //Int_t idFR4 = idtmed[1114]; // medium 15 = FR4 | |
584 | Int_t idFoam = idtmed[1125]; // medium 26 = Foam | |
585 | Int_t idFR4 = idtmed[1122]; // medium 23 = FR4 | |
ba030c0e | 586 | |
5f91c9e8 | 587 | // mother volume |
588 | GReal_t par[3]; | |
589 | par[0] = dimensions.X(); | |
590 | par[1] = dimensions.Y(); | |
591 | par[2] = TotalHzPlane(); | |
62c708bf | 592 | gMC->Gsvolu(PlaneSegmentName(segNumber).Data(),"BOX",idAir,par,3); |
5f91c9e8 | 593 | |
594 | // foam layer | |
5f91c9e8 | 595 | par[0] = dimensions.X(); |
596 | par[1] = dimensions.Y(); | |
597 | par[2] = fgkHzFoam; | |
62c708bf | 598 | gMC->Gsvolu(FoamBoxName(segNumber).Data(),"BOX",idFoam,par,3); |
599 | GReal_t posX,posY,posZ; | |
5f91c9e8 | 600 | posX=0.; |
601 | posY=0.; | |
602 | posZ = -TotalHzPlane() + fgkHzFoam; | |
62c708bf | 603 | gMC->Gspos(FoamBoxName(segNumber).Data(),1, |
604 | PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY"); | |
ba030c0e | 605 | |
5f91c9e8 | 606 | // mechanical plane FR4 layer |
5f91c9e8 | 607 | par[0] = dimensions.X(); |
608 | par[1] = dimensions.Y(); | |
609 | par[2] = fgkHzFR4; | |
62c708bf | 610 | gMC->Gsvolu(FR4BoxName(segNumber).Data(),"BOX",idFR4,par,3); |
5f91c9e8 | 611 | posX=0.; |
612 | posY=0.; | |
613 | posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4; | |
62c708bf | 614 | gMC->Gspos(FR4BoxName(segNumber).Data(),1, |
615 | PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY"); | |
5f91c9e8 | 616 | } |
ba030c0e | 617 | |
5f91c9e8 | 618 | //______________________________________________________________________________ |
62c708bf | 619 | void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(Int_t segNumber, |
620 | const TVector2& dimensions, | |
621 | Int_t nofHoles) | |
5f91c9e8 | 622 | { |
5398f946 | 623 | /// Create a segment of a plane (this includes a foam layer, |
624 | /// holes in the foam to feed the kaptons through, kapton connectors | |
625 | /// and the mother board.) | |
ba030c0e | 626 | |
62c708bf | 627 | CreateFoamBox(segNumber,dimensions); |
ba030c0e | 628 | |
5f91c9e8 | 629 | for (Int_t holeNum=0;holeNum<nofHoles;holeNum++) { |
630 | GReal_t posX = ((2.*holeNum+1.)/nofHoles-1.)*dimensions.X(); | |
631 | GReal_t posY = 0.; | |
632 | GReal_t posZ = 0.; | |
ba030c0e | 633 | |
62c708bf | 634 | gMC->Gspos(fgkHoleName,holeNum+1, |
635 | FoamBoxName(segNumber).Data(),posX,posY,posZ,0,"ONLY"); | |
5f91c9e8 | 636 | } |
637 | } | |
ba030c0e | 638 | |
5f91c9e8 | 639 | //______________________________________________________________________________ |
d1cd2474 | 640 | void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) |
5f91c9e8 | 641 | { |
5398f946 | 642 | /// Create the non-sensitive elements of the frame for the \a chamber |
643 | /// | |
644 | /// Model and notation: \n | |
645 | /// \n | |
646 | /// The Quadrant volume name starts with SQ \n | |
647 | /// The volume segments are numbered 00 to XX \n | |
648 | /// \n | |
649 | /// OutTopFrame \n | |
650 | /// (SQ02-16) \n | |
651 | /// ------------ \n | |
652 | /// OutEdgeFrame / | \n | |
653 | /// (SQ17-24) / | InVFrame (SQ00-01) \n | |
654 | /// / | \n | |
655 | /// | | \n | |
656 | /// OutVFrame | _- - \n | |
657 | /// (SQ25-39) | | InArcFrame (SQ42-45) \n | |
658 | /// | | \n | |
659 | /// ------------- \n | |
660 | /// InHFrame (SQ40-41) \n | |
661 | /// \n | |
662 | /// \n | |
663 | /// 06 February 2003 - Overlapping volumes resolved. \n | |
664 | /// One quarter chamber is comprised of three TUBS volumes: SQMx, SQNx, and SQFx, | |
665 | /// where SQMx is the Quadrant Middle layer for chamber \a chamber ( posZ in [-3.25,3.25]), | |
666 | /// SQNx is the Quadrant Near side layer for chamber \a chamber ( posZ in [-6.25,3-.25) ), and | |
667 | /// SQFx is the Quadrant Far side layer for chamber \a chamber ( posZ in (3.25,6.25] ). | |
ba030c0e | 668 | |
d1cd2474 | 669 | const Float_t kNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin |
ba030c0e | 670 | |
ba030c0e | 671 | // tracking medias |
d1cd2474 | 672 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; |
5f91c9e8 | 673 | |
ba030c0e | 674 | Int_t idAir = idtmed[1100]; // medium 1 |
d1cd2474 | 675 | //Int_t idFrameEpoxy = idtmed[1115]; // medium 16 = Frame Epoxy ME730 |
676 | //Int_t idInox = idtmed[1116]; // medium 17 Stainless Steel (18%Cr,9%Ni,Fe) | |
677 | //Int_t idFR4 = idtmed[1110]; // medium 11 FR4 | |
678 | //Int_t idCopper = idtmed[1109]; // medium 10 Copper | |
679 | //Int_t idAlu = idtmed[1103]; // medium 4 Aluminium | |
680 | Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16 | |
681 | Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17 | |
682 | Int_t idFR4 = idtmed[1122]; // medium 23 FR4 // was 15 not 11 | |
683 | Int_t idCopper = idtmed[1121]; // medium 22 Copper | |
684 | Int_t idAlu = idtmed[1120]; // medium 21 Aluminium | |
5f91c9e8 | 685 | |
686 | ||
687 | // Rotation Matrices | |
688 | Int_t rot1, rot2, rot3; | |
689 | ||
690 | // Rotation matrices | |
d1cd2474 | 691 | fMUON->AliMatrix(rot1, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane |
692 | fMUON->AliMatrix(rot2, 90., 45., 90., 135., 0., 0.); // +45 deg in x-y plane | |
693 | Content-type: text/html ]>