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