]>
Commit | Line | Data |
---|---|---|
b705c75b | 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 | ||
16 | //************************************************************************* | |
17 | // This class Defines the Geometry for the ITS Upgrade using TGeo | |
18 | // This is a work class used to study different configurations | |
19 | // during the development of the new ITS structure. | |
20 | // | |
21 | // Mario Sitta <sitta@to.infn.it> | |
22 | // Chinorat Kobdaj (kobdaj@g.sut.ac.th) | |
23 | //************************************************************************* | |
24 | ||
25 | ||
26 | /* $Id: AliITSUv1Layer.cxx */ | |
27 | // General Root includes | |
28 | #include <TMath.h> | |
29 | // Root Geometry includes | |
30 | //#include <AliLog.h> | |
31 | #include <TGeoManager.h> | |
32 | #include <TGeoVolume.h> | |
33 | #include <TGeoPcon.h> | |
34 | #include <TGeoCone.h> | |
35 | #include <TGeoTube.h> // contaings TGeoTubeSeg | |
36 | #include <TGeoArb8.h> | |
37 | #include <TGeoXtru.h> | |
38 | #include <TGeoCompositeShape.h> | |
39 | #include <TGeoMatrix.h> | |
40 | #include "AliITSUv1Layer.h" | |
41 | #include "AliITSUGeomTGeo.h" | |
42 | #include <TGeoBBox.h> | |
43 | #include <TGeoShape.h> | |
44 | #include <TGeoTrd1.h> | |
45 | using namespace TMath; | |
46 | ||
c55b10c2 | 47 | // General Parameters |
48 | const Int_t AliITSUv1Layer::fgkNumberOfInnerLayers = 3; | |
49 | ||
1fc6eff6 | 50 | const Double_t AliITSUv1Layer::fgkDefaultSensorThick = 18*fgkmicron; |
51 | const Double_t AliITSUv1Layer::fgkDefaultChipThick = 50*fgkmicron; | |
c55b10c2 | 52 | |
53 | // Inner Barrel Parameters | |
54 | const Int_t AliITSUv1Layer::fgkIBChipsPerRow = 9; | |
55 | const Int_t AliITSUv1Layer::fgkIBNChipRows = 1; | |
56 | ||
019dc90c | 57 | const Double_t AliITSUv1Layer::fgkIBFlexCableAlThick = 50.0 *fgkmicron; |
58 | const Double_t AliITSUv1Layer::fgkIBFlexCableKapThick = 125.0 *fgkmicron; | |
59 | const Double_t AliITSUv1Layer::fgkIBGlueThick = 100.0 *fgkmicron; | |
60 | const Double_t AliITSUv1Layer::fgkIBCarbonFleeceThick = 20.0 *fgkmicron; | |
61 | const Double_t AliITSUv1Layer::fgkIBCarbonPaperThick = 30.0 *fgkmicron; | |
62 | const Double_t AliITSUv1Layer::fgkIBK13D2UThick = 70.0 *fgkmicron; | |
63 | const Double_t AliITSUv1Layer::fgkIBCoolPipeInnerD = 1.024*fgkmm; | |
64 | const Double_t AliITSUv1Layer::fgkIBCoolPipeThick = 25.4 *fgkmicron; | |
65 | const Double_t AliITSUv1Layer::fgkIBCoolPipeXDist = 5.0 *fgkmm; | |
66 | const Double_t AliITSUv1Layer::fgkIBTopVertexWidth = 0.072*fgkcm; | |
67 | const Double_t AliITSUv1Layer::fgkIBTopVertexHeight = 0.04 *fgkcm; | |
68 | const Double_t AliITSUv1Layer::fgkIBSideVertexWidth = 0.052*fgkcm; | |
69 | const Double_t AliITSUv1Layer::fgkIBSideVertexHeight = 0.11 *fgkcm; | |
70 | const Double_t AliITSUv1Layer::fgkIBTopFilamentLength = 0.844*fgkcm; | |
71 | const Double_t AliITSUv1Layer::fgkIBTopFilamentSide = 0.02 *fgkcm; | |
72 | const Double_t AliITSUv1Layer::fgkIBTopFilamentAlpha = 57.0; // Deg | |
73 | ||
74 | const Double_t AliITSUv1Layer::fgkIBStaveHeight = 0.283*fgkcm; | |
75 | ||
c55b10c2 | 76 | // Outer Barrel Parameters |
77 | const Int_t AliITSUv1Layer::fgkOBChipsPerRow = 7; | |
78 | const Int_t AliITSUv1Layer::fgkOBNChipRows = 2; | |
79 | ||
80 | const Double_t AliITSUv1Layer::fgkOBHalfStaveWidth = 3.01 *fgkcm; | |
81 | const Double_t AliITSUv1Layer::fgkOBModuleWidth = fgkOBHalfStaveWidth; | |
82 | const Double_t AliITSUv1Layer::fgkOBModuleGap = 0.01 *fgkcm; | |
83 | const Double_t AliITSUv1Layer::fgkOBChipXGap = 0.01 *fgkcm; | |
84 | const Double_t AliITSUv1Layer::fgkOBChipZGap = 0.01 *fgkcm; | |
85 | const Double_t AliITSUv1Layer::fgkOBFlexCableAlThick = 0.005*fgkcm; | |
1fc6eff6 | 86 | const Double_t AliITSUv1Layer::fgkOBFlexCableCuThick = 0.004*fgkcm; |
f1496ca7 | 87 | const Double_t AliITSUv1Layer::fgkOBFlexCableKapThick1= 0.01 *fgkcm; |
88 | const Double_t AliITSUv1Layer::fgkOBFlexCableKapThick = 125.0 *fgkmicron; | |
c55b10c2 | 89 | const Double_t AliITSUv1Layer::fgkOBBusCableAlThick = 0.02 *fgkcm; |
90 | const Double_t AliITSUv1Layer::fgkOBBusCableKapThick = 0.02 *fgkcm; | |
91 | const Double_t AliITSUv1Layer::fgkOBColdPlateThick = 0.012*fgkcm; | |
92 | const Double_t AliITSUv1Layer::fgkOBCarbonPlateThick = 0.012*fgkcm; | |
1fc6eff6 | 93 | const Double_t AliITSUv1Layer::fgkOBGlueThickM1 = 0.03 *fgkcm; |
94 | const Double_t AliITSUv1Layer::fgkOBGlueThick = 0.01 *fgkcm; | |
c55b10c2 | 95 | const Double_t AliITSUv1Layer::fgkOBModuleZLength = 21.06 *fgkcm; |
94fc91be | 96 | const Double_t AliITSUv1Layer::fgkOBHalfStaveYPos = 2.067*fgkcm; |
c55b10c2 | 97 | const Double_t AliITSUv1Layer::fgkOBHalfStaveYTrans = 1.76 *fgkmm; |
65740b7a | 98 | const Double_t AliITSUv1Layer::fgkOBHalfStaveXOverlap = 4.3 *fgkmm; |
c55b10c2 | 99 | const Double_t AliITSUv1Layer::fgkOBGraphiteFoilThick = 30.0 *fgkmicron; |
1fc6eff6 | 100 | const Double_t AliITSUv1Layer::fgkOBCarbonFleeceThick = 20.0 *fgkmicron; |
101 | const Double_t AliITSUv1Layer::fgkOBCoolTubeInnerDM1 = 2.052*fgkmm; | |
102 | const Double_t AliITSUv1Layer::fgkOBCoolTubeInnerD = 2.05 *fgkmm; | |
d7ef241e | 103 | const Double_t AliITSUv1Layer::fgkOBCoolTubeThick = 32.0 *fgkmicron; |
c55b10c2 | 104 | const Double_t AliITSUv1Layer::fgkOBCoolTubeXDist = 11.1 *fgkmm; |
105 | ||
94fc91be | 106 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameZLen[2] = { 900.0*fgkmm, |
107 | 1526.0*fgkmm}; | |
108 | const Int_t AliITSUv1Layer::fgkOBSpaceFrameNUnits[2]= { 23, 39}; | |
109 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameUnitLen = 39.1 *fgkmm; | |
110 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameWidth = 42.44 *fgkmm; | |
5402be00 | 111 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameHeight = 36.45 *fgkmm; |
94fc91be | 112 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameTopVL = 4.0 *fgkmm; |
113 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameTopVH = 0.35 *fgkmm; | |
114 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameSideVL = 4.5 *fgkmm; | |
115 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameSideVH = 0.35 *fgkmm; | |
116 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameVAlpha = 60.0; // deg | |
117 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameVBeta = 68.0; // deg | |
118 | const Double_t AliITSUv1Layer::fgkOBSFrameBaseRibDiam = 1.33 *fgkmm; | |
119 | const Double_t AliITSUv1Layer::fgkOBSFrameBaseRibPhi = 54.0; // deg | |
120 | const Double_t AliITSUv1Layer::fgkOBSFrameSideRibDiam = 1.25 *fgkmm; | |
121 | const Double_t AliITSUv1Layer::fgkOBSFrameSideRibPhi = 70.0; // deg | |
5402be00 | 122 | const Double_t AliITSUv1Layer::fgkOBSFrameULegLen = 14.2 *fgkmm; |
123 | const Double_t AliITSUv1Layer::fgkOBSFrameULegWidth = 1.5 *fgkmm; | |
124 | const Double_t AliITSUv1Layer::fgkOBSFrameULegHeight1 = 2.7 *fgkmm; | |
125 | const Double_t AliITSUv1Layer::fgkOBSFrameULegHeight2 = 5.0 *fgkmm; | |
126 | const Double_t AliITSUv1Layer::fgkOBSFrameULegThick = 0.3 *fgkmm; | |
127 | const Double_t AliITSUv1Layer::fgkOBSFrameULegXPos = 12.9 *fgkmm; | |
b705c75b | 128 | |
129 | ||
130 | ClassImp(AliITSUv1Layer) | |
131 | ||
132 | #define SQ(A) (A)*(A) | |
133 | ||
134 | //________________________________________________________________________ | |
135 | AliITSUv1Layer::AliITSUv1Layer(): | |
136 | AliITSv11Geometry(), | |
137 | fLayerNumber(0), | |
138 | fPhi0(0), | |
139 | fLayRadius(0), | |
140 | fZLength(0), | |
141 | fSensorThick(0), | |
1fc6eff6 | 142 | fChipThick(0), |
852af72e | 143 | fStaveWidth(0), |
144 | fStaveTilt(0), | |
145 | fNStaves(0), | |
c55b10c2 | 146 | fNModules(0), |
852af72e | 147 | fNChips(0), |
148 | fChipTypeID(0), | |
b705c75b | 149 | fIsTurbo(0), |
150 | fBuildLevel(0), | |
151 | fStaveModel(AliITSUv1::kIBModelDummy) | |
152 | { | |
153 | // | |
154 | // Standard constructor | |
c55b10c2 | 155 | for (int i=kNHLevels;i--;) fHierarchy[i] = 0; |
b705c75b | 156 | // |
157 | } | |
158 | ||
159 | //________________________________________________________________________ | |
160 | AliITSUv1Layer::AliITSUv1Layer(Int_t debug): | |
161 | AliITSv11Geometry(debug), | |
162 | fLayerNumber(0), | |
163 | fPhi0(0), | |
164 | fLayRadius(0), | |
165 | fZLength(0), | |
166 | fSensorThick(0), | |
1fc6eff6 | 167 | fChipThick(0), |
852af72e | 168 | fStaveWidth(0), |
169 | fStaveTilt(0), | |
170 | fNStaves(0), | |
c55b10c2 | 171 | fNModules(0), |
852af72e | 172 | fNChips(0), |
173 | fChipTypeID(0), | |
b705c75b | 174 | fIsTurbo(0), |
175 | fBuildLevel(0), | |
176 | fStaveModel(AliITSUv1::kIBModelDummy) | |
177 | { | |
178 | // | |
179 | // Constructor setting debugging level | |
c55b10c2 | 180 | for (int i=kNHLevels;i--;) fHierarchy[i] = 0; |
b705c75b | 181 | // |
182 | } | |
183 | ||
184 | //________________________________________________________________________ | |
185 | AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Int_t debug): | |
186 | AliITSv11Geometry(debug), | |
187 | fLayerNumber(lay), | |
188 | fPhi0(0), | |
189 | fLayRadius(0), | |
190 | fZLength(0), | |
191 | fSensorThick(0), | |
1fc6eff6 | 192 | fChipThick(0), |
852af72e | 193 | fStaveWidth(0), |
194 | fStaveTilt(0), | |
195 | fNStaves(0), | |
c55b10c2 | 196 | fNModules(0), |
852af72e | 197 | fNChips(0), |
198 | fChipTypeID(0), | |
b705c75b | 199 | fIsTurbo(0), |
200 | fBuildLevel(0), | |
201 | fStaveModel(AliITSUv1::kIBModelDummy) | |
202 | { | |
203 | // | |
204 | // Constructor setting layer number and debugging level | |
c55b10c2 | 205 | for (int i=kNHLevels;i--;) fHierarchy[i] = 0; |
b705c75b | 206 | // |
207 | } | |
208 | ||
209 | //________________________________________________________________________ | |
210 | AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Bool_t turbo, Int_t debug): | |
211 | AliITSv11Geometry(debug), | |
212 | fLayerNumber(lay), | |
213 | fPhi0(0), | |
214 | fLayRadius(0), | |
215 | fZLength(0), | |
216 | fSensorThick(0), | |
1fc6eff6 | 217 | fChipThick(0), |
852af72e | 218 | fStaveWidth(0), |
219 | fStaveTilt(0), | |
220 | fNStaves(0), | |
c55b10c2 | 221 | fNModules(0), |
852af72e | 222 | fNChips(0), |
223 | fChipTypeID(0), | |
b705c75b | 224 | fIsTurbo(turbo), |
225 | fBuildLevel(0), | |
226 | fStaveModel(AliITSUv1::kIBModelDummy) | |
227 | { | |
228 | // | |
229 | // Constructor setting layer number and debugging level | |
852af72e | 230 | // for a "turbo" layer (i.e. where staves overlap in phi) |
c55b10c2 | 231 | for (int i=kNHLevels;i--;) fHierarchy[i] = 0; |
b705c75b | 232 | // |
233 | } | |
234 | ||
235 | //________________________________________________________________________ | |
236 | AliITSUv1Layer::AliITSUv1Layer(const AliITSUv1Layer &s): | |
237 | AliITSv11Geometry(s.GetDebug()), | |
238 | fLayerNumber(s.fLayerNumber), | |
239 | fPhi0(s.fPhi0), | |
240 | fLayRadius(s.fLayRadius), | |
241 | fZLength(s.fZLength), | |
242 | fSensorThick(s.fSensorThick), | |
1fc6eff6 | 243 | fChipThick(s.fChipThick), |
852af72e | 244 | fStaveWidth(s.fStaveWidth), |
245 | fStaveTilt(s.fStaveTilt), | |
246 | fNStaves(s.fNStaves), | |
c55b10c2 | 247 | fNModules(s.fNModules), |
852af72e | 248 | fNChips(s.fNChips), |
249 | fChipTypeID(s.fChipTypeID), | |
b705c75b | 250 | fIsTurbo(s.fIsTurbo), |
251 | fBuildLevel(s.fBuildLevel), | |
252 | fStaveModel(s.fStaveModel) | |
253 | { | |
254 | // | |
255 | // Copy constructor | |
c55b10c2 | 256 | for (int i=kNHLevels;i--;) fHierarchy[i] = s.fHierarchy[i]; |
b705c75b | 257 | // |
258 | } | |
259 | ||
260 | //________________________________________________________________________ | |
261 | AliITSUv1Layer& AliITSUv1Layer::operator=(const AliITSUv1Layer &s) | |
262 | { | |
263 | // | |
264 | // Assignment operator | |
265 | // | |
266 | if(&s == this) return *this; | |
267 | ||
268 | fLayerNumber = s.fLayerNumber; | |
269 | fPhi0 = s.fPhi0; | |
270 | fLayRadius = s.fLayRadius; | |
271 | fZLength = s.fZLength; | |
272 | fSensorThick = s.fSensorThick; | |
1fc6eff6 | 273 | fChipThick = s.fChipThick; |
c55b10c2 | 274 | fStaveWidth = s.fStaveWidth; |
275 | fStaveTilt = s.fStaveTilt; | |
276 | fNStaves = s.fNStaves; | |
277 | fNModules = s.fNModules; | |
278 | fNChips = s.fNChips; | |
b705c75b | 279 | fIsTurbo = s.fIsTurbo; |
c55b10c2 | 280 | fChipTypeID = s.fChipTypeID; |
b705c75b | 281 | fBuildLevel = s.fBuildLevel; |
282 | fStaveModel = s.fStaveModel; | |
c55b10c2 | 283 | for (int i=kNHLevels;i--;) fHierarchy[i] = s.fHierarchy[i]; |
284 | // | |
b705c75b | 285 | return *this; |
286 | } | |
287 | ||
288 | //________________________________________________________________________ | |
289 | AliITSUv1Layer::~AliITSUv1Layer() { | |
290 | // | |
291 | // Destructor | |
292 | // | |
293 | } | |
294 | ||
295 | //________________________________________________________________________ | |
296 | void AliITSUv1Layer::CreateLayer(TGeoVolume *moth){ | |
297 | // | |
298 | // Creates the actual Layer and places inside its mother volume | |
299 | // | |
300 | // Input: | |
301 | // moth : the TGeoVolume owing the volume structure | |
302 | // | |
303 | // Output: | |
304 | // | |
305 | // Return: | |
306 | // | |
307 | // Created: 17 Jun 2011 Mario Sitta | |
308 | // Updated: 08 Jul 2011 Mario Sitta | |
309 | // Updated: 20 May 2013 Mario Sitta Layer is Assembly instead of Tube | |
310 | // | |
311 | // Local variables | |
312 | char volname[30]; | |
313 | Double_t xpos, ypos, zpos; | |
314 | Double_t alpha; | |
315 | ||
316 | ||
317 | // Check if the user set the proper parameters | |
c55b10c2 | 318 | if (fLayRadius<= 0) AliFatal(Form("Wrong layer radius (%f)",fLayRadius)); |
319 | if (fZLength <= 0) AliFatal(Form("Wrong layer length (%f)",fZLength)); | |
852af72e | 320 | if (fNStaves <= 0) AliFatal(Form("Wrong number of staves (%d)",fNStaves)); |
c55b10c2 | 321 | if (fNChips <= 0) AliFatal(Form("Wrong number of chips (%d)",fNChips)); |
322 | ||
323 | if (fLayerNumber >= fgkNumberOfInnerLayers && fNModules <= 0) | |
324 | AliFatal(Form("Wrong number of modules (%d)",fNModules)); | |
b705c75b | 325 | |
1fc6eff6 | 326 | if (fChipThick <= 0) { |
327 | AliInfo(Form("Chip thickness wrong or not set (%f), using default (%f)", | |
328 | fChipThick,fgkDefaultChipThick)); | |
329 | fChipThick = fgkDefaultChipThick; | |
b705c75b | 330 | } |
331 | ||
332 | if (fSensorThick <= 0) { | |
333 | AliInfo(Form("Sensor thickness wrong or not set (%f), using default (%f)", | |
334 | fSensorThick,fgkDefaultSensorThick)); | |
335 | fSensorThick = fgkDefaultSensorThick; | |
336 | } | |
337 | ||
1fc6eff6 | 338 | if (fSensorThick > fChipThick) { |
339 | AliWarning(Form("Sensor thickness (%f) is greater than chip thickness (%f), fixing", | |
340 | fSensorThick,fChipThick)); | |
341 | fSensorThick = fChipThick; | |
b705c75b | 342 | } |
343 | ||
344 | ||
345 | // If a Turbo layer is requested, do it and exit | |
346 | if (fIsTurbo) { | |
347 | CreateLayerTurbo(moth); | |
348 | return; | |
349 | } | |
350 | ||
351 | ||
852af72e | 352 | // First create the stave container |
353 | alpha = (360./(2*fNStaves))*DegToRad(); | |
b705c75b | 354 | |
852af72e | 355 | // fStaveWidth = fLayRadius*Tan(alpha); |
b705c75b | 356 | |
357 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(),fLayerNumber); | |
358 | TGeoVolume *layVol = new TGeoVolumeAssembly(volname); | |
1fc6eff6 | 359 | layVol->SetTitle( |
360 | Form("Model %d Build level %d",(Int_t)fStaveModel,fBuildLevel)); | |
852af72e | 361 | layVol->SetUniqueID(fChipTypeID); |
b705c75b | 362 | |
363 | // layVol->SetVisibility(kFALSE); | |
364 | layVol->SetVisibility(kTRUE); | |
365 | layVol->SetLineColor(1); | |
366 | ||
852af72e | 367 | TGeoVolume *stavVol = CreateStave(); |
b705c75b | 368 | |
369 | ||
370 | // Now build up the layer | |
852af72e | 371 | alpha = 360./fNStaves; |
65740b7a | 372 | Double_t r = fLayRadius + ((TGeoBBox*)stavVol->GetShape())->GetDY(); |
852af72e | 373 | for (Int_t j=0; j<fNStaves; j++) { |
b705c75b | 374 | Double_t phi = j*alpha + fPhi0; |
375 | xpos = r*CosD(phi);// r*SinD(-phi); | |
376 | ypos = r*SinD(phi);// r*CosD(-phi); | |
377 | zpos = 0.; | |
378 | phi += 90; | |
852af72e | 379 | layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos, |
b705c75b | 380 | new TGeoRotation("",phi,0,0))); |
381 | } | |
382 | ||
383 | ||
384 | // Finally put everything in the mother volume | |
385 | moth->AddNode(layVol, 1, 0); | |
386 | ||
387 | ||
388 | // Upgrade geometry is served | |
389 | return; | |
390 | } | |
391 | ||
392 | //________________________________________________________________________ | |
393 | void AliITSUv1Layer::CreateLayerTurbo(TGeoVolume *moth){ | |
394 | // | |
395 | // Creates the actual Layer and places inside its mother volume | |
852af72e | 396 | // A so-called "turbo" layer is a layer where staves overlap in phi |
b705c75b | 397 | // User can set width and tilt angle, no check is performed here |
398 | // to avoid volume overlaps | |
399 | // | |
400 | // Input: | |
401 | // moth : the TGeoVolume owing the volume structure | |
402 | // | |
403 | // Output: | |
404 | // | |
405 | // Return: | |
406 | // | |
407 | // Created: 08 Jul 2011 Mario Sitta | |
408 | // Updated: 08 Mar 2012 Mario Sitta Correct way to compute container R | |
409 | // Updated: 20 May 2013 Mario Sitta Layer is Assemgbly instead of Tube | |
410 | // | |
411 | ||
412 | ||
413 | // Local variables | |
414 | char volname[30]; | |
415 | Double_t xpos, ypos, zpos; | |
416 | Double_t alpha; | |
417 | ||
418 | ||
419 | // Check if the user set the proper (remaining) parameters | |
852af72e | 420 | if (fStaveWidth <= 0) |
421 | AliFatal(Form("Wrong stave width (%f)",fStaveWidth)); | |
422 | if (Abs(fStaveTilt) > 45) | |
423 | AliWarning(Form("Stave tilt angle (%f) greater than 45deg",fStaveTilt)); | |
b705c75b | 424 | |
425 | ||
426 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(), fLayerNumber); | |
427 | TGeoVolume *layVol = new TGeoVolumeAssembly(volname); | |
1fc6eff6 | 428 | layVol->SetTitle( |
429 | Form("Model %d Build level %d",(Int_t)fStaveModel,fBuildLevel)); | |
852af72e | 430 | layVol->SetUniqueID(fChipTypeID); |
b705c75b | 431 | layVol->SetVisibility(kTRUE); |
432 | layVol->SetLineColor(1); | |
852af72e | 433 | TGeoVolume *stavVol = CreateStave(); |
b705c75b | 434 | |
435 | ||
436 | // Now build up the layer | |
852af72e | 437 | alpha = 360./fNStaves; |
438 | Double_t r = fLayRadius /* +chip thick ?! */; | |
439 | for (Int_t j=0; j<fNStaves; j++) { | |
b705c75b | 440 | Double_t phi = j*alpha + fPhi0; |
441 | xpos = r*CosD(phi);// r*SinD(-phi); | |
442 | ypos = r*SinD(phi);// r*CosD(-phi); | |
443 | zpos = 0.; | |
444 | phi += 90; | |
852af72e | 445 | layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos, |
446 | new TGeoRotation("", phi-fStaveTilt,0,0))); | |
b705c75b | 447 | } |
448 | ||
449 | ||
450 | // Finally put everything in the mother volume | |
451 | moth->AddNode(layVol, 1, 0); | |
452 | ||
453 | return; | |
454 | } | |
455 | ||
456 | //________________________________________________________________________ | |
852af72e | 457 | TGeoVolume* AliITSUv1Layer::CreateStave(const TGeoManager * /*mgr*/){ |
b705c75b | 458 | // |
852af72e | 459 | // Creates the actual Stave |
b705c75b | 460 | // |
461 | // Input: | |
462 | // mgr : the GeoManager (used only to get the proper material) | |
463 | // | |
464 | // Output: | |
465 | // | |
466 | // Return: | |
467 | // | |
468 | // Created: 22 Jun 2011 Mario Sitta | |
469 | // Updated: 18 Dec 2013 Mario Sitta Handle IB and OB | |
94fc91be | 470 | // Updated: 12 Jan 2015 Mario Sitta Fix overlap with new OB space frame |
471 | // (by moving the latter, not the sensors to avoid | |
472 | // spoiling their position in space) | |
b705c75b | 473 | // |
474 | ||
475 | char volname[30]; | |
b705c75b | 476 | |
2b9468b2 | 477 | Double_t xlen, ylen, zlen; |
478 | Double_t xpos, ypos; | |
b705c75b | 479 | Double_t alpha; |
480 | ||
481 | ||
482 | // First create all needed shapes | |
852af72e | 483 | alpha = (360./(2*fNStaves))*DegToRad(); |
b705c75b | 484 | |
852af72e | 485 | // The stave |
2b9468b2 | 486 | xlen = fLayRadius*Tan(alpha); |
487 | if (fIsTurbo) xlen = 0.5*fStaveWidth; | |
1fc6eff6 | 488 | ylen = 0.5*fChipThick; |
b705c75b | 489 | zlen = 0.5*fZLength; |
490 | ||
491 | Double_t yplus = 0.46; | |
852af72e | 492 | TGeoXtru *stave = new TGeoXtru(2); //z sections |
2b9468b2 | 493 | Double_t xv[5] = {xlen,xlen,0,-xlen,-xlen}; |
b705c75b | 494 | Double_t yv[5] = {ylen+0.09,-0.15,-yplus-fSensorThick,-0.15,ylen+0.09}; |
852af72e | 495 | stave->DefinePolygon(5,xv,yv); |
496 | stave->DefineSection(0,-zlen,0,0,1.); | |
497 | stave->DefineSection(1,+zlen,0,0,1.); | |
b705c75b | 498 | |
499 | // We have all shapes: now create the real volumes | |
500 | ||
852af72e | 501 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); |
c55b10c2 | 502 | // TGeoVolume *staveVol = new TGeoVolume(volname, stave, medAir); |
503 | TGeoVolume *staveVol = new TGeoVolumeAssembly(volname); | |
b705c75b | 504 | |
c55b10c2 | 505 | // staveVol->SetVisibility(kFALSE); |
506 | staveVol->SetVisibility(kTRUE); | |
507 | staveVol->SetLineColor(2); | |
c55b10c2 | 508 | TGeoVolume *mechStaveVol = 0; |
b705c75b | 509 | |
852af72e | 510 | // Now build up the stave |
c55b10c2 | 511 | if (fLayerNumber < fgkNumberOfInnerLayers) { |
2b9468b2 | 512 | TGeoVolume *modVol = CreateStaveInnerB(xlen,ylen,zlen); |
513 | staveVol->AddNode(modVol, 0); | |
c55b10c2 | 514 | fHierarchy[kHalfStave] = 1; |
b705c75b | 515 | |
2b9468b2 | 516 | // Mechanical stave structure |
517 | mechStaveVol = CreateStaveStructInnerB(xlen,zlen); | |
06a9bd15 | 518 | if (mechStaveVol) { |
019dc90c | 519 | ypos = ((TGeoBBox*)(modVol->GetShape()))->GetDY(); |
520 | if (fStaveModel != AliITSUv1::kIBModel4) | |
521 | ypos += ((TGeoBBox*)(mechStaveVol->GetShape()))->GetDY(); | |
06a9bd15 | 522 | staveVol->AddNode(mechStaveVol, 1, new TGeoCombiTrans(0, -ypos, 0, new TGeoRotation("",0, 0, 180))); |
523 | } | |
b705c75b | 524 | } |
525 | ||
526 | else{ | |
2b9468b2 | 527 | TGeoVolume *hstaveVol = CreateStaveOuterB(); |
b705c75b | 528 | if (fStaveModel == AliITSUv1::kOBModel0) { // Create simplified stave struct as in v0 |
2b9468b2 | 529 | staveVol->AddNode(hstaveVol, 0); |
530 | fHierarchy[kHalfStave] = 1; | |
b705c75b | 531 | } else { // (if fStaveModel) Create new stave struct as in TDR |
2b9468b2 | 532 | xpos = ((TGeoBBox*)(hstaveVol->GetShape()))->GetDX() |
c55b10c2 | 533 | - fgkOBHalfStaveXOverlap/2; |
94fc91be | 534 | // ypos is now a parameter to avoid HS displacement wrt nominal radii |
535 | ypos = fgkOBHalfStaveYPos; | |
2b9468b2 | 536 | staveVol->AddNode(hstaveVol, 0, new TGeoTranslation(-xpos, ypos, 0)); |
537 | staveVol->AddNode(hstaveVol, 1, new TGeoTranslation( xpos, ypos+fgkOBHalfStaveYTrans, 0)); | |
c55b10c2 | 538 | fHierarchy[kHalfStave] = 2; // RS |
2b9468b2 | 539 | mechStaveVol = CreateSpaceFrameOuterB(); |
94fc91be | 540 | if (mechStaveVol) { |
c55b10c2 | 541 | staveVol->AddNode(mechStaveVol, 1, |
5402be00 | 542 | new TGeoCombiTrans(0, -fgkOBSFrameULegHeight1, 0, |
c55b10c2 | 543 | new TGeoRotation("", 180, 0, 0))); |
94fc91be | 544 | } |
b705c75b | 545 | } // if (fStaveModel) |
546 | } | |
547 | ||
548 | ||
852af72e | 549 | // Done, return the stave |
c55b10c2 | 550 | return staveVol; |
551 | } | |
552 | ||
553 | //________________________________________________________________________ | |
554 | TGeoVolume* AliITSUv1Layer::CreateStaveInnerB(const Double_t xsta, | |
555 | const Double_t ysta, | |
556 | const Double_t zsta, | |
557 | const TGeoManager *mgr){ | |
558 | // | |
559 | // Create the chip stave for the Inner Barrel | |
560 | // (Here we fake the halfstave volume to have the same | |
561 | // formal geometry hierarchy as for the Outer Barrel) | |
562 | // | |
563 | // Input: | |
2b9468b2 | 564 | // xsta, ysta, zsta : X, Y, Z stave half lengths |
c55b10c2 | 565 | // mgr : the GeoManager (used only to get the proper material) |
566 | // | |
567 | // Output: | |
568 | // | |
569 | // Return: | |
570 | // | |
571 | // Created: 06 Mar 2014 Mario Sitta | |
572 | // | |
573 | ||
574 | // Local variables | |
575 | Double_t xmod, ymod, zmod; | |
576 | char volname[30]; | |
577 | ||
578 | // First we create the module (i.e. the HIC with 9 chips) | |
579 | TGeoVolume *moduleVol = CreateModuleInnerB(xsta, ysta, zsta); | |
580 | ||
581 | // Then we create the fake halfstave and the actual stave | |
582 | xmod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDX(); | |
583 | ymod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDY(); | |
584 | zmod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDZ(); | |
585 | ||
586 | TGeoBBox *hstave = new TGeoBBox(xmod, ymod, zmod); | |
587 | ||
588 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
589 | ||
590 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber); | |
591 | TGeoVolume *hstaveVol = new TGeoVolume(volname, hstave, medAir); | |
592 | ||
593 | ||
594 | // Finally build it up | |
595 | hstaveVol->AddNode(moduleVol, 0); | |
596 | fHierarchy[kModule] = 1; | |
597 | ||
598 | // Done, return the stave structure | |
599 | return hstaveVol; | |
600 | } | |
601 | ||
602 | //________________________________________________________________________ | |
603 | TGeoVolume* AliITSUv1Layer::CreateModuleInnerB(Double_t xmod, | |
604 | Double_t ymod, | |
605 | Double_t zmod, | |
606 | const TGeoManager *mgr){ | |
607 | // | |
608 | // Creates the IB Module: (only the chips for the time being) | |
609 | // | |
610 | // Input: | |
2b9468b2 | 611 | // xmod, ymod, zmod : X, Y, Z module half lengths |
c55b10c2 | 612 | // mgr : the GeoManager (used only to get the proper material) |
613 | // | |
614 | // Output: | |
615 | // | |
616 | // Return: | |
617 | // the module as a TGeoVolume | |
618 | // | |
619 | // Created: 06 Mar 2014 M. Sitta | |
620 | // | |
621 | ||
2b9468b2 | 622 | Double_t zchip; |
d2a3dfa2 | 623 | Double_t zpos; |
c55b10c2 | 624 | char volname[30]; |
625 | ||
626 | // First create the single chip | |
2b9468b2 | 627 | zchip = zmod/fgkIBChipsPerRow; |
628 | TGeoVolume *chipVol = CreateChipInnerB(xmod, ymod, zchip); | |
c55b10c2 | 629 | |
630 | // Then create the module and populate it with the chips | |
631 | TGeoBBox *module = new TGeoBBox(xmod, ymod, zmod); | |
632 | ||
633 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
634 | ||
635 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber); | |
636 | TGeoVolume *modVol = new TGeoVolume(volname, module, medAir); | |
637 | ||
d2a3dfa2 | 638 | // mm (not used) zlen = ((TGeoBBox*)chipVol->GetShape())->GetDZ(); |
c55b10c2 | 639 | for (Int_t j=0; j<fgkIBChipsPerRow; j++) { |
2b9468b2 | 640 | zpos = -zmod + j*2*zchip + zchip; |
641 | modVol->AddNode(chipVol, j, new TGeoTranslation(0, 0, zpos)); | |
c55b10c2 | 642 | fHierarchy[kChip]++; |
643 | } | |
644 | ||
645 | // Done, return the module | |
646 | return modVol; | |
b705c75b | 647 | } |
648 | ||
649 | //________________________________________________________________________ | |
852af72e | 650 | TGeoVolume* AliITSUv1Layer::CreateStaveStructInnerB(const Double_t xsta, |
651 | const Double_t zsta, | |
b705c75b | 652 | const TGeoManager *mgr){ |
653 | // | |
654 | // Create the mechanical stave structure | |
655 | // | |
656 | // Input: | |
852af72e | 657 | // xsta : X length |
658 | // zsta : Z length | |
b705c75b | 659 | // mgr : the GeoManager (used only to get the proper material) |
660 | // | |
661 | // Output: | |
662 | // | |
663 | // Return: | |
664 | // | |
665 | // Created: 22 Mar 2013 Chinorat Kobdaj | |
666 | // Updated: 26 Apr 2013 Mario Sitta | |
667 | // | |
668 | ||
852af72e | 669 | TGeoVolume *mechStavVol = 0; |
b705c75b | 670 | |
671 | switch (fStaveModel) { | |
672 | case AliITSUv1::kIBModelDummy: | |
852af72e | 673 | mechStavVol = CreateStaveModelInnerBDummy(xsta,zsta,mgr); |
b705c75b | 674 | break; |
675 | case AliITSUv1::kIBModel0: | |
852af72e | 676 | mechStavVol = CreateStaveModelInnerB0(xsta,zsta,mgr); |
b705c75b | 677 | break; |
678 | case AliITSUv1::kIBModel1: | |
852af72e | 679 | mechStavVol = CreateStaveModelInnerB1(xsta,zsta,mgr); |
b705c75b | 680 | break; |
681 | case AliITSUv1::kIBModel21: | |
852af72e | 682 | mechStavVol = CreateStaveModelInnerB21(xsta,zsta,mgr); |
b705c75b | 683 | break; |
684 | case AliITSUv1::kIBModel22: | |
852af72e | 685 | mechStavVol = CreateStaveModelInnerB22(xsta,zsta,mgr); |
b705c75b | 686 | break; |
687 | case AliITSUv1::kIBModel3: | |
852af72e | 688 | mechStavVol = CreateStaveModelInnerB3(xsta,zsta,mgr); |
b705c75b | 689 | break; |
019dc90c | 690 | case AliITSUv1::kIBModel4: |
691 | mechStavVol = CreateStaveModelInnerB4(xsta,zsta,mgr); | |
692 | break; | |
b705c75b | 693 | default: |
694 | AliFatal(Form("Unknown stave model %d",fStaveModel)); | |
695 | break; | |
696 | } | |
697 | ||
852af72e | 698 | return mechStavVol; |
b705c75b | 699 | } |
700 | ||
701 | ||
702 | //________________________________________________________________________ | |
703 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerBDummy(const Double_t , | |
704 | const Double_t , | |
705 | const TGeoManager *) const { | |
706 | // | |
707 | // Create dummy stave | |
708 | // | |
709 | // Input: | |
852af72e | 710 | // xsta : X length |
711 | // zsta : Z length | |
b705c75b | 712 | // mgr : the GeoManager (used only to get the proper material) |
713 | // | |
714 | // Output: | |
715 | // | |
716 | // Return: | |
717 | // | |
718 | // Created: 22 Mar 2013 Chinorat Kobdaj | |
719 | // Updated: 26 Apr 2013 Mario Sitta | |
720 | // | |
721 | ||
722 | // Done, return the stave structur | |
723 | return 0; | |
724 | } | |
725 | ||
726 | //________________________________________________________________________ | |
852af72e | 727 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xsta, |
728 | const Double_t zsta, | |
b705c75b | 729 | const TGeoManager *mgr){ |
730 | // | |
731 | // Create the mechanical stave structure for Model 0 of TDR | |
732 | // | |
733 | // Input: | |
852af72e | 734 | // xsta : X length |
735 | // zsta : Z length | |
b705c75b | 736 | // mgr : the GeoManager (used only to get the proper material) |
737 | // | |
738 | // Output: | |
739 | // | |
740 | // Return: | |
741 | // | |
742 | // Created: 22 Mar 2013 Chinorat Kobdaj | |
743 | // Updated: 26 Apr 2013 Mario Sitta | |
744 | // | |
745 | ||
746 | // Materials defined in AliITSUv1 | |
747 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
748 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); | |
749 | ||
750 | TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$"); | |
751 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); | |
752 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
753 | TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$"); | |
754 | ||
755 | // Local parameters | |
756 | Double_t kConeOutRadius = 0.15/2; | |
757 | Double_t kConeInRadius = 0.1430/2; | |
852af72e | 758 | Double_t kStaveLength = zsta*2; |
759 | Double_t kStaveWidth = xsta*2-kConeOutRadius*2; | |
b705c75b | 760 | Double_t kWidth = kStaveWidth/4;//1/2 of kWidth |
761 | Double_t kStaveHeight = 0.3; | |
762 | Double_t kHeight = kStaveHeight/2; | |
763 | Double_t kAlpha = 90-67;//90-33.69; | |
764 | Double_t kTheta = kAlpha*TMath::DegToRad(); | |
765 | Double_t kS1 = kWidth/TMath::Sin(kTheta); | |
766 | Double_t kL1 = kWidth/TMath::Tan(kTheta); | |
767 | Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2); | |
768 | Double_t kThe2 = TMath::ATan(kHeight/kS1); | |
769 | Double_t kBeta = kThe2*TMath::RadToDeg(); | |
770 | // Int_t loop = kStaveLength/(kL1); | |
771 | // Double_t s3 = kWidth/(2*TMath::Sin(kTheta)); | |
772 | // Double_t s4 = 3*kWidth/(2*TMath::Sin(kTheta)); | |
773 | ||
774 | AliDebug(1, Form("BuildLevel %d\n",fBuildLevel)); | |
775 | ||
776 | char volname[30]; | |
852af72e | 777 | snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); |
b705c75b | 778 | |
779 | Double_t z=0, y=-0.011+0.0150, x=0; | |
780 | ||
852af72e | 781 | TGeoVolume *mechStavVol = 0; |
b705c75b | 782 | |
783 | if (fBuildLevel < 5) { | |
784 | ||
785 | // world (trapezoid) | |
786 | TGeoXtru *mechStruct = new TGeoXtru(2); //z sections | |
787 | Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1}; | |
788 | Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07}; | |
789 | mechStruct->DefinePolygon(5,xv,yv); | |
790 | mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.); | |
791 | mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.); | |
792 | ||
852af72e | 793 | mechStavVol = new TGeoVolume(volname, mechStruct, medAir); |
794 | mechStavVol->SetLineColor(12); | |
795 | mechStavVol->SetFillColor(12); | |
796 | mechStavVol->SetVisibility(kTRUE); | |
b705c75b | 797 | |
798 | // detailed structure ++++++++++++++ | |
799 | //Pipe Kapton grey-35 | |
800 | TGeoTube *coolTube = new TGeoTube(kConeInRadius,kConeOutRadius,kStaveLength/2); | |
801 | TGeoVolume *volCoolTube= new TGeoVolume("pipe", coolTube, medKapton); | |
802 | volCoolTube->SetFillColor(35); | |
803 | volCoolTube->SetLineColor(35); | |
852af72e | 804 | mechStavVol->AddNode(volCoolTube,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0)); |
805 | mechStavVol->AddNode(volCoolTube,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0)); | |
b705c75b | 806 | } |
807 | ||
808 | if (fBuildLevel < 4) { | |
809 | TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength/2); | |
810 | TGeoVolume *volCoolTubeW= new TGeoVolume("pipeWater", coolTubeW, medWater); | |
811 | volCoolTubeW->SetFillColor(4); | |
812 | volCoolTubeW->SetLineColor(4); | |
852af72e | 813 | mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0)); |
814 | mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0)); | |
b705c75b | 815 | } |
816 | ||
817 | //frequency of filament | |
818 | //n = 4 means very dense(4 filaments per interval) | |
819 | //n = 2 means dense(2 filaments per interval) | |
820 | Int_t n =4; | |
821 | Int_t loop = (Int_t)(kStaveLength/(4*kL1/n) + 2/n)-1; | |
822 | if (fBuildLevel < 3) { | |
823 | //Top CFRP Filament black-12 Carbon structure TGeoBBox (length,thickness,width) | |
824 | TGeoBBox *t2=new TGeoBBox(kS2,0.007/2,0.15/2);//(kS2,0.002,0.02); | |
825 | TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K); | |
826 | volT2->SetLineColor(12); | |
827 | volT2->SetFillColor(12); | |
828 | ||
829 | for(int i=1;i<loop;i++){ //i<60;i++){ | |
852af72e | 830 | mechStavVol->AddNode(volT2,4*i+0, |
b705c75b | 831 | new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1), |
832 | new TGeoRotation("volT2",90,90-kAlpha,90-kBeta))); | |
852af72e | 833 | mechStavVol->AddNode(volT2,4*i+1, |
b705c75b | 834 | new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1), |
835 | new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta))); | |
852af72e | 836 | mechStavVol->AddNode(volT2,4*i+2, |
b705c75b | 837 | new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1), |
838 | new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta))); | |
852af72e | 839 | mechStavVol->AddNode(volT2,4*i+3, |
b705c75b | 840 | new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1), |
841 | new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta))); | |
842 | } | |
843 | ||
844 | ||
845 | //Bottom CFRP Filament black-12 Carbon structure TGeoBBox (thickness,width,length) | |
846 | TGeoBBox *t1=new TGeoBBox(0.007/2,0.15/2,kS1);//(0.002,0.02,kS1); | |
847 | TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K); | |
848 | volT1->SetLineColor(12); | |
849 | volT1->SetFillColor(12); | |
850 | ||
851 | for(int i=1;i<loop;i++){ | |
852af72e | 852 | mechStavVol->AddNode(volT1,4*i+0, |
b705c75b | 853 | new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1), |
854 | new TGeoRotation("volT1",-90,kAlpha,0))); | |
852af72e | 855 | mechStavVol->AddNode(volT1,4*i+1, |
b705c75b | 856 | new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1), |
857 | new TGeoRotation("volT1",90,kAlpha,0))); | |
852af72e | 858 | mechStavVol->AddNode(volT1,4*i+2, |
b705c75b | 859 | new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1), |
860 | new TGeoRotation("volT1",-90,-kAlpha,0))); | |
852af72e | 861 | mechStavVol->AddNode(volT1,4*i+3, |
b705c75b | 862 | new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1), |
863 | new TGeoRotation("volT1",-90,+kAlpha,0))); | |
864 | } | |
865 | } | |
866 | ||
867 | if (fBuildLevel < 2) { | |
868 | // Glue CFRP-Silicon layers TGeoBBox(thickness,width,kS1); | |
869 | TGeoBBox *tG=new TGeoBBox(0.0075/2,0.18/2,kS1); | |
870 | TGeoVolume *volTG=new TGeoVolume("Glue1", tG, medGlue); | |
871 | volTG->SetLineColor(5); | |
872 | volTG->SetFillColor(5); | |
873 | ||
874 | for(int i=1;i<loop;i++){ //i<60;i++){ | |
852af72e | 875 | mechStavVol->AddNode(volTG,4*i+0, |
b705c75b | 876 | new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i), |
877 | new TGeoRotation("volTG",-90,kAlpha,0))); | |
852af72e | 878 | mechStavVol->AddNode(volTG,4*i+1, |
b705c75b | 879 | new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i), |
880 | new TGeoRotation("volTG",90,kAlpha,0))); | |
852af72e | 881 | mechStavVol->AddNode(volTG,4*i+2, |
b705c75b | 882 | new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*i*kL1)+kS1/2, //z-14.25+(i*2*kL1), |
883 | new TGeoRotation("volTG",-90,-kAlpha,0))); | |
852af72e | 884 | mechStavVol->AddNode(volTG,4*i+3, |
b705c75b | 885 | new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1), |
886 | new TGeoRotation("volTG",-90,+kAlpha,0))); | |
887 | } | |
888 | ||
852af72e | 889 | TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta); |
b705c75b | 890 | TGeoVolume *volGlue=new TGeoVolume("Glue2", glue, medGlue); |
891 | volGlue->SetLineColor(5); | |
892 | volGlue->SetFillColor(5); | |
852af72e | 893 | //mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0))); |
894 | mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0))); | |
b705c75b | 895 | } |
896 | ||
897 | if (fBuildLevel < 1) { | |
898 | //Flex cable brown-28 TGeoBBox(width,thickness,length); | |
852af72e | 899 | TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta); |
b705c75b | 900 | TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable); |
901 | volCable->SetLineColor(28); | |
902 | volCable->SetFillColor(28); | |
852af72e | 903 | mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 904 | } |
905 | ||
906 | // Done, return the stave structur | |
852af72e | 907 | return mechStavVol; |
b705c75b | 908 | } |
909 | ||
910 | ||
911 | //________________________________________________________________________ | |
852af72e | 912 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xsta, |
913 | const Double_t zsta, | |
b705c75b | 914 | const TGeoManager *mgr){ |
915 | // | |
916 | // Create the mechanical stave structure for Model 1 of TDR | |
917 | // | |
918 | // Input: | |
852af72e | 919 | // xsta : X length |
920 | // zsta : Z length | |
b705c75b | 921 | // mgr : the GeoManager (used only to get the proper material) |
922 | // | |
923 | // Output: | |
924 | // | |
925 | // Return: | |
926 | // | |
927 | // Created: 22 Mar 2013 Chinorat Kobdaj | |
928 | // Updated: 26 Apr 2013 Mario Sitta | |
929 | // | |
930 | ||
931 | // Materials defined in AliITSUv1 | |
932 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
933 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); | |
934 | ||
935 | TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$"); | |
936 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); | |
937 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
938 | TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$"); | |
939 | ||
940 | // Local parameters | |
941 | Double_t kConeOutRadius = 0.15/2; | |
942 | // Double_t kConeInRadius = 0.1430/2; | |
852af72e | 943 | Double_t kStaveLength = zsta*2; |
944 | // Double_t kStaveWidth = xsta*2-kConeOutRadius*2; | |
945 | Double_t kStaveWidth = xsta*2; | |
b705c75b | 946 | Double_t kWidth = kStaveWidth/4;//1/2 of kWidth |
947 | Double_t kStaveHeight = 0.3; | |
948 | Double_t kHeight = kStaveHeight/2; | |
949 | Double_t kAlpha = 90-33.;//90-30; | |
950 | Double_t kTheta = kAlpha*TMath::DegToRad(); | |
951 | Double_t kS1 = kWidth/TMath::Sin(kTheta); | |
952 | Double_t kL1 = kWidth/TMath::Tan(kTheta); | |
953 | Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2); | |
954 | Double_t kThe2 = TMath::ATan(kHeight/kS1); | |
955 | Double_t kBeta = kThe2*TMath::RadToDeg(); | |
956 | Int_t loop = (Int_t)((kStaveLength/(2*kL1))/2); | |
957 | ||
958 | ||
852af72e | 959 | TGeoVolume *mechStavVol = 0; |
b705c75b | 960 | |
961 | char volname[30]; | |
852af72e | 962 | snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); |
b705c75b | 963 | |
964 | ||
965 | // detailed structure ++++++++++++++ | |
966 | Double_t z=0, y=-0.011+0.0150, x=0; | |
967 | ||
968 | // Polimide micro channels numbers | |
969 | Double_t yMC = y-kHeight+0.01; | |
970 | Int_t nb = (Int_t)(kStaveWidth/0.1)+1; | |
852af72e | 971 | Double_t xstaMC = (nb*0.1-0.08)/2; |
b705c75b | 972 | |
973 | ||
974 | if (fBuildLevel < 5) { | |
975 | // world (trapezoid) | |
976 | TGeoXtru *mechStruct = new TGeoXtru(2); //z sections | |
977 | Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1}; | |
978 | Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07}; | |
979 | mechStruct->DefinePolygon(5,xv,yv); | |
980 | mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.); | |
981 | mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.); | |
982 | ||
852af72e | 983 | mechStavVol = new TGeoVolume(volname, mechStruct, medAir); |
984 | mechStavVol->SetLineColor(12); | |
985 | mechStavVol->SetFillColor(12); | |
986 | mechStavVol->SetVisibility(kTRUE); | |
b705c75b | 987 | |
988 | // Polimide micro channels numbers | |
852af72e | 989 | TGeoBBox *tM0=new TGeoBBox(xstaMC, 0.005/2, zsta); |
b705c75b | 990 | TGeoVolume *volTM0=new TGeoVolume("MicroChanCover", tM0, medKapton); |
991 | volTM0->SetLineColor(35); | |
992 | volTM0->SetFillColor(35); | |
852af72e | 993 | mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x,-0.0125+yMC, z, new TGeoRotation("",0, 0, 0))); |
994 | mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x,+0.0125+yMC, z, new TGeoRotation("",0, 0, 0))); | |
b705c75b | 995 | |
852af72e | 996 | TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta); |
b705c75b | 997 | TGeoVolume *volTM0b=new TGeoVolume("MicroChanWalls", tM0b, medKapton); |
998 | volTM0b->SetLineColor(35); | |
999 | volTM0b->SetFillColor(35); | |
1000 | for (Int_t ib=0;ib<nb;ib++) { | |
852af72e | 1001 | mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1002 | } |
1003 | ||
1004 | } | |
1005 | ||
1006 | if (fBuildLevel < 4) { | |
1007 | // Water in Polimide micro channels | |
852af72e | 1008 | TGeoBBox *water=new TGeoBBox(0.08/2, 0.02/2, zsta+0.1); |
b705c75b | 1009 | TGeoVolume *volWater=new TGeoVolume("Water", water, medWater); |
1010 | volWater->SetLineColor(4); | |
1011 | volWater->SetFillColor(4); | |
1012 | for (Int_t ib=0;ib<(nb-1);ib++) { | |
852af72e | 1013 | mechStavVol->AddNode(volWater, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.06,yMC, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1014 | } |
1015 | } | |
1016 | ||
1017 | if (fBuildLevel < 3) { | |
1018 | //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length) | |
1019 | Double_t filWidth = 0.04; | |
1020 | Double_t filHeight= 0.02; | |
1021 | TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,kS1); | |
1022 | TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K); | |
1023 | volT1->SetLineColor(12); | |
1024 | volT1->SetFillColor(12); | |
1025 | for(int i=0;i<loop;i++){//i<30;i++){ | |
852af72e | 1026 | mechStavVol->AddNode(volT1,4*i+0, |
b705c75b | 1027 | new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1)+kS1/2, |
1028 | new TGeoRotation("volT1",-90,kAlpha,0))); | |
852af72e | 1029 | mechStavVol->AddNode(volT1,4*i+1, |
b705c75b | 1030 | new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1*i)+kS1/2, |
1031 | new TGeoRotation("volT1",90,kAlpha,0))); | |
852af72e | 1032 | mechStavVol->AddNode(volT1,4*i+2, |
b705c75b | 1033 | new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, |
1034 | new TGeoRotation("volT1",-90,-kAlpha,0))); | |
852af72e | 1035 | mechStavVol->AddNode(volT1,4*i+3, |
b705c75b | 1036 | new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, |
1037 | new TGeoRotation("volT1",-90,+kAlpha,0))); | |
1038 | } | |
1039 | ||
1040 | // Top filament CFRP black-12 Carbon structure TGeoBBox (length,thickness,width) | |
1041 | TGeoBBox *t2=new TGeoBBox(kS2,filHeight/2,filWidth/2); | |
1042 | TGeoVolume *volT2=new TGeoVolume("CFRPTop", t2, medM60J3K); | |
1043 | volT2->SetLineColor(12); | |
1044 | volT2->SetFillColor(12); | |
1045 | for(int i=0;i<loop;i++){ //i<30;i++){ | |
852af72e | 1046 | mechStavVol->AddNode(volT2,4*i+0, |
b705c75b | 1047 | new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2, |
1048 | new TGeoRotation("volT2",90,90-kAlpha,90-kBeta))); | |
852af72e | 1049 | mechStavVol->AddNode(volT2,4*i+1, |
b705c75b | 1050 | new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2, |
1051 | new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta))); | |
852af72e | 1052 | mechStavVol->AddNode(volT2,4*i+2, |
b705c75b | 1053 | new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, |
1054 | new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta))); | |
852af72e | 1055 | mechStavVol->AddNode(volT2,4*i+3, |
b705c75b | 1056 | new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, |
1057 | new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta))); | |
1058 | } | |
1059 | } | |
1060 | ||
1061 | if (fBuildLevel < 2) { | |
1062 | // Glue between filament and polimide micro channel | |
1063 | TGeoBBox *t3=new TGeoBBox(0.01/2,0.04,kS1); | |
1064 | TGeoVolume *volT3=new TGeoVolume("FilamentGlue", t3, medGlue); | |
1065 | volT3->SetLineColor(5); | |
1066 | volT3->SetFillColor(5); | |
1067 | for(int i=0;i<loop;i++){//i<30;i++){ | |
852af72e | 1068 | mechStavVol->AddNode(volT3,4*i+0, |
b705c75b | 1069 | new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2, |
1070 | new TGeoRotation("volT1",-90,kAlpha,0))); | |
852af72e | 1071 | mechStavVol->AddNode(volT3,4*i+1, |
b705c75b | 1072 | new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2, |
1073 | new TGeoRotation("volT1",90,kAlpha,0))); | |
852af72e | 1074 | mechStavVol->AddNode(volT3,4*i+2, |
b705c75b | 1075 | new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, |
1076 | new TGeoRotation("volT1",-90,-kAlpha,0))); | |
852af72e | 1077 | mechStavVol->AddNode(volT3,4*i+3, |
b705c75b | 1078 | new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, |
1079 | new TGeoRotation("volT1",-90,+kAlpha,0))); | |
1080 | } | |
1081 | ||
1082 | // Glue microchannel and sensor | |
852af72e | 1083 | TGeoBBox *glueM = new TGeoBBox(xsta, 0.01/2, zsta); |
b705c75b | 1084 | TGeoVolume *volGlueM=new TGeoVolume("MicroChanGlue", glueM, medGlue); |
1085 | volGlueM->SetLineColor(5); | |
1086 | volGlueM->SetFillColor(5); | |
852af72e | 1087 | mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1088 | |
1089 | // Glue sensor and kapton | |
852af72e | 1090 | TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta); |
b705c75b | 1091 | TGeoVolume *volGlue=new TGeoVolume("SensorGlue", glue, medGlue); |
1092 | volGlue->SetLineColor(5); | |
1093 | volGlue->SetFillColor(5); | |
852af72e | 1094 | mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1095 | } |
1096 | ||
1097 | if (fBuildLevel < 1) { | |
852af72e | 1098 | TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta); |
b705c75b | 1099 | TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable); |
1100 | volCable->SetLineColor(28); | |
1101 | volCable->SetFillColor(28); | |
852af72e | 1102 | mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1103 | } |
1104 | ||
1105 | // Done, return the stave structur | |
852af72e | 1106 | return mechStavVol; |
b705c75b | 1107 | |
1108 | } | |
1109 | ||
1110 | //________________________________________________________________________ | |
852af72e | 1111 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xsta, |
1112 | const Double_t zsta, | |
b705c75b | 1113 | const TGeoManager *mgr){ |
1114 | // | |
1115 | // Create the mechanical stave structure for Model 2.1 of TDR | |
1116 | // | |
1117 | // Input: | |
852af72e | 1118 | // xsta : X length |
1119 | // zsta : Z length | |
b705c75b | 1120 | // mgr : the GeoManager (used only to get the proper material) |
1121 | // | |
1122 | // Output: | |
1123 | // | |
1124 | // Return: | |
1125 | // | |
1126 | // Created: 22 Mar 2013 Chinorat Kobdaj | |
1127 | // Updated: 26 Apr 2013 Mario Sitta | |
1128 | // | |
1129 | ||
1130 | // Materials defined in AliITSUv1 | |
1131 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
1132 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); | |
1133 | ||
1134 | TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$"); | |
1135 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); | |
1136 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
1137 | TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$"); | |
1138 | TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$"); | |
1139 | TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); | |
1140 | TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$"); | |
1141 | ||
1142 | // Local parameters | |
1143 | Double_t kConeOutRadius =0.151384/2; | |
1144 | Double_t kConeInRadius = 0.145034/2; | |
852af72e | 1145 | Double_t kStaveLength = zsta; |
1146 | Double_t kStaveWidth = xsta*2; | |
b705c75b | 1147 | Double_t kWidth = (kStaveWidth+0.005)/4; |
1148 | Double_t kStaveHeigth = 0.33;//0.33; | |
1149 | Double_t kHeight = (kStaveHeigth+0.025)/2; | |
1150 | Double_t kAlpha = 57; //56.31; | |
1151 | Double_t kTheta = kAlpha*TMath::DegToRad(); | |
1152 | Double_t kS1 = (kStaveWidth/4)/TMath::Sin(kTheta); | |
1153 | Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta); | |
1154 | Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2); | |
1155 | Double_t kThe2 = TMath::ATan(kHeight/kS1); | |
1156 | Double_t kBeta = kThe2*TMath::RadToDeg(); | |
1157 | // Double_t lay1 = 0.003157; | |
1158 | Double_t kLay1 = 0.003;//Amec carbon | |
1159 | // Double_t lay2 = 0.0043215;//C Fleece carbon | |
1160 | Double_t kLay2 = 0.002;//C Fleece carbon | |
1161 | Double_t kLay3 = 0.007;//K13D2U carbon | |
1162 | Int_t loop = (Int_t)(kStaveLength/(2*kL1)); | |
1163 | ||
1164 | ||
1165 | char volname[30]; | |
852af72e | 1166 | snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); |
b705c75b | 1167 | |
1168 | Double_t z=0, y=-(kConeOutRadius+0.03)+0.0385, x=0; | |
1169 | ||
852af72e | 1170 | TGeoVolume *mechStavVol = 0; |
b705c75b | 1171 | |
1172 | if (fBuildLevel < 5) { | |
1173 | // world (trapezoid) | |
1174 | TGeoXtru *mechStruct = new TGeoXtru(2); //z sections | |
1175 | Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1}; | |
1176 | Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeigth,0,-kConeOutRadius*2-0.07}; | |
1177 | mechStruct->DefinePolygon(5,xv,yv); | |
1178 | mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.); | |
1179 | mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.); | |
1180 | ||
852af72e | 1181 | mechStavVol = new TGeoVolume(volname, mechStruct, medAir); |
1182 | mechStavVol->SetLineColor(12); | |
1183 | mechStavVol->SetFillColor(12); | |
1184 | mechStavVol->SetVisibility(kTRUE); | |
b705c75b | 1185 | |
1186 | //Pipe Kapton grey-35 | |
1187 | TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius,kConeInRadius,kConeOutRadius); | |
1188 | TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton); | |
1189 | volCone1->SetFillColor(35); | |
1190 | volCone1->SetLineColor(35); | |
852af72e | 1191 | mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z)); |
1192 | mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z)); | |
b705c75b | 1193 | } |
1194 | ||
1195 | if (fBuildLevel < 4) { | |
1196 | ||
1197 | TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength); | |
1198 | TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater); | |
1199 | volCoolTubeW->SetFillColor(4); | |
1200 | volCoolTubeW->SetLineColor(4); | |
852af72e | 1201 | mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z)); |
1202 | mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z)); | |
b705c75b | 1203 | } |
1204 | ||
1205 | if (fBuildLevel < 3) { | |
1206 | //top fillament | |
1207 | // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width) | |
1208 | TGeoBBox *t2=new TGeoBBox(kS2,0.02/2,0.04/2); //TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02); | |
1209 | TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K); | |
1210 | volT2->SetLineColor(12); | |
1211 | volT2->SetFillColor(12); | |
1212 | for(int i=0;i<loop;i++){// i<28;i++){ | |
852af72e | 1213 | mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta))); |
1214 | mechStavVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta))); | |
1215 | mechStavVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta))); | |
1216 | mechStavVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta))); | |
1217 | // mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight-(0.12/2)+0.072,z+kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta))); | |
b705c75b | 1218 | |
1219 | } | |
1220 | ||
1221 | //wall side structure out | |
1222 | TGeoBBox *box4 = new TGeoBBox(0.03/2,0.12/2,kStaveLength-0.50); | |
1223 | TGeoVolume *plate4 = new TGeoVolume("WallOut",box4,medM60J3K); | |
1224 | plate4->SetFillColor(35); | |
1225 | plate4->SetLineColor(35); | |
852af72e | 1226 | mechStavVol->AddNode(plate4,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0))); |
1227 | mechStavVol->AddNode(plate4,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0))); | |
b705c75b | 1228 | //wall side in |
1229 | TGeoBBox *box5 = new TGeoBBox(0.015/2,0.12/2,kStaveLength-0.50); | |
1230 | TGeoVolume *plate5 = new TGeoVolume("WallIn",box5,medM60J3K); | |
1231 | plate5->SetFillColor(12); | |
1232 | plate5->SetLineColor(12); | |
852af72e | 1233 | mechStavVol->AddNode(plate5,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-0.03-0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0))); |
1234 | mechStavVol->AddNode(plate5,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+0.03+0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0))); | |
b705c75b | 1235 | |
1236 | //Amec Thermasol red-2 cover tube FGS300 | |
1237 | TGeoConeSeg *cons1 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius,kConeOutRadius+kLay1,kConeOutRadius,kConeOutRadius+kLay1,0,180); | |
1238 | TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003); | |
1239 | cone11->SetFillColor(2); | |
1240 | cone11->SetLineColor(2); | |
852af72e | 1241 | mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone11",0,0,0))); |
1242 | mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone11",0,0,0))); | |
b705c75b | 1243 | |
1244 | TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,kLay1/2,kStaveLength-0.50); | |
1245 | TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003); | |
1246 | plate2->SetFillColor(2); | |
1247 | plate2->SetLineColor(2); | |
852af72e | 1248 | mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate2",0,0,0))); |
b705c75b | 1249 | |
1250 | TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay1/2,kStaveLength-0.50); | |
1251 | TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003); | |
1252 | plate21->SetFillColor(2); | |
1253 | plate21->SetLineColor(2); | |
852af72e | 1254 | mechStavVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0))); |
1255 | mechStavVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0))); | |
b705c75b | 1256 | |
1257 | TGeoBBox *box22 = new TGeoBBox((kLay1/2),kConeOutRadius/2,kStaveLength-0.50); | |
1258 | TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003); | |
1259 | plate22->SetFillColor(2); | |
1260 | plate22->SetLineColor(2); | |
852af72e | 1261 | mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); |
1262 | mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); | |
1263 | mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); | |
1264 | mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); | |
b705c75b | 1265 | |
1266 | //C Fleece | |
1267 | TGeoConeSeg *cons2 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,0,180); | |
1268 | TGeoVolume *cone12 = new TGeoVolume("CFleecePipeCover",cons2,medCarbonFleece); | |
1269 | cone12->SetFillColor(28); | |
1270 | cone12->SetLineColor(28); | |
852af72e | 1271 | mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone12",0,0,0))); |
1272 | mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone12",0,0,0))); | |
b705c75b | 1273 | |
1274 | TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+kLay1)))/2,kLay2/2,kStaveLength-0.50); | |
1275 | TGeoVolume *plate3 = new TGeoVolume("CFleeceMiddle",box3,medCarbonFleece); | |
1276 | plate3->SetFillColor(28); | |
1277 | plate3->SetLineColor(28); | |
852af72e | 1278 | mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate3",0,0,0))); |
b705c75b | 1279 | |
1280 | TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay2/2,kStaveLength-0.50); | |
1281 | TGeoVolume *plate31 = new TGeoVolume("CFleeceLeftRight",box31,medCarbonFleece); | |
1282 | plate31->SetFillColor(28); | |
1283 | plate31->SetLineColor(28); | |
852af72e | 1284 | mechStavVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0))); |
1285 | mechStavVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0))); | |
b705c75b | 1286 | |
1287 | TGeoBBox *box32 = new TGeoBBox((kLay2/2),(kConeOutRadius-kLay1)/2,kStaveLength-0.50); | |
1288 | TGeoVolume *plate32 = new TGeoVolume("CFleeceVertical",box32,medCarbonFleece); | |
1289 | plate32->SetFillColor(28); | |
1290 | plate32->SetLineColor(28); | |
852af72e | 1291 | mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); |
1292 | mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); | |
1293 | mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); | |
1294 | mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); | |
b705c75b | 1295 | |
1296 | ||
1297 | //K13D2U carbon plate | |
1298 | TGeoBBox *box1 = new TGeoBBox(2*kWidth,kLay3/2,kStaveLength-0.50); | |
1299 | TGeoVolume *plate1 = new TGeoVolume("CarbonPlate",box1,medK13D2U2k); | |
1300 | plate1->SetFillColor(5); | |
1301 | plate1->SetLineColor(5); | |
852af72e | 1302 | mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(kLay3/2)),z,new TGeoRotation("plate1",0,0,0))); |
b705c75b | 1303 | |
1304 | //C Fleece bottom plate | |
1305 | TGeoBBox *box6 = new TGeoBBox(2*kWidth,kLay2/2,kStaveLength-0.50); | |
1306 | TGeoVolume *plate6 = new TGeoVolume("CFleeceBottom",box6,medCarbonFleece); | |
1307 | plate6->SetFillColor(2); | |
1308 | plate6->SetLineColor(2); | |
852af72e | 1309 | mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)),z,new TGeoRotation("plate1",0,0,0))); |
b705c75b | 1310 | |
1311 | ||
1312 | } | |
1313 | ||
1314 | if (fBuildLevel < 2) { | |
1315 | //Glue layers and kapton | |
852af72e | 1316 | TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, 0.005/2, zsta); |
b705c75b | 1317 | TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue); |
1318 | volGlue->SetLineColor(5); | |
1319 | volGlue->SetFillColor(5); | |
852af72e | 1320 | mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+(0.01/2)), z, new TGeoRotation("",0, 0, 0))); |
1321 | mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+(0.01/2)), z, new TGeoRotation("",0, 0, 0))); | |
b705c75b | 1322 | } |
1323 | ||
1324 | if (fBuildLevel < 1) { | |
852af72e | 1325 | TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, 0.01/2, zsta); |
b705c75b | 1326 | TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable); |
1327 | volCable->SetLineColor(28); | |
1328 | volCable->SetFillColor(28); | |
852af72e | 1329 | mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+0.01+(0.01/2)), z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1330 | } |
1331 | ||
1332 | ||
1333 | // Done, return the stave structure | |
852af72e | 1334 | return mechStavVol; |
b705c75b | 1335 | |
1336 | } | |
019dc90c | 1337 | |
b705c75b | 1338 | // new model22 |
1339 | //________________________________________________________________________ | |
852af72e | 1340 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xsta, |
1341 | const Double_t zsta, | |
b705c75b | 1342 | const TGeoManager *mgr){ |
1343 | // | |
1344 | // Create the mechanical stave structure for Model 2.2 of TDR | |
1345 | // | |
1346 | // Input: | |
852af72e | 1347 | // xsta : X length |
1348 | // zsta : Z length | |
b705c75b | 1349 | // mgr : the GeoManager (used only to get the proper material) |
1350 | // | |
1351 | // Output: | |
1352 | // | |
1353 | // Return: | |
1354 | // | |
1355 | // Created: 22 Mar 2013 Chinorat Kobdaj | |
1356 | // Updated: 26 Apr 2013 Mario Sitta | |
1357 | // Updated: 30 Apr 2013 Wanchaloem Poonsawat | |
1358 | // | |
1359 | ||
1360 | // Materials defined in AliITSUv1 | |
1361 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
1362 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); | |
1363 | ||
1364 | TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$"); | |
1365 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); | |
1366 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
1367 | TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$"); | |
1368 | TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$"); | |
1369 | TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); | |
1370 | TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$"); | |
1371 | ||
1372 | // Local parameters | |
d7ef241e | 1373 | Double_t kConeOutRadius =(0.1024+0.0025)/2;//0.107/2; |
1374 | Double_t kConeInRadius = 0.1024/2;//0.10105/2 | |
852af72e | 1375 | Double_t kStaveLength = zsta; |
1376 | Double_t kStaveWidth = xsta*2; | |
b705c75b | 1377 | Double_t kWidth = (kStaveWidth)/4; |
1378 | Double_t kStaveHeight = 0.283;//0.33; | |
1379 | Double_t kHeight = (kStaveHeight)/2; | |
1380 | Double_t kAlpha = 57;//56.31; | |
1381 | Double_t kTheta = kAlpha*TMath::DegToRad(); | |
1382 | Double_t kS1 = ((kStaveWidth)/4)/TMath::Sin(kTheta); | |
1383 | Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta); | |
1384 | Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(kThe2); | |
1385 | Double_t kThe2 = TMath::ATan(kHeight/(0.375-0.036)); | |
1386 | Double_t kBeta = kThe2*TMath::RadToDeg(); | |
1387 | Double_t klay1 = 0.003;//Amec carbon | |
1388 | Double_t klay2 = 0.002;//C Fleece carbon | |
1389 | Double_t klay3 = 0.007;//CFplate K13D2U carbon | |
1390 | Double_t klay4 = 0.007;//GluekStaveLength/2 | |
1391 | Double_t klay5 = 0.01;//Flex cable | |
1392 | Double_t kTopVertexMaxWidth = 0.072; | |
1393 | Double_t kTopVertexHeight = 0.04; | |
1394 | Double_t kSideVertexMWidth = 0.052; | |
1395 | Double_t kSideVertexHeight = 0.11; | |
1396 | ||
1397 | ||
1398 | Int_t loop = (Int_t)(kStaveLength/(2*kL1)); | |
1399 | ||
1400 | char volname[30]; | |
852af72e | 1401 | snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); |
b705c75b | 1402 | |
1403 | Double_t z=0, y=-(2*kConeOutRadius)+klay1+klay2+fSensorThick/2-0.0004, x=0; | |
1404 | ||
852af72e | 1405 | TGeoVolume *mechStavVol = 0; |
b705c75b | 1406 | |
1407 | if (fBuildLevel < 5) { | |
1408 | // world (trapezoid) | |
1409 | TGeoXtru *mechStruct = new TGeoXtru(2); //z sections | |
1410 | Double_t xv[6] = {kStaveWidth/2,kStaveWidth/2,0.012,-0.012,-kStaveWidth/2,-kStaveWidth/2}; | |
1411 | /* Double_t yv[6] = {-2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5), | |
1412 | 0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02, | |
1413 | -2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5)}; // (kConeOutRadius*2)-0.0635 */ | |
dd49bd10 | 1414 | Double_t yv[6] = {-(kConeOutRadius*2)-0.07295,0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02,-(kConeOutRadius*2)-0.07295}; // (kConeOutRadius*2)-0.064 |
b705c75b | 1415 | mechStruct->DefinePolygon(6,xv,yv); |
1416 | mechStruct->DefineSection(0,-kStaveLength,0,0,1.); | |
1417 | mechStruct->DefineSection(1,kStaveLength,0,0,1.); | |
1418 | ||
852af72e | 1419 | mechStavVol = new TGeoVolume(volname, mechStruct, medAir); |
1420 | mechStavVol->SetLineColor(12); | |
1421 | mechStavVol->SetFillColor(12); | |
1422 | mechStavVol->SetVisibility(kTRUE); | |
b705c75b | 1423 | |
1424 | //Polyimide Pipe Kapton grey-35 | |
1425 | TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius-0.0001,kConeInRadius,kConeOutRadius-0.0001); | |
1426 | TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton); | |
1427 | volCone1->SetFillColor(35); | |
1428 | volCone1->SetLineColor(35); | |
852af72e | 1429 | mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z)); |
1430 | mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z)); | |
b705c75b | 1431 | } |
1432 | ||
1433 | if (fBuildLevel < 4) { | |
1434 | TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius-0.0001,kStaveLength); | |
1435 | TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater); | |
1436 | volCoolTubeW->SetFillColor(4); | |
1437 | volCoolTubeW->SetLineColor(4); | |
852af72e | 1438 | mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z)); |
1439 | mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z)); | |
b705c75b | 1440 | } |
1441 | ||
1442 | if (fBuildLevel < 3) { | |
1443 | //top fillament | |
1444 | // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width) | |
1445 | TGeoBBox *t2=new TGeoBBox(kS2-0.028,0.02/2,0.02/2); //0.04/2//TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02);//kS2-0.03 old Config.C | |
1446 | TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K); | |
1447 | volT2->SetLineColor(12); | |
1448 | volT2->SetFillColor(12); | |
1449 | for(int i=0;i<loop;i++){// i<28;i++){ | |
1450 | // 1) Front Left Top Filament | |
852af72e | 1451 | mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta))); |
b705c75b | 1452 | // 2) Front Right Top Filament |
852af72e | 1453 | mechStavVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta))); |
b705c75b | 1454 | // 3) Back Left Top Filament |
852af72e | 1455 | mechStavVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta))); |
b705c75b | 1456 | // 4) Back Right Top Filament |
852af72e | 1457 | mechStavVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta))); |
b705c75b | 1458 | } |
1459 | ||
1460 | //Vertex structure | |
1461 | ||
1462 | //top ver trd1 | |
1463 | TGeoTrd1 *trd1 = new TGeoTrd1(0,kTopVertexMaxWidth/2,kStaveLength,kTopVertexHeight/2); | |
1464 | TGeoVolume *ibdv = new TGeoVolume("TopVertex",trd1,medM60J3K); | |
1465 | ibdv->SetFillColor(12); | |
1466 | ibdv->SetLineColor(12); | |
852af72e | 1467 | mechStavVol->AddNode(ibdv,1,new TGeoCombiTrans(x,y+kStaveHeight+0.03,z,new TGeoRotation("ibdv",0.,-90,0)));//y+kStaveHeight+0.056 |
b705c75b | 1468 | |
1469 | //left trd2 | |
1470 | TGeoTrd1 *trd2 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2); | |
1471 | TGeoVolume *ibdv2 = new TGeoVolume("LeftVertex",trd2,medM60J3K); | |
1472 | ibdv2->SetFillColor(12); | |
1473 | ibdv2->SetLineColor(12); | |
8397c175 | 1474 | mechStavVol->AddNode(ibdv2,1,new TGeoCombiTrans(x+kStaveWidth/2-0.06,y-0.0348,z,new TGeoRotation("ibdv2",-103.3,90,0))); //x-kStaveWidth/2-0.09 old Config.C y-0.0355, |
b705c75b | 1475 | |
1476 | //right trd3 | |
1477 | TGeoTrd1 *trd3 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2); | |
1478 | TGeoVolume *ibdv3 = new TGeoVolume("RightVertex",trd3,medM60J3K); | |
1479 | ibdv3->SetFillColor(12); | |
1480 | ibdv3->SetLineColor(12); | |
8397c175 | 1481 | mechStavVol->AddNode(ibdv3,1,new TGeoCombiTrans(x-kStaveWidth/2+0.06,y-0.0348,z,new TGeoRotation("ibdv3",103.3,90,0))); //x-kStaveWidth/2+0.09 old Config.C |
b705c75b | 1482 | |
1483 | //Carbon Fleece | |
852af72e | 1484 | TGeoConeSeg *cons2 = new TGeoConeSeg(zsta,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,0,180); |
b705c75b | 1485 | TGeoVolume *cone12 = new TGeoVolume("CarbonFleecePipeCover",cons2,medCarbonFleece); |
1486 | cone12->SetFillColor(28); | |
1487 | cone12->SetLineColor(28); | |
852af72e | 1488 | mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone12",0,0,0))); |
1489 | mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone12",0,0,0))); | |
b705c75b | 1490 | |
852af72e | 1491 | TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+klay1)))/2,klay2/2,zsta);//kStaveLength-0.50); |
b705c75b | 1492 | TGeoVolume *plate3 = new TGeoVolume("CarbonFleeceMiddle",box3,medCarbonFleece); |
1493 | plate3->SetFillColor(28); | |
1494 | plate3->SetLineColor(28); | |
852af72e | 1495 | mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate3",0,0,0))); |
b705c75b | 1496 | |
852af72e | 1497 | TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,klay2/2,zsta); |
b705c75b | 1498 | TGeoVolume *plate31 = new TGeoVolume("CarbonFleeceLeftRight",box31,medCarbonFleece); |
1499 | plate31->SetFillColor(28); | |
1500 | plate31->SetLineColor(28); | |
852af72e | 1501 | mechStavVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0))); |
1502 | mechStavVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0))); | |
b705c75b | 1503 | |
852af72e | 1504 | TGeoBBox *box32 = new TGeoBBox((klay2/2),(kConeOutRadius-klay1)/2,zsta); |
b705c75b | 1505 | TGeoVolume *plate32 = new TGeoVolume("CarbonFleeceVertical",box32,medCarbonFleece); |
1506 | plate32->SetFillColor(28); | |
1507 | plate32->SetLineColor(28); | |
852af72e | 1508 | mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); |
1509 | mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); | |
1510 | mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); | |
1511 | mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); | |
b705c75b | 1512 | |
1513 | //Amec Thermasol red-2 cover tube FGS300 or Carbon Paper | |
852af72e | 1514 | TGeoConeSeg *cons1 = new TGeoConeSeg(zsta,kConeOutRadius,kConeOutRadius+klay1-0.0001,kConeOutRadius,kConeOutRadius+klay1-0.0001,0,180);//kConeOutRadius+klay1-0.0001 |
b705c75b | 1515 | TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003); |
1516 | cone11->SetFillColor(2); | |
1517 | cone11->SetLineColor(2); | |
852af72e | 1518 | mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone11",0,0,0))); |
1519 | mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone11",0,0,0))); | |
b705c75b | 1520 | |
852af72e | 1521 | TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,(klay1/2),zsta);//kStaveLength-0.50); |
b705c75b | 1522 | TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003); |
1523 | plate2->SetFillColor(2); | |
1524 | plate2->SetLineColor(2); | |
852af72e | 1525 | mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate2",0,0,0))); |
b705c75b | 1526 | |
852af72e | 1527 | TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,(klay1/2),zsta); |
b705c75b | 1528 | TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003); |
1529 | plate21->SetFillColor(2); | |
1530 | plate21->SetLineColor(2); | |
852af72e | 1531 | mechStavVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(klay1/2)+0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0))); |
1532 | mechStavVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(klay1/2)-0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0))); | |
b705c75b | 1533 | |
852af72e | 1534 | TGeoBBox *box22 = new TGeoBBox((klay1/2),kConeOutRadius/2,zsta); |
b705c75b | 1535 | TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003); |
1536 | plate22->SetFillColor(2); | |
1537 | plate22->SetLineColor(2); | |
852af72e | 1538 | mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); |
1539 | mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); | |
1540 | mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); | |
1541 | mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); | |
b705c75b | 1542 | |
1543 | //K13D2U CF plate | |
852af72e | 1544 | TGeoBBox *box1 = new TGeoBBox(2*kWidth,(klay3)/2,zsta); |
b705c75b | 1545 | TGeoVolume *plate1 = new TGeoVolume("CFPlate",box1,medK13D2U2k); |
1546 | plate1->SetFillColor(5); | |
1547 | plate1->SetLineColor(5); | |
852af72e | 1548 | mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(klay3/2)),z,new TGeoRotation("plate1",0,0,0))); |
b705c75b | 1549 | |
1550 | //C Fleece bottom plate | |
852af72e | 1551 | TGeoBBox *box6 = new TGeoBBox(2*kWidth,(klay2)/2,zsta); |
b705c75b | 1552 | TGeoVolume *plate6 = new TGeoVolume("CarbonFleeceBottom",box6,medCarbonFleece); |
1553 | plate6->SetFillColor(2); | |
1554 | plate6->SetLineColor(2); | |
852af72e | 1555 | mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+(klay2/2)),z,new TGeoRotation("plate6",0,0,0))); |
b705c75b | 1556 | |
1557 | } | |
1558 | if (fBuildLevel < 2) { | |
1559 | //Glue klayers and kapton | |
852af72e | 1560 | TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, (klay4)/2, zsta); |
b705c75b | 1561 | TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue); |
1562 | volGlue->SetLineColor(5); | |
1563 | volGlue->SetFillColor(5); | |
852af72e | 1564 | // mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4/2)), z, new TGeoRotation("",0, 0, 0))); |
1565 | mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4)/2)+0.00005, z, new TGeoRotation("",0, 0, 0))); | |
b705c75b | 1566 | } |
1567 | ||
1568 | if (fBuildLevel < 1) { | |
1569 | //Flex Cable or Bus | |
852af72e | 1570 | TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, klay5/2, zsta);//klay5/2 |
b705c75b | 1571 | TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable); |
1572 | volCable->SetLineColor(28); | |
1573 | volCable->SetFillColor(28); | |
852af72e | 1574 | // mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.0002, z, new TGeoRotation("",0, 0, 0))); |
dd49bd10 | 1575 | mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+(klay5)/2), z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1576 | } |
1577 | // Done, return the stave structe | |
852af72e | 1578 | return mechStavVol; |
b705c75b | 1579 | } |
1580 | ||
1581 | // model3 | |
1582 | //________________________________________________________________________ | |
852af72e | 1583 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xsta, |
1584 | const Double_t zsta, | |
b705c75b | 1585 | const TGeoManager *mgr){ |
1586 | // | |
1587 | // Create the mechanical stave structure for Model 3 of TDR | |
1588 | // | |
1589 | // Input: | |
852af72e | 1590 | // xsta : X length |
1591 | // zsta : Z length | |
b705c75b | 1592 | // mgr : the GeoManager (used only to get the proper material) |
1593 | // | |
1594 | // Output: | |
1595 | // | |
1596 | // Return: | |
1597 | // | |
1598 | // Created: 28 May 2013 Chinorat Kobdaj | |
1599 | // Updated: Mario Sitta | |
1600 | // Updated: Wanchaloem Poonsawat | |
1601 | // | |
1602 | ||
1603 | // Materials defined in AliITSUv1 | |
1604 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
1605 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); | |
1606 | ||
1607 | TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$"); | |
1608 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); | |
1609 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
1610 | TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$"); | |
1611 | //TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$"); | |
1612 | //TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); | |
1613 | //TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$"); | |
1614 | ||
1615 | // Local parameters | |
1616 | Double_t kConeOutRadius = 0.15/2; | |
852af72e | 1617 | Double_t kStaveLength = zsta*2; |
1618 | Double_t kStaveWidth = xsta*2; | |
b705c75b | 1619 | Double_t w = kStaveWidth/4;//1/2 of W |
1620 | Double_t staveHeight = 0.3; | |
1621 | Double_t h = staveHeight/2; | |
1622 | Double_t alpha = 90-33.;//90-30; | |
1623 | Double_t the1 = alpha*TMath::DegToRad(); | |
1624 | Double_t s1 = w/TMath::Sin(the1); | |
1625 | Double_t l = w/TMath::Tan(the1); | |
1626 | Double_t s2 = TMath::Sqrt(h*h + s1*s1);//TMath::Sin(the2); | |
1627 | Double_t the2 = TMath::ATan(h/s1); | |
1628 | Double_t beta = the2*TMath::RadToDeg(); | |
1629 | Double_t klay4 = 0.007; //Glue | |
1630 | Double_t klay5 = 0.01; //Flexcable | |
1631 | Int_t loop = (Int_t)((kStaveLength/(2*l))/2); | |
1632 | Double_t hh = 0.01; | |
1633 | Double_t ang1 = 0*TMath::DegToRad(); | |
1634 | Double_t ang2 = 0*TMath::DegToRad(); | |
1635 | Double_t ang3 = 0*TMath::DegToRad(); | |
852af72e | 1636 | Int_t chips = 4; |
b705c75b | 1637 | Double_t headWidth=0.25; |
852af72e | 1638 | Double_t smcLength=kStaveLength/chips-2*headWidth;//6.25; |
b705c75b | 1639 | Double_t smcWidth=kStaveWidth; |
1640 | Double_t smcSide1Thick=0.03; | |
1641 | Double_t vaporThick=0.032; | |
1642 | Double_t liquidThick=0.028; | |
1643 | Double_t smcSide2Thick=0.01; | |
1644 | Double_t smcSide3Thick=0.0055; | |
1645 | Double_t smcSide4Thick=0.0095; | |
1646 | Double_t smcSide5Thick=0.0075; | |
1647 | Double_t smcSpace=0.01; | |
1648 | ||
1649 | ||
1650 | char volname[30]; | |
852af72e | 1651 | snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); |
b705c75b | 1652 | |
1653 | // detailed structure ++++++++++++++ | |
1654 | Double_t z=0, y=0-0.007, x=0; | |
1655 | ||
1656 | // Polimide micro channels numbers | |
1657 | Double_t yMC = y-h+0.01; | |
1658 | Int_t nb = (Int_t)(kStaveWidth/0.1)+1; | |
852af72e | 1659 | Double_t xstaMC = (nb*0.1-0.08)/2; |
b705c75b | 1660 | |
1661 | ||
852af72e | 1662 | TGeoVolume *mechStavVol = 0; |
b705c75b | 1663 | if (fBuildLevel < 5) { |
1664 | // world (trapezoid) | |
1665 | TGeoXtru *mechStruct = new TGeoXtru(2); //z sections | |
1666 | Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1}; | |
1667 | Double_t yv[5] = {-kConeOutRadius*2-0.07,0,staveHeight,0,-kConeOutRadius*2-0.07}; | |
1668 | mechStruct->DefinePolygon(5,xv,yv); | |
1669 | mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.); | |
1670 | mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.); | |
852af72e | 1671 | mechStavVol = new TGeoVolume(volname, mechStruct, medAir); |
1672 | mechStavVol->SetLineColor(12); | |
1673 | mechStavVol->SetFillColor(12); | |
1674 | mechStavVol->SetVisibility(kTRUE); | |
b705c75b | 1675 | |
1676 | // Silicon micro channels numbers | |
1677 | ||
1678 | TGeoBBox *tM0a=new TGeoBBox(smcWidth/2, 0.003/2, headWidth/2); | |
1679 | TGeoVolume *volTM0a=new TGeoVolume("microChanTop1", tM0a, medKapton); | |
1680 | volTM0a->SetLineColor(35); | |
1681 | volTM0a->SetFillColor(35); | |
1682 | ||
852af72e | 1683 | for(Int_t mo=1; mo<=chips; mo++) { |
1684 | mechStavVol->AddNode(volTM0a, 0, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3))); | |
1685 | mechStavVol->AddNode(volTM0a, 1, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3))); | |
b705c75b | 1686 | } |
1687 | TGeoBBox *tM0c=new TGeoBBox(0.3/2, 0.003/2,smcLength/2); | |
1688 | TGeoVolume *volTM0c=new TGeoVolume("microChanTop2", tM0c, medKapton); | |
1689 | volTM0c->SetLineColor(35); | |
1690 | volTM0c->SetFillColor(35); | |
852af72e | 1691 | for(Int_t mo=1; mo<=chips; mo++) { |
1692 | mechStavVol->AddNode(volTM0c, 0, new TGeoCombiTrans(x+(smcWidth/2)-(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3))); | |
1693 | mechStavVol->AddNode(volTM0c, 1, new TGeoCombiTrans(x-(smcWidth/2)+(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1694 | } |
1695 | TGeoBBox *tM0c1=new TGeoBBox(0.2225/2, 0.003/2,smcLength/2); | |
1696 | TGeoVolume *volTM0c1=new TGeoVolume("microChanBot1", tM0c1, medKapton); | |
1697 | volTM0c1->SetLineColor(6); | |
1698 | volTM0c1->SetFillColor(6); | |
852af72e | 1699 | for(Int_t mo=1; mo<=chips; mo++) { |
1700 | mechStavVol->AddNode(volTM0c1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
1701 | mechStavVol->AddNode(volTM0c1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1702 | } |
1703 | TGeoBBox *tM0c2=new TGeoBBox(0.072/2, 0.003/2,smcLength/2); | |
1704 | TGeoVolume *volTM0c2=new TGeoVolume("microChanBot2", tM0c2, medKapton); | |
1705 | volTM0c2->SetLineColor(35); | |
1706 | volTM0c2->SetFillColor(35); | |
852af72e | 1707 | for(Int_t mo=1; mo<=chips; mo++) { |
1708 | mechStavVol->AddNode(volTM0c2, 0, new TGeoCombiTrans(x+smcWidth/2-(0.072/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1709 | } |
1710 | TGeoBBox *tM0c2r=new TGeoBBox(0.068/2, 0.003/2,smcLength/2); | |
1711 | TGeoVolume *volTM0c2r=new TGeoVolume("microChanBot3", tM0c2r, medKapton); | |
1712 | volTM0c2r->SetLineColor(35); | |
1713 | volTM0c2r->SetFillColor(35); | |
852af72e | 1714 | for(Int_t mo=1; mo<=chips; mo++) { |
1715 | mechStavVol->AddNode(volTM0c2r, 0, new TGeoCombiTrans(x-smcWidth/2+(0.068/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1716 | } |
1717 | TGeoBBox *tM0d=new TGeoBBox(smcSide1Thick/2, 0.035/2,smcLength/2); | |
1718 | TGeoVolume *volTM0d=new TGeoVolume("microChanSide1", tM0d, medKapton); | |
1719 | volTM0d->SetLineColor(12); | |
1720 | volTM0d->SetFillColor(12); | |
852af72e | 1721 | for(Int_t mo=1; mo<=chips; mo++) { |
1722 | mechStavVol->AddNode(volTM0d, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
1723 | mechStavVol->AddNode(volTM0d, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1724 | } |
1725 | ||
1726 | TGeoBBox *tM0d1=new TGeoBBox(smcSide2Thick/2, 0.035/2,smcLength/2); | |
1727 | TGeoVolume *volTM0d1=new TGeoVolume("microChanSide2", tM0d1, medKapton); | |
1728 | volTM0d1->SetLineColor(12); | |
1729 | volTM0d1->SetFillColor(12); | |
852af72e | 1730 | for(Int_t mo=1; mo<=chips; mo++) { |
1731 | mechStavVol->AddNode(volTM0d1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
1732 | mechStavVol->AddNode(volTM0d1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1733 | } |
1734 | TGeoBBox *tM0d2=new TGeoBBox(smcSide3Thick/2, (hh+0.003)/2, smcLength/2); | |
1735 | TGeoVolume *volTM0d2=new TGeoVolume("microChanSide3", tM0d2, medKapton); | |
1736 | volTM0d2->SetLineColor(12); | |
1737 | volTM0d2->SetFillColor(12); | |
852af72e | 1738 | for(Int_t mo=1; mo<=chips; mo++) { |
1739 | mechStavVol->AddNode(volTM0d2, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1740 | } |
1741 | TGeoBBox *tM0d2r=new TGeoBBox(smcSide4Thick/2, (hh+0.003)/2, smcLength/2); | |
1742 | TGeoVolume *volTM0d2r=new TGeoVolume("microChanSide4", tM0d2r, medKapton); | |
1743 | volTM0d2r->SetLineColor(12); | |
1744 | volTM0d2r->SetFillColor(12); | |
852af72e | 1745 | for(Int_t mo=1; mo<=chips; mo++) { |
1746 | mechStavVol->AddNode(volTM0d2r, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1747 | } |
1748 | TGeoBBox *tM0e=new TGeoBBox(smcSide5Thick/2, hh/2,smcLength/2); | |
1749 | TGeoVolume *volTM0e=new TGeoVolume("microChanSide5", tM0e, medKapton); | |
1750 | volTM0e->SetLineColor(12); | |
1751 | volTM0e->SetFillColor(12); | |
852af72e | 1752 | for(Int_t mo=1; mo<=chips; mo++) { |
b705c75b | 1753 | for (Int_t ie=0;ie<11;ie++) { |
852af72e | 1754 | mechStavVol->AddNode(volTM0e, 0, new TGeoCombiTrans(x-(ie*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace-(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); |
1755 | mechStavVol->AddNode(volTM0e, 1, new TGeoCombiTrans(x+(ie*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+smcSpace+(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1756 | } |
1757 | } | |
1758 | ||
1759 | TGeoBBox *tM0f=new TGeoBBox(0.02/2, hh/2, smcLength/2); | |
1760 | TGeoVolume *volTM0f=new TGeoVolume("microChanTop3", tM0f, medKapton); | |
1761 | //Double_t smcChannels=12; | |
1762 | Double_t smcCloseWallvapor=smcWidth/2-smcSide1Thick-vaporThick-smcSide2Thick-smcSide3Thick-12*smcSpace-11*smcSide5Thick; | |
1763 | Double_t smcCloseWallliquid=smcWidth/2-smcSide1Thick-liquidThick-smcSide2Thick-smcSide4Thick-12*smcSpace-11*smcSide5Thick; | |
1764 | volTM0f->SetLineColor(12); | |
1765 | volTM0f->SetFillColor(12); | |
852af72e | 1766 | for(Int_t mo=1; mo<=chips; mo++) { |
1767 | mechStavVol->AddNode(volTM0f, 0, new TGeoCombiTrans(x+smcCloseWallvapor-(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
1768 | mechStavVol->AddNode(volTM0f, 1, new TGeoCombiTrans(x-smcCloseWallliquid+(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1769 | } |
1770 | //Head(back) microchannel | |
1771 | ||
1772 | TGeoBBox *tM0hb=new TGeoBBox(smcWidth/2, 0.025/2, headWidth/2); | |
1773 | TGeoVolume *volTM0hb=new TGeoVolume("microChanHeadBackBottom1", tM0hb, medKapton); | |
1774 | volTM0hb->SetLineColor(4); | |
1775 | volTM0hb->SetFillColor(4); | |
852af72e | 1776 | for(Int_t mo=1; mo<=chips; mo++) { |
1777 | mechStavVol->AddNode(volTM0hb, 0, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
1778 | mechStavVol->AddNode(volTM0hb, 1, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1779 | } |
1780 | TGeoBBox *tM0h1=new TGeoBBox(smcWidth/2, 0.013/2, 0.05/2); | |
1781 | TGeoVolume *volTM0h1=new TGeoVolume("microChanHeadBackBottom2", tM0h1, medKapton); | |
1782 | volTM0h1->SetLineColor(5); | |
1783 | volTM0h1->SetFillColor(5); | |
852af72e | 1784 | for(Int_t mo=1; mo<=chips; mo++) { |
1785 | mechStavVol->AddNode(volTM0h1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-headWidth+(0.05/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1786 | } |
1787 | TGeoBBox *tM0h2=new TGeoBBox(smcWidth/2, 0.003/2, 0.18/2); | |
1788 | TGeoVolume *volTM0h2=new TGeoVolume("microChanHeadBackBottom7", tM0h2, medKapton); | |
1789 | volTM0h2->SetLineColor(6); | |
1790 | volTM0h2->SetFillColor(6); | |
852af72e | 1791 | for(Int_t mo=1; mo<=chips; mo++) { |
1792 | mechStavVol->AddNode(volTM0h2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-0.02-(0.18/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1793 | } |
1794 | TGeoBBox *tM0h3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2); | |
1795 | TGeoVolume *volTM0h3=new TGeoVolume("microChanHeadBackBottom3", tM0h3, medKapton); | |
1796 | volTM0h3->SetLineColor(5); | |
1797 | volTM0h3->SetFillColor(5); | |
852af72e | 1798 | for(Int_t mo=1; mo<=chips; mo++) { |
1799 | mechStavVol->AddNode(volTM0h3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1800 | } |
1801 | TGeoBBox *tM0b1=new TGeoBBox(smcWidth/2, 0.013/2, 0.03/2); | |
1802 | TGeoVolume *volTM0b1=new TGeoVolume("microChanHeadBackBottom4", tM0b1, medKapton); | |
1803 | volTM0b1->SetLineColor(5); | |
1804 | volTM0b1->SetFillColor(5); | |
852af72e | 1805 | for(Int_t mo=1; mo<=chips; mo++) { |
1806 | mechStavVol->AddNode(volTM0b1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+headWidth-(0.03/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1807 | } |
1808 | TGeoBBox *tM0b2=new TGeoBBox(smcWidth/2, 0.003/2, 0.2/2); | |
1809 | TGeoVolume *volTM0b2=new TGeoVolume("microChanHeadBackBottom5", tM0b2, medKapton); | |
1810 | volTM0b2->SetLineColor(6); | |
1811 | volTM0b2->SetFillColor(6); | |
852af72e | 1812 | for(Int_t mo=1; mo<=chips; mo++) { |
1813 | mechStavVol->AddNode(volTM0b2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+0.02+(0.2/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1814 | } |
1815 | TGeoBBox *tM0b3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2); | |
1816 | TGeoVolume *volTM0b3=new TGeoVolume("microChanHeadBackBottom6", tM0b3, medKapton); | |
1817 | volTM0b3->SetLineColor(5); | |
1818 | volTM0b3->SetFillColor(5); | |
852af72e | 1819 | for(Int_t mo=1; mo<=chips; mo++) { |
1820 | mechStavVol->AddNode(volTM0b3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1821 | } |
1822 | ||
852af72e | 1823 | TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta); |
b705c75b | 1824 | TGeoVolume *volTM0b=new TGeoVolume("microChanWalls", tM0b, medKapton); |
1825 | volTM0b->SetLineColor(35); | |
1826 | volTM0b->SetFillColor(35); | |
1827 | for (Int_t ib=0;ib<nb;ib++) { | |
852af72e | 1828 | //mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1829 | } |
1830 | ||
1831 | } | |
1832 | ||
1833 | if (fBuildLevel < 4) { | |
1834 | ||
1835 | //**********cooling inlet outlet | |
1836 | ||
1837 | TGeoBBox *tM0dv=new TGeoBBox(vaporThick/2, 0.035/2,smcLength/2); | |
1838 | TGeoVolume *volTM0dv=new TGeoVolume("microChanVapor", tM0dv, medWater); | |
1839 | volTM0dv->SetLineColor(2); | |
1840 | volTM0dv->SetFillColor(2); | |
852af72e | 1841 | for(Int_t mo=1; mo<=chips; mo++) { |
1842 | mechStavVol->AddNode(volTM0dv, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1843 | } |
1844 | TGeoBBox *tM0dl=new TGeoBBox(liquidThick/2, 0.035/2,smcLength/2); | |
1845 | TGeoVolume *volTM0dl=new TGeoVolume("microChanLiquid", tM0dl, medWater); | |
1846 | volTM0dl->SetLineColor(3); | |
1847 | volTM0dl->SetFillColor(3); | |
852af72e | 1848 | for(Int_t mo=1; mo<=chips; mo++) { |
1849 | mechStavVol->AddNode(volTM0dl, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1850 | } |
1851 | // small cooling fluid now using water wait for freeon value | |
1852 | TGeoBBox *tM0dlq=new TGeoBBox(smcSpace/2, hh/2,smcLength/2); | |
1853 | TGeoVolume *volTM0dlq=new TGeoVolume("smallLiquid", tM0dlq, medWater); | |
1854 | volTM0dlq->SetLineColor(3); | |
1855 | volTM0dlq->SetFillColor(3); | |
1856 | TGeoBBox *tM0dvp=new TGeoBBox(smcSpace/2, hh/2,smcLength/2); | |
1857 | TGeoVolume *volTM0dvp=new TGeoVolume("microChanVapor", tM0dvp, medWater); | |
1858 | volTM0dvp->SetLineColor(2); | |
1859 | volTM0dvp->SetFillColor(2); | |
852af72e | 1860 | for(Int_t mo=1; mo<=chips; mo++) { |
b705c75b | 1861 | for (Int_t is=0;is<12;is++) { |
852af72e | 1862 | mechStavVol->AddNode(volTM0dlq, 0, new TGeoCombiTrans(x+(is*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(vaporThick)+(smcSide2Thick)+(smcSide3Thick)+smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); |
1863 | mechStavVol->AddNode(volTM0dvp, 1, new TGeoCombiTrans(x-(is*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1864 | } |
1865 | } | |
1866 | ||
1867 | //************* | |
1868 | ||
1869 | } | |
1870 | ||
1871 | if (fBuildLevel < 3) { | |
1872 | ||
1873 | //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length) | |
1874 | ||
1875 | Double_t filWidth = 0.04; | |
1876 | Double_t filHeight= 0.02; | |
1877 | TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,s1); | |
1878 | TGeoVolume *volT1=new TGeoVolume("bottomFilament", t1, medM60J3K); | |
1879 | volT1->SetLineColor(12); | |
1880 | volT1->SetFillColor(12); | |
1881 | for(int i=0;i<loop;i++){//i<30;i++){ | |
852af72e | 1882 | mechStavVol->AddNode(volT1,4*i+0, |
b705c75b | 1883 | new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2, |
1884 | new TGeoRotation("volT1",-90,alpha,0))); | |
852af72e | 1885 | mechStavVol->AddNode(volT1,4*i+1, |
b705c75b | 1886 | new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2, |
1887 | new TGeoRotation("volT1",90,alpha,0))); | |
852af72e | 1888 | mechStavVol->AddNode(volT1,4*i+2, |
b705c75b | 1889 | new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, |
1890 | new TGeoRotation("volT1",-90,-alpha,0))); | |
852af72e | 1891 | mechStavVol->AddNode(volT1,4*i+3, |
b705c75b | 1892 | new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, |
1893 | new TGeoRotation("volT1",-90,+alpha,0))); | |
1894 | } | |
1895 | ||
1896 | // Top filament CERP black-12 Carbon structure TGeoBBox (length,thickness,width) | |
1897 | ||
1898 | TGeoBBox *t2=new TGeoBBox(s2,filHeight/2,filWidth/2); | |
1899 | TGeoVolume *volT2=new TGeoVolume("topFilament", t2, medM60J3K); | |
1900 | volT2->SetLineColor(12); | |
1901 | volT2->SetFillColor(12); | |
1902 | for(int i=0;i<loop;i++){ //i<30;i++){ | |
852af72e | 1903 | mechStavVol->AddNode(volT2,4*i+0, |
b705c75b | 1904 | new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2, |
1905 | new TGeoRotation("volT2",90,90-alpha,90-beta))); | |
852af72e | 1906 | mechStavVol->AddNode(volT2,4*i+1, |
b705c75b | 1907 | new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2, |
1908 | new TGeoRotation("volT2",90,-90+alpha,-90+beta))); | |
852af72e | 1909 | mechStavVol->AddNode(volT2,4*i+2, |
b705c75b | 1910 | new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, |
1911 | new TGeoRotation("volT2",90,-90+alpha,90-beta))); | |
852af72e | 1912 | mechStavVol->AddNode(volT2,4*i+3, |
b705c75b | 1913 | new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, |
1914 | new TGeoRotation("volT2",90,90-alpha,-90+beta))); | |
1915 | } | |
1916 | } | |
1917 | ||
1918 | if (fBuildLevel < 2) { | |
1919 | ||
1920 | // Glue Filament and Silicon MicroChannel | |
852af72e | 1921 | TGeoBBox *tM0=new TGeoBBox(xstaMC/5, klay4/2, zsta); |
b705c75b | 1922 | TGeoVolume *volTM0=new TGeoVolume("glueFM", tM0,medGlue ); |
1923 | volTM0->SetLineColor(5); | |
1924 | volTM0->SetFillColor(5); | |
852af72e | 1925 | mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x-xsta/2-0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0))); |
1926 | mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x+xsta/2+0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0))); | |
b705c75b | 1927 | |
1928 | ||
1929 | // Glue microchannel and sensor | |
852af72e | 1930 | TGeoBBox *glueM = new TGeoBBox(xstaMC/5, klay4/2, zsta); |
b705c75b | 1931 | TGeoVolume *volGlueM=new TGeoVolume("glueMS", glueM, medGlue); |
1932 | volGlueM->SetLineColor(5); | |
1933 | volGlueM->SetFillColor(5); | |
852af72e | 1934 | mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x-xsta/2-0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0))); |
1935 | mechStavVol->AddNode(volGlueM, 1, new TGeoCombiTrans(x+xsta/2+0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0))); | |
b705c75b | 1936 | |
1937 | // Glue sensor and kapton | |
852af72e | 1938 | TGeoBBox *glue = new TGeoBBox(xsta, klay4/2, zsta); |
b705c75b | 1939 | TGeoVolume *volGlue=new TGeoVolume("glueSensorBus", glue, medGlue); |
1940 | volGlue->SetLineColor(5); | |
1941 | volGlue->SetFillColor(5); | |
852af72e | 1942 | mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4/2, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1943 | } |
1944 | ||
1945 | if (fBuildLevel < 1) { | |
852af72e | 1946 | TGeoBBox *kapCable = new TGeoBBox(xsta, klay5/2, zsta); |
b705c75b | 1947 | TGeoVolume *volCable=new TGeoVolume("Flexcable", kapCable, medFlexCable); |
1948 | volCable->SetLineColor(28); | |
1949 | volCable->SetFillColor(28); | |
852af72e | 1950 | mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4-klay5/2, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1951 | } |
1952 | ||
1953 | // Done, return the stave structur | |
852af72e | 1954 | return mechStavVol; |
b705c75b | 1955 | } |
1956 | ||
019dc90c | 1957 | // model4 |
1958 | //________________________________________________________________________ | |
1959 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB4(const Double_t xstave, | |
1960 | const Double_t zstave, | |
1961 | const TGeoManager *mgr){ | |
1962 | // | |
1963 | // Create the mechanical stave structure for Model 2.2 of TDR | |
1964 | // Logic is similar to method CreateStaveModelInnerB22 | |
1965 | // but completely rewritten: | |
1966 | // - code completely revised, made systematic and more similar to OB | |
1967 | // - fix some inconsistencies (stave element sequence, empty space) | |
1968 | // - use static const as parameters | |
1969 | // - comply with latest (nov '14) C.Gargiulo data | |
1970 | // | |
1971 | // Input: | |
1972 | // xstave : stave X half length | |
1973 | // zstave : stave Z half length | |
1974 | // mgr : the GeoManager (used only to get the proper material) | |
1975 | // | |
1976 | // Output: | |
1977 | // | |
1978 | // Return: | |
1979 | // | |
1980 | // Created: 04 Dec 2014 Mario Sitta | |
1981 | // | |
1982 | ||
1983 | ||
1984 | // Local parameters | |
1985 | Double_t layerHeight = 0.; | |
1986 | ||
1987 | Double_t rPipeMin = fgkIBCoolPipeInnerD/2; | |
1988 | Double_t rPipeMax = rPipeMin + fgkIBCoolPipeThick; | |
1989 | ||
1990 | Double_t topFilTheta = fgkIBTopFilamentAlpha*TMath::DegToRad(); | |
1991 | Double_t topFilLProj = xstave/TMath::Sin(topFilTheta); // Top filament length projected on stave XZ plane | |
1992 | Double_t topFilYLen = xstave/TMath::Tan(topFilTheta); // Filament length on Y | |
1993 | Int_t nFilaments = (Int_t)(zstave/topFilYLen); | |
1994 | // Question: would it be better to fix the number of filaments and | |
1995 | // compute the angle alpha from it, or leave as it is now, i.e. fix the | |
1996 | // filament inclination angle alpha and compute their number ? | |
1997 | ||
1998 | const Int_t nv = 6; | |
1999 | Double_t xv[nv], yv[nv]; // The stave container Xtru | |
2000 | Double_t xlen; | |
2001 | Double_t xpos, ypos, zpos, ylay; | |
2002 | Double_t beta, gamma, theta; | |
2003 | ||
2004 | ||
2005 | // First create all needed shapes | |
2006 | TGeoBBox *kapCable = new TGeoBBox(xstave, fgkIBFlexCableKapThick/2, zstave); | |
2007 | ||
2008 | TGeoBBox *aluCable = new TGeoBBox(xstave, fgkIBFlexCableAlThick/2, zstave); | |
2009 | ||
2010 | TGeoBBox *glue = new TGeoBBox(xstave, fgkIBGlueThick/2, zstave); | |
2011 | ||
2012 | TGeoBBox *fleecbot = new TGeoBBox(xstave, fgkIBCarbonFleeceThick/2, zstave); | |
2013 | ||
2014 | TGeoBBox *cfplate = new TGeoBBox(xstave, fgkIBK13D2UThick/2, zstave); | |
2015 | ||
2016 | TGeoTube *pipe = new TGeoTube(rPipeMin, rPipeMax, zstave); | |
2017 | ||
2018 | TGeoTube *water = new TGeoTube(0., rPipeMin, zstave); | |
2019 | ||
2020 | TGeoTubeSeg *cpaptub = new TGeoTubeSeg(rPipeMax, | |
2021 | rPipeMax + fgkIBCarbonPaperThick, | |
2022 | zstave, 0, 180); | |
2023 | ||
2024 | TGeoBBox *cpapvert = new TGeoBBox(fgkIBCarbonPaperThick/2, | |
2025 | pipe->GetRmax()/2, zstave); | |
2026 | ||
2027 | xlen = fgkIBCoolPipeXDist/2 - pipe->GetRmax() - fgkIBCarbonPaperThick; | |
2028 | TGeoBBox *cpapmid = new TGeoBBox(xlen, fgkIBCarbonPaperThick/2, zstave); | |
2029 | ||
2030 | xlen = xstave -fgkIBCoolPipeXDist/2 -pipe->GetRmax() -fgkIBCarbonPaperThick; | |
2031 | TGeoBBox *cpaplr = new TGeoBBox(xlen/2, fgkIBCarbonPaperThick/2, zstave); | |
2032 | ||
2033 | TGeoTubeSeg *fleecpipe = new TGeoTubeSeg(cpaptub->GetRmax(), | |
2034 | cpaptub->GetRmax() + fgkIBCarbonFleeceThick, | |
2035 | zstave, 0, 180); | |
2036 | ||
2037 | TGeoBBox *fleecvert = new TGeoBBox(fgkIBCarbonFleeceThick/2, | |
2038 | (pipe->GetRmax()-fgkIBCarbonPaperThick)/2, | |
2039 | zstave); | |
2040 | ||
2041 | xlen = fgkIBCoolPipeXDist/2 - pipe->GetRmax() - fgkIBCarbonPaperThick | |
2042 | - fgkIBCarbonFleeceThick; | |
2043 | TGeoBBox *fleecmid = new TGeoBBox(xlen, fgkIBCarbonFleeceThick/2, zstave); | |
2044 | ||
2045 | xlen = xstave - fgkIBCoolPipeXDist/2 - pipe->GetRmax() | |
2046 | - fgkIBCarbonPaperThick - fgkIBCarbonFleeceThick; | |
2047 | TGeoBBox *fleeclr = new TGeoBBox(xlen/2, fgkIBCarbonFleeceThick/2, zstave); | |
2048 | ||
2049 | // The spaceframe structure | |
2050 | TGeoTrd1 *topv = new TGeoTrd1(0, fgkIBTopVertexWidth/2, zstave, | |
2051 | fgkIBTopVertexHeight/2); | |
2052 | ||
2053 | TGeoTrd1 *sidev = new TGeoTrd1(0, fgkIBSideVertexWidth/2, zstave, | |
2054 | fgkIBSideVertexHeight/2); | |
2055 | ||
2056 | TGeoBBox *topfil = new TGeoBBox(fgkIBTopFilamentLength/2, | |
2057 | fgkIBTopFilamentSide/2, | |
2058 | fgkIBTopFilamentSide/2); | |
2059 | ||
2060 | // The half stave container (an XTru to avoid overlaps between neighbours) | |
2061 | beta = TMath::ATan(2*sidev->GetDz()/sidev->GetDx2()); | |
2062 | gamma = TMath::PiOver2() - beta; | |
2063 | ||
2064 | layerHeight = 2*( kapCable->GetDY() + aluCable->GetDY() + glue->GetDY() | |
2065 | + fleecbot->GetDY() + cfplate->GetDY() + cpaplr->GetDY() | |
2066 | + fleeclr->GetDY() ); | |
2067 | ||
2068 | xv[0] = xstave; | |
2069 | yv[0] = 0; | |
2070 | xv[1] = xv[0]; | |
2071 | yv[1] = layerHeight + fgkIBSideVertexHeight; | |
2072 | xv[2] = fgkIBTopVertexWidth/2; | |
2073 | yv[2] = fgkIBStaveHeight + 2*topfil->GetDZ(); | |
2074 | for (Int_t i = 0; i<nv/2; i++) { | |
2075 | xv[3+i] = -xv[2-i]; | |
2076 | yv[3+i] = yv[2-i]; | |
2077 | } | |
2078 | ||
2079 | TGeoXtru *mechStruct = new TGeoXtru(2); | |
2080 | mechStruct->DefinePolygon(nv, xv, yv); | |
2081 | mechStruct->DefineSection(0,-zstave-topfil->GetDY()); | |
2082 | mechStruct->DefineSection(1, zstave+topfil->GetDY()); | |
2083 | ||
2084 | ||
2085 | // We have all shapes: now create the real volumes | |
2086 | ||
2087 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
2088 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); | |
2089 | TGeoMedium *medM55J6K = mgr->GetMedium("ITS_M55J6K$"); | |
2090 | TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$"); | |
2091 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); | |
2092 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
2093 | TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$"); | |
2094 | TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); | |
2095 | TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$"); | |
2096 | TGeoMedium *medAluminum = mgr->GetMedium("ITS_ALUMINUM$"); | |
2097 | ||
2098 | ||
2099 | char volname[30]; | |
2100 | snprintf(volname, 30, "%s%d_StaveStruct", | |
2101 | AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); | |
2102 | TGeoVolume *mechStavVol = new TGeoVolume(volname, mechStruct, medAir); | |
2103 | mechStavVol->SetLineColor(12); | |
2104 | mechStavVol->SetFillColor(12); | |
2105 | mechStavVol->SetVisibility(kTRUE); | |
2106 | ||
2107 | TGeoVolume *kapCableVol = new TGeoVolume("FPCKapton", kapCable, medKapton); | |
2108 | kapCableVol->SetLineColor(kBlue); | |
2109 | kapCableVol->SetFillColor(kBlue); | |
2110 | ||
2111 | TGeoVolume *aluCableVol = new TGeoVolume("FPCAluminum", | |
2112 | aluCable, medAluminum); | |
2113 | aluCableVol->SetLineColor(kCyan); | |
2114 | aluCableVol->SetFillColor(kCyan); | |
2115 | ||
2116 | TGeoVolume *glueVol = new TGeoVolume("Glue", glue, medGlue); | |
2117 | glueVol->SetLineColor(kBlack); | |
2118 | glueVol->SetFillColor(kBlack); | |
2119 | ||
2120 | TGeoVolume *fleecbotVol = new TGeoVolume("CarbonFleeceBottom", | |
2121 | fleecbot, medCarbonFleece); | |
2122 | fleecbotVol->SetFillColor(kViolet); | |
2123 | fleecbotVol->SetLineColor(kViolet); | |
2124 | ||
2125 | TGeoVolume *cfplateVol = new TGeoVolume("CFPlate", cfplate, medK13D2U2k); | |
2126 | cfplateVol->SetFillColor(5); // Yellow | |
2127 | cfplateVol->SetLineColor(5); | |
2128 | ||
2129 | TGeoVolume *pipeVol = new TGeoVolume("PolyimidePipe", pipe, medKapton); | |
2130 | pipeVol->SetFillColor(35); // Blue shade | |
2131 | pipeVol->SetLineColor(35); | |
2132 | ||
2133 | TGeoVolume *waterVol= new TGeoVolume("Water", water, medWater); | |
2134 | waterVol->SetFillColor(4); // Bright blue | |
2135 | waterVol->SetLineColor(4); | |
2136 | ||
2137 | TGeoVolume *cpaptubVol = new TGeoVolume("ThermasolPipeCover", | |
2138 | cpaptub, medFGS003); | |
2139 | cpaptubVol->SetFillColor(2); // Red | |
2140 | cpaptubVol->SetLineColor(2); | |
2141 | ||
2142 | TGeoVolume *cpapvertVol = new TGeoVolume("ThermasolVertical", | |
2143 | cpapvert, medFGS003); | |
2144 | cpapvertVol->SetFillColor(2); // Red | |
2145 | cpapvertVol->SetLineColor(2); | |
2146 | ||
2147 | TGeoVolume *cpapmidVol = new TGeoVolume("ThermasolMiddle", | |
2148 | cpapmid, medFGS003); | |
2149 | cpapmidVol->SetFillColor(2); // Red | |
2150 | cpapmidVol->SetLineColor(2); | |
2151 | ||
2152 | TGeoVolume *cpaplrVol = new TGeoVolume("ThermasolLeftRight", | |
2153 | cpaplr, medFGS003); | |
2154 | cpaplrVol->SetFillColor(2); // Red | |
2155 | cpaplrVol->SetLineColor(2); | |
2156 | ||
2157 | TGeoVolume *fleecpipeVol = new TGeoVolume("CarbonFleecePipeCover", | |
2158 | fleecpipe, medCarbonFleece); | |
2159 | fleecpipeVol->SetFillColor(28); // Brown shade | |
2160 | fleecpipeVol->SetLineColor(28); | |
2161 | ||
2162 | TGeoVolume *fleecvertVol = new TGeoVolume("CarbonFleeceVertical", | |
2163 | fleecvert, medCarbonFleece); | |
2164 | fleecvertVol->SetFillColor(28); // Brown shade | |
2165 | fleecvertVol->SetLineColor(28); | |
2166 | ||
2167 | TGeoVolume *fleecmidVol = new TGeoVolume("CarbonFleeceMiddle", | |
2168 | fleecmid, medCarbonFleece); | |
2169 | fleecmidVol->SetFillColor(28); // Brown shade | |
2170 | fleecmidVol->SetLineColor(28); | |
2171 | ||
2172 | TGeoVolume *fleeclrVol = new TGeoVolume("CarbonFleeceLeftRight", | |
2173 | fleeclr, medCarbonFleece); | |
2174 | fleeclrVol->SetFillColor(28); // Brown shade | |
2175 | fleeclrVol->SetLineColor(28); | |
2176 | ||
2177 | TGeoVolume *topvVol = new TGeoVolume("TopVertex", topv, medM55J6K); | |
2178 | topvVol->SetFillColor(12); // Gray shade | |
2179 | topvVol->SetLineColor(12); | |
2180 | ||
2181 | TGeoVolume *sidevVol = new TGeoVolume("SideVertex", sidev, medM55J6K); | |
2182 | sidevVol->SetFillColor(12); // Gray shade | |
2183 | sidevVol->SetLineColor(12); | |
2184 | ||
2185 | TGeoVolume *topfilVol = new TGeoVolume("TopFilament", topfil, medM60J3K); | |
2186 | topfilVol->SetFillColor(12); // Gray shade | |
2187 | topfilVol->SetLineColor(12); | |
2188 | ||
2189 | ||
2190 | // Now build up the half stave | |
2191 | ypos = kapCable->GetDY(); | |
2192 | if (fBuildLevel < 4) // Kapton | |
2193 | mechStavVol->AddNode(kapCableVol, 1, new TGeoTranslation(0, ypos, 0)); | |
2194 | ||
2195 | ypos += (kapCable->GetDY() + aluCable->GetDY()); | |
2196 | if (fBuildLevel < 1) // Aluminum | |
2197 | mechStavVol->AddNode(aluCableVol, 1, new TGeoTranslation(0, ypos, 0)); | |
2198 | ||
2199 | ypos += (aluCable->GetDY() + glue->GetDY()); | |
2200 | if (fBuildLevel < 2) // Glue | |
2201 | mechStavVol->AddNode(glueVol, 1, new TGeoTranslation(0, ypos, 0)); | |
2202 | ||
2203 | ypos += (glue->GetDY() + fleecbot->GetDY()); | |
2204 | if (fBuildLevel < 5) // Carbon | |
2205 | mechStavVol->AddNode(fleecbotVol, 1, new TGeoTranslation(0, ypos, 0)); | |
2206 | ||
2207 | ypos += (fleecbot->GetDY() + cfplate->GetDY()); | |
2208 | if (fBuildLevel < 5) // Carbon | |
2209 | mechStavVol->AddNode(cfplateVol, 1, new TGeoTranslation(0, ypos, 0)); | |
2210 | ||
2211 | ylay = ypos + cfplate->GetDY(); // The level where tubes etc. lay | |
2212 | ||
2213 | xpos = fgkIBCoolPipeXDist/2; | |
2214 | ypos = ylay + pipe->GetRmax(); | |
2215 | if (fBuildLevel < 4) { // Kapton | |
2216 | mechStavVol->AddNode(pipeVol, 1, new TGeoTranslation(-xpos, ypos, 0)); | |
2217 | mechStavVol->AddNode(pipeVol, 2, new TGeoTranslation( xpos, ypos, 0)); | |
2218 | } | |
2219 | ||
2220 | if (fBuildLevel < 3) { // Water | |
2221 | mechStavVol->AddNode(waterVol, 1, new TGeoTranslation(-xpos, ypos, 0)); | |
2222 | mechStavVol->AddNode(waterVol, 2, new TGeoTranslation( xpos, ypos, 0)); | |
2223 | } | |
2224 | ||
2225 | if (fBuildLevel < 5) { // Carbon (stave components) | |
2226 | mechStavVol->AddNode(cpaptubVol, 1, new TGeoTranslation(-xpos, ypos, 0)); | |
2227 | mechStavVol->AddNode(cpaptubVol, 2, new TGeoTranslation( xpos, ypos, 0)); | |
2228 | ||
2229 | mechStavVol->AddNode(fleecpipeVol,1, new TGeoTranslation(-xpos, ypos, 0)); | |
2230 | mechStavVol->AddNode(fleecpipeVol,2, new TGeoTranslation( xpos, ypos, 0)); | |
2231 | ||
2232 | xpos = fgkIBCoolPipeXDist/2 - pipe->GetRmax() - cpapvert->GetDX(); | |
2233 | ypos = ylay + cpapvert->GetDY(); | |
2234 | mechStavVol->AddNode(cpapvertVol, 1, new TGeoTranslation(-xpos, ypos, 0)); | |
2235 | mechStavVol->AddNode(cpapvertVol, 2, new TGeoTranslation( xpos, ypos, 0)); | |
2236 | ||
2237 | xpos = fgkIBCoolPipeXDist/2 + pipe->GetRmax() + cpapvert->GetDX(); | |
2238 | mechStavVol->AddNode(cpapvertVol, 3, new TGeoTranslation(-xpos, ypos, 0)); | |
2239 | mechStavVol->AddNode(cpapvertVol, 4, new TGeoTranslation( xpos, ypos, 0)); | |
2240 | ||
2241 | ypos = ylay + fgkIBCarbonPaperThick/2; | |
2242 | mechStavVol->AddNode(cpapmidVol, 1, new TGeoTranslation(0, ypos, 0)); | |
2243 | ||
2244 | xpos = xstave - cpaplr->GetDX(); | |
2245 | mechStavVol->AddNode(cpaplrVol, 1, new TGeoTranslation(-xpos, ypos, 0)); | |
2246 | mechStavVol->AddNode(cpaplrVol, 2, new TGeoTranslation( xpos, ypos, 0)); | |
2247 | ||
2248 | xpos = fgkIBCoolPipeXDist/2 - pipe->GetRmax() - 2*cpapvert->GetDX() | |
2249 | - fleecvert->GetDX(); | |
2250 | ypos = ylay + fgkIBCarbonPaperThick + fleecvert->GetDY(); | |
2251 | mechStavVol->AddNode(fleecvertVol, 1, new TGeoTranslation(-xpos, ypos, 0)); | |
2252 | mechStavVol->AddNode(fleecvertVol, 2, new TGeoTranslation( xpos, ypos, 0)); | |
2253 | ||
2254 | xpos = fgkIBCoolPipeXDist/2 + pipe->GetRmax() + 2*cpapvert->GetDX() | |
2255 | + fleecvert->GetDX(); | |
2256 | mechStavVol->AddNode(fleecvertVol, 3, new TGeoTranslation(-xpos, ypos, 0)); | |
2257 | mechStavVol->AddNode(fleecvertVol, 4, new TGeoTranslation( xpos, ypos, 0)); | |
2258 | ||
2259 | ypos = ylay + fgkIBCarbonPaperThick + fgkIBCarbonFleeceThick/2; | |
2260 | mechStavVol->AddNode(fleecmidVol, 1, new TGeoTranslation(0, ypos, 0)); | |
2261 | ||
2262 | xpos = xstave - fleeclr->GetDX(); | |
2263 | mechStavVol->AddNode(fleeclrVol, 1, new TGeoTranslation(-xpos, ypos, 0)); | |
2264 | mechStavVol->AddNode(fleeclrVol, 2, new TGeoTranslation( xpos, ypos, 0)); | |
2265 | } | |
2266 | ||
2267 | ylay += (fgkIBCarbonPaperThick + fgkIBCarbonFleeceThick); | |
2268 | ||
2269 | if (fBuildLevel < 5) { // Carbon (spaceframe) | |
2270 | ypos = fgkIBStaveHeight - topv->GetDz(); // Due to rotation, z is on Y | |
2271 | mechStavVol->AddNode(topvVol, 1, | |
2272 | new TGeoCombiTrans(0, ypos, 0, | |
2273 | new TGeoRotation("",0,-90,0))); | |
2274 | ||
2275 | // beta and gamma were already computed when building mechStruct shape | |
2276 | xpos = xstave - TMath::Cos(gamma)*sidev->GetDz(); | |
2277 | ypos = ylay + TMath::Sin(gamma)*sidev->GetDz(); | |
2278 | beta *= TMath::RadToDeg(); // beta was rad, we need deg | |
2279 | ||
2280 | mechStavVol->AddNode(sidevVol, 1, | |
2281 | new TGeoCombiTrans(-xpos, ypos, 0, | |
2282 | new TGeoRotation("", 180-beta,90,0))); | |
2283 | mechStavVol->AddNode(sidevVol, 2, | |
2284 | new TGeoCombiTrans( xpos, ypos, 0, | |
2285 | new TGeoRotation("",-180+beta,90,0))); | |
2286 | ||
2287 | gamma *= TMath::RadToDeg(); // gamma was rad, we need deg | |
2288 | theta = 90. - fgkIBTopFilamentAlpha; | |
2289 | xpos = xstave/2 + topfil->GetDZ(); | |
2290 | ypos = ( layerHeight + fgkIBStaveHeight )/2 + | |
2291 | fgkIBSideVertexWidth*TMath::Sin(beta*TMath::DegToRad())/2 ; | |
2292 | for(int i=0; i<nFilaments; i++){ // i<28 (?) | |
2293 | // 1) Front Left Top Filament | |
2294 | zpos = -zstave + (i*2*topFilYLen) + topFilLProj/4; // ????? | |
2295 | mechStavVol->AddNode(topfilVol, i*4+1, | |
2296 | new TGeoCombiTrans( xpos, ypos, zpos, | |
2297 | new TGeoRotation("", 90, theta, 90-gamma))); | |
2298 | // 2) Front Right Top Filament | |
2299 | mechStavVol->AddNode(topfilVol, i*4+2, | |
2300 | new TGeoCombiTrans(-xpos, ypos, zpos, | |
2301 | new TGeoRotation("", 90,-theta,-90+gamma))); | |
2302 | // 3) Back Left Top Filament | |
2303 | zpos += topFilYLen; | |
2304 | mechStavVol->AddNode(topfilVol, i*4+3, | |
2305 | new TGeoCombiTrans( xpos, ypos, zpos, | |
2306 | new TGeoRotation("", 90,-theta, 90-gamma))); | |
2307 | // 4) Back Right Top Filament | |
2308 | mechStavVol->AddNode(topfilVol, i*4+4, | |
2309 | new TGeoCombiTrans(-xpos, ypos, zpos, | |
2310 | new TGeoRotation("", 90, theta,-90+gamma))); | |
2311 | } | |
2312 | } | |
2313 | ||
2314 | ||
2315 | // Done, return the stave structure | |
2316 | return mechStavVol; | |
2317 | } | |
2318 | ||
b705c75b | 2319 | //________________________________________________________________________ |
2b9468b2 | 2320 | TGeoVolume* AliITSUv1Layer::CreateStaveOuterB(const TGeoManager *mgr){ |
b705c75b | 2321 | // |
852af72e | 2322 | // Create the chip stave for the Outer Barrel |
b705c75b | 2323 | // |
2324 | // Input: | |
b705c75b | 2325 | // mgr : the GeoManager (used only to get the proper material) |
2326 | // | |
2327 | // Output: | |
2328 | // | |
2329 | // Return: | |
2330 | // | |
2331 | // Created: 20 Dec 2013 Mario Sitta | |
2b9468b2 | 2332 | // Updated: 12 Mar 2014 Mario Sitta |
b705c75b | 2333 | // |
2334 | ||
852af72e | 2335 | TGeoVolume *mechStavVol = 0; |
b705c75b | 2336 | |
2337 | switch (fStaveModel) { | |
2338 | case AliITSUv1::kOBModelDummy: | |
2b9468b2 | 2339 | mechStavVol = CreateStaveModelOuterBDummy(mgr); |
b705c75b | 2340 | break; |
2341 | case AliITSUv1::kOBModel0: | |
2b9468b2 | 2342 | mechStavVol = CreateStaveModelOuterB0(mgr); |
b705c75b | 2343 | break; |
2344 | case AliITSUv1::kOBModel1: | |
1fc6eff6 | 2345 | case AliITSUv1::kOBModel2: |
2346 | mechStavVol = CreateStaveModelOuterB12(mgr); | |
b705c75b | 2347 | break; |
2348 | default: | |
2349 | AliFatal(Form("Unknown stave model %d",fStaveModel)); | |
2350 | break; | |
2351 | } | |
2352 | ||
852af72e | 2353 | return mechStavVol; |
b705c75b | 2354 | } |
2355 | ||
2356 | //________________________________________________________________________ | |
2b9468b2 | 2357 | TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterBDummy(const TGeoManager *) const { |
b705c75b | 2358 | // |
2359 | // Create dummy stave | |
2360 | // | |
2361 | // Input: | |
b705c75b | 2362 | // mgr : the GeoManager (used only to get the proper material) |
2363 | // | |
2364 | // Output: | |
2365 | // | |
2366 | // Return: | |
2367 | // | |
2368 | // Created: 20 Dec 2013 Mario Sitta | |
2369 | // | |
2370 | ||
2371 | ||
2372 | // Done, return the stave structure | |
2373 | return 0; | |
2374 | } | |
2375 | ||
2376 | //________________________________________________________________________ | |
2b9468b2 | 2377 | TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB0(const TGeoManager *mgr){ |
b705c75b | 2378 | // |
2379 | // Creation of the mechanical stave structure for the Outer Barrel as in v0 | |
2b9468b2 | 2380 | // (we fake the module and halfstave volumes to have always |
2381 | // the same formal geometry hierarchy) | |
b705c75b | 2382 | // |
2383 | // Input: | |
b705c75b | 2384 | // mgr : the GeoManager (used only to get the proper material) |
2385 | // | |
2386 | // Output: | |
2387 | // | |
2388 | // Return: | |
2389 | // | |
2390 | // Created: 20 Dec 2013 Mario Sitta | |
2b9468b2 | 2391 | // Updated: 12 Mar 2014 Mario Sitta |
b705c75b | 2392 | // |
2393 | ||
2b9468b2 | 2394 | // Local variables |
2395 | Double_t xmod, ymod, zmod; | |
2396 | Double_t xlen, ylen, zlen; | |
2397 | Double_t ypos, zpos; | |
2398 | char volname[30]; | |
2399 | ||
2400 | // First create all needed shapes | |
2401 | ||
2402 | // The chip | |
2403 | xlen = fgkOBHalfStaveWidth; | |
1fc6eff6 | 2404 | ylen = 0.5*fChipThick; |
2b9468b2 | 2405 | zlen = fgkOBModuleZLength/2; |
2406 | ||
2407 | TGeoVolume *chipVol = CreateChipInnerB(xlen, ylen, zlen); | |
2408 | ||
2409 | xmod = ((TGeoBBox*)chipVol->GetShape())->GetDX(); | |
2410 | ymod = ((TGeoBBox*)chipVol->GetShape())->GetDY(); | |
2411 | zmod = ((TGeoBBox*)chipVol->GetShape())->GetDZ(); | |
2412 | ||
2413 | TGeoBBox *module = new TGeoBBox(xmod, ymod, zmod); | |
2414 | ||
2415 | zlen = fgkOBModuleZLength*fNModules; | |
2416 | TGeoBBox *hstave = new TGeoBBox(xlen, ylen, zlen/2); | |
2417 | ||
2418 | ||
2419 | // We have all shapes: now create the real volumes | |
2420 | ||
2421 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
2422 | ||
2423 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber); | |
2424 | TGeoVolume *modVol = new TGeoVolume(volname, module, medAir); | |
2425 | modVol->SetVisibility(kTRUE); | |
2426 | ||
2427 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber); | |
2428 | TGeoVolume *hstaveVol = new TGeoVolume(volname, hstave, medAir); | |
2429 | ||
2430 | ||
2431 | // Finally build it up | |
2432 | modVol->AddNode(chipVol, 0); | |
2433 | fHierarchy[kChip]=1; | |
2434 | ||
2435 | for (Int_t j=0; j<fNModules; j++) { | |
2436 | ypos = 0.021; // Remove small overlap - M.S: 21may13 | |
2437 | zpos = -hstave->GetDZ() + j*2*zmod + zmod; | |
2438 | hstaveVol->AddNode(modVol, j, new TGeoTranslation(0, ypos, zpos)); | |
2439 | fHierarchy[kModule]++; | |
2440 | } | |
2441 | ||
2442 | ||
b705c75b | 2443 | // Done, return the stave structure |
2b9468b2 | 2444 | return hstaveVol; |
b705c75b | 2445 | } |
2446 | ||
2447 | //________________________________________________________________________ | |
1fc6eff6 | 2448 | TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB12(const TGeoManager *mgr){ |
b705c75b | 2449 | // |
c55b10c2 | 2450 | // Create the mechanical half stave structure |
2451 | // for the Outer Barrel as in TDR | |
b705c75b | 2452 | // |
2453 | // Input: | |
b705c75b | 2454 | // mgr : the GeoManager (used only to get the proper material) |
2455 | // | |
2456 | // Output: | |
2457 | // | |
2458 | // Return: | |
2459 | // | |
2460 | // Created: 20 Nov 2013 Anastasia Barbano | |
2461 | // Updated: 16 Jan 2014 Mario Sitta | |
c55b10c2 | 2462 | // Updated: 24 Feb 2014 Mario Sitta |
1fc6eff6 | 2463 | // Updated: 11 Nov 2014 Mario Sitta Model2 |
f1496ca7 | 2464 | // Updated: 03 Dec 2014 Mario Sitta Revised with C.Gargiulo latest infos |
b705c75b | 2465 | // |
2466 | ||
c55b10c2 | 2467 | |
2468 | // Local parameters | |
2469 | Double_t yFlex1 = fgkOBFlexCableAlThick; | |
2470 | Double_t yFlex2 = fgkOBFlexCableKapThick; | |
1fc6eff6 | 2471 | Double_t flexOverlap = 5; // to be checked - unused for the time being |
c55b10c2 | 2472 | Double_t xHalfSt = fgkOBHalfStaveWidth/2; |
f1496ca7 | 2473 | Double_t yCFleece = fgkOBCarbonFleeceThick; |
2474 | Double_t yGraph = fgkOBGraphiteFoilThick; | |
c55b10c2 | 2475 | |
c55b10c2 | 2476 | Double_t ymod, zmod; |
2b9468b2 | 2477 | Double_t xtru[12], ytru[12]; |
c55b10c2 | 2478 | Double_t xpos, ypos, ypos1, zpos/*, zpos5cm*/; |
1fc6eff6 | 2479 | Double_t xlen, ylen, zlen; |
c55b10c2 | 2480 | char volname[30]; |
2481 | ||
1fc6eff6 | 2482 | Double_t rCoolMin, rCoolMax; |
2483 | if (fStaveModel == AliITSUv1::kOBModel1) | |
2484 | rCoolMin = fgkOBCoolTubeInnerDM1/2; | |
2485 | else | |
2486 | rCoolMin = fgkOBCoolTubeInnerD/2; | |
2487 | ||
2488 | rCoolMax = rCoolMin + fgkOBCoolTubeThick; | |
c55b10c2 | 2489 | |
2b9468b2 | 2490 | zlen = (fNModules*fgkOBModuleZLength + (fNModules-1)*fgkOBModuleGap)/2; |
c55b10c2 | 2491 | |
2492 | ||
2493 | // First create all needed shapes | |
2494 | ||
2495 | TGeoVolume *moduleVol = CreateModuleOuterB(); | |
2496 | moduleVol->SetVisibility(kTRUE); | |
2497 | ymod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDY(); | |
2498 | zmod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDZ(); | |
2499 | ||
2500 | TGeoBBox *busAl = new TGeoBBox("BusAl", xHalfSt, fgkOBBusCableAlThick/2, | |
2501 | zlen); | |
2502 | TGeoBBox *busKap = new TGeoBBox("BusKap", xHalfSt, fgkOBBusCableKapThick/2, | |
2503 | zlen); | |
2504 | ||
1fc6eff6 | 2505 | TGeoBBox *glue = new TGeoBBox("Glue", xHalfSt, fgkOBGlueThick/2, zlen); |
2506 | ||
c55b10c2 | 2507 | TGeoBBox *coldPlate = new TGeoBBox("ColdPlate", fgkOBHalfStaveWidth/2, |
2508 | fgkOBColdPlateThick/2, zlen); | |
2509 | ||
f1496ca7 | 2510 | TGeoBBox *fleeccent = new TGeoBBox("FleeceCent", xHalfSt, |
2511 | yCFleece/2, zlen); | |
2512 | ||
c55b10c2 | 2513 | TGeoTube *coolTube = new TGeoTube("CoolingTube", rCoolMin, rCoolMax, zlen); |
8397c175 | 2514 | TGeoTube *coolWater = new TGeoTube("CoolingWater", 0., rCoolMin, zlen); |
c55b10c2 | 2515 | |
2516 | xlen = xHalfSt - fgkOBCoolTubeXDist/2 - coolTube->GetRmax(); | |
f1496ca7 | 2517 | TGeoBBox *graphlat = new TGeoBBox("GraphLateral", xlen/2, yGraph/2, zlen); |
c55b10c2 | 2518 | |
2519 | xlen = fgkOBCoolTubeXDist/2 - coolTube->GetRmax(); | |
f1496ca7 | 2520 | TGeoBBox *graphmid = new TGeoBBox("GraphMiddle", xlen, yGraph/2, zlen); |
c55b10c2 | 2521 | |
f1496ca7 | 2522 | ylen = coolTube->GetRmax() - yGraph; |
2523 | TGeoBBox *graphvert = new TGeoBBox("GraphVertical", yGraph/2, ylen/2, zlen); | |
c55b10c2 | 2524 | |
2525 | TGeoTubeSeg *graphtub = new TGeoTubeSeg("GraphTube", rCoolMax, | |
f1496ca7 | 2526 | rCoolMax+yGraph, zlen, |
c55b10c2 | 2527 | 180., 360.); |
2528 | ||
f1496ca7 | 2529 | xlen = xHalfSt - fgkOBCoolTubeXDist/2 - coolTube->GetRmax() - yGraph; |
2530 | TGeoBBox *fleeclat = new TGeoBBox("FleecLateral", xlen/2, yCFleece/2, zlen); | |
c55b10c2 | 2531 | |
f1496ca7 | 2532 | xlen = fgkOBCoolTubeXDist/2 - coolTube->GetRmax() - yGraph; |
2533 | TGeoBBox *fleecmid = new TGeoBBox("FleecMiddle", xlen, yCFleece/2, zlen); | |
c55b10c2 | 2534 | |
f1496ca7 | 2535 | ylen = coolTube->GetRmax() - yGraph - yCFleece; |
2536 | TGeoBBox *fleecvert = new TGeoBBox("FleecVertical", yCFleece/2, ylen/2, | |
2537 | zlen); | |
c55b10c2 | 2538 | |
f1496ca7 | 2539 | TGeoTubeSeg *fleectub = new TGeoTubeSeg("FleecTube", rCoolMax+yGraph, |
2540 | rCoolMax+yCFleece+yGraph, | |
c55b10c2 | 2541 | zlen, 180., 360.); |
2542 | ||
2543 | TGeoBBox *flex1_5cm = new TGeoBBox("Flex1MV_5cm",xHalfSt,yFlex1/2,flexOverlap/2); | |
2544 | TGeoBBox *flex2_5cm = new TGeoBBox("Flex2MV_5cm",xHalfSt,yFlex2/2,flexOverlap/2); | |
2545 | ||
2b9468b2 | 2546 | // The half stave container (an XTru to avoid overlaps between neightbours) |
1fc6eff6 | 2547 | ylen = ymod + busAl->GetDY() + busKap->GetDY() + coldPlate->GetDY() |
f1496ca7 | 2548 | + fleeccent->GetDY() + graphlat->GetDY() + fleeclat->GetDY(); |
1fc6eff6 | 2549 | if (fStaveModel == AliITSUv1::kOBModel2) |
2550 | ylen += 2*glue->GetDY(); | |
2551 | ||
2b9468b2 | 2552 | xtru[0] = xHalfSt; |
2553 | ytru[0] = 0; | |
2554 | xtru[1] = xtru[0]; | |
1fc6eff6 | 2555 | ytru[1] = -2*ylen; |
2b9468b2 | 2556 | xtru[2] = fgkOBCoolTubeXDist/2 + fleectub->GetRmax(); |
2557 | ytru[2] = ytru[1]; | |
2558 | xtru[3] = xtru[2]; | |
2559 | ytru[3] = ytru[2] - (coolTube->GetRmax() + fleectub->GetRmax()); | |
2560 | xtru[4] = fgkOBCoolTubeXDist/2 - fleectub->GetRmax(); | |
2561 | ytru[4] = ytru[3]; | |
2562 | xtru[5] = xtru[4]; | |
2563 | ytru[5] = ytru[2]; | |
2564 | for (Int_t i = 0; i<6; i++) { | |
2565 | xtru[6+i] = -xtru[5-i]; | |
2566 | ytru[6+i] = ytru[5-i]; | |
2567 | } | |
2568 | TGeoXtru *halfStave = new TGeoXtru(2); | |
2569 | halfStave->DefinePolygon(12, xtru, ytru); | |
2570 | halfStave->DefineSection(0,-fZLength/2); | |
2571 | halfStave->DefineSection(1, fZLength/2); | |
c55b10c2 | 2572 | |
2573 | ||
2574 | // We have all shapes: now create the real volumes | |
2575 | ||
b705c75b | 2576 | TGeoMedium *medAluminum = mgr->GetMedium("ITS_ALUMINUM$"); |
f1496ca7 | 2577 | TGeoMedium *medK13D2U120 = mgr->GetMedium("ITS_K13D2U120$"); |
b705c75b | 2578 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); |
b705c75b | 2579 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); |
2580 | TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$"); | |
2581 | TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); //amec thermasol | |
2582 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
1fc6eff6 | 2583 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); |
b705c75b | 2584 | |
2585 | ||
1fc6eff6 | 2586 | TGeoVolume *busAlVol = new TGeoVolume("PowerBusAlVol", busAl , medAluminum); |
c55b10c2 | 2587 | busAlVol->SetLineColor(kCyan); |
2588 | busAlVol->SetFillColor(busAlVol->GetLineColor()); | |
2589 | busAlVol->SetFillStyle(4000); // 0% transparent | |
b705c75b | 2590 | |
1fc6eff6 | 2591 | TGeoVolume *busKapVol = new TGeoVolume("PowerBusKapVol", busKap, medKapton); |
c55b10c2 | 2592 | busKapVol->SetLineColor(kBlue); |
2593 | busKapVol->SetFillColor(busKapVol->GetLineColor()); | |
2594 | busKapVol->SetFillStyle(4000); // 0% transparent | |
b705c75b | 2595 | |
c55b10c2 | 2596 | TGeoVolume *coldPlateVol = new TGeoVolume("ColdPlateVol", |
f1496ca7 | 2597 | coldPlate, medK13D2U120); |
c55b10c2 | 2598 | coldPlateVol->SetLineColor(kYellow-3); |
2599 | coldPlateVol->SetFillColor(coldPlateVol->GetLineColor()); | |
2600 | coldPlateVol->SetFillStyle(4000); // 0% transparent | |
b705c75b | 2601 | |
f1496ca7 | 2602 | TGeoVolume *fleeccentVol = new TGeoVolume("CarbonFleeceCentral", |
2603 | fleeccent, medCarbonFleece); | |
2604 | fleeccentVol->SetLineColor(kViolet); | |
2605 | fleeccentVol->SetFillColor(fleeccentVol->GetLineColor()); | |
2606 | fleeccentVol->SetFillStyle(4000); // 0% transparent | |
2607 | ||
1fc6eff6 | 2608 | TGeoVolume *glueVol = new TGeoVolume("GlueVol", glue, medGlue); |
2609 | glueVol->SetLineColor(kBlack); | |
2610 | glueVol->SetFillColor(glueVol->GetLineColor()); | |
2611 | glueVol->SetFillStyle(4000); // 0% transparent | |
2612 | ||
c55b10c2 | 2613 | TGeoVolume *coolTubeVol = new TGeoVolume("CoolingTubeVol", |
2614 | coolTube, medKapton); | |
2615 | coolTubeVol->SetLineColor(kGray); | |
2616 | coolTubeVol->SetFillColor(coolTubeVol->GetLineColor()); | |
2617 | coolTubeVol->SetFillStyle(4000); // 0% transparent | |
2618 | ||
8397c175 | 2619 | TGeoVolume *coolWaterVol; |
2620 | coolWaterVol = new TGeoVolume("CoolingWaterVol", coolWater, medWater); | |
c55b10c2 | 2621 | coolWaterVol->SetLineColor(kBlue); |
2622 | coolWaterVol->SetFillColor(coolWaterVol->GetLineColor()); | |
2623 | coolWaterVol->SetFillStyle(4000); // 0% transparent | |
2624 | ||
2625 | TGeoVolume *graphlatVol = new TGeoVolume("GraphiteFoilLateral", | |
2626 | graphlat, medFGS003); | |
2627 | graphlatVol->SetLineColor(kGreen); | |
2628 | graphlatVol->SetFillColor(graphlatVol->GetLineColor()); | |
2629 | graphlatVol->SetFillStyle(4000); // 0% transparent | |
2630 | ||
2631 | TGeoVolume *graphmidVol = new TGeoVolume("GraphiteFoilMiddle", | |
2632 | graphmid, medFGS003); | |
2633 | graphmidVol->SetLineColor(kGreen); | |
2634 | graphmidVol->SetFillColor(graphmidVol->GetLineColor()); | |
2635 | graphmidVol->SetFillStyle(4000); // 0% transparent | |
2636 | ||
2637 | TGeoVolume *graphvertVol = new TGeoVolume("GraphiteFoilVertical", | |
2638 | graphvert, medFGS003); | |
2639 | graphvertVol->SetLineColor(kGreen); | |
2640 | graphvertVol->SetFillColor(graphvertVol->GetLineColor()); | |
2641 | graphvertVol->SetFillStyle(4000); // 0% transparent | |
2642 | ||
2643 | TGeoVolume *graphtubVol = new TGeoVolume("GraphiteFoilPipeCover", | |
2644 | graphtub, medFGS003); | |
2645 | graphtubVol->SetLineColor(kGreen); | |
2646 | graphtubVol->SetFillColor(graphtubVol->GetLineColor()); | |
2647 | graphtubVol->SetFillStyle(4000); // 0% transparent | |
2648 | ||
2649 | TGeoVolume *fleeclatVol = new TGeoVolume("CarbonFleeceLateral", | |
2650 | fleeclat, medCarbonFleece); | |
2651 | fleeclatVol->SetLineColor(kViolet); | |
2652 | fleeclatVol->SetFillColor(fleeclatVol->GetLineColor()); | |
2653 | fleeclatVol->SetFillStyle(4000); // 0% transparent | |
2654 | ||
2655 | TGeoVolume *fleecmidVol = new TGeoVolume("CarbonFleeceMiddle", | |
2656 | fleecmid, medCarbonFleece); | |
2657 | fleecmidVol->SetLineColor(kViolet); | |
2658 | fleecmidVol->SetFillColor(fleecmidVol->GetLineColor()); | |
2659 | fleecmidVol->SetFillStyle(4000); // 0% transparent | |
2660 | ||
2661 | TGeoVolume *fleecvertVol = new TGeoVolume("CarbonFleeceVertical", | |
2662 | fleecvert, medCarbonFleece); | |
2663 | fleecvertVol->SetLineColor(kViolet); | |
2664 | fleecvertVol->SetFillColor(fleecvertVol->GetLineColor()); | |
2665 | fleecvertVol->SetFillStyle(4000); // 0% transparent | |
2666 | ||
2667 | TGeoVolume *fleectubVol = new TGeoVolume("CarbonFleecePipeCover", | |
2668 | fleectub, medCarbonFleece); | |
2669 | fleectubVol->SetLineColor(kViolet); | |
2670 | fleectubVol->SetFillColor(fleectubVol->GetLineColor()); | |
2671 | fleectubVol->SetFillStyle(4000); // 0% transparent | |
2672 | ||
2673 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber); | |
2674 | TGeoVolume *halfStaveVol = new TGeoVolume(volname, halfStave, medAir); | |
2675 | // halfStaveVol->SetLineColor(12); | |
2676 | // halfStaveVol->SetFillColor(12); | |
2677 | // halfStaveVol->SetVisibility(kTRUE); | |
b705c75b | 2678 | |
b705c75b | 2679 | |
b705c75b | 2680 | TGeoVolume *flex1_5cmVol = new TGeoVolume("Flex1Vol5cm",flex1_5cm,medAluminum); |
2681 | TGeoVolume *flex2_5cmVol = new TGeoVolume("Flex2Vol5cm",flex2_5cm,medKapton); | |
b705c75b | 2682 | |
c55b10c2 | 2683 | |
b705c75b | 2684 | flex1_5cmVol->SetLineColor(kRed); |
2685 | flex2_5cmVol->SetLineColor(kGreen); | |
b705c75b | 2686 | |
b705c75b | 2687 | |
c55b10c2 | 2688 | // Now build up the half stave |
2b9468b2 | 2689 | ypos = - busKap->GetDY(); |
1fc6eff6 | 2690 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 4) || // Kapton |
2691 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 5) ) | |
8397c175 | 2692 | halfStaveVol->AddNode(busKapVol, 1, new TGeoTranslation(0, ypos, 0)); |
b705c75b | 2693 | |
c55b10c2 | 2694 | ypos -= (busKap->GetDY() + busAl->GetDY()); |
1fc6eff6 | 2695 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 1) || // Aluminum |
2696 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 2) ) | |
8397c175 | 2697 | halfStaveVol->AddNode(busAlVol, 1, new TGeoTranslation(0, ypos, 0)); |
b705c75b | 2698 | |
1fc6eff6 | 2699 | ypos -= busAl->GetDY(); |
2700 | ||
2701 | if (fStaveModel == AliITSUv1::kOBModel2) { | |
2702 | ypos -= glue->GetDY(); | |
2703 | if (fBuildLevel < 3) // Glue | |
2704 | halfStaveVol->AddNode(glueVol, 1, new TGeoTranslation(0, ypos, 0)); | |
2705 | ypos -= glue->GetDY(); | |
2706 | } | |
2707 | ||
2708 | ypos -= ymod; | |
2b9468b2 | 2709 | for (Int_t j=0; j<fNModules; j++) { |
c55b10c2 | 2710 | zpos = -zlen + j*(2*zmod + fgkOBModuleGap) + zmod; |
2711 | halfStaveVol->AddNode(moduleVol, j, new TGeoTranslation(0, ypos, zpos)); | |
2712 | fHierarchy[kModule]++; | |
b705c75b | 2713 | } |
c55b10c2 | 2714 | |
1fc6eff6 | 2715 | ypos -= ymod; |
2716 | ||
2717 | if (fStaveModel == AliITSUv1::kOBModel2) { | |
2718 | ypos -= glue->GetDY(); | |
2719 | if (fBuildLevel < 3) // Glue | |
2720 | halfStaveVol->AddNode(glueVol, 2, new TGeoTranslation(0, ypos, 0)); | |
2721 | ypos -= glue->GetDY(); | |
2722 | } | |
2723 | ||
f1496ca7 | 2724 | ypos -= fleeccent->GetDY(); |
2725 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon | |
2726 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) | |
2727 | halfStaveVol->AddNode(fleeccentVol, 1, new TGeoTranslation(0, ypos, 0)); | |
2728 | ypos -= fleeccent->GetDY(); | |
2729 | ||
1fc6eff6 | 2730 | ypos -= coldPlate->GetDY(); |
2731 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon | |
2732 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) | |
8397c175 | 2733 | halfStaveVol->AddNode(coldPlateVol, 1, new TGeoTranslation(0, ypos, 0)); |
c55b10c2 | 2734 | |
2735 | xpos = fgkOBCoolTubeXDist/2; | |
2736 | ypos1 = ypos - (coldPlate->GetDY() + coolTube->GetRmax()); | |
1fc6eff6 | 2737 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 3) || // Water |
2738 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 4) ) { | |
8397c175 | 2739 | halfStaveVol->AddNode(coolWaterVol, 1, new TGeoTranslation(-xpos, ypos1, 0)); |
2740 | halfStaveVol->AddNode(coolWaterVol, 2, new TGeoTranslation( xpos, ypos1, 0)); | |
2741 | } | |
1fc6eff6 | 2742 | |
2743 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 4) || // Kapton | |
2744 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 5) ) { | |
8397c175 | 2745 | halfStaveVol->AddNode(coolTubeVol,1, new TGeoTranslation(-xpos, ypos1, 0)); |
2746 | halfStaveVol->AddNode(coolTubeVol,2, new TGeoTranslation( xpos, ypos1, 0)); | |
2747 | } | |
c55b10c2 | 2748 | |
1fc6eff6 | 2749 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon |
2750 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) { | |
8397c175 | 2751 | halfStaveVol->AddNode(graphtubVol,1, new TGeoTranslation(-xpos, ypos1, 0)); |
2752 | halfStaveVol->AddNode(graphtubVol,2, new TGeoTranslation( xpos, ypos1, 0)); | |
c55b10c2 | 2753 | |
8397c175 | 2754 | halfStaveVol->AddNode(fleectubVol,1, new TGeoTranslation(-xpos, ypos1, 0)); |
2755 | halfStaveVol->AddNode(fleectubVol,2, new TGeoTranslation( xpos, ypos1, 0)); | |
2756 | } | |
c55b10c2 | 2757 | |
2758 | xpos = xHalfSt - graphlat->GetDX(); | |
2759 | ypos1 = ypos - (coldPlate->GetDY() + graphlat->GetDY()); | |
1fc6eff6 | 2760 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon |
2761 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) { | |
8397c175 | 2762 | halfStaveVol->AddNode(graphlatVol,1, new TGeoTranslation(-xpos, ypos1, 0)); |
2763 | halfStaveVol->AddNode(graphlatVol,2, new TGeoTranslation( xpos, ypos1, 0)); | |
2764 | ||
2765 | halfStaveVol->AddNode(graphmidVol,1, new TGeoTranslation(0, ypos1, 0)); | |
2766 | ||
2767 | xpos = xHalfSt - 2*graphlat->GetDX() + graphvert->GetDX(); | |
2768 | ypos1 = ypos - (coldPlate->GetDY()+2*graphlat->GetDY()+graphvert->GetDY()); | |
2769 | halfStaveVol->AddNode(graphvertVol,1,new TGeoTranslation(-xpos, ypos1, 0)); | |
2770 | halfStaveVol->AddNode(graphvertVol,2,new TGeoTranslation( xpos, ypos1, 0)); | |
2771 | xpos = graphmid->GetDX() - graphvert->GetDX(); | |
2772 | halfStaveVol->AddNode(graphvertVol,3,new TGeoTranslation(-xpos, ypos1, 0)); | |
2773 | halfStaveVol->AddNode(graphvertVol,4,new TGeoTranslation( xpos, ypos1, 0)); | |
2774 | } | |
c55b10c2 | 2775 | |
2776 | xpos = xHalfSt - fleeclat->GetDX(); | |
2777 | ypos1 = ypos - (coldPlate->GetDY() +2*graphlat->GetDY() +fleeclat->GetDY()); | |
1fc6eff6 | 2778 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon |
2779 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) { | |
8397c175 | 2780 | halfStaveVol->AddNode(fleeclatVol,1, new TGeoTranslation(-xpos, ypos1, 0)); |
2781 | halfStaveVol->AddNode(fleeclatVol,2, new TGeoTranslation( xpos, ypos1, 0)); | |
2782 | ||
2783 | halfStaveVol->AddNode(fleecmidVol, 1, new TGeoTranslation(0, ypos1, 0)); | |
2784 | ||
2785 | xpos = xHalfSt - 2*fleeclat->GetDX() + fleecvert->GetDX(); | |
2786 | ypos1 = ypos - (coldPlate->GetDY() +2*graphlat->GetDY() | |
2787 | + 2*fleeclat->GetDY() + fleecvert->GetDY()); | |
2788 | halfStaveVol->AddNode(fleecvertVol,1,new TGeoTranslation(-xpos, ypos1, 0)); | |
2789 | halfStaveVol->AddNode(fleecvertVol,2,new TGeoTranslation( xpos, ypos1, 0)); | |
2790 | xpos = fleecmid->GetDX() - fleecvert->GetDX(); | |
2791 | halfStaveVol->AddNode(fleecvertVol,3,new TGeoTranslation(-xpos, ypos1, 0)); | |
2792 | halfStaveVol->AddNode(fleecvertVol,4,new TGeoTranslation( xpos, ypos1, 0)); | |
2793 | } | |
c55b10c2 | 2794 | |
2795 | ||
2796 | //THE FOLLOWING IS ONLY A REMINDER FOR WHAT IS STILL MISSING | |
2797 | ||
2798 | // for (Int_t j=0; j<fNChips; j++) { | |
2799 | ||
2800 | // zpos = -(zact + (fNChips-1)*modGap)/2 + j*(zMod + modGap) + zMod/2; | |
2801 | // zpos5cm = -(zact + (fNChips-1)*modGap)/2 + (j+1)*(zMod + modGap) + flexOverlap/2 ; | |
2802 | ||
2803 | // halfStaveVol->AddNode(moduleVol, j, new TGeoTranslation(xPos, -ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + ymod, zpos)); | |
2804 | // halfStaveVol->AddNode(moduleVol, fNChips+j, new TGeoTranslation(-xPos, -ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + ymod +deltaY, zpos)); | |
2805 | ||
2806 | // if((j+1)!=fNChips){ | |
2807 | // halfStaveVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2,zpos5cm)); | |
2808 | // halfStaveVol->AddNode(flex1_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2 +deltaY,zpos5cm)); | |
2809 | // halfStaveVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2,zpos5cm)); | |
2810 | // halfStaveVol->AddNode(flex2_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2 +deltaY,zpos5cm)); | |
2811 | // } | |
2812 | // else { | |
2813 | // halfStaveVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos5cm-modGap)); | |
2814 | // halfStaveVol->AddNode(flex1_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 +deltaY,zpos5cm-modGap)); | |
2815 | // halfStaveVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate +2*ymod + yFlex1 + yFlex2/2,zpos5cm-modGap)); | |
2816 | // halfStaveVol->AddNode(flex2_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 +deltaY,zpos5cm-modGap)); | |
2817 | ||
2818 | // } | |
2819 | // } | |
b705c75b | 2820 | |
2821 | ||
c55b10c2 | 2822 | // Done, return the half stave structure |
2823 | return halfStaveVol; | |
b705c75b | 2824 | } |
2825 | ||
2826 | //________________________________________________________________________ | |
2b9468b2 | 2827 | TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB(const TGeoManager *mgr){ |
b705c75b | 2828 | // |
2829 | // Create the space frame for the Outer Barrel | |
2830 | // | |
2831 | // Input: | |
b705c75b | 2832 | // mgr : the GeoManager (used only to get the proper material) |
2833 | // | |
2834 | // Output: | |
2835 | // | |
2836 | // Return: | |
2837 | // | |
2838 | // | |
2839 | ||
852af72e | 2840 | TGeoVolume *mechStavVol = 0; |
b705c75b | 2841 | |
2842 | switch (fStaveModel) { | |
2843 | case AliITSUv1::kOBModelDummy: | |
c55b10c2 | 2844 | case AliITSUv1::kOBModel0: |
2b9468b2 | 2845 | mechStavVol = CreateSpaceFrameOuterBDummy(mgr); |
b705c75b | 2846 | break; |
2847 | case AliITSUv1::kOBModel1: | |
1fc6eff6 | 2848 | case AliITSUv1::kOBModel2: |
2b9468b2 | 2849 | mechStavVol = CreateSpaceFrameOuterB1(mgr); |
b705c75b | 2850 | break; |
2851 | default: | |
2852 | AliFatal(Form("Unknown stave model %d",fStaveModel)); | |
2853 | break; | |
2854 | } | |
2855 | ||
852af72e | 2856 | return mechStavVol; |
b705c75b | 2857 | } |
2858 | ||
2859 | //________________________________________________________________________ | |
2b9468b2 | 2860 | TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterBDummy(const TGeoManager *) const { |
b705c75b | 2861 | // |
2862 | // Create dummy stave | |
2863 | // | |
2864 | // Input: | |
b705c75b | 2865 | // mgr : the GeoManager (used only to get the proper material) |
2866 | // | |
2867 | // Output: | |
2868 | // | |
2869 | // Return: | |
2870 | // | |
2871 | ||
2872 | ||
2873 | // Done, return the stave structur | |
2874 | return 0; | |
2875 | } | |
2876 | ||
2877 | //________________________________________________________________________ | |
2b9468b2 | 2878 | TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB1(const TGeoManager *mgr){ |
b705c75b | 2879 | // |
c55b10c2 | 2880 | // Create the space frame for the Outer Barrel (Model 1) |
b705c75b | 2881 | // |
2882 | // Input: | |
b705c75b | 2883 | // mgr : the GeoManager (used only to get the proper material) |
2884 | // | |
2885 | // Output: | |
2886 | // | |
2887 | // Return: | |
2888 | // a TGeoVolume with the Space Frame of a stave | |
2889 | // | |
2890 | // Created: 20 Dec 2013 Anastasia Barbano | |
2891 | // Updated: 15 Jan 2014 Mario Sitta | |
c55b10c2 | 2892 | // Updated: 18 Feb 2014 Mario Sitta |
2b9468b2 | 2893 | // Updated: 12 Mar 2014 Mario Sitta |
94fc91be | 2894 | // Updated: 15 Dec 2014 Mario Sitta |
5402be00 | 2895 | // Updated: 28 Jan 2014 Mario Sitta Change frame shape to avoid overlaps |
b705c75b | 2896 | // |
2897 | ||
2898 | ||
94fc91be | 2899 | // Materials defined in AliITSUv1 |
2900 | TGeoMedium *medCarbon = mgr->GetMedium("ITS_M55J6K$"); | |
5402be00 | 2901 | TGeoMedium *medF6151B05M = mgr->GetMedium("ITS_F6151B05M$"); |
b705c75b | 2902 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); |
2903 | ||
2904 | ||
2905 | // Local parameters | |
94fc91be | 2906 | Double_t halfFrameWidth = fgkOBSpaceFrameWidth/2; |
5402be00 | 2907 | Double_t triangleHeight = fgkOBSpaceFrameHeight; |
2908 | Double_t sframeHeight = triangleHeight + fgkOBSFrameBaseRibDiam | |
2909 | + fgkOBSFrameULegHeight2*2; | |
94fc91be | 2910 | Double_t staveLa = fgkOBSpaceFrameTopVL; |
2911 | Double_t staveHa = fgkOBSpaceFrameTopVH; | |
2912 | Double_t staveLb = fgkOBSpaceFrameSideVL; | |
2913 | Double_t staveHb = fgkOBSpaceFrameSideVH; | |
2914 | Double_t alphaDeg = fgkOBSpaceFrameVAlpha; | |
2915 | Double_t alphaRad = alphaDeg*TMath::DegToRad()/2; | |
2916 | Double_t beta = fgkOBSpaceFrameVBeta*TMath::DegToRad()/2; | |
2917 | Double_t sideRibRadius = fgkOBSFrameSideRibDiam/2; | |
2918 | Double_t sidePhiDeg = fgkOBSFrameSideRibPhi; | |
2919 | Double_t sidePhiRad = sidePhiDeg*TMath::DegToRad(); | |
2920 | Double_t baseRibRadius = fgkOBSFrameBaseRibDiam/2; | |
2921 | Double_t basePhiDeg = fgkOBSFrameBaseRibPhi; | |
2922 | Double_t basePhiRad = basePhiDeg*TMath::DegToRad(); | |
5402be00 | 2923 | Double_t ulegHalfLen = fgkOBSFrameULegLen/2; |
2924 | Double_t ulegHalfWidth = fgkOBSFrameULegWidth; | |
2925 | Double_t ulegHigh1 = fgkOBSFrameULegHeight1; | |
2926 | Double_t ulegHigh2 = fgkOBSFrameULegHeight2; | |
2927 | Double_t ulegThick = fgkOBSFrameULegThick; | |
94fc91be | 2928 | |
2929 | Double_t xlen, zlen; | |
2b9468b2 | 2930 | Double_t xpos, ypos, zpos; |
94fc91be | 2931 | Double_t unitlen; |
5402be00 | 2932 | Double_t xtru[22], ytru[22]; |
2933 | char volname[30]; | |
c55b10c2 | 2934 | |
c55b10c2 | 2935 | |
94fc91be | 2936 | zlen = fgkOBSpaceFrameZLen[fLayerNumber/5]; // 3,4 -> 0 - 5,6 -> 1 |
2937 | unitlen = fgkOBSpaceFrameUnitLen; | |
c55b10c2 | 2938 | |
94fc91be | 2939 | xlen = halfFrameWidth + sideRibRadius; |
b705c75b | 2940 | |
5402be00 | 2941 | // We need a properly shaped Xtru to accomodate the ribs avoiding |
2942 | // overlaps with the HalfStave cooling tubes | |
2943 | xtru[ 0] = fgkOBSFrameULegXPos - ulegHalfLen; | |
2944 | ytru[ 0] = -(triangleHeight/2 + baseRibRadius); | |
2945 | xtru[ 1] = xtru[0]; | |
2946 | ytru[ 1] = ytru[0] - ulegHigh1; | |
2947 | xtru[ 2] = xtru[1] + ulegThick; | |
2948 | ytru[ 2] = ytru[1]; | |
2949 | xtru[ 3] = xtru[2]; | |
2950 | ytru[ 3] = ytru[0] - ulegThick; | |
2951 | xtru[ 7] = fgkOBSFrameULegXPos + ulegHalfLen; | |
2952 | ytru[ 7] = ytru[0]; | |
2953 | xtru[ 6] = xtru[7]; | |
2954 | ytru[ 6] = ytru[1]; | |
2955 | xtru[ 5] = xtru[6] - ulegThick; | |
2956 | ytru[ 5] = ytru[6]; | |
2957 | xtru[ 4] = xtru[5]; | |
2958 | ytru[ 4] = ytru[3]; | |
2959 | xtru[ 8] = xlen; | |
2960 | ytru[ 8] = ytru[7]; | |
2961 | xtru[ 9] = xtru[8]; | |
2962 | ytru[ 9] = 0.9*ytru[8]; | |
2963 | xtru[10] = 0.3*xtru[8]; | |
2964 | ytru[10] = triangleHeight/2; | |
2965 | for (Int_t i=0; i<11; i++) { // Reflect on the X negative side | |
2966 | xtru[i+11] = -xtru[10-i]; | |
2967 | ytru[i+11] = ytru[10-i]; | |
2968 | } | |
2969 | ytru[15] = ytru[0] - ulegHigh2; // U-legs on negative X are longer | |
2970 | ytru[16] = ytru[15]; | |
2971 | ytru[19] = ytru[15]; | |
2972 | ytru[20] = ytru[15]; | |
2973 | ||
2974 | ||
94fc91be | 2975 | // The space frame container and a single unit |
2976 | // We need two units because the base ribs are alternately oriented | |
2977 | // The end units are slightly different | |
5402be00 | 2978 | TGeoXtru *spaceFrame = new TGeoXtru(2); |
2979 | spaceFrame->DefinePolygon(22, xtru, ytru); | |
2980 | spaceFrame->DefineSection(0,-zlen/2); | |
2981 | spaceFrame->DefineSection(1, zlen/2); | |
2982 | ||
2983 | TGeoXtru *frameUnit = new TGeoXtru(2); | |
2984 | frameUnit->DefinePolygon(22, xtru, ytru); | |
2985 | frameUnit->DefineSection(0,-unitlen/2); | |
2986 | frameUnit->DefineSection(1, unitlen/2); | |
2987 | ||
2988 | TGeoXtru *endUnit = new TGeoXtru(2); | |
2989 | endUnit->DefinePolygon(22, xtru, ytru); | |
2990 | endUnit->DefineSection(0,-unitlen/2); | |
2991 | endUnit->DefineSection(1, unitlen/2); | |
b705c75b | 2992 | |
5402be00 | 2993 | |
2994 | snprintf(volname, 30, "SpaceFrameVolumeLay%d", fLayerNumber); | |
2995 | TGeoVolume *spaceFrameVol = new TGeoVolume(volname, spaceFrame, medAir); | |
2b9468b2 | 2996 | spaceFrameVol->SetVisibility(kFALSE); |
b705c75b | 2997 | |
94fc91be | 2998 | TGeoVolume *unitVol[2]; |
2999 | unitVol[0] = new TGeoVolume("SpaceFrameUnit0", frameUnit, medAir); | |
3000 | unitVol[1] = new TGeoVolume("SpaceFrameUnit1", frameUnit, medAir); | |
3001 | ||
5402be00 | 3002 | TGeoVolume *endVol[2]; |
3003 | endVol[0] = new TGeoVolume("SpaceFrameEndUnit0", endUnit, medAir); | |
3004 | endVol[1] = new TGeoVolume("SpaceFrameEndUnit1", endUnit, medAir); | |
b705c75b | 3005 | |
94fc91be | 3006 | // The actual volumes |
b705c75b | 3007 | |
94fc91be | 3008 | //--- The top V of the Carbon Fiber Stave (segment) |
3009 | TGeoXtru *cfStavTop = CreateStaveSide("CFstavTopCornerVolshape", | |
3010 | unitlen/2., alphaRad, beta, staveLa, staveHa, kTRUE); | |
2b9468b2 | 3011 | |
94fc91be | 3012 | TGeoVolume *cfStavTopVol = new TGeoVolume("CFstavTopCornerVol", |
3013 | cfStavTop, medCarbon); | |
3014 | cfStavTopVol->SetLineColor(35); | |
b705c75b | 3015 | |
94fc91be | 3016 | unitVol[0]->AddNode(cfStavTopVol, 1, |
3017 | new TGeoTranslation(0, triangleHeight/2, 0)); | |
3018 | ||
3019 | unitVol[1]->AddNode(cfStavTopVol, 1, | |
3020 | new TGeoTranslation(0, triangleHeight/2, 0)); | |
3021 | ||
5402be00 | 3022 | endVol[0]->AddNode(cfStavTopVol, 1, |
3023 | new TGeoTranslation(0, triangleHeight/2, 0)); | |
3024 | ||
3025 | endVol[1]->AddNode(cfStavTopVol, 1, | |
94fc91be | 3026 | new TGeoTranslation(0, triangleHeight/2, 0)); |
b705c75b | 3027 | |
94fc91be | 3028 | //--- The two side V's |
3029 | TGeoXtru *cfStavSide = CreateStaveSide("CFstavSideCornerVolshape", | |
3030 | unitlen/2., alphaRad, beta, staveLb, staveHb, kFALSE); | |
3031 | ||
3032 | TGeoVolume *cfStavSideVol = new TGeoVolume("CFstavSideCornerVol", | |
3033 | cfStavSide, medCarbon); | |
3034 | cfStavSideVol->SetLineColor(35); | |
3035 | ||
3036 | unitVol[0]->AddNode(cfStavSideVol, 1, | |
3037 | new TGeoTranslation( halfFrameWidth, -triangleHeight/2, 0)); | |
3038 | unitVol[0]->AddNode(cfStavSideVol, 2, | |
3039 | new TGeoCombiTrans( -halfFrameWidth, -triangleHeight/2, 0, | |
3040 | new TGeoRotation("",90,180,-90))); | |
3041 | ||
3042 | unitVol[1]->AddNode(cfStavSideVol, 1, | |
3043 | new TGeoTranslation( halfFrameWidth, -triangleHeight/2, 0)); | |
3044 | unitVol[1]->AddNode(cfStavSideVol, 2, | |
3045 | new TGeoCombiTrans( -halfFrameWidth, -triangleHeight/2, 0, | |
3046 | new TGeoRotation("",90,180,-90))); | |
3047 | ||
5402be00 | 3048 | endVol[0]->AddNode(cfStavSideVol, 1, |
3049 | new TGeoTranslation( halfFrameWidth, -triangleHeight/2, 0)); | |
3050 | endVol[0]->AddNode(cfStavSideVol, 2, | |
3051 | new TGeoCombiTrans( -halfFrameWidth, -triangleHeight/2, 0, | |
3052 | new TGeoRotation("",90,180,-90))); | |
3053 | ||
3054 | endVol[1]->AddNode(cfStavSideVol, 1, | |
94fc91be | 3055 | new TGeoTranslation( halfFrameWidth, -triangleHeight/2, 0)); |
5402be00 | 3056 | endVol[1]->AddNode(cfStavSideVol, 2, |
94fc91be | 3057 | new TGeoCombiTrans( -halfFrameWidth, -triangleHeight/2, 0, |
3058 | new TGeoRotation("",90,180,-90))); | |
b705c75b | 3059 | |
3060 | ||
3061 | //--- The beams | |
94fc91be | 3062 | // Ribs on the sides |
3063 | Double_t ribZProj = triangleHeight/TMath::Tan(sidePhiRad); | |
3064 | Double_t sideRibLen = TMath::Sqrt( ribZProj*ribZProj + | |
3065 | triangleHeight*triangleHeight + | |
3066 | halfFrameWidth*halfFrameWidth ); | |
3067 | ||
3068 | TGeoTubeSeg *sideRib = new TGeoTubeSeg(0, sideRibRadius, | |
3069 | sideRibLen/2, 0, 180); | |
3070 | TGeoVolume *sideRibVol = new TGeoVolume("CFstavSideBeamVol", | |
3071 | sideRib, medCarbon); | |
3072 | sideRibVol->SetLineColor(35); | |
3073 | ||
3074 | TGeoCombiTrans *sideTransf[4]; | |
3075 | xpos = halfFrameWidth/2 + 0.8*staveHa*TMath::Cos(alphaRad/2); | |
3076 | ypos = -sideRibRadius/2; | |
3077 | zpos = unitlen/4; | |
3078 | ||
3079 | sideTransf[0] = new TGeoCombiTrans( xpos, ypos,-zpos, | |
3080 | new TGeoRotation("", 90-alphaDeg, | |
3081 | -sidePhiDeg, -90)); | |
3082 | sideTransf[1] = new TGeoCombiTrans( xpos, ypos, zpos, | |
3083 | new TGeoRotation("", 90-alphaDeg, | |
3084 | sidePhiDeg, -90)); | |
3085 | sideTransf[2] = new TGeoCombiTrans(-xpos, ypos,-zpos, | |
3086 | new TGeoRotation("", 90+alphaDeg, | |
3087 | sidePhiDeg, -90)); | |
3088 | sideTransf[3] = new TGeoCombiTrans(-xpos, ypos, zpos, | |
3089 | new TGeoRotation("", 90+alphaDeg, | |
3090 | -sidePhiDeg, -90)); | |
3091 | ||
3092 | unitVol[0]->AddNode(sideRibVol, 1, sideTransf[0]); | |
3093 | unitVol[0]->AddNode(sideRibVol, 2, sideTransf[1]); | |
3094 | unitVol[0]->AddNode(sideRibVol, 3, sideTransf[2]); | |
3095 | unitVol[0]->AddNode(sideRibVol, 4, sideTransf[3]); | |
3096 | ||
3097 | unitVol[1]->AddNode(sideRibVol, 1, sideTransf[0]); | |
3098 | unitVol[1]->AddNode(sideRibVol, 2, sideTransf[1]); | |
3099 | unitVol[1]->AddNode(sideRibVol, 3, sideTransf[2]); | |
3100 | unitVol[1]->AddNode(sideRibVol, 4, sideTransf[3]); | |
3101 | ||
5402be00 | 3102 | endVol[0]->AddNode(sideRibVol, 1, sideTransf[0]); |
3103 | endVol[0]->AddNode(sideRibVol, 2, sideTransf[1]); | |
3104 | endVol[0]->AddNode(sideRibVol, 3, sideTransf[2]); | |
3105 | endVol[0]->AddNode(sideRibVol, 4, sideTransf[3]); | |
3106 | ||
3107 | endVol[1]->AddNode(sideRibVol, 1, sideTransf[0]); | |
3108 | endVol[1]->AddNode(sideRibVol, 2, sideTransf[1]); | |
3109 | endVol[1]->AddNode(sideRibVol, 3, sideTransf[2]); | |
3110 | endVol[1]->AddNode(sideRibVol, 4, sideTransf[3]); | |
94fc91be | 3111 | |
3112 | ||
3113 | // Ribs on the bottom | |
3114 | // Rib1 are the inclined ones, Rib2 the straight ones | |
3115 | Double_t baseRibLen = 0.98*2*halfFrameWidth/TMath::Sin(basePhiRad); | |
3116 | ||
3117 | TGeoTubeSeg *baseRib1 = new TGeoTubeSeg(0, baseRibRadius, | |
3118 | baseRibLen/2, 0, 180); | |
3119 | TGeoVolume *baseRib1Vol = new TGeoVolume("CFstavBaseBeam1Vol", | |
3120 | baseRib1, medCarbon); | |
3121 | baseRib1Vol->SetLineColor(35); | |
3122 | ||
3123 | TGeoTubeSeg *baseRib2 = new TGeoTubeSeg(0, baseRibRadius, | |
3124 | halfFrameWidth, 0, 90); | |
3125 | TGeoVolume *baseRib2Vol = new TGeoVolume("CFstavBaseBeam2Vol", | |
3126 | baseRib2, medCarbon); | |
3127 | baseRib2Vol->SetLineColor(35); | |
3128 | ||
3129 | TGeoTubeSeg *baseEndRib = new TGeoTubeSeg(0, baseRibRadius, | |
3130 | halfFrameWidth, 0, 180); | |
3131 | TGeoVolume *baseEndRibVol = new TGeoVolume("CFstavBaseEndBeamVol", | |
3132 | baseEndRib, medCarbon); | |
3133 | baseEndRibVol->SetLineColor(35); | |
3134 | ||
5402be00 | 3135 | TGeoCombiTrans *baseTransf[6]; |
3136 | ypos = triangleHeight/2; | |
94fc91be | 3137 | zpos = unitlen/2; |
3138 | ||
3139 | baseTransf[0] = new TGeoCombiTrans("", 0, -ypos, -zpos, | |
3140 | new TGeoRotation("", 90, 90, 90)); | |
3141 | baseTransf[1] = new TGeoCombiTrans("", 0, -ypos, zpos, | |
3142 | new TGeoRotation("",-90, 90, -90)); | |
3143 | baseTransf[2] = new TGeoCombiTrans(0, -ypos, 0, | |
3144 | new TGeoRotation("",-90, basePhiDeg,-90)); | |
3145 | baseTransf[3] = new TGeoCombiTrans(0, -ypos, 0, | |
3146 | new TGeoRotation("",-90,-basePhiDeg,-90)); | |
3147 | zpos -= baseEndRib->GetRmax(); | |
3148 | baseTransf[4] = new TGeoCombiTrans("", 0, -ypos, -zpos, | |
3149 | new TGeoRotation("", 90, 90, 90)); | |
5402be00 | 3150 | baseTransf[5] = new TGeoCombiTrans("", 0, -ypos, zpos, |
3151 | new TGeoRotation("", 90, 90, 90)); | |
94fc91be | 3152 | |
3153 | unitVol[0]->AddNode(baseRib2Vol, 1, baseTransf[0]); | |
3154 | unitVol[0]->AddNode(baseRib2Vol, 2, baseTransf[1]); | |
3155 | unitVol[0]->AddNode(baseRib1Vol, 1, baseTransf[2]); | |
3156 | ||
3157 | unitVol[1]->AddNode(baseRib2Vol, 1, baseTransf[0]); | |
3158 | unitVol[1]->AddNode(baseRib2Vol, 2, baseTransf[1]); | |
3159 | unitVol[1]->AddNode(baseRib1Vol, 1, baseTransf[3]); | |
3160 | ||
5402be00 | 3161 | endVol[0]->AddNode(baseEndRibVol, 1, baseTransf[4]); |
3162 | endVol[0]->AddNode(baseRib2Vol, 1, baseTransf[1]); | |
3163 | endVol[0]->AddNode(baseRib1Vol, 1, baseTransf[2]); | |
3164 | ||
3165 | endVol[1]->AddNode(baseEndRibVol, 1, baseTransf[5]); | |
3166 | endVol[1]->AddNode(baseRib2Vol, 1, baseTransf[0]); | |
3167 | endVol[1]->AddNode(baseRib1Vol, 1, baseTransf[2]); | |
3168 | ||
3169 | ||
3170 | // U-Legs | |
3171 | // The shorter | |
3172 | xtru[0] = ulegHalfLen; | |
3173 | ytru[0] = 0; | |
3174 | xtru[1] = xtru[0]; | |
3175 | ytru[1] = -ulegHigh1; | |
3176 | xtru[2] = xtru[1] - ulegThick; | |
3177 | ytru[2] = ytru[1]; | |
3178 | xtru[3] = xtru[2]; | |
3179 | ytru[3] = ytru[0] - ulegThick; | |
3180 | for (Int_t i=0; i<4; i++) { // Reflect on the X negative side | |
3181 | xtru[i+4] = -xtru[3-i]; | |
3182 | ytru[i+4] = ytru[3-i]; | |
3183 | } | |
3184 | ||
3185 | TGeoXtru *uleg1full = new TGeoXtru(2); // This will go in the end units | |
3186 | uleg1full->DefinePolygon(8, xtru, ytru); | |
3187 | uleg1full->DefineSection(0,-ulegHalfWidth); | |
3188 | uleg1full->DefineSection(1, ulegHalfWidth); | |
3189 | ||
3190 | TGeoXtru *uleg1half = new TGeoXtru(2); // This will go in the middle unitys | |
3191 | uleg1half->DefinePolygon(8, xtru, ytru); | |
3192 | uleg1half->DefineSection(0,-ulegHalfWidth/2); | |
3193 | uleg1half->DefineSection(1, ulegHalfWidth/2); | |
3194 | ||
3195 | TGeoVolume *uleg1fullVol = new TGeoVolume("CFstavULeg1FullVol", | |
3196 | uleg1full, medF6151B05M); | |
3197 | uleg1fullVol->SetLineColor(35); | |
3198 | ||
3199 | TGeoVolume *uleg1halfVol = new TGeoVolume("CFstavULeg1HalfVol", | |
3200 | uleg1half, medF6151B05M); | |
3201 | uleg1halfVol->SetLineColor(35); | |
3202 | ||
3203 | // The longer | |
3204 | ytru[1] = -ulegHigh2; | |
3205 | ytru[2] = -ulegHigh2; | |
3206 | ytru[5] = -ulegHigh2; | |
3207 | ytru[6] = -ulegHigh2; | |
3208 | ||
3209 | TGeoXtru *uleg2full = new TGeoXtru(2); // This will go in the end units | |
3210 | uleg2full->DefinePolygon(8, xtru, ytru); | |
3211 | uleg2full->DefineSection(0,-ulegHalfWidth); | |
3212 | uleg2full->DefineSection(1, ulegHalfWidth); | |
3213 | ||
3214 | TGeoXtru *uleg2half = new TGeoXtru(2); // This will go in the middle unitys | |
3215 | uleg2half->DefinePolygon(8, xtru, ytru); | |
3216 | uleg2half->DefineSection(0,-ulegHalfWidth/2); | |
3217 | uleg2half->DefineSection(1, ulegHalfWidth/2); | |
3218 | ||
3219 | TGeoVolume *uleg2fullVol = new TGeoVolume("CFstavULeg2FullVol", | |
3220 | uleg2full, medF6151B05M); | |
3221 | uleg2fullVol->SetLineColor(35); | |
3222 | ||
3223 | TGeoVolume *uleg2halfVol = new TGeoVolume("CFstavULeg2HalfVol", | |
3224 | uleg2half, medF6151B05M); | |
3225 | uleg2halfVol->SetLineColor(35); | |
3226 | ||
3227 | ||
3228 | xpos = fgkOBSFrameULegXPos; | |
3229 | ypos = triangleHeight/2 + baseRibRadius; | |
3230 | zpos = unitlen/2 - uleg1half->GetZ(1); | |
3231 | ||
3232 | unitVol[0]->AddNode(uleg1halfVol, 1, // Shorter on +X | |
3233 | new TGeoTranslation( xpos, -ypos, -zpos)); | |
3234 | unitVol[0]->AddNode(uleg1halfVol, 2, | |
3235 | new TGeoTranslation( xpos, -ypos, zpos)); | |
3236 | ||
3237 | unitVol[1]->AddNode(uleg1halfVol, 1, | |
3238 | new TGeoTranslation( xpos, -ypos, -zpos)); | |
3239 | unitVol[1]->AddNode(uleg1halfVol, 2, | |
3240 | new TGeoTranslation( xpos, -ypos, zpos)); | |
3241 | ||
3242 | unitVol[0]->AddNode(uleg2halfVol, 1, // Longer on -X | |
3243 | new TGeoTranslation( -xpos, -ypos, -zpos)); | |
3244 | unitVol[0]->AddNode(uleg2halfVol, 2, | |
3245 | new TGeoTranslation( -xpos, -ypos, zpos)); | |
3246 | ||
3247 | unitVol[1]->AddNode(uleg2halfVol, 1, | |
3248 | new TGeoTranslation( -xpos, -ypos, -zpos)); | |
3249 | unitVol[1]->AddNode(uleg2halfVol, 2, | |
3250 | new TGeoTranslation( -xpos, -ypos, zpos)); | |
3251 | ||
3252 | endVol[0]->AddNode(uleg1halfVol, 1, | |
3253 | new TGeoTranslation( xpos, -ypos, zpos)); | |
3254 | endVol[0]->AddNode(uleg2halfVol, 1, | |
3255 | new TGeoTranslation( -xpos, -ypos, zpos)); | |
3256 | ||
3257 | endVol[1]->AddNode(uleg1halfVol, 1, | |
3258 | new TGeoTranslation( xpos, -ypos, -zpos)); | |
3259 | endVol[1]->AddNode(uleg2halfVol, 1, | |
3260 | new TGeoTranslation( -xpos, -ypos, -zpos)); | |
3261 | ||
3262 | zpos = unitlen/2 - uleg1full->GetZ(1); | |
3263 | endVol[0]->AddNode(uleg1fullVol, 1, | |
3264 | new TGeoTranslation( xpos, -ypos, -zpos)); | |
3265 | endVol[0]->AddNode(uleg2fullVol, 1, | |
3266 | new TGeoTranslation( -xpos, -ypos, -zpos)); | |
3267 | ||
3268 | endVol[1]->AddNode(uleg1fullVol, 1, | |
3269 | new TGeoTranslation( xpos, -ypos, zpos)); | |
3270 | endVol[1]->AddNode(uleg2fullVol, 1, | |
3271 | new TGeoTranslation( -xpos, -ypos, zpos)); | |
94fc91be | 3272 | |
3273 | ||
3274 | // Finally build up the space frame | |
3275 | Int_t nUnits = fgkOBSpaceFrameNUnits[fLayerNumber/5]; // 3,4 -> 0 - 5,6 -> 1 | |
3276 | ||
3277 | zpos = -spaceFrame->GetDZ() + endUnit->GetDZ(); | |
5402be00 | 3278 | spaceFrameVol->AddNode(endVol[0], 1, new TGeoTranslation(0, 0, zpos)); |
94fc91be | 3279 | |
3280 | for(Int_t i=1; i<nUnits-1; i++){ | |
3281 | zpos = -spaceFrame->GetDZ() + (1 + 2*i)*frameUnit->GetDZ(); | |
3282 | Int_t j = i/2; | |
3283 | Int_t k = i - j*2; // alternatively 0 or 1 | |
3284 | spaceFrameVol->AddNode(unitVol[k], j+1, new TGeoTranslation(0, 0, zpos)); | |
b705c75b | 3285 | } |
3286 | ||
94fc91be | 3287 | zpos = -spaceFrame->GetDZ() + (2*nUnits - 1)*endUnit->GetDZ(); |
5402be00 | 3288 | spaceFrameVol->AddNode(endVol[1], 1, new TGeoTranslation(0, 0, zpos)); |
94fc91be | 3289 | |
b705c75b | 3290 | |
2b9468b2 | 3291 | // Done, return the space frame structure |
b705c75b | 3292 | return spaceFrameVol; |
3293 | } | |
3294 | ||
3295 | //________________________________________________________________________ | |
c55b10c2 | 3296 | TGeoVolume* AliITSUv1Layer::CreateChipInnerB(const Double_t xchip, |
3297 | const Double_t ychip, | |
3298 | const Double_t zchip, | |
3299 | const TGeoManager *mgr){ | |
b705c75b | 3300 | // |
852af72e | 3301 | // Creates the actual Chip |
b705c75b | 3302 | // |
3303 | // Input: | |
c55b10c2 | 3304 | // xchip,ychip,zchip : the chip dimensions |
b705c75b | 3305 | // mgr : the GeoManager (used only to get the proper material) |
3306 | // | |
3307 | // Output: | |
3308 | // | |
3309 | // Return: | |
3310 | // | |
3311 | // Created: 22 Jun 2011 Mario Sitta | |
3312 | // | |
3313 | ||
3314 | char volname[30]; | |
3315 | Double_t xlen, ylen, zlen; | |
3316 | Double_t xpos, ypos, zpos; | |
3317 | ||
3318 | ||
3319 | // First create all needed shapes | |
3320 | ||
852af72e | 3321 | // The chip |
c55b10c2 | 3322 | TGeoBBox *chip = new TGeoBBox(xchip, ychip, zchip); |
b705c75b | 3323 | |
3324 | // The sensor | |
852af72e | 3325 | xlen = chip->GetDX(); |
b705c75b | 3326 | ylen = 0.5*fSensorThick; |
852af72e | 3327 | zlen = chip->GetDZ(); |
b705c75b | 3328 | TGeoBBox *sensor = new TGeoBBox(xlen, ylen, zlen); |
3329 | ||
3330 | ||
3331 | // We have all shapes: now create the real volumes | |
b705c75b | 3332 | TGeoMedium *medSi = mgr->GetMedium("ITS_SI$"); |
3333 | ||
852af72e | 3334 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSChipPattern(), fLayerNumber); |
c55b10c2 | 3335 | TGeoVolume *chipVol = new TGeoVolume(volname, chip, medSi); |
3336 | chipVol->SetVisibility(kTRUE); | |
3337 | chipVol->SetLineColor(1); | |
b705c75b | 3338 | |
3339 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSSensorPattern(), fLayerNumber); | |
3340 | TGeoVolume *sensVol = new TGeoVolume(volname, sensor, medSi); | |
3341 | sensVol->SetVisibility(kTRUE); | |
3342 | sensVol->SetLineColor(8); | |
3343 | sensVol->SetLineWidth(1); | |
3344 | sensVol->SetFillColor(sensVol->GetLineColor()); | |
3345 | sensVol->SetFillStyle(4000); // 0% transparent | |
3346 | ||
3347 | ||
852af72e | 3348 | // Now build up the chip |
b705c75b | 3349 | xpos = 0.; |
852af72e | 3350 | ypos = -chip->GetDY() + sensor->GetDY(); |
b705c75b | 3351 | zpos = 0.; |
3352 | ||
c55b10c2 | 3353 | chipVol->AddNode(sensVol, 1, new TGeoTranslation(xpos, ypos, zpos)); |
b705c75b | 3354 | |
852af72e | 3355 | // Done, return the chip |
c55b10c2 | 3356 | return chipVol; |
b705c75b | 3357 | } |
3358 | ||
3359 | //________________________________________________________________________ | |
c55b10c2 | 3360 | TGeoVolume* AliITSUv1Layer::CreateModuleOuterB(const TGeoManager *mgr){ |
b705c75b | 3361 | // |
c55b10c2 | 3362 | // Creates the OB Module: HIC + FPC + Carbon plate |
b705c75b | 3363 | // |
3364 | // Input: | |
b705c75b | 3365 | // mgr : the GeoManager (used only to get the proper material) |
3366 | // | |
3367 | // Output: | |
3368 | // | |
3369 | // Return: | |
c55b10c2 | 3370 | // the module as a TGeoVolume |
b705c75b | 3371 | // |
3372 | // Created: 18 Dec 2013 M. Sitta, A. Barbano | |
c55b10c2 | 3373 | // Updated: 26 Feb 2014 M. Sitta |
1fc6eff6 | 3374 | // Updated: 12 Nov 2014 M. Sitta Model2 is w/o Carbon Plate and Glue |
3375 | // and Cu instead of Al | |
b705c75b | 3376 | // |
3377 | ||
3378 | ||
3379 | char volname[30]; | |
3380 | ||
c55b10c2 | 3381 | Double_t xGap = fgkOBChipXGap; |
3382 | Double_t zGap = fgkOBChipZGap; | |
b705c75b | 3383 | |
2b9468b2 | 3384 | Double_t xchip, ychip, zchip; |
b705c75b | 3385 | Double_t xlen, ylen, zlen; |
3386 | Double_t xpos, ypos, zpos; | |
3387 | ||
3388 | // First create all needed shapes | |
3389 | ||
c55b10c2 | 3390 | // The chip (the same as for IB) |
3391 | xlen = (fgkOBHalfStaveWidth/2-xGap/2)/fgkOBNChipRows; | |
1fc6eff6 | 3392 | ylen = 0.5*fChipThick; |
c55b10c2 | 3393 | zlen = (fgkOBModuleZLength - (fgkOBChipsPerRow-1)*zGap)/(2*fgkOBChipsPerRow); |
b705c75b | 3394 | |
c55b10c2 | 3395 | TGeoVolume *chipVol = CreateChipInnerB(xlen, ylen, zlen); |
3396 | ||
2b9468b2 | 3397 | xchip = ((TGeoBBox*)chipVol->GetShape())->GetDX(); |
3398 | ychip = ((TGeoBBox*)chipVol->GetShape())->GetDY(); | |
3399 | zchip = ((TGeoBBox*)chipVol->GetShape())->GetDZ(); | |
c55b10c2 | 3400 | |
3401 | // The module carbon plate | |
3402 | xlen = fgkOBHalfStaveWidth/2; | |
3403 | ylen = fgkOBCarbonPlateThick/2; | |
3404 | zlen = fgkOBModuleZLength/2; | |
3405 | TGeoBBox *modPlate = new TGeoBBox("CarbonPlate", xlen, ylen, zlen); | |
3406 | ||
3407 | // The glue | |
1fc6eff6 | 3408 | ylen = fgkOBGlueThickM1/2; |
c55b10c2 | 3409 | TGeoBBox *glue = new TGeoBBox("Glue", xlen, ylen, zlen); |
3410 | ||
1fc6eff6 | 3411 | // The FPC cables |
3412 | TGeoBBox *flexMetal; | |
3413 | if (fStaveModel == AliITSUv1::kOBModel1) { | |
3414 | ylen = fgkOBFlexCableAlThick/2; | |
3415 | flexMetal = new TGeoBBox("FlexAl", xlen, ylen, zlen); | |
3416 | } else { | |
3417 | ylen = fgkOBFlexCableCuThick/2; | |
3418 | flexMetal = new TGeoBBox("FlexCu", xlen, ylen, zlen); | |
3419 | } | |
c55b10c2 | 3420 | |
f1496ca7 | 3421 | if (fStaveModel == AliITSUv1::kOBModel1) |
3422 | ylen = fgkOBFlexCableKapThick1/2; | |
3423 | else | |
3424 | ylen = fgkOBFlexCableKapThick/2; | |
c55b10c2 | 3425 | TGeoBBox *flexKap = new TGeoBBox("FlexKap", xlen, ylen, zlen); |
3426 | ||
3427 | // The module | |
3428 | xlen = fgkOBHalfStaveWidth/2; | |
f1496ca7 | 3429 | ylen = ychip + flexMetal->GetDY() + flexKap->GetDY(); |
3430 | if (fStaveModel == AliITSUv1::kOBModel1) | |
3431 | ylen += (modPlate->GetDY() + glue->GetDY()); | |
c55b10c2 | 3432 | zlen = fgkOBModuleZLength/2; |
3433 | TGeoBBox *module = new TGeoBBox("OBModule", xlen, ylen, zlen); | |
b705c75b | 3434 | |
3435 | ||
3436 | // We have all shapes: now create the real volumes | |
3437 | ||
c55b10c2 | 3438 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); |
3439 | TGeoMedium *medCarbon = mgr->GetMedium("ITS_CARBON$"); | |
3440 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
3441 | TGeoMedium *medAluminum = mgr->GetMedium("ITS_ALUMINUM$"); | |
1fc6eff6 | 3442 | TGeoMedium *medCopper = mgr->GetMedium("ITS_COPPER$"); |
c55b10c2 | 3443 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); |
3444 | ||
3445 | TGeoVolume *modPlateVol = new TGeoVolume("CarbonPlateVol", | |
3446 | modPlate, medCarbon); | |
3447 | modPlateVol->SetLineColor(kMagenta-8); | |
3448 | modPlateVol->SetFillColor(modPlateVol->GetLineColor()); | |
3449 | modPlateVol->SetFillStyle(4000); // 0% transparent | |
b705c75b | 3450 | |
c55b10c2 | 3451 | TGeoVolume *glueVol = new TGeoVolume("GlueVol", glue, medGlue); |
3452 | glueVol->SetLineColor(kBlack); | |
3453 | glueVol->SetFillColor(glueVol->GetLineColor()); | |
3454 | glueVol->SetFillStyle(4000); // 0% transparent | |
3455 | ||
1fc6eff6 | 3456 | TGeoVolume *flexMetalVol; |
3457 | if (fStaveModel == AliITSUv1::kOBModel1) | |
3458 | flexMetalVol = new TGeoVolume("FPCAlVol", flexMetal, medAluminum); | |
3459 | else | |
3460 | flexMetalVol = new TGeoVolume("FPCCuVol", flexMetal, medCopper); | |
3461 | flexMetalVol->SetLineColor(kRed); | |
3462 | flexMetalVol->SetFillColor(flexMetalVol->GetLineColor()); | |
3463 | flexMetalVol->SetFillStyle(4000); // 0% transparent | |
c55b10c2 | 3464 | |
1fc6eff6 | 3465 | TGeoVolume *flexKapVol = new TGeoVolume("FPCKapVol", flexKap, medKapton); |
c55b10c2 | 3466 | flexKapVol->SetLineColor(kGreen); |
3467 | flexKapVol->SetFillColor(flexKapVol->GetLineColor()); | |
3468 | flexKapVol->SetFillStyle(4000); // 0% transparent | |
3469 | ||
3470 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber); | |
3471 | TGeoVolume *modVol = new TGeoVolume(volname, module, medAir); | |
3472 | modVol->SetVisibility(kTRUE); | |
b705c75b | 3473 | |
3474 | ||
c55b10c2 | 3475 | // Now build up the module |
1fc6eff6 | 3476 | // Model1 : CarbonPlate-Glue-Chips-AluminumFPC-KaptonFPC |
3477 | // Model2 : Chips-CopperFPC-KaptonFPCChips | |
3478 | ypos = -module->GetDY(); | |
3479 | ||
3480 | if (fStaveModel == AliITSUv1::kOBModel1) { | |
3481 | ypos += modPlate->GetDY(); | |
3482 | if (fBuildLevel < 5) // Carbon | |
3483 | modVol->AddNode(modPlateVol, 1, new TGeoTranslation(0, ypos, 0)); | |
b705c75b | 3484 | |
1fc6eff6 | 3485 | ypos += (modPlate->GetDY() + glue->GetDY()); |
3486 | if (fBuildLevel < 2) // Glue | |
3487 | modVol->AddNode(glueVol, 1, new TGeoTranslation(0, ypos, 0)); | |
3488 | ||
3489 | ypos += glue->GetDY(); | |
3490 | } | |
c55b10c2 | 3491 | |
2b9468b2 | 3492 | xpos = -module->GetDX() + xchip; |
1fc6eff6 | 3493 | ypos += ychip; |
c55b10c2 | 3494 | for(Int_t k=0; k<fgkOBChipsPerRow; k++) //put 7x2 chip into one module |
b705c75b | 3495 | { |
2b9468b2 | 3496 | zpos = -module->GetDZ() + zchip + k*(2*zchip + zGap); |
c55b10c2 | 3497 | modVol->AddNode(chipVol, 2*k , new TGeoTranslation( xpos, ypos, zpos)); |
65740b7a | 3498 | modVol->AddNode(chipVol, 2*k+1, |
3499 | new TGeoCombiTrans(-xpos, ypos, zpos, new TGeoRotation("",0,180,180))); | |
c55b10c2 | 3500 | fHierarchy[kChip]+=2; |
b705c75b | 3501 | } |
c55b10c2 | 3502 | |
1fc6eff6 | 3503 | ypos += (ychip + flexMetal->GetDY()); |
3504 | if (fBuildLevel < 1) // Model1: Aluminum Model2: Copper | |
3505 | modVol->AddNode(flexMetalVol, 1, new TGeoTranslation(0, ypos, 0)); | |
c55b10c2 | 3506 | |
1fc6eff6 | 3507 | ypos += (flexMetal->GetDY() + flexKap->GetDY()); |
3508 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 4) || // Kapton | |
3509 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 5) ) | |
8397c175 | 3510 | modVol->AddNode(flexKapVol, 1, new TGeoTranslation(0, ypos, 0)); |
c55b10c2 | 3511 | |
3512 | // Done, return the module | |
b705c75b | 3513 | return modVol; |
3514 | } | |
3515 | ||
c55b10c2 | 3516 | //________________________________________________________________________ |
3517 | void AliITSUv1Layer::SetNUnits(Int_t u) | |
3518 | { | |
3519 | // | |
3520 | // Sets the number of units in a stave: | |
3521 | // for the Inner Barrel: the number of chips per stave | |
3522 | // for the Outer Barrel: the number of modules per half stave | |
3523 | // | |
3524 | // | |
3525 | // Input: | |
3526 | // u : the number of units | |
3527 | // | |
3528 | // Output: | |
3529 | // | |
3530 | // Return: | |
3531 | // | |
3532 | // Created: 18 Feb 2013 Mario Sitta (was already SetNChips) | |
3533 | // | |
3534 | ||
3535 | if (fLayerNumber < fgkNumberOfInnerLayers) | |
3536 | fNChips = u; | |
3537 | else { | |
3538 | fNModules = u; | |
3539 | fNChips = fgkOBChipsPerRow; | |
3540 | } | |
3541 | ||
3542 | } | |
3543 | ||
b705c75b | 3544 | //________________________________________________________________________ |
852af72e | 3545 | void AliITSUv1Layer::SetStaveTilt(const Double_t t) |
b705c75b | 3546 | { |
3547 | // | |
852af72e | 3548 | // Sets the Stave tilt angle (for turbo layers only) |
b705c75b | 3549 | // |
3550 | // Input: | |
852af72e | 3551 | // t : the stave tilt angle |
b705c75b | 3552 | // |
3553 | // Output: | |
3554 | // | |
3555 | // Return: | |
3556 | // | |
3557 | // Created: 08 Jul 2011 Mario Sitta | |
3558 | // | |
3559 | ||
3560 | if (fIsTurbo) | |
852af72e | 3561 | fStaveTilt = t; |
b705c75b | 3562 | else |
3563 | AliError("Not a Turbo layer"); | |
3564 | ||
3565 | } | |
3566 | ||
3567 | //________________________________________________________________________ | |
852af72e | 3568 | void AliITSUv1Layer::SetStaveWidth(const Double_t w){ |
b705c75b | 3569 | // |
852af72e | 3570 | // Sets the Stave width (for turbo layers only) |
b705c75b | 3571 | // |
3572 | // Input: | |
852af72e | 3573 | // w : the stave width |
b705c75b | 3574 | // |
3575 | // Output: | |
3576 | // | |
3577 | // Return: | |
3578 | // | |
3579 | // Created: 08 Jul 2011 Mario Sitta | |
3580 | // | |
3581 | ||
3582 | if (fIsTurbo) | |
852af72e | 3583 | fStaveWidth = w; |
b705c75b | 3584 | else |
3585 | AliError("Not a Turbo layer"); | |
3586 | ||
3587 | } | |
3588 | ||
3589 | //________________________________________________________________________ | |
94fc91be | 3590 | TGeoXtru *AliITSUv1Layer::CreateStaveSide(const char *name, |
3591 | Double_t dz, Double_t alpha, Double_t beta, | |
3592 | Double_t L, Double_t H, Bool_t top) { | |
b705c75b | 3593 | // |
3594 | // Creates the V-shaped sides of the OB space frame | |
3595 | // (from a similar method with same name and function | |
3596 | // in AliITSv11GeometrySDD class by L.Gaudichet) | |
3597 | // | |
94fc91be | 3598 | // Updated: 15 Dec 2014 Mario Sitta Rewritten using Xtru |
3599 | // Updated: 09 Jan 2015 Mario Sitta Rewritten again using different | |
3600 | // aperture angles (info by C.Gargiulo) | |
3601 | // | |
3602 | ||
3603 | // Create the V shape corner of CF stave | |
b705c75b | 3604 | |
94fc91be | 3605 | const Int_t nv = 6; |
3606 | Double_t xv[nv], yv[nv]; | |
b705c75b | 3607 | |
94fc91be | 3608 | TGeoXtru *cfStavSide = new TGeoXtru(2); |
852af72e | 3609 | cfStavSide->SetName(name); |
b705c75b | 3610 | |
94fc91be | 3611 | Double_t theta = TMath::PiOver2() - beta; |
3612 | Double_t gamma = beta - alpha; | |
b705c75b | 3613 | // Points must be in clockwise order |
94fc91be | 3614 | if (top) { // TOP - vertices not in order |
3615 | xv[3] = 0; | |
3616 | yv[3] = 0; | |
3617 | xv[2] = L*TMath::Sin(alpha); | |
3618 | yv[2] = -L*TMath::Cos(alpha); | |
3619 | xv[1] = xv[2] - H*TMath::Cos(alpha); | |
3620 | yv[1] = yv[2] - H*TMath::Sin(alpha); | |
3621 | xv[0] = 0; | |
3622 | yv[0] = yv[1] + TMath::Tan(theta)*xv[1]; | |
3623 | xv[4] = -xv[2]; // Reflect | |
3624 | yv[4] = yv[2]; | |
3625 | xv[5] = -xv[1]; | |
3626 | yv[5] = yv[1]; | |
3627 | } else { // SIDE | |
3628 | Double_t m = -TMath::Tan(alpha), n = TMath::Tan(gamma); | |
3629 | xv[0] = 0; | |
3630 | yv[0] = 0; | |
3631 | xv[1] = -L*TMath::Cos(2*alpha); | |
3632 | yv[1] = L*TMath::Sin(2*alpha); | |
3633 | xv[2] = xv[1] - H*TMath::Sin(2*alpha); | |
3634 | yv[2] = yv[1] - H*TMath::Cos(2*alpha); | |
3635 | xv[4] = -L; | |
3636 | yv[4] = H; | |
3637 | xv[5] = xv[4]; | |
3638 | yv[5] = 0; | |
3639 | xv[3] = (yv[4] - n*xv[4])/(m - n); | |
3640 | yv[3] = m*xv[3]; | |
b705c75b | 3641 | } |
94fc91be | 3642 | |
3643 | cfStavSide->DefinePolygon(nv, xv, yv); | |
3644 | cfStavSide->DefineSection(0,-dz); | |
3645 | cfStavSide->DefineSection(1, dz); | |
3646 | ||
852af72e | 3647 | return cfStavSide; |
b705c75b | 3648 | } |
3649 | ||
3650 | //________________________________________________________________________ | |
3651 | TGeoCombiTrans *AliITSUv1Layer::CreateCombiTrans(const char *name, | |
3652 | Double_t dy, Double_t dz, | |
3653 | Double_t dphi, Bool_t planeSym) { | |
3654 | // | |
3655 | // Help method to create a TGeoCombiTrans matrix | |
3656 | // (from a similar method with same name and function | |
3657 | // in AliITSv11GeometrySDD class by L.Gaudichet) | |
3658 | // | |
3659 | ||
3660 | // | |
3661 | // return the TGeoCombiTrans which make a translation in y and z | |
3662 | // and a rotation in phi in the global coord system | |
3663 | // If planeSym = true, the rotation places the object symetrically | |
3664 | // (with respect to the transverse plane) to its position in the | |
3665 | // case planeSym = false | |
3666 | // | |
3667 | ||
3668 | TGeoTranslation t1(dy*CosD(90.+dphi),dy*SinD(90.+dphi), dz); | |
3669 | TGeoRotation r1("",0.,0.,dphi); | |
3670 | TGeoRotation r2("",90, 180, -90-dphi); | |
3671 | ||
3672 | TGeoCombiTrans *combiTrans1 = new TGeoCombiTrans(name); | |
3673 | combiTrans1->SetTranslation(t1); | |
3674 | if (planeSym) combiTrans1->SetRotation(r1); | |
3675 | else combiTrans1->SetRotation(r2); | |
3676 | return combiTrans1; | |
3677 | } | |
3678 | ||
3679 | //________________________________________________________________________ | |
3680 | void AliITSUv1Layer::AddTranslationToCombiTrans(TGeoCombiTrans* ct, | |
3681 | Double_t dx, | |
3682 | Double_t dy, | |
3683 | Double_t dz) const{ | |
3684 | // | |
3685 | // Help method to add a translation to a TGeoCombiTrans matrix | |
3686 | // (from a similar method with same name and function | |
3687 | // in AliITSv11GeometrySDD class by L.Gaudichet) | |
3688 | // | |
3689 | ||
3690 | // Add a dx,dy,dz translation to the initial TGeoCombiTrans | |
3691 | const Double_t *vect = ct->GetTranslation(); | |
3692 | Double_t newVect[3] = {vect[0]+dx, vect[1]+dy, vect[2]+dz}; | |
3693 | ct->SetTranslation(newVect); | |
3694 | } |