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