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