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