]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/UPGRADE/AliITSUv1Layer.cxx
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[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
47const Double_t AliITSUv1Layer::fgkDefaultSensorThick = 300*fgkmicron;
852af72e 48const Double_t AliITSUv1Layer::fgkDefaultStaveThick = 1*fgkcm;
b705c75b 49
50const Double_t AliITSUv1Layer::fgkOBHalfStaveWidth = 3.01 *fgkcm;
852af72e 51const Double_t AliITSUv1Layer::fgkOBChipGap = 0.01 *fgkcm;
b705c75b 52const Double_t AliITSUv1Layer::fgkOBFlexCable1Thick = 0.005*fgkcm;
53const Double_t AliITSUv1Layer::fgkOBFlexCable2Thick = 0.01 *fgkcm;
54const Double_t AliITSUv1Layer::fgkOBBusCable1Thick = 0.02 *fgkcm;
55const Double_t AliITSUv1Layer::fgkOBBusCable2Thick = 0.02 *fgkcm;
56const Double_t AliITSUv1Layer::fgkOBColdPlateThick = 0.012*fgkcm;
57const Double_t AliITSUv1Layer::fgkOBCarbonPlateThick = 0.012*fgkcm;
58const Double_t AliITSUv1Layer::fgkOBGlueThick = 0.03 *fgkcm;
852af72e 59const Double_t AliITSUv1Layer::fgkOBChipZLength = 21.06 *fgkcm;
b705c75b 60
61
62ClassImp(AliITSUv1Layer)
63
64#define SQ(A) (A)*(A)
65
66//________________________________________________________________________
67AliITSUv1Layer::AliITSUv1Layer():
68 AliITSv11Geometry(),
69 fLayerNumber(0),
70 fPhi0(0),
71 fLayRadius(0),
72 fZLength(0),
73 fSensorThick(0),
852af72e 74 fStaveThick(0),
75 fStaveWidth(0),
76 fStaveTilt(0),
77 fNStaves(0),
78 fNChips(0),
79 fChipTypeID(0),
b705c75b 80 fIsTurbo(0),
81 fBuildLevel(0),
82 fStaveModel(AliITSUv1::kIBModelDummy)
83{
84 //
85 // Standard constructor
86 //
87}
88
89//________________________________________________________________________
90AliITSUv1Layer::AliITSUv1Layer(Int_t debug):
91 AliITSv11Geometry(debug),
92 fLayerNumber(0),
93 fPhi0(0),
94 fLayRadius(0),
95 fZLength(0),
96 fSensorThick(0),
852af72e 97 fStaveThick(0),
98 fStaveWidth(0),
99 fStaveTilt(0),
100 fNStaves(0),
101 fNChips(0),
102 fChipTypeID(0),
b705c75b 103 fIsTurbo(0),
104 fBuildLevel(0),
105 fStaveModel(AliITSUv1::kIBModelDummy)
106{
107 //
108 // Constructor setting debugging level
109 //
110}
111
112//________________________________________________________________________
113AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Int_t debug):
114 AliITSv11Geometry(debug),
115 fLayerNumber(lay),
116 fPhi0(0),
117 fLayRadius(0),
118 fZLength(0),
119 fSensorThick(0),
852af72e 120 fStaveThick(0),
121 fStaveWidth(0),
122 fStaveTilt(0),
123 fNStaves(0),
124 fNChips(0),
125 fChipTypeID(0),
b705c75b 126 fIsTurbo(0),
127 fBuildLevel(0),
128 fStaveModel(AliITSUv1::kIBModelDummy)
129{
130 //
131 // Constructor setting layer number and debugging level
132 //
133}
134
135//________________________________________________________________________
136AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Bool_t turbo, Int_t debug):
137 AliITSv11Geometry(debug),
138 fLayerNumber(lay),
139 fPhi0(0),
140 fLayRadius(0),
141 fZLength(0),
142 fSensorThick(0),
852af72e 143 fStaveThick(0),
144 fStaveWidth(0),
145 fStaveTilt(0),
146 fNStaves(0),
147 fNChips(0),
148 fChipTypeID(0),
b705c75b 149 fIsTurbo(turbo),
150 fBuildLevel(0),
151 fStaveModel(AliITSUv1::kIBModelDummy)
152{
153 //
154 // Constructor setting layer number and debugging level
852af72e 155 // for a "turbo" layer (i.e. where staves overlap in phi)
b705c75b 156 //
157}
158
159//________________________________________________________________________
160AliITSUv1Layer::AliITSUv1Layer(const AliITSUv1Layer &s):
161 AliITSv11Geometry(s.GetDebug()),
162 fLayerNumber(s.fLayerNumber),
163 fPhi0(s.fPhi0),
164 fLayRadius(s.fLayRadius),
165 fZLength(s.fZLength),
166 fSensorThick(s.fSensorThick),
852af72e 167 fStaveThick(s.fStaveThick),
168 fStaveWidth(s.fStaveWidth),
169 fStaveTilt(s.fStaveTilt),
170 fNStaves(s.fNStaves),
171 fNChips(s.fNChips),
172 fChipTypeID(s.fChipTypeID),
b705c75b 173 fIsTurbo(s.fIsTurbo),
174 fBuildLevel(s.fBuildLevel),
175 fStaveModel(s.fStaveModel)
176{
177 //
178 // Copy constructor
179 //
180}
181
182//________________________________________________________________________
183AliITSUv1Layer& AliITSUv1Layer::operator=(const AliITSUv1Layer &s)
184{
185 //
186 // Assignment operator
187 //
188 if(&s == this) return *this;
189
190 fLayerNumber = s.fLayerNumber;
191 fPhi0 = s.fPhi0;
192 fLayRadius = s.fLayRadius;
193 fZLength = s.fZLength;
194 fSensorThick = s.fSensorThick;
852af72e 195 fStaveThick = s.fStaveThick;
196 fStaveWidth = s.fStaveWidth;
197 fStaveTilt = s.fStaveTilt;
198 fNStaves = s.fNStaves;
199 fNChips = s.fNChips;
b705c75b 200 fIsTurbo = s.fIsTurbo;
852af72e 201 fChipTypeID = s.fChipTypeID;
b705c75b 202 fBuildLevel = s.fBuildLevel;
203 fStaveModel = s.fStaveModel;
204
205 return *this;
206}
207
208//________________________________________________________________________
209AliITSUv1Layer::~AliITSUv1Layer() {
210 //
211 // Destructor
212 //
213}
214
215//________________________________________________________________________
216void AliITSUv1Layer::CreateLayer(TGeoVolume *moth){
217//
218// Creates the actual Layer and places inside its mother volume
219//
220// Input:
221// moth : the TGeoVolume owing the volume structure
222//
223// Output:
224//
225// Return:
226//
227// Created: 17 Jun 2011 Mario Sitta
228// Updated: 08 Jul 2011 Mario Sitta
229// Updated: 20 May 2013 Mario Sitta Layer is Assembly instead of Tube
230//
231 // Local variables
232 char volname[30];
233 Double_t xpos, ypos, zpos;
234 Double_t alpha;
235
236
237 // Check if the user set the proper parameters
238 if (fLayRadius <= 0) AliFatal(Form("Wrong layer radius (%f)",fLayRadius));
239 if (fZLength <= 0) AliFatal(Form("Wrong layer length (%f)",fZLength));
852af72e 240 if (fNStaves <= 0) AliFatal(Form("Wrong number of staves (%d)",fNStaves));
241 if (fNChips <= 0) AliFatal(Form("Wrong number of chips (%d)",fNChips));
b705c75b 242
852af72e 243 if (fStaveThick <= 0) {
244 AliInfo(Form("Stave thickness wrong or not set (%f), using default (%f)",
245 fStaveThick,fgkDefaultStaveThick));
246 fStaveThick = fgkDefaultStaveThick;
b705c75b 247 }
248
249 if (fSensorThick <= 0) {
250 AliInfo(Form("Sensor thickness wrong or not set (%f), using default (%f)",
251 fSensorThick,fgkDefaultSensorThick));
252 fSensorThick = fgkDefaultSensorThick;
253 }
254
852af72e 255 if (fSensorThick > fStaveThick) {
256 AliWarning(Form("Sensor thickness (%f) is greater than stave thickness (%f), fixing",
257 fSensorThick,fStaveThick));
258 fSensorThick = fStaveThick;
b705c75b 259 }
260
261
262 // If a Turbo layer is requested, do it and exit
263 if (fIsTurbo) {
264 CreateLayerTurbo(moth);
265 return;
266 }
267
268
852af72e 269 // First create the stave container
270 alpha = (360./(2*fNStaves))*DegToRad();
b705c75b 271
852af72e 272 // fStaveWidth = fLayRadius*Tan(alpha);
b705c75b 273
274 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(),fLayerNumber);
275 TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
852af72e 276 layVol->SetUniqueID(fChipTypeID);
b705c75b 277
278// layVol->SetVisibility(kFALSE);
279 layVol->SetVisibility(kTRUE);
280 layVol->SetLineColor(1);
281
852af72e 282 TGeoVolume *stavVol = CreateStave();
b705c75b 283
284
285 // Now build up the layer
852af72e 286 alpha = 360./fNStaves;
287 Double_t r = fLayRadius + ((TGeoBBox*)stavVol->GetShape())->GetDY();
288 for (Int_t j=0; j<fNStaves; j++) {
b705c75b 289 Double_t phi = j*alpha + fPhi0;
290 xpos = r*CosD(phi);// r*SinD(-phi);
291 ypos = r*SinD(phi);// r*CosD(-phi);
292 zpos = 0.;
293 phi += 90;
852af72e 294 layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
b705c75b 295 new TGeoRotation("",phi,0,0)));
296 }
297
298
299 // Finally put everything in the mother volume
300 moth->AddNode(layVol, 1, 0);
301
302
303 // Upgrade geometry is served
304 return;
305}
306
307//________________________________________________________________________
308void AliITSUv1Layer::CreateLayerTurbo(TGeoVolume *moth){
309//
310// Creates the actual Layer and places inside its mother volume
852af72e 311// A so-called "turbo" layer is a layer where staves overlap in phi
b705c75b 312// User can set width and tilt angle, no check is performed here
313// to avoid volume overlaps
314//
315// Input:
316// moth : the TGeoVolume owing the volume structure
317//
318// Output:
319//
320// Return:
321//
322// Created: 08 Jul 2011 Mario Sitta
323// Updated: 08 Mar 2012 Mario Sitta Correct way to compute container R
324// Updated: 20 May 2013 Mario Sitta Layer is Assemgbly instead of Tube
325//
326
327
328 // Local variables
329 char volname[30];
330 Double_t xpos, ypos, zpos;
331 Double_t alpha;
332
333
334 // Check if the user set the proper (remaining) parameters
852af72e 335 if (fStaveWidth <= 0)
336 AliFatal(Form("Wrong stave width (%f)",fStaveWidth));
337 if (Abs(fStaveTilt) > 45)
338 AliWarning(Form("Stave tilt angle (%f) greater than 45deg",fStaveTilt));
b705c75b 339
340
341 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(), fLayerNumber);
342 TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
852af72e 343 layVol->SetUniqueID(fChipTypeID);
b705c75b 344 layVol->SetVisibility(kTRUE);
345 layVol->SetLineColor(1);
852af72e 346 TGeoVolume *stavVol = CreateStave();
b705c75b 347
348
349 // Now build up the layer
852af72e 350 alpha = 360./fNStaves;
351 Double_t r = fLayRadius /* +chip thick ?! */;
352 for (Int_t j=0; j<fNStaves; j++) {
b705c75b 353 Double_t phi = j*alpha + fPhi0;
354 xpos = r*CosD(phi);// r*SinD(-phi);
355 ypos = r*SinD(phi);// r*CosD(-phi);
356 zpos = 0.;
357 phi += 90;
852af72e 358 layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
359 new TGeoRotation("", phi-fStaveTilt,0,0)));
b705c75b 360 }
361
362
363 // Finally put everything in the mother volume
364 moth->AddNode(layVol, 1, 0);
365
366 return;
367}
368
369//________________________________________________________________________
852af72e 370TGeoVolume* AliITSUv1Layer::CreateStave(const TGeoManager * /*mgr*/){
b705c75b 371//
852af72e 372// Creates the actual Stave
b705c75b 373//
374// Input:
375// mgr : the GeoManager (used only to get the proper material)
376//
377// Output:
378//
379// Return:
380//
381// Created: 22 Jun 2011 Mario Sitta
382// Updated: 18 Dec 2013 Mario Sitta Handle IB and OB
383//
384
385 char volname[30];
386 Double_t xLenO = 5.79/2;
387
388 Double_t xlenI, ylen, zlen;
389 Double_t xpos, ypos, zpos, zmod;
390 Double_t alpha;
391
392
393 // First create all needed shapes
852af72e 394 alpha = (360./(2*fNStaves))*DegToRad();
b705c75b 395
852af72e 396 // The stave
b705c75b 397 xlenI = fLayRadius*Tan(alpha);
852af72e 398 if (fIsTurbo) xlenI = 0.5*fStaveWidth;
399 ylen = 0.5*fStaveThick;
b705c75b 400 zlen = 0.5*fZLength;
401
402 Double_t yplus = 0.46;
852af72e 403 TGeoXtru *stave = new TGeoXtru(2); //z sections
b705c75b 404 Double_t xv[5] = {xlenI,xlenI,0,-xlenI,-xlenI};
405 Double_t yv[5] = {ylen+0.09,-0.15,-yplus-fSensorThick,-0.15,ylen+0.09};
852af72e 406 stave->DefinePolygon(5,xv,yv);
407 stave->DefineSection(0,-zlen,0,0,1.);
408 stave->DefineSection(1,+zlen,0,0,1.);
b705c75b 409
410 // We have all shapes: now create the real volumes
411
852af72e 412 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
413// TGeoVolume *stavVol = new TGeoVolume(volname, stave, medAir);
414 TGeoVolume *stavVol = new TGeoVolumeAssembly(volname);
b705c75b 415
852af72e 416 // stavVol->SetVisibility(kFALSE);
417 stavVol->SetVisibility(kTRUE);
418 stavVol->SetLineColor(2);
b705c75b 419 TGeoVolume *modVol = 0;
852af72e 420 TGeoVolume *mechStavVol = 0;
b705c75b 421
852af72e 422 // Now build up the stave
b705c75b 423 if (fLayerNumber<3) {
852af72e 424 modVol = CreateChipInnerB(xlenI,ylen,zlen);
b705c75b 425 zmod = ((TGeoBBox*)modVol->GetShape())->GetDZ();
852af72e 426 for (Int_t j=0; j<fNChips; j++) {
b705c75b 427 xpos = 0.;
428 ypos = 0.021; // Remove small overlap - M.S: 21may13
852af72e 429 zpos = -stave->GetDZ() + j*2*zmod + zmod;
430 stavVol->AddNode(modVol, j, new TGeoTranslation(xpos, ypos, zpos));
b705c75b 431 }
432
433 // put mechanical stave structure, only inner barrel up to now
852af72e 434 mechStavVol = CreateStaveStructInnerB(xlenI,zlen);
435 if (mechStavVol)
436 stavVol->AddNode(mechStavVol, fNChips, new TGeoCombiTrans(0, -0.15-ylen, 0, new TGeoRotation("",0, 0, 180)));
b705c75b 437 }
438
439 else{
440 if (fStaveModel == AliITSUv1::kOBModel0) { // Create simplified stave struct as in v0
852af72e 441 modVol = CreateChipInnerB(xlenI,ylen,zlen);
b705c75b 442 printf("?????? %f %f %f\n",xlenI,ylen,zlen);
443 zmod = ((TGeoBBox*)modVol->GetShape())->GetDZ();
852af72e 444 for (Int_t j=0; j<fNChips; j++) {
b705c75b 445 xpos = 0.;
446 ypos = 0.021; // Remove small overlap - M.S: 21may13
852af72e 447 zpos = -stave->GetDZ() + j*2*zmod + zmod;
448 stavVol->AddNode(modVol, j, new TGeoTranslation(xpos, ypos, zpos));
b705c75b 449 }
450 } else { // (if fStaveModel) Create new stave struct as in TDR
451 modVol = CreateStaveOuterB(xLenO);
852af72e 452 stavVol->AddNode(modVol, 1, new TGeoTranslation(0, 2.5, 0));
b705c75b 453
852af72e 454 mechStavVol = CreateSpaceFrameOuterB(xLenO);
455 if (mechStavVol)
456 stavVol->AddNode(mechStavVol, 1,
b705c75b 457 new TGeoCombiTrans(0, 0, 0,
458 new TGeoRotation("", 180, 0, 0)));
459 } // if (fStaveModel)
460 }
461
462
852af72e 463 // Done, return the stave
464 return stavVol;
b705c75b 465}
466
467//________________________________________________________________________
852af72e 468TGeoVolume* AliITSUv1Layer::CreateStaveStructInnerB(const Double_t xsta,
469 const Double_t zsta,
b705c75b 470 const TGeoManager *mgr){
471//
472// Create the mechanical stave structure
473//
474// Input:
852af72e 475// xsta : X length
476// zsta : Z length
b705c75b 477// mgr : the GeoManager (used only to get the proper material)
478//
479// Output:
480//
481// Return:
482//
483// Created: 22 Mar 2013 Chinorat Kobdaj
484// Updated: 26 Apr 2013 Mario Sitta
485//
486
852af72e 487 TGeoVolume *mechStavVol = 0;
b705c75b 488
489 switch (fStaveModel) {
490 case AliITSUv1::kIBModelDummy:
852af72e 491 mechStavVol = CreateStaveModelInnerBDummy(xsta,zsta,mgr);
b705c75b 492 break;
493 case AliITSUv1::kIBModel0:
852af72e 494 mechStavVol = CreateStaveModelInnerB0(xsta,zsta,mgr);
b705c75b 495 break;
496 case AliITSUv1::kIBModel1:
852af72e 497 mechStavVol = CreateStaveModelInnerB1(xsta,zsta,mgr);
b705c75b 498 break;
499 case AliITSUv1::kIBModel21:
852af72e 500 mechStavVol = CreateStaveModelInnerB21(xsta,zsta,mgr);
b705c75b 501 break;
502 case AliITSUv1::kIBModel22:
852af72e 503 mechStavVol = CreateStaveModelInnerB22(xsta,zsta,mgr);
b705c75b 504 break;
505 case AliITSUv1::kIBModel3:
852af72e 506 mechStavVol = CreateStaveModelInnerB3(xsta,zsta,mgr);
b705c75b 507 break;
508 default:
509 AliFatal(Form("Unknown stave model %d",fStaveModel));
510 break;
511 }
512
852af72e 513 return mechStavVol;
b705c75b 514}
515
516
517//________________________________________________________________________
518TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerBDummy(const Double_t ,
519 const Double_t ,
520 const TGeoManager *) const {
521//
522// Create dummy stave
523//
524// Input:
852af72e 525// xsta : X length
526// zsta : Z length
b705c75b 527// mgr : the GeoManager (used only to get the proper material)
528//
529// Output:
530//
531// Return:
532//
533// Created: 22 Mar 2013 Chinorat Kobdaj
534// Updated: 26 Apr 2013 Mario Sitta
535//
536
537 // Done, return the stave structur
538 return 0;
539}
540
541//________________________________________________________________________
852af72e 542TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xsta,
543 const Double_t zsta,
b705c75b 544 const TGeoManager *mgr){
545//
546// Create the mechanical stave structure for Model 0 of TDR
547//
548// Input:
852af72e 549// xsta : X length
550// zsta : Z length
b705c75b 551// mgr : the GeoManager (used only to get the proper material)
552//
553// Output:
554//
555// Return:
556//
557// Created: 22 Mar 2013 Chinorat Kobdaj
558// Updated: 26 Apr 2013 Mario Sitta
559//
560
561 // Materials defined in AliITSUv1
562 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
563 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
564
565 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
566 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
567 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
568 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
569
570 // Local parameters
571 Double_t kConeOutRadius = 0.15/2;
572 Double_t kConeInRadius = 0.1430/2;
852af72e 573 Double_t kStaveLength = zsta*2;
574 Double_t kStaveWidth = xsta*2-kConeOutRadius*2;
b705c75b 575 Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
576 Double_t kStaveHeight = 0.3;
577 Double_t kHeight = kStaveHeight/2;
578 Double_t kAlpha = 90-67;//90-33.69;
579 Double_t kTheta = kAlpha*TMath::DegToRad();
580 Double_t kS1 = kWidth/TMath::Sin(kTheta);
581 Double_t kL1 = kWidth/TMath::Tan(kTheta);
582 Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
583 Double_t kThe2 = TMath::ATan(kHeight/kS1);
584 Double_t kBeta = kThe2*TMath::RadToDeg();
585 // Int_t loop = kStaveLength/(kL1);
586 // Double_t s3 = kWidth/(2*TMath::Sin(kTheta));
587 // Double_t s4 = 3*kWidth/(2*TMath::Sin(kTheta));
588
589 AliDebug(1, Form("BuildLevel %d\n",fBuildLevel));
590
591 char volname[30];
852af72e 592 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
b705c75b 593
594 Double_t z=0, y=-0.011+0.0150, x=0;
595
852af72e 596 TGeoVolume *mechStavVol = 0;
b705c75b 597
598 if (fBuildLevel < 5) {
599
600 // world (trapezoid)
601 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
602 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
603 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07};
604 mechStruct->DefinePolygon(5,xv,yv);
605 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
606 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
607
852af72e 608 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
609 mechStavVol->SetLineColor(12);
610 mechStavVol->SetFillColor(12);
611 mechStavVol->SetVisibility(kTRUE);
b705c75b 612
613 // detailed structure ++++++++++++++
614 //Pipe Kapton grey-35
615 TGeoTube *coolTube = new TGeoTube(kConeInRadius,kConeOutRadius,kStaveLength/2);
616 TGeoVolume *volCoolTube= new TGeoVolume("pipe", coolTube, medKapton);
617 volCoolTube->SetFillColor(35);
618 volCoolTube->SetLineColor(35);
852af72e 619 mechStavVol->AddNode(volCoolTube,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
620 mechStavVol->AddNode(volCoolTube,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
b705c75b 621 }
622
623 if (fBuildLevel < 4) {
624 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength/2);
625 TGeoVolume *volCoolTubeW= new TGeoVolume("pipeWater", coolTubeW, medWater);
626 volCoolTubeW->SetFillColor(4);
627 volCoolTubeW->SetLineColor(4);
852af72e 628 mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
629 mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
b705c75b 630 }
631
632 //frequency of filament
633 //n = 4 means very dense(4 filaments per interval)
634 //n = 2 means dense(2 filaments per interval)
635 Int_t n =4;
636 Int_t loop = (Int_t)(kStaveLength/(4*kL1/n) + 2/n)-1;
637 if (fBuildLevel < 3) {
638 //Top CFRP Filament black-12 Carbon structure TGeoBBox (length,thickness,width)
639 TGeoBBox *t2=new TGeoBBox(kS2,0.007/2,0.15/2);//(kS2,0.002,0.02);
640 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
641 volT2->SetLineColor(12);
642 volT2->SetFillColor(12);
643
644 for(int i=1;i<loop;i++){ //i<60;i++){
852af72e 645 mechStavVol->AddNode(volT2,4*i+0,
b705c75b 646 new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
647 new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
852af72e 648 mechStavVol->AddNode(volT2,4*i+1,
b705c75b 649 new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
650 new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
852af72e 651 mechStavVol->AddNode(volT2,4*i+2,
b705c75b 652 new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
653 new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
852af72e 654 mechStavVol->AddNode(volT2,4*i+3,
b705c75b 655 new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
656 new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
657 }
658
659
660 //Bottom CFRP Filament black-12 Carbon structure TGeoBBox (thickness,width,length)
661 TGeoBBox *t1=new TGeoBBox(0.007/2,0.15/2,kS1);//(0.002,0.02,kS1);
662 TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K);
663 volT1->SetLineColor(12);
664 volT1->SetFillColor(12);
665
666 for(int i=1;i<loop;i++){
852af72e 667 mechStavVol->AddNode(volT1,4*i+0,
b705c75b 668 new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1),
669 new TGeoRotation("volT1",-90,kAlpha,0)));
852af72e 670 mechStavVol->AddNode(volT1,4*i+1,
b705c75b 671 new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1),
672 new TGeoRotation("volT1",90,kAlpha,0)));
852af72e 673 mechStavVol->AddNode(volT1,4*i+2,
b705c75b 674 new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
675 new TGeoRotation("volT1",-90,-kAlpha,0)));
852af72e 676 mechStavVol->AddNode(volT1,4*i+3,
b705c75b 677 new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
678 new TGeoRotation("volT1",-90,+kAlpha,0)));
679 }
680 }
681
682 if (fBuildLevel < 2) {
683 // Glue CFRP-Silicon layers TGeoBBox(thickness,width,kS1);
684 TGeoBBox *tG=new TGeoBBox(0.0075/2,0.18/2,kS1);
685 TGeoVolume *volTG=new TGeoVolume("Glue1", tG, medGlue);
686 volTG->SetLineColor(5);
687 volTG->SetFillColor(5);
688
689 for(int i=1;i<loop;i++){ //i<60;i++){
852af72e 690 mechStavVol->AddNode(volTG,4*i+0,
b705c75b 691 new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i),
692 new TGeoRotation("volTG",-90,kAlpha,0)));
852af72e 693 mechStavVol->AddNode(volTG,4*i+1,
b705c75b 694 new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i),
695 new TGeoRotation("volTG",90,kAlpha,0)));
852af72e 696 mechStavVol->AddNode(volTG,4*i+2,
b705c75b 697 new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*i*kL1)+kS1/2, //z-14.25+(i*2*kL1),
698 new TGeoRotation("volTG",-90,-kAlpha,0)));
852af72e 699 mechStavVol->AddNode(volTG,4*i+3,
b705c75b 700 new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
701 new TGeoRotation("volTG",-90,+kAlpha,0)));
702 }
703
852af72e 704 TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta);
b705c75b 705 TGeoVolume *volGlue=new TGeoVolume("Glue2", glue, medGlue);
706 volGlue->SetLineColor(5);
707 volGlue->SetFillColor(5);
852af72e 708 //mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
709 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
b705c75b 710 }
711
712 if (fBuildLevel < 1) {
713 //Flex cable brown-28 TGeoBBox(width,thickness,length);
852af72e 714 TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta);
b705c75b 715 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
716 volCable->SetLineColor(28);
717 volCable->SetFillColor(28);
852af72e 718 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
b705c75b 719 }
720
721 // Done, return the stave structur
852af72e 722 return mechStavVol;
b705c75b 723}
724
725
726//________________________________________________________________________
852af72e 727TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xsta,
728 const Double_t zsta,
b705c75b 729 const TGeoManager *mgr){
730//
731// Create the mechanical stave structure for Model 1 of TDR
732//
733// Input:
852af72e 734// xsta : X length
735// zsta : Z length
b705c75b 736// mgr : the GeoManager (used only to get the proper material)
737//
738// Output:
739//
740// Return:
741//
742// Created: 22 Mar 2013 Chinorat Kobdaj
743// Updated: 26 Apr 2013 Mario Sitta
744//
745
746 // Materials defined in AliITSUv1
747 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
748 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
749
750 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
751 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
752 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
753 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
754
755 // Local parameters
756 Double_t kConeOutRadius = 0.15/2;
757 // Double_t kConeInRadius = 0.1430/2;
852af72e 758 Double_t kStaveLength = zsta*2;
759 // Double_t kStaveWidth = xsta*2-kConeOutRadius*2;
760 Double_t kStaveWidth = xsta*2;
b705c75b 761 Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
762 Double_t kStaveHeight = 0.3;
763 Double_t kHeight = kStaveHeight/2;
764 Double_t kAlpha = 90-33.;//90-30;
765 Double_t kTheta = kAlpha*TMath::DegToRad();
766 Double_t kS1 = kWidth/TMath::Sin(kTheta);
767 Double_t kL1 = kWidth/TMath::Tan(kTheta);
768 Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
769 Double_t kThe2 = TMath::ATan(kHeight/kS1);
770 Double_t kBeta = kThe2*TMath::RadToDeg();
771 Int_t loop = (Int_t)((kStaveLength/(2*kL1))/2);
772
773
852af72e 774 TGeoVolume *mechStavVol = 0;
b705c75b 775
776 char volname[30];
852af72e 777 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
b705c75b 778
779
780 // detailed structure ++++++++++++++
781 Double_t z=0, y=-0.011+0.0150, x=0;
782
783 // Polimide micro channels numbers
784 Double_t yMC = y-kHeight+0.01;
785 Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
852af72e 786 Double_t xstaMC = (nb*0.1-0.08)/2;
b705c75b 787
788
789 if (fBuildLevel < 5) {
790 // world (trapezoid)
791 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
792 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
793 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07};
794 mechStruct->DefinePolygon(5,xv,yv);
795 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
796 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
797
852af72e 798 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
799 mechStavVol->SetLineColor(12);
800 mechStavVol->SetFillColor(12);
801 mechStavVol->SetVisibility(kTRUE);
b705c75b 802
803 // Polimide micro channels numbers
852af72e 804 TGeoBBox *tM0=new TGeoBBox(xstaMC, 0.005/2, zsta);
b705c75b 805 TGeoVolume *volTM0=new TGeoVolume("MicroChanCover", tM0, medKapton);
806 volTM0->SetLineColor(35);
807 volTM0->SetFillColor(35);
852af72e 808 mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x,-0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
809 mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x,+0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
b705c75b 810
852af72e 811 TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta);
b705c75b 812 TGeoVolume *volTM0b=new TGeoVolume("MicroChanWalls", tM0b, medKapton);
813 volTM0b->SetLineColor(35);
814 volTM0b->SetFillColor(35);
815 for (Int_t ib=0;ib<nb;ib++) {
852af72e 816 mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
b705c75b 817 }
818
819 }
820
821 if (fBuildLevel < 4) {
822 // Water in Polimide micro channels
852af72e 823 TGeoBBox *water=new TGeoBBox(0.08/2, 0.02/2, zsta+0.1);
b705c75b 824 TGeoVolume *volWater=new TGeoVolume("Water", water, medWater);
825 volWater->SetLineColor(4);
826 volWater->SetFillColor(4);
827 for (Int_t ib=0;ib<(nb-1);ib++) {
852af72e 828 mechStavVol->AddNode(volWater, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.06,yMC, z, new TGeoRotation("",0, 0, 0)));
b705c75b 829 }
830 }
831
832 if (fBuildLevel < 3) {
833 //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length)
834 Double_t filWidth = 0.04;
835 Double_t filHeight= 0.02;
836 TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,kS1);
837 TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K);
838 volT1->SetLineColor(12);
839 volT1->SetFillColor(12);
840 for(int i=0;i<loop;i++){//i<30;i++){
852af72e 841 mechStavVol->AddNode(volT1,4*i+0,
b705c75b 842 new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1)+kS1/2,
843 new TGeoRotation("volT1",-90,kAlpha,0)));
852af72e 844 mechStavVol->AddNode(volT1,4*i+1,
b705c75b 845 new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1*i)+kS1/2,
846 new TGeoRotation("volT1",90,kAlpha,0)));
852af72e 847 mechStavVol->AddNode(volT1,4*i+2,
b705c75b 848 new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
849 new TGeoRotation("volT1",-90,-kAlpha,0)));
852af72e 850 mechStavVol->AddNode(volT1,4*i+3,
b705c75b 851 new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
852 new TGeoRotation("volT1",-90,+kAlpha,0)));
853 }
854
855 // Top filament CFRP black-12 Carbon structure TGeoBBox (length,thickness,width)
856 TGeoBBox *t2=new TGeoBBox(kS2,filHeight/2,filWidth/2);
857 TGeoVolume *volT2=new TGeoVolume("CFRPTop", t2, medM60J3K);
858 volT2->SetLineColor(12);
859 volT2->SetFillColor(12);
860 for(int i=0;i<loop;i++){ //i<30;i++){
852af72e 861 mechStavVol->AddNode(volT2,4*i+0,
b705c75b 862 new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
863 new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
852af72e 864 mechStavVol->AddNode(volT2,4*i+1,
b705c75b 865 new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
866 new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
852af72e 867 mechStavVol->AddNode(volT2,4*i+2,
b705c75b 868 new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
869 new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
852af72e 870 mechStavVol->AddNode(volT2,4*i+3,
b705c75b 871 new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
872 new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
873 }
874 }
875
876 if (fBuildLevel < 2) {
877 // Glue between filament and polimide micro channel
878 TGeoBBox *t3=new TGeoBBox(0.01/2,0.04,kS1);
879 TGeoVolume *volT3=new TGeoVolume("FilamentGlue", t3, medGlue);
880 volT3->SetLineColor(5);
881 volT3->SetFillColor(5);
882 for(int i=0;i<loop;i++){//i<30;i++){
852af72e 883 mechStavVol->AddNode(volT3,4*i+0,
b705c75b 884 new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2,
885 new TGeoRotation("volT1",-90,kAlpha,0)));
852af72e 886 mechStavVol->AddNode(volT3,4*i+1,
b705c75b 887 new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2,
888 new TGeoRotation("volT1",90,kAlpha,0)));
852af72e 889 mechStavVol->AddNode(volT3,4*i+2,
b705c75b 890 new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
891 new TGeoRotation("volT1",-90,-kAlpha,0)));
852af72e 892 mechStavVol->AddNode(volT3,4*i+3,
b705c75b 893 new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
894 new TGeoRotation("volT1",-90,+kAlpha,0)));
895 }
896
897 // Glue microchannel and sensor
852af72e 898 TGeoBBox *glueM = new TGeoBBox(xsta, 0.01/2, zsta);
b705c75b 899 TGeoVolume *volGlueM=new TGeoVolume("MicroChanGlue", glueM, medGlue);
900 volGlueM->SetLineColor(5);
901 volGlueM->SetFillColor(5);
852af72e 902 mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
b705c75b 903
904 // Glue sensor and kapton
852af72e 905 TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta);
b705c75b 906 TGeoVolume *volGlue=new TGeoVolume("SensorGlue", glue, medGlue);
907 volGlue->SetLineColor(5);
908 volGlue->SetFillColor(5);
852af72e 909 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
b705c75b 910 }
911
912 if (fBuildLevel < 1) {
852af72e 913 TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta);
b705c75b 914 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
915 volCable->SetLineColor(28);
916 volCable->SetFillColor(28);
852af72e 917 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
b705c75b 918 }
919
920 // Done, return the stave structur
852af72e 921 return mechStavVol;
b705c75b 922
923}
924
925//________________________________________________________________________
852af72e 926TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xsta,
927 const Double_t zsta,
b705c75b 928 const TGeoManager *mgr){
929//
930// Create the mechanical stave structure for Model 2.1 of TDR
931//
932// Input:
852af72e 933// xsta : X length
934// zsta : Z length
b705c75b 935// mgr : the GeoManager (used only to get the proper material)
936//
937// Output:
938//
939// Return:
940//
941// Created: 22 Mar 2013 Chinorat Kobdaj
942// Updated: 26 Apr 2013 Mario Sitta
943//
944
945 // Materials defined in AliITSUv1
946 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
947 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
948
949 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
950 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
951 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
952 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
953 TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
954 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
955 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
956
957 // Local parameters
958 Double_t kConeOutRadius =0.151384/2;
959 Double_t kConeInRadius = 0.145034/2;
852af72e 960 Double_t kStaveLength = zsta;
961 Double_t kStaveWidth = xsta*2;
b705c75b 962 Double_t kWidth = (kStaveWidth+0.005)/4;
963 Double_t kStaveHeigth = 0.33;//0.33;
964 Double_t kHeight = (kStaveHeigth+0.025)/2;
965 Double_t kAlpha = 57; //56.31;
966 Double_t kTheta = kAlpha*TMath::DegToRad();
967 Double_t kS1 = (kStaveWidth/4)/TMath::Sin(kTheta);
968 Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta);
969 Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
970 Double_t kThe2 = TMath::ATan(kHeight/kS1);
971 Double_t kBeta = kThe2*TMath::RadToDeg();
972 // Double_t lay1 = 0.003157;
973 Double_t kLay1 = 0.003;//Amec carbon
974 // Double_t lay2 = 0.0043215;//C Fleece carbon
975 Double_t kLay2 = 0.002;//C Fleece carbon
976 Double_t kLay3 = 0.007;//K13D2U carbon
977 Int_t loop = (Int_t)(kStaveLength/(2*kL1));
978
979
980 char volname[30];
852af72e 981 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
b705c75b 982
983 Double_t z=0, y=-(kConeOutRadius+0.03)+0.0385, x=0;
984
852af72e 985 TGeoVolume *mechStavVol = 0;
b705c75b 986
987 if (fBuildLevel < 5) {
988 // world (trapezoid)
989 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
990 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
991 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeigth,0,-kConeOutRadius*2-0.07};
992 mechStruct->DefinePolygon(5,xv,yv);
993 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
994 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
995
852af72e 996 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
997 mechStavVol->SetLineColor(12);
998 mechStavVol->SetFillColor(12);
999 mechStavVol->SetVisibility(kTRUE);
b705c75b 1000
1001 //Pipe Kapton grey-35
1002 TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius,kConeInRadius,kConeOutRadius);
1003 TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
1004 volCone1->SetFillColor(35);
1005 volCone1->SetLineColor(35);
852af72e 1006 mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
1007 mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
b705c75b 1008 }
1009
1010 if (fBuildLevel < 4) {
1011
1012 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength);
1013 TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
1014 volCoolTubeW->SetFillColor(4);
1015 volCoolTubeW->SetLineColor(4);
852af72e 1016 mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
1017 mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
b705c75b 1018 }
1019
1020 if (fBuildLevel < 3) {
1021 //top fillament
1022 // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width)
1023 TGeoBBox *t2=new TGeoBBox(kS2,0.02/2,0.04/2); //TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02);
1024 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
1025 volT2->SetLineColor(12);
1026 volT2->SetFillColor(12);
1027 for(int i=0;i<loop;i++){// i<28;i++){
852af72e 1028 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)));
1029 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)));
1030 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)));
1031 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)));
1032// 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 1033
1034 }
1035
1036 //wall side structure out
1037 TGeoBBox *box4 = new TGeoBBox(0.03/2,0.12/2,kStaveLength-0.50);
1038 TGeoVolume *plate4 = new TGeoVolume("WallOut",box4,medM60J3K);
1039 plate4->SetFillColor(35);
1040 plate4->SetLineColor(35);
852af72e 1041 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)));
1042 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 1043 //wall side in
1044 TGeoBBox *box5 = new TGeoBBox(0.015/2,0.12/2,kStaveLength-0.50);
1045 TGeoVolume *plate5 = new TGeoVolume("WallIn",box5,medM60J3K);
1046 plate5->SetFillColor(12);
1047 plate5->SetLineColor(12);
852af72e 1048 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)));
1049 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 1050
1051 //Amec Thermasol red-2 cover tube FGS300
1052 TGeoConeSeg *cons1 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius,kConeOutRadius+kLay1,kConeOutRadius,kConeOutRadius+kLay1,0,180);
1053 TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
1054 cone11->SetFillColor(2);
1055 cone11->SetLineColor(2);
852af72e 1056 mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
1057 mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
b705c75b 1058
1059 TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,kLay1/2,kStaveLength-0.50);
1060 TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
1061 plate2->SetFillColor(2);
1062 plate2->SetLineColor(2);
852af72e 1063 mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate2",0,0,0)));
b705c75b 1064
1065 TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay1/2,kStaveLength-0.50);
1066 TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
1067 plate21->SetFillColor(2);
1068 plate21->SetLineColor(2);
852af72e 1069 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)));
1070 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 1071
1072 TGeoBBox *box22 = new TGeoBBox((kLay1/2),kConeOutRadius/2,kStaveLength-0.50);
1073 TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
1074 plate22->SetFillColor(2);
1075 plate22->SetLineColor(2);
852af72e 1076 mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1077 mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1078 mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1079 mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
b705c75b 1080
1081 //C Fleece
1082 TGeoConeSeg *cons2 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,0,180);
1083 TGeoVolume *cone12 = new TGeoVolume("CFleecePipeCover",cons2,medCarbonFleece);
1084 cone12->SetFillColor(28);
1085 cone12->SetLineColor(28);
852af72e 1086 mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
1087 mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
b705c75b 1088
1089 TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+kLay1)))/2,kLay2/2,kStaveLength-0.50);
1090 TGeoVolume *plate3 = new TGeoVolume("CFleeceMiddle",box3,medCarbonFleece);
1091 plate3->SetFillColor(28);
1092 plate3->SetLineColor(28);
852af72e 1093 mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate3",0,0,0)));
b705c75b 1094
1095 TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay2/2,kStaveLength-0.50);
1096 TGeoVolume *plate31 = new TGeoVolume("CFleeceLeftRight",box31,medCarbonFleece);
1097 plate31->SetFillColor(28);
1098 plate31->SetLineColor(28);
852af72e 1099 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)));
1100 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 1101
1102 TGeoBBox *box32 = new TGeoBBox((kLay2/2),(kConeOutRadius-kLay1)/2,kStaveLength-0.50);
1103 TGeoVolume *plate32 = new TGeoVolume("CFleeceVertical",box32,medCarbonFleece);
1104 plate32->SetFillColor(28);
1105 plate32->SetLineColor(28);
852af72e 1106 mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1107 mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1108 mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1109 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 1110
1111
1112 //K13D2U carbon plate
1113 TGeoBBox *box1 = new TGeoBBox(2*kWidth,kLay3/2,kStaveLength-0.50);
1114 TGeoVolume *plate1 = new TGeoVolume("CarbonPlate",box1,medK13D2U2k);
1115 plate1->SetFillColor(5);
1116 plate1->SetLineColor(5);
852af72e 1117 mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(kLay3/2)),z,new TGeoRotation("plate1",0,0,0)));
b705c75b 1118
1119 //C Fleece bottom plate
1120 TGeoBBox *box6 = new TGeoBBox(2*kWidth,kLay2/2,kStaveLength-0.50);
1121 TGeoVolume *plate6 = new TGeoVolume("CFleeceBottom",box6,medCarbonFleece);
1122 plate6->SetFillColor(2);
1123 plate6->SetLineColor(2);
852af72e 1124 mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)),z,new TGeoRotation("plate1",0,0,0)));
b705c75b 1125
1126
1127 }
1128
1129 if (fBuildLevel < 2) {
1130 //Glue layers and kapton
852af72e 1131 TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, 0.005/2, zsta);
b705c75b 1132 TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
1133 volGlue->SetLineColor(5);
1134 volGlue->SetFillColor(5);
852af72e 1135 mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
1136 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 1137 }
1138
1139 if (fBuildLevel < 1) {
852af72e 1140 TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, 0.01/2, zsta);
b705c75b 1141 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
1142 volCable->SetLineColor(28);
1143 volCable->SetFillColor(28);
852af72e 1144 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 1145 }
1146
1147
1148 // Done, return the stave structure
852af72e 1149 return mechStavVol;
b705c75b 1150
1151}
1152// new model22
1153//________________________________________________________________________
852af72e 1154TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xsta,
1155 const Double_t zsta,
b705c75b 1156 const TGeoManager *mgr){
1157//
1158// Create the mechanical stave structure for Model 2.2 of TDR
1159//
1160// Input:
852af72e 1161// xsta : X length
1162// zsta : Z length
b705c75b 1163// mgr : the GeoManager (used only to get the proper material)
1164//
1165// Output:
1166//
1167// Return:
1168//
1169// Created: 22 Mar 2013 Chinorat Kobdaj
1170// Updated: 26 Apr 2013 Mario Sitta
1171// Updated: 30 Apr 2013 Wanchaloem Poonsawat
1172//
1173
1174 // Materials defined in AliITSUv1
1175 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1176 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1177
1178 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
1179 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1180 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1181 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
1182 TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
1183 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
1184 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1185
1186 // Local parameters
1187 Double_t kConeOutRadius =0.107/2;//0.107/2;
1188 Double_t kConeInRadius = 0.1015/2;//0.10105/2
852af72e 1189 Double_t kStaveLength = zsta;
1190 Double_t kStaveWidth = xsta*2;
b705c75b 1191 Double_t kWidth = (kStaveWidth)/4;
1192 Double_t kStaveHeight = 0.283;//0.33;
1193 Double_t kHeight = (kStaveHeight)/2;
1194 Double_t kAlpha = 57;//56.31;
1195 Double_t kTheta = kAlpha*TMath::DegToRad();
1196 Double_t kS1 = ((kStaveWidth)/4)/TMath::Sin(kTheta);
1197 Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta);
1198 Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(kThe2);
1199 Double_t kThe2 = TMath::ATan(kHeight/(0.375-0.036));
1200 Double_t kBeta = kThe2*TMath::RadToDeg();
1201 Double_t klay1 = 0.003;//Amec carbon
1202 Double_t klay2 = 0.002;//C Fleece carbon
1203 Double_t klay3 = 0.007;//CFplate K13D2U carbon
1204 Double_t klay4 = 0.007;//GluekStaveLength/2
1205 Double_t klay5 = 0.01;//Flex cable
1206 Double_t kTopVertexMaxWidth = 0.072;
1207 Double_t kTopVertexHeight = 0.04;
1208 Double_t kSideVertexMWidth = 0.052;
1209 Double_t kSideVertexHeight = 0.11;
1210
1211
1212 Int_t loop = (Int_t)(kStaveLength/(2*kL1));
1213
1214 char volname[30];
852af72e 1215 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
b705c75b 1216
1217 Double_t z=0, y=-(2*kConeOutRadius)+klay1+klay2+fSensorThick/2-0.0004, x=0;
1218
852af72e 1219 TGeoVolume *mechStavVol = 0;
b705c75b 1220
1221 if (fBuildLevel < 5) {
1222 // world (trapezoid)
1223 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
1224 Double_t xv[6] = {kStaveWidth/2,kStaveWidth/2,0.012,-0.012,-kStaveWidth/2,-kStaveWidth/2};
1225 /* Double_t yv[6] = {-2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5),
1226 0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02,
1227 -2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5)}; // (kConeOutRadius*2)-0.0635 */
1228 Double_t yv[6] = {-(kConeOutRadius*2)-0.06395,0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02,-(kConeOutRadius*2)-0.06395}; // (kConeOutRadius*2)-0.064
1229 mechStruct->DefinePolygon(6,xv,yv);
1230 mechStruct->DefineSection(0,-kStaveLength,0,0,1.);
1231 mechStruct->DefineSection(1,kStaveLength,0,0,1.);
1232
852af72e 1233 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
1234 mechStavVol->SetLineColor(12);
1235 mechStavVol->SetFillColor(12);
1236 mechStavVol->SetVisibility(kTRUE);
b705c75b 1237
1238 //Polyimide Pipe Kapton grey-35
1239 TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius-0.0001,kConeInRadius,kConeOutRadius-0.0001);
1240 TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
1241 volCone1->SetFillColor(35);
1242 volCone1->SetLineColor(35);
852af72e 1243 mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
1244 mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
b705c75b 1245 }
1246
1247 if (fBuildLevel < 4) {
1248 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius-0.0001,kStaveLength);
1249 TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
1250 volCoolTubeW->SetFillColor(4);
1251 volCoolTubeW->SetLineColor(4);
852af72e 1252 mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
1253 mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
b705c75b 1254 }
1255
1256 if (fBuildLevel < 3) {
1257 //top fillament
1258 // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width)
1259 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
1260 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
1261 volT2->SetLineColor(12);
1262 volT2->SetFillColor(12);
1263 for(int i=0;i<loop;i++){// i<28;i++){
1264 // 1) Front Left Top Filament
852af72e 1265 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 1266 // 2) Front Right Top Filament
852af72e 1267 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 1268 // 3) Back Left Top Filament
852af72e 1269 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 1270 // 4) Back Right Top Filament
852af72e 1271 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 1272 }
1273
1274 //Vertex structure
1275
1276 //top ver trd1
1277 TGeoTrd1 *trd1 = new TGeoTrd1(0,kTopVertexMaxWidth/2,kStaveLength,kTopVertexHeight/2);
1278 TGeoVolume *ibdv = new TGeoVolume("TopVertex",trd1,medM60J3K);
1279 ibdv->SetFillColor(12);
1280 ibdv->SetLineColor(12);
852af72e 1281 mechStavVol->AddNode(ibdv,1,new TGeoCombiTrans(x,y+kStaveHeight+0.03,z,new TGeoRotation("ibdv",0.,-90,0)));//y+kStaveHeight+0.056
b705c75b 1282
1283 //left trd2
1284 TGeoTrd1 *trd2 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
1285 TGeoVolume *ibdv2 = new TGeoVolume("LeftVertex",trd2,medM60J3K);
1286 ibdv2->SetFillColor(12);
1287 ibdv2->SetLineColor(12);
852af72e 1288 mechStavVol->AddNode(ibdv2,1,new TGeoCombiTrans(x+kStaveWidth/2-0.06,y-0.0355,z,new TGeoRotation("ibdv2",-103.3,90,0))); //x-kStaveWidth/2-0.09 old Config.C y-0.0355,
b705c75b 1289
1290 //right trd3
1291 TGeoTrd1 *trd3 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
1292 TGeoVolume *ibdv3 = new TGeoVolume("RightVertex",trd3,medM60J3K);
1293 ibdv3->SetFillColor(12);
1294 ibdv3->SetLineColor(12);
852af72e 1295 mechStavVol->AddNode(ibdv3,1,new TGeoCombiTrans(x-kStaveWidth/2+0.06,y-0.0355,z,new TGeoRotation("ibdv3",103.3,90,0))); //x-kStaveWidth/2+0.09 old Config.C
b705c75b 1296
1297 //Carbon Fleece
852af72e 1298 TGeoConeSeg *cons2 = new TGeoConeSeg(zsta,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,0,180);
b705c75b 1299 TGeoVolume *cone12 = new TGeoVolume("CarbonFleecePipeCover",cons2,medCarbonFleece);
1300 cone12->SetFillColor(28);
1301 cone12->SetLineColor(28);
852af72e 1302 mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone12",0,0,0)));
1303 mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone12",0,0,0)));
b705c75b 1304
852af72e 1305 TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+klay1)))/2,klay2/2,zsta);//kStaveLength-0.50);
b705c75b 1306 TGeoVolume *plate3 = new TGeoVolume("CarbonFleeceMiddle",box3,medCarbonFleece);
1307 plate3->SetFillColor(28);
1308 plate3->SetLineColor(28);
852af72e 1309 mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate3",0,0,0)));
b705c75b 1310
852af72e 1311 TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,klay2/2,zsta);
b705c75b 1312 TGeoVolume *plate31 = new TGeoVolume("CarbonFleeceLeftRight",box31,medCarbonFleece);
1313 plate31->SetFillColor(28);
1314 plate31->SetLineColor(28);
852af72e 1315 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)));
1316 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 1317
852af72e 1318 TGeoBBox *box32 = new TGeoBBox((klay2/2),(kConeOutRadius-klay1)/2,zsta);
b705c75b 1319 TGeoVolume *plate32 = new TGeoVolume("CarbonFleeceVertical",box32,medCarbonFleece);
1320 plate32->SetFillColor(28);
1321 plate32->SetLineColor(28);
852af72e 1322 mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1323 mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1324 mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1325 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 1326
1327 //Amec Thermasol red-2 cover tube FGS300 or Carbon Paper
852af72e 1328 TGeoConeSeg *cons1 = new TGeoConeSeg(zsta,kConeOutRadius,kConeOutRadius+klay1-0.0001,kConeOutRadius,kConeOutRadius+klay1-0.0001,0,180);//kConeOutRadius+klay1-0.0001
b705c75b 1329 TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
1330 cone11->SetFillColor(2);
1331 cone11->SetLineColor(2);
852af72e 1332 mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone11",0,0,0)));
1333 mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone11",0,0,0)));
b705c75b 1334
852af72e 1335 TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,(klay1/2),zsta);//kStaveLength-0.50);
b705c75b 1336 TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
1337 plate2->SetFillColor(2);
1338 plate2->SetLineColor(2);
852af72e 1339 mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate2",0,0,0)));
b705c75b 1340
852af72e 1341 TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,(klay1/2),zsta);
b705c75b 1342 TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
1343 plate21->SetFillColor(2);
1344 plate21->SetLineColor(2);
852af72e 1345 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)));
1346 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 1347
852af72e 1348 TGeoBBox *box22 = new TGeoBBox((klay1/2),kConeOutRadius/2,zsta);
b705c75b 1349 TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
1350 plate22->SetFillColor(2);
1351 plate22->SetLineColor(2);
852af72e 1352 mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1353 mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1354 mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1355 mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
b705c75b 1356
1357 //K13D2U CF plate
852af72e 1358 TGeoBBox *box1 = new TGeoBBox(2*kWidth,(klay3)/2,zsta);
b705c75b 1359 TGeoVolume *plate1 = new TGeoVolume("CFPlate",box1,medK13D2U2k);
1360 plate1->SetFillColor(5);
1361 plate1->SetLineColor(5);
852af72e 1362 mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(klay3/2)),z,new TGeoRotation("plate1",0,0,0)));
b705c75b 1363
1364 //C Fleece bottom plate
852af72e 1365 TGeoBBox *box6 = new TGeoBBox(2*kWidth,(klay2)/2,zsta);
b705c75b 1366 TGeoVolume *plate6 = new TGeoVolume("CarbonFleeceBottom",box6,medCarbonFleece);
1367 plate6->SetFillColor(2);
1368 plate6->SetLineColor(2);
852af72e 1369 mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+(klay2/2)),z,new TGeoRotation("plate6",0,0,0)));
b705c75b 1370
1371 }
1372 if (fBuildLevel < 2) {
1373 //Glue klayers and kapton
852af72e 1374 TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, (klay4)/2, zsta);
b705c75b 1375 TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
1376 volGlue->SetLineColor(5);
1377 volGlue->SetFillColor(5);
852af72e 1378 // mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4/2)), z, new TGeoRotation("",0, 0, 0)));
1379 mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4)/2)+0.00005, z, new TGeoRotation("",0, 0, 0)));
b705c75b 1380 }
1381
1382 if (fBuildLevel < 1) {
1383 //Flex Cable or Bus
852af72e 1384 TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, klay5/2, zsta);//klay5/2
b705c75b 1385 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
1386 volCable->SetLineColor(28);
1387 volCable->SetFillColor(28);
852af72e 1388 // mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.0002, z, new TGeoRotation("",0, 0, 0)));
1389 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.01185, z, new TGeoRotation("",0, 0, 0)));
b705c75b 1390 }
1391 // Done, return the stave structe
852af72e 1392 return mechStavVol;
b705c75b 1393}
1394
1395// model3
1396//________________________________________________________________________
852af72e 1397TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xsta,
1398 const Double_t zsta,
b705c75b 1399 const TGeoManager *mgr){
1400//
1401// Create the mechanical stave structure for Model 3 of TDR
1402//
1403// Input:
852af72e 1404// xsta : X length
1405// zsta : Z length
b705c75b 1406// mgr : the GeoManager (used only to get the proper material)
1407//
1408// Output:
1409//
1410// Return:
1411//
1412// Created: 28 May 2013 Chinorat Kobdaj
1413// Updated: Mario Sitta
1414// Updated: Wanchaloem Poonsawat
1415//
1416
1417 // Materials defined in AliITSUv1
1418 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1419 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1420
1421 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
1422 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1423 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1424 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
1425 //TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
1426 //TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
1427 //TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1428
1429 // Local parameters
1430 Double_t kConeOutRadius = 0.15/2;
852af72e 1431 Double_t kStaveLength = zsta*2;
1432 Double_t kStaveWidth = xsta*2;
b705c75b 1433 Double_t w = kStaveWidth/4;//1/2 of W
1434 Double_t staveHeight = 0.3;
1435 Double_t h = staveHeight/2;
1436 Double_t alpha = 90-33.;//90-30;
1437 Double_t the1 = alpha*TMath::DegToRad();
1438 Double_t s1 = w/TMath::Sin(the1);
1439 Double_t l = w/TMath::Tan(the1);
1440 Double_t s2 = TMath::Sqrt(h*h + s1*s1);//TMath::Sin(the2);
1441 Double_t the2 = TMath::ATan(h/s1);
1442 Double_t beta = the2*TMath::RadToDeg();
1443 Double_t klay4 = 0.007; //Glue
1444 Double_t klay5 = 0.01; //Flexcable
1445 Int_t loop = (Int_t)((kStaveLength/(2*l))/2);
1446 Double_t hh = 0.01;
1447 Double_t ang1 = 0*TMath::DegToRad();
1448 Double_t ang2 = 0*TMath::DegToRad();
1449 Double_t ang3 = 0*TMath::DegToRad();
852af72e 1450 Int_t chips = 4;
b705c75b 1451 Double_t headWidth=0.25;
852af72e 1452 Double_t smcLength=kStaveLength/chips-2*headWidth;//6.25;
b705c75b 1453 Double_t smcWidth=kStaveWidth;
1454 Double_t smcSide1Thick=0.03;
1455 Double_t vaporThick=0.032;
1456 Double_t liquidThick=0.028;
1457 Double_t smcSide2Thick=0.01;
1458 Double_t smcSide3Thick=0.0055;
1459 Double_t smcSide4Thick=0.0095;
1460 Double_t smcSide5Thick=0.0075;
1461 Double_t smcSpace=0.01;
1462
1463
1464 char volname[30];
852af72e 1465 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
b705c75b 1466
1467 // detailed structure ++++++++++++++
1468 Double_t z=0, y=0-0.007, x=0;
1469
1470 // Polimide micro channels numbers
1471 Double_t yMC = y-h+0.01;
1472 Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
852af72e 1473 Double_t xstaMC = (nb*0.1-0.08)/2;
b705c75b 1474
1475
852af72e 1476 TGeoVolume *mechStavVol = 0;
b705c75b 1477 if (fBuildLevel < 5) {
1478 // world (trapezoid)
1479 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
1480 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
1481 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,staveHeight,0,-kConeOutRadius*2-0.07};
1482 mechStruct->DefinePolygon(5,xv,yv);
1483 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
1484 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
852af72e 1485 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
1486 mechStavVol->SetLineColor(12);
1487 mechStavVol->SetFillColor(12);
1488 mechStavVol->SetVisibility(kTRUE);
b705c75b 1489
1490 // Silicon micro channels numbers
1491
1492 TGeoBBox *tM0a=new TGeoBBox(smcWidth/2, 0.003/2, headWidth/2);
1493 TGeoVolume *volTM0a=new TGeoVolume("microChanTop1", tM0a, medKapton);
1494 volTM0a->SetLineColor(35);
1495 volTM0a->SetFillColor(35);
1496
852af72e 1497 for(Int_t mo=1; mo<=chips; mo++) {
1498 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)));
1499 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 1500 }
1501 TGeoBBox *tM0c=new TGeoBBox(0.3/2, 0.003/2,smcLength/2);
1502 TGeoVolume *volTM0c=new TGeoVolume("microChanTop2", tM0c, medKapton);
1503 volTM0c->SetLineColor(35);
1504 volTM0c->SetFillColor(35);
852af72e 1505 for(Int_t mo=1; mo<=chips; mo++) {
1506 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)));
1507 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 1508 }
1509 TGeoBBox *tM0c1=new TGeoBBox(0.2225/2, 0.003/2,smcLength/2);
1510 TGeoVolume *volTM0c1=new TGeoVolume("microChanBot1", tM0c1, medKapton);
1511 volTM0c1->SetLineColor(6);
1512 volTM0c1->SetFillColor(6);
852af72e 1513 for(Int_t mo=1; mo<=chips; mo++) {
1514 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)));
1515 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 1516 }
1517 TGeoBBox *tM0c2=new TGeoBBox(0.072/2, 0.003/2,smcLength/2);
1518 TGeoVolume *volTM0c2=new TGeoVolume("microChanBot2", tM0c2, medKapton);
1519 volTM0c2->SetLineColor(35);
1520 volTM0c2->SetFillColor(35);
852af72e 1521 for(Int_t mo=1; mo<=chips; mo++) {
1522 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 1523 }
1524 TGeoBBox *tM0c2r=new TGeoBBox(0.068/2, 0.003/2,smcLength/2);
1525 TGeoVolume *volTM0c2r=new TGeoVolume("microChanBot3", tM0c2r, medKapton);
1526 volTM0c2r->SetLineColor(35);
1527 volTM0c2r->SetFillColor(35);
852af72e 1528 for(Int_t mo=1; mo<=chips; mo++) {
1529 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 1530 }
1531 TGeoBBox *tM0d=new TGeoBBox(smcSide1Thick/2, 0.035/2,smcLength/2);
1532 TGeoVolume *volTM0d=new TGeoVolume("microChanSide1", tM0d, medKapton);
1533 volTM0d->SetLineColor(12);
1534 volTM0d->SetFillColor(12);
852af72e 1535 for(Int_t mo=1; mo<=chips; mo++) {
1536 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)));
1537 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 1538 }
1539
1540 TGeoBBox *tM0d1=new TGeoBBox(smcSide2Thick/2, 0.035/2,smcLength/2);
1541 TGeoVolume *volTM0d1=new TGeoVolume("microChanSide2", tM0d1, medKapton);
1542 volTM0d1->SetLineColor(12);
1543 volTM0d1->SetFillColor(12);
852af72e 1544 for(Int_t mo=1; mo<=chips; mo++) {
1545 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)));
1546 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 1547 }
1548 TGeoBBox *tM0d2=new TGeoBBox(smcSide3Thick/2, (hh+0.003)/2, smcLength/2);
1549 TGeoVolume *volTM0d2=new TGeoVolume("microChanSide3", tM0d2, medKapton);
1550 volTM0d2->SetLineColor(12);
1551 volTM0d2->SetFillColor(12);
852af72e 1552 for(Int_t mo=1; mo<=chips; mo++) {
1553 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 1554 }
1555 TGeoBBox *tM0d2r=new TGeoBBox(smcSide4Thick/2, (hh+0.003)/2, smcLength/2);
1556 TGeoVolume *volTM0d2r=new TGeoVolume("microChanSide4", tM0d2r, medKapton);
1557 volTM0d2r->SetLineColor(12);
1558 volTM0d2r->SetFillColor(12);
852af72e 1559 for(Int_t mo=1; mo<=chips; mo++) {
1560 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 1561 }
1562 TGeoBBox *tM0e=new TGeoBBox(smcSide5Thick/2, hh/2,smcLength/2);
1563 TGeoVolume *volTM0e=new TGeoVolume("microChanSide5", tM0e, medKapton);
1564 volTM0e->SetLineColor(12);
1565 volTM0e->SetFillColor(12);
852af72e 1566 for(Int_t mo=1; mo<=chips; mo++) {
b705c75b 1567 for (Int_t ie=0;ie<11;ie++) {
852af72e 1568 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)));
1569 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 1570 }
1571 }
1572
1573 TGeoBBox *tM0f=new TGeoBBox(0.02/2, hh/2, smcLength/2);
1574 TGeoVolume *volTM0f=new TGeoVolume("microChanTop3", tM0f, medKapton);
1575 //Double_t smcChannels=12;
1576 Double_t smcCloseWallvapor=smcWidth/2-smcSide1Thick-vaporThick-smcSide2Thick-smcSide3Thick-12*smcSpace-11*smcSide5Thick;
1577 Double_t smcCloseWallliquid=smcWidth/2-smcSide1Thick-liquidThick-smcSide2Thick-smcSide4Thick-12*smcSpace-11*smcSide5Thick;
1578 volTM0f->SetLineColor(12);
1579 volTM0f->SetFillColor(12);
852af72e 1580 for(Int_t mo=1; mo<=chips; mo++) {
1581 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)));
1582 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 1583 }
1584 //Head(back) microchannel
1585
1586 TGeoBBox *tM0hb=new TGeoBBox(smcWidth/2, 0.025/2, headWidth/2);
1587 TGeoVolume *volTM0hb=new TGeoVolume("microChanHeadBackBottom1", tM0hb, medKapton);
1588 volTM0hb->SetLineColor(4);
1589 volTM0hb->SetFillColor(4);
852af72e 1590 for(Int_t mo=1; mo<=chips; mo++) {
1591 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)));
1592 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 1593 }
1594 TGeoBBox *tM0h1=new TGeoBBox(smcWidth/2, 0.013/2, 0.05/2);
1595 TGeoVolume *volTM0h1=new TGeoVolume("microChanHeadBackBottom2", tM0h1, medKapton);
1596 volTM0h1->SetLineColor(5);
1597 volTM0h1->SetFillColor(5);
852af72e 1598 for(Int_t mo=1; mo<=chips; mo++) {
1599 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 1600 }
1601 TGeoBBox *tM0h2=new TGeoBBox(smcWidth/2, 0.003/2, 0.18/2);
1602 TGeoVolume *volTM0h2=new TGeoVolume("microChanHeadBackBottom7", tM0h2, medKapton);
1603 volTM0h2->SetLineColor(6);
1604 volTM0h2->SetFillColor(6);
852af72e 1605 for(Int_t mo=1; mo<=chips; mo++) {
1606 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 1607 }
1608 TGeoBBox *tM0h3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
1609 TGeoVolume *volTM0h3=new TGeoVolume("microChanHeadBackBottom3", tM0h3, medKapton);
1610 volTM0h3->SetLineColor(5);
1611 volTM0h3->SetFillColor(5);
852af72e 1612 for(Int_t mo=1; mo<=chips; mo++) {
1613 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 1614 }
1615 TGeoBBox *tM0b1=new TGeoBBox(smcWidth/2, 0.013/2, 0.03/2);
1616 TGeoVolume *volTM0b1=new TGeoVolume("microChanHeadBackBottom4", tM0b1, medKapton);
1617 volTM0b1->SetLineColor(5);
1618 volTM0b1->SetFillColor(5);
852af72e 1619 for(Int_t mo=1; mo<=chips; mo++) {
1620 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 1621 }
1622 TGeoBBox *tM0b2=new TGeoBBox(smcWidth/2, 0.003/2, 0.2/2);
1623 TGeoVolume *volTM0b2=new TGeoVolume("microChanHeadBackBottom5", tM0b2, medKapton);
1624 volTM0b2->SetLineColor(6);
1625 volTM0b2->SetFillColor(6);
852af72e 1626 for(Int_t mo=1; mo<=chips; mo++) {
1627 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 1628 }
1629 TGeoBBox *tM0b3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
1630 TGeoVolume *volTM0b3=new TGeoVolume("microChanHeadBackBottom6", tM0b3, medKapton);
1631 volTM0b3->SetLineColor(5);
1632 volTM0b3->SetFillColor(5);
852af72e 1633 for(Int_t mo=1; mo<=chips; mo++) {
1634 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 1635 }
1636
852af72e 1637 TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta);
b705c75b 1638 TGeoVolume *volTM0b=new TGeoVolume("microChanWalls", tM0b, medKapton);
1639 volTM0b->SetLineColor(35);
1640 volTM0b->SetFillColor(35);
1641 for (Int_t ib=0;ib<nb;ib++) {
852af72e 1642 //mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
b705c75b 1643 }
1644
1645 }
1646
1647 if (fBuildLevel < 4) {
1648
1649 //**********cooling inlet outlet
1650
1651 TGeoBBox *tM0dv=new TGeoBBox(vaporThick/2, 0.035/2,smcLength/2);
1652 TGeoVolume *volTM0dv=new TGeoVolume("microChanVapor", tM0dv, medWater);
1653 volTM0dv->SetLineColor(2);
1654 volTM0dv->SetFillColor(2);
852af72e 1655 for(Int_t mo=1; mo<=chips; mo++) {
1656 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 1657 }
1658 TGeoBBox *tM0dl=new TGeoBBox(liquidThick/2, 0.035/2,smcLength/2);
1659 TGeoVolume *volTM0dl=new TGeoVolume("microChanLiquid", tM0dl, medWater);
1660 volTM0dl->SetLineColor(3);
1661 volTM0dl->SetFillColor(3);
852af72e 1662 for(Int_t mo=1; mo<=chips; mo++) {
1663 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 1664 }
1665 // small cooling fluid now using water wait for freeon value
1666 TGeoBBox *tM0dlq=new TGeoBBox(smcSpace/2, hh/2,smcLength/2);
1667 TGeoVolume *volTM0dlq=new TGeoVolume("smallLiquid", tM0dlq, medWater);
1668 volTM0dlq->SetLineColor(3);
1669 volTM0dlq->SetFillColor(3);
1670 TGeoBBox *tM0dvp=new TGeoBBox(smcSpace/2, hh/2,smcLength/2);
1671 TGeoVolume *volTM0dvp=new TGeoVolume("microChanVapor", tM0dvp, medWater);
1672 volTM0dvp->SetLineColor(2);
1673 volTM0dvp->SetFillColor(2);
852af72e 1674 for(Int_t mo=1; mo<=chips; mo++) {
b705c75b 1675 for (Int_t is=0;is<12;is++) {
852af72e 1676 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)));
1677 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 1678 }
1679 }
1680
1681 //*************
1682
1683 }
1684
1685 if (fBuildLevel < 3) {
1686
1687 //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length)
1688
1689 Double_t filWidth = 0.04;
1690 Double_t filHeight= 0.02;
1691 TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,s1);
1692 TGeoVolume *volT1=new TGeoVolume("bottomFilament", t1, medM60J3K);
1693 volT1->SetLineColor(12);
1694 volT1->SetFillColor(12);
1695 for(int i=0;i<loop;i++){//i<30;i++){
852af72e 1696 mechStavVol->AddNode(volT1,4*i+0,
b705c75b 1697 new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2,
1698 new TGeoRotation("volT1",-90,alpha,0)));
852af72e 1699 mechStavVol->AddNode(volT1,4*i+1,
b705c75b 1700 new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2,
1701 new TGeoRotation("volT1",90,alpha,0)));
852af72e 1702 mechStavVol->AddNode(volT1,4*i+2,
b705c75b 1703 new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1704 new TGeoRotation("volT1",-90,-alpha,0)));
852af72e 1705 mechStavVol->AddNode(volT1,4*i+3,
b705c75b 1706 new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1707 new TGeoRotation("volT1",-90,+alpha,0)));
1708 }
1709
1710 // Top filament CERP black-12 Carbon structure TGeoBBox (length,thickness,width)
1711
1712 TGeoBBox *t2=new TGeoBBox(s2,filHeight/2,filWidth/2);
1713 TGeoVolume *volT2=new TGeoVolume("topFilament", t2, medM60J3K);
1714 volT2->SetLineColor(12);
1715 volT2->SetFillColor(12);
1716 for(int i=0;i<loop;i++){ //i<30;i++){
852af72e 1717 mechStavVol->AddNode(volT2,4*i+0,
b705c75b 1718 new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
1719 new TGeoRotation("volT2",90,90-alpha,90-beta)));
852af72e 1720 mechStavVol->AddNode(volT2,4*i+1,
b705c75b 1721 new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
1722 new TGeoRotation("volT2",90,-90+alpha,-90+beta)));
852af72e 1723 mechStavVol->AddNode(volT2,4*i+2,
b705c75b 1724 new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1725 new TGeoRotation("volT2",90,-90+alpha,90-beta)));
852af72e 1726 mechStavVol->AddNode(volT2,4*i+3,
b705c75b 1727 new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1728 new TGeoRotation("volT2",90,90-alpha,-90+beta)));
1729 }
1730 }
1731
1732 if (fBuildLevel < 2) {
1733
1734 // Glue Filament and Silicon MicroChannel
852af72e 1735 TGeoBBox *tM0=new TGeoBBox(xstaMC/5, klay4/2, zsta);
b705c75b 1736 TGeoVolume *volTM0=new TGeoVolume("glueFM", tM0,medGlue );
1737 volTM0->SetLineColor(5);
1738 volTM0->SetFillColor(5);
852af72e 1739 mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x-xsta/2-0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
1740 mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x+xsta/2+0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
b705c75b 1741
1742
1743 // Glue microchannel and sensor
852af72e 1744 TGeoBBox *glueM = new TGeoBBox(xstaMC/5, klay4/2, zsta);
b705c75b 1745 TGeoVolume *volGlueM=new TGeoVolume("glueMS", glueM, medGlue);
1746 volGlueM->SetLineColor(5);
1747 volGlueM->SetFillColor(5);
852af72e 1748 mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x-xsta/2-0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
1749 mechStavVol->AddNode(volGlueM, 1, new TGeoCombiTrans(x+xsta/2+0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
b705c75b 1750
1751 // Glue sensor and kapton
852af72e 1752 TGeoBBox *glue = new TGeoBBox(xsta, klay4/2, zsta);
b705c75b 1753 TGeoVolume *volGlue=new TGeoVolume("glueSensorBus", glue, medGlue);
1754 volGlue->SetLineColor(5);
1755 volGlue->SetFillColor(5);
852af72e 1756 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4/2, z, new TGeoRotation("",0, 0, 0)));
b705c75b 1757 }
1758
1759 if (fBuildLevel < 1) {
852af72e 1760 TGeoBBox *kapCable = new TGeoBBox(xsta, klay5/2, zsta);
b705c75b 1761 TGeoVolume *volCable=new TGeoVolume("Flexcable", kapCable, medFlexCable);
1762 volCable->SetLineColor(28);
1763 volCable->SetFillColor(28);
852af72e 1764 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4-klay5/2, z, new TGeoRotation("",0, 0, 0)));
b705c75b 1765 }
1766
1767 // Done, return the stave structur
852af72e 1768 return mechStavVol;
b705c75b 1769 }
1770
1771//________________________________________________________________________
852af72e 1772TGeoVolume* AliITSUv1Layer::CreateStaveOuterB(const Double_t xsta,
b705c75b 1773 const TGeoManager *mgr){
1774//
852af72e 1775// Create the chip stave for the Outer Barrel
b705c75b 1776//
1777// Input:
852af72e 1778// xsta : X length
b705c75b 1779// mgr : the GeoManager (used only to get the proper material)
1780//
1781// Output:
1782//
1783// Return:
1784//
1785// Created: 20 Dec 2013 Mario Sitta
1786//
1787
852af72e 1788 TGeoVolume *mechStavVol = 0;
b705c75b 1789
1790 switch (fStaveModel) {
1791 case AliITSUv1::kOBModelDummy:
852af72e 1792 mechStavVol = CreateStaveModelOuterBDummy(xsta,mgr);
b705c75b 1793 break;
1794 case AliITSUv1::kOBModel0:
852af72e 1795 mechStavVol = CreateStaveModelOuterB0(xsta,mgr);
b705c75b 1796 break;
1797 case AliITSUv1::kOBModel1:
852af72e 1798 mechStavVol = CreateStaveModelOuterB1(xsta,mgr);
b705c75b 1799 break;
1800 default:
1801 AliFatal(Form("Unknown stave model %d",fStaveModel));
1802 break;
1803 }
1804
852af72e 1805 return mechStavVol;
b705c75b 1806}
1807
1808//________________________________________________________________________
1809TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterBDummy(const Double_t ,
1810 const TGeoManager *) const {
1811//
1812// Create dummy stave
1813//
1814// Input:
852af72e 1815// xsta : X length
b705c75b 1816// mgr : the GeoManager (used only to get the proper material)
1817//
1818// Output:
1819//
1820// Return:
1821//
1822// Created: 20 Dec 2013 Mario Sitta
1823//
1824
1825
1826 // Done, return the stave structure
1827 return 0;
1828}
1829
1830//________________________________________________________________________
1831TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB0(const Double_t ,
1832 const TGeoManager *) const {
1833//
1834// Creation of the mechanical stave structure for the Outer Barrel as in v0
852af72e 1835// is done directly in CreateStave, so this method does nothing
b705c75b 1836// (doing it there is simpler, since all needed dimensions are known)
1837//
1838// Input:
852af72e 1839// xsta : X length
b705c75b 1840// mgr : the GeoManager (used only to get the proper material)
1841//
1842// Output:
1843//
1844// Return:
1845//
1846// Created: 20 Dec 2013 Mario Sitta
1847//
1848
1849 // Done, return the stave structure
1850 return 0;
1851}
1852
1853//________________________________________________________________________
852af72e 1854TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB1(const Double_t xsta,
b705c75b 1855 const TGeoManager *mgr){
1856//
1857// Create the mechanical stave structure for the Outer Barrel as in TDR
1858//
1859// Input:
852af72e 1860// xsta : X length
b705c75b 1861// mgr : the GeoManager (used only to get the proper material)
1862//
1863// Output:
1864//
1865// Return:
1866//
1867// Created: 20 Nov 2013 Anastasia Barbano
1868// Updated: 16 Jan 2014 Mario Sitta
1869//
1870
1871 // Materials defined in AliITSUv0
1872 TGeoMedium *medAluminum = mgr->GetMedium("ITS_ALUMINUM$");
1873 TGeoMedium *medCarbon = mgr->GetMedium("ITS_CARBON$");
1874 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1875 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1876 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1877 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1878 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); //amec thermasol
1879 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1880
1881
1882 // Local parameters
852af72e 1883 Double_t modGap = fgkOBChipGap;
b705c75b 1884 Double_t yFlex1 = fgkOBFlexCable1Thick;
1885 Double_t yFlex2 = fgkOBFlexCable2Thick;
1886 Double_t yBus1 = fgkOBBusCable1Thick;
1887 Double_t yBus2 = fgkOBBusCable2Thick;
1888 Double_t xModPlate = fgkOBHalfStaveWidth;
1889 Double_t yModPlate = fgkOBCarbonPlateThick;
1890 Double_t xCPlate = fgkOBHalfStaveWidth;
1891 Double_t yCPlate = fgkOBColdPlateThick;
1892 Double_t yGlue = fgkOBGlueThick;
1893 Double_t flexOverlap = 5;
1894 Double_t deltaY = 0.176;
1895 Double_t xOverlap = 0.23; //overlapping of the halfStaves to cover the dead zone of sensors
852af72e 1896 Double_t zMod = fgkOBChipZLength;
b705c75b 1897 Double_t xHalfSt = fgkOBHalfStaveWidth/2;
1898 Double_t xPos = xOverlap/2 - xHalfSt;
852af72e 1899 Double_t xlen = xsta;
b705c75b 1900 Double_t rMin = 0.267/2;
1901 Double_t rMax = rMin + 0.0065;
1902 Double_t kLay1 = 0.004; //carbon fleece
1903 Double_t kLay2 = 0.003; //carbon paper
1904 Double_t yPos = kLay1+kLay2;
1905 Double_t ylen,zact;
1906 Double_t zpos, zpos5cm;
1907 Double_t ymod;
1908 Double_t zbus;
1909 Double_t zlen;
1910
1911
852af72e 1912 if (fIsTurbo) xlen = 0.5*fStaveWidth;
1913 //ylen = 0.5*fStaveThick;
b705c75b 1914 ymod = 0.005/2;//0.5*fSensorThick;
1915 ylen = 0.5*(2*kLay1+2*kLay2+2*rMax+yCPlate+yGlue+ yModPlate + ymod + 2*yFlex1 + 2*yFlex2 + yBus1 + yBus2 + deltaY);
852af72e 1916 zact = fNChips*zMod; //active area
1917 zbus = zact + (fNChips-1)*modGap;
b705c75b 1918 zlen = zbus/2;
1919
1920
1921 // First create all needed shapes
1922
1923 TGeoTube *coolTube = new TGeoTube("CoolingTube",rMin,rMax,zbus/2);
1924 TGeoTube *coolTubeW = new TGeoTube("CoolingTubeWater",0,rMin,zbus/2);
1925 TGeoBBox *coldPlate = new TGeoBBox("ColdPlate",xCPlate/2,yCPlate/2,zbus/2);
1926 TGeoBBox *glue = new TGeoBBox("Glue",xCPlate/2,yGlue/2,zbus/2);
1927 TGeoBBox *modPlate = new TGeoBBox("CarbonPlate",xModPlate/2,yModPlate/2,zbus/2);
1928 TGeoBBox *flex1 = new TGeoBBox("Flex1MV",xHalfSt,yFlex1/2,zMod/2);
1929 TGeoBBox *flex2 = new TGeoBBox("Flex2MV",xHalfSt,yFlex2/2,zMod/2);
1930 TGeoBBox *flex1_5cm = new TGeoBBox("Flex1MV_5cm",xHalfSt,yFlex1/2,flexOverlap/2);
1931 TGeoBBox *flex2_5cm = new TGeoBBox("Flex2MV_5cm",xHalfSt,yFlex2/2,flexOverlap/2);
1932 TGeoBBox *bus1 = new TGeoBBox("Bus1HV",xHalfSt,yBus1/2,zbus/2);
1933 TGeoBBox *bus2 = new TGeoBBox("Bus2HV",xHalfSt,yBus2/2,zbus/2);
1934 TGeoTubeSeg *cone1 = new TGeoTubeSeg(rMax +kLay2,rMax+kLay1+kLay2,zlen,180.,360.); //Carbon Fleece
1935 TGeoTubeSeg *cone2 = new TGeoTubeSeg(rMax ,rMax+kLay2,zlen,180.,360.); //Graphite paper
1936 TGeoBBox *box11 = new TGeoBBox((0.95-kLay2-rMax)/2,kLay1/2,zlen);
1937 TGeoBBox *box12 = new TGeoBBox((1.11-2*kLay2-2*rMax)/2,kLay1/2,zlen);
1938 TGeoBBox *box13 = new TGeoBBox(kLay1/2,(rMax-(kLay1+kLay2))/2,zlen);
1939 TGeoBBox *box21 = new TGeoBBox((0.95-rMax)/2,kLay2/2,zlen);
1940 TGeoBBox *box22 = new TGeoBBox((1.11-2*rMax)/2,kLay2/2,zlen);
1941 TGeoBBox *box23 = new TGeoBBox(kLay2/2,(rMax-kLay2)/2,zlen);
1942 TGeoBBox *mechStruct = new TGeoBBox("mechanicalStructure",xlen, ylen, 0.5*fZLength);
1943
1944
852af72e 1945 TGeoVolume *modVol = CreateChipOuterB(xHalfSt, ymod, zMod);
b705c75b 1946
1947 TGeoVolume *coolTubeVol = new TGeoVolume("CoolingTubeVol",coolTube,medKapton);
1948 TGeoVolume *coolTubeWVol = new TGeoVolume("CoolingTubeWaterVol",coolTubeW,medWater);
1949 TGeoVolume *coldPlateVol = new TGeoVolume("ColdPlateVol",coldPlate,medCarbon);
1950 TGeoVolume *glueVol = new TGeoVolume("GlueVol",glue,medGlue);
1951 TGeoVolume *modPlateVol = new TGeoVolume("CarbonPlateVol",modPlate,medCarbon);
1952 TGeoVolume *flex1Vol = new TGeoVolume("Flex1Vol",flex1,medAluminum);
1953 TGeoVolume *flex2Vol = new TGeoVolume("Flex2Vol",flex2,medKapton);
1954 TGeoVolume *flex1_5cmVol = new TGeoVolume("Flex1Vol5cm",flex1_5cm,medAluminum);
1955 TGeoVolume *flex2_5cmVol = new TGeoVolume("Flex2Vol5cm",flex2_5cm,medKapton);
1956 TGeoVolume *bus1Vol = new TGeoVolume("Bus1Vol",bus1,medAluminum);
1957 TGeoVolume *bus2Vol = new TGeoVolume("Bus2Vol",bus2,medKapton);
1958 TGeoVolume *cone1Vol = new TGeoVolume("CarbonFleecePipeCover",cone1,medCarbonFleece);
1959 TGeoVolume *cone2Vol = new TGeoVolume("GraphitePaperPipeCover",cone2,medFGS003);
1960 TGeoVolume *plate11Vol = new TGeoVolume("CarbonFleeceLR1",box11,medCarbonFleece);
1961 TGeoVolume *plate12Vol = new TGeoVolume("CarbonFleeceMiddle1",box12,medCarbonFleece);
1962 TGeoVolume *plate13Vol = new TGeoVolume("CarbonFleeceVertical1",box13,medCarbonFleece);
1963 TGeoVolume *plate21Vol = new TGeoVolume("CarbonFleeceLR2",box21,medFGS003);
1964 TGeoVolume *plate22Vol = new TGeoVolume("CarbonFleeceMiddle2",box22,medFGS003);
1965 TGeoVolume *plate23Vol = new TGeoVolume("CarbonFleeceVertical2",box23,medFGS003);
852af72e 1966 TGeoVolume *mechStavVol = new TGeoVolume("mechStaveVolume",mechStruct,medAir);
b705c75b 1967
852af72e 1968 mechStavVol->SetLineColor(12);
1969 mechStavVol->SetFillColor(12);
1970 mechStavVol->SetVisibility(kTRUE);
b705c75b 1971
1972 modVol->SetVisibility(kTRUE);
1973 flex1_5cmVol->SetLineColor(kRed);
1974 flex2_5cmVol->SetLineColor(kGreen);
1975 modPlateVol->SetLineColor(kMagenta-8);
1976 coolTubeVol->SetLineColor(kGray);
1977 coolTubeWVol->SetLineColor(kBlue);
1978 coldPlateVol->SetLineColor(kYellow-3);
1979 glueVol->SetLineColor(kBlack);
1980 flex1Vol->SetLineColor(kRed);
1981 flex2Vol->SetLineColor(kGreen);
1982 bus1Vol->SetLineColor(kCyan);
1983 bus2Vol->SetLineColor(kBlue);
1984 cone1Vol->SetFillColor(kViolet);
1985 plate11Vol->SetFillColor(kViolet);
1986 plate12Vol->SetLineColor(kViolet);
1987 plate13Vol->SetLineColor(kViolet);
1988 cone2Vol->SetLineColor(kGreen);
1989 plate22Vol->SetFillColor(kGreen);
1990 plate21Vol->SetLineColor(kGreen);
1991 plate23Vol->SetLineColor(kGreen);
1992
1993
1994 //Carbon Fleece
1995
852af72e 1996 mechStavVol->AddNode(plate11Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2,0));
1997 mechStavVol->AddNode(plate11Vol,2,new TGeoTranslation(xPos +(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2,0));
1998 mechStavVol->AddNode(plate11Vol,3,new TGeoTranslation(-xPos -(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2 +deltaY,0));
1999 mechStavVol->AddNode(plate11Vol,4,new TGeoTranslation(-xPos +(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2 +deltaY,0));
2000 mechStavVol->AddNode(plate12Vol,1,new TGeoTranslation(xPos ,-ylen + yPos +2*rMax-kLay2-kLay1/2,0));
2001 mechStavVol->AddNode(plate12Vol,2,new TGeoTranslation(-xPos ,-ylen + yPos +2*rMax-kLay2-kLay1/2 + deltaY,0));
2002 mechStavVol->AddNode(plate13Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
2003 mechStavVol->AddNode(plate13Vol,2,new TGeoTranslation(xPos -1.11/2+rMax+kLay2+box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
2004 mechStavVol->AddNode(plate13Vol,3,new TGeoTranslation(xPos +(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
2005 mechStavVol->AddNode(plate13Vol,4,new TGeoTranslation(xPos +1.11/2-rMax-kLay2-box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
2006 mechStavVol->AddNode(plate13Vol,5,new TGeoTranslation(-xPos -(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
2007 mechStavVol->AddNode(plate13Vol,6,new TGeoTranslation(-xPos -1.11/2+rMax+kLay2+box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
2008 mechStavVol->AddNode(plate13Vol,7,new TGeoTranslation(-xPos +(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
2009 mechStavVol->AddNode(plate13Vol,8,new TGeoTranslation(-xPos +1.11/2-rMax-kLay2-box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
2010
2011 mechStavVol->AddNode(cone1Vol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
2012 mechStavVol->AddNode(cone1Vol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
2013 mechStavVol->AddNode(cone1Vol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
2014 mechStavVol->AddNode(cone1Vol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
b705c75b 2015
2016
2017 //Carbon Paper
2018
852af72e 2019 mechStavVol->AddNode(plate21Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+box21->GetDX()),-ylen + yPos +2*rMax-kLay2/2,0));
2020 mechStavVol->AddNode(plate21Vol,2,new TGeoTranslation(xPos +(1.11/2+rMax+box21->GetDX()) ,-ylen + yPos +2*rMax-kLay2/2,0));
2021 mechStavVol->AddNode(plate21Vol,3,new TGeoTranslation(-xPos -(1.11/2+rMax+box21->GetDX()) ,-ylen + yPos +2*rMax-kLay2/2 +deltaY,0));
2022 mechStavVol->AddNode(plate21Vol,4,new TGeoTranslation(-xPos +(1.11/2+rMax+box21->GetDX()) ,-ylen + yPos +2*rMax-kLay2/2 +deltaY,0));
2023 mechStavVol->AddNode(plate22Vol,1,new TGeoTranslation(xPos ,-ylen + yPos +2*rMax-kLay2/2,0));
2024 mechStavVol->AddNode(plate22Vol,2,new TGeoTranslation(-xPos ,-ylen + yPos +2*rMax-kLay2/2 + deltaY,0));
2025 mechStavVol->AddNode(plate23Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
2026 mechStavVol->AddNode(plate23Vol,2,new TGeoTranslation(xPos -1.11/2+rMax+box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
2027 mechStavVol->AddNode(plate23Vol,3,new TGeoTranslation(xPos +(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
2028 mechStavVol->AddNode(plate23Vol,4,new TGeoTranslation(xPos +1.11/2-rMax-box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
2029 mechStavVol->AddNode(plate23Vol,5,new TGeoTranslation(-xPos -(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
2030 mechStavVol->AddNode(plate23Vol,6,new TGeoTranslation(-xPos -1.11/2+rMax+box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
2031 mechStavVol->AddNode(plate23Vol,7,new TGeoTranslation(-xPos +(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
2032 mechStavVol->AddNode(plate23Vol,8,new TGeoTranslation(-xPos +1.11/2-rMax-box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
2033
2034 mechStavVol->AddNode(cone2Vol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
2035 mechStavVol->AddNode(cone2Vol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
2036 mechStavVol->AddNode(cone2Vol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
2037 mechStavVol->AddNode(cone2Vol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
b705c75b 2038
2039 //Cooling Tubes + water
2040
852af72e 2041 mechStavVol->AddNode(coolTubeVol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
2042 mechStavVol->AddNode(coolTubeWVol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
2043 mechStavVol->AddNode(coolTubeVol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
2044 mechStavVol->AddNode(coolTubeWVol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
2045 mechStavVol->AddNode(coolTubeVol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
2046 mechStavVol->AddNode(coolTubeWVol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
2047 mechStavVol->AddNode(coolTubeVol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
2048 mechStavVol->AddNode(coolTubeWVol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
b705c75b 2049
2050 //Cold Plate
2051
852af72e 2052 mechStavVol->AddNode(coldPlateVol,1,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate/2,0));
2053 mechStavVol->AddNode(coldPlateVol,2,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate/2 + deltaY,0));
b705c75b 2054
2055 //Glue
2056
852af72e 2057 mechStavVol->AddNode(glueVol,1,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue/2,0));
2058 mechStavVol->AddNode(glueVol,2,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue/2 + deltaY,0));
b705c75b 2059
852af72e 2060 //Chip Carbon Plate
b705c75b 2061
852af72e 2062 mechStavVol->AddNode(modPlateVol,1,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate/2,0));
2063 mechStavVol->AddNode(modPlateVol,2,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate/2 + deltaY,0));
b705c75b 2064
2065 //Bus
2066
852af72e 2067 mechStavVol->AddNode(bus1Vol,1,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1/2,0));
2068 mechStavVol->AddNode(bus1Vol,2,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1/2 + deltaY,0));
2069 mechStavVol->AddNode(bus2Vol,1,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1 + yBus2/2,0));
2070 mechStavVol->AddNode(bus2Vol,2,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1 + yBus2/2 + deltaY,0));
b705c75b 2071
852af72e 2072 //FPC + chips
b705c75b 2073
852af72e 2074 for (Int_t j=0; j<fNChips; j++) {
b705c75b 2075
852af72e 2076 zpos = -(zact + (fNChips-1)*modGap)/2 + j*(zMod + modGap) + zMod/2;
2077 zpos5cm = -(zact + (fNChips-1)*modGap)/2 + (j+1)*(zMod + modGap) + flexOverlap/2 ;
b705c75b 2078
852af72e 2079 mechStavVol->AddNode(modVol, j, new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + ymod, zpos));
2080 mechStavVol->AddNode(modVol, fNChips+j, new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + ymod +deltaY, zpos));
2081 mechStavVol->AddNode(flex1Vol,j,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos));
2082 mechStavVol->AddNode(flex1Vol,fNChips+j,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 + deltaY,zpos));
2083 mechStavVol->AddNode(flex2Vol,j,new TGeoTranslation(xPos, -ylen + yPos + yModPlate + 2*rMax + yCPlate + yGlue + 2*ymod + yFlex1 + yFlex2/2,zpos));
2084 mechStavVol->AddNode(flex2Vol,fNChips+j,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 + deltaY,zpos));
b705c75b 2085
852af72e 2086 if((j+1)!=fNChips){
2087 mechStavVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2,zpos5cm));
2088 mechStavVol->AddNode(flex1_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2 +deltaY,zpos5cm));
2089 mechStavVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2,zpos5cm));
2090 mechStavVol->AddNode(flex2_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2 +deltaY,zpos5cm));
b705c75b 2091 }
2092 else {
852af72e 2093 mechStavVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos5cm-modGap));
2094 mechStavVol->AddNode(flex1_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 +deltaY,zpos5cm-modGap));
2095 mechStavVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate +2*ymod + yFlex1 + yFlex2/2,zpos5cm-modGap));
2096 mechStavVol->AddNode(flex2_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 +deltaY,zpos5cm-modGap));
b705c75b 2097
2098 }
2099 }
2100
2101
2102 // Done, return the stave structur
852af72e 2103 return mechStavVol;
b705c75b 2104}
2105
2106//________________________________________________________________________
852af72e 2107TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB(const Double_t xsta,
b705c75b 2108 const TGeoManager *mgr){
2109//
2110// Create the space frame for the Outer Barrel
2111//
2112// Input:
852af72e 2113// xsta : X length
b705c75b 2114// mgr : the GeoManager (used only to get the proper material)
2115//
2116// Output:
2117//
2118// Return:
2119//
2120//
2121
852af72e 2122 TGeoVolume *mechStavVol = 0;
b705c75b 2123
2124 switch (fStaveModel) {
2125 case AliITSUv1::kOBModelDummy:
852af72e 2126 mechStavVol = CreateSpaceFrameOuterBDummy(xsta,mgr);
b705c75b 2127 break;
2128 case AliITSUv1::kOBModel1:
852af72e 2129 mechStavVol = CreateSpaceFrameOuterB0(xsta,mgr);
b705c75b 2130 break;
2131 default:
2132 AliFatal(Form("Unknown stave model %d",fStaveModel));
2133 break;
2134 }
2135
852af72e 2136 return mechStavVol;
b705c75b 2137}
2138
2139//________________________________________________________________________
2140TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterBDummy(const Double_t ,
2141 const TGeoManager *) const {
2142//
2143// Create dummy stave
2144//
2145// Input:
852af72e 2146// xsta : X length
b705c75b 2147// mgr : the GeoManager (used only to get the proper material)
2148//
2149// Output:
2150//
2151// Return:
2152//
2153
2154
2155 // Done, return the stave structur
2156 return 0;
2157}
2158
2159//________________________________________________________________________
2160TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB0(const Double_t xlen,
2161 const TGeoManager *mgr){
2162//
2163// Create the space frame for the Outer Barrel (Model 0)
2164//
2165// Input:
2166// xlen : X length
2167// mgr : the GeoManager (used only to get the proper material)
2168//
2169// Output:
2170//
2171// Return:
2172// a TGeoVolume with the Space Frame of a stave
2173//
2174// Created: 20 Dec 2013 Anastasia Barbano
2175// Updated: 15 Jan 2014 Mario Sitta
2176//
2177
2178
2179 // Materials defined in AliITSUv0
2180 TGeoMedium *medCarbon = mgr->GetMedium("ITS_CARBON$");
2181 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
2182
2183
2184 // Local parameters
852af72e 2185 Double_t staveWidth = 4.2;
2186 Double_t staveHeight = 4.2;
2187// Double_t staveSegBoxDW = 7.5;
2188// Double_t staveSegBoxDH = 7.1;
2189 Double_t staveBeamRadius = 0.06;
2190 Double_t staveLa = 0.3;
2191 Double_t staveHa = 0.0721979;
2192 Double_t staveLb = 0.37;
2193 Double_t staveHb = 0.0890428;
2194 Double_t stavel = 0.025;
b705c75b 2195 Double_t beamSidePhi = 65;
852af72e 2196 Double_t bottomBeamAngle = 56.5;
2197// Double_t dy = staveSegBoxDH/2;
2198 Double_t triangleHeight = staveHeight - staveBeamRadius;
2199 Double_t halfTheta = TMath::ATan( 0.5*staveWidth/triangleHeight );
b705c75b 2200 Double_t alpha = TMath::Pi()*3./4. - halfTheta/2.;
2201 Double_t beta = (TMath::Pi() - 2.*halfTheta)/4.;
852af72e 2202// Double_t dYTranslation = (staveHeight/2. -0.5*staveWidth*TMath::Tan(beta)-staveBeamRadius);
2203 Double_t distCenterSideDown = 0.5*staveWidth/TMath::Cos(beta);
b705c75b 2204 Double_t zact;
2205 Double_t zbus;
2206 Double_t zlen;
2207 Double_t seglen;
2208
2209
852af72e 2210 zact = fNChips*fgkOBChipZLength; //active area
2211 zbus = zact + (fNChips-1)*fgkOBChipGap;
b705c75b 2212 zlen = zbus/2;
2213 seglen = zlen/10;
2214
2215 // First create all needed shapes and volumes
2216
2217 TGeoBBox *spaceFrame = new TGeoBBox("CarbonFrame",xlen, 2.2, zlen);
852af72e 2218 TGeoBBox *segment = new TGeoBBox(staveWidth/2,staveHeight/2,seglen/2);
b705c75b 2219
2220 TGeoVolume *spaceFrameVol = new TGeoVolume("CarbonFrameVolume",
2221 spaceFrame, medAir);
2222 spaceFrameVol->SetVisibility(kTRUE);
2223
2224 TGeoVolume *segmentVol = new TGeoVolume("segmentVol",segment,medAir);
2225
2226 //SpaceFrame
2227
852af72e 2228 //--- the top V of the Carbon Fiber Stave (segment)
2229 TGeoArb8 *cfStavTop1 = CreateStaveSide("CFstavTopCornerVol1shape", seglen/2., halfTheta, -1, staveLa, staveHa, stavel);
2230 TGeoVolume *cfStavTopVol1 = new TGeoVolume("ITSsddCFstavTopCornerVol1", cfStavTop1,medCarbon);
2231 TGeoArb8 *cfStavTop2 = CreateStaveSide( "CFstavTopCornerVol2shape", seglen/2., halfTheta, 1, staveLa, staveHa, stavel);
2232 TGeoVolume *cfStavTopVol2 = new TGeoVolume("ITSsddCFstavTopCornerVol2",cfStavTop2,medCarbon );
b705c75b 2233
852af72e 2234 //TGeoTranslation *trTop1 = new TGeoTranslation(0, fgkStaveHeight/2-dy, 0);
2235 TGeoTranslation *trTop1 = new TGeoTranslation(0, staveHeight/2, 0);
b705c75b 2236
2237 //--- the 2 side V
852af72e 2238 TGeoArb8 *cfStavSide1 = CreateStaveSide( "CFstavSideCornerVol1shape", seglen/2., beta, -1,staveLb, staveHb, stavel);
2239 TGeoVolume *cfStavSideVol1 = new TGeoVolume( "ITSsddCFstavSideCornerVol1", cfStavSide1,medCarbon);
2240 TGeoArb8 *cfStavSide2 = CreateStaveSide( "CFstavSideCornerVol2shape", seglen/2., beta, 1, staveLb, staveHb, stavel);
2241 TGeoVolume *cfStavSideVol2 = new TGeoVolume( "ITSsddCFstavSideCornerVol2", cfStavSide2,medCarbon );
b705c75b 2242
2243
2244 TGeoCombiTrans *ctSideR = CreateCombiTrans("", distCenterSideDown, 0,alpha*TMath::RadToDeg());
2245 //AddTranslationToCombiTrans(ctSideR, 0, -dYTranslation-dy, 0);
852af72e 2246 AddTranslationToCombiTrans(ctSideR, 0, staveHeight/2-2.85/*2.765250*//*triangleHeight*/, 0);
b705c75b 2247 TGeoCombiTrans *ctSideL = CreateCombiTrans("", distCenterSideDown,0,-alpha*TMath::RadToDeg());
2248 //AddTranslationToCombiTrans(ctSideL, 0, -dYTranslation-dy, 0);
852af72e 2249 AddTranslationToCombiTrans(ctSideL, 0, staveHeight/2-2.85/*triangleHeight*/, 0);
b705c75b 2250
852af72e 2251 segmentVol->AddNode(cfStavTopVol1,1,trTop1);
2252 segmentVol->AddNode(cfStavTopVol2,1,trTop1);
2253 segmentVol->AddNode(cfStavSideVol1,1,ctSideR);
2254 segmentVol->AddNode(cfStavSideVol1,2,ctSideL);
2255 segmentVol->AddNode(cfStavSideVol2,1,ctSideR);
2256 segmentVol->AddNode(cfStavSideVol2,2,ctSideL);
b705c75b 2257
2258
2259 //--- The beams
2260 // Beams on the sides
2261 Double_t beamPhiPrime = TMath::ASin(1./TMath::Sqrt( (1+TMath::Sin(2*beta)*TMath::Sin(2*beta)/(TanD(beamSidePhi)*TanD(beamSidePhi))) ));
852af72e 2262 Double_t beamLength = TMath::Sqrt( staveHeight*staveHeight/( TMath::Sin(beamPhiPrime)*TMath::Sin(beamPhiPrime))+ staveWidth*staveWidth/4.)-staveLa/2-staveLb/2;
2263 TGeoTubeSeg *sideBeamS = new TGeoTubeSeg(0, staveBeamRadius,beamLength/2.,0, 180);
b705c75b 2264 TGeoVolume *sideBeam = new TGeoVolume("ITSsddCFSideBeamVol", sideBeamS,medCarbon);
2265
2266 //Euler rotation : about Z, then new X, then new Z
2267 TGeoRotation *beamRot1 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(),-beamPhiPrime*TMath::RadToDeg(),-90);
2268 TGeoRotation *beamRot2 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(), beamPhiPrime*TMath::RadToDeg(), -90);
2269 TGeoRotation *beamRot3 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(), beamPhiPrime*TMath::RadToDeg(), -90);
2270 TGeoRotation *beamRot4 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),-beamPhiPrime*TMath::RadToDeg(),-90);
2271
2272 TGeoCombiTrans *beamTransf[8];
852af72e 2273 beamTransf[0] = new TGeoCombiTrans( 0.5*triangleHeight*TMath::Tan(halfTheta),staveBeamRadius/2. ,-3*seglen/8, beamRot1);
b705c75b 2274
852af72e 2275 beamTransf[1] = new TGeoCombiTrans( 0.5*triangleHeight*TMath::Tan(halfTheta),staveBeamRadius/2. ,-3*seglen/8, beamRot1);
b705c75b 2276 AddTranslationToCombiTrans(beamTransf[1], 0, 0, seglen/2);
2277
852af72e 2278 beamTransf[2] = new TGeoCombiTrans(0.5*triangleHeight*TMath::Tan(halfTheta),staveBeamRadius/2. ,-seglen/8, beamRot2);
b705c75b 2279
852af72e 2280 beamTransf[3] = new TGeoCombiTrans(0.5*triangleHeight*TMath::Tan(halfTheta),staveBeamRadius/2. ,-seglen/8, beamRot2);
b705c75b 2281 AddTranslationToCombiTrans(beamTransf[3], 0, 0, seglen/2);
2282
852af72e 2283 beamTransf[4] = new TGeoCombiTrans(-0.5*triangleHeight*TMath::Tan(halfTheta),staveBeamRadius/2. ,-3*seglen/8, beamRot3);
b705c75b 2284
852af72e 2285 beamTransf[5] = new TGeoCombiTrans(-0.5*triangleHeight*TMath::Tan(halfTheta),staveBeamRadius/2. ,-3*seglen/8, beamRot3);
b705c75b 2286 AddTranslationToCombiTrans(beamTransf[5], 0, 0, seglen/2);
2287
852af72e 2288 beamTransf[6] = new TGeoCombiTrans(-0.5*triangleHeight* TMath::Tan(halfTheta),staveBeamRadius/2., -seglen/8,beamRot4);
2289 beamTransf[7] = new TGeoCombiTrans(-0.5*triangleHeight* TMath::Tan(halfTheta),staveBeamRadius/2.,3*seglen/8,beamRot4);
b705c75b 2290
2291 //--- Beams of the bottom
852af72e 2292 TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, staveBeamRadius,staveWidth/2.-staveLb/3, 0, 180);
b705c75b 2293 TGeoVolume *bottomBeam1Vol = new TGeoVolume("ITSsddBottomBeam1Vol", bottomBeam1, medCarbon);
852af72e 2294 TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, staveBeamRadius,staveWidth/2.-staveLb/3, 0, 90);
b705c75b 2295 TGeoVolume *bottomBeam2Vol = new TGeoVolume("ITSsddBottomBeam2Vol",bottomBeam2, medCarbon);
852af72e 2296 TGeoTubeSeg *bottomBeam3 = new TGeoTubeSeg(0, staveBeamRadius,0.5*staveWidth/SinD(bottomBeamAngle) - staveLb/3, 0, 180);
b705c75b 2297 TGeoVolume *bottomBeam3Vol = new TGeoVolume("ITSsddBottomBeam3Vol", bottomBeam3, medCarbon);
2298 TGeoRotation *bottomBeamRot1 = new TGeoRotation("", 90, 90, 90);
2299 TGeoRotation *bottomBeamRot2 = new TGeoRotation("",-90, 90, -90);
2300
852af72e 2301 TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans("",0,-(staveHeight/2-staveBeamRadius),0, bottomBeamRot1);
2302 TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0,-(staveHeight/2-staveBeamRadius),-seglen/2, bottomBeamRot1);
2303 TGeoCombiTrans *bottomBeamTransf3 = new TGeoCombiTrans(0,-(staveHeight/2-staveBeamRadius), seglen/2, bottomBeamRot2);
b705c75b 2304 // be careful for beams #3: when "reading" from -z to +z and
852af72e 2305 // from the bottom of the stave, it should draw a Lambda, and not a V
b705c75b 2306 TGeoRotation *bottomBeamRot4 = new TGeoRotation("", -90, bottomBeamAngle, -90);
2307 TGeoRotation *bottomBeamRot5 = new TGeoRotation("" ,-90,-bottomBeamAngle, -90);
852af72e 2308 TGeoCombiTrans *bottomBeamTransf4 = new TGeoCombiTrans(0,-(staveHeight/2-staveBeamRadius),-seglen/4,bottomBeamRot4);
2309 TGeoCombiTrans *bottomBeamTransf5 = new TGeoCombiTrans(0,-(staveHeight/2-staveBeamRadius),seglen/4, bottomBeamRot5);
b705c75b 2310
852af72e 2311 cfStavTopVol1->SetLineColor(35);
2312 cfStavTopVol2->SetLineColor(35);
2313 cfStavSideVol1->SetLineColor(35);
2314 cfStavSideVol2->SetLineColor(35);
b705c75b 2315 sideBeam->SetLineColor(35);
2316 bottomBeam1Vol->SetLineColor(35);
2317 bottomBeam2Vol->SetLineColor(35);
2318 bottomBeam3Vol->SetLineColor(35);
2319
2320
2321 segmentVol->AddNode(sideBeam,1, beamTransf[0]);
2322 segmentVol->AddNode(sideBeam,2, beamTransf[1]);
2323 segmentVol->AddNode(sideBeam,3, beamTransf[2]);
2324 segmentVol->AddNode(sideBeam,4, beamTransf[3]);
2325 segmentVol->AddNode(sideBeam,5, beamTransf[4]);
2326 segmentVol->AddNode(sideBeam,6, beamTransf[5]);
2327 segmentVol->AddNode(sideBeam,7, beamTransf[6]);
2328 segmentVol->AddNode(sideBeam,8, beamTransf[7]);
2329 segmentVol->AddNode(bottomBeam1Vol,1,bottomBeamTransf1);
2330 segmentVol->AddNode(bottomBeam2Vol,1,bottomBeamTransf2);
2331 segmentVol->AddNode(bottomBeam2Vol,1,bottomBeamTransf3);
2332 segmentVol->AddNode(bottomBeam3Vol,1,bottomBeamTransf4);
2333 segmentVol->AddNode(bottomBeam3Vol,1,bottomBeamTransf5);
2334
2335 for(Int_t i=0;i<10;i++){
2336 spaceFrameVol->AddNode(segmentVol,i,new TGeoTranslation(0,0,seglen*(0.5+i)));
2337 spaceFrameVol->AddNode(segmentVol,11+i,new TGeoTranslation(0,0,-seglen*(0.5+i)));
2338 }
2339
2340
2341 // Done, return the stave structur
2342 return spaceFrameVol;
2343}
2344
2345//________________________________________________________________________
852af72e 2346TGeoVolume* AliITSUv1Layer::CreateChipInnerB(const Double_t xsta,
2347 const Double_t ysta,
2348 const Double_t zsta,
b705c75b 2349 const TGeoManager *mgr){
2350//
852af72e 2351// Creates the actual Chip
b705c75b 2352//
2353// Input:
852af72e 2354// xsta,zsta : the stave dimensions
b705c75b 2355// mgr : the GeoManager (used only to get the proper material)
2356//
2357// Output:
2358//
2359// Return:
2360//
2361// Created: 22 Jun 2011 Mario Sitta
2362//
2363
2364 char volname[30];
2365 Double_t xlen, ylen, zlen;
2366 Double_t xpos, ypos, zpos;
2367
2368
2369 // First create all needed shapes
2370
852af72e 2371 // The chip
2372 TGeoBBox *chip = new TGeoBBox(xsta, ysta, zsta/fNChips);
b705c75b 2373
2374 // The sensor
852af72e 2375 xlen = chip->GetDX();
b705c75b 2376 ylen = 0.5*fSensorThick;
852af72e 2377 zlen = chip->GetDZ();
b705c75b 2378 TGeoBBox *sensor = new TGeoBBox(xlen, ylen, zlen);
2379
2380
2381 // We have all shapes: now create the real volumes
2382 //TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
2383 TGeoMedium *medSi = mgr->GetMedium("ITS_SI$");
2384
852af72e 2385 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSChipPattern(), fLayerNumber);
2386 // TGeoVolume *modVol = new TGeoVolume(volname, chip, medAir);
2387 TGeoVolume *modVol = new TGeoVolume(volname, chip, medSi);
b705c75b 2388 modVol->SetVisibility(kTRUE);
2389 modVol->SetLineColor(1);
2390
2391 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSSensorPattern(), fLayerNumber);
2392 TGeoVolume *sensVol = new TGeoVolume(volname, sensor, medSi);
2393 sensVol->SetVisibility(kTRUE);
2394 sensVol->SetLineColor(8);
2395 sensVol->SetLineWidth(1);
2396 sensVol->SetFillColor(sensVol->GetLineColor());
2397 sensVol->SetFillStyle(4000); // 0% transparent
2398
2399
852af72e 2400 // Now build up the chip
b705c75b 2401 xpos = 0.;
852af72e 2402 ypos = -chip->GetDY() + sensor->GetDY();
b705c75b 2403 zpos = 0.;
2404
2405 modVol->AddNode(sensVol, 1, new TGeoTranslation(xpos, ypos, zpos));
2406
852af72e 2407 // Done, return the chip
b705c75b 2408 return modVol;
2409}
2410
2411//________________________________________________________________________
852af72e 2412TGeoVolume* AliITSUv1Layer::CreateChipOuterB(const Double_t xsta,
2413 const Double_t ysta,
b705c75b 2414 const Double_t zmod,
2415 const TGeoManager *mgr){
2416//
852af72e 2417// Creates the actual Chip
b705c75b 2418//
2419// Input:
852af72e 2420// xsta,ysta,zsta : the half stave dimensions
b705c75b 2421// mgr : the GeoManager (used only to get the proper material)
2422//
2423// Output:
2424//
2425// Return:
2426//
2427// Created: 18 Dec 2013 M. Sitta, A. Barbano
2428//
2429
2430
2431 char volname[30];
2432
2433 Double_t xGap = 0.01;
2434 Double_t zGap = 0.01;
2435
2436 Double_t xlen, ylen, zlen;
2437 Double_t xpos, ypos, zpos;
2438
2439 // First create all needed shapes
2440
852af72e 2441 // The chip
2442 TGeoBBox *chip = new TGeoBBox(xsta, ysta, zmod/2);
b705c75b 2443
2444 // The sensor
852af72e 2445 xlen = 0.5*(chip->GetDX()-xGap/2);
b705c75b 2446 //xlen = 0.5*1.5;
852af72e 2447 ylen = ysta;
2448 zlen = (2*chip->GetDZ()-6*zGap)/14;
b705c75b 2449 TGeoBBox *sensor = new TGeoBBox(xlen, ylen, zlen);
2450
2451
2452 // We have all shapes: now create the real volumes
2453
2454 TGeoMedium *medSi = mgr->GetMedium("ITS_SI$");
852af72e 2455 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSChipPattern(), fLayerNumber);
2456 TGeoVolume *modVol = new TGeoVolume(volname, chip, medSi);
b705c75b 2457 modVol->SetVisibility(kTRUE);
2458
2459 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSSensorPattern(), fLayerNumber);
2460 TGeoVolume *sensVol = new TGeoVolume(volname, sensor, medSi);
2461
2462
2463
852af72e 2464 // Now build up the chip
2465 xpos = -chip->GetDX() + sensor->GetDX();
b705c75b 2466 //xpos = -xGap/2 -sensor->GetDX();
852af72e 2467 ypos = -chip->GetDY() + sensor->GetDY();
2468 for(Int_t k=0;k<7;k++) //put 7x2 chip into one chip
b705c75b 2469 {
852af72e 2470 zpos = -chip->GetDZ() + sensor->GetDZ() + k*(2*sensor->GetDZ() + zGap);
b705c75b 2471 modVol->AddNode(sensVol, k+1, new TGeoTranslation(xpos, ypos, zpos));
2472 modVol->AddNode(sensVol, k+2, new TGeoTranslation(-xpos, ypos, zpos));
2473 }
2474
2475 //sensVol->SetVisibility(kTRUE);
2476 sensVol->SetLineColor(kYellow);
2477 //sensVol->SetLineWidth(1);
2478 //sensVol->SetTransparency(30);
2479 sensVol->SetFillColor(sensVol->GetLineColor());
2480 sensVol->SetFillStyle(4000); // 0% transparent
852af72e 2481 // Done, return the chip
b705c75b 2482 return modVol;
2483}
2484
2485//________________________________________________________________________
2486Double_t AliITSUv1Layer::RadiusOfTurboContainer(){
2487//
2488// Computes the inner radius of the air container for the Turbo configuration
852af72e 2489// as the radius of either the circle tangent to the stave or the circle
2490// passing for the stave's lower vertex
b705c75b 2491//
2492// Input:
2493// none (all needed parameters are class members)
2494//
2495// Output:
2496//
2497// Return:
2498// the radius of the container if >0, else flag to use the lower vertex
2499//
2500// Created: 08 Mar 2012 Mario Sitta
2501//
2502
852af72e 2503 Double_t rr, delta, z, lstav, rstav;
b705c75b 2504
852af72e 2505 if (fStaveThick > 89.) // Very big angle: avoid overflows since surely
b705c75b 2506 return -1; // the radius from lower vertex is the right value
2507
852af72e 2508 rstav = fLayRadius + 0.5*fStaveThick;
2509 delta = (0.5*fStaveThick)/CosD(fStaveTilt);
2510 z = (0.5*fStaveThick)*TanD(fStaveTilt);
b705c75b 2511
852af72e 2512 rr = rstav - delta;
2513 lstav = (0.5*fStaveWidth) - z;
b705c75b 2514
852af72e 2515 if ( (rr*SinD(fStaveTilt) < lstav) )
2516 return (rr*CosD(fStaveTilt));
b705c75b 2517 else
2518 return -1;
2519}
2520
2521//________________________________________________________________________
852af72e 2522void AliITSUv1Layer::SetStaveTilt(const Double_t t)
b705c75b 2523{
2524//
852af72e 2525// Sets the Stave tilt angle (for turbo layers only)
b705c75b 2526//
2527// Input:
852af72e 2528// t : the stave tilt angle
b705c75b 2529//
2530// Output:
2531//
2532// Return:
2533//
2534// Created: 08 Jul 2011 Mario Sitta
2535//
2536
2537 if (fIsTurbo)
852af72e 2538 fStaveTilt = t;
b705c75b 2539 else
2540 AliError("Not a Turbo layer");
2541
2542}
2543
2544//________________________________________________________________________
852af72e 2545void AliITSUv1Layer::SetStaveWidth(const Double_t w){
b705c75b 2546//
852af72e 2547// Sets the Stave width (for turbo layers only)
b705c75b 2548//
2549// Input:
852af72e 2550// w : the stave width
b705c75b 2551//
2552// Output:
2553//
2554// Return:
2555//
2556// Created: 08 Jul 2011 Mario Sitta
2557//
2558
2559 if (fIsTurbo)
852af72e 2560 fStaveWidth = w;
b705c75b 2561 else
2562 AliError("Not a Turbo layer");
2563
2564}
2565
2566//________________________________________________________________________
852af72e 2567TGeoArb8 *AliITSUv1Layer::CreateStaveSide(const char *name,
b705c75b 2568 Double_t dz, Double_t angle, Double_t xSign,
2569 Double_t L, Double_t H, Double_t l) {
2570//
2571// Creates the V-shaped sides of the OB space frame
2572// (from a similar method with same name and function
2573// in AliITSv11GeometrySDD class by L.Gaudichet)
2574//
2575
852af72e 2576 // Create one half of the V shape corner of CF stave
b705c75b 2577
852af72e 2578 TGeoArb8 *cfStavSide = new TGeoArb8(dz);
2579 cfStavSide->SetName(name);
b705c75b 2580
2581 // Points must be in clockwise order
852af72e 2582 cfStavSide->SetVertex(0, 0, 0);
2583 cfStavSide->SetVertex(2, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
b705c75b 2584 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
852af72e 2585 cfStavSide->SetVertex(4, 0, 0);
2586 cfStavSide->SetVertex(6, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
b705c75b 2587 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
2588 if (xSign < 0) {
852af72e 2589 cfStavSide->SetVertex(1, 0, -H);
2590 cfStavSide->SetVertex(3, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
2591 cfStavSide->SetVertex(5, 0, -H);
2592 cfStavSide->SetVertex(7, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
b705c75b 2593 } else {
852af72e 2594 cfStavSide->SetVertex(1, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
2595 cfStavSide->SetVertex(3, 0, -H);
2596 cfStavSide->SetVertex(5, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
2597 cfStavSide->SetVertex(7, 0, -H);
b705c75b 2598 }
852af72e 2599 return cfStavSide;
b705c75b 2600}
2601
2602//________________________________________________________________________
2603TGeoCombiTrans *AliITSUv1Layer::CreateCombiTrans(const char *name,
2604 Double_t dy, Double_t dz,
2605 Double_t dphi, Bool_t planeSym) {
2606//
2607// Help method to create a TGeoCombiTrans matrix
2608// (from a similar method with same name and function
2609// in AliITSv11GeometrySDD class by L.Gaudichet)
2610//
2611
2612 //
2613 // return the TGeoCombiTrans which make a translation in y and z
2614 // and a rotation in phi in the global coord system
2615 // If planeSym = true, the rotation places the object symetrically
2616 // (with respect to the transverse plane) to its position in the
2617 // case planeSym = false
2618 //
2619
2620 TGeoTranslation t1(dy*CosD(90.+dphi),dy*SinD(90.+dphi), dz);
2621 TGeoRotation r1("",0.,0.,dphi);
2622 TGeoRotation r2("",90, 180, -90-dphi);
2623
2624 TGeoCombiTrans *combiTrans1 = new TGeoCombiTrans(name);
2625 combiTrans1->SetTranslation(t1);
2626 if (planeSym) combiTrans1->SetRotation(r1);
2627 else combiTrans1->SetRotation(r2);
2628 return combiTrans1;
2629}
2630
2631//________________________________________________________________________
2632void AliITSUv1Layer::AddTranslationToCombiTrans(TGeoCombiTrans* ct,
2633 Double_t dx,
2634 Double_t dy,
2635 Double_t dz) const{
2636//
2637// Help method to add a translation to a TGeoCombiTrans matrix
2638// (from a similar method with same name and function
2639// in AliITSv11GeometrySDD class by L.Gaudichet)
2640//
2641
2642 // Add a dx,dy,dz translation to the initial TGeoCombiTrans
2643 const Double_t *vect = ct->GetTranslation();
2644 Double_t newVect[3] = {vect[0]+dx, vect[1]+dy, vect[2]+dz};
2645 ct->SetTranslation(newVect);
2646}