]>
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" | |
4d8c279c | 36 | #include "AliMpConstants.h" |
331a617a | 37 | #include "AliMpCDB.h" |
adbabf6d | 38 | #include "AliMpSector.h" |
39 | #include "AliMpRow.h" | |
40 | #include "AliMpVRowSegment.h" | |
41 | #include "AliMpMotifMap.h" | |
42 | #include "AliMpMotifPosition.h" | |
4d8c279c | 43 | #include "AliMpPlaneType.h" |
adbabf6d | 44 | |
45 | #include "AliRun.h" | |
46 | #include "AliMagF.h" | |
47 | #include "AliLog.h" | |
ba030c0e | 48 | |
5f91c9e8 | 49 | #include <Riostream.h> |
f7a1cc68 | 50 | #include <TClonesArray.h> |
51 | #include <TGeoCompositeShape.h> | |
52 | #include <TGeoGlobalMagField.h> | |
91111b9c | 53 | #include <TGeoManager.h> |
f7a1cc68 | 54 | #include <TGeoMatrix.h> |
91111b9c | 55 | #include <TGeoTube.h> |
f7a1cc68 | 56 | #include <TGeoVolume.h> |
0ab920eb | 57 | #include <TGeoXtru.h> |
f7a1cc68 | 58 | #include <TSystem.h> |
59 | #include <TVector2.h> | |
60 | #include <TVector3.h> | |
61 | #include <TVirtualMC.h> | |
2294822d | 62 | #include <TArrayI.h> |
ba030c0e | 63 | |
cdd730d0 | 64 | using std::endl; |
65 | using std::cout; | |
5398f946 | 66 | /// \cond CLASSIMP |
67 | ClassImp(AliMUONSt1GeometryBuilderV2) | |
68 | /// \endcond | |
69 | ||
ab3b76f1 | 70 | // Thickness Constants |
71 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzPadPlane=0.0148/2.; //Pad plane | |
72 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFoam = 2.503/2.; //Foam of mechanicalplane | |
73 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzFR4 = 0.062/2.; //FR4 of mechanical plane | |
74 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzSnPb = 0.0091/2.; //Pad/Kapton connection (66 pt) | |
75 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzKapton = 0.0122/2.; //Kapton | |
76 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergPlastic = 0.3062/2.;//Berg connector | |
77 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzBergCopper = 0.1882/2.; //Berg connector | |
78 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzDaughter = 0.0156/2.; //Daughter board | |
79 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHzGas = 0.42/2.; //Gas thickness | |
80 | ||
81 | // Quadrant Mother volume - TUBS1 - Middle layer of model | |
82 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR1 = 18.3; | |
83 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR1 = 105.673; | |
84 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick1 = 6.5/2; | |
85 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL1 = 0.; | |
86 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU1 = 90.; | |
87 | ||
88 | // Quadrant Mother volume - TUBS2 - near and far layers of model | |
89 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherIR2 = 20.7; | |
90 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherOR2 = 100.073; | |
91 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherThick2 = 3.0/2; | |
92 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiL2 = 0.; | |
93 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkMotherPhiU2 = 90.; | |
94 | ||
95 | // Sensitive copper pads, foam layer, PCB and electronics model parameters | |
96 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxHole=1.5/2.; | |
97 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyHole=6./2.; | |
98 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergPlastic=0.74/2.; | |
99 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergPlastic=5.09/2.; | |
100 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxBergCopper=0.25/2.; | |
101 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyBergCopper=3.6/2.; | |
102 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxKapton=0.8/2.; | |
103 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyKapton=5.7/2.; | |
104 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHxDaughter=2.3/2.; | |
105 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkHyDaughter=6.3/2.; | |
106 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetX=1.46; | |
107 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkOffsetY=0.71; | |
108 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamX=1.00; | |
109 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaFilleEtamY=0.051; | |
110 | ||
111 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkDeltaQuadLHC=2.6; // LHC Origin wrt Quadrant Origin | |
112 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkFrameOffset=5.2; | |
113 | // Fix (1) of overlap SQN* layers with SQM* ones (was 5.0) | |
114 | ||
115 | // Pad planes offsets | |
116 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadXOffsetBP = 0.50 - 0.63/2; // = 0.185 | |
117 | const GReal_t AliMUONSt1GeometryBuilderV2::fgkPadYOffsetBP = -0.31 - 0.42/2; // =-0.52 | |
118 | ||
62c708bf | 119 | const char* AliMUONSt1GeometryBuilderV2::fgkHoleName="SCHL"; |
120 | const char* AliMUONSt1GeometryBuilderV2::fgkDaughterName="SCDB"; | |
b367fd8f | 121 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantEnvelopeName="SE"; |
d1cd2474 | 122 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMLayerName="SQM"; |
123 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantNLayerName="SQN"; | |
124 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantFLayerName="SQF"; | |
5ae5869b | 125 | const char* AliMUONSt1GeometryBuilderV2::fgkQuadrantMFLayerName="SQMF"; |
ab3b76f1 | 126 | const Int_t AliMUONSt1GeometryBuilderV2::fgkFoamBoxNameOffset=200; |
127 | const Int_t AliMUONSt1GeometryBuilderV2::fgkFR4BoxNameOffset=400; | |
128 | const Int_t AliMUONSt1GeometryBuilderV2::fgkDaughterCopyNoOffset=1000; | |
5f91c9e8 | 129 | |
130 | //______________________________________________________________________________ | |
d1cd2474 | 131 | AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2(AliMUON* muon) |
8cf07955 | 132 | : AliMUONVGeometryBuilder(0, 2), |
d1cd2474 | 133 | fMUON(muon) |
ba030c0e | 134 | { |
5398f946 | 135 | /// Standard constructor |
ba030c0e | 136 | } |
137 | ||
5f91c9e8 | 138 | //______________________________________________________________________________ |
d1cd2474 | 139 | AliMUONSt1GeometryBuilderV2::AliMUONSt1GeometryBuilderV2() |
140 | : AliMUONVGeometryBuilder(), | |
141 | fMUON(0) | |
ba030c0e | 142 | { |
5398f946 | 143 | /// Default Constructor |
ba030c0e | 144 | } |
ba030c0e | 145 | |
5f91c9e8 | 146 | //______________________________________________________________________________ |
d1cd2474 | 147 | AliMUONSt1GeometryBuilderV2::~AliMUONSt1GeometryBuilderV2() |
ba030c0e | 148 | { |
5398f946 | 149 | /// Destructor |
ba030c0e | 150 | } |
151 | ||
d1cd2474 | 152 | |
5f91c9e8 | 153 | // |
154 | // Private methods | |
155 | // | |
156 | ||
b367fd8f | 157 | //______________________________________________________________________________ |
158 | TString | |
159 | AliMUONSt1GeometryBuilderV2::QuadrantEnvelopeName(Int_t chamber, Int_t quadrant) const | |
160 | { | |
5398f946 | 161 | /// Generate unique envelope name from chamber Id and quadrant number |
b367fd8f | 162 | |
163 | return Form("%s%d", Form("%s%d",fgkQuadrantEnvelopeName,chamber), quadrant); | |
164 | } | |
165 | ||
5f91c9e8 | 166 | //______________________________________________________________________________ |
d1cd2474 | 167 | void AliMUONSt1GeometryBuilderV2::CreateHole() |
ba030c0e | 168 | { |
5398f946 | 169 | /// Create all the elements found inside a foam hole |
170 | ||
d1cd2474 | 171 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; |
172 | Int_t idAir = idtmed[1100]; // medium 1 | |
173 | //Int_t idCopper = idtmed[1109]; // medium 10 = copper | |
174 | Int_t idCopper = idtmed[1121]; // medium 22 = copper | |
ba030c0e | 175 | |
5f91c9e8 | 176 | GReal_t par[3]; |
177 | GReal_t posX,posY,posZ; | |
178 | ||
179 | par[0] = fgkHxHole; | |
180 | par[1] = fgkHyHole; | |
181 | par[2] = fgkHzFoam; | |
182 | gMC->Gsvolu(fgkHoleName,"BOX",idAir,par,3); | |
ba030c0e | 183 | |
5f91c9e8 | 184 | par[0] = fgkHxKapton; |
185 | par[1] = fgkHyKapton; | |
186 | par[2] = fgkHzSnPb; | |
187 | gMC->Gsvolu("SNPB", "BOX", idCopper, par, 3); | |
188 | posX = 0.; | |
189 | posY = 0.; | |
190 | posZ = -fgkHzFoam+fgkHzSnPb; | |
191 | gMC->Gspos("SNPB",1,fgkHoleName, posX, posY, posZ, 0,"ONLY"); | |
ba030c0e | 192 | |
5f91c9e8 | 193 | par[0] = fgkHxHole; |
194 | par[1] = fgkHyBergPlastic; | |
195 | par[2] = fgkHzKapton; | |
62c708bf | 196 | gMC->Gsvolu("SKPT", "BOX", idCopper, par, 3); |
5f91c9e8 | 197 | posX = 0.; |
198 | posY = 0.; | |
199 | posZ = 0.; | |
62c708bf | 200 | gMC->Gspos("SKPT",1,fgkHoleName, posX, posY, posZ, 0,"ONLY"); |
5f91c9e8 | 201 | } |
ba030c0e | 202 | |
5f91c9e8 | 203 | //______________________________________________________________________________ |
d1cd2474 | 204 | void AliMUONSt1GeometryBuilderV2::CreateDaughterBoard() |
5f91c9e8 | 205 | { |
5398f946 | 206 | /// Create all the elements in a daughter board |
207 | ||
d1cd2474 | 208 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; |
5f91c9e8 | 209 | Int_t idAir = idtmed[1100]; // medium 1 |
d1cd2474 | 210 | //Int_t idCopper = idtmed[1109]; // medium 10 = copper |
211 | //Int_t idPlastic =idtmed[1116]; // medium 17 = Plastic | |
212 | Int_t idCopper = idtmed[1121]; // medium 22 = copper | |
213 | Int_t idPlastic =idtmed[1127]; // medium 28 = Plastic | |
ba030c0e | 214 | |
5f91c9e8 | 215 | GReal_t par[3]; |
216 | GReal_t posX,posY,posZ; | |
217 | ||
218 | par[0]=fgkHxDaughter; | |
219 | par[1]=fgkHyDaughter; | |
220 | par[2]=TotalHzDaughter(); | |
221 | gMC->Gsvolu(fgkDaughterName,"BOX",idAir,par,3); | |
ba030c0e | 222 | |
5f91c9e8 | 223 | par[0]=fgkHxBergPlastic; |
224 | par[1]=fgkHyBergPlastic; | |
225 | par[2]=fgkHzBergPlastic; | |
62c708bf | 226 | gMC->Gsvolu("SBGP","BOX",idPlastic,par,3); |
5f91c9e8 | 227 | posX=0.; |
228 | posY=0.; | |
229 | posZ = -TotalHzDaughter() + fgkHzBergPlastic; | |
62c708bf | 230 | gMC->Gspos("SBGP",1,fgkDaughterName,posX,posY,posZ,0,"ONLY"); |
5f91c9e8 | 231 | |
232 | par[0]=fgkHxBergCopper; | |
233 | par[1]=fgkHyBergCopper; | |
234 | par[2]=fgkHzBergCopper; | |
62c708bf | 235 | gMC->Gsvolu("SBGC","BOX",idCopper,par,3); |
5f91c9e8 | 236 | posX=0.; |
237 | posY=0.; | |
238 | posZ=0.; | |
62c708bf | 239 | gMC->Gspos("SBGC",1,"SBGP",posX,posY,posZ,0,"ONLY"); |
5f91c9e8 | 240 | |
241 | par[0]=fgkHxDaughter; | |
242 | par[1]=fgkHyDaughter; | |
243 | par[2]=fgkHzDaughter; | |
62c708bf | 244 | gMC->Gsvolu("SDGH","BOX",idCopper,par,3); |
5f91c9e8 | 245 | posX=0.; |
246 | posY=0.; | |
247 | posZ = -TotalHzDaughter() + 2.*fgkHzBergPlastic + fgkHzDaughter; | |
62c708bf | 248 | gMC->Gspos("SDGH",1,fgkDaughterName,posX,posY,posZ,0,"ONLY"); |
5f91c9e8 | 249 | } |
250 | ||
251 | //______________________________________________________________________________ | |
d1cd2474 | 252 | void AliMUONSt1GeometryBuilderV2::CreateInnerLayers() |
5f91c9e8 | 253 | { |
5398f946 | 254 | /// Create the layer of sensitive volumes with gas |
255 | /// and the copper layer. | |
0ab920eb | 256 | /// The shape of the sensitive area is defined as an extruded |
257 | /// solid substracted with tube (to get inner circular shape). | |
5f91c9e8 | 258 | |
0ab920eb | 259 | TGeoMedium* kMedArCO2 = gGeoManager->GetMedium("MUON_ARG_CO2"); |
260 | TGeoMedium* kMedCopper = gGeoManager->GetMedium("MUON_COPPER_II"); | |
5f91c9e8 | 261 | |
0ab920eb | 262 | Double_t rmin = 0.0; |
263 | Double_t rmax = fgkMotherIR1; | |
264 | Double_t hz = fgkHzPadPlane + fgkHzGas; | |
265 | new TGeoTube("cutTube",rmin, rmax, hz); | |
5f91c9e8 | 266 | |
0ab920eb | 267 | Double_t maxXY = 89.0; |
268 | Double_t xy1 = 77.33; | |
269 | Double_t xy2 = 48.77; | |
270 | Double_t dxy1 = maxXY - xy1; | |
5f91c9e8 | 271 | |
0ab920eb | 272 | Int_t nz = 2; |
273 | Int_t nv = 6; | |
274 | Double_t vx[6] = { 0.0, 0.0, xy2, maxXY, maxXY, dxy1 }; | |
275 | Double_t vy[6] = { dxy1, maxXY, maxXY, xy2, 0.0, 0.0 }; | |
276 | ||
277 | TGeoXtru* xtruS1 = new TGeoXtru(nz); | |
278 | xtruS1->SetName("xtruS1"); | |
279 | xtruS1->DefinePolygon(nv, vx, vy); | |
280 | xtruS1->DefineSection(0, -fgkHzGas, 0.0, 0.0, 1.0); | |
281 | xtruS1->DefineSection(1, fgkHzGas, 0.0, 0.0, 1.0); | |
282 | TGeoCompositeShape* layerS1 = new TGeoCompositeShape("layerS1", "xtruS1-cutTube"); | |
283 | new TGeoVolume("SA1G", layerS1, kMedArCO2 ); | |
284 | ||
285 | TGeoXtru* xtruS2 = new TGeoXtru(nz); | |
286 | xtruS2->SetName("xtruS2"); | |
287 | xtruS2->DefinePolygon(nv, vx, vy); | |
288 | xtruS2->DefineSection(0, -fgkHzGas, 0.0, 0.0, 1.0); | |
289 | xtruS2->DefineSection(1, fgkHzGas, 0.0, 0.0, 1.0); | |
290 | TGeoCompositeShape* layerS2 = new TGeoCompositeShape("layerS2", "xtruS2-cutTube"); | |
291 | new TGeoVolume("SA2G", layerS2, kMedArCO2 ); | |
292 | ||
293 | TGeoXtru* xtruS3 = new TGeoXtru(nz); | |
294 | xtruS3->SetName("xtruS3"); | |
295 | xtruS3->DefinePolygon(nv, vx, vy); | |
296 | xtruS3->DefineSection(0, -fgkHzPadPlane, 0.0, 0.0, 1.0); | |
297 | xtruS3->DefineSection(1, fgkHzPadPlane, 0.0, 0.0, 1.0); | |
298 | TGeoCompositeShape* layerS3 = new TGeoCompositeShape("layerS3", "xtruS3-cutTube"); | |
299 | new TGeoVolume("SA1C", layerS3, kMedCopper ); | |
300 | } | |
301 | ||
5f91c9e8 | 302 | |
fdbaed6e | 303 | //______________________________________________________________________________ |
304 | void AliMUONSt1GeometryBuilderV2::CreateSpacer0() | |
305 | { | |
306 | /// The spacer volumes are defined according to the input prepared by Nicole Willis | |
307 | /// without any modifications | |
308 | /// <pre> | |
309 | /// No. Type Material Center (mm) Dimensions (mm) (half lengths) | |
310 | /// 5 BOX EPOXY 408.2 430.4 522.41 5.75 1.5 25.5 | |
311 | /// 5P BOX EPOXY 408.2 445.4 522.41 5.75 1.5 25.5 | |
312 | /// 6 BOX EPOXY 408.2 437.9 519.76 5.75 15.0 1.0 | |
313 | /// 6P BOX EPOXY 408.2 437.9 525.06 5.75 15.0 1.0 | |
314 | /// 7 CYL INOX 408.2 437.9 522.41 r=3.0 hz=20.63 | |
ab6c4493 | 315 | /// </pre> |
fdbaed6e | 316 | |
317 | // tracking medias | |
318 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; | |
319 | Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16 | |
320 | Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17 | |
321 | ||
322 | GReal_t par[3]; | |
323 | par[0] = 0.575; | |
324 | par[1] = 0.150; | |
325 | par[2] = 2.550; | |
326 | gMC->Gsvolu("Spacer05","BOX",idFrameEpoxy,par,3); | |
327 | ||
328 | par[0] = 0.575; | |
329 | par[1] = 1.500; | |
330 | par[2] = 0.100; | |
331 | gMC->Gsvolu("Spacer06","BOX",idFrameEpoxy,par,3); | |
332 | ||
333 | par[0] = 0.000; | |
334 | par[1] = 0.300; | |
335 | par[2] = 2.063; | |
336 | gMC->Gsvolu("Spacer07","TUBE",idInox,par,3); | |
337 | } | |
338 | ||
339 | ||
340 | //______________________________________________________________________________ | |
341 | void AliMUONSt1GeometryBuilderV2::CreateSpacer() | |
342 | { | |
343 | /// The spacer volumes are defined according to the input prepared by Nicole Willis | |
344 | /// with modifications needed to fit into existing geometry. | |
345 | /// <pre> | |
346 | /// No. Type Material Center (mm) Dimensions (mm) (half lengths) | |
347 | /// 5 BOX EPOXY 408.2 430.4 522.41 5.75 1.5 25.5 | |
348 | /// 5P BOX EPOXY 408.2 445.4 522.41 5.75 1.5 25.5 | |
349 | /// 6 BOX EPOXY 408.2 437.9 519.76 5.75 15.0 1.0 | |
350 | /// 6P BOX EPOXY 408.2 437.9 525.06 5.75 15.0 1.0 | |
351 | /// 7 CYL INOX 408.2 437.9 522.41 r=3.0 hz=20.63 | |
352 | /// </pre> | |
353 | /// To fit in existing volumes the volumes 5 and 7 are represented by 2 volumes | |
354 | /// with half size in z (5A, &A); the dimensions of the volume 5A were also modified | |
355 | /// to avoid overlaps (x made smaller, y larger to abotain the identical volume) | |
356 | ||
357 | // tracking medias | |
358 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; | |
359 | Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16 | |
360 | Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17 | |
361 | ||
362 | //GReal_t par[3]; | |
363 | //par[0] = 0.575; | |
364 | //par[1] = 0.150; | |
365 | //par[2] = 2.550; | |
366 | //gMC->Gsvolu("Spacer5","BOX",idFrameEpoxy,par,3); | |
367 | ||
368 | GReal_t par[3]; | |
369 | par[0] = 0.510; | |
370 | par[1] = 0.170; | |
5ae5869b | 371 | par[2] = 1.1515; |
fdbaed6e | 372 | gMC->Gsvolu("Spacer5A","BOX",idFrameEpoxy,par,3); |
373 | ||
afab29fc | 374 | par[0] = 0.510; |
fdbaed6e | 375 | par[1] = 1.500; |
376 | par[2] = 0.100; | |
377 | gMC->Gsvolu("Spacer6","BOX",idFrameEpoxy,par,3); | |
378 | ||
379 | //par[0] = 0.000; | |
380 | //par[1] = 0.300; | |
381 | //par[2] = 2.063; | |
382 | //gMC->Gsvolu("Spacer7","TUBE",idInox,par,3); | |
383 | ||
384 | par[0] = 0.000; | |
385 | par[1] = 0.300; | |
386 | par[2] = 1.0315; | |
387 | gMC->Gsvolu("Spacer7A","TUBE",idInox,par,3); | |
388 | } | |
389 | ||
5f91c9e8 | 390 | //______________________________________________________________________________ |
d1cd2474 | 391 | void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber) |
ba030c0e | 392 | { |
5398f946 | 393 | /// Create the quadrant (bending and non-bending planes) |
394 | /// for the given chamber | |
5f91c9e8 | 395 | |
5ae5869b | 396 | // CreateQuadrantLayersAsVolumes(chamber); |
397 | CreateQuadrantLayersAsAssemblies(chamber); | |
ba030c0e | 398 | |
5ae5869b | 399 | CreateFrame(chamber); |
d1cd2474 | 400 | |
5ae5869b | 401 | TExMap specialMap; |
402 | specialMap.Add(76, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.1, 0.72), 90.)); | |
ddfa5dbc | 403 | specialMap.Add(75, (Long_t) new AliMUONSt1SpecialMotif(TVector2( 0.7, 0.36))); |
e8c253a0 | 404 | specialMap.Add(47, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36))); |
d1cd2474 | 405 | |
331a617a | 406 | // Load mapping from OCDB |
407 | if ( ! AliMpSegmentation::Instance() ) { | |
408 | AliFatal("Mapping has to be loaded first !"); | |
409 | } | |
410 | ||
f3ed9a44 | 411 | const AliMpSector* kSector1 |
412 | = AliMpSegmentation::Instance()->GetSector(100, AliMpDEManager::GetCathod(100, AliMp::kBendingPlane)); | |
413 | if ( ! kSector1 ) { | |
331a617a | 414 | AliFatal("Could not access sector segmentation !"); |
415 | } | |
5ae5869b | 416 | |
b367fd8f | 417 | //Bool_t reflectZ = true; |
418 | Bool_t reflectZ = false; | |
419 | //TVector3 where = TVector3(2.5+0.1+0.56+0.001, 2.5+0.1+0.001, 0.); | |
420 | TVector3 where = TVector3(fgkDeltaQuadLHC + fgkPadXOffsetBP, | |
421 | fgkDeltaQuadLHC + fgkPadYOffsetBP, 0.); | |
331a617a | 422 | PlaceSector(kSector1, specialMap, where, reflectZ, chamber); |
ba030c0e | 423 | |
866c3232 | 424 | Int_t nb = AliMpConstants::ManuMask(AliMp::kNonBendingPlane); |
cd872630 | 425 | TExMapIter it(&specialMap); |
6b548b9e | 426 | #if (defined(ROOT_SVN_REVISION) && ROOT_SVN_REVISION >= 29598) || \ |
427 | (defined(ROOT_VERSION_CODE) && ROOT_VERSION_CODE >= ROOT_VERSION(5,25,02)) | |
82280315 | 428 | Long64_t key; |
429 | Long64_t value; | |
430 | #else | |
cd872630 | 431 | Long_t key; |
432 | Long_t value; | |
82280315 | 433 | #endif |
434 | ||
cd872630 | 435 | while ( it.Next(key,value) == kTRUE ) { |
436 | delete reinterpret_cast<AliMUONSt1SpecialMotif*>(value); | |
437 | } | |
d1cd2474 | 438 | specialMap.Delete(); |
5ae5869b | 439 | specialMap.Add(76 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.51),90.)); |
35bf4a8f | 440 | specialMap.Add(75 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(2.20,-0.08))); |
441 | specialMap.Add(47 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(2.40,-1.11))); | |
4d8c279c | 442 | specialMap.Add(20 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.2 ,-0.08))); |
35bf4a8f | 443 | specialMap.Add(46 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.92 , 0.17))); |
ddfa5dbc | 444 | specialMap.Add(74 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(0.405, -0.10))); |
b367fd8f | 445 | // Fix (7) - overlap of SQ42 with MCHL (after moving the whole sector |
446 | // in the true position) | |
5ae5869b | 447 | |
f3ed9a44 | 448 | const AliMpSector* kSector2 |
449 | = AliMpSegmentation::Instance() | |
450 | ->GetSector(100, AliMpDEManager::GetCathod(100, AliMp::kNonBendingPlane)); | |
451 | if ( ! kSector2 ) { | |
452 | AliFatal("Could not access sector !"); | |
331a617a | 453 | } |
331a617a | 454 | |
b367fd8f | 455 | //reflectZ = false; |
456 | reflectZ = true; | |
6e97fbb8 | 457 | TVector2 offset = TVector2(kSector2->GetPositionX(), kSector2->GetPositionY()); |
e77b6d6b | 458 | where = TVector3(where.X()+offset.X(), where.Y()+offset.Y(), 0.); |
b367fd8f | 459 | // Add the half-pad shift of the non-bending plane wrt bending plane |
460 | // (The shift is defined in the mapping as sector offset) | |
461 | // Fix (4) - was TVector3(where.X()+0.63/2, ... - now it is -0.63/2 | |
331a617a | 462 | PlaceSector(kSector2, specialMap, where, reflectZ, chamber); |
d1cd2474 | 463 | |
cd872630 | 464 | it.Reset(); |
465 | while ( it.Next(key,value) == kTRUE ) { | |
466 | delete reinterpret_cast<AliMUONSt1SpecialMotif*>(value); | |
467 | } | |
d1cd2474 | 468 | specialMap.Delete(); |
ba030c0e | 469 | } |
470 | ||
5f91c9e8 | 471 | //______________________________________________________________________________ |
62c708bf | 472 | void AliMUONSt1GeometryBuilderV2::CreateFoamBox( |
473 | Int_t segNumber, | |
474 | const TVector2& dimensions) | |
ba030c0e | 475 | { |
5398f946 | 476 | /// Create all the elements in the copper plane |
ba030c0e | 477 | |
d1cd2474 | 478 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; |
5f91c9e8 | 479 | Int_t idAir = idtmed[1100]; // medium 1 |
d1cd2474 | 480 | //Int_t idFoam = idtmed[1115]; // medium 16 = Foam |
481 | //Int_t idFR4 = idtmed[1114]; // medium 15 = FR4 | |
482 | Int_t idFoam = idtmed[1125]; // medium 26 = Foam | |
483 | Int_t idFR4 = idtmed[1122]; // medium 23 = FR4 | |
ba030c0e | 484 | |
5f91c9e8 | 485 | // mother volume |
486 | GReal_t par[3]; | |
487 | par[0] = dimensions.X(); | |
488 | par[1] = dimensions.Y(); | |
489 | par[2] = TotalHzPlane(); | |
62c708bf | 490 | gMC->Gsvolu(PlaneSegmentName(segNumber).Data(),"BOX",idAir,par,3); |
5f91c9e8 | 491 | |
492 | // foam layer | |
5f91c9e8 | 493 | par[0] = dimensions.X(); |
494 | par[1] = dimensions.Y(); | |
495 | par[2] = fgkHzFoam; | |
62c708bf | 496 | gMC->Gsvolu(FoamBoxName(segNumber).Data(),"BOX",idFoam,par,3); |
497 | GReal_t posX,posY,posZ; | |
5f91c9e8 | 498 | posX=0.; |
499 | posY=0.; | |
500 | posZ = -TotalHzPlane() + fgkHzFoam; | |
62c708bf | 501 | gMC->Gspos(FoamBoxName(segNumber).Data(),1, |
502 | PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY"); | |
ba030c0e | 503 | |
5f91c9e8 | 504 | // mechanical plane FR4 layer |
5f91c9e8 | 505 | par[0] = dimensions.X(); |
506 | par[1] = dimensions.Y(); | |
507 | par[2] = fgkHzFR4; | |
62c708bf | 508 | gMC->Gsvolu(FR4BoxName(segNumber).Data(),"BOX",idFR4,par,3); |
5f91c9e8 | 509 | posX=0.; |
510 | posY=0.; | |
511 | posZ = -TotalHzPlane()+ 2.*fgkHzFoam + fgkHzFR4; | |
62c708bf | 512 | gMC->Gspos(FR4BoxName(segNumber).Data(),1, |
513 | PlaneSegmentName(segNumber).Data(),posX,posY,posZ,0,"ONLY"); | |
5f91c9e8 | 514 | } |
ba030c0e | 515 | |
5f91c9e8 | 516 | //______________________________________________________________________________ |
62c708bf | 517 | void AliMUONSt1GeometryBuilderV2::CreatePlaneSegment(Int_t segNumber, |
518 | const TVector2& dimensions, | |
519 | Int_t nofHoles) | |
5f91c9e8 | 520 | { |
5398f946 | 521 | /// Create a segment of a plane (this includes a foam layer, |
522 | /// holes in the foam to feed the kaptons through, kapton connectors | |
523 | /// and the mother board.) | |
ba030c0e | 524 | |
62c708bf | 525 | CreateFoamBox(segNumber,dimensions); |
fdbaed6e | 526 | |
527 | // Place spacer in the concrete plane segments: | |
528 | // S225 (in S025), S267 (in S067) in chamber1 and S309 (in S109). S351(in S151) | |
529 | // in chamber2 | |
530 | // The segments were found as those which caused overlaps when we placed | |
531 | // the spacer in global coordinates via PlaceSpacer0 | |
532 | // | |
533 | // <posXYZ X_Y_Z=" 12.6000; 0.75000; 0.0000"> <volume name="Spacer5A"/> | |
534 | // <posXYZ X_Y_Z=" 12.6000; -0.75000; 0.0000"> <volume name="Spacer5A"/> | |
535 | // <posXYZ X_Y_Z=" 12.6000; 0.0000; 1.1515"> <volume name="Spacer6"/> | |
536 | // <posXYZ X_Y_Z=" 12.6000; 0.0000; 0.0000"> <volume name="Spacer7A"/> | |
537 | ||
538 | if ( FoamBoxName(segNumber) == "S225" || | |
539 | FoamBoxName(segNumber) == "S267" || | |
540 | FoamBoxName(segNumber) == "S309" || | |
541 | FoamBoxName(segNumber) == "S351" ) | |
542 | { | |
5ae5869b | 543 | GReal_t posX = 12.6; |
544 | GReal_t posY = 0.75; | |
545 | GReal_t posZ = -0.1; | |
546 | if ( FoamBoxName(segNumber) == "S267" || | |
547 | FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP; | |
fdbaed6e | 548 | gMC->Gspos("Spacer5A", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY"); |
549 | ||
550 | posY = -0.75; | |
5ae5869b | 551 | if ( FoamBoxName(segNumber) == "S267" || |
552 | FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP; | |
fdbaed6e | 553 | gMC->Gspos("Spacer5A", 2, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY"); |
554 | ||
555 | posY = 0.0; | |
556 | posZ = 1.1515; | |
557 | if ( FoamBoxName(segNumber) == "S267" || | |
5ae5869b | 558 | FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP; |
fdbaed6e | 559 | gMC->Gspos("Spacer6", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY"); |
560 | ||
561 | posY = 0.0; | |
562 | posZ = 0.0; | |
5ae5869b | 563 | if ( FoamBoxName(segNumber) == "S267" || |
564 | FoamBoxName(segNumber) == "S351" ) posY += fgkPadYOffsetBP; | |
fdbaed6e | 565 | gMC->Gspos("Spacer7A", 1, FoamBoxName(segNumber).Data(), posX, posY, posZ,0, "ONLY"); |
566 | } | |
ba030c0e | 567 | |
5f91c9e8 | 568 | for (Int_t holeNum=0;holeNum<nofHoles;holeNum++) { |
569 | GReal_t posX = ((2.*holeNum+1.)/nofHoles-1.)*dimensions.X(); | |
570 | GReal_t posY = 0.; | |
571 | GReal_t posZ = 0.; | |
5ae5869b | 572 | |
62c708bf | 573 | gMC->Gspos(fgkHoleName,holeNum+1, |
574 | FoamBoxName(segNumber).Data(),posX,posY,posZ,0,"ONLY"); | |
5f91c9e8 | 575 | } |
576 | } | |
ba030c0e | 577 | |
5ae5869b | 578 | //______________________________________________________________________________ |
579 | void AliMUONSt1GeometryBuilderV2::CreateQuadrantLayersAsVolumes(Int_t chamber) | |
580 | { | |
581 | /// Create the three main layers as real volumes. | |
582 | /// Not used anymore. | |
583 | ||
584 | // tracking medias | |
585 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; | |
586 | Int_t idAir = idtmed[1100]; // medium 1 | |
587 | ||
588 | Float_t par[11]; | |
589 | Float_t posX,posY,posZ; | |
590 | ||
591 | // Quadrant volume TUBS1, positioned at the end | |
592 | par[0] = fgkMotherIR1; | |
593 | par[1] = fgkMotherOR1; | |
594 | par[2] = fgkMotherThick1; | |
595 | par[3] = fgkMotherPhiL1; | |
596 | par[4] = fgkMotherPhiU1; | |
597 | gMC->Gsvolu(QuadrantMLayerName(chamber),"TUBS",idAir,par,5); | |
598 | // gMC->Gsvolu(QuadrantMFLayerName(chamber),"TUBS",idAir,par,5); | |
599 | ||
600 | // Replace the volume shape with a composite shape | |
601 | // with substracted overlap with beam shield (YMOT) | |
602 | ||
603 | if ( gMC->IsRootGeometrySupported() ) { | |
604 | ||
605 | // Get shape | |
606 | TGeoVolume* mlayer | |
607 | = gGeoManager->FindVolumeFast(QuadrantMLayerName(chamber)); | |
608 | if ( !mlayer ) { | |
609 | AliErrorStream() | |
610 | << "Quadrant volume " << QuadrantMLayerName(chamber) << " not found" | |
611 | << endl; | |
612 | } | |
613 | else { | |
614 | TGeoShape* quadrant = mlayer->GetShape(); | |
615 | quadrant->SetName("quadrant"); | |
616 | ||
617 | // Beam shield recess | |
618 | par[0] = 0; | |
619 | par[1] = 15.4; | |
620 | par[2] = fgkMotherThick1; | |
621 | new TGeoTube("shield_tube", par[0], par[1], par[2]); | |
622 | ||
623 | // Displacement | |
624 | posX = 2.6; | |
625 | posY = 2.6; | |
626 | posZ = 0; | |
627 | TGeoTranslation* displacement | |
628 | = new TGeoTranslation("TR", posX, posY, posZ); | |
629 | displacement->RegisterYourself(); | |
630 | ||
631 | // Composite shape | |
632 | TGeoShape* composite | |
633 | = new TGeoCompositeShape("composite", "quadrant-shield_tube:TR"); | |
634 | ||
635 | // Reset shape to volume | |
636 | mlayer->SetShape(composite); | |
637 | } | |
638 | ||
639 | TGeoVolume* malayer | |
640 | = gGeoManager->FindVolumeFast(QuadrantMFLayerName(chamber)); | |
641 | if ( !malayer ) { | |
642 | AliErrorStream() | |
643 | << "Quadrant volume " << QuadrantMFLayerName(chamber) << " not found" | |
644 | << endl; | |
645 | } | |
646 | else { | |
647 | TGeoShape* quadrant = malayer->GetShape(); | |
648 | quadrant->SetName("quadrant"); | |
649 | ||
650 | // Beam shield recess | |
651 | par[0] = 0; | |
652 | par[1] = 15.4; | |
653 | par[2] = fgkMotherThick1; | |
654 | new TGeoTube("shield_tube", par[0], par[1], par[2]); | |
655 | ||
656 | // Displacement | |
657 | posX = 2.6; | |
658 | posY = 2.6; | |
659 | posZ = 0; | |
660 | TGeoTranslation* displacement | |
661 | = new TGeoTranslation("TR", posX, posY, posZ); | |
662 | displacement->RegisterYourself(); | |
663 | ||
664 | // Composite shape | |
665 | TGeoShape* composite | |
666 | = new TGeoCompositeShape("composite", "quadrant-shield_tube:TR"); | |
667 | ||
668 | // Reset shape to volume | |
669 | malayer->SetShape(composite); | |
670 | } | |
671 | } | |
672 | ||
673 | // Quadrant volume TUBS2, positioned at the end | |
674 | par[0] = fgkMotherIR2; | |
675 | par[1] = fgkMotherOR2; | |
676 | par[2] = fgkMotherThick2; | |
677 | par[3] = fgkMotherPhiL2; | |
678 | par[4] = fgkMotherPhiU2; | |
679 | ||
680 | gMC->Gsvolu(QuadrantNLayerName(chamber),"TUBS",idAir,par,5); | |
681 | gMC->Gsvolu(QuadrantFLayerName(chamber),"TUBS",idAir,par,5); | |
682 | } | |
683 | ||
684 | //______________________________________________________________________________ | |
685 | void AliMUONSt1GeometryBuilderV2::CreateQuadrantLayersAsAssemblies(Int_t chamber) | |
686 | { | |
687 | /// Create the three main layers as assemblies | |
688 | ||
689 | gGeoManager->MakeVolumeAssembly(QuadrantMLayerName(chamber).Data()); | |
690 | gGeoManager->MakeVolumeAssembly(QuadrantMFLayerName(chamber).Data()); | |
691 | gGeoManager->MakeVolumeAssembly(QuadrantNLayerName(chamber).Data()); | |
692 | gGeoManager->MakeVolumeAssembly(QuadrantFLayerName(chamber).Data()); | |
693 | } | |
694 | ||
5f91c9e8 | 695 | //______________________________________________________________________________ |
d1cd2474 | 696 | void AliMUONSt1GeometryBuilderV2::CreateFrame(Int_t chamber) |
5f91c9e8 | 697 | { |
5398f946 | 698 | /// Create the non-sensitive elements of the frame for the \a chamber |
699 | /// | |
700 | /// Model and notation: \n | |
701 | /// \n | |
702 | /// The Quadrant volume name starts with SQ \n | |
703 | /// The volume segments are numbered 00 to XX \n | |
704 | /// \n | |
705 | /// OutTopFrame \n | |
706 | /// (SQ02-16) \n | |
707 | /// ------------ \n | |
708 | /// OutEdgeFrame / | \n | |
709 | /// (SQ17-24) / | InVFrame (SQ00-01) \n | |
710 | /// / | \n | |
711 | /// | | \n | |
712 | /// OutVFrame | _- - \n | |
713 | /// (SQ25-39) | | InArcFrame (SQ42-45) \n | |
714 | /// | | \n | |
715 | /// ------------- \n | |
716 | /// InHFrame (SQ40-41) \n | |
717 | /// \n | |
718 | /// \n | |
719 | /// 06 February 2003 - Overlapping volumes resolved. \n | |
720 | /// One quarter chamber is comprised of three TUBS volumes: SQMx, SQNx, and SQFx, | |
721 | /// where SQMx is the Quadrant Middle layer for chamber \a chamber ( posZ in [-3.25,3.25]), | |
722 | /// SQNx is the Quadrant Near side layer for chamber \a chamber ( posZ in [-6.25,3-.25) ), and | |
723 | /// SQFx is the Quadrant Far side layer for chamber \a chamber ( posZ in (3.25,6.25] ). | |
ba030c0e | 724 | |
5ae5869b | 725 | // TString quadrantMLayerName = QuadrantMLayerName(chamber); |
726 | ||
727 | TString quadrantMLayerName = QuadrantMFLayerName(chamber); | |
728 | TString quadrantNLayerName = QuadrantNLayerName(chamber); | |
729 | TString quadrantFLayerName = QuadrantFLayerName(chamber); | |
730 | ||
d1cd2474 | 731 | const Float_t kNearFarLHC=2.4; // Near and Far TUBS Origin wrt LHC Origin |
ba030c0e | 732 | |
ba030c0e | 733 | // tracking medias |
d1cd2474 | 734 | Int_t* idtmed = fMUON->GetIdtmed()->GetArray()-1099; |
5f91c9e8 | 735 | |
5ae5869b | 736 | //Int_t idAir = idtmed[1100]; // medium 1 |
d1cd2474 | 737 | //Int_t idFrameEpoxy = idtmed[1115]; // medium 16 = Frame Epoxy ME730 |
738 | //Int_t idInox = idtmed[1116]; // medium 17 Stainless Steel (18%Cr,9%Ni,Fe) | |
739 | //Int_t idFR4 = idtmed[1110]; // medium 11 FR4 | |
740 | //Int_t idCopper = idtmed[1109]; // medium 10 Copper | |
741 | //Int_t idAlu = idtmed[1103]; // medium 4 Aluminium | |
742 | Int_t idFrameEpoxy = idtmed[1123]; // medium 24 = Frame Epoxy ME730 // was 20 not 16 | |
743 | Int_t idInox = idtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) // was 21 not 17 | |
744 | Int_t idFR4 = idtmed[1122]; // medium 23 FR4 // was 15 not 11 | |
745 | Int_t idCopper = idtmed[1121]; // medium 22 Copper | |
746 | Int_t idAlu = idtmed[1120]; // medium 21 Aluminium | |
5f91c9e8 | 747 | |
748 | ||
0ab920eb | 749 | TGeoMedium* kMedEpoxy = gGeoManager->GetMedium("MUON_FrameCH$"); |
750 | TGeoMedium* kMedInox = gGeoManager->GetMedium("MUON_Kapton"); | |
751 | TGeoMedium* kMedAlu = gGeoManager->GetMedium("MUON_ALU_II$"); | |
752 | ||
753 | ||
5f91c9e8 | 754 | // Rotation Matrices |
0ab920eb | 755 | Int_t rot1, rot2, rot3, rot4; |
5f91c9e8 | 756 | |
757 | // Rotation matrices | |
d1cd2474 | 758 | fMUON->AliMatrix(rot1, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane |
759 | fMUON->AliMatrix(rot2, 90., 45., 90., 135., 0., 0.); // +45 deg in x-y plane | |
760 | Content-type: text/html ]>