1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
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.
21 // Mario Sitta <sitta@to.infn.it>
22 // Chinorat Kobdaj (kobdaj@g.sut.ac.th)
23 //*************************************************************************
26 /* $Id: AliITSUv1Layer.cxx */
27 // General Root includes
29 // Root Geometry includes
31 #include <TGeoManager.h>
32 #include <TGeoVolume.h>
35 #include <TGeoTube.h> // contaings TGeoTubeSeg
38 #include <TGeoCompositeShape.h>
39 #include <TGeoMatrix.h>
40 #include "AliITSUv1Layer.h"
41 #include "AliITSUGeomTGeo.h"
43 #include <TGeoShape.h>
45 using namespace TMath;
48 const Int_t AliITSUv1Layer::fgkNumberOfInnerLayers = 3;
50 const Double_t AliITSUv1Layer::fgkDefaultSensorThick = 18*fgkmicron;
51 const Double_t AliITSUv1Layer::fgkDefaultChipThick = 50*fgkmicron;
53 // Inner Barrel Parameters
54 const Int_t AliITSUv1Layer::fgkIBChipsPerRow = 9;
55 const Int_t AliITSUv1Layer::fgkIBNChipRows = 1;
57 const Double_t AliITSUv1Layer::fgkIBFlexCableAlThick = 50.0 *fgkmicron;
58 const Double_t AliITSUv1Layer::fgkIBFlexCableKapThick = 125.0 *fgkmicron;
59 const Double_t AliITSUv1Layer::fgkIBGlueThick = 100.0 *fgkmicron;
60 const Double_t AliITSUv1Layer::fgkIBCarbonFleeceThick = 20.0 *fgkmicron;
61 const Double_t AliITSUv1Layer::fgkIBCarbonPaperThick = 30.0 *fgkmicron;
62 const Double_t AliITSUv1Layer::fgkIBK13D2UThick = 70.0 *fgkmicron;
63 const Double_t AliITSUv1Layer::fgkIBCoolPipeInnerD = 1.024*fgkmm;
64 const Double_t AliITSUv1Layer::fgkIBCoolPipeThick = 25.4 *fgkmicron;
65 const Double_t AliITSUv1Layer::fgkIBCoolPipeXDist = 5.0 *fgkmm;
66 const Double_t AliITSUv1Layer::fgkIBTopVertexWidth = 0.072*fgkcm;
67 const Double_t AliITSUv1Layer::fgkIBTopVertexHeight = 0.04 *fgkcm;
68 const Double_t AliITSUv1Layer::fgkIBSideVertexWidth = 0.052*fgkcm;
69 const Double_t AliITSUv1Layer::fgkIBSideVertexHeight = 0.11 *fgkcm;
70 const Double_t AliITSUv1Layer::fgkIBTopFilamentLength = 0.844*fgkcm;
71 const Double_t AliITSUv1Layer::fgkIBTopFilamentSide = 0.02 *fgkcm;
72 const Double_t AliITSUv1Layer::fgkIBTopFilamentAlpha = 57.0; // Deg
74 const Double_t AliITSUv1Layer::fgkIBStaveHeight = 0.283*fgkcm;
76 // Outer Barrel Parameters
77 const Int_t AliITSUv1Layer::fgkOBChipsPerRow = 7;
78 const Int_t AliITSUv1Layer::fgkOBNChipRows = 2;
80 const Double_t AliITSUv1Layer::fgkOBHalfStaveWidth = 3.01 *fgkcm;
81 const Double_t AliITSUv1Layer::fgkOBModuleWidth = fgkOBHalfStaveWidth;
82 const Double_t AliITSUv1Layer::fgkOBModuleGap = 0.01 *fgkcm;
83 const Double_t AliITSUv1Layer::fgkOBChipXGap = 0.01 *fgkcm;
84 const Double_t AliITSUv1Layer::fgkOBChipZGap = 0.01 *fgkcm;
85 const Double_t AliITSUv1Layer::fgkOBFlexCableAlThick = 0.005*fgkcm;
86 const Double_t AliITSUv1Layer::fgkOBFlexCableCuThick = 0.004*fgkcm;
87 const Double_t AliITSUv1Layer::fgkOBFlexCableKapThick1= 0.01 *fgkcm;
88 const Double_t AliITSUv1Layer::fgkOBFlexCableKapThick = 125.0 *fgkmicron;
89 const Double_t AliITSUv1Layer::fgkOBBusCableAlThick = 0.02 *fgkcm;
90 const Double_t AliITSUv1Layer::fgkOBBusCableKapThick = 0.02 *fgkcm;
91 const Double_t AliITSUv1Layer::fgkOBColdPlateThick = 0.012*fgkcm;
92 const Double_t AliITSUv1Layer::fgkOBCarbonPlateThick = 0.012*fgkcm;
93 const Double_t AliITSUv1Layer::fgkOBGlueThickM1 = 0.03 *fgkcm;
94 const Double_t AliITSUv1Layer::fgkOBGlueThick = 0.01 *fgkcm;
95 const Double_t AliITSUv1Layer::fgkOBModuleZLength = 21.06 *fgkcm;
96 const Double_t AliITSUv1Layer::fgkOBHalfStaveYTrans = 1.76 *fgkmm;
97 const Double_t AliITSUv1Layer::fgkOBHalfStaveXOverlap = 4.3 *fgkmm;
98 const Double_t AliITSUv1Layer::fgkOBGraphiteFoilThick = 30.0 *fgkmicron;
99 const Double_t AliITSUv1Layer::fgkOBCarbonFleeceThick = 20.0 *fgkmicron;
100 const Double_t AliITSUv1Layer::fgkOBCoolTubeInnerDM1 = 2.052*fgkmm;
101 const Double_t AliITSUv1Layer::fgkOBCoolTubeInnerD = 2.05 *fgkmm;
102 const Double_t AliITSUv1Layer::fgkOBCoolTubeThick = 32.0 *fgkmicron;
103 const Double_t AliITSUv1Layer::fgkOBCoolTubeXDist = 11.1 *fgkmm;
105 const Double_t AliITSUv1Layer::fgkOBSpaceFrameWidth = 42.0 *fgkmm;
106 const Double_t AliITSUv1Layer::fgkOBSpaceFrameTotHigh = 43.1 *fgkmm;
107 const Double_t AliITSUv1Layer::fgkOBSFrameBeamRadius = 0.6 *fgkmm;
108 const Double_t AliITSUv1Layer::fgkOBSpaceFrameLa = 3.0 *fgkmm;
109 const Double_t AliITSUv1Layer::fgkOBSpaceFrameHa = 0.721979*fgkmm;
110 const Double_t AliITSUv1Layer::fgkOBSpaceFrameLb = 3.7 *fgkmm;
111 const Double_t AliITSUv1Layer::fgkOBSpaceFrameHb = 0.890428*fgkmm;
112 const Double_t AliITSUv1Layer::fgkOBSpaceFrameL = 0.25 *fgkmm;
113 const Double_t AliITSUv1Layer::fgkOBSFBotBeamAngle = 56.5;
114 const Double_t AliITSUv1Layer::fgkOBSFrameBeamSidePhi = 65.0;
117 ClassImp(AliITSUv1Layer)
119 #define SQ(A) (A)*(A)
121 //________________________________________________________________________
122 AliITSUv1Layer::AliITSUv1Layer():
138 fStaveModel(AliITSUv1::kIBModelDummy)
141 // Standard constructor
142 for (int i=kNHLevels;i--;) fHierarchy[i] = 0;
146 //________________________________________________________________________
147 AliITSUv1Layer::AliITSUv1Layer(Int_t debug):
148 AliITSv11Geometry(debug),
163 fStaveModel(AliITSUv1::kIBModelDummy)
166 // Constructor setting debugging level
167 for (int i=kNHLevels;i--;) fHierarchy[i] = 0;
171 //________________________________________________________________________
172 AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Int_t debug):
173 AliITSv11Geometry(debug),
188 fStaveModel(AliITSUv1::kIBModelDummy)
191 // Constructor setting layer number and debugging level
192 for (int i=kNHLevels;i--;) fHierarchy[i] = 0;
196 //________________________________________________________________________
197 AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Bool_t turbo, Int_t debug):
198 AliITSv11Geometry(debug),
213 fStaveModel(AliITSUv1::kIBModelDummy)
216 // Constructor setting layer number and debugging level
217 // for a "turbo" layer (i.e. where staves overlap in phi)
218 for (int i=kNHLevels;i--;) fHierarchy[i] = 0;
222 //________________________________________________________________________
223 AliITSUv1Layer::AliITSUv1Layer(const AliITSUv1Layer &s):
224 AliITSv11Geometry(s.GetDebug()),
225 fLayerNumber(s.fLayerNumber),
227 fLayRadius(s.fLayRadius),
228 fZLength(s.fZLength),
229 fSensorThick(s.fSensorThick),
230 fChipThick(s.fChipThick),
231 fStaveWidth(s.fStaveWidth),
232 fStaveTilt(s.fStaveTilt),
233 fNStaves(s.fNStaves),
234 fNModules(s.fNModules),
236 fChipTypeID(s.fChipTypeID),
237 fIsTurbo(s.fIsTurbo),
238 fBuildLevel(s.fBuildLevel),
239 fStaveModel(s.fStaveModel)
243 for (int i=kNHLevels;i--;) fHierarchy[i] = s.fHierarchy[i];
247 //________________________________________________________________________
248 AliITSUv1Layer& AliITSUv1Layer::operator=(const AliITSUv1Layer &s)
251 // Assignment operator
253 if(&s == this) return *this;
255 fLayerNumber = s.fLayerNumber;
257 fLayRadius = s.fLayRadius;
258 fZLength = s.fZLength;
259 fSensorThick = s.fSensorThick;
260 fChipThick = s.fChipThick;
261 fStaveWidth = s.fStaveWidth;
262 fStaveTilt = s.fStaveTilt;
263 fNStaves = s.fNStaves;
264 fNModules = s.fNModules;
266 fIsTurbo = s.fIsTurbo;
267 fChipTypeID = s.fChipTypeID;
268 fBuildLevel = s.fBuildLevel;
269 fStaveModel = s.fStaveModel;
270 for (int i=kNHLevels;i--;) fHierarchy[i] = s.fHierarchy[i];
275 //________________________________________________________________________
276 AliITSUv1Layer::~AliITSUv1Layer() {
282 //________________________________________________________________________
283 void AliITSUv1Layer::CreateLayer(TGeoVolume *moth){
285 // Creates the actual Layer and places inside its mother volume
288 // moth : the TGeoVolume owing the volume structure
294 // Created: 17 Jun 2011 Mario Sitta
295 // Updated: 08 Jul 2011 Mario Sitta
296 // Updated: 20 May 2013 Mario Sitta Layer is Assembly instead of Tube
300 Double_t xpos, ypos, zpos;
304 // Check if the user set the proper parameters
305 if (fLayRadius<= 0) AliFatal(Form("Wrong layer radius (%f)",fLayRadius));
306 if (fZLength <= 0) AliFatal(Form("Wrong layer length (%f)",fZLength));
307 if (fNStaves <= 0) AliFatal(Form("Wrong number of staves (%d)",fNStaves));
308 if (fNChips <= 0) AliFatal(Form("Wrong number of chips (%d)",fNChips));
310 if (fLayerNumber >= fgkNumberOfInnerLayers && fNModules <= 0)
311 AliFatal(Form("Wrong number of modules (%d)",fNModules));
313 if (fChipThick <= 0) {
314 AliInfo(Form("Chip thickness wrong or not set (%f), using default (%f)",
315 fChipThick,fgkDefaultChipThick));
316 fChipThick = fgkDefaultChipThick;
319 if (fSensorThick <= 0) {
320 AliInfo(Form("Sensor thickness wrong or not set (%f), using default (%f)",
321 fSensorThick,fgkDefaultSensorThick));
322 fSensorThick = fgkDefaultSensorThick;
325 if (fSensorThick > fChipThick) {
326 AliWarning(Form("Sensor thickness (%f) is greater than chip thickness (%f), fixing",
327 fSensorThick,fChipThick));
328 fSensorThick = fChipThick;
332 // If a Turbo layer is requested, do it and exit
334 CreateLayerTurbo(moth);
339 // First create the stave container
340 alpha = (360./(2*fNStaves))*DegToRad();
342 // fStaveWidth = fLayRadius*Tan(alpha);
344 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(),fLayerNumber);
345 TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
347 Form("Model %d Build level %d",(Int_t)fStaveModel,fBuildLevel));
348 layVol->SetUniqueID(fChipTypeID);
350 // layVol->SetVisibility(kFALSE);
351 layVol->SetVisibility(kTRUE);
352 layVol->SetLineColor(1);
354 TGeoVolume *stavVol = CreateStave();
357 // Now build up the layer
358 alpha = 360./fNStaves;
359 Double_t r = fLayRadius + ((TGeoBBox*)stavVol->GetShape())->GetDY();
360 for (Int_t j=0; j<fNStaves; j++) {
361 Double_t phi = j*alpha + fPhi0;
362 xpos = r*CosD(phi);// r*SinD(-phi);
363 ypos = r*SinD(phi);// r*CosD(-phi);
366 layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
367 new TGeoRotation("",phi,0,0)));
371 // Finally put everything in the mother volume
372 moth->AddNode(layVol, 1, 0);
375 // Upgrade geometry is served
379 //________________________________________________________________________
380 void AliITSUv1Layer::CreateLayerTurbo(TGeoVolume *moth){
382 // Creates the actual Layer and places inside its mother volume
383 // A so-called "turbo" layer is a layer where staves overlap in phi
384 // User can set width and tilt angle, no check is performed here
385 // to avoid volume overlaps
388 // moth : the TGeoVolume owing the volume structure
394 // Created: 08 Jul 2011 Mario Sitta
395 // Updated: 08 Mar 2012 Mario Sitta Correct way to compute container R
396 // Updated: 20 May 2013 Mario Sitta Layer is Assemgbly instead of Tube
402 Double_t xpos, ypos, zpos;
406 // Check if the user set the proper (remaining) parameters
407 if (fStaveWidth <= 0)
408 AliFatal(Form("Wrong stave width (%f)",fStaveWidth));
409 if (Abs(fStaveTilt) > 45)
410 AliWarning(Form("Stave tilt angle (%f) greater than 45deg",fStaveTilt));
413 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(), fLayerNumber);
414 TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
416 Form("Model %d Build level %d",(Int_t)fStaveModel,fBuildLevel));
417 layVol->SetUniqueID(fChipTypeID);
418 layVol->SetVisibility(kTRUE);
419 layVol->SetLineColor(1);
420 TGeoVolume *stavVol = CreateStave();
423 // Now build up the layer
424 alpha = 360./fNStaves;
425 Double_t r = fLayRadius /* +chip thick ?! */;
426 for (Int_t j=0; j<fNStaves; j++) {
427 Double_t phi = j*alpha + fPhi0;
428 xpos = r*CosD(phi);// r*SinD(-phi);
429 ypos = r*SinD(phi);// r*CosD(-phi);
432 layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
433 new TGeoRotation("", phi-fStaveTilt,0,0)));
437 // Finally put everything in the mother volume
438 moth->AddNode(layVol, 1, 0);
443 //________________________________________________________________________
444 TGeoVolume* AliITSUv1Layer::CreateStave(const TGeoManager * /*mgr*/){
446 // Creates the actual Stave
449 // mgr : the GeoManager (used only to get the proper material)
455 // Created: 22 Jun 2011 Mario Sitta
456 // Updated: 18 Dec 2013 Mario Sitta Handle IB and OB
461 Double_t xlen, ylen, zlen;
466 // First create all needed shapes
467 alpha = (360./(2*fNStaves))*DegToRad();
470 xlen = fLayRadius*Tan(alpha);
471 if (fIsTurbo) xlen = 0.5*fStaveWidth;
472 ylen = 0.5*fChipThick;
475 Double_t yplus = 0.46;
476 TGeoXtru *stave = new TGeoXtru(2); //z sections
477 Double_t xv[5] = {xlen,xlen,0,-xlen,-xlen};
478 Double_t yv[5] = {ylen+0.09,-0.15,-yplus-fSensorThick,-0.15,ylen+0.09};
479 stave->DefinePolygon(5,xv,yv);
480 stave->DefineSection(0,-zlen,0,0,1.);
481 stave->DefineSection(1,+zlen,0,0,1.);
483 // We have all shapes: now create the real volumes
485 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
486 // TGeoVolume *staveVol = new TGeoVolume(volname, stave, medAir);
487 TGeoVolume *staveVol = new TGeoVolumeAssembly(volname);
489 // staveVol->SetVisibility(kFALSE);
490 staveVol->SetVisibility(kTRUE);
491 staveVol->SetLineColor(2);
492 TGeoVolume *mechStaveVol = 0;
494 // Now build up the stave
495 if (fLayerNumber < fgkNumberOfInnerLayers) {
496 TGeoVolume *modVol = CreateStaveInnerB(xlen,ylen,zlen);
497 staveVol->AddNode(modVol, 0);
498 fHierarchy[kHalfStave] = 1;
500 // Mechanical stave structure
501 mechStaveVol = CreateStaveStructInnerB(xlen,zlen);
503 ypos = ((TGeoBBox*)(modVol->GetShape()))->GetDY();
504 if (fStaveModel != AliITSUv1::kIBModel4)
505 ypos += ((TGeoBBox*)(mechStaveVol->GetShape()))->GetDY();
506 staveVol->AddNode(mechStaveVol, 1, new TGeoCombiTrans(0, -ypos, 0, new TGeoRotation("",0, 0, 180)));
511 TGeoVolume *hstaveVol = CreateStaveOuterB();
512 if (fStaveModel == AliITSUv1::kOBModel0) { // Create simplified stave struct as in v0
513 staveVol->AddNode(hstaveVol, 0);
514 fHierarchy[kHalfStave] = 1;
515 } else { // (if fStaveModel) Create new stave struct as in TDR
516 xpos = ((TGeoBBox*)(hstaveVol->GetShape()))->GetDX()
517 - fgkOBHalfStaveXOverlap/2;
518 // ypos is CF height as computed in CreateSpaceFrameOuterB1
519 ypos = (fgkOBSpaceFrameTotHigh - fgkOBHalfStaveYTrans)/2;
520 staveVol->AddNode(hstaveVol, 0, new TGeoTranslation(-xpos, ypos, 0));
521 staveVol->AddNode(hstaveVol, 1, new TGeoTranslation( xpos, ypos+fgkOBHalfStaveYTrans, 0));
522 fHierarchy[kHalfStave] = 2; // RS
523 mechStaveVol = CreateSpaceFrameOuterB();
525 staveVol->AddNode(mechStaveVol, 1,
526 new TGeoCombiTrans(0, 0, 0,
527 new TGeoRotation("", 180, 0, 0)));
528 } // if (fStaveModel)
532 // Done, return the stave
536 //________________________________________________________________________
537 TGeoVolume* AliITSUv1Layer::CreateStaveInnerB(const Double_t xsta,
540 const TGeoManager *mgr){
542 // Create the chip stave for the Inner Barrel
543 // (Here we fake the halfstave volume to have the same
544 // formal geometry hierarchy as for the Outer Barrel)
547 // xsta, ysta, zsta : X, Y, Z stave half lengths
548 // mgr : the GeoManager (used only to get the proper material)
554 // Created: 06 Mar 2014 Mario Sitta
558 Double_t xmod, ymod, zmod;
561 // First we create the module (i.e. the HIC with 9 chips)
562 TGeoVolume *moduleVol = CreateModuleInnerB(xsta, ysta, zsta);
564 // Then we create the fake halfstave and the actual stave
565 xmod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDX();
566 ymod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDY();
567 zmod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDZ();
569 TGeoBBox *hstave = new TGeoBBox(xmod, ymod, zmod);
571 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
573 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber);
574 TGeoVolume *hstaveVol = new TGeoVolume(volname, hstave, medAir);
577 // Finally build it up
578 hstaveVol->AddNode(moduleVol, 0);
579 fHierarchy[kModule] = 1;
581 // Done, return the stave structure
585 //________________________________________________________________________
586 TGeoVolume* AliITSUv1Layer::CreateModuleInnerB(Double_t xmod,
589 const TGeoManager *mgr){
591 // Creates the IB Module: (only the chips for the time being)
594 // xmod, ymod, zmod : X, Y, Z module half lengths
595 // mgr : the GeoManager (used only to get the proper material)
600 // the module as a TGeoVolume
602 // Created: 06 Mar 2014 M. Sitta
609 // First create the single chip
610 zchip = zmod/fgkIBChipsPerRow;
611 TGeoVolume *chipVol = CreateChipInnerB(xmod, ymod, zchip);
613 // Then create the module and populate it with the chips
614 TGeoBBox *module = new TGeoBBox(xmod, ymod, zmod);
616 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
618 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber);
619 TGeoVolume *modVol = new TGeoVolume(volname, module, medAir);
621 // mm (not used) zlen = ((TGeoBBox*)chipVol->GetShape())->GetDZ();
622 for (Int_t j=0; j<fgkIBChipsPerRow; j++) {
623 zpos = -zmod + j*2*zchip + zchip;
624 modVol->AddNode(chipVol, j, new TGeoTranslation(0, 0, zpos));
628 // Done, return the module
632 //________________________________________________________________________
633 TGeoVolume* AliITSUv1Layer::CreateStaveStructInnerB(const Double_t xsta,
635 const TGeoManager *mgr){
637 // Create the mechanical stave structure
642 // mgr : the GeoManager (used only to get the proper material)
648 // Created: 22 Mar 2013 Chinorat Kobdaj
649 // Updated: 26 Apr 2013 Mario Sitta
652 TGeoVolume *mechStavVol = 0;
654 switch (fStaveModel) {
655 case AliITSUv1::kIBModelDummy:
656 mechStavVol = CreateStaveModelInnerBDummy(xsta,zsta,mgr);
658 case AliITSUv1::kIBModel0:
659 mechStavVol = CreateStaveModelInnerB0(xsta,zsta,mgr);
661 case AliITSUv1::kIBModel1:
662 mechStavVol = CreateStaveModelInnerB1(xsta,zsta,mgr);
664 case AliITSUv1::kIBModel21:
665 mechStavVol = CreateStaveModelInnerB21(xsta,zsta,mgr);
667 case AliITSUv1::kIBModel22:
668 mechStavVol = CreateStaveModelInnerB22(xsta,zsta,mgr);
670 case AliITSUv1::kIBModel3:
671 mechStavVol = CreateStaveModelInnerB3(xsta,zsta,mgr);
673 case AliITSUv1::kIBModel4:
674 mechStavVol = CreateStaveModelInnerB4(xsta,zsta,mgr);
677 AliFatal(Form("Unknown stave model %d",fStaveModel));
685 //________________________________________________________________________
686 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerBDummy(const Double_t ,
688 const TGeoManager *) const {
690 // Create dummy stave
695 // mgr : the GeoManager (used only to get the proper material)
701 // Created: 22 Mar 2013 Chinorat Kobdaj
702 // Updated: 26 Apr 2013 Mario Sitta
705 // Done, return the stave structur
709 //________________________________________________________________________
710 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xsta,
712 const TGeoManager *mgr){
714 // Create the mechanical stave structure for Model 0 of TDR
719 // mgr : the GeoManager (used only to get the proper material)
725 // Created: 22 Mar 2013 Chinorat Kobdaj
726 // Updated: 26 Apr 2013 Mario Sitta
729 // Materials defined in AliITSUv1
730 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
731 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
733 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
734 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
735 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
736 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
739 Double_t kConeOutRadius = 0.15/2;
740 Double_t kConeInRadius = 0.1430/2;
741 Double_t kStaveLength = zsta*2;
742 Double_t kStaveWidth = xsta*2-kConeOutRadius*2;
743 Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
744 Double_t kStaveHeight = 0.3;
745 Double_t kHeight = kStaveHeight/2;
746 Double_t kAlpha = 90-67;//90-33.69;
747 Double_t kTheta = kAlpha*TMath::DegToRad();
748 Double_t kS1 = kWidth/TMath::Sin(kTheta);
749 Double_t kL1 = kWidth/TMath::Tan(kTheta);
750 Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
751 Double_t kThe2 = TMath::ATan(kHeight/kS1);
752 Double_t kBeta = kThe2*TMath::RadToDeg();
753 // Int_t loop = kStaveLength/(kL1);
754 // Double_t s3 = kWidth/(2*TMath::Sin(kTheta));
755 // Double_t s4 = 3*kWidth/(2*TMath::Sin(kTheta));
757 AliDebug(1, Form("BuildLevel %d\n",fBuildLevel));
760 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
762 Double_t z=0, y=-0.011+0.0150, x=0;
764 TGeoVolume *mechStavVol = 0;
766 if (fBuildLevel < 5) {
769 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
770 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
771 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07};
772 mechStruct->DefinePolygon(5,xv,yv);
773 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
774 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
776 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
777 mechStavVol->SetLineColor(12);
778 mechStavVol->SetFillColor(12);
779 mechStavVol->SetVisibility(kTRUE);
781 // detailed structure ++++++++++++++
782 //Pipe Kapton grey-35
783 TGeoTube *coolTube = new TGeoTube(kConeInRadius,kConeOutRadius,kStaveLength/2);
784 TGeoVolume *volCoolTube= new TGeoVolume("pipe", coolTube, medKapton);
785 volCoolTube->SetFillColor(35);
786 volCoolTube->SetLineColor(35);
787 mechStavVol->AddNode(volCoolTube,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
788 mechStavVol->AddNode(volCoolTube,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
791 if (fBuildLevel < 4) {
792 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength/2);
793 TGeoVolume *volCoolTubeW= new TGeoVolume("pipeWater", coolTubeW, medWater);
794 volCoolTubeW->SetFillColor(4);
795 volCoolTubeW->SetLineColor(4);
796 mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
797 mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
800 //frequency of filament
801 //n = 4 means very dense(4 filaments per interval)
802 //n = 2 means dense(2 filaments per interval)
804 Int_t loop = (Int_t)(kStaveLength/(4*kL1/n) + 2/n)-1;
805 if (fBuildLevel < 3) {
806 //Top CFRP Filament black-12 Carbon structure TGeoBBox (length,thickness,width)
807 TGeoBBox *t2=new TGeoBBox(kS2,0.007/2,0.15/2);//(kS2,0.002,0.02);
808 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
809 volT2->SetLineColor(12);
810 volT2->SetFillColor(12);
812 for(int i=1;i<loop;i++){ //i<60;i++){
813 mechStavVol->AddNode(volT2,4*i+0,
814 new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
815 new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
816 mechStavVol->AddNode(volT2,4*i+1,
817 new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
818 new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
819 mechStavVol->AddNode(volT2,4*i+2,
820 new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
821 new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
822 mechStavVol->AddNode(volT2,4*i+3,
823 new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
824 new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
828 //Bottom CFRP Filament black-12 Carbon structure TGeoBBox (thickness,width,length)
829 TGeoBBox *t1=new TGeoBBox(0.007/2,0.15/2,kS1);//(0.002,0.02,kS1);
830 TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K);
831 volT1->SetLineColor(12);
832 volT1->SetFillColor(12);
834 for(int i=1;i<loop;i++){
835 mechStavVol->AddNode(volT1,4*i+0,
836 new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1),
837 new TGeoRotation("volT1",-90,kAlpha,0)));
838 mechStavVol->AddNode(volT1,4*i+1,
839 new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1),
840 new TGeoRotation("volT1",90,kAlpha,0)));
841 mechStavVol->AddNode(volT1,4*i+2,
842 new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
843 new TGeoRotation("volT1",-90,-kAlpha,0)));
844 mechStavVol->AddNode(volT1,4*i+3,
845 new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
846 new TGeoRotation("volT1",-90,+kAlpha,0)));
850 if (fBuildLevel < 2) {
851 // Glue CFRP-Silicon layers TGeoBBox(thickness,width,kS1);
852 TGeoBBox *tG=new TGeoBBox(0.0075/2,0.18/2,kS1);
853 TGeoVolume *volTG=new TGeoVolume("Glue1", tG, medGlue);
854 volTG->SetLineColor(5);
855 volTG->SetFillColor(5);
857 for(int i=1;i<loop;i++){ //i<60;i++){
858 mechStavVol->AddNode(volTG,4*i+0,
859 new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i),
860 new TGeoRotation("volTG",-90,kAlpha,0)));
861 mechStavVol->AddNode(volTG,4*i+1,
862 new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i),
863 new TGeoRotation("volTG",90,kAlpha,0)));
864 mechStavVol->AddNode(volTG,4*i+2,
865 new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*i*kL1)+kS1/2, //z-14.25+(i*2*kL1),
866 new TGeoRotation("volTG",-90,-kAlpha,0)));
867 mechStavVol->AddNode(volTG,4*i+3,
868 new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
869 new TGeoRotation("volTG",-90,+kAlpha,0)));
872 TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta);
873 TGeoVolume *volGlue=new TGeoVolume("Glue2", glue, medGlue);
874 volGlue->SetLineColor(5);
875 volGlue->SetFillColor(5);
876 //mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
877 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
880 if (fBuildLevel < 1) {
881 //Flex cable brown-28 TGeoBBox(width,thickness,length);
882 TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta);
883 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
884 volCable->SetLineColor(28);
885 volCable->SetFillColor(28);
886 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
889 // Done, return the stave structur
894 //________________________________________________________________________
895 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xsta,
897 const TGeoManager *mgr){
899 // Create the mechanical stave structure for Model 1 of TDR
904 // mgr : the GeoManager (used only to get the proper material)
910 // Created: 22 Mar 2013 Chinorat Kobdaj
911 // Updated: 26 Apr 2013 Mario Sitta
914 // Materials defined in AliITSUv1
915 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
916 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
918 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
919 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
920 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
921 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
924 Double_t kConeOutRadius = 0.15/2;
925 // Double_t kConeInRadius = 0.1430/2;
926 Double_t kStaveLength = zsta*2;
927 // Double_t kStaveWidth = xsta*2-kConeOutRadius*2;
928 Double_t kStaveWidth = xsta*2;
929 Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
930 Double_t kStaveHeight = 0.3;
931 Double_t kHeight = kStaveHeight/2;
932 Double_t kAlpha = 90-33.;//90-30;
933 Double_t kTheta = kAlpha*TMath::DegToRad();
934 Double_t kS1 = kWidth/TMath::Sin(kTheta);
935 Double_t kL1 = kWidth/TMath::Tan(kTheta);
936 Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
937 Double_t kThe2 = TMath::ATan(kHeight/kS1);
938 Double_t kBeta = kThe2*TMath::RadToDeg();
939 Int_t loop = (Int_t)((kStaveLength/(2*kL1))/2);
942 TGeoVolume *mechStavVol = 0;
945 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
948 // detailed structure ++++++++++++++
949 Double_t z=0, y=-0.011+0.0150, x=0;
951 // Polimide micro channels numbers
952 Double_t yMC = y-kHeight+0.01;
953 Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
954 Double_t xstaMC = (nb*0.1-0.08)/2;
957 if (fBuildLevel < 5) {
959 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
960 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
961 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07};
962 mechStruct->DefinePolygon(5,xv,yv);
963 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
964 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
966 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
967 mechStavVol->SetLineColor(12);
968 mechStavVol->SetFillColor(12);
969 mechStavVol->SetVisibility(kTRUE);
971 // Polimide micro channels numbers
972 TGeoBBox *tM0=new TGeoBBox(xstaMC, 0.005/2, zsta);
973 TGeoVolume *volTM0=new TGeoVolume("MicroChanCover", tM0, medKapton);
974 volTM0->SetLineColor(35);
975 volTM0->SetFillColor(35);
976 mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x,-0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
977 mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x,+0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
979 TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta);
980 TGeoVolume *volTM0b=new TGeoVolume("MicroChanWalls", tM0b, medKapton);
981 volTM0b->SetLineColor(35);
982 volTM0b->SetFillColor(35);
983 for (Int_t ib=0;ib<nb;ib++) {
984 mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
989 if (fBuildLevel < 4) {
990 // Water in Polimide micro channels
991 TGeoBBox *water=new TGeoBBox(0.08/2, 0.02/2, zsta+0.1);
992 TGeoVolume *volWater=new TGeoVolume("Water", water, medWater);
993 volWater->SetLineColor(4);
994 volWater->SetFillColor(4);
995 for (Int_t ib=0;ib<(nb-1);ib++) {
996 mechStavVol->AddNode(volWater, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.06,yMC, z, new TGeoRotation("",0, 0, 0)));
1000 if (fBuildLevel < 3) {
1001 //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length)
1002 Double_t filWidth = 0.04;
1003 Double_t filHeight= 0.02;
1004 TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,kS1);
1005 TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K);
1006 volT1->SetLineColor(12);
1007 volT1->SetFillColor(12);
1008 for(int i=0;i<loop;i++){//i<30;i++){
1009 mechStavVol->AddNode(volT1,4*i+0,
1010 new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1)+kS1/2,
1011 new TGeoRotation("volT1",-90,kAlpha,0)));
1012 mechStavVol->AddNode(volT1,4*i+1,
1013 new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1*i)+kS1/2,
1014 new TGeoRotation("volT1",90,kAlpha,0)));
1015 mechStavVol->AddNode(volT1,4*i+2,
1016 new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
1017 new TGeoRotation("volT1",-90,-kAlpha,0)));
1018 mechStavVol->AddNode(volT1,4*i+3,
1019 new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
1020 new TGeoRotation("volT1",-90,+kAlpha,0)));
1023 // Top filament CFRP black-12 Carbon structure TGeoBBox (length,thickness,width)
1024 TGeoBBox *t2=new TGeoBBox(kS2,filHeight/2,filWidth/2);
1025 TGeoVolume *volT2=new TGeoVolume("CFRPTop", t2, medM60J3K);
1026 volT2->SetLineColor(12);
1027 volT2->SetFillColor(12);
1028 for(int i=0;i<loop;i++){ //i<30;i++){
1029 mechStavVol->AddNode(volT2,4*i+0,
1030 new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
1031 new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
1032 mechStavVol->AddNode(volT2,4*i+1,
1033 new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
1034 new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
1035 mechStavVol->AddNode(volT2,4*i+2,
1036 new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
1037 new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
1038 mechStavVol->AddNode(volT2,4*i+3,
1039 new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
1040 new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
1044 if (fBuildLevel < 2) {
1045 // Glue between filament and polimide micro channel
1046 TGeoBBox *t3=new TGeoBBox(0.01/2,0.04,kS1);
1047 TGeoVolume *volT3=new TGeoVolume("FilamentGlue", t3, medGlue);
1048 volT3->SetLineColor(5);
1049 volT3->SetFillColor(5);
1050 for(int i=0;i<loop;i++){//i<30;i++){
1051 mechStavVol->AddNode(volT3,4*i+0,
1052 new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2,
1053 new TGeoRotation("volT1",-90,kAlpha,0)));
1054 mechStavVol->AddNode(volT3,4*i+1,
1055 new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2,
1056 new TGeoRotation("volT1",90,kAlpha,0)));
1057 mechStavVol->AddNode(volT3,4*i+2,
1058 new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
1059 new TGeoRotation("volT1",-90,-kAlpha,0)));
1060 mechStavVol->AddNode(volT3,4*i+3,
1061 new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
1062 new TGeoRotation("volT1",-90,+kAlpha,0)));
1065 // Glue microchannel and sensor
1066 TGeoBBox *glueM = new TGeoBBox(xsta, 0.01/2, zsta);
1067 TGeoVolume *volGlueM=new TGeoVolume("MicroChanGlue", glueM, medGlue);
1068 volGlueM->SetLineColor(5);
1069 volGlueM->SetFillColor(5);
1070 mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
1072 // Glue sensor and kapton
1073 TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta);
1074 TGeoVolume *volGlue=new TGeoVolume("SensorGlue", glue, medGlue);
1075 volGlue->SetLineColor(5);
1076 volGlue->SetFillColor(5);
1077 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
1080 if (fBuildLevel < 1) {
1081 TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta);
1082 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
1083 volCable->SetLineColor(28);
1084 volCable->SetFillColor(28);
1085 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
1088 // Done, return the stave structur
1093 //________________________________________________________________________
1094 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xsta,
1095 const Double_t zsta,
1096 const TGeoManager *mgr){
1098 // Create the mechanical stave structure for Model 2.1 of TDR
1103 // mgr : the GeoManager (used only to get the proper material)
1109 // Created: 22 Mar 2013 Chinorat Kobdaj
1110 // Updated: 26 Apr 2013 Mario Sitta
1113 // Materials defined in AliITSUv1
1114 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1115 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1117 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
1118 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1119 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1120 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
1121 TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
1122 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
1123 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1126 Double_t kConeOutRadius =0.151384/2;
1127 Double_t kConeInRadius = 0.145034/2;
1128 Double_t kStaveLength = zsta;
1129 Double_t kStaveWidth = xsta*2;
1130 Double_t kWidth = (kStaveWidth+0.005)/4;
1131 Double_t kStaveHeigth = 0.33;//0.33;
1132 Double_t kHeight = (kStaveHeigth+0.025)/2;
1133 Double_t kAlpha = 57; //56.31;
1134 Double_t kTheta = kAlpha*TMath::DegToRad();
1135 Double_t kS1 = (kStaveWidth/4)/TMath::Sin(kTheta);
1136 Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta);
1137 Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
1138 Double_t kThe2 = TMath::ATan(kHeight/kS1);
1139 Double_t kBeta = kThe2*TMath::RadToDeg();
1140 // Double_t lay1 = 0.003157;
1141 Double_t kLay1 = 0.003;//Amec carbon
1142 // Double_t lay2 = 0.0043215;//C Fleece carbon
1143 Double_t kLay2 = 0.002;//C Fleece carbon
1144 Double_t kLay3 = 0.007;//K13D2U carbon
1145 Int_t loop = (Int_t)(kStaveLength/(2*kL1));
1149 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
1151 Double_t z=0, y=-(kConeOutRadius+0.03)+0.0385, x=0;
1153 TGeoVolume *mechStavVol = 0;
1155 if (fBuildLevel < 5) {
1156 // world (trapezoid)
1157 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
1158 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
1159 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeigth,0,-kConeOutRadius*2-0.07};
1160 mechStruct->DefinePolygon(5,xv,yv);
1161 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
1162 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
1164 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
1165 mechStavVol->SetLineColor(12);
1166 mechStavVol->SetFillColor(12);
1167 mechStavVol->SetVisibility(kTRUE);
1169 //Pipe Kapton grey-35
1170 TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius,kConeInRadius,kConeOutRadius);
1171 TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
1172 volCone1->SetFillColor(35);
1173 volCone1->SetLineColor(35);
1174 mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
1175 mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
1178 if (fBuildLevel < 4) {
1180 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength);
1181 TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
1182 volCoolTubeW->SetFillColor(4);
1183 volCoolTubeW->SetLineColor(4);
1184 mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
1185 mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
1188 if (fBuildLevel < 3) {
1190 // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width)
1191 TGeoBBox *t2=new TGeoBBox(kS2,0.02/2,0.04/2); //TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02);
1192 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
1193 volT2->SetLineColor(12);
1194 volT2->SetFillColor(12);
1195 for(int i=0;i<loop;i++){// i<28;i++){
1196 mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
1197 mechStavVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
1198 mechStavVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
1199 mechStavVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
1200 // mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight-(0.12/2)+0.072,z+kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
1204 //wall side structure out
1205 TGeoBBox *box4 = new TGeoBBox(0.03/2,0.12/2,kStaveLength-0.50);
1206 TGeoVolume *plate4 = new TGeoVolume("WallOut",box4,medM60J3K);
1207 plate4->SetFillColor(35);
1208 plate4->SetLineColor(35);
1209 mechStavVol->AddNode(plate4,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0)));
1210 mechStavVol->AddNode(plate4,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0)));
1212 TGeoBBox *box5 = new TGeoBBox(0.015/2,0.12/2,kStaveLength-0.50);
1213 TGeoVolume *plate5 = new TGeoVolume("WallIn",box5,medM60J3K);
1214 plate5->SetFillColor(12);
1215 plate5->SetLineColor(12);
1216 mechStavVol->AddNode(plate5,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-0.03-0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0)));
1217 mechStavVol->AddNode(plate5,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+0.03+0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0)));
1219 //Amec Thermasol red-2 cover tube FGS300
1220 TGeoConeSeg *cons1 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius,kConeOutRadius+kLay1,kConeOutRadius,kConeOutRadius+kLay1,0,180);
1221 TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
1222 cone11->SetFillColor(2);
1223 cone11->SetLineColor(2);
1224 mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
1225 mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
1227 TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,kLay1/2,kStaveLength-0.50);
1228 TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
1229 plate2->SetFillColor(2);
1230 plate2->SetLineColor(2);
1231 mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate2",0,0,0)));
1233 TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay1/2,kStaveLength-0.50);
1234 TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
1235 plate21->SetFillColor(2);
1236 plate21->SetLineColor(2);
1237 mechStavVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0)));
1238 mechStavVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0)));
1240 TGeoBBox *box22 = new TGeoBBox((kLay1/2),kConeOutRadius/2,kStaveLength-0.50);
1241 TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
1242 plate22->SetFillColor(2);
1243 plate22->SetLineColor(2);
1244 mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1245 mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1246 mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1247 mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1250 TGeoConeSeg *cons2 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,0,180);
1251 TGeoVolume *cone12 = new TGeoVolume("CFleecePipeCover",cons2,medCarbonFleece);
1252 cone12->SetFillColor(28);
1253 cone12->SetLineColor(28);
1254 mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
1255 mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
1257 TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+kLay1)))/2,kLay2/2,kStaveLength-0.50);
1258 TGeoVolume *plate3 = new TGeoVolume("CFleeceMiddle",box3,medCarbonFleece);
1259 plate3->SetFillColor(28);
1260 plate3->SetLineColor(28);
1261 mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate3",0,0,0)));
1263 TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay2/2,kStaveLength-0.50);
1264 TGeoVolume *plate31 = new TGeoVolume("CFleeceLeftRight",box31,medCarbonFleece);
1265 plate31->SetFillColor(28);
1266 plate31->SetLineColor(28);
1267 mechStavVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0)));
1268 mechStavVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0)));
1270 TGeoBBox *box32 = new TGeoBBox((kLay2/2),(kConeOutRadius-kLay1)/2,kStaveLength-0.50);
1271 TGeoVolume *plate32 = new TGeoVolume("CFleeceVertical",box32,medCarbonFleece);
1272 plate32->SetFillColor(28);
1273 plate32->SetLineColor(28);
1274 mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1275 mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1276 mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1277 mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1280 //K13D2U carbon plate
1281 TGeoBBox *box1 = new TGeoBBox(2*kWidth,kLay3/2,kStaveLength-0.50);
1282 TGeoVolume *plate1 = new TGeoVolume("CarbonPlate",box1,medK13D2U2k);
1283 plate1->SetFillColor(5);
1284 plate1->SetLineColor(5);
1285 mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(kLay3/2)),z,new TGeoRotation("plate1",0,0,0)));
1287 //C Fleece bottom plate
1288 TGeoBBox *box6 = new TGeoBBox(2*kWidth,kLay2/2,kStaveLength-0.50);
1289 TGeoVolume *plate6 = new TGeoVolume("CFleeceBottom",box6,medCarbonFleece);
1290 plate6->SetFillColor(2);
1291 plate6->SetLineColor(2);
1292 mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)),z,new TGeoRotation("plate1",0,0,0)));
1297 if (fBuildLevel < 2) {
1298 //Glue layers and kapton
1299 TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, 0.005/2, zsta);
1300 TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
1301 volGlue->SetLineColor(5);
1302 volGlue->SetFillColor(5);
1303 mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
1304 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
1307 if (fBuildLevel < 1) {
1308 TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, 0.01/2, zsta);
1309 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
1310 volCable->SetLineColor(28);
1311 volCable->SetFillColor(28);
1312 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+0.01+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
1316 // Done, return the stave structure
1322 //________________________________________________________________________
1323 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xsta,
1324 const Double_t zsta,
1325 const TGeoManager *mgr){
1327 // Create the mechanical stave structure for Model 2.2 of TDR
1332 // mgr : the GeoManager (used only to get the proper material)
1338 // Created: 22 Mar 2013 Chinorat Kobdaj
1339 // Updated: 26 Apr 2013 Mario Sitta
1340 // Updated: 30 Apr 2013 Wanchaloem Poonsawat
1343 // Materials defined in AliITSUv1
1344 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1345 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1347 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
1348 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1349 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1350 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
1351 TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
1352 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
1353 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1356 Double_t kConeOutRadius =(0.1024+0.0025)/2;//0.107/2;
1357 Double_t kConeInRadius = 0.1024/2;//0.10105/2
1358 Double_t kStaveLength = zsta;
1359 Double_t kStaveWidth = xsta*2;
1360 Double_t kWidth = (kStaveWidth)/4;
1361 Double_t kStaveHeight = 0.283;//0.33;
1362 Double_t kHeight = (kStaveHeight)/2;
1363 Double_t kAlpha = 57;//56.31;
1364 Double_t kTheta = kAlpha*TMath::DegToRad();
1365 Double_t kS1 = ((kStaveWidth)/4)/TMath::Sin(kTheta);
1366 Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta);
1367 Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(kThe2);
1368 Double_t kThe2 = TMath::ATan(kHeight/(0.375-0.036));
1369 Double_t kBeta = kThe2*TMath::RadToDeg();
1370 Double_t klay1 = 0.003;//Amec carbon
1371 Double_t klay2 = 0.002;//C Fleece carbon
1372 Double_t klay3 = 0.007;//CFplate K13D2U carbon
1373 Double_t klay4 = 0.007;//GluekStaveLength/2
1374 Double_t klay5 = 0.01;//Flex cable
1375 Double_t kTopVertexMaxWidth = 0.072;
1376 Double_t kTopVertexHeight = 0.04;
1377 Double_t kSideVertexMWidth = 0.052;
1378 Double_t kSideVertexHeight = 0.11;
1381 Int_t loop = (Int_t)(kStaveLength/(2*kL1));
1384 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
1386 Double_t z=0, y=-(2*kConeOutRadius)+klay1+klay2+fSensorThick/2-0.0004, x=0;
1388 TGeoVolume *mechStavVol = 0;
1390 if (fBuildLevel < 5) {
1391 // world (trapezoid)
1392 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
1393 Double_t xv[6] = {kStaveWidth/2,kStaveWidth/2,0.012,-0.012,-kStaveWidth/2,-kStaveWidth/2};
1394 /* Double_t yv[6] = {-2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5),
1395 0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02,
1396 -2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5)}; // (kConeOutRadius*2)-0.0635 */
1397 Double_t yv[6] = {-(kConeOutRadius*2)-0.07295,0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02,-(kConeOutRadius*2)-0.07295}; // (kConeOutRadius*2)-0.064
1398 mechStruct->DefinePolygon(6,xv,yv);
1399 mechStruct->DefineSection(0,-kStaveLength,0,0,1.);
1400 mechStruct->DefineSection(1,kStaveLength,0,0,1.);
1402 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
1403 mechStavVol->SetLineColor(12);
1404 mechStavVol->SetFillColor(12);
1405 mechStavVol->SetVisibility(kTRUE);
1407 //Polyimide Pipe Kapton grey-35
1408 TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius-0.0001,kConeInRadius,kConeOutRadius-0.0001);
1409 TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
1410 volCone1->SetFillColor(35);
1411 volCone1->SetLineColor(35);
1412 mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
1413 mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
1416 if (fBuildLevel < 4) {
1417 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius-0.0001,kStaveLength);
1418 TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
1419 volCoolTubeW->SetFillColor(4);
1420 volCoolTubeW->SetLineColor(4);
1421 mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
1422 mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
1425 if (fBuildLevel < 3) {
1427 // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width)
1428 TGeoBBox *t2=new TGeoBBox(kS2-0.028,0.02/2,0.02/2); //0.04/2//TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02);//kS2-0.03 old Config.C
1429 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
1430 volT2->SetLineColor(12);
1431 volT2->SetFillColor(12);
1432 for(int i=0;i<loop;i++){// i<28;i++){
1433 // 1) Front Left Top Filament
1434 mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
1435 // 2) Front Right Top Filament
1436 mechStavVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
1437 // 3) Back Left Top Filament
1438 mechStavVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
1439 // 4) Back Right Top Filament
1440 mechStavVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
1446 TGeoTrd1 *trd1 = new TGeoTrd1(0,kTopVertexMaxWidth/2,kStaveLength,kTopVertexHeight/2);
1447 TGeoVolume *ibdv = new TGeoVolume("TopVertex",trd1,medM60J3K);
1448 ibdv->SetFillColor(12);
1449 ibdv->SetLineColor(12);
1450 mechStavVol->AddNode(ibdv,1,new TGeoCombiTrans(x,y+kStaveHeight+0.03,z,new TGeoRotation("ibdv",0.,-90,0)));//y+kStaveHeight+0.056
1453 TGeoTrd1 *trd2 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
1454 TGeoVolume *ibdv2 = new TGeoVolume("LeftVertex",trd2,medM60J3K);
1455 ibdv2->SetFillColor(12);
1456 ibdv2->SetLineColor(12);
1457 mechStavVol->AddNode(ibdv2,1,new TGeoCombiTrans(x+kStaveWidth/2-0.06,y-0.0348,z,new TGeoRotation("ibdv2",-103.3,90,0))); //x-kStaveWidth/2-0.09 old Config.C y-0.0355,
1460 TGeoTrd1 *trd3 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
1461 TGeoVolume *ibdv3 = new TGeoVolume("RightVertex",trd3,medM60J3K);
1462 ibdv3->SetFillColor(12);
1463 ibdv3->SetLineColor(12);
1464 mechStavVol->AddNode(ibdv3,1,new TGeoCombiTrans(x-kStaveWidth/2+0.06,y-0.0348,z,new TGeoRotation("ibdv3",103.3,90,0))); //x-kStaveWidth/2+0.09 old Config.C
1467 TGeoConeSeg *cons2 = new TGeoConeSeg(zsta,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,0,180);
1468 TGeoVolume *cone12 = new TGeoVolume("CarbonFleecePipeCover",cons2,medCarbonFleece);
1469 cone12->SetFillColor(28);
1470 cone12->SetLineColor(28);
1471 mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone12",0,0,0)));
1472 mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone12",0,0,0)));
1474 TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+klay1)))/2,klay2/2,zsta);//kStaveLength-0.50);
1475 TGeoVolume *plate3 = new TGeoVolume("CarbonFleeceMiddle",box3,medCarbonFleece);
1476 plate3->SetFillColor(28);
1477 plate3->SetLineColor(28);
1478 mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate3",0,0,0)));
1480 TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,klay2/2,zsta);
1481 TGeoVolume *plate31 = new TGeoVolume("CarbonFleeceLeftRight",box31,medCarbonFleece);
1482 plate31->SetFillColor(28);
1483 plate31->SetLineColor(28);
1484 mechStavVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0)));
1485 mechStavVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0)));
1487 TGeoBBox *box32 = new TGeoBBox((klay2/2),(kConeOutRadius-klay1)/2,zsta);
1488 TGeoVolume *plate32 = new TGeoVolume("CarbonFleeceVertical",box32,medCarbonFleece);
1489 plate32->SetFillColor(28);
1490 plate32->SetLineColor(28);
1491 mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1492 mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1493 mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1494 mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1496 //Amec Thermasol red-2 cover tube FGS300 or Carbon Paper
1497 TGeoConeSeg *cons1 = new TGeoConeSeg(zsta,kConeOutRadius,kConeOutRadius+klay1-0.0001,kConeOutRadius,kConeOutRadius+klay1-0.0001,0,180);//kConeOutRadius+klay1-0.0001
1498 TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
1499 cone11->SetFillColor(2);
1500 cone11->SetLineColor(2);
1501 mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone11",0,0,0)));
1502 mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone11",0,0,0)));
1504 TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,(klay1/2),zsta);//kStaveLength-0.50);
1505 TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
1506 plate2->SetFillColor(2);
1507 plate2->SetLineColor(2);
1508 mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate2",0,0,0)));
1510 TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,(klay1/2),zsta);
1511 TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
1512 plate21->SetFillColor(2);
1513 plate21->SetLineColor(2);
1514 mechStavVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(klay1/2)+0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0)));
1515 mechStavVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(klay1/2)-0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0)));
1517 TGeoBBox *box22 = new TGeoBBox((klay1/2),kConeOutRadius/2,zsta);
1518 TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
1519 plate22->SetFillColor(2);
1520 plate22->SetLineColor(2);
1521 mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1522 mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1523 mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1524 mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1527 TGeoBBox *box1 = new TGeoBBox(2*kWidth,(klay3)/2,zsta);
1528 TGeoVolume *plate1 = new TGeoVolume("CFPlate",box1,medK13D2U2k);
1529 plate1->SetFillColor(5);
1530 plate1->SetLineColor(5);
1531 mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(klay3/2)),z,new TGeoRotation("plate1",0,0,0)));
1533 //C Fleece bottom plate
1534 TGeoBBox *box6 = new TGeoBBox(2*kWidth,(klay2)/2,zsta);
1535 TGeoVolume *plate6 = new TGeoVolume("CarbonFleeceBottom",box6,medCarbonFleece);
1536 plate6->SetFillColor(2);
1537 plate6->SetLineColor(2);
1538 mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+(klay2/2)),z,new TGeoRotation("plate6",0,0,0)));
1541 if (fBuildLevel < 2) {
1542 //Glue klayers and kapton
1543 TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, (klay4)/2, zsta);
1544 TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
1545 volGlue->SetLineColor(5);
1546 volGlue->SetFillColor(5);
1547 // mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4/2)), z, new TGeoRotation("",0, 0, 0)));
1548 mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4)/2)+0.00005, z, new TGeoRotation("",0, 0, 0)));
1551 if (fBuildLevel < 1) {
1553 TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, klay5/2, zsta);//klay5/2
1554 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
1555 volCable->SetLineColor(28);
1556 volCable->SetFillColor(28);
1557 // mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.0002, z, new TGeoRotation("",0, 0, 0)));
1558 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+(klay5)/2), z, new TGeoRotation("",0, 0, 0)));
1560 // Done, return the stave structe
1565 //________________________________________________________________________
1566 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xsta,
1567 const Double_t zsta,
1568 const TGeoManager *mgr){
1570 // Create the mechanical stave structure for Model 3 of TDR
1575 // mgr : the GeoManager (used only to get the proper material)
1581 // Created: 28 May 2013 Chinorat Kobdaj
1582 // Updated: Mario Sitta
1583 // Updated: Wanchaloem Poonsawat
1586 // Materials defined in AliITSUv1
1587 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1588 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1590 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
1591 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1592 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1593 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
1594 //TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
1595 //TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
1596 //TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1599 Double_t kConeOutRadius = 0.15/2;
1600 Double_t kStaveLength = zsta*2;
1601 Double_t kStaveWidth = xsta*2;
1602 Double_t w = kStaveWidth/4;//1/2 of W
1603 Double_t staveHeight = 0.3;
1604 Double_t h = staveHeight/2;
1605 Double_t alpha = 90-33.;//90-30;
1606 Double_t the1 = alpha*TMath::DegToRad();
1607 Double_t s1 = w/TMath::Sin(the1);
1608 Double_t l = w/TMath::Tan(the1);
1609 Double_t s2 = TMath::Sqrt(h*h + s1*s1);//TMath::Sin(the2);
1610 Double_t the2 = TMath::ATan(h/s1);
1611 Double_t beta = the2*TMath::RadToDeg();
1612 Double_t klay4 = 0.007; //Glue
1613 Double_t klay5 = 0.01; //Flexcable
1614 Int_t loop = (Int_t)((kStaveLength/(2*l))/2);
1616 Double_t ang1 = 0*TMath::DegToRad();
1617 Double_t ang2 = 0*TMath::DegToRad();
1618 Double_t ang3 = 0*TMath::DegToRad();
1620 Double_t headWidth=0.25;
1621 Double_t smcLength=kStaveLength/chips-2*headWidth;//6.25;
1622 Double_t smcWidth=kStaveWidth;
1623 Double_t smcSide1Thick=0.03;
1624 Double_t vaporThick=0.032;
1625 Double_t liquidThick=0.028;
1626 Double_t smcSide2Thick=0.01;
1627 Double_t smcSide3Thick=0.0055;
1628 Double_t smcSide4Thick=0.0095;
1629 Double_t smcSide5Thick=0.0075;
1630 Double_t smcSpace=0.01;
1634 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
1636 // detailed structure ++++++++++++++
1637 Double_t z=0, y=0-0.007, x=0;
1639 // Polimide micro channels numbers
1640 Double_t yMC = y-h+0.01;
1641 Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
1642 Double_t xstaMC = (nb*0.1-0.08)/2;
1645 TGeoVolume *mechStavVol = 0;
1646 if (fBuildLevel < 5) {
1647 // world (trapezoid)
1648 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
1649 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
1650 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,staveHeight,0,-kConeOutRadius*2-0.07};
1651 mechStruct->DefinePolygon(5,xv,yv);
1652 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
1653 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
1654 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
1655 mechStavVol->SetLineColor(12);
1656 mechStavVol->SetFillColor(12);
1657 mechStavVol->SetVisibility(kTRUE);
1659 // Silicon micro channels numbers
1661 TGeoBBox *tM0a=new TGeoBBox(smcWidth/2, 0.003/2, headWidth/2);
1662 TGeoVolume *volTM0a=new TGeoVolume("microChanTop1", tM0a, medKapton);
1663 volTM0a->SetLineColor(35);
1664 volTM0a->SetFillColor(35);
1666 for(Int_t mo=1; mo<=chips; mo++) {
1667 mechStavVol->AddNode(volTM0a, 0, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));
1668 mechStavVol->AddNode(volTM0a, 1, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));
1670 TGeoBBox *tM0c=new TGeoBBox(0.3/2, 0.003/2,smcLength/2);
1671 TGeoVolume *volTM0c=new TGeoVolume("microChanTop2", tM0c, medKapton);
1672 volTM0c->SetLineColor(35);
1673 volTM0c->SetFillColor(35);
1674 for(Int_t mo=1; mo<=chips; mo++) {
1675 mechStavVol->AddNode(volTM0c, 0, new TGeoCombiTrans(x+(smcWidth/2)-(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));
1676 mechStavVol->AddNode(volTM0c, 1, new TGeoCombiTrans(x-(smcWidth/2)+(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1678 TGeoBBox *tM0c1=new TGeoBBox(0.2225/2, 0.003/2,smcLength/2);
1679 TGeoVolume *volTM0c1=new TGeoVolume("microChanBot1", tM0c1, medKapton);
1680 volTM0c1->SetLineColor(6);
1681 volTM0c1->SetFillColor(6);
1682 for(Int_t mo=1; mo<=chips; mo++) {
1683 mechStavVol->AddNode(volTM0c1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1684 mechStavVol->AddNode(volTM0c1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1686 TGeoBBox *tM0c2=new TGeoBBox(0.072/2, 0.003/2,smcLength/2);
1687 TGeoVolume *volTM0c2=new TGeoVolume("microChanBot2", tM0c2, medKapton);
1688 volTM0c2->SetLineColor(35);
1689 volTM0c2->SetFillColor(35);
1690 for(Int_t mo=1; mo<=chips; mo++) {
1691 mechStavVol->AddNode(volTM0c2, 0, new TGeoCombiTrans(x+smcWidth/2-(0.072/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1693 TGeoBBox *tM0c2r=new TGeoBBox(0.068/2, 0.003/2,smcLength/2);
1694 TGeoVolume *volTM0c2r=new TGeoVolume("microChanBot3", tM0c2r, medKapton);
1695 volTM0c2r->SetLineColor(35);
1696 volTM0c2r->SetFillColor(35);
1697 for(Int_t mo=1; mo<=chips; mo++) {
1698 mechStavVol->AddNode(volTM0c2r, 0, new TGeoCombiTrans(x-smcWidth/2+(0.068/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1700 TGeoBBox *tM0d=new TGeoBBox(smcSide1Thick/2, 0.035/2,smcLength/2);
1701 TGeoVolume *volTM0d=new TGeoVolume("microChanSide1", tM0d, medKapton);
1702 volTM0d->SetLineColor(12);
1703 volTM0d->SetFillColor(12);
1704 for(Int_t mo=1; mo<=chips; mo++) {
1705 mechStavVol->AddNode(volTM0d, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1706 mechStavVol->AddNode(volTM0d, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1709 TGeoBBox *tM0d1=new TGeoBBox(smcSide2Thick/2, 0.035/2,smcLength/2);
1710 TGeoVolume *volTM0d1=new TGeoVolume("microChanSide2", tM0d1, medKapton);
1711 volTM0d1->SetLineColor(12);
1712 volTM0d1->SetFillColor(12);
1713 for(Int_t mo=1; mo<=chips; mo++) {
1714 mechStavVol->AddNode(volTM0d1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1715 mechStavVol->AddNode(volTM0d1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1717 TGeoBBox *tM0d2=new TGeoBBox(smcSide3Thick/2, (hh+0.003)/2, smcLength/2);
1718 TGeoVolume *volTM0d2=new TGeoVolume("microChanSide3", tM0d2, medKapton);
1719 volTM0d2->SetLineColor(12);
1720 volTM0d2->SetFillColor(12);
1721 for(Int_t mo=1; mo<=chips; mo++) {
1722 mechStavVol->AddNode(volTM0d2, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1724 TGeoBBox *tM0d2r=new TGeoBBox(smcSide4Thick/2, (hh+0.003)/2, smcLength/2);
1725 TGeoVolume *volTM0d2r=new TGeoVolume("microChanSide4", tM0d2r, medKapton);
1726 volTM0d2r->SetLineColor(12);
1727 volTM0d2r->SetFillColor(12);
1728 for(Int_t mo=1; mo<=chips; mo++) {
1729 mechStavVol->AddNode(volTM0d2r, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1731 TGeoBBox *tM0e=new TGeoBBox(smcSide5Thick/2, hh/2,smcLength/2);
1732 TGeoVolume *volTM0e=new TGeoVolume("microChanSide5", tM0e, medKapton);
1733 volTM0e->SetLineColor(12);
1734 volTM0e->SetFillColor(12);
1735 for(Int_t mo=1; mo<=chips; mo++) {
1736 for (Int_t ie=0;ie<11;ie++) {
1737 mechStavVol->AddNode(volTM0e, 0, new TGeoCombiTrans(x-(ie*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace-(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1738 mechStavVol->AddNode(volTM0e, 1, new TGeoCombiTrans(x+(ie*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+smcSpace+(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1742 TGeoBBox *tM0f=new TGeoBBox(0.02/2, hh/2, smcLength/2);
1743 TGeoVolume *volTM0f=new TGeoVolume("microChanTop3", tM0f, medKapton);
1744 //Double_t smcChannels=12;
1745 Double_t smcCloseWallvapor=smcWidth/2-smcSide1Thick-vaporThick-smcSide2Thick-smcSide3Thick-12*smcSpace-11*smcSide5Thick;
1746 Double_t smcCloseWallliquid=smcWidth/2-smcSide1Thick-liquidThick-smcSide2Thick-smcSide4Thick-12*smcSpace-11*smcSide5Thick;
1747 volTM0f->SetLineColor(12);
1748 volTM0f->SetFillColor(12);
1749 for(Int_t mo=1; mo<=chips; mo++) {
1750 mechStavVol->AddNode(volTM0f, 0, new TGeoCombiTrans(x+smcCloseWallvapor-(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1751 mechStavVol->AddNode(volTM0f, 1, new TGeoCombiTrans(x-smcCloseWallliquid+(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1753 //Head(back) microchannel
1755 TGeoBBox *tM0hb=new TGeoBBox(smcWidth/2, 0.025/2, headWidth/2);
1756 TGeoVolume *volTM0hb=new TGeoVolume("microChanHeadBackBottom1", tM0hb, medKapton);
1757 volTM0hb->SetLineColor(4);
1758 volTM0hb->SetFillColor(4);
1759 for(Int_t mo=1; mo<=chips; mo++) {
1760 mechStavVol->AddNode(volTM0hb, 0, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1761 mechStavVol->AddNode(volTM0hb, 1, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1763 TGeoBBox *tM0h1=new TGeoBBox(smcWidth/2, 0.013/2, 0.05/2);
1764 TGeoVolume *volTM0h1=new TGeoVolume("microChanHeadBackBottom2", tM0h1, medKapton);
1765 volTM0h1->SetLineColor(5);
1766 volTM0h1->SetFillColor(5);
1767 for(Int_t mo=1; mo<=chips; mo++) {
1768 mechStavVol->AddNode(volTM0h1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-headWidth+(0.05/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1770 TGeoBBox *tM0h2=new TGeoBBox(smcWidth/2, 0.003/2, 0.18/2);
1771 TGeoVolume *volTM0h2=new TGeoVolume("microChanHeadBackBottom7", tM0h2, medKapton);
1772 volTM0h2->SetLineColor(6);
1773 volTM0h2->SetFillColor(6);
1774 for(Int_t mo=1; mo<=chips; mo++) {
1775 mechStavVol->AddNode(volTM0h2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-0.02-(0.18/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1777 TGeoBBox *tM0h3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
1778 TGeoVolume *volTM0h3=new TGeoVolume("microChanHeadBackBottom3", tM0h3, medKapton);
1779 volTM0h3->SetLineColor(5);
1780 volTM0h3->SetFillColor(5);
1781 for(Int_t mo=1; mo<=chips; mo++) {
1782 mechStavVol->AddNode(volTM0h3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1784 TGeoBBox *tM0b1=new TGeoBBox(smcWidth/2, 0.013/2, 0.03/2);
1785 TGeoVolume *volTM0b1=new TGeoVolume("microChanHeadBackBottom4", tM0b1, medKapton);
1786 volTM0b1->SetLineColor(5);
1787 volTM0b1->SetFillColor(5);
1788 for(Int_t mo=1; mo<=chips; mo++) {
1789 mechStavVol->AddNode(volTM0b1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+headWidth-(0.03/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1791 TGeoBBox *tM0b2=new TGeoBBox(smcWidth/2, 0.003/2, 0.2/2);
1792 TGeoVolume *volTM0b2=new TGeoVolume("microChanHeadBackBottom5", tM0b2, medKapton);
1793 volTM0b2->SetLineColor(6);
1794 volTM0b2->SetFillColor(6);
1795 for(Int_t mo=1; mo<=chips; mo++) {
1796 mechStavVol->AddNode(volTM0b2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+0.02+(0.2/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1798 TGeoBBox *tM0b3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
1799 TGeoVolume *volTM0b3=new TGeoVolume("microChanHeadBackBottom6", tM0b3, medKapton);
1800 volTM0b3->SetLineColor(5);
1801 volTM0b3->SetFillColor(5);
1802 for(Int_t mo=1; mo<=chips; mo++) {
1803 mechStavVol->AddNode(volTM0b3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1806 TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta);
1807 TGeoVolume *volTM0b=new TGeoVolume("microChanWalls", tM0b, medKapton);
1808 volTM0b->SetLineColor(35);
1809 volTM0b->SetFillColor(35);
1810 for (Int_t ib=0;ib<nb;ib++) {
1811 //mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
1816 if (fBuildLevel < 4) {
1818 //**********cooling inlet outlet
1820 TGeoBBox *tM0dv=new TGeoBBox(vaporThick/2, 0.035/2,smcLength/2);
1821 TGeoVolume *volTM0dv=new TGeoVolume("microChanVapor", tM0dv, medWater);
1822 volTM0dv->SetLineColor(2);
1823 volTM0dv->SetFillColor(2);
1824 for(Int_t mo=1; mo<=chips; mo++) {
1825 mechStavVol->AddNode(volTM0dv, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1827 TGeoBBox *tM0dl=new TGeoBBox(liquidThick/2, 0.035/2,smcLength/2);
1828 TGeoVolume *volTM0dl=new TGeoVolume("microChanLiquid", tM0dl, medWater);
1829 volTM0dl->SetLineColor(3);
1830 volTM0dl->SetFillColor(3);
1831 for(Int_t mo=1; mo<=chips; mo++) {
1832 mechStavVol->AddNode(volTM0dl, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1834 // small cooling fluid now using water wait for freeon value
1835 TGeoBBox *tM0dlq=new TGeoBBox(smcSpace/2, hh/2,smcLength/2);
1836 TGeoVolume *volTM0dlq=new TGeoVolume("smallLiquid", tM0dlq, medWater);
1837 volTM0dlq->SetLineColor(3);
1838 volTM0dlq->SetFillColor(3);
1839 TGeoBBox *tM0dvp=new TGeoBBox(smcSpace/2, hh/2,smcLength/2);
1840 TGeoVolume *volTM0dvp=new TGeoVolume("microChanVapor", tM0dvp, medWater);
1841 volTM0dvp->SetLineColor(2);
1842 volTM0dvp->SetFillColor(2);
1843 for(Int_t mo=1; mo<=chips; mo++) {
1844 for (Int_t is=0;is<12;is++) {
1845 mechStavVol->AddNode(volTM0dlq, 0, new TGeoCombiTrans(x+(is*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(vaporThick)+(smcSide2Thick)+(smcSide3Thick)+smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1846 mechStavVol->AddNode(volTM0dvp, 1, new TGeoCombiTrans(x-(is*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1854 if (fBuildLevel < 3) {
1856 //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length)
1858 Double_t filWidth = 0.04;
1859 Double_t filHeight= 0.02;
1860 TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,s1);
1861 TGeoVolume *volT1=new TGeoVolume("bottomFilament", t1, medM60J3K);
1862 volT1->SetLineColor(12);
1863 volT1->SetFillColor(12);
1864 for(int i=0;i<loop;i++){//i<30;i++){
1865 mechStavVol->AddNode(volT1,4*i+0,
1866 new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2,
1867 new TGeoRotation("volT1",-90,alpha,0)));
1868 mechStavVol->AddNode(volT1,4*i+1,
1869 new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2,
1870 new TGeoRotation("volT1",90,alpha,0)));
1871 mechStavVol->AddNode(volT1,4*i+2,
1872 new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1873 new TGeoRotation("volT1",-90,-alpha,0)));
1874 mechStavVol->AddNode(volT1,4*i+3,
1875 new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1876 new TGeoRotation("volT1",-90,+alpha,0)));
1879 // Top filament CERP black-12 Carbon structure TGeoBBox (length,thickness,width)
1881 TGeoBBox *t2=new TGeoBBox(s2,filHeight/2,filWidth/2);
1882 TGeoVolume *volT2=new TGeoVolume("topFilament", t2, medM60J3K);
1883 volT2->SetLineColor(12);
1884 volT2->SetFillColor(12);
1885 for(int i=0;i<loop;i++){ //i<30;i++){
1886 mechStavVol->AddNode(volT2,4*i+0,
1887 new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
1888 new TGeoRotation("volT2",90,90-alpha,90-beta)));
1889 mechStavVol->AddNode(volT2,4*i+1,
1890 new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
1891 new TGeoRotation("volT2",90,-90+alpha,-90+beta)));
1892 mechStavVol->AddNode(volT2,4*i+2,
1893 new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1894 new TGeoRotation("volT2",90,-90+alpha,90-beta)));
1895 mechStavVol->AddNode(volT2,4*i+3,
1896 new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1897 new TGeoRotation("volT2",90,90-alpha,-90+beta)));
1901 if (fBuildLevel < 2) {
1903 // Glue Filament and Silicon MicroChannel
1904 TGeoBBox *tM0=new TGeoBBox(xstaMC/5, klay4/2, zsta);
1905 TGeoVolume *volTM0=new TGeoVolume("glueFM", tM0,medGlue );
1906 volTM0->SetLineColor(5);
1907 volTM0->SetFillColor(5);
1908 mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x-xsta/2-0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
1909 mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x+xsta/2+0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
1912 // Glue microchannel and sensor
1913 TGeoBBox *glueM = new TGeoBBox(xstaMC/5, klay4/2, zsta);
1914 TGeoVolume *volGlueM=new TGeoVolume("glueMS", glueM, medGlue);
1915 volGlueM->SetLineColor(5);
1916 volGlueM->SetFillColor(5);
1917 mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x-xsta/2-0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
1918 mechStavVol->AddNode(volGlueM, 1, new TGeoCombiTrans(x+xsta/2+0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
1920 // Glue sensor and kapton
1921 TGeoBBox *glue = new TGeoBBox(xsta, klay4/2, zsta);
1922 TGeoVolume *volGlue=new TGeoVolume("glueSensorBus", glue, medGlue);
1923 volGlue->SetLineColor(5);
1924 volGlue->SetFillColor(5);
1925 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4/2, z, new TGeoRotation("",0, 0, 0)));
1928 if (fBuildLevel < 1) {
1929 TGeoBBox *kapCable = new TGeoBBox(xsta, klay5/2, zsta);
1930 TGeoVolume *volCable=new TGeoVolume("Flexcable", kapCable, medFlexCable);
1931 volCable->SetLineColor(28);
1932 volCable->SetFillColor(28);
1933 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4-klay5/2, z, new TGeoRotation("",0, 0, 0)));
1936 // Done, return the stave structur
1941 //________________________________________________________________________
1942 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB4(const Double_t xstave,
1943 const Double_t zstave,
1944 const TGeoManager *mgr){
1946 // Create the mechanical stave structure for Model 2.2 of TDR
1947 // Logic is similar to method CreateStaveModelInnerB22
1948 // but completely rewritten:
1949 // - code completely revised, made systematic and more similar to OB
1950 // - fix some inconsistencies (stave element sequence, empty space)
1951 // - use static const as parameters
1952 // - comply with latest (nov '14) C.Gargiulo data
1955 // xstave : stave X half length
1956 // zstave : stave Z half length
1957 // mgr : the GeoManager (used only to get the proper material)
1963 // Created: 04 Dec 2014 Mario Sitta
1968 Double_t layerHeight = 0.;
1970 Double_t rPipeMin = fgkIBCoolPipeInnerD/2;
1971 Double_t rPipeMax = rPipeMin + fgkIBCoolPipeThick;
1973 Double_t topFilTheta = fgkIBTopFilamentAlpha*TMath::DegToRad();
1974 Double_t topFilLProj = xstave/TMath::Sin(topFilTheta); // Top filament length projected on stave XZ plane
1975 Double_t topFilYLen = xstave/TMath::Tan(topFilTheta); // Filament length on Y
1976 Int_t nFilaments = (Int_t)(zstave/topFilYLen);
1977 // Question: would it be better to fix the number of filaments and
1978 // compute the angle alpha from it, or leave as it is now, i.e. fix the
1979 // filament inclination angle alpha and compute their number ?
1982 Double_t xv[nv], yv[nv]; // The stave container Xtru
1984 Double_t xpos, ypos, zpos, ylay;
1985 Double_t beta, gamma, theta;
1988 // First create all needed shapes
1989 TGeoBBox *kapCable = new TGeoBBox(xstave, fgkIBFlexCableKapThick/2, zstave);
1991 TGeoBBox *aluCable = new TGeoBBox(xstave, fgkIBFlexCableAlThick/2, zstave);
1993 TGeoBBox *glue = new TGeoBBox(xstave, fgkIBGlueThick/2, zstave);
1995 TGeoBBox *fleecbot = new TGeoBBox(xstave, fgkIBCarbonFleeceThick/2, zstave);
1997 TGeoBBox *cfplate = new TGeoBBox(xstave, fgkIBK13D2UThick/2, zstave);
1999 TGeoTube *pipe = new TGeoTube(rPipeMin, rPipeMax, zstave);
2001 TGeoTube *water = new TGeoTube(0., rPipeMin, zstave);
2003 TGeoTubeSeg *cpaptub = new TGeoTubeSeg(rPipeMax,
2004 rPipeMax + fgkIBCarbonPaperThick,
2007 TGeoBBox *cpapvert = new TGeoBBox(fgkIBCarbonPaperThick/2,
2008 pipe->GetRmax()/2, zstave);
2010 xlen = fgkIBCoolPipeXDist/2 - pipe->GetRmax() - fgkIBCarbonPaperThick;
2011 TGeoBBox *cpapmid = new TGeoBBox(xlen, fgkIBCarbonPaperThick/2, zstave);
2013 xlen = xstave -fgkIBCoolPipeXDist/2 -pipe->GetRmax() -fgkIBCarbonPaperThick;
2014 TGeoBBox *cpaplr = new TGeoBBox(xlen/2, fgkIBCarbonPaperThick/2, zstave);
2016 TGeoTubeSeg *fleecpipe = new TGeoTubeSeg(cpaptub->GetRmax(),
2017 cpaptub->GetRmax() + fgkIBCarbonFleeceThick,
2020 TGeoBBox *fleecvert = new TGeoBBox(fgkIBCarbonFleeceThick/2,
2021 (pipe->GetRmax()-fgkIBCarbonPaperThick)/2,
2024 xlen = fgkIBCoolPipeXDist/2 - pipe->GetRmax() - fgkIBCarbonPaperThick
2025 - fgkIBCarbonFleeceThick;
2026 TGeoBBox *fleecmid = new TGeoBBox(xlen, fgkIBCarbonFleeceThick/2, zstave);
2028 xlen = xstave - fgkIBCoolPipeXDist/2 - pipe->GetRmax()
2029 - fgkIBCarbonPaperThick - fgkIBCarbonFleeceThick;
2030 TGeoBBox *fleeclr = new TGeoBBox(xlen/2, fgkIBCarbonFleeceThick/2, zstave);
2032 // The spaceframe structure
2033 TGeoTrd1 *topv = new TGeoTrd1(0, fgkIBTopVertexWidth/2, zstave,
2034 fgkIBTopVertexHeight/2);
2036 TGeoTrd1 *sidev = new TGeoTrd1(0, fgkIBSideVertexWidth/2, zstave,
2037 fgkIBSideVertexHeight/2);
2039 TGeoBBox *topfil = new TGeoBBox(fgkIBTopFilamentLength/2,
2040 fgkIBTopFilamentSide/2,
2041 fgkIBTopFilamentSide/2);
2043 // The half stave container (an XTru to avoid overlaps between neighbours)
2044 beta = TMath::ATan(2*sidev->GetDz()/sidev->GetDx2());
2045 gamma = TMath::PiOver2() - beta;
2047 layerHeight = 2*( kapCable->GetDY() + aluCable->GetDY() + glue->GetDY()
2048 + fleecbot->GetDY() + cfplate->GetDY() + cpaplr->GetDY()
2049 + fleeclr->GetDY() );
2054 yv[1] = layerHeight + fgkIBSideVertexHeight;
2055 xv[2] = fgkIBTopVertexWidth/2;
2056 yv[2] = fgkIBStaveHeight + 2*topfil->GetDZ();
2057 for (Int_t i = 0; i<nv/2; i++) {
2062 TGeoXtru *mechStruct = new TGeoXtru(2);
2063 mechStruct->DefinePolygon(nv, xv, yv);
2064 mechStruct->DefineSection(0,-zstave-topfil->GetDY());
2065 mechStruct->DefineSection(1, zstave+topfil->GetDY());
2068 // We have all shapes: now create the real volumes
2070 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
2071 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
2072 TGeoMedium *medM55J6K = mgr->GetMedium("ITS_M55J6K$");
2073 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
2074 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
2075 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
2076 TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
2077 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
2078 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
2079 TGeoMedium *medAluminum = mgr->GetMedium("ITS_ALUMINUM$");
2083 snprintf(volname, 30, "%s%d_StaveStruct",
2084 AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
2085 TGeoVolume *mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
2086 mechStavVol->SetLineColor(12);
2087 mechStavVol->SetFillColor(12);
2088 mechStavVol->SetVisibility(kTRUE);
2090 TGeoVolume *kapCableVol = new TGeoVolume("FPCKapton", kapCable, medKapton);
2091 kapCableVol->SetLineColor(kBlue);
2092 kapCableVol->SetFillColor(kBlue);
2094 TGeoVolume *aluCableVol = new TGeoVolume("FPCAluminum",
2095 aluCable, medAluminum);
2096 aluCableVol->SetLineColor(kCyan);
2097 aluCableVol->SetFillColor(kCyan);
2099 TGeoVolume *glueVol = new TGeoVolume("Glue", glue, medGlue);
2100 glueVol->SetLineColor(kBlack);
2101 glueVol->SetFillColor(kBlack);
2103 TGeoVolume *fleecbotVol = new TGeoVolume("CarbonFleeceBottom",
2104 fleecbot, medCarbonFleece);
2105 fleecbotVol->SetFillColor(kViolet);
2106 fleecbotVol->SetLineColor(kViolet);
2108 TGeoVolume *cfplateVol = new TGeoVolume("CFPlate", cfplate, medK13D2U2k);
2109 cfplateVol->SetFillColor(5); // Yellow
2110 cfplateVol->SetLineColor(5);
2112 TGeoVolume *pipeVol = new TGeoVolume("PolyimidePipe", pipe, medKapton);
2113 pipeVol->SetFillColor(35); // Blue shade
2114 pipeVol->SetLineColor(35);
2116 TGeoVolume *waterVol= new TGeoVolume("Water", water, medWater);
2117 waterVol->SetFillColor(4); // Bright blue
2118 waterVol->SetLineColor(4);
2120 TGeoVolume *cpaptubVol = new TGeoVolume("ThermasolPipeCover",
2121 cpaptub, medFGS003);
2122 cpaptubVol->SetFillColor(2); // Red
2123 cpaptubVol->SetLineColor(2);
2125 TGeoVolume *cpapvertVol = new TGeoVolume("ThermasolVertical",
2126 cpapvert, medFGS003);
2127 cpapvertVol->SetFillColor(2); // Red
2128 cpapvertVol->SetLineColor(2);
2130 TGeoVolume *cpapmidVol = new TGeoVolume("ThermasolMiddle",
2131 cpapmid, medFGS003);
2132 cpapmidVol->SetFillColor(2); // Red
2133 cpapmidVol->SetLineColor(2);
2135 TGeoVolume *cpaplrVol = new TGeoVolume("ThermasolLeftRight",
2137 cpaplrVol->SetFillColor(2); // Red
2138 cpaplrVol->SetLineColor(2);
2140 TGeoVolume *fleecpipeVol = new TGeoVolume("CarbonFleecePipeCover",
2141 fleecpipe, medCarbonFleece);
2142 fleecpipeVol->SetFillColor(28); // Brown shade
2143 fleecpipeVol->SetLineColor(28);
2145 TGeoVolume *fleecvertVol = new TGeoVolume("CarbonFleeceVertical",
2146 fleecvert, medCarbonFleece);
2147 fleecvertVol->SetFillColor(28); // Brown shade
2148 fleecvertVol->SetLineColor(28);
2150 TGeoVolume *fleecmidVol = new TGeoVolume("CarbonFleeceMiddle",
2151 fleecmid, medCarbonFleece);
2152 fleecmidVol->SetFillColor(28); // Brown shade
2153 fleecmidVol->SetLineColor(28);
2155 TGeoVolume *fleeclrVol = new TGeoVolume("CarbonFleeceLeftRight",
2156 fleeclr, medCarbonFleece);
2157 fleeclrVol->SetFillColor(28); // Brown shade
2158 fleeclrVol->SetLineColor(28);
2160 TGeoVolume *topvVol = new TGeoVolume("TopVertex", topv, medM55J6K);
2161 topvVol->SetFillColor(12); // Gray shade
2162 topvVol->SetLineColor(12);
2164 TGeoVolume *sidevVol = new TGeoVolume("SideVertex", sidev, medM55J6K);
2165 sidevVol->SetFillColor(12); // Gray shade
2166 sidevVol->SetLineColor(12);
2168 TGeoVolume *topfilVol = new TGeoVolume("TopFilament", topfil, medM60J3K);
2169 topfilVol->SetFillColor(12); // Gray shade
2170 topfilVol->SetLineColor(12);
2173 // Now build up the half stave
2174 ypos = kapCable->GetDY();
2175 if (fBuildLevel < 4) // Kapton
2176 mechStavVol->AddNode(kapCableVol, 1, new TGeoTranslation(0, ypos, 0));
2178 ypos += (kapCable->GetDY() + aluCable->GetDY());
2179 if (fBuildLevel < 1) // Aluminum
2180 mechStavVol->AddNode(aluCableVol, 1, new TGeoTranslation(0, ypos, 0));
2182 ypos += (aluCable->GetDY() + glue->GetDY());
2183 if (fBuildLevel < 2) // Glue
2184 mechStavVol->AddNode(glueVol, 1, new TGeoTranslation(0, ypos, 0));
2186 ypos += (glue->GetDY() + fleecbot->GetDY());
2187 if (fBuildLevel < 5) // Carbon
2188 mechStavVol->AddNode(fleecbotVol, 1, new TGeoTranslation(0, ypos, 0));
2190 ypos += (fleecbot->GetDY() + cfplate->GetDY());
2191 if (fBuildLevel < 5) // Carbon
2192 mechStavVol->AddNode(cfplateVol, 1, new TGeoTranslation(0, ypos, 0));
2194 ylay = ypos + cfplate->GetDY(); // The level where tubes etc. lay
2196 xpos = fgkIBCoolPipeXDist/2;
2197 ypos = ylay + pipe->GetRmax();
2198 if (fBuildLevel < 4) { // Kapton
2199 mechStavVol->AddNode(pipeVol, 1, new TGeoTranslation(-xpos, ypos, 0));
2200 mechStavVol->AddNode(pipeVol, 2, new TGeoTranslation( xpos, ypos, 0));
2203 if (fBuildLevel < 3) { // Water
2204 mechStavVol->AddNode(waterVol, 1, new TGeoTranslation(-xpos, ypos, 0));
2205 mechStavVol->AddNode(waterVol, 2, new TGeoTranslation( xpos, ypos, 0));
2208 if (fBuildLevel < 5) { // Carbon (stave components)
2209 mechStavVol->AddNode(cpaptubVol, 1, new TGeoTranslation(-xpos, ypos, 0));
2210 mechStavVol->AddNode(cpaptubVol, 2, new TGeoTranslation( xpos, ypos, 0));
2212 mechStavVol->AddNode(fleecpipeVol,1, new TGeoTranslation(-xpos, ypos, 0));
2213 mechStavVol->AddNode(fleecpipeVol,2, new TGeoTranslation( xpos, ypos, 0));
2215 xpos = fgkIBCoolPipeXDist/2 - pipe->GetRmax() - cpapvert->GetDX();
2216 ypos = ylay + cpapvert->GetDY();
2217 mechStavVol->AddNode(cpapvertVol, 1, new TGeoTranslation(-xpos, ypos, 0));
2218 mechStavVol->AddNode(cpapvertVol, 2, new TGeoTranslation( xpos, ypos, 0));
2220 xpos = fgkIBCoolPipeXDist/2 + pipe->GetRmax() + cpapvert->GetDX();
2221 mechStavVol->AddNode(cpapvertVol, 3, new TGeoTranslation(-xpos, ypos, 0));
2222 mechStavVol->AddNode(cpapvertVol, 4, new TGeoTranslation( xpos, ypos, 0));
2224 ypos = ylay + fgkIBCarbonPaperThick/2;
2225 mechStavVol->AddNode(cpapmidVol, 1, new TGeoTranslation(0, ypos, 0));
2227 xpos = xstave - cpaplr->GetDX();
2228 mechStavVol->AddNode(cpaplrVol, 1, new TGeoTranslation(-xpos, ypos, 0));
2229 mechStavVol->AddNode(cpaplrVol, 2, new TGeoTranslation( xpos, ypos, 0));
2231 xpos = fgkIBCoolPipeXDist/2 - pipe->GetRmax() - 2*cpapvert->GetDX()
2232 - fleecvert->GetDX();
2233 ypos = ylay + fgkIBCarbonPaperThick + fleecvert->GetDY();
2234 mechStavVol->AddNode(fleecvertVol, 1, new TGeoTranslation(-xpos, ypos, 0));
2235 mechStavVol->AddNode(fleecvertVol, 2, new TGeoTranslation( xpos, ypos, 0));
2237 xpos = fgkIBCoolPipeXDist/2 + pipe->GetRmax() + 2*cpapvert->GetDX()
2238 + fleecvert->GetDX();
2239 mechStavVol->AddNode(fleecvertVol, 3, new TGeoTranslation(-xpos, ypos, 0));
2240 mechStavVol->AddNode(fleecvertVol, 4, new TGeoTranslation( xpos, ypos, 0));
2242 ypos = ylay + fgkIBCarbonPaperThick + fgkIBCarbonFleeceThick/2;
2243 mechStavVol->AddNode(fleecmidVol, 1, new TGeoTranslation(0, ypos, 0));
2245 xpos = xstave - fleeclr->GetDX();
2246 mechStavVol->AddNode(fleeclrVol, 1, new TGeoTranslation(-xpos, ypos, 0));
2247 mechStavVol->AddNode(fleeclrVol, 2, new TGeoTranslation( xpos, ypos, 0));
2250 ylay += (fgkIBCarbonPaperThick + fgkIBCarbonFleeceThick);
2252 if (fBuildLevel < 5) { // Carbon (spaceframe)
2253 ypos = fgkIBStaveHeight - topv->GetDz(); // Due to rotation, z is on Y
2254 mechStavVol->AddNode(topvVol, 1,
2255 new TGeoCombiTrans(0, ypos, 0,
2256 new TGeoRotation("",0,-90,0)));
2258 // beta and gamma were already computed when building mechStruct shape
2259 xpos = xstave - TMath::Cos(gamma)*sidev->GetDz();
2260 ypos = ylay + TMath::Sin(gamma)*sidev->GetDz();
2261 beta *= TMath::RadToDeg(); // beta was rad, we need deg
2263 mechStavVol->AddNode(sidevVol, 1,
2264 new TGeoCombiTrans(-xpos, ypos, 0,
2265 new TGeoRotation("", 180-beta,90,0)));
2266 mechStavVol->AddNode(sidevVol, 2,
2267 new TGeoCombiTrans( xpos, ypos, 0,
2268 new TGeoRotation("",-180+beta,90,0)));
2270 gamma *= TMath::RadToDeg(); // gamma was rad, we need deg
2271 theta = 90. - fgkIBTopFilamentAlpha;
2272 xpos = xstave/2 + topfil->GetDZ();
2273 ypos = ( layerHeight + fgkIBStaveHeight )/2 +
2274 fgkIBSideVertexWidth*TMath::Sin(beta*TMath::DegToRad())/2 ;
2275 for(int i=0; i<nFilaments; i++){ // i<28 (?)
2276 // 1) Front Left Top Filament
2277 zpos = -zstave + (i*2*topFilYLen) + topFilLProj/4; // ?????
2278 mechStavVol->AddNode(topfilVol, i*4+1,
2279 new TGeoCombiTrans( xpos, ypos, zpos,
2280 new TGeoRotation("", 90, theta, 90-gamma)));
2281 // 2) Front Right Top Filament
2282 mechStavVol->AddNode(topfilVol, i*4+2,
2283 new TGeoCombiTrans(-xpos, ypos, zpos,
2284 new TGeoRotation("", 90,-theta,-90+gamma)));
2285 // 3) Back Left Top Filament
2287 mechStavVol->AddNode(topfilVol, i*4+3,
2288 new TGeoCombiTrans( xpos, ypos, zpos,
2289 new TGeoRotation("", 90,-theta, 90-gamma)));
2290 // 4) Back Right Top Filament
2291 mechStavVol->AddNode(topfilVol, i*4+4,
2292 new TGeoCombiTrans(-xpos, ypos, zpos,
2293 new TGeoRotation("", 90, theta,-90+gamma)));
2298 // Done, return the stave structure
2302 //________________________________________________________________________
2303 TGeoVolume* AliITSUv1Layer::CreateStaveOuterB(const TGeoManager *mgr){
2305 // Create the chip stave for the Outer Barrel
2308 // mgr : the GeoManager (used only to get the proper material)
2314 // Created: 20 Dec 2013 Mario Sitta
2315 // Updated: 12 Mar 2014 Mario Sitta
2318 TGeoVolume *mechStavVol = 0;
2320 switch (fStaveModel) {
2321 case AliITSUv1::kOBModelDummy:
2322 mechStavVol = CreateStaveModelOuterBDummy(mgr);
2324 case AliITSUv1::kOBModel0:
2325 mechStavVol = CreateStaveModelOuterB0(mgr);
2327 case AliITSUv1::kOBModel1:
2328 case AliITSUv1::kOBModel2:
2329 mechStavVol = CreateStaveModelOuterB12(mgr);
2332 AliFatal(Form("Unknown stave model %d",fStaveModel));
2339 //________________________________________________________________________
2340 TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterBDummy(const TGeoManager *) const {
2342 // Create dummy stave
2345 // mgr : the GeoManager (used only to get the proper material)
2351 // Created: 20 Dec 2013 Mario Sitta
2355 // Done, return the stave structure
2359 //________________________________________________________________________
2360 TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB0(const TGeoManager *mgr){
2362 // Creation of the mechanical stave structure for the Outer Barrel as in v0
2363 // (we fake the module and halfstave volumes to have always
2364 // the same formal geometry hierarchy)
2367 // mgr : the GeoManager (used only to get the proper material)
2373 // Created: 20 Dec 2013 Mario Sitta
2374 // Updated: 12 Mar 2014 Mario Sitta
2378 Double_t xmod, ymod, zmod;
2379 Double_t xlen, ylen, zlen;
2380 Double_t ypos, zpos;
2383 // First create all needed shapes
2386 xlen = fgkOBHalfStaveWidth;
2387 ylen = 0.5*fChipThick;
2388 zlen = fgkOBModuleZLength/2;
2390 TGeoVolume *chipVol = CreateChipInnerB(xlen, ylen, zlen);
2392 xmod = ((TGeoBBox*)chipVol->GetShape())->GetDX();
2393 ymod = ((TGeoBBox*)chipVol->GetShape())->GetDY();
2394 zmod = ((TGeoBBox*)chipVol->GetShape())->GetDZ();
2396 TGeoBBox *module = new TGeoBBox(xmod, ymod, zmod);
2398 zlen = fgkOBModuleZLength*fNModules;
2399 TGeoBBox *hstave = new TGeoBBox(xlen, ylen, zlen/2);
2402 // We have all shapes: now create the real volumes
2404 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
2406 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber);
2407 TGeoVolume *modVol = new TGeoVolume(volname, module, medAir);
2408 modVol->SetVisibility(kTRUE);
2410 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber);
2411 TGeoVolume *hstaveVol = new TGeoVolume(volname, hstave, medAir);
2414 // Finally build it up
2415 modVol->AddNode(chipVol, 0);
2416 fHierarchy[kChip]=1;
2418 for (Int_t j=0; j<fNModules; j++) {
2419 ypos = 0.021; // Remove small overlap - M.S: 21may13
2420 zpos = -hstave->GetDZ() + j*2*zmod + zmod;
2421 hstaveVol->AddNode(modVol, j, new TGeoTranslation(0, ypos, zpos));
2422 fHierarchy[kModule]++;
2426 // Done, return the stave structure
2430 //________________________________________________________________________
2431 TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB12(const TGeoManager *mgr){
2433 // Create the mechanical half stave structure
2434 // for the Outer Barrel as in TDR
2437 // mgr : the GeoManager (used only to get the proper material)
2443 // Created: 20 Nov 2013 Anastasia Barbano
2444 // Updated: 16 Jan 2014 Mario Sitta
2445 // Updated: 24 Feb 2014 Mario Sitta
2446 // Updated: 11 Nov 2014 Mario Sitta Model2
2447 // Updated: 03 Dec 2014 Mario Sitta Revised with C.Gargiulo latest infos
2452 Double_t yFlex1 = fgkOBFlexCableAlThick;
2453 Double_t yFlex2 = fgkOBFlexCableKapThick;
2454 Double_t flexOverlap = 5; // to be checked - unused for the time being
2455 Double_t xHalfSt = fgkOBHalfStaveWidth/2;
2456 Double_t yCFleece = fgkOBCarbonFleeceThick;
2457 Double_t yGraph = fgkOBGraphiteFoilThick;
2459 Double_t ymod, zmod;
2460 Double_t xtru[12], ytru[12];
2461 Double_t xpos, ypos, ypos1, zpos/*, zpos5cm*/;
2462 Double_t xlen, ylen, zlen;
2465 Double_t rCoolMin, rCoolMax;
2466 if (fStaveModel == AliITSUv1::kOBModel1)
2467 rCoolMin = fgkOBCoolTubeInnerDM1/2;
2469 rCoolMin = fgkOBCoolTubeInnerD/2;
2471 rCoolMax = rCoolMin + fgkOBCoolTubeThick;
2473 zlen = (fNModules*fgkOBModuleZLength + (fNModules-1)*fgkOBModuleGap)/2;
2476 // First create all needed shapes
2478 TGeoVolume *moduleVol = CreateModuleOuterB();
2479 moduleVol->SetVisibility(kTRUE);
2480 ymod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDY();
2481 zmod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDZ();
2483 TGeoBBox *busAl = new TGeoBBox("BusAl", xHalfSt, fgkOBBusCableAlThick/2,
2485 TGeoBBox *busKap = new TGeoBBox("BusKap", xHalfSt, fgkOBBusCableKapThick/2,
2488 TGeoBBox *glue = new TGeoBBox("Glue", xHalfSt, fgkOBGlueThick/2, zlen);
2490 TGeoBBox *coldPlate = new TGeoBBox("ColdPlate", fgkOBHalfStaveWidth/2,
2491 fgkOBColdPlateThick/2, zlen);
2493 TGeoBBox *fleeccent = new TGeoBBox("FleeceCent", xHalfSt,
2496 TGeoTube *coolTube = new TGeoTube("CoolingTube", rCoolMin, rCoolMax, zlen);
2497 TGeoTube *coolWater = new TGeoTube("CoolingWater", 0., rCoolMin, zlen);
2499 xlen = xHalfSt - fgkOBCoolTubeXDist/2 - coolTube->GetRmax();
2500 TGeoBBox *graphlat = new TGeoBBox("GraphLateral", xlen/2, yGraph/2, zlen);
2502 xlen = fgkOBCoolTubeXDist/2 - coolTube->GetRmax();
2503 TGeoBBox *graphmid = new TGeoBBox("GraphMiddle", xlen, yGraph/2, zlen);
2505 ylen = coolTube->GetRmax() - yGraph;
2506 TGeoBBox *graphvert = new TGeoBBox("GraphVertical", yGraph/2, ylen/2, zlen);
2508 TGeoTubeSeg *graphtub = new TGeoTubeSeg("GraphTube", rCoolMax,
2509 rCoolMax+yGraph, zlen,
2512 xlen = xHalfSt - fgkOBCoolTubeXDist/2 - coolTube->GetRmax() - yGraph;
2513 TGeoBBox *fleeclat = new TGeoBBox("FleecLateral", xlen/2, yCFleece/2, zlen);
2515 xlen = fgkOBCoolTubeXDist/2 - coolTube->GetRmax() - yGraph;
2516 TGeoBBox *fleecmid = new TGeoBBox("FleecMiddle", xlen, yCFleece/2, zlen);
2518 ylen = coolTube->GetRmax() - yGraph - yCFleece;
2519 TGeoBBox *fleecvert = new TGeoBBox("FleecVertical", yCFleece/2, ylen/2,
2522 TGeoTubeSeg *fleectub = new TGeoTubeSeg("FleecTube", rCoolMax+yGraph,
2523 rCoolMax+yCFleece+yGraph,
2526 TGeoBBox *flex1_5cm = new TGeoBBox("Flex1MV_5cm",xHalfSt,yFlex1/2,flexOverlap/2);
2527 TGeoBBox *flex2_5cm = new TGeoBBox("Flex2MV_5cm",xHalfSt,yFlex2/2,flexOverlap/2);
2529 // The half stave container (an XTru to avoid overlaps between neightbours)
2530 ylen = ymod + busAl->GetDY() + busKap->GetDY() + coldPlate->GetDY()
2531 + fleeccent->GetDY() + graphlat->GetDY() + fleeclat->GetDY();
2532 if (fStaveModel == AliITSUv1::kOBModel2)
2533 ylen += 2*glue->GetDY();
2539 xtru[2] = fgkOBCoolTubeXDist/2 + fleectub->GetRmax();
2542 ytru[3] = ytru[2] - (coolTube->GetRmax() + fleectub->GetRmax());
2543 xtru[4] = fgkOBCoolTubeXDist/2 - fleectub->GetRmax();
2547 for (Int_t i = 0; i<6; i++) {
2548 xtru[6+i] = -xtru[5-i];
2549 ytru[6+i] = ytru[5-i];
2551 TGeoXtru *halfStave = new TGeoXtru(2);
2552 halfStave->DefinePolygon(12, xtru, ytru);
2553 halfStave->DefineSection(0,-fZLength/2);
2554 halfStave->DefineSection(1, fZLength/2);
2557 // We have all shapes: now create the real volumes
2559 TGeoMedium *medAluminum = mgr->GetMedium("ITS_ALUMINUM$");
2560 TGeoMedium *medK13D2U120 = mgr->GetMedium("ITS_K13D2U120$");
2561 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
2562 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
2563 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
2564 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); //amec thermasol
2565 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
2566 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
2569 TGeoVolume *busAlVol = new TGeoVolume("PowerBusAlVol", busAl , medAluminum);
2570 busAlVol->SetLineColor(kCyan);
2571 busAlVol->SetFillColor(busAlVol->GetLineColor());
2572 busAlVol->SetFillStyle(4000); // 0% transparent
2574 TGeoVolume *busKapVol = new TGeoVolume("PowerBusKapVol", busKap, medKapton);
2575 busKapVol->SetLineColor(kBlue);
2576 busKapVol->SetFillColor(busKapVol->GetLineColor());
2577 busKapVol->SetFillStyle(4000); // 0% transparent
2579 TGeoVolume *coldPlateVol = new TGeoVolume("ColdPlateVol",
2580 coldPlate, medK13D2U120);
2581 coldPlateVol->SetLineColor(kYellow-3);
2582 coldPlateVol->SetFillColor(coldPlateVol->GetLineColor());
2583 coldPlateVol->SetFillStyle(4000); // 0% transparent
2585 TGeoVolume *fleeccentVol = new TGeoVolume("CarbonFleeceCentral",
2586 fleeccent, medCarbonFleece);
2587 fleeccentVol->SetLineColor(kViolet);
2588 fleeccentVol->SetFillColor(fleeccentVol->GetLineColor());
2589 fleeccentVol->SetFillStyle(4000); // 0% transparent
2591 TGeoVolume *glueVol = new TGeoVolume("GlueVol", glue, medGlue);
2592 glueVol->SetLineColor(kBlack);
2593 glueVol->SetFillColor(glueVol->GetLineColor());
2594 glueVol->SetFillStyle(4000); // 0% transparent
2596 TGeoVolume *coolTubeVol = new TGeoVolume("CoolingTubeVol",
2597 coolTube, medKapton);
2598 coolTubeVol->SetLineColor(kGray);
2599 coolTubeVol->SetFillColor(coolTubeVol->GetLineColor());
2600 coolTubeVol->SetFillStyle(4000); // 0% transparent
2602 TGeoVolume *coolWaterVol;
2603 coolWaterVol = new TGeoVolume("CoolingWaterVol", coolWater, medWater);
2604 coolWaterVol->SetLineColor(kBlue);
2605 coolWaterVol->SetFillColor(coolWaterVol->GetLineColor());
2606 coolWaterVol->SetFillStyle(4000); // 0% transparent
2608 TGeoVolume *graphlatVol = new TGeoVolume("GraphiteFoilLateral",
2609 graphlat, medFGS003);
2610 graphlatVol->SetLineColor(kGreen);
2611 graphlatVol->SetFillColor(graphlatVol->GetLineColor());
2612 graphlatVol->SetFillStyle(4000); // 0% transparent
2614 TGeoVolume *graphmidVol = new TGeoVolume("GraphiteFoilMiddle",
2615 graphmid, medFGS003);
2616 graphmidVol->SetLineColor(kGreen);
2617 graphmidVol->SetFillColor(graphmidVol->GetLineColor());
2618 graphmidVol->SetFillStyle(4000); // 0% transparent
2620 TGeoVolume *graphvertVol = new TGeoVolume("GraphiteFoilVertical",
2621 graphvert, medFGS003);
2622 graphvertVol->SetLineColor(kGreen);
2623 graphvertVol->SetFillColor(graphvertVol->GetLineColor());
2624 graphvertVol->SetFillStyle(4000); // 0% transparent
2626 TGeoVolume *graphtubVol = new TGeoVolume("GraphiteFoilPipeCover",
2627 graphtub, medFGS003);
2628 graphtubVol->SetLineColor(kGreen);
2629 graphtubVol->SetFillColor(graphtubVol->GetLineColor());
2630 graphtubVol->SetFillStyle(4000); // 0% transparent
2632 TGeoVolume *fleeclatVol = new TGeoVolume("CarbonFleeceLateral",
2633 fleeclat, medCarbonFleece);
2634 fleeclatVol->SetLineColor(kViolet);
2635 fleeclatVol->SetFillColor(fleeclatVol->GetLineColor());
2636 fleeclatVol->SetFillStyle(4000); // 0% transparent
2638 TGeoVolume *fleecmidVol = new TGeoVolume("CarbonFleeceMiddle",
2639 fleecmid, medCarbonFleece);
2640 fleecmidVol->SetLineColor(kViolet);
2641 fleecmidVol->SetFillColor(fleecmidVol->GetLineColor());
2642 fleecmidVol->SetFillStyle(4000); // 0% transparent
2644 TGeoVolume *fleecvertVol = new TGeoVolume("CarbonFleeceVertical",
2645 fleecvert, medCarbonFleece);
2646 fleecvertVol->SetLineColor(kViolet);
2647 fleecvertVol->SetFillColor(fleecvertVol->GetLineColor());
2648 fleecvertVol->SetFillStyle(4000); // 0% transparent
2650 TGeoVolume *fleectubVol = new TGeoVolume("CarbonFleecePipeCover",
2651 fleectub, medCarbonFleece);
2652 fleectubVol->SetLineColor(kViolet);
2653 fleectubVol->SetFillColor(fleectubVol->GetLineColor());
2654 fleectubVol->SetFillStyle(4000); // 0% transparent
2656 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber);
2657 TGeoVolume *halfStaveVol = new TGeoVolume(volname, halfStave, medAir);
2658 // halfStaveVol->SetLineColor(12);
2659 // halfStaveVol->SetFillColor(12);
2660 // halfStaveVol->SetVisibility(kTRUE);
2663 TGeoVolume *flex1_5cmVol = new TGeoVolume("Flex1Vol5cm",flex1_5cm,medAluminum);
2664 TGeoVolume *flex2_5cmVol = new TGeoVolume("Flex2Vol5cm",flex2_5cm,medKapton);
2667 flex1_5cmVol->SetLineColor(kRed);
2668 flex2_5cmVol->SetLineColor(kGreen);
2671 // Now build up the half stave
2672 ypos = - busKap->GetDY();
2673 if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 4) || // Kapton
2674 (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 5) )
2675 halfStaveVol->AddNode(busKapVol, 1, new TGeoTranslation(0, ypos, 0));
2677 ypos -= (busKap->GetDY() + busAl->GetDY());
2678 if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 1) || // Aluminum
2679 (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 2) )
2680 halfStaveVol->AddNode(busAlVol, 1, new TGeoTranslation(0, ypos, 0));
2682 ypos -= busAl->GetDY();
2684 if (fStaveModel == AliITSUv1::kOBModel2) {
2685 ypos -= glue->GetDY();
2686 if (fBuildLevel < 3) // Glue
2687 halfStaveVol->AddNode(glueVol, 1, new TGeoTranslation(0, ypos, 0));
2688 ypos -= glue->GetDY();
2692 for (Int_t j=0; j<fNModules; j++) {
2693 zpos = -zlen + j*(2*zmod + fgkOBModuleGap) + zmod;
2694 halfStaveVol->AddNode(moduleVol, j, new TGeoTranslation(0, ypos, zpos));
2695 fHierarchy[kModule]++;
2700 if (fStaveModel == AliITSUv1::kOBModel2) {
2701 ypos -= glue->GetDY();
2702 if (fBuildLevel < 3) // Glue
2703 halfStaveVol->AddNode(glueVol, 2, new TGeoTranslation(0, ypos, 0));
2704 ypos -= glue->GetDY();
2707 ypos -= fleeccent->GetDY();
2708 if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon
2709 (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) )
2710 halfStaveVol->AddNode(fleeccentVol, 1, new TGeoTranslation(0, ypos, 0));
2711 ypos -= fleeccent->GetDY();
2713 ypos -= coldPlate->GetDY();
2714 if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon
2715 (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) )
2716 halfStaveVol->AddNode(coldPlateVol, 1, new TGeoTranslation(0, ypos, 0));
2718 xpos = fgkOBCoolTubeXDist/2;
2719 ypos1 = ypos - (coldPlate->GetDY() + coolTube->GetRmax());
2720 if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 3) || // Water
2721 (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 4) ) {
2722 halfStaveVol->AddNode(coolWaterVol, 1, new TGeoTranslation(-xpos, ypos1, 0));
2723 halfStaveVol->AddNode(coolWaterVol, 2, new TGeoTranslation( xpos, ypos1, 0));
2726 if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 4) || // Kapton
2727 (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 5) ) {
2728 halfStaveVol->AddNode(coolTubeVol,1, new TGeoTranslation(-xpos, ypos1, 0));
2729 halfStaveVol->AddNode(coolTubeVol,2, new TGeoTranslation( xpos, ypos1, 0));
2732 if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon
2733 (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) {
2734 halfStaveVol->AddNode(graphtubVol,1, new TGeoTranslation(-xpos, ypos1, 0));
2735 halfStaveVol->AddNode(graphtubVol,2, new TGeoTranslation( xpos, ypos1, 0));
2737 halfStaveVol->AddNode(fleectubVol,1, new TGeoTranslation(-xpos, ypos1, 0));
2738 halfStaveVol->AddNode(fleectubVol,2, new TGeoTranslation( xpos, ypos1, 0));
2741 xpos = xHalfSt - graphlat->GetDX();
2742 ypos1 = ypos - (coldPlate->GetDY() + graphlat->GetDY());
2743 if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon
2744 (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) {
2745 halfStaveVol->AddNode(graphlatVol,1, new TGeoTranslation(-xpos, ypos1, 0));
2746 halfStaveVol->AddNode(graphlatVol,2, new TGeoTranslation( xpos, ypos1, 0));
2748 halfStaveVol->AddNode(graphmidVol,1, new TGeoTranslation(0, ypos1, 0));
2750 xpos = xHalfSt - 2*graphlat->GetDX() + graphvert->GetDX();
2751 ypos1 = ypos - (coldPlate->GetDY()+2*graphlat->GetDY()+graphvert->GetDY());
2752 halfStaveVol->AddNode(graphvertVol,1,new TGeoTranslation(-xpos, ypos1, 0));
2753 halfStaveVol->AddNode(graphvertVol,2,new TGeoTranslation( xpos, ypos1, 0));
2754 xpos = graphmid->GetDX() - graphvert->GetDX();
2755 halfStaveVol->AddNode(graphvertVol,3,new TGeoTranslation(-xpos, ypos1, 0));
2756 halfStaveVol->AddNode(graphvertVol,4,new TGeoTranslation( xpos, ypos1, 0));
2759 xpos = xHalfSt - fleeclat->GetDX();
2760 ypos1 = ypos - (coldPlate->GetDY() +2*graphlat->GetDY() +fleeclat->GetDY());
2761 if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon
2762 (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) {
2763 halfStaveVol->AddNode(fleeclatVol,1, new TGeoTranslation(-xpos, ypos1, 0));
2764 halfStaveVol->AddNode(fleeclatVol,2, new TGeoTranslation( xpos, ypos1, 0));
2766 halfStaveVol->AddNode(fleecmidVol, 1, new TGeoTranslation(0, ypos1, 0));
2768 xpos = xHalfSt - 2*fleeclat->GetDX() + fleecvert->GetDX();
2769 ypos1 = ypos - (coldPlate->GetDY() +2*graphlat->GetDY()
2770 + 2*fleeclat->GetDY() + fleecvert->GetDY());
2771 halfStaveVol->AddNode(fleecvertVol,1,new TGeoTranslation(-xpos, ypos1, 0));
2772 halfStaveVol->AddNode(fleecvertVol,2,new TGeoTranslation( xpos, ypos1, 0));
2773 xpos = fleecmid->GetDX() - fleecvert->GetDX();
2774 halfStaveVol->AddNode(fleecvertVol,3,new TGeoTranslation(-xpos, ypos1, 0));
2775 halfStaveVol->AddNode(fleecvertVol,4,new TGeoTranslation( xpos, ypos1, 0));
2779 //THE FOLLOWING IS ONLY A REMINDER FOR WHAT IS STILL MISSING
2781 // for (Int_t j=0; j<fNChips; j++) {
2783 // zpos = -(zact + (fNChips-1)*modGap)/2 + j*(zMod + modGap) + zMod/2;
2784 // zpos5cm = -(zact + (fNChips-1)*modGap)/2 + (j+1)*(zMod + modGap) + flexOverlap/2 ;
2786 // halfStaveVol->AddNode(moduleVol, j, new TGeoTranslation(xPos, -ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + ymod, zpos));
2787 // halfStaveVol->AddNode(moduleVol, fNChips+j, new TGeoTranslation(-xPos, -ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + ymod +deltaY, zpos));
2789 // if((j+1)!=fNChips){
2790 // halfStaveVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2,zpos5cm));
2791 // halfStaveVol->AddNode(flex1_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2 +deltaY,zpos5cm));
2792 // halfStaveVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2,zpos5cm));
2793 // halfStaveVol->AddNode(flex2_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2 +deltaY,zpos5cm));
2796 // halfStaveVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos5cm-modGap));
2797 // halfStaveVol->AddNode(flex1_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 +deltaY,zpos5cm-modGap));
2798 // halfStaveVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate +2*ymod + yFlex1 + yFlex2/2,zpos5cm-modGap));
2799 // halfStaveVol->AddNode(flex2_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 +deltaY,zpos5cm-modGap));
2805 // Done, return the half stave structure
2806 return halfStaveVol;
2809 //________________________________________________________________________
2810 TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB(const TGeoManager *mgr){
2812 // Create the space frame for the Outer Barrel
2815 // mgr : the GeoManager (used only to get the proper material)
2823 TGeoVolume *mechStavVol = 0;
2825 switch (fStaveModel) {
2826 case AliITSUv1::kOBModelDummy:
2827 case AliITSUv1::kOBModel0:
2828 mechStavVol = CreateSpaceFrameOuterBDummy(mgr);
2830 case AliITSUv1::kOBModel1:
2831 case AliITSUv1::kOBModel2:
2832 mechStavVol = CreateSpaceFrameOuterB1(mgr);
2835 AliFatal(Form("Unknown stave model %d",fStaveModel));
2842 //________________________________________________________________________
2843 TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterBDummy(const TGeoManager *) const {
2845 // Create dummy stave
2848 // mgr : the GeoManager (used only to get the proper material)
2856 // Done, return the stave structur
2860 //________________________________________________________________________
2861 TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB1(const TGeoManager *mgr){
2863 // Create the space frame for the Outer Barrel (Model 1)
2866 // mgr : the GeoManager (used only to get the proper material)
2871 // a TGeoVolume with the Space Frame of a stave
2873 // Created: 20 Dec 2013 Anastasia Barbano
2874 // Updated: 15 Jan 2014 Mario Sitta
2875 // Updated: 18 Feb 2014 Mario Sitta
2876 // Updated: 12 Mar 2014 Mario Sitta
2880 // Materials defined in AliITSUv0
2881 TGeoMedium *medCarbon = mgr->GetMedium("ITS_CARBON$");
2882 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
2886 Double_t sframeWidth = fgkOBSpaceFrameWidth;
2887 Double_t sframeHeight = fgkOBSpaceFrameTotHigh - fgkOBHalfStaveYTrans;
2888 Double_t staveBeamRadius = fgkOBSFrameBeamRadius;
2889 Double_t staveLa = fgkOBSpaceFrameLa;
2890 Double_t staveHa = fgkOBSpaceFrameHa;
2891 Double_t staveLb = fgkOBSpaceFrameLb;
2892 Double_t staveHb = fgkOBSpaceFrameHb;
2893 Double_t stavel = fgkOBSpaceFrameL;
2894 Double_t bottomBeamAngle = fgkOBSFBotBeamAngle;
2895 Double_t triangleHeight = sframeHeight - staveBeamRadius;
2896 Double_t halfTheta = TMath::ATan( 0.5*sframeWidth/triangleHeight );
2897 // Double_t alpha = TMath::Pi()*3./4. - halfTheta/2.;
2898 Double_t beta = (TMath::Pi() - 2.*halfTheta)/4.;
2899 // Double_t distCenterSideDown = 0.5*sframeWidth/TMath::Cos(beta);
2902 Double_t xpos, ypos, zpos;
2907 zlen = fNModules*fgkOBModuleZLength + (fNModules-1)*fgkOBModuleGap;
2909 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber);
2910 if (gGeoManager->GetVolume(volname)) { // Should always be so
2911 sframeHeight -= ((TGeoBBox*)gGeoManager->GetVolume(volname)->GetShape())->GetDY()*2;
2912 zlen = ((TGeoBBox*)gGeoManager->GetVolume(volname)->GetShape())->GetDZ()*2;
2914 seglen = zlen/fNModules;
2917 // First create all needed shapes and volumes
2919 TGeoBBox *spaceFrame = new TGeoBBox(sframeWidth/2,sframeHeight/2,zlen/2);
2920 TGeoBBox *segment = new TGeoBBox(sframeWidth/2,sframeHeight/2,seglen/2);
2922 TGeoVolume *spaceFrameVol = new TGeoVolume("CarbonFrameVolume",
2923 spaceFrame, medAir);
2924 spaceFrameVol->SetVisibility(kFALSE);
2926 TGeoVolume *segmentVol = new TGeoVolume("segmentVol", segment, medAir);
2930 //--- the top V of the Carbon Fiber Stave (segment)
2931 TGeoArb8 *cfStavTop1 = CreateStaveSide("CFstavTopCornerVol1shape", seglen/2., halfTheta, -1, staveLa, staveHa, stavel);
2932 TGeoVolume *cfStavTopVol1 = new TGeoVolume("CFstavTopCornerVol1",
2933 cfStavTop1, medCarbon);
2934 cfStavTopVol1->SetLineColor(35);
2936 TGeoArb8 *cfStavTop2 = CreateStaveSide("CFstavTopCornerVol2shape", seglen/2., halfTheta, 1, staveLa, staveHa, stavel);
2937 TGeoVolume *cfStavTopVol2 = new TGeoVolume("CFstavTopCornerVol2",
2938 cfStavTop2, medCarbon );
2939 cfStavTopVol2->SetLineColor(35);
2941 TGeoTranslation *trTop1 = new TGeoTranslation(0, sframeHeight/2, 0);
2944 TGeoArb8 *cfStavSide1 = CreateStaveSide("CFstavSideCornerVol1shape", seglen/2., beta, -1, staveLb, staveHb, stavel);
2945 TGeoVolume *cfStavSideVol1 = new TGeoVolume("CFstavSideCornerVol1",
2946 cfStavSide1, medCarbon);
2947 cfStavSideVol1->SetLineColor(35);
2949 TGeoArb8 *cfStavSide2 = CreateStaveSide("CFstavSideCornerVol2shape", seglen/2., beta, 1, staveLb, staveHb, stavel);
2950 TGeoVolume *cfStavSideVol2 = new TGeoVolume("CFstavSideCornerVol2",
2951 cfStavSide2, medCarbon );
2952 cfStavSideVol2->SetLineColor(35);
2954 xpos = -sframeWidth/2;
2955 ypos = -sframeHeight/2 + staveBeamRadius + staveHb*TMath::Sin(beta);
2956 TGeoCombiTrans *ctSideR = new TGeoCombiTrans( xpos, ypos, 0,
2957 new TGeoRotation("", 180-2*beta*TMath::RadToDeg(), 0, 0));
2958 TGeoCombiTrans *ctSideL = new TGeoCombiTrans(-xpos, ypos, 0,
2959 new TGeoRotation("",-180+2*beta*TMath::RadToDeg(), 0, 0));
2961 segmentVol->AddNode(cfStavTopVol1,1,trTop1);
2962 segmentVol->AddNode(cfStavTopVol2,1,trTop1);
2963 segmentVol->AddNode(cfStavSideVol1,1,ctSideR);
2964 segmentVol->AddNode(cfStavSideVol1,2,ctSideL);
2965 segmentVol->AddNode(cfStavSideVol2,1,ctSideR);
2966 segmentVol->AddNode(cfStavSideVol2,2,ctSideL);
2970 // Beams on the sides
2971 Double_t beamPhiPrime = TMath::ASin(1./TMath::Sqrt( (1+TMath::Sin(2*beta)*TMath::Sin(2*beta)/(TanD(fgkOBSFrameBeamSidePhi)*TanD(fgkOBSFrameBeamSidePhi))) ));
2972 Double_t beamLength = TMath::Sqrt( sframeHeight*sframeHeight/( TMath::Sin(beamPhiPrime)*TMath::Sin(beamPhiPrime))+ sframeWidth*sframeWidth/4.)-staveLa/2-staveLb/2;
2973 TGeoTubeSeg *sideBeam = new TGeoTubeSeg(0, staveBeamRadius,
2974 beamLength/2, 0, 180);
2975 TGeoVolume *sideBeamVol = new TGeoVolume("CFstavSideBeamVol",
2976 sideBeam, medCarbon);
2977 sideBeamVol->SetLineColor(35);
2979 TGeoRotation *beamRot1 = new TGeoRotation("", /*90-2*beta*/halfTheta*TMath::RadToDeg(),
2980 -beamPhiPrime*TMath::RadToDeg(), -90);
2981 TGeoRotation *beamRot2 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(),
2982 beamPhiPrime*TMath::RadToDeg(), -90);
2983 TGeoRotation *beamRot3 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),
2984 beamPhiPrime*TMath::RadToDeg(), -90);
2985 TGeoRotation *beamRot4 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),
2986 -beamPhiPrime*TMath::RadToDeg(), -90);
2988 TGeoCombiTrans *beamTransf[8];
2989 xpos = 0.49*triangleHeight*TMath::Tan(halfTheta);//was 0.5, fix small overlap
2990 ypos = staveBeamRadius/2;
2992 beamTransf[0] = new TGeoCombiTrans( xpos, ypos,-3*zpos, beamRot1);
2994 beamTransf[1] = new TGeoCombiTrans( xpos, ypos,-3*zpos, beamRot1);
2995 AddTranslationToCombiTrans(beamTransf[1], 0, 0, seglen/2);
2997 beamTransf[2] = new TGeoCombiTrans( xpos, ypos, -zpos, beamRot2);
2999 beamTransf[3] = new TGeoCombiTrans( xpos, ypos, -zpos, beamRot2);
3000 AddTranslationToCombiTrans(beamTransf[3], 0, 0, seglen/2);
3002 beamTransf[4] = new TGeoCombiTrans(-xpos, ypos,-3*zpos, beamRot3);
3004 beamTransf[5] = new TGeoCombiTrans(-xpos, ypos,-3*zpos, beamRot3);
3005 AddTranslationToCombiTrans(beamTransf[5], 0, 0, seglen/2);
3007 beamTransf[6] = new TGeoCombiTrans(-xpos, ypos, -zpos, beamRot4);
3008 beamTransf[7] = new TGeoCombiTrans(-xpos, ypos, 3*zpos, beamRot4);
3010 //--- Beams of the bottom
3011 TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, staveBeamRadius,
3012 sframeWidth/2.-staveLb/3, 0, 180);
3013 TGeoVolume *bottomBeam1Vol = new TGeoVolume("CFstavBottomBeam1Vol",
3014 bottomBeam1, medCarbon);
3015 bottomBeam1Vol->SetLineColor(35);
3017 TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, staveBeamRadius,
3018 sframeWidth/2.-staveLb/3, 0, 90);
3019 TGeoVolume *bottomBeam2Vol = new TGeoVolume("CFstavBottomBeam2Vol",
3020 bottomBeam2, medCarbon);
3021 bottomBeam2Vol->SetLineColor(35);
3023 TGeoTubeSeg *bottomBeam3 = new TGeoTubeSeg(0, staveBeamRadius,
3024 0.5*sframeWidth/SinD(bottomBeamAngle) - staveLb/3,
3026 TGeoVolume *bottomBeam3Vol = new TGeoVolume("CFstavBottomBeam3Vol",
3027 bottomBeam3, medCarbon);
3028 bottomBeam3Vol->SetLineColor(35);
3030 TGeoRotation *bottomBeamRot1 = new TGeoRotation("", 90, 90, 90);
3031 TGeoRotation *bottomBeamRot2 = new TGeoRotation("",-90, 90, -90);
3033 TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans("",0,
3034 -(sframeHeight/2-staveBeamRadius), 0,
3036 TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0,
3037 -(sframeHeight/2-staveBeamRadius),
3040 TGeoCombiTrans *bottomBeamTransf3 = new TGeoCombiTrans(0,
3041 -(sframeHeight/2-staveBeamRadius),
3044 // be careful for beams #3: when "reading" from -z to +z and
3045 // from the bottom of the stave, it should draw a Lambda, and not a V
3046 TGeoRotation *bottomBeamRot4 = new TGeoRotation("",-90, bottomBeamAngle,-90);
3047 TGeoRotation *bottomBeamRot5 = new TGeoRotation("",-90,-bottomBeamAngle,-90);
3049 TGeoCombiTrans *bottomBeamTransf4 = new TGeoCombiTrans(0,
3050 -(sframeHeight/2-staveBeamRadius),
3053 TGeoCombiTrans *bottomBeamTransf5 = new TGeoCombiTrans(0,
3054 -(sframeHeight/2-staveBeamRadius),
3059 segmentVol->AddNode(sideBeamVol,1, beamTransf[0]);
3060 segmentVol->AddNode(sideBeamVol,2, beamTransf[1]);
3061 segmentVol->AddNode(sideBeamVol,3, beamTransf[2]);
3062 segmentVol->AddNode(sideBeamVol,4, beamTransf[3]);
3063 segmentVol->AddNode(sideBeamVol,5, beamTransf[4]);
3064 segmentVol->AddNode(sideBeamVol,6, beamTransf[5]);
3065 segmentVol->AddNode(sideBeamVol,7, beamTransf[6]);
3066 segmentVol->AddNode(sideBeamVol,8, beamTransf[7]);
3067 segmentVol->AddNode(bottomBeam1Vol,1,bottomBeamTransf1);
3068 segmentVol->AddNode(bottomBeam2Vol,1,bottomBeamTransf2);
3069 segmentVol->AddNode(bottomBeam2Vol,2,bottomBeamTransf3);
3070 segmentVol->AddNode(bottomBeam3Vol,1,bottomBeamTransf4);
3071 segmentVol->AddNode(bottomBeam3Vol,2,bottomBeamTransf5);
3074 // Then build up the space frame
3075 for(Int_t i=0; i<fNModules; i++){
3076 zpos = -spaceFrame->GetDZ() + (1 + 2*i)*segment->GetDZ();
3077 spaceFrameVol->AddNode(segmentVol, i, new TGeoTranslation(0, 0, zpos));
3081 // Done, return the space frame structure
3082 return spaceFrameVol;
3085 //________________________________________________________________________
3086 TGeoVolume* AliITSUv1Layer::CreateChipInnerB(const Double_t xchip,
3087 const Double_t ychip,
3088 const Double_t zchip,
3089 const TGeoManager *mgr){
3091 // Creates the actual Chip
3094 // xchip,ychip,zchip : the chip dimensions
3095 // mgr : the GeoManager (used only to get the proper material)
3101 // Created: 22 Jun 2011 Mario Sitta
3105 Double_t xlen, ylen, zlen;
3106 Double_t xpos, ypos, zpos;
3109 // First create all needed shapes
3112 TGeoBBox *chip = new TGeoBBox(xchip, ychip, zchip);
3115 xlen = chip->GetDX();
3116 ylen = 0.5*fSensorThick;
3117 zlen = chip->GetDZ();
3118 TGeoBBox *sensor = new TGeoBBox(xlen, ylen, zlen);
3121 // We have all shapes: now create the real volumes
3122 TGeoMedium *medSi = mgr->GetMedium("ITS_SI$");
3124 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSChipPattern(), fLayerNumber);
3125 TGeoVolume *chipVol = new TGeoVolume(volname, chip, medSi);
3126 chipVol->SetVisibility(kTRUE);
3127 chipVol->SetLineColor(1);
3129 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSSensorPattern(), fLayerNumber);
3130 TGeoVolume *sensVol = new TGeoVolume(volname, sensor, medSi);
3131 sensVol->SetVisibility(kTRUE);
3132 sensVol->SetLineColor(8);
3133 sensVol->SetLineWidth(1);
3134 sensVol->SetFillColor(sensVol->GetLineColor());
3135 sensVol->SetFillStyle(4000); // 0% transparent
3138 // Now build up the chip
3140 ypos = -chip->GetDY() + sensor->GetDY();
3143 chipVol->AddNode(sensVol, 1, new TGeoTranslation(xpos, ypos, zpos));
3145 // Done, return the chip
3149 //________________________________________________________________________
3150 TGeoVolume* AliITSUv1Layer::CreateModuleOuterB(const TGeoManager *mgr){
3152 // Creates the OB Module: HIC + FPC + Carbon plate
3155 // mgr : the GeoManager (used only to get the proper material)
3160 // the module as a TGeoVolume
3162 // Created: 18 Dec 2013 M. Sitta, A. Barbano
3163 // Updated: 26 Feb 2014 M. Sitta
3164 // Updated: 12 Nov 2014 M. Sitta Model2 is w/o Carbon Plate and Glue
3165 // and Cu instead of Al
3171 Double_t xGap = fgkOBChipXGap;
3172 Double_t zGap = fgkOBChipZGap;
3174 Double_t xchip, ychip, zchip;
3175 Double_t xlen, ylen, zlen;
3176 Double_t xpos, ypos, zpos;
3178 // First create all needed shapes
3180 // The chip (the same as for IB)
3181 xlen = (fgkOBHalfStaveWidth/2-xGap/2)/fgkOBNChipRows;
3182 ylen = 0.5*fChipThick;
3183 zlen = (fgkOBModuleZLength - (fgkOBChipsPerRow-1)*zGap)/(2*fgkOBChipsPerRow);
3185 TGeoVolume *chipVol = CreateChipInnerB(xlen, ylen, zlen);
3187 xchip = ((TGeoBBox*)chipVol->GetShape())->GetDX();
3188 ychip = ((TGeoBBox*)chipVol->GetShape())->GetDY();
3189 zchip = ((TGeoBBox*)chipVol->GetShape())->GetDZ();
3191 // The module carbon plate
3192 xlen = fgkOBHalfStaveWidth/2;
3193 ylen = fgkOBCarbonPlateThick/2;
3194 zlen = fgkOBModuleZLength/2;
3195 TGeoBBox *modPlate = new TGeoBBox("CarbonPlate", xlen, ylen, zlen);
3198 ylen = fgkOBGlueThickM1/2;
3199 TGeoBBox *glue = new TGeoBBox("Glue", xlen, ylen, zlen);
3202 TGeoBBox *flexMetal;
3203 if (fStaveModel == AliITSUv1::kOBModel1) {
3204 ylen = fgkOBFlexCableAlThick/2;
3205 flexMetal = new TGeoBBox("FlexAl", xlen, ylen, zlen);
3207 ylen = fgkOBFlexCableCuThick/2;
3208 flexMetal = new TGeoBBox("FlexCu", xlen, ylen, zlen);
3211 if (fStaveModel == AliITSUv1::kOBModel1)
3212 ylen = fgkOBFlexCableKapThick1/2;
3214 ylen = fgkOBFlexCableKapThick/2;
3215 TGeoBBox *flexKap = new TGeoBBox("FlexKap", xlen, ylen, zlen);
3218 xlen = fgkOBHalfStaveWidth/2;
3219 ylen = ychip + flexMetal->GetDY() + flexKap->GetDY();
3220 if (fStaveModel == AliITSUv1::kOBModel1)
3221 ylen += (modPlate->GetDY() + glue->GetDY());
3222 zlen = fgkOBModuleZLength/2;
3223 TGeoBBox *module = new TGeoBBox("OBModule", xlen, ylen, zlen);
3226 // We have all shapes: now create the real volumes
3228 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
3229 TGeoMedium *medCarbon = mgr->GetMedium("ITS_CARBON$");
3230 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
3231 TGeoMedium *medAluminum = mgr->GetMedium("ITS_ALUMINUM$");
3232 TGeoMedium *medCopper = mgr->GetMedium("ITS_COPPER$");
3233 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
3235 TGeoVolume *modPlateVol = new TGeoVolume("CarbonPlateVol",
3236 modPlate, medCarbon);
3237 modPlateVol->SetLineColor(kMagenta-8);
3238 modPlateVol->SetFillColor(modPlateVol->GetLineColor());
3239 modPlateVol->SetFillStyle(4000); // 0% transparent
3241 TGeoVolume *glueVol = new TGeoVolume("GlueVol", glue, medGlue);
3242 glueVol->SetLineColor(kBlack);
3243 glueVol->SetFillColor(glueVol->GetLineColor());
3244 glueVol->SetFillStyle(4000); // 0% transparent
3246 TGeoVolume *flexMetalVol;
3247 if (fStaveModel == AliITSUv1::kOBModel1)
3248 flexMetalVol = new TGeoVolume("FPCAlVol", flexMetal, medAluminum);
3250 flexMetalVol = new TGeoVolume("FPCCuVol", flexMetal, medCopper);
3251 flexMetalVol->SetLineColor(kRed);
3252 flexMetalVol->SetFillColor(flexMetalVol->GetLineColor());
3253 flexMetalVol->SetFillStyle(4000); // 0% transparent
3255 TGeoVolume *flexKapVol = new TGeoVolume("FPCKapVol", flexKap, medKapton);
3256 flexKapVol->SetLineColor(kGreen);
3257 flexKapVol->SetFillColor(flexKapVol->GetLineColor());
3258 flexKapVol->SetFillStyle(4000); // 0% transparent
3260 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber);
3261 TGeoVolume *modVol = new TGeoVolume(volname, module, medAir);
3262 modVol->SetVisibility(kTRUE);
3265 // Now build up the module
3266 // Model1 : CarbonPlate-Glue-Chips-AluminumFPC-KaptonFPC
3267 // Model2 : Chips-CopperFPC-KaptonFPCChips
3268 ypos = -module->GetDY();
3270 if (fStaveModel == AliITSUv1::kOBModel1) {
3271 ypos += modPlate->GetDY();
3272 if (fBuildLevel < 5) // Carbon
3273 modVol->AddNode(modPlateVol, 1, new TGeoTranslation(0, ypos, 0));
3275 ypos += (modPlate->GetDY() + glue->GetDY());
3276 if (fBuildLevel < 2) // Glue
3277 modVol->AddNode(glueVol, 1, new TGeoTranslation(0, ypos, 0));
3279 ypos += glue->GetDY();
3282 xpos = -module->GetDX() + xchip;
3284 for(Int_t k=0; k<fgkOBChipsPerRow; k++) //put 7x2 chip into one module
3286 zpos = -module->GetDZ() + zchip + k*(2*zchip + zGap);
3287 modVol->AddNode(chipVol, 2*k , new TGeoTranslation( xpos, ypos, zpos));
3288 modVol->AddNode(chipVol, 2*k+1,
3289 new TGeoCombiTrans(-xpos, ypos, zpos, new TGeoRotation("",0,180,180)));
3290 fHierarchy[kChip]+=2;
3293 ypos += (ychip + flexMetal->GetDY());
3294 if (fBuildLevel < 1) // Model1: Aluminum Model2: Copper
3295 modVol->AddNode(flexMetalVol, 1, new TGeoTranslation(0, ypos, 0));
3297 ypos += (flexMetal->GetDY() + flexKap->GetDY());
3298 if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 4) || // Kapton
3299 (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 5) )
3300 modVol->AddNode(flexKapVol, 1, new TGeoTranslation(0, ypos, 0));
3302 // Done, return the module
3306 //________________________________________________________________________
3307 void AliITSUv1Layer::SetNUnits(Int_t u)
3310 // Sets the number of units in a stave:
3311 // for the Inner Barrel: the number of chips per stave
3312 // for the Outer Barrel: the number of modules per half stave
3316 // u : the number of units
3322 // Created: 18 Feb 2013 Mario Sitta (was already SetNChips)
3325 if (fLayerNumber < fgkNumberOfInnerLayers)
3329 fNChips = fgkOBChipsPerRow;
3334 //________________________________________________________________________
3335 void AliITSUv1Layer::SetStaveTilt(const Double_t t)
3338 // Sets the Stave tilt angle (for turbo layers only)
3341 // t : the stave tilt angle
3347 // Created: 08 Jul 2011 Mario Sitta
3353 AliError("Not a Turbo layer");
3357 //________________________________________________________________________
3358 void AliITSUv1Layer::SetStaveWidth(const Double_t w){
3360 // Sets the Stave width (for turbo layers only)
3363 // w : the stave width
3369 // Created: 08 Jul 2011 Mario Sitta
3375 AliError("Not a Turbo layer");
3379 //________________________________________________________________________
3380 TGeoArb8 *AliITSUv1Layer::CreateStaveSide(const char *name,
3381 Double_t dz, Double_t angle, Double_t xSign,
3382 Double_t L, Double_t H, Double_t l) {
3384 // Creates the V-shaped sides of the OB space frame
3385 // (from a similar method with same name and function
3386 // in AliITSv11GeometrySDD class by L.Gaudichet)
3389 // Create one half of the V shape corner of CF stave
3391 TGeoArb8 *cfStavSide = new TGeoArb8(dz);
3392 cfStavSide->SetName(name);
3394 // Points must be in clockwise order
3395 cfStavSide->SetVertex(0, 0, 0);
3396 cfStavSide->SetVertex(2, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
3397 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
3398 cfStavSide->SetVertex(4, 0, 0);
3399 cfStavSide->SetVertex(6, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
3400 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
3402 cfStavSide->SetVertex(1, 0, -H);
3403 cfStavSide->SetVertex(3, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
3404 cfStavSide->SetVertex(5, 0, -H);
3405 cfStavSide->SetVertex(7, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
3407 cfStavSide->SetVertex(1, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
3408 cfStavSide->SetVertex(3, 0, -H);
3409 cfStavSide->SetVertex(5, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
3410 cfStavSide->SetVertex(7, 0, -H);
3415 //________________________________________________________________________
3416 TGeoCombiTrans *AliITSUv1Layer::CreateCombiTrans(const char *name,
3417 Double_t dy, Double_t dz,
3418 Double_t dphi, Bool_t planeSym) {
3420 // Help method to create a TGeoCombiTrans matrix
3421 // (from a similar method with same name and function
3422 // in AliITSv11GeometrySDD class by L.Gaudichet)
3426 // return the TGeoCombiTrans which make a translation in y and z
3427 // and a rotation in phi in the global coord system
3428 // If planeSym = true, the rotation places the object symetrically
3429 // (with respect to the transverse plane) to its position in the
3430 // case planeSym = false
3433 TGeoTranslation t1(dy*CosD(90.+dphi),dy*SinD(90.+dphi), dz);
3434 TGeoRotation r1("",0.,0.,dphi);
3435 TGeoRotation r2("",90, 180, -90-dphi);
3437 TGeoCombiTrans *combiTrans1 = new TGeoCombiTrans(name);
3438 combiTrans1->SetTranslation(t1);
3439 if (planeSym) combiTrans1->SetRotation(r1);
3440 else combiTrans1->SetRotation(r2);
3444 //________________________________________________________________________
3445 void AliITSUv1Layer::AddTranslationToCombiTrans(TGeoCombiTrans* ct,
3450 // Help method to add a translation to a TGeoCombiTrans matrix
3451 // (from a similar method with same name and function
3452 // in AliITSv11GeometrySDD class by L.Gaudichet)
3455 // Add a dx,dy,dz translation to the initial TGeoCombiTrans
3456 const Double_t *vect = ct->GetTranslation();
3457 Double_t newVect[3] = {vect[0]+dx, vect[1]+dy, vect[2]+dz};
3458 ct->SetTranslation(newVect);