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 = 300*fgkmicron;
51 const Double_t AliITSUv1Layer::fgkDefaultStaveThick = 1*fgkcm;
53 // Inner Barrel Parameters
54 const Int_t AliITSUv1Layer::fgkIBChipsPerRow = 9;
55 const Int_t AliITSUv1Layer::fgkIBNChipRows = 1;
57 // Outer Barrel Parameters
58 const Int_t AliITSUv1Layer::fgkOBChipsPerRow = 7;
59 const Int_t AliITSUv1Layer::fgkOBNChipRows = 2;
61 const Double_t AliITSUv1Layer::fgkOBHalfStaveWidth = 3.01 *fgkcm;
62 const Double_t AliITSUv1Layer::fgkOBModuleWidth = fgkOBHalfStaveWidth;
63 const Double_t AliITSUv1Layer::fgkOBModuleGap = 0.01 *fgkcm;
64 const Double_t AliITSUv1Layer::fgkOBChipXGap = 0.01 *fgkcm;
65 const Double_t AliITSUv1Layer::fgkOBChipZGap = 0.01 *fgkcm;
66 const Double_t AliITSUv1Layer::fgkOBFlexCableAlThick = 0.005*fgkcm;
67 const Double_t AliITSUv1Layer::fgkOBFlexCableKapThick = 0.01 *fgkcm;
68 const Double_t AliITSUv1Layer::fgkOBBusCableAlThick = 0.02 *fgkcm;
69 const Double_t AliITSUv1Layer::fgkOBBusCableKapThick = 0.02 *fgkcm;
70 const Double_t AliITSUv1Layer::fgkOBColdPlateThick = 0.012*fgkcm;
71 const Double_t AliITSUv1Layer::fgkOBCarbonPlateThick = 0.012*fgkcm;
72 const Double_t AliITSUv1Layer::fgkOBGlueThick = 0.03 *fgkcm;
73 const Double_t AliITSUv1Layer::fgkOBModuleZLength = 21.06 *fgkcm;
74 const Double_t AliITSUv1Layer::fgkOBHalfStaveYTrans = 1.76 *fgkmm;
75 const Double_t AliITSUv1Layer::fgkOBHalfStaveXOverlap = 4.3 *fgkmm;
76 const Double_t AliITSUv1Layer::fgkOBGraphiteFoilThick = 30.0 *fgkmicron;
77 const Double_t AliITSUv1Layer::fgkOBCoolTubeInnerD = 2.052*fgkmm;
78 const Double_t AliITSUv1Layer::fgkOBCoolTubeThick = 32.0 *fgkmicron;
79 const Double_t AliITSUv1Layer::fgkOBCoolTubeXDist = 11.1 *fgkmm;
81 const Double_t AliITSUv1Layer::fgkOBSpaceFrameWidth = 42.0 *fgkmm;
82 const Double_t AliITSUv1Layer::fgkOBSpaceFrameTotHigh = 43.1 *fgkmm;
83 const Double_t AliITSUv1Layer::fgkOBSFrameBeamRadius = 0.6 *fgkmm;
84 const Double_t AliITSUv1Layer::fgkOBSpaceFrameLa = 3.0 *fgkmm;
85 const Double_t AliITSUv1Layer::fgkOBSpaceFrameHa = 0.721979*fgkmm;
86 const Double_t AliITSUv1Layer::fgkOBSpaceFrameLb = 3.7 *fgkmm;
87 const Double_t AliITSUv1Layer::fgkOBSpaceFrameHb = 0.890428*fgkmm;
88 const Double_t AliITSUv1Layer::fgkOBSpaceFrameL = 0.25 *fgkmm;
89 const Double_t AliITSUv1Layer::fgkOBSFBotBeamAngle = 56.5;
90 const Double_t AliITSUv1Layer::fgkOBSFrameBeamSidePhi = 65.0;
93 ClassImp(AliITSUv1Layer)
97 //________________________________________________________________________
98 AliITSUv1Layer::AliITSUv1Layer():
114 fStaveModel(AliITSUv1::kIBModelDummy)
117 // Standard constructor
118 for (int i=kNHLevels;i--;) fHierarchy[i] = 0;
122 //________________________________________________________________________
123 AliITSUv1Layer::AliITSUv1Layer(Int_t debug):
124 AliITSv11Geometry(debug),
139 fStaveModel(AliITSUv1::kIBModelDummy)
142 // Constructor setting debugging level
143 for (int i=kNHLevels;i--;) fHierarchy[i] = 0;
147 //________________________________________________________________________
148 AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Int_t debug):
149 AliITSv11Geometry(debug),
164 fStaveModel(AliITSUv1::kIBModelDummy)
167 // Constructor setting layer number and debugging level
168 for (int i=kNHLevels;i--;) fHierarchy[i] = 0;
172 //________________________________________________________________________
173 AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Bool_t turbo, Int_t debug):
174 AliITSv11Geometry(debug),
189 fStaveModel(AliITSUv1::kIBModelDummy)
192 // Constructor setting layer number and debugging level
193 // for a "turbo" layer (i.e. where staves overlap in phi)
194 for (int i=kNHLevels;i--;) fHierarchy[i] = 0;
198 //________________________________________________________________________
199 AliITSUv1Layer::AliITSUv1Layer(const AliITSUv1Layer &s):
200 AliITSv11Geometry(s.GetDebug()),
201 fLayerNumber(s.fLayerNumber),
203 fLayRadius(s.fLayRadius),
204 fZLength(s.fZLength),
205 fSensorThick(s.fSensorThick),
206 fStaveThick(s.fStaveThick),
207 fStaveWidth(s.fStaveWidth),
208 fStaveTilt(s.fStaveTilt),
209 fNStaves(s.fNStaves),
210 fNModules(s.fNModules),
212 fChipTypeID(s.fChipTypeID),
213 fIsTurbo(s.fIsTurbo),
214 fBuildLevel(s.fBuildLevel),
215 fStaveModel(s.fStaveModel)
219 for (int i=kNHLevels;i--;) fHierarchy[i] = s.fHierarchy[i];
223 //________________________________________________________________________
224 AliITSUv1Layer& AliITSUv1Layer::operator=(const AliITSUv1Layer &s)
227 // Assignment operator
229 if(&s == this) return *this;
231 fLayerNumber = s.fLayerNumber;
233 fLayRadius = s.fLayRadius;
234 fZLength = s.fZLength;
235 fSensorThick = s.fSensorThick;
236 fStaveThick = s.fStaveThick;
237 fStaveWidth = s.fStaveWidth;
238 fStaveTilt = s.fStaveTilt;
239 fNStaves = s.fNStaves;
240 fNModules = s.fNModules;
242 fIsTurbo = s.fIsTurbo;
243 fChipTypeID = s.fChipTypeID;
244 fBuildLevel = s.fBuildLevel;
245 fStaveModel = s.fStaveModel;
246 for (int i=kNHLevels;i--;) fHierarchy[i] = s.fHierarchy[i];
251 //________________________________________________________________________
252 AliITSUv1Layer::~AliITSUv1Layer() {
258 //________________________________________________________________________
259 void AliITSUv1Layer::CreateLayer(TGeoVolume *moth){
261 // Creates the actual Layer and places inside its mother volume
264 // moth : the TGeoVolume owing the volume structure
270 // Created: 17 Jun 2011 Mario Sitta
271 // Updated: 08 Jul 2011 Mario Sitta
272 // Updated: 20 May 2013 Mario Sitta Layer is Assembly instead of Tube
276 Double_t xpos, ypos, zpos;
280 // Check if the user set the proper parameters
281 if (fLayRadius<= 0) AliFatal(Form("Wrong layer radius (%f)",fLayRadius));
282 if (fZLength <= 0) AliFatal(Form("Wrong layer length (%f)",fZLength));
283 if (fNStaves <= 0) AliFatal(Form("Wrong number of staves (%d)",fNStaves));
284 if (fNChips <= 0) AliFatal(Form("Wrong number of chips (%d)",fNChips));
286 if (fLayerNumber >= fgkNumberOfInnerLayers && fNModules <= 0)
287 AliFatal(Form("Wrong number of modules (%d)",fNModules));
289 if (fStaveThick <= 0) {
290 AliInfo(Form("Stave thickness wrong or not set (%f), using default (%f)",
291 fStaveThick,fgkDefaultStaveThick));
292 fStaveThick = fgkDefaultStaveThick;
295 if (fSensorThick <= 0) {
296 AliInfo(Form("Sensor thickness wrong or not set (%f), using default (%f)",
297 fSensorThick,fgkDefaultSensorThick));
298 fSensorThick = fgkDefaultSensorThick;
301 if (fSensorThick > fStaveThick) {
302 AliWarning(Form("Sensor thickness (%f) is greater than stave thickness (%f), fixing",
303 fSensorThick,fStaveThick));
304 fSensorThick = fStaveThick;
308 // If a Turbo layer is requested, do it and exit
310 CreateLayerTurbo(moth);
315 // First create the stave container
316 alpha = (360./(2*fNStaves))*DegToRad();
318 // fStaveWidth = fLayRadius*Tan(alpha);
320 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(),fLayerNumber);
321 TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
322 layVol->SetUniqueID(fChipTypeID);
324 // layVol->SetVisibility(kFALSE);
325 layVol->SetVisibility(kTRUE);
326 layVol->SetLineColor(1);
328 TGeoVolume *stavVol = CreateStave();
331 // Now build up the layer
332 alpha = 360./fNStaves;
333 Double_t r = fLayRadius + ((TGeoBBox*)stavVol->GetShape())->GetDY();
334 for (Int_t j=0; j<fNStaves; j++) {
335 Double_t phi = j*alpha + fPhi0;
336 xpos = r*CosD(phi);// r*SinD(-phi);
337 ypos = r*SinD(phi);// r*CosD(-phi);
340 layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
341 new TGeoRotation("",phi,0,0)));
345 // Finally put everything in the mother volume
346 moth->AddNode(layVol, 1, 0);
349 // Upgrade geometry is served
353 //________________________________________________________________________
354 void AliITSUv1Layer::CreateLayerTurbo(TGeoVolume *moth){
356 // Creates the actual Layer and places inside its mother volume
357 // A so-called "turbo" layer is a layer where staves overlap in phi
358 // User can set width and tilt angle, no check is performed here
359 // to avoid volume overlaps
362 // moth : the TGeoVolume owing the volume structure
368 // Created: 08 Jul 2011 Mario Sitta
369 // Updated: 08 Mar 2012 Mario Sitta Correct way to compute container R
370 // Updated: 20 May 2013 Mario Sitta Layer is Assemgbly instead of Tube
376 Double_t xpos, ypos, zpos;
380 // Check if the user set the proper (remaining) parameters
381 if (fStaveWidth <= 0)
382 AliFatal(Form("Wrong stave width (%f)",fStaveWidth));
383 if (Abs(fStaveTilt) > 45)
384 AliWarning(Form("Stave tilt angle (%f) greater than 45deg",fStaveTilt));
387 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(), fLayerNumber);
388 TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
389 layVol->SetUniqueID(fChipTypeID);
390 layVol->SetVisibility(kTRUE);
391 layVol->SetLineColor(1);
392 TGeoVolume *stavVol = CreateStave();
395 // Now build up the layer
396 alpha = 360./fNStaves;
397 Double_t r = fLayRadius /* +chip thick ?! */;
398 for (Int_t j=0; j<fNStaves; j++) {
399 Double_t phi = j*alpha + fPhi0;
400 xpos = r*CosD(phi);// r*SinD(-phi);
401 ypos = r*SinD(phi);// r*CosD(-phi);
404 layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
405 new TGeoRotation("", phi-fStaveTilt,0,0)));
409 // Finally put everything in the mother volume
410 moth->AddNode(layVol, 1, 0);
415 //________________________________________________________________________
416 TGeoVolume* AliITSUv1Layer::CreateStave(const TGeoManager * /*mgr*/){
418 // Creates the actual Stave
421 // mgr : the GeoManager (used only to get the proper material)
427 // Created: 22 Jun 2011 Mario Sitta
428 // Updated: 18 Dec 2013 Mario Sitta Handle IB and OB
433 Double_t xlen, ylen, zlen;
438 // First create all needed shapes
439 alpha = (360./(2*fNStaves))*DegToRad();
442 xlen = fLayRadius*Tan(alpha);
443 if (fIsTurbo) xlen = 0.5*fStaveWidth;
444 ylen = 0.5*fStaveThick;
447 Double_t yplus = 0.46;
448 TGeoXtru *stave = new TGeoXtru(2); //z sections
449 Double_t xv[5] = {xlen,xlen,0,-xlen,-xlen};
450 Double_t yv[5] = {ylen+0.09,-0.15,-yplus-fSensorThick,-0.15,ylen+0.09};
451 stave->DefinePolygon(5,xv,yv);
452 stave->DefineSection(0,-zlen,0,0,1.);
453 stave->DefineSection(1,+zlen,0,0,1.);
455 // We have all shapes: now create the real volumes
457 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
458 // TGeoVolume *staveVol = new TGeoVolume(volname, stave, medAir);
459 TGeoVolume *staveVol = new TGeoVolumeAssembly(volname);
461 // staveVol->SetVisibility(kFALSE);
462 staveVol->SetVisibility(kTRUE);
463 staveVol->SetLineColor(2);
464 TGeoVolume *mechStaveVol = 0;
466 // Now build up the stave
467 if (fLayerNumber < fgkNumberOfInnerLayers) {
468 TGeoVolume *modVol = CreateStaveInnerB(xlen,ylen,zlen);
469 staveVol->AddNode(modVol, 0);
470 fHierarchy[kHalfStave] = 1;
472 // Mechanical stave structure
473 mechStaveVol = CreateStaveStructInnerB(xlen,zlen);
475 ypos = ((TGeoBBox*)(modVol->GetShape()))->GetDY() +
476 ((TGeoBBox*)(mechStaveVol->GetShape()))->GetDY();
477 staveVol->AddNode(mechStaveVol, 1, new TGeoCombiTrans(0, -ypos, 0, new TGeoRotation("",0, 0, 180)));
482 TGeoVolume *hstaveVol = CreateStaveOuterB();
483 if (fStaveModel == AliITSUv1::kOBModel0) { // Create simplified stave struct as in v0
484 staveVol->AddNode(hstaveVol, 0);
485 fHierarchy[kHalfStave] = 1;
486 } else { // (if fStaveModel) Create new stave struct as in TDR
487 xpos = ((TGeoBBox*)(hstaveVol->GetShape()))->GetDX()
488 - fgkOBHalfStaveXOverlap/2;
489 // ypos is CF height as computed in CreateSpaceFrameOuterB1
490 ypos = (fgkOBSpaceFrameTotHigh - fgkOBHalfStaveYTrans)/2;
491 staveVol->AddNode(hstaveVol, 0, new TGeoTranslation(-xpos, ypos, 0));
492 staveVol->AddNode(hstaveVol, 1, new TGeoTranslation( xpos, ypos+fgkOBHalfStaveYTrans, 0));
493 fHierarchy[kHalfStave] = 2; // RS
494 mechStaveVol = CreateSpaceFrameOuterB();
496 staveVol->AddNode(mechStaveVol, 1,
497 new TGeoCombiTrans(0, 0, 0,
498 new TGeoRotation("", 180, 0, 0)));
499 } // if (fStaveModel)
503 // Done, return the stave
507 //________________________________________________________________________
508 TGeoVolume* AliITSUv1Layer::CreateStaveInnerB(const Double_t xsta,
511 const TGeoManager *mgr){
513 // Create the chip stave for the Inner Barrel
514 // (Here we fake the halfstave volume to have the same
515 // formal geometry hierarchy as for the Outer Barrel)
518 // xsta, ysta, zsta : X, Y, Z stave half lengths
519 // mgr : the GeoManager (used only to get the proper material)
525 // Created: 06 Mar 2014 Mario Sitta
529 Double_t xmod, ymod, zmod;
532 // First we create the module (i.e. the HIC with 9 chips)
533 TGeoVolume *moduleVol = CreateModuleInnerB(xsta, ysta, zsta);
535 // Then we create the fake halfstave and the actual stave
536 xmod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDX();
537 ymod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDY();
538 zmod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDZ();
540 TGeoBBox *hstave = new TGeoBBox(xmod, ymod, zmod);
542 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
544 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber);
545 TGeoVolume *hstaveVol = new TGeoVolume(volname, hstave, medAir);
548 // Finally build it up
549 hstaveVol->AddNode(moduleVol, 0);
550 fHierarchy[kModule] = 1;
552 // Done, return the stave structure
556 //________________________________________________________________________
557 TGeoVolume* AliITSUv1Layer::CreateModuleInnerB(Double_t xmod,
560 const TGeoManager *mgr){
562 // Creates the IB Module: (only the chips for the time being)
565 // xmod, ymod, zmod : X, Y, Z module half lengths
566 // mgr : the GeoManager (used only to get the proper material)
571 // the module as a TGeoVolume
573 // Created: 06 Mar 2014 M. Sitta
580 // First create the single chip
581 zchip = zmod/fgkIBChipsPerRow;
582 TGeoVolume *chipVol = CreateChipInnerB(xmod, ymod, zchip);
584 // Then create the module and populate it with the chips
585 TGeoBBox *module = new TGeoBBox(xmod, ymod, zmod);
587 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
589 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber);
590 TGeoVolume *modVol = new TGeoVolume(volname, module, medAir);
592 // mm (not used) zlen = ((TGeoBBox*)chipVol->GetShape())->GetDZ();
593 for (Int_t j=0; j<fgkIBChipsPerRow; j++) {
594 zpos = -zmod + j*2*zchip + zchip;
595 modVol->AddNode(chipVol, j, new TGeoTranslation(0, 0, zpos));
599 // Done, return the module
603 //________________________________________________________________________
604 TGeoVolume* AliITSUv1Layer::CreateStaveStructInnerB(const Double_t xsta,
606 const TGeoManager *mgr){
608 // Create the mechanical stave structure
613 // mgr : the GeoManager (used only to get the proper material)
619 // Created: 22 Mar 2013 Chinorat Kobdaj
620 // Updated: 26 Apr 2013 Mario Sitta
623 TGeoVolume *mechStavVol = 0;
625 switch (fStaveModel) {
626 case AliITSUv1::kIBModelDummy:
627 mechStavVol = CreateStaveModelInnerBDummy(xsta,zsta,mgr);
629 case AliITSUv1::kIBModel0:
630 mechStavVol = CreateStaveModelInnerB0(xsta,zsta,mgr);
632 case AliITSUv1::kIBModel1:
633 mechStavVol = CreateStaveModelInnerB1(xsta,zsta,mgr);
635 case AliITSUv1::kIBModel21:
636 mechStavVol = CreateStaveModelInnerB21(xsta,zsta,mgr);
638 case AliITSUv1::kIBModel22:
639 mechStavVol = CreateStaveModelInnerB22(xsta,zsta,mgr);
641 case AliITSUv1::kIBModel3:
642 mechStavVol = CreateStaveModelInnerB3(xsta,zsta,mgr);
645 AliFatal(Form("Unknown stave model %d",fStaveModel));
653 //________________________________________________________________________
654 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerBDummy(const Double_t ,
656 const TGeoManager *) const {
658 // Create dummy stave
663 // mgr : the GeoManager (used only to get the proper material)
669 // Created: 22 Mar 2013 Chinorat Kobdaj
670 // Updated: 26 Apr 2013 Mario Sitta
673 // Done, return the stave structur
677 //________________________________________________________________________
678 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xsta,
680 const TGeoManager *mgr){
682 // Create the mechanical stave structure for Model 0 of TDR
687 // mgr : the GeoManager (used only to get the proper material)
693 // Created: 22 Mar 2013 Chinorat Kobdaj
694 // Updated: 26 Apr 2013 Mario Sitta
697 // Materials defined in AliITSUv1
698 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
699 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
701 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
702 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
703 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
704 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
707 Double_t kConeOutRadius = 0.15/2;
708 Double_t kConeInRadius = 0.1430/2;
709 Double_t kStaveLength = zsta*2;
710 Double_t kStaveWidth = xsta*2-kConeOutRadius*2;
711 Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
712 Double_t kStaveHeight = 0.3;
713 Double_t kHeight = kStaveHeight/2;
714 Double_t kAlpha = 90-67;//90-33.69;
715 Double_t kTheta = kAlpha*TMath::DegToRad();
716 Double_t kS1 = kWidth/TMath::Sin(kTheta);
717 Double_t kL1 = kWidth/TMath::Tan(kTheta);
718 Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
719 Double_t kThe2 = TMath::ATan(kHeight/kS1);
720 Double_t kBeta = kThe2*TMath::RadToDeg();
721 // Int_t loop = kStaveLength/(kL1);
722 // Double_t s3 = kWidth/(2*TMath::Sin(kTheta));
723 // Double_t s4 = 3*kWidth/(2*TMath::Sin(kTheta));
725 AliDebug(1, Form("BuildLevel %d\n",fBuildLevel));
728 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
730 Double_t z=0, y=-0.011+0.0150, x=0;
732 TGeoVolume *mechStavVol = 0;
734 if (fBuildLevel < 5) {
737 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
738 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
739 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07};
740 mechStruct->DefinePolygon(5,xv,yv);
741 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
742 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
744 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
745 mechStavVol->SetLineColor(12);
746 mechStavVol->SetFillColor(12);
747 mechStavVol->SetVisibility(kTRUE);
749 // detailed structure ++++++++++++++
750 //Pipe Kapton grey-35
751 TGeoTube *coolTube = new TGeoTube(kConeInRadius,kConeOutRadius,kStaveLength/2);
752 TGeoVolume *volCoolTube= new TGeoVolume("pipe", coolTube, medKapton);
753 volCoolTube->SetFillColor(35);
754 volCoolTube->SetLineColor(35);
755 mechStavVol->AddNode(volCoolTube,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
756 mechStavVol->AddNode(volCoolTube,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
759 if (fBuildLevel < 4) {
760 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength/2);
761 TGeoVolume *volCoolTubeW= new TGeoVolume("pipeWater", coolTubeW, medWater);
762 volCoolTubeW->SetFillColor(4);
763 volCoolTubeW->SetLineColor(4);
764 mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
765 mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
768 //frequency of filament
769 //n = 4 means very dense(4 filaments per interval)
770 //n = 2 means dense(2 filaments per interval)
772 Int_t loop = (Int_t)(kStaveLength/(4*kL1/n) + 2/n)-1;
773 if (fBuildLevel < 3) {
774 //Top CFRP Filament black-12 Carbon structure TGeoBBox (length,thickness,width)
775 TGeoBBox *t2=new TGeoBBox(kS2,0.007/2,0.15/2);//(kS2,0.002,0.02);
776 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
777 volT2->SetLineColor(12);
778 volT2->SetFillColor(12);
780 for(int i=1;i<loop;i++){ //i<60;i++){
781 mechStavVol->AddNode(volT2,4*i+0,
782 new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
783 new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
784 mechStavVol->AddNode(volT2,4*i+1,
785 new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
786 new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
787 mechStavVol->AddNode(volT2,4*i+2,
788 new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
789 new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
790 mechStavVol->AddNode(volT2,4*i+3,
791 new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
792 new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
796 //Bottom CFRP Filament black-12 Carbon structure TGeoBBox (thickness,width,length)
797 TGeoBBox *t1=new TGeoBBox(0.007/2,0.15/2,kS1);//(0.002,0.02,kS1);
798 TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K);
799 volT1->SetLineColor(12);
800 volT1->SetFillColor(12);
802 for(int i=1;i<loop;i++){
803 mechStavVol->AddNode(volT1,4*i+0,
804 new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1),
805 new TGeoRotation("volT1",-90,kAlpha,0)));
806 mechStavVol->AddNode(volT1,4*i+1,
807 new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1),
808 new TGeoRotation("volT1",90,kAlpha,0)));
809 mechStavVol->AddNode(volT1,4*i+2,
810 new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
811 new TGeoRotation("volT1",-90,-kAlpha,0)));
812 mechStavVol->AddNode(volT1,4*i+3,
813 new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
814 new TGeoRotation("volT1",-90,+kAlpha,0)));
818 if (fBuildLevel < 2) {
819 // Glue CFRP-Silicon layers TGeoBBox(thickness,width,kS1);
820 TGeoBBox *tG=new TGeoBBox(0.0075/2,0.18/2,kS1);
821 TGeoVolume *volTG=new TGeoVolume("Glue1", tG, medGlue);
822 volTG->SetLineColor(5);
823 volTG->SetFillColor(5);
825 for(int i=1;i<loop;i++){ //i<60;i++){
826 mechStavVol->AddNode(volTG,4*i+0,
827 new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i),
828 new TGeoRotation("volTG",-90,kAlpha,0)));
829 mechStavVol->AddNode(volTG,4*i+1,
830 new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i),
831 new TGeoRotation("volTG",90,kAlpha,0)));
832 mechStavVol->AddNode(volTG,4*i+2,
833 new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*i*kL1)+kS1/2, //z-14.25+(i*2*kL1),
834 new TGeoRotation("volTG",-90,-kAlpha,0)));
835 mechStavVol->AddNode(volTG,4*i+3,
836 new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
837 new TGeoRotation("volTG",-90,+kAlpha,0)));
840 TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta);
841 TGeoVolume *volGlue=new TGeoVolume("Glue2", glue, medGlue);
842 volGlue->SetLineColor(5);
843 volGlue->SetFillColor(5);
844 //mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
845 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
848 if (fBuildLevel < 1) {
849 //Flex cable brown-28 TGeoBBox(width,thickness,length);
850 TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta);
851 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
852 volCable->SetLineColor(28);
853 volCable->SetFillColor(28);
854 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
857 // Done, return the stave structur
862 //________________________________________________________________________
863 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xsta,
865 const TGeoManager *mgr){
867 // Create the mechanical stave structure for Model 1 of TDR
872 // mgr : the GeoManager (used only to get the proper material)
878 // Created: 22 Mar 2013 Chinorat Kobdaj
879 // Updated: 26 Apr 2013 Mario Sitta
882 // Materials defined in AliITSUv1
883 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
884 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
886 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
887 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
888 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
889 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
892 Double_t kConeOutRadius = 0.15/2;
893 // Double_t kConeInRadius = 0.1430/2;
894 Double_t kStaveLength = zsta*2;
895 // Double_t kStaveWidth = xsta*2-kConeOutRadius*2;
896 Double_t kStaveWidth = xsta*2;
897 Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
898 Double_t kStaveHeight = 0.3;
899 Double_t kHeight = kStaveHeight/2;
900 Double_t kAlpha = 90-33.;//90-30;
901 Double_t kTheta = kAlpha*TMath::DegToRad();
902 Double_t kS1 = kWidth/TMath::Sin(kTheta);
903 Double_t kL1 = kWidth/TMath::Tan(kTheta);
904 Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
905 Double_t kThe2 = TMath::ATan(kHeight/kS1);
906 Double_t kBeta = kThe2*TMath::RadToDeg();
907 Int_t loop = (Int_t)((kStaveLength/(2*kL1))/2);
910 TGeoVolume *mechStavVol = 0;
913 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
916 // detailed structure ++++++++++++++
917 Double_t z=0, y=-0.011+0.0150, x=0;
919 // Polimide micro channels numbers
920 Double_t yMC = y-kHeight+0.01;
921 Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
922 Double_t xstaMC = (nb*0.1-0.08)/2;
925 if (fBuildLevel < 5) {
927 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
928 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
929 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07};
930 mechStruct->DefinePolygon(5,xv,yv);
931 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
932 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
934 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
935 mechStavVol->SetLineColor(12);
936 mechStavVol->SetFillColor(12);
937 mechStavVol->SetVisibility(kTRUE);
939 // Polimide micro channels numbers
940 TGeoBBox *tM0=new TGeoBBox(xstaMC, 0.005/2, zsta);
941 TGeoVolume *volTM0=new TGeoVolume("MicroChanCover", tM0, medKapton);
942 volTM0->SetLineColor(35);
943 volTM0->SetFillColor(35);
944 mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x,-0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
945 mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x,+0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
947 TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta);
948 TGeoVolume *volTM0b=new TGeoVolume("MicroChanWalls", tM0b, medKapton);
949 volTM0b->SetLineColor(35);
950 volTM0b->SetFillColor(35);
951 for (Int_t ib=0;ib<nb;ib++) {
952 mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
957 if (fBuildLevel < 4) {
958 // Water in Polimide micro channels
959 TGeoBBox *water=new TGeoBBox(0.08/2, 0.02/2, zsta+0.1);
960 TGeoVolume *volWater=new TGeoVolume("Water", water, medWater);
961 volWater->SetLineColor(4);
962 volWater->SetFillColor(4);
963 for (Int_t ib=0;ib<(nb-1);ib++) {
964 mechStavVol->AddNode(volWater, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.06,yMC, z, new TGeoRotation("",0, 0, 0)));
968 if (fBuildLevel < 3) {
969 //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length)
970 Double_t filWidth = 0.04;
971 Double_t filHeight= 0.02;
972 TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,kS1);
973 TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K);
974 volT1->SetLineColor(12);
975 volT1->SetFillColor(12);
976 for(int i=0;i<loop;i++){//i<30;i++){
977 mechStavVol->AddNode(volT1,4*i+0,
978 new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1)+kS1/2,
979 new TGeoRotation("volT1",-90,kAlpha,0)));
980 mechStavVol->AddNode(volT1,4*i+1,
981 new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1*i)+kS1/2,
982 new TGeoRotation("volT1",90,kAlpha,0)));
983 mechStavVol->AddNode(volT1,4*i+2,
984 new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
985 new TGeoRotation("volT1",-90,-kAlpha,0)));
986 mechStavVol->AddNode(volT1,4*i+3,
987 new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
988 new TGeoRotation("volT1",-90,+kAlpha,0)));
991 // Top filament CFRP black-12 Carbon structure TGeoBBox (length,thickness,width)
992 TGeoBBox *t2=new TGeoBBox(kS2,filHeight/2,filWidth/2);
993 TGeoVolume *volT2=new TGeoVolume("CFRPTop", t2, medM60J3K);
994 volT2->SetLineColor(12);
995 volT2->SetFillColor(12);
996 for(int i=0;i<loop;i++){ //i<30;i++){
997 mechStavVol->AddNode(volT2,4*i+0,
998 new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
999 new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
1000 mechStavVol->AddNode(volT2,4*i+1,
1001 new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
1002 new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
1003 mechStavVol->AddNode(volT2,4*i+2,
1004 new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
1005 new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
1006 mechStavVol->AddNode(volT2,4*i+3,
1007 new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
1008 new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
1012 if (fBuildLevel < 2) {
1013 // Glue between filament and polimide micro channel
1014 TGeoBBox *t3=new TGeoBBox(0.01/2,0.04,kS1);
1015 TGeoVolume *volT3=new TGeoVolume("FilamentGlue", t3, medGlue);
1016 volT3->SetLineColor(5);
1017 volT3->SetFillColor(5);
1018 for(int i=0;i<loop;i++){//i<30;i++){
1019 mechStavVol->AddNode(volT3,4*i+0,
1020 new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2,
1021 new TGeoRotation("volT1",-90,kAlpha,0)));
1022 mechStavVol->AddNode(volT3,4*i+1,
1023 new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2,
1024 new TGeoRotation("volT1",90,kAlpha,0)));
1025 mechStavVol->AddNode(volT3,4*i+2,
1026 new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
1027 new TGeoRotation("volT1",-90,-kAlpha,0)));
1028 mechStavVol->AddNode(volT3,4*i+3,
1029 new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
1030 new TGeoRotation("volT1",-90,+kAlpha,0)));
1033 // Glue microchannel and sensor
1034 TGeoBBox *glueM = new TGeoBBox(xsta, 0.01/2, zsta);
1035 TGeoVolume *volGlueM=new TGeoVolume("MicroChanGlue", glueM, medGlue);
1036 volGlueM->SetLineColor(5);
1037 volGlueM->SetFillColor(5);
1038 mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
1040 // Glue sensor and kapton
1041 TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta);
1042 TGeoVolume *volGlue=new TGeoVolume("SensorGlue", glue, medGlue);
1043 volGlue->SetLineColor(5);
1044 volGlue->SetFillColor(5);
1045 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
1048 if (fBuildLevel < 1) {
1049 TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta);
1050 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
1051 volCable->SetLineColor(28);
1052 volCable->SetFillColor(28);
1053 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
1056 // Done, return the stave structur
1061 //________________________________________________________________________
1062 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xsta,
1063 const Double_t zsta,
1064 const TGeoManager *mgr){
1066 // Create the mechanical stave structure for Model 2.1 of TDR
1071 // mgr : the GeoManager (used only to get the proper material)
1077 // Created: 22 Mar 2013 Chinorat Kobdaj
1078 // Updated: 26 Apr 2013 Mario Sitta
1081 // Materials defined in AliITSUv1
1082 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1083 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1085 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
1086 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1087 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1088 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
1089 TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
1090 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
1091 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1094 Double_t kConeOutRadius =0.151384/2;
1095 Double_t kConeInRadius = 0.145034/2;
1096 Double_t kStaveLength = zsta;
1097 Double_t kStaveWidth = xsta*2;
1098 Double_t kWidth = (kStaveWidth+0.005)/4;
1099 Double_t kStaveHeigth = 0.33;//0.33;
1100 Double_t kHeight = (kStaveHeigth+0.025)/2;
1101 Double_t kAlpha = 57; //56.31;
1102 Double_t kTheta = kAlpha*TMath::DegToRad();
1103 Double_t kS1 = (kStaveWidth/4)/TMath::Sin(kTheta);
1104 Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta);
1105 Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
1106 Double_t kThe2 = TMath::ATan(kHeight/kS1);
1107 Double_t kBeta = kThe2*TMath::RadToDeg();
1108 // Double_t lay1 = 0.003157;
1109 Double_t kLay1 = 0.003;//Amec carbon
1110 // Double_t lay2 = 0.0043215;//C Fleece carbon
1111 Double_t kLay2 = 0.002;//C Fleece carbon
1112 Double_t kLay3 = 0.007;//K13D2U carbon
1113 Int_t loop = (Int_t)(kStaveLength/(2*kL1));
1117 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
1119 Double_t z=0, y=-(kConeOutRadius+0.03)+0.0385, x=0;
1121 TGeoVolume *mechStavVol = 0;
1123 if (fBuildLevel < 5) {
1124 // world (trapezoid)
1125 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
1126 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
1127 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeigth,0,-kConeOutRadius*2-0.07};
1128 mechStruct->DefinePolygon(5,xv,yv);
1129 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
1130 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
1132 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
1133 mechStavVol->SetLineColor(12);
1134 mechStavVol->SetFillColor(12);
1135 mechStavVol->SetVisibility(kTRUE);
1137 //Pipe Kapton grey-35
1138 TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius,kConeInRadius,kConeOutRadius);
1139 TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
1140 volCone1->SetFillColor(35);
1141 volCone1->SetLineColor(35);
1142 mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
1143 mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
1146 if (fBuildLevel < 4) {
1148 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength);
1149 TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
1150 volCoolTubeW->SetFillColor(4);
1151 volCoolTubeW->SetLineColor(4);
1152 mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
1153 mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
1156 if (fBuildLevel < 3) {
1158 // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width)
1159 TGeoBBox *t2=new TGeoBBox(kS2,0.02/2,0.04/2); //TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02);
1160 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
1161 volT2->SetLineColor(12);
1162 volT2->SetFillColor(12);
1163 for(int i=0;i<loop;i++){// i<28;i++){
1164 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)));
1165 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)));
1166 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)));
1167 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)));
1168 // 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)));
1172 //wall side structure out
1173 TGeoBBox *box4 = new TGeoBBox(0.03/2,0.12/2,kStaveLength-0.50);
1174 TGeoVolume *plate4 = new TGeoVolume("WallOut",box4,medM60J3K);
1175 plate4->SetFillColor(35);
1176 plate4->SetLineColor(35);
1177 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)));
1178 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)));
1180 TGeoBBox *box5 = new TGeoBBox(0.015/2,0.12/2,kStaveLength-0.50);
1181 TGeoVolume *plate5 = new TGeoVolume("WallIn",box5,medM60J3K);
1182 plate5->SetFillColor(12);
1183 plate5->SetLineColor(12);
1184 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)));
1185 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)));
1187 //Amec Thermasol red-2 cover tube FGS300
1188 TGeoConeSeg *cons1 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius,kConeOutRadius+kLay1,kConeOutRadius,kConeOutRadius+kLay1,0,180);
1189 TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
1190 cone11->SetFillColor(2);
1191 cone11->SetLineColor(2);
1192 mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
1193 mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
1195 TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,kLay1/2,kStaveLength-0.50);
1196 TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
1197 plate2->SetFillColor(2);
1198 plate2->SetLineColor(2);
1199 mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate2",0,0,0)));
1201 TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay1/2,kStaveLength-0.50);
1202 TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
1203 plate21->SetFillColor(2);
1204 plate21->SetLineColor(2);
1205 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)));
1206 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)));
1208 TGeoBBox *box22 = new TGeoBBox((kLay1/2),kConeOutRadius/2,kStaveLength-0.50);
1209 TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
1210 plate22->SetFillColor(2);
1211 plate22->SetLineColor(2);
1212 mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1213 mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1214 mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1215 mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1218 TGeoConeSeg *cons2 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,0,180);
1219 TGeoVolume *cone12 = new TGeoVolume("CFleecePipeCover",cons2,medCarbonFleece);
1220 cone12->SetFillColor(28);
1221 cone12->SetLineColor(28);
1222 mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
1223 mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
1225 TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+kLay1)))/2,kLay2/2,kStaveLength-0.50);
1226 TGeoVolume *plate3 = new TGeoVolume("CFleeceMiddle",box3,medCarbonFleece);
1227 plate3->SetFillColor(28);
1228 plate3->SetLineColor(28);
1229 mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate3",0,0,0)));
1231 TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay2/2,kStaveLength-0.50);
1232 TGeoVolume *plate31 = new TGeoVolume("CFleeceLeftRight",box31,medCarbonFleece);
1233 plate31->SetFillColor(28);
1234 plate31->SetLineColor(28);
1235 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)));
1236 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)));
1238 TGeoBBox *box32 = new TGeoBBox((kLay2/2),(kConeOutRadius-kLay1)/2,kStaveLength-0.50);
1239 TGeoVolume *plate32 = new TGeoVolume("CFleeceVertical",box32,medCarbonFleece);
1240 plate32->SetFillColor(28);
1241 plate32->SetLineColor(28);
1242 mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1243 mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1244 mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1245 mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1248 //K13D2U carbon plate
1249 TGeoBBox *box1 = new TGeoBBox(2*kWidth,kLay3/2,kStaveLength-0.50);
1250 TGeoVolume *plate1 = new TGeoVolume("CarbonPlate",box1,medK13D2U2k);
1251 plate1->SetFillColor(5);
1252 plate1->SetLineColor(5);
1253 mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(kLay3/2)),z,new TGeoRotation("plate1",0,0,0)));
1255 //C Fleece bottom plate
1256 TGeoBBox *box6 = new TGeoBBox(2*kWidth,kLay2/2,kStaveLength-0.50);
1257 TGeoVolume *plate6 = new TGeoVolume("CFleeceBottom",box6,medCarbonFleece);
1258 plate6->SetFillColor(2);
1259 plate6->SetLineColor(2);
1260 mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)),z,new TGeoRotation("plate1",0,0,0)));
1265 if (fBuildLevel < 2) {
1266 //Glue layers and kapton
1267 TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, 0.005/2, zsta);
1268 TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
1269 volGlue->SetLineColor(5);
1270 volGlue->SetFillColor(5);
1271 mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
1272 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
1275 if (fBuildLevel < 1) {
1276 TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, 0.01/2, zsta);
1277 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
1278 volCable->SetLineColor(28);
1279 volCable->SetFillColor(28);
1280 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)));
1284 // Done, return the stave structure
1289 //________________________________________________________________________
1290 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xsta,
1291 const Double_t zsta,
1292 const TGeoManager *mgr){
1294 // Create the mechanical stave structure for Model 2.2 of TDR
1299 // mgr : the GeoManager (used only to get the proper material)
1305 // Created: 22 Mar 2013 Chinorat Kobdaj
1306 // Updated: 26 Apr 2013 Mario Sitta
1307 // Updated: 30 Apr 2013 Wanchaloem Poonsawat
1310 // Materials defined in AliITSUv1
1311 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1312 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1314 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
1315 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1316 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1317 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
1318 TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
1319 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
1320 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1323 Double_t kConeOutRadius =(0.1024+0.0025)/2;//0.107/2;
1324 Double_t kConeInRadius = 0.1024/2;//0.10105/2
1325 Double_t kStaveLength = zsta;
1326 Double_t kStaveWidth = xsta*2;
1327 Double_t kWidth = (kStaveWidth)/4;
1328 Double_t kStaveHeight = 0.283;//0.33;
1329 Double_t kHeight = (kStaveHeight)/2;
1330 Double_t kAlpha = 57;//56.31;
1331 Double_t kTheta = kAlpha*TMath::DegToRad();
1332 Double_t kS1 = ((kStaveWidth)/4)/TMath::Sin(kTheta);
1333 Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta);
1334 Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(kThe2);
1335 Double_t kThe2 = TMath::ATan(kHeight/(0.375-0.036));
1336 Double_t kBeta = kThe2*TMath::RadToDeg();
1337 Double_t klay1 = 0.003;//Amec carbon
1338 Double_t klay2 = 0.002;//C Fleece carbon
1339 Double_t klay3 = 0.007;//CFplate K13D2U carbon
1340 Double_t klay4 = 0.007;//GluekStaveLength/2
1341 Double_t klay5 = 0.01;//Flex cable
1342 Double_t kTopVertexMaxWidth = 0.072;
1343 Double_t kTopVertexHeight = 0.04;
1344 Double_t kSideVertexMWidth = 0.052;
1345 Double_t kSideVertexHeight = 0.11;
1348 Int_t loop = (Int_t)(kStaveLength/(2*kL1));
1351 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
1353 Double_t z=0, y=-(2*kConeOutRadius)+klay1+klay2+fSensorThick/2-0.0004, x=0;
1355 TGeoVolume *mechStavVol = 0;
1357 if (fBuildLevel < 5) {
1358 // world (trapezoid)
1359 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
1360 Double_t xv[6] = {kStaveWidth/2,kStaveWidth/2,0.012,-0.012,-kStaveWidth/2,-kStaveWidth/2};
1361 /* Double_t yv[6] = {-2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5),
1362 0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02,
1363 -2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5)}; // (kConeOutRadius*2)-0.0635 */
1364 Double_t yv[6] = {-(kConeOutRadius*2)-0.06395,0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02,-(kConeOutRadius*2)-0.06395}; // (kConeOutRadius*2)-0.064
1365 mechStruct->DefinePolygon(6,xv,yv);
1366 mechStruct->DefineSection(0,-kStaveLength,0,0,1.);
1367 mechStruct->DefineSection(1,kStaveLength,0,0,1.);
1369 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
1370 mechStavVol->SetLineColor(12);
1371 mechStavVol->SetFillColor(12);
1372 mechStavVol->SetVisibility(kTRUE);
1374 //Polyimide Pipe Kapton grey-35
1375 TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius-0.0001,kConeInRadius,kConeOutRadius-0.0001);
1376 TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
1377 volCone1->SetFillColor(35);
1378 volCone1->SetLineColor(35);
1379 mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
1380 mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
1383 if (fBuildLevel < 4) {
1384 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius-0.0001,kStaveLength);
1385 TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
1386 volCoolTubeW->SetFillColor(4);
1387 volCoolTubeW->SetLineColor(4);
1388 mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
1389 mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
1392 if (fBuildLevel < 3) {
1394 // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width)
1395 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
1396 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
1397 volT2->SetLineColor(12);
1398 volT2->SetFillColor(12);
1399 for(int i=0;i<loop;i++){// i<28;i++){
1400 // 1) Front Left Top Filament
1401 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)));
1402 // 2) Front Right Top Filament
1403 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)));
1404 // 3) Back Left Top Filament
1405 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)));
1406 // 4) Back Right Top Filament
1407 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)));
1413 TGeoTrd1 *trd1 = new TGeoTrd1(0,kTopVertexMaxWidth/2,kStaveLength,kTopVertexHeight/2);
1414 TGeoVolume *ibdv = new TGeoVolume("TopVertex",trd1,medM60J3K);
1415 ibdv->SetFillColor(12);
1416 ibdv->SetLineColor(12);
1417 mechStavVol->AddNode(ibdv,1,new TGeoCombiTrans(x,y+kStaveHeight+0.03,z,new TGeoRotation("ibdv",0.,-90,0)));//y+kStaveHeight+0.056
1420 TGeoTrd1 *trd2 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
1421 TGeoVolume *ibdv2 = new TGeoVolume("LeftVertex",trd2,medM60J3K);
1422 ibdv2->SetFillColor(12);
1423 ibdv2->SetLineColor(12);
1424 mechStavVol->AddNode(ibdv2,1,new TGeoCombiTrans(x+kStaveWidth/2-0.06,y-0.0355,z,new TGeoRotation("ibdv2",-103.3,90,0))); //x-kStaveWidth/2-0.09 old Config.C y-0.0355,
1427 TGeoTrd1 *trd3 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
1428 TGeoVolume *ibdv3 = new TGeoVolume("RightVertex",trd3,medM60J3K);
1429 ibdv3->SetFillColor(12);
1430 ibdv3->SetLineColor(12);
1431 mechStavVol->AddNode(ibdv3,1,new TGeoCombiTrans(x-kStaveWidth/2+0.06,y-0.0355,z,new TGeoRotation("ibdv3",103.3,90,0))); //x-kStaveWidth/2+0.09 old Config.C
1434 TGeoConeSeg *cons2 = new TGeoConeSeg(zsta,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,0,180);
1435 TGeoVolume *cone12 = new TGeoVolume("CarbonFleecePipeCover",cons2,medCarbonFleece);
1436 cone12->SetFillColor(28);
1437 cone12->SetLineColor(28);
1438 mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone12",0,0,0)));
1439 mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone12",0,0,0)));
1441 TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+klay1)))/2,klay2/2,zsta);//kStaveLength-0.50);
1442 TGeoVolume *plate3 = new TGeoVolume("CarbonFleeceMiddle",box3,medCarbonFleece);
1443 plate3->SetFillColor(28);
1444 plate3->SetLineColor(28);
1445 mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate3",0,0,0)));
1447 TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,klay2/2,zsta);
1448 TGeoVolume *plate31 = new TGeoVolume("CarbonFleeceLeftRight",box31,medCarbonFleece);
1449 plate31->SetFillColor(28);
1450 plate31->SetLineColor(28);
1451 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)));
1452 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)));
1454 TGeoBBox *box32 = new TGeoBBox((klay2/2),(kConeOutRadius-klay1)/2,zsta);
1455 TGeoVolume *plate32 = new TGeoVolume("CarbonFleeceVertical",box32,medCarbonFleece);
1456 plate32->SetFillColor(28);
1457 plate32->SetLineColor(28);
1458 mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1459 mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1460 mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1461 mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1463 //Amec Thermasol red-2 cover tube FGS300 or Carbon Paper
1464 TGeoConeSeg *cons1 = new TGeoConeSeg(zsta,kConeOutRadius,kConeOutRadius+klay1-0.0001,kConeOutRadius,kConeOutRadius+klay1-0.0001,0,180);//kConeOutRadius+klay1-0.0001
1465 TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
1466 cone11->SetFillColor(2);
1467 cone11->SetLineColor(2);
1468 mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone11",0,0,0)));
1469 mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone11",0,0,0)));
1471 TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,(klay1/2),zsta);//kStaveLength-0.50);
1472 TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
1473 plate2->SetFillColor(2);
1474 plate2->SetLineColor(2);
1475 mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate2",0,0,0)));
1477 TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,(klay1/2),zsta);
1478 TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
1479 plate21->SetFillColor(2);
1480 plate21->SetLineColor(2);
1481 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)));
1482 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)));
1484 TGeoBBox *box22 = new TGeoBBox((klay1/2),kConeOutRadius/2,zsta);
1485 TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
1486 plate22->SetFillColor(2);
1487 plate22->SetLineColor(2);
1488 mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1489 mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1490 mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1491 mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1494 TGeoBBox *box1 = new TGeoBBox(2*kWidth,(klay3)/2,zsta);
1495 TGeoVolume *plate1 = new TGeoVolume("CFPlate",box1,medK13D2U2k);
1496 plate1->SetFillColor(5);
1497 plate1->SetLineColor(5);
1498 mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(klay3/2)),z,new TGeoRotation("plate1",0,0,0)));
1500 //C Fleece bottom plate
1501 TGeoBBox *box6 = new TGeoBBox(2*kWidth,(klay2)/2,zsta);
1502 TGeoVolume *plate6 = new TGeoVolume("CarbonFleeceBottom",box6,medCarbonFleece);
1503 plate6->SetFillColor(2);
1504 plate6->SetLineColor(2);
1505 mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+(klay2/2)),z,new TGeoRotation("plate6",0,0,0)));
1508 if (fBuildLevel < 2) {
1509 //Glue klayers and kapton
1510 TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, (klay4)/2, zsta);
1511 TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
1512 volGlue->SetLineColor(5);
1513 volGlue->SetFillColor(5);
1514 // mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4/2)), z, new TGeoRotation("",0, 0, 0)));
1515 mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4)/2)+0.00005, z, new TGeoRotation("",0, 0, 0)));
1518 if (fBuildLevel < 1) {
1520 TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, klay5/2, zsta);//klay5/2
1521 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
1522 volCable->SetLineColor(28);
1523 volCable->SetFillColor(28);
1524 // mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.0002, z, new TGeoRotation("",0, 0, 0)));
1525 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.01185, z, new TGeoRotation("",0, 0, 0)));
1527 // Done, return the stave structe
1532 //________________________________________________________________________
1533 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xsta,
1534 const Double_t zsta,
1535 const TGeoManager *mgr){
1537 // Create the mechanical stave structure for Model 3 of TDR
1542 // mgr : the GeoManager (used only to get the proper material)
1548 // Created: 28 May 2013 Chinorat Kobdaj
1549 // Updated: Mario Sitta
1550 // Updated: Wanchaloem Poonsawat
1553 // Materials defined in AliITSUv1
1554 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1555 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1557 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
1558 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1559 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1560 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
1561 //TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
1562 //TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
1563 //TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1566 Double_t kConeOutRadius = 0.15/2;
1567 Double_t kStaveLength = zsta*2;
1568 Double_t kStaveWidth = xsta*2;
1569 Double_t w = kStaveWidth/4;//1/2 of W
1570 Double_t staveHeight = 0.3;
1571 Double_t h = staveHeight/2;
1572 Double_t alpha = 90-33.;//90-30;
1573 Double_t the1 = alpha*TMath::DegToRad();
1574 Double_t s1 = w/TMath::Sin(the1);
1575 Double_t l = w/TMath::Tan(the1);
1576 Double_t s2 = TMath::Sqrt(h*h + s1*s1);//TMath::Sin(the2);
1577 Double_t the2 = TMath::ATan(h/s1);
1578 Double_t beta = the2*TMath::RadToDeg();
1579 Double_t klay4 = 0.007; //Glue
1580 Double_t klay5 = 0.01; //Flexcable
1581 Int_t loop = (Int_t)((kStaveLength/(2*l))/2);
1583 Double_t ang1 = 0*TMath::DegToRad();
1584 Double_t ang2 = 0*TMath::DegToRad();
1585 Double_t ang3 = 0*TMath::DegToRad();
1587 Double_t headWidth=0.25;
1588 Double_t smcLength=kStaveLength/chips-2*headWidth;//6.25;
1589 Double_t smcWidth=kStaveWidth;
1590 Double_t smcSide1Thick=0.03;
1591 Double_t vaporThick=0.032;
1592 Double_t liquidThick=0.028;
1593 Double_t smcSide2Thick=0.01;
1594 Double_t smcSide3Thick=0.0055;
1595 Double_t smcSide4Thick=0.0095;
1596 Double_t smcSide5Thick=0.0075;
1597 Double_t smcSpace=0.01;
1601 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
1603 // detailed structure ++++++++++++++
1604 Double_t z=0, y=0-0.007, x=0;
1606 // Polimide micro channels numbers
1607 Double_t yMC = y-h+0.01;
1608 Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
1609 Double_t xstaMC = (nb*0.1-0.08)/2;
1612 TGeoVolume *mechStavVol = 0;
1613 if (fBuildLevel < 5) {
1614 // world (trapezoid)
1615 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
1616 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
1617 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,staveHeight,0,-kConeOutRadius*2-0.07};
1618 mechStruct->DefinePolygon(5,xv,yv);
1619 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
1620 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
1621 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
1622 mechStavVol->SetLineColor(12);
1623 mechStavVol->SetFillColor(12);
1624 mechStavVol->SetVisibility(kTRUE);
1626 // Silicon micro channels numbers
1628 TGeoBBox *tM0a=new TGeoBBox(smcWidth/2, 0.003/2, headWidth/2);
1629 TGeoVolume *volTM0a=new TGeoVolume("microChanTop1", tM0a, medKapton);
1630 volTM0a->SetLineColor(35);
1631 volTM0a->SetFillColor(35);
1633 for(Int_t mo=1; mo<=chips; mo++) {
1634 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)));
1635 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)));
1637 TGeoBBox *tM0c=new TGeoBBox(0.3/2, 0.003/2,smcLength/2);
1638 TGeoVolume *volTM0c=new TGeoVolume("microChanTop2", tM0c, medKapton);
1639 volTM0c->SetLineColor(35);
1640 volTM0c->SetFillColor(35);
1641 for(Int_t mo=1; mo<=chips; mo++) {
1642 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)));
1643 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)));
1645 TGeoBBox *tM0c1=new TGeoBBox(0.2225/2, 0.003/2,smcLength/2);
1646 TGeoVolume *volTM0c1=new TGeoVolume("microChanBot1", tM0c1, medKapton);
1647 volTM0c1->SetLineColor(6);
1648 volTM0c1->SetFillColor(6);
1649 for(Int_t mo=1; mo<=chips; mo++) {
1650 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)));
1651 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)));
1653 TGeoBBox *tM0c2=new TGeoBBox(0.072/2, 0.003/2,smcLength/2);
1654 TGeoVolume *volTM0c2=new TGeoVolume("microChanBot2", tM0c2, medKapton);
1655 volTM0c2->SetLineColor(35);
1656 volTM0c2->SetFillColor(35);
1657 for(Int_t mo=1; mo<=chips; mo++) {
1658 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)));
1660 TGeoBBox *tM0c2r=new TGeoBBox(0.068/2, 0.003/2,smcLength/2);
1661 TGeoVolume *volTM0c2r=new TGeoVolume("microChanBot3", tM0c2r, medKapton);
1662 volTM0c2r->SetLineColor(35);
1663 volTM0c2r->SetFillColor(35);
1664 for(Int_t mo=1; mo<=chips; mo++) {
1665 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)));
1667 TGeoBBox *tM0d=new TGeoBBox(smcSide1Thick/2, 0.035/2,smcLength/2);
1668 TGeoVolume *volTM0d=new TGeoVolume("microChanSide1", tM0d, medKapton);
1669 volTM0d->SetLineColor(12);
1670 volTM0d->SetFillColor(12);
1671 for(Int_t mo=1; mo<=chips; mo++) {
1672 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)));
1673 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)));
1676 TGeoBBox *tM0d1=new TGeoBBox(smcSide2Thick/2, 0.035/2,smcLength/2);
1677 TGeoVolume *volTM0d1=new TGeoVolume("microChanSide2", tM0d1, medKapton);
1678 volTM0d1->SetLineColor(12);
1679 volTM0d1->SetFillColor(12);
1680 for(Int_t mo=1; mo<=chips; mo++) {
1681 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)));
1682 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)));
1684 TGeoBBox *tM0d2=new TGeoBBox(smcSide3Thick/2, (hh+0.003)/2, smcLength/2);
1685 TGeoVolume *volTM0d2=new TGeoVolume("microChanSide3", tM0d2, medKapton);
1686 volTM0d2->SetLineColor(12);
1687 volTM0d2->SetFillColor(12);
1688 for(Int_t mo=1; mo<=chips; mo++) {
1689 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)));
1691 TGeoBBox *tM0d2r=new TGeoBBox(smcSide4Thick/2, (hh+0.003)/2, smcLength/2);
1692 TGeoVolume *volTM0d2r=new TGeoVolume("microChanSide4", tM0d2r, medKapton);
1693 volTM0d2r->SetLineColor(12);
1694 volTM0d2r->SetFillColor(12);
1695 for(Int_t mo=1; mo<=chips; mo++) {
1696 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)));
1698 TGeoBBox *tM0e=new TGeoBBox(smcSide5Thick/2, hh/2,smcLength/2);
1699 TGeoVolume *volTM0e=new TGeoVolume("microChanSide5", tM0e, medKapton);
1700 volTM0e->SetLineColor(12);
1701 volTM0e->SetFillColor(12);
1702 for(Int_t mo=1; mo<=chips; mo++) {
1703 for (Int_t ie=0;ie<11;ie++) {
1704 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)));
1705 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)));
1709 TGeoBBox *tM0f=new TGeoBBox(0.02/2, hh/2, smcLength/2);
1710 TGeoVolume *volTM0f=new TGeoVolume("microChanTop3", tM0f, medKapton);
1711 //Double_t smcChannels=12;
1712 Double_t smcCloseWallvapor=smcWidth/2-smcSide1Thick-vaporThick-smcSide2Thick-smcSide3Thick-12*smcSpace-11*smcSide5Thick;
1713 Double_t smcCloseWallliquid=smcWidth/2-smcSide1Thick-liquidThick-smcSide2Thick-smcSide4Thick-12*smcSpace-11*smcSide5Thick;
1714 volTM0f->SetLineColor(12);
1715 volTM0f->SetFillColor(12);
1716 for(Int_t mo=1; mo<=chips; mo++) {
1717 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)));
1718 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)));
1720 //Head(back) microchannel
1722 TGeoBBox *tM0hb=new TGeoBBox(smcWidth/2, 0.025/2, headWidth/2);
1723 TGeoVolume *volTM0hb=new TGeoVolume("microChanHeadBackBottom1", tM0hb, medKapton);
1724 volTM0hb->SetLineColor(4);
1725 volTM0hb->SetFillColor(4);
1726 for(Int_t mo=1; mo<=chips; mo++) {
1727 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)));
1728 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)));
1730 TGeoBBox *tM0h1=new TGeoBBox(smcWidth/2, 0.013/2, 0.05/2);
1731 TGeoVolume *volTM0h1=new TGeoVolume("microChanHeadBackBottom2", tM0h1, medKapton);
1732 volTM0h1->SetLineColor(5);
1733 volTM0h1->SetFillColor(5);
1734 for(Int_t mo=1; mo<=chips; mo++) {
1735 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)));
1737 TGeoBBox *tM0h2=new TGeoBBox(smcWidth/2, 0.003/2, 0.18/2);
1738 TGeoVolume *volTM0h2=new TGeoVolume("microChanHeadBackBottom7", tM0h2, medKapton);
1739 volTM0h2->SetLineColor(6);
1740 volTM0h2->SetFillColor(6);
1741 for(Int_t mo=1; mo<=chips; mo++) {
1742 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)));
1744 TGeoBBox *tM0h3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
1745 TGeoVolume *volTM0h3=new TGeoVolume("microChanHeadBackBottom3", tM0h3, medKapton);
1746 volTM0h3->SetLineColor(5);
1747 volTM0h3->SetFillColor(5);
1748 for(Int_t mo=1; mo<=chips; mo++) {
1749 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)));
1751 TGeoBBox *tM0b1=new TGeoBBox(smcWidth/2, 0.013/2, 0.03/2);
1752 TGeoVolume *volTM0b1=new TGeoVolume("microChanHeadBackBottom4", tM0b1, medKapton);
1753 volTM0b1->SetLineColor(5);
1754 volTM0b1->SetFillColor(5);
1755 for(Int_t mo=1; mo<=chips; mo++) {
1756 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)));
1758 TGeoBBox *tM0b2=new TGeoBBox(smcWidth/2, 0.003/2, 0.2/2);
1759 TGeoVolume *volTM0b2=new TGeoVolume("microChanHeadBackBottom5", tM0b2, medKapton);
1760 volTM0b2->SetLineColor(6);
1761 volTM0b2->SetFillColor(6);
1762 for(Int_t mo=1; mo<=chips; mo++) {
1763 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)));
1765 TGeoBBox *tM0b3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
1766 TGeoVolume *volTM0b3=new TGeoVolume("microChanHeadBackBottom6", tM0b3, medKapton);
1767 volTM0b3->SetLineColor(5);
1768 volTM0b3->SetFillColor(5);
1769 for(Int_t mo=1; mo<=chips; mo++) {
1770 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)));
1773 TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta);
1774 TGeoVolume *volTM0b=new TGeoVolume("microChanWalls", tM0b, medKapton);
1775 volTM0b->SetLineColor(35);
1776 volTM0b->SetFillColor(35);
1777 for (Int_t ib=0;ib<nb;ib++) {
1778 //mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
1783 if (fBuildLevel < 4) {
1785 //**********cooling inlet outlet
1787 TGeoBBox *tM0dv=new TGeoBBox(vaporThick/2, 0.035/2,smcLength/2);
1788 TGeoVolume *volTM0dv=new TGeoVolume("microChanVapor", tM0dv, medWater);
1789 volTM0dv->SetLineColor(2);
1790 volTM0dv->SetFillColor(2);
1791 for(Int_t mo=1; mo<=chips; mo++) {
1792 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)));
1794 TGeoBBox *tM0dl=new TGeoBBox(liquidThick/2, 0.035/2,smcLength/2);
1795 TGeoVolume *volTM0dl=new TGeoVolume("microChanLiquid", tM0dl, medWater);
1796 volTM0dl->SetLineColor(3);
1797 volTM0dl->SetFillColor(3);
1798 for(Int_t mo=1; mo<=chips; mo++) {
1799 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)));
1801 // small cooling fluid now using water wait for freeon value
1802 TGeoBBox *tM0dlq=new TGeoBBox(smcSpace/2, hh/2,smcLength/2);
1803 TGeoVolume *volTM0dlq=new TGeoVolume("smallLiquid", tM0dlq, medWater);
1804 volTM0dlq->SetLineColor(3);
1805 volTM0dlq->SetFillColor(3);
1806 TGeoBBox *tM0dvp=new TGeoBBox(smcSpace/2, hh/2,smcLength/2);
1807 TGeoVolume *volTM0dvp=new TGeoVolume("microChanVapor", tM0dvp, medWater);
1808 volTM0dvp->SetLineColor(2);
1809 volTM0dvp->SetFillColor(2);
1810 for(Int_t mo=1; mo<=chips; mo++) {
1811 for (Int_t is=0;is<12;is++) {
1812 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)));
1813 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)));
1821 if (fBuildLevel < 3) {
1823 //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length)
1825 Double_t filWidth = 0.04;
1826 Double_t filHeight= 0.02;
1827 TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,s1);
1828 TGeoVolume *volT1=new TGeoVolume("bottomFilament", t1, medM60J3K);
1829 volT1->SetLineColor(12);
1830 volT1->SetFillColor(12);
1831 for(int i=0;i<loop;i++){//i<30;i++){
1832 mechStavVol->AddNode(volT1,4*i+0,
1833 new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2,
1834 new TGeoRotation("volT1",-90,alpha,0)));
1835 mechStavVol->AddNode(volT1,4*i+1,
1836 new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2,
1837 new TGeoRotation("volT1",90,alpha,0)));
1838 mechStavVol->AddNode(volT1,4*i+2,
1839 new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1840 new TGeoRotation("volT1",-90,-alpha,0)));
1841 mechStavVol->AddNode(volT1,4*i+3,
1842 new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1843 new TGeoRotation("volT1",-90,+alpha,0)));
1846 // Top filament CERP black-12 Carbon structure TGeoBBox (length,thickness,width)
1848 TGeoBBox *t2=new TGeoBBox(s2,filHeight/2,filWidth/2);
1849 TGeoVolume *volT2=new TGeoVolume("topFilament", t2, medM60J3K);
1850 volT2->SetLineColor(12);
1851 volT2->SetFillColor(12);
1852 for(int i=0;i<loop;i++){ //i<30;i++){
1853 mechStavVol->AddNode(volT2,4*i+0,
1854 new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
1855 new TGeoRotation("volT2",90,90-alpha,90-beta)));
1856 mechStavVol->AddNode(volT2,4*i+1,
1857 new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
1858 new TGeoRotation("volT2",90,-90+alpha,-90+beta)));
1859 mechStavVol->AddNode(volT2,4*i+2,
1860 new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1861 new TGeoRotation("volT2",90,-90+alpha,90-beta)));
1862 mechStavVol->AddNode(volT2,4*i+3,
1863 new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1864 new TGeoRotation("volT2",90,90-alpha,-90+beta)));
1868 if (fBuildLevel < 2) {
1870 // Glue Filament and Silicon MicroChannel
1871 TGeoBBox *tM0=new TGeoBBox(xstaMC/5, klay4/2, zsta);
1872 TGeoVolume *volTM0=new TGeoVolume("glueFM", tM0,medGlue );
1873 volTM0->SetLineColor(5);
1874 volTM0->SetFillColor(5);
1875 mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x-xsta/2-0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
1876 mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x+xsta/2+0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
1879 // Glue microchannel and sensor
1880 TGeoBBox *glueM = new TGeoBBox(xstaMC/5, klay4/2, zsta);
1881 TGeoVolume *volGlueM=new TGeoVolume("glueMS", glueM, medGlue);
1882 volGlueM->SetLineColor(5);
1883 volGlueM->SetFillColor(5);
1884 mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x-xsta/2-0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
1885 mechStavVol->AddNode(volGlueM, 1, new TGeoCombiTrans(x+xsta/2+0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
1887 // Glue sensor and kapton
1888 TGeoBBox *glue = new TGeoBBox(xsta, klay4/2, zsta);
1889 TGeoVolume *volGlue=new TGeoVolume("glueSensorBus", glue, medGlue);
1890 volGlue->SetLineColor(5);
1891 volGlue->SetFillColor(5);
1892 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4/2, z, new TGeoRotation("",0, 0, 0)));
1895 if (fBuildLevel < 1) {
1896 TGeoBBox *kapCable = new TGeoBBox(xsta, klay5/2, zsta);
1897 TGeoVolume *volCable=new TGeoVolume("Flexcable", kapCable, medFlexCable);
1898 volCable->SetLineColor(28);
1899 volCable->SetFillColor(28);
1900 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4-klay5/2, z, new TGeoRotation("",0, 0, 0)));
1903 // Done, return the stave structur
1907 //________________________________________________________________________
1908 TGeoVolume* AliITSUv1Layer::CreateStaveOuterB(const TGeoManager *mgr){
1910 // Create the chip stave for the Outer Barrel
1913 // mgr : the GeoManager (used only to get the proper material)
1919 // Created: 20 Dec 2013 Mario Sitta
1920 // Updated: 12 Mar 2014 Mario Sitta
1923 TGeoVolume *mechStavVol = 0;
1925 switch (fStaveModel) {
1926 case AliITSUv1::kOBModelDummy:
1927 mechStavVol = CreateStaveModelOuterBDummy(mgr);
1929 case AliITSUv1::kOBModel0:
1930 mechStavVol = CreateStaveModelOuterB0(mgr);
1932 case AliITSUv1::kOBModel1:
1933 mechStavVol = CreateStaveModelOuterB1(mgr);
1936 AliFatal(Form("Unknown stave model %d",fStaveModel));
1943 //________________________________________________________________________
1944 TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterBDummy(const TGeoManager *) const {
1946 // Create dummy stave
1949 // mgr : the GeoManager (used only to get the proper material)
1955 // Created: 20 Dec 2013 Mario Sitta
1959 // Done, return the stave structure
1963 //________________________________________________________________________
1964 TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB0(const TGeoManager *mgr){
1966 // Creation of the mechanical stave structure for the Outer Barrel as in v0
1967 // (we fake the module and halfstave volumes to have always
1968 // the same formal geometry hierarchy)
1971 // mgr : the GeoManager (used only to get the proper material)
1977 // Created: 20 Dec 2013 Mario Sitta
1978 // Updated: 12 Mar 2014 Mario Sitta
1982 Double_t xmod, ymod, zmod;
1983 Double_t xlen, ylen, zlen;
1984 Double_t ypos, zpos;
1987 // First create all needed shapes
1990 xlen = fgkOBHalfStaveWidth;
1991 ylen = 0.5*fStaveThick; // TO BE CHECKED
1992 zlen = fgkOBModuleZLength/2;
1994 TGeoVolume *chipVol = CreateChipInnerB(xlen, ylen, zlen);
1996 xmod = ((TGeoBBox*)chipVol->GetShape())->GetDX();
1997 ymod = ((TGeoBBox*)chipVol->GetShape())->GetDY();
1998 zmod = ((TGeoBBox*)chipVol->GetShape())->GetDZ();
2000 TGeoBBox *module = new TGeoBBox(xmod, ymod, zmod);
2002 zlen = fgkOBModuleZLength*fNModules;
2003 TGeoBBox *hstave = new TGeoBBox(xlen, ylen, zlen/2);
2006 // We have all shapes: now create the real volumes
2008 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
2010 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber);
2011 TGeoVolume *modVol = new TGeoVolume(volname, module, medAir);
2012 modVol->SetVisibility(kTRUE);
2014 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber);
2015 TGeoVolume *hstaveVol = new TGeoVolume(volname, hstave, medAir);
2018 // Finally build it up
2019 modVol->AddNode(chipVol, 0);
2020 fHierarchy[kChip]=1;
2022 for (Int_t j=0; j<fNModules; j++) {
2023 ypos = 0.021; // Remove small overlap - M.S: 21may13
2024 zpos = -hstave->GetDZ() + j*2*zmod + zmod;
2025 hstaveVol->AddNode(modVol, j, new TGeoTranslation(0, ypos, zpos));
2026 fHierarchy[kModule]++;
2030 // Done, return the stave structure
2034 //________________________________________________________________________
2035 TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB1(const TGeoManager *mgr){
2037 // Create the mechanical half stave structure
2038 // for the Outer Barrel as in TDR
2041 // mgr : the GeoManager (used only to get the proper material)
2047 // Created: 20 Nov 2013 Anastasia Barbano
2048 // Updated: 16 Jan 2014 Mario Sitta
2049 // Updated: 24 Feb 2014 Mario Sitta
2054 Double_t yFlex1 = fgkOBFlexCableAlThick;
2055 Double_t yFlex2 = fgkOBFlexCableKapThick;
2056 Double_t flexOverlap = 5; // to be checked
2057 Double_t xHalfSt = fgkOBHalfStaveWidth/2;
2058 Double_t rCoolMin = fgkOBCoolTubeInnerD/2;
2059 Double_t rCoolMax = rCoolMin + fgkOBCoolTubeThick;
2060 Double_t kLay1 = 0.004; // to be checked
2061 Double_t kLay2 = fgkOBGraphiteFoilThick;
2063 Double_t xlen, ylen;
2064 Double_t ymod, zmod;
2065 Double_t xtru[12], ytru[12];
2066 Double_t xpos, ypos, ypos1, zpos/*, zpos5cm*/;
2071 zlen = (fNModules*fgkOBModuleZLength + (fNModules-1)*fgkOBModuleGap)/2;
2074 // First create all needed shapes
2076 TGeoVolume *moduleVol = CreateModuleOuterB();
2077 moduleVol->SetVisibility(kTRUE);
2078 ymod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDY();
2079 zmod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDZ();
2081 TGeoBBox *busAl = new TGeoBBox("BusAl", xHalfSt, fgkOBBusCableAlThick/2,
2083 TGeoBBox *busKap = new TGeoBBox("BusKap", xHalfSt, fgkOBBusCableKapThick/2,
2086 TGeoBBox *coldPlate = new TGeoBBox("ColdPlate", fgkOBHalfStaveWidth/2,
2087 fgkOBColdPlateThick/2, zlen);
2089 TGeoTube *coolTube = new TGeoTube("CoolingTube", rCoolMin, rCoolMax, zlen);
2090 TGeoTube *coolWater = new TGeoTube("CoolingWater", 0., rCoolMin, zlen);
2092 xlen = xHalfSt - fgkOBCoolTubeXDist/2 - coolTube->GetRmax();
2093 TGeoBBox *graphlat = new TGeoBBox("GraphLateral", xlen/2, kLay2/2, zlen);
2095 xlen = fgkOBCoolTubeXDist/2 - coolTube->GetRmax();
2096 TGeoBBox *graphmid = new TGeoBBox("GraphMiddle", xlen, kLay2/2, zlen);
2098 ylen = coolTube->GetRmax() - kLay2;
2099 TGeoBBox *graphvert = new TGeoBBox("GraphVertical", kLay2/2, ylen/2, zlen);
2101 TGeoTubeSeg *graphtub = new TGeoTubeSeg("GraphTube", rCoolMax,
2102 rCoolMax+kLay2, zlen,
2105 xlen = xHalfSt - fgkOBCoolTubeXDist/2 - coolTube->GetRmax() - kLay2;
2106 TGeoBBox *fleeclat = new TGeoBBox("FleecLateral", xlen/2, kLay1/2, zlen);
2108 xlen = fgkOBCoolTubeXDist/2 - coolTube->GetRmax() - kLay2;
2109 TGeoBBox *fleecmid = new TGeoBBox("FleecMiddle", xlen, kLay1/2, zlen);
2111 ylen = coolTube->GetRmax() - kLay2 - kLay1;
2112 TGeoBBox *fleecvert = new TGeoBBox("FleecVertical", kLay1/2, ylen/2, zlen);
2114 TGeoTubeSeg *fleectub = new TGeoTubeSeg("FleecTube", rCoolMax+kLay2,
2115 rCoolMax+kLay1+kLay2,
2118 TGeoBBox *flex1_5cm = new TGeoBBox("Flex1MV_5cm",xHalfSt,yFlex1/2,flexOverlap/2);
2119 TGeoBBox *flex2_5cm = new TGeoBBox("Flex2MV_5cm",xHalfSt,yFlex2/2,flexOverlap/2);
2121 // The half stave container (an XTru to avoid overlaps between neightbours)
2125 ytru[1] = -2*(ymod + busAl->GetDY() + busKap->GetDY() + coldPlate->GetDY()
2126 + graphlat->GetDY() + fleeclat->GetDY());
2127 xtru[2] = fgkOBCoolTubeXDist/2 + fleectub->GetRmax();
2130 ytru[3] = ytru[2] - (coolTube->GetRmax() + fleectub->GetRmax());
2131 xtru[4] = fgkOBCoolTubeXDist/2 - fleectub->GetRmax();
2135 for (Int_t i = 0; i<6; i++) {
2136 xtru[6+i] = -xtru[5-i];
2137 ytru[6+i] = ytru[5-i];
2139 TGeoXtru *halfStave = new TGeoXtru(2);
2140 halfStave->DefinePolygon(12, xtru, ytru);
2141 halfStave->DefineSection(0,-fZLength/2);
2142 halfStave->DefineSection(1, fZLength/2);
2145 // We have all shapes: now create the real volumes
2147 TGeoMedium *medAluminum = mgr->GetMedium("ITS_ALUMINUM$");
2148 TGeoMedium *medCarbon = mgr->GetMedium("ITS_CARBON$");
2149 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
2150 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
2151 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
2152 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); //amec thermasol
2153 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
2156 TGeoVolume *busAlVol = new TGeoVolume("BusAlVol", busAl , medAluminum);
2157 busAlVol->SetLineColor(kCyan);
2158 busAlVol->SetFillColor(busAlVol->GetLineColor());
2159 busAlVol->SetFillStyle(4000); // 0% transparent
2161 TGeoVolume *busKapVol = new TGeoVolume("BusKapVol", busKap, medKapton);
2162 busKapVol->SetLineColor(kBlue);
2163 busKapVol->SetFillColor(busKapVol->GetLineColor());
2164 busKapVol->SetFillStyle(4000); // 0% transparent
2166 TGeoVolume *coldPlateVol = new TGeoVolume("ColdPlateVol",
2167 coldPlate, medCarbon);
2168 coldPlateVol->SetLineColor(kYellow-3);
2169 coldPlateVol->SetFillColor(coldPlateVol->GetLineColor());
2170 coldPlateVol->SetFillStyle(4000); // 0% transparent
2172 TGeoVolume *coolTubeVol = new TGeoVolume("CoolingTubeVol",
2173 coolTube, medKapton);
2174 coolTubeVol->SetLineColor(kGray);
2175 coolTubeVol->SetFillColor(coolTubeVol->GetLineColor());
2176 coolTubeVol->SetFillStyle(4000); // 0% transparent
2178 TGeoVolume *coolWaterVol = new TGeoVolume("CoolingWaterVol",
2179 coolWater,medWater);
2180 coolWaterVol->SetLineColor(kBlue);
2181 coolWaterVol->SetFillColor(coolWaterVol->GetLineColor());
2182 coolWaterVol->SetFillStyle(4000); // 0% transparent
2184 TGeoVolume *graphlatVol = new TGeoVolume("GraphiteFoilLateral",
2185 graphlat, medFGS003);
2186 graphlatVol->SetLineColor(kGreen);
2187 graphlatVol->SetFillColor(graphlatVol->GetLineColor());
2188 graphlatVol->SetFillStyle(4000); // 0% transparent
2190 TGeoVolume *graphmidVol = new TGeoVolume("GraphiteFoilMiddle",
2191 graphmid, medFGS003);
2192 graphmidVol->SetLineColor(kGreen);
2193 graphmidVol->SetFillColor(graphmidVol->GetLineColor());
2194 graphmidVol->SetFillStyle(4000); // 0% transparent
2196 TGeoVolume *graphvertVol = new TGeoVolume("GraphiteFoilVertical",
2197 graphvert, medFGS003);
2198 graphvertVol->SetLineColor(kGreen);
2199 graphvertVol->SetFillColor(graphvertVol->GetLineColor());
2200 graphvertVol->SetFillStyle(4000); // 0% transparent
2202 TGeoVolume *graphtubVol = new TGeoVolume("GraphiteFoilPipeCover",
2203 graphtub, medFGS003);
2204 graphtubVol->SetLineColor(kGreen);
2205 graphtubVol->SetFillColor(graphtubVol->GetLineColor());
2206 graphtubVol->SetFillStyle(4000); // 0% transparent
2208 TGeoVolume *fleeclatVol = new TGeoVolume("CarbonFleeceLateral",
2209 fleeclat, medCarbonFleece);
2210 fleeclatVol->SetLineColor(kViolet);
2211 fleeclatVol->SetFillColor(fleeclatVol->GetLineColor());
2212 fleeclatVol->SetFillStyle(4000); // 0% transparent
2214 TGeoVolume *fleecmidVol = new TGeoVolume("CarbonFleeceMiddle",
2215 fleecmid, medCarbonFleece);
2216 fleecmidVol->SetLineColor(kViolet);
2217 fleecmidVol->SetFillColor(fleecmidVol->GetLineColor());
2218 fleecmidVol->SetFillStyle(4000); // 0% transparent
2220 TGeoVolume *fleecvertVol = new TGeoVolume("CarbonFleeceVertical",
2221 fleecvert, medCarbonFleece);
2222 fleecvertVol->SetLineColor(kViolet);
2223 fleecvertVol->SetFillColor(fleecvertVol->GetLineColor());
2224 fleecvertVol->SetFillStyle(4000); // 0% transparent
2226 TGeoVolume *fleectubVol = new TGeoVolume("CarbonFleecePipeCover",
2227 fleectub, medCarbonFleece);
2228 fleectubVol->SetLineColor(kViolet);
2229 fleectubVol->SetFillColor(fleectubVol->GetLineColor());
2230 fleectubVol->SetFillStyle(4000); // 0% transparent
2232 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber);
2233 TGeoVolume *halfStaveVol = new TGeoVolume(volname, halfStave, medAir);
2234 // halfStaveVol->SetLineColor(12);
2235 // halfStaveVol->SetFillColor(12);
2236 // halfStaveVol->SetVisibility(kTRUE);
2239 TGeoVolume *flex1_5cmVol = new TGeoVolume("Flex1Vol5cm",flex1_5cm,medAluminum);
2240 TGeoVolume *flex2_5cmVol = new TGeoVolume("Flex2Vol5cm",flex2_5cm,medKapton);
2243 flex1_5cmVol->SetLineColor(kRed);
2244 flex2_5cmVol->SetLineColor(kGreen);
2247 // Now build up the half stave
2248 ypos = - busKap->GetDY();
2249 halfStaveVol->AddNode(busKapVol, 1, new TGeoTranslation(0, ypos, 0));
2251 ypos -= (busKap->GetDY() + busAl->GetDY());
2252 halfStaveVol->AddNode(busAlVol, 1, new TGeoTranslation(0, ypos, 0));
2254 ypos -= (busAl->GetDY() + ymod);
2255 for (Int_t j=0; j<fNModules; j++) {
2256 zpos = -zlen + j*(2*zmod + fgkOBModuleGap) + zmod;
2257 halfStaveVol->AddNode(moduleVol, j, new TGeoTranslation(0, ypos, zpos));
2258 fHierarchy[kModule]++;
2261 ypos -= (ymod + coldPlate->GetDY());
2262 halfStaveVol->AddNode(coldPlateVol, 1, new TGeoTranslation(0, ypos, 0));
2264 coolTubeVol->AddNode(coolWaterVol, 1, 0);
2266 xpos = fgkOBCoolTubeXDist/2;
2267 ypos1 = ypos - (coldPlate->GetDY() + coolTube->GetRmax());
2268 halfStaveVol->AddNode(coolTubeVol, 1, new TGeoTranslation(-xpos, ypos1, 0));
2269 halfStaveVol->AddNode(coolTubeVol, 2, new TGeoTranslation( xpos, ypos1, 0));
2271 halfStaveVol->AddNode(graphtubVol, 1, new TGeoTranslation(-xpos, ypos1, 0));
2272 halfStaveVol->AddNode(graphtubVol, 2, new TGeoTranslation( xpos, ypos1, 0));
2274 halfStaveVol->AddNode(fleectubVol, 1, new TGeoTranslation(-xpos, ypos1, 0));
2275 halfStaveVol->AddNode(fleectubVol, 2, new TGeoTranslation( xpos, ypos1, 0));
2277 xpos = xHalfSt - graphlat->GetDX();
2278 ypos1 = ypos - (coldPlate->GetDY() + graphlat->GetDY());
2279 halfStaveVol->AddNode(graphlatVol, 1, new TGeoTranslation(-xpos, ypos1, 0));
2280 halfStaveVol->AddNode(graphlatVol, 2, new TGeoTranslation( xpos, ypos1, 0));
2282 halfStaveVol->AddNode(graphmidVol, 1, new TGeoTranslation(0, ypos1, 0));
2284 xpos = xHalfSt - 2*graphlat->GetDX() + graphvert->GetDX();
2285 ypos1 = ypos - (coldPlate->GetDY() +2*graphlat->GetDY() +graphvert->GetDY());
2286 halfStaveVol->AddNode(graphvertVol, 1, new TGeoTranslation(-xpos, ypos1, 0));
2287 halfStaveVol->AddNode(graphvertVol, 2, new TGeoTranslation( xpos, ypos1, 0));
2288 xpos = graphmid->GetDX() - graphvert->GetDX();
2289 halfStaveVol->AddNode(graphvertVol, 3, new TGeoTranslation(-xpos, ypos1, 0));
2290 halfStaveVol->AddNode(graphvertVol, 4, new TGeoTranslation( xpos, ypos1, 0));
2292 xpos = xHalfSt - fleeclat->GetDX();
2293 ypos1 = ypos - (coldPlate->GetDY() +2*graphlat->GetDY() +fleeclat->GetDY());
2294 halfStaveVol->AddNode(fleeclatVol, 1, new TGeoTranslation(-xpos, ypos1, 0));
2295 halfStaveVol->AddNode(fleeclatVol, 2, new TGeoTranslation( xpos, ypos1, 0));
2297 halfStaveVol->AddNode(fleecmidVol, 1, new TGeoTranslation(0, ypos1, 0));
2299 xpos = xHalfSt - 2*fleeclat->GetDX() + fleecvert->GetDX();
2300 ypos1 = ypos - (coldPlate->GetDY() +2*graphlat->GetDY()
2301 + 2*fleeclat->GetDY() + fleecvert->GetDY());
2302 halfStaveVol->AddNode(fleecvertVol, 1, new TGeoTranslation(-xpos, ypos1, 0));
2303 halfStaveVol->AddNode(fleecvertVol, 2, new TGeoTranslation( xpos, ypos1, 0));
2304 xpos = fleecmid->GetDX() - fleecvert->GetDX();
2305 halfStaveVol->AddNode(fleecvertVol, 3, new TGeoTranslation(-xpos, ypos1, 0));
2306 halfStaveVol->AddNode(fleecvertVol, 4, new TGeoTranslation( xpos, ypos1, 0));
2310 //THE FOLLOWING IS ONLY A REMINDER FOR WHAT IS STILL MISSING
2312 // for (Int_t j=0; j<fNChips; j++) {
2314 // zpos = -(zact + (fNChips-1)*modGap)/2 + j*(zMod + modGap) + zMod/2;
2315 // zpos5cm = -(zact + (fNChips-1)*modGap)/2 + (j+1)*(zMod + modGap) + flexOverlap/2 ;
2317 // halfStaveVol->AddNode(moduleVol, j, new TGeoTranslation(xPos, -ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + ymod, zpos));
2318 // halfStaveVol->AddNode(moduleVol, fNChips+j, new TGeoTranslation(-xPos, -ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + ymod +deltaY, zpos));
2320 // if((j+1)!=fNChips){
2321 // halfStaveVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2,zpos5cm));
2322 // halfStaveVol->AddNode(flex1_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2 +deltaY,zpos5cm));
2323 // halfStaveVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2,zpos5cm));
2324 // 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));
2327 // halfStaveVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos5cm-modGap));
2328 // halfStaveVol->AddNode(flex1_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 +deltaY,zpos5cm-modGap));
2329 // halfStaveVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate +2*ymod + yFlex1 + yFlex2/2,zpos5cm-modGap));
2330 // halfStaveVol->AddNode(flex2_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 +deltaY,zpos5cm-modGap));
2336 // Done, return the half stave structure
2337 return halfStaveVol;
2340 //________________________________________________________________________
2341 TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB(const TGeoManager *mgr){
2343 // Create the space frame for the Outer Barrel
2346 // mgr : the GeoManager (used only to get the proper material)
2354 TGeoVolume *mechStavVol = 0;
2356 switch (fStaveModel) {
2357 case AliITSUv1::kOBModelDummy:
2358 case AliITSUv1::kOBModel0:
2359 mechStavVol = CreateSpaceFrameOuterBDummy(mgr);
2361 case AliITSUv1::kOBModel1:
2362 mechStavVol = CreateSpaceFrameOuterB1(mgr);
2365 AliFatal(Form("Unknown stave model %d",fStaveModel));
2372 //________________________________________________________________________
2373 TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterBDummy(const TGeoManager *) const {
2375 // Create dummy stave
2378 // mgr : the GeoManager (used only to get the proper material)
2386 // Done, return the stave structur
2390 //________________________________________________________________________
2391 TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB1(const TGeoManager *mgr){
2393 // Create the space frame for the Outer Barrel (Model 1)
2396 // mgr : the GeoManager (used only to get the proper material)
2401 // a TGeoVolume with the Space Frame of a stave
2403 // Created: 20 Dec 2013 Anastasia Barbano
2404 // Updated: 15 Jan 2014 Mario Sitta
2405 // Updated: 18 Feb 2014 Mario Sitta
2406 // Updated: 12 Mar 2014 Mario Sitta
2410 // Materials defined in AliITSUv0
2411 TGeoMedium *medCarbon = mgr->GetMedium("ITS_CARBON$");
2412 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
2416 Double_t sframeWidth = fgkOBSpaceFrameWidth;
2417 Double_t sframeHeight = fgkOBSpaceFrameTotHigh - fgkOBHalfStaveYTrans;
2418 Double_t staveBeamRadius = fgkOBSFrameBeamRadius;
2419 Double_t staveLa = fgkOBSpaceFrameLa;
2420 Double_t staveHa = fgkOBSpaceFrameHa;
2421 Double_t staveLb = fgkOBSpaceFrameLb;
2422 Double_t staveHb = fgkOBSpaceFrameHb;
2423 Double_t stavel = fgkOBSpaceFrameL;
2424 Double_t bottomBeamAngle = fgkOBSFBotBeamAngle;
2425 Double_t triangleHeight = sframeHeight - staveBeamRadius;
2426 Double_t halfTheta = TMath::ATan( 0.5*sframeWidth/triangleHeight );
2427 // Double_t alpha = TMath::Pi()*3./4. - halfTheta/2.;
2428 Double_t beta = (TMath::Pi() - 2.*halfTheta)/4.;
2429 // Double_t distCenterSideDown = 0.5*sframeWidth/TMath::Cos(beta);
2432 Double_t xpos, ypos, zpos;
2437 zlen = fNModules*fgkOBModuleZLength + (fNModules-1)*fgkOBModuleGap;
2439 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber);
2440 if (gGeoManager->GetVolume(volname)) { // Should always be so
2441 sframeHeight -= ((TGeoBBox*)gGeoManager->GetVolume(volname)->GetShape())->GetDY()*2;
2442 zlen = ((TGeoBBox*)gGeoManager->GetVolume(volname)->GetShape())->GetDZ()*2;
2444 seglen = zlen/fNModules;
2447 // First create all needed shapes and volumes
2449 TGeoBBox *spaceFrame = new TGeoBBox(sframeWidth/2,sframeHeight/2,zlen/2);
2450 TGeoBBox *segment = new TGeoBBox(sframeWidth/2,sframeHeight/2,seglen/2);
2452 TGeoVolume *spaceFrameVol = new TGeoVolume("CarbonFrameVolume",
2453 spaceFrame, medAir);
2454 spaceFrameVol->SetVisibility(kFALSE);
2456 TGeoVolume *segmentVol = new TGeoVolume("segmentVol", segment, medAir);
2460 //--- the top V of the Carbon Fiber Stave (segment)
2461 TGeoArb8 *cfStavTop1 = CreateStaveSide("CFstavTopCornerVol1shape", seglen/2., halfTheta, -1, staveLa, staveHa, stavel);
2462 TGeoVolume *cfStavTopVol1 = new TGeoVolume("CFstavTopCornerVol1",
2463 cfStavTop1, medCarbon);
2464 cfStavTopVol1->SetLineColor(35);
2466 TGeoArb8 *cfStavTop2 = CreateStaveSide("CFstavTopCornerVol2shape", seglen/2., halfTheta, 1, staveLa, staveHa, stavel);
2467 TGeoVolume *cfStavTopVol2 = new TGeoVolume("CFstavTopCornerVol2",
2468 cfStavTop2, medCarbon );
2469 cfStavTopVol2->SetLineColor(35);
2471 TGeoTranslation *trTop1 = new TGeoTranslation(0, sframeHeight/2, 0);
2474 TGeoArb8 *cfStavSide1 = CreateStaveSide("CFstavSideCornerVol1shape", seglen/2., beta, -1, staveLb, staveHb, stavel);
2475 TGeoVolume *cfStavSideVol1 = new TGeoVolume("CFstavSideCornerVol1",
2476 cfStavSide1, medCarbon);
2477 cfStavSideVol1->SetLineColor(35);
2479 TGeoArb8 *cfStavSide2 = CreateStaveSide("CFstavSideCornerVol2shape", seglen/2., beta, 1, staveLb, staveHb, stavel);
2480 TGeoVolume *cfStavSideVol2 = new TGeoVolume("CFstavSideCornerVol2",
2481 cfStavSide2, medCarbon );
2482 cfStavSideVol2->SetLineColor(35);
2484 xpos = -sframeWidth/2;
2485 ypos = -sframeHeight/2 + staveBeamRadius + staveHb*TMath::Sin(beta);
2486 TGeoCombiTrans *ctSideR = new TGeoCombiTrans( xpos, ypos, 0,
2487 new TGeoRotation("", 180-2*beta*TMath::RadToDeg(), 0, 0));
2488 TGeoCombiTrans *ctSideL = new TGeoCombiTrans(-xpos, ypos, 0,
2489 new TGeoRotation("",-180+2*beta*TMath::RadToDeg(), 0, 0));
2491 segmentVol->AddNode(cfStavTopVol1,1,trTop1);
2492 segmentVol->AddNode(cfStavTopVol2,1,trTop1);
2493 segmentVol->AddNode(cfStavSideVol1,1,ctSideR);
2494 segmentVol->AddNode(cfStavSideVol1,2,ctSideL);
2495 segmentVol->AddNode(cfStavSideVol2,1,ctSideR);
2496 segmentVol->AddNode(cfStavSideVol2,2,ctSideL);
2500 // Beams on the sides
2501 Double_t beamPhiPrime = TMath::ASin(1./TMath::Sqrt( (1+TMath::Sin(2*beta)*TMath::Sin(2*beta)/(TanD(fgkOBSFrameBeamSidePhi)*TanD(fgkOBSFrameBeamSidePhi))) ));
2502 Double_t beamLength = TMath::Sqrt( sframeHeight*sframeHeight/( TMath::Sin(beamPhiPrime)*TMath::Sin(beamPhiPrime))+ sframeWidth*sframeWidth/4.)-staveLa/2-staveLb/2;
2503 TGeoTubeSeg *sideBeam = new TGeoTubeSeg(0, staveBeamRadius,
2504 beamLength/2, 0, 180);
2505 TGeoVolume *sideBeamVol = new TGeoVolume("CFstavSideBeamVol",
2506 sideBeam, medCarbon);
2507 sideBeamVol->SetLineColor(35);
2509 TGeoRotation *beamRot1 = new TGeoRotation("", /*90-2*beta*/halfTheta*TMath::RadToDeg(),
2510 -beamPhiPrime*TMath::RadToDeg(), -90);
2511 TGeoRotation *beamRot2 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(),
2512 beamPhiPrime*TMath::RadToDeg(), -90);
2513 TGeoRotation *beamRot3 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),
2514 beamPhiPrime*TMath::RadToDeg(), -90);
2515 TGeoRotation *beamRot4 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),
2516 -beamPhiPrime*TMath::RadToDeg(), -90);
2518 TGeoCombiTrans *beamTransf[8];
2519 xpos = 0.49*triangleHeight*TMath::Tan(halfTheta);//was 0.5, fix small overlap
2520 ypos = staveBeamRadius/2;
2522 beamTransf[0] = new TGeoCombiTrans( xpos, ypos,-3*zpos, beamRot1);
2524 beamTransf[1] = new TGeoCombiTrans( xpos, ypos,-3*zpos, beamRot1);
2525 AddTranslationToCombiTrans(beamTransf[1], 0, 0, seglen/2);
2527 beamTransf[2] = new TGeoCombiTrans( xpos, ypos, -zpos, beamRot2);
2529 beamTransf[3] = new TGeoCombiTrans( xpos, ypos, -zpos, beamRot2);
2530 AddTranslationToCombiTrans(beamTransf[3], 0, 0, seglen/2);
2532 beamTransf[4] = new TGeoCombiTrans(-xpos, ypos,-3*zpos, beamRot3);
2534 beamTransf[5] = new TGeoCombiTrans(-xpos, ypos,-3*zpos, beamRot3);
2535 AddTranslationToCombiTrans(beamTransf[5], 0, 0, seglen/2);
2537 beamTransf[6] = new TGeoCombiTrans(-xpos, ypos, -zpos, beamRot4);
2538 beamTransf[7] = new TGeoCombiTrans(-xpos, ypos, 3*zpos, beamRot4);
2540 //--- Beams of the bottom
2541 TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, staveBeamRadius,
2542 sframeWidth/2.-staveLb/3, 0, 180);
2543 TGeoVolume *bottomBeam1Vol = new TGeoVolume("CFstavBottomBeam1Vol",
2544 bottomBeam1, medCarbon);
2545 bottomBeam1Vol->SetLineColor(35);
2547 TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, staveBeamRadius,
2548 sframeWidth/2.-staveLb/3, 0, 90);
2549 TGeoVolume *bottomBeam2Vol = new TGeoVolume("CFstavBottomBeam2Vol",
2550 bottomBeam2, medCarbon);
2551 bottomBeam2Vol->SetLineColor(35);
2553 TGeoTubeSeg *bottomBeam3 = new TGeoTubeSeg(0, staveBeamRadius,
2554 0.5*sframeWidth/SinD(bottomBeamAngle) - staveLb/3,
2556 TGeoVolume *bottomBeam3Vol = new TGeoVolume("CFstavBottomBeam3Vol",
2557 bottomBeam3, medCarbon);
2558 bottomBeam3Vol->SetLineColor(35);
2560 TGeoRotation *bottomBeamRot1 = new TGeoRotation("", 90, 90, 90);
2561 TGeoRotation *bottomBeamRot2 = new TGeoRotation("",-90, 90, -90);
2563 TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans("",0,
2564 -(sframeHeight/2-staveBeamRadius), 0,
2566 TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0,
2567 -(sframeHeight/2-staveBeamRadius),
2570 TGeoCombiTrans *bottomBeamTransf3 = new TGeoCombiTrans(0,
2571 -(sframeHeight/2-staveBeamRadius),
2574 // be careful for beams #3: when "reading" from -z to +z and
2575 // from the bottom of the stave, it should draw a Lambda, and not a V
2576 TGeoRotation *bottomBeamRot4 = new TGeoRotation("",-90, bottomBeamAngle,-90);
2577 TGeoRotation *bottomBeamRot5 = new TGeoRotation("",-90,-bottomBeamAngle,-90);
2579 TGeoCombiTrans *bottomBeamTransf4 = new TGeoCombiTrans(0,
2580 -(sframeHeight/2-staveBeamRadius),
2583 TGeoCombiTrans *bottomBeamTransf5 = new TGeoCombiTrans(0,
2584 -(sframeHeight/2-staveBeamRadius),
2589 segmentVol->AddNode(sideBeamVol,1, beamTransf[0]);
2590 segmentVol->AddNode(sideBeamVol,2, beamTransf[1]);
2591 segmentVol->AddNode(sideBeamVol,3, beamTransf[2]);
2592 segmentVol->AddNode(sideBeamVol,4, beamTransf[3]);
2593 segmentVol->AddNode(sideBeamVol,5, beamTransf[4]);
2594 segmentVol->AddNode(sideBeamVol,6, beamTransf[5]);
2595 segmentVol->AddNode(sideBeamVol,7, beamTransf[6]);
2596 segmentVol->AddNode(sideBeamVol,8, beamTransf[7]);
2597 segmentVol->AddNode(bottomBeam1Vol,1,bottomBeamTransf1);
2598 segmentVol->AddNode(bottomBeam2Vol,1,bottomBeamTransf2);
2599 segmentVol->AddNode(bottomBeam2Vol,2,bottomBeamTransf3);
2600 segmentVol->AddNode(bottomBeam3Vol,1,bottomBeamTransf4);
2601 segmentVol->AddNode(bottomBeam3Vol,2,bottomBeamTransf5);
2604 // Then build up the space frame
2605 for(Int_t i=0; i<fNModules; i++){
2606 zpos = -spaceFrame->GetDZ() + (1 + 2*i)*segment->GetDZ();
2607 spaceFrameVol->AddNode(segmentVol, i, new TGeoTranslation(0, 0, zpos));
2611 // Done, return the space frame structure
2612 return spaceFrameVol;
2615 //________________________________________________________________________
2616 TGeoVolume* AliITSUv1Layer::CreateChipInnerB(const Double_t xchip,
2617 const Double_t ychip,
2618 const Double_t zchip,
2619 const TGeoManager *mgr){
2621 // Creates the actual Chip
2624 // xchip,ychip,zchip : the chip dimensions
2625 // mgr : the GeoManager (used only to get the proper material)
2631 // Created: 22 Jun 2011 Mario Sitta
2635 Double_t xlen, ylen, zlen;
2636 Double_t xpos, ypos, zpos;
2639 // First create all needed shapes
2642 TGeoBBox *chip = new TGeoBBox(xchip, ychip, zchip);
2645 xlen = chip->GetDX();
2646 ylen = 0.5*fSensorThick;
2647 zlen = chip->GetDZ();
2648 TGeoBBox *sensor = new TGeoBBox(xlen, ylen, zlen);
2651 // We have all shapes: now create the real volumes
2652 TGeoMedium *medSi = mgr->GetMedium("ITS_SI$");
2654 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSChipPattern(), fLayerNumber);
2655 TGeoVolume *chipVol = new TGeoVolume(volname, chip, medSi);
2656 chipVol->SetVisibility(kTRUE);
2657 chipVol->SetLineColor(1);
2659 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSSensorPattern(), fLayerNumber);
2660 TGeoVolume *sensVol = new TGeoVolume(volname, sensor, medSi);
2661 sensVol->SetVisibility(kTRUE);
2662 sensVol->SetLineColor(8);
2663 sensVol->SetLineWidth(1);
2664 sensVol->SetFillColor(sensVol->GetLineColor());
2665 sensVol->SetFillStyle(4000); // 0% transparent
2668 // Now build up the chip
2670 ypos = -chip->GetDY() + sensor->GetDY();
2673 chipVol->AddNode(sensVol, 1, new TGeoTranslation(xpos, ypos, zpos));
2675 // Done, return the chip
2679 //________________________________________________________________________
2680 TGeoVolume* AliITSUv1Layer::CreateModuleOuterB(const TGeoManager *mgr){
2682 // Creates the OB Module: HIC + FPC + Carbon plate
2685 // mgr : the GeoManager (used only to get the proper material)
2690 // the module as a TGeoVolume
2692 // Created: 18 Dec 2013 M. Sitta, A. Barbano
2693 // Updated: 26 Feb 2014 M. Sitta
2699 Double_t xGap = fgkOBChipXGap;
2700 Double_t zGap = fgkOBChipZGap;
2702 Double_t xchip, ychip, zchip;
2703 Double_t xlen, ylen, zlen;
2704 Double_t xpos, ypos, zpos;
2706 // First create all needed shapes
2708 // The chip (the same as for IB)
2709 xlen = (fgkOBHalfStaveWidth/2-xGap/2)/fgkOBNChipRows;
2710 ylen = 0.5*fStaveThick; // TO BE CHECKED
2711 zlen = (fgkOBModuleZLength - (fgkOBChipsPerRow-1)*zGap)/(2*fgkOBChipsPerRow);
2713 TGeoVolume *chipVol = CreateChipInnerB(xlen, ylen, zlen);
2715 xchip = ((TGeoBBox*)chipVol->GetShape())->GetDX();
2716 ychip = ((TGeoBBox*)chipVol->GetShape())->GetDY();
2717 zchip = ((TGeoBBox*)chipVol->GetShape())->GetDZ();
2719 // The module carbon plate
2720 xlen = fgkOBHalfStaveWidth/2;
2721 ylen = fgkOBCarbonPlateThick/2;
2722 zlen = fgkOBModuleZLength/2;
2723 TGeoBBox *modPlate = new TGeoBBox("CarbonPlate", xlen, ylen, zlen);
2726 ylen = fgkOBGlueThick/2;
2727 TGeoBBox *glue = new TGeoBBox("Glue", xlen, ylen, zlen);
2730 ylen = fgkOBFlexCableAlThick/2;
2731 TGeoBBox *flexAl = new TGeoBBox("FlexAl", xlen, ylen, zlen);
2733 ylen = fgkOBFlexCableKapThick/2;
2734 TGeoBBox *flexKap = new TGeoBBox("FlexKap", xlen, ylen, zlen);
2737 xlen = fgkOBHalfStaveWidth/2;
2738 ylen = ychip + modPlate->GetDY() + glue->GetDY() +
2739 flexAl->GetDY() + flexKap->GetDY();
2740 zlen = fgkOBModuleZLength/2;
2741 TGeoBBox *module = new TGeoBBox("OBModule", xlen, ylen, zlen);
2744 // We have all shapes: now create the real volumes
2746 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
2747 TGeoMedium *medCarbon = mgr->GetMedium("ITS_CARBON$");
2748 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
2749 TGeoMedium *medAluminum = mgr->GetMedium("ITS_ALUMINUM$");
2750 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
2752 TGeoVolume *modPlateVol = new TGeoVolume("CarbonPlateVol",
2753 modPlate, medCarbon);
2754 modPlateVol->SetLineColor(kMagenta-8);
2755 modPlateVol->SetFillColor(modPlateVol->GetLineColor());
2756 modPlateVol->SetFillStyle(4000); // 0% transparent
2758 TGeoVolume *glueVol = new TGeoVolume("GlueVol", glue, medGlue);
2759 glueVol->SetLineColor(kBlack);
2760 glueVol->SetFillColor(glueVol->GetLineColor());
2761 glueVol->SetFillStyle(4000); // 0% transparent
2763 TGeoVolume *flexAlVol = new TGeoVolume("FlexAlVol", flexAl, medAluminum);
2764 flexAlVol->SetLineColor(kRed);
2765 flexAlVol->SetFillColor(flexAlVol->GetLineColor());
2766 flexAlVol->SetFillStyle(4000); // 0% transparent
2768 TGeoVolume *flexKapVol = new TGeoVolume("FlexKapVol", flexKap, medKapton);
2769 flexKapVol->SetLineColor(kGreen);
2770 flexKapVol->SetFillColor(flexKapVol->GetLineColor());
2771 flexKapVol->SetFillStyle(4000); // 0% transparent
2773 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber);
2774 TGeoVolume *modVol = new TGeoVolume(volname, module, medAir);
2775 modVol->SetVisibility(kTRUE);
2778 // Now build up the module
2779 ypos = -module->GetDY() + modPlate->GetDY();
2780 modVol->AddNode(modPlateVol, 1, new TGeoTranslation(0, ypos, 0));
2782 ypos += (modPlate->GetDY() + glue->GetDY());
2783 modVol->AddNode(glueVol, 1, new TGeoTranslation(0, ypos, 0));
2785 xpos = -module->GetDX() + xchip;
2786 ypos += (glue->GetDY() + ychip);
2787 for(Int_t k=0; k<fgkOBChipsPerRow; k++) //put 7x2 chip into one module
2789 zpos = -module->GetDZ() + zchip + k*(2*zchip + zGap);
2790 modVol->AddNode(chipVol, 2*k , new TGeoTranslation( xpos, ypos, zpos));
2791 modVol->AddNode(chipVol, 2*k+1,
2792 new TGeoCombiTrans(-xpos, ypos, zpos, new TGeoRotation("",0,180,180)));
2793 fHierarchy[kChip]+=2;
2796 ypos += (ychip + flexAl->GetDY());
2797 modVol->AddNode(flexAlVol, 1, new TGeoTranslation(0, ypos, 0));
2799 ypos += (flexAl->GetDY() + flexKap->GetDY());
2800 modVol->AddNode(flexKapVol, 1, new TGeoTranslation(0, ypos, 0));
2803 // Done, return the module
2807 //________________________________________________________________________
2808 Double_t AliITSUv1Layer::RadiusOfTurboContainer(){
2810 // Computes the inner radius of the air container for the Turbo configuration
2811 // as the radius of either the circle tangent to the stave or the circle
2812 // passing for the stave's lower vertex
2815 // none (all needed parameters are class members)
2820 // the radius of the container if >0, else flag to use the lower vertex
2822 // Created: 08 Mar 2012 Mario Sitta
2825 Double_t rr, delta, z, lstav, rstav;
2827 if (fStaveThick > 89.) // Very big angle: avoid overflows since surely
2828 return -1; // the radius from lower vertex is the right value
2830 rstav = fLayRadius + 0.5*fStaveThick;
2831 delta = (0.5*fStaveThick)/CosD(fStaveTilt);
2832 z = (0.5*fStaveThick)*TanD(fStaveTilt);
2835 lstav = (0.5*fStaveWidth) - z;
2837 if ( (rr*SinD(fStaveTilt) < lstav) )
2838 return (rr*CosD(fStaveTilt));
2843 //________________________________________________________________________
2844 void AliITSUv1Layer::SetNUnits(Int_t u)
2847 // Sets the number of units in a stave:
2848 // for the Inner Barrel: the number of chips per stave
2849 // for the Outer Barrel: the number of modules per half stave
2853 // u : the number of units
2859 // Created: 18 Feb 2013 Mario Sitta (was already SetNChips)
2862 if (fLayerNumber < fgkNumberOfInnerLayers)
2866 fNChips = fgkOBChipsPerRow;
2871 //________________________________________________________________________
2872 void AliITSUv1Layer::SetStaveTilt(const Double_t t)
2875 // Sets the Stave tilt angle (for turbo layers only)
2878 // t : the stave tilt angle
2884 // Created: 08 Jul 2011 Mario Sitta
2890 AliError("Not a Turbo layer");
2894 //________________________________________________________________________
2895 void AliITSUv1Layer::SetStaveWidth(const Double_t w){
2897 // Sets the Stave width (for turbo layers only)
2900 // w : the stave width
2906 // Created: 08 Jul 2011 Mario Sitta
2912 AliError("Not a Turbo layer");
2916 //________________________________________________________________________
2917 TGeoArb8 *AliITSUv1Layer::CreateStaveSide(const char *name,
2918 Double_t dz, Double_t angle, Double_t xSign,
2919 Double_t L, Double_t H, Double_t l) {
2921 // Creates the V-shaped sides of the OB space frame
2922 // (from a similar method with same name and function
2923 // in AliITSv11GeometrySDD class by L.Gaudichet)
2926 // Create one half of the V shape corner of CF stave
2928 TGeoArb8 *cfStavSide = new TGeoArb8(dz);
2929 cfStavSide->SetName(name);
2931 // Points must be in clockwise order
2932 cfStavSide->SetVertex(0, 0, 0);
2933 cfStavSide->SetVertex(2, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
2934 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
2935 cfStavSide->SetVertex(4, 0, 0);
2936 cfStavSide->SetVertex(6, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
2937 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
2939 cfStavSide->SetVertex(1, 0, -H);
2940 cfStavSide->SetVertex(3, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
2941 cfStavSide->SetVertex(5, 0, -H);
2942 cfStavSide->SetVertex(7, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
2944 cfStavSide->SetVertex(1, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
2945 cfStavSide->SetVertex(3, 0, -H);
2946 cfStavSide->SetVertex(5, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
2947 cfStavSide->SetVertex(7, 0, -H);
2952 //________________________________________________________________________
2953 TGeoCombiTrans *AliITSUv1Layer::CreateCombiTrans(const char *name,
2954 Double_t dy, Double_t dz,
2955 Double_t dphi, Bool_t planeSym) {
2957 // Help method to create a TGeoCombiTrans matrix
2958 // (from a similar method with same name and function
2959 // in AliITSv11GeometrySDD class by L.Gaudichet)
2963 // return the TGeoCombiTrans which make a translation in y and z
2964 // and a rotation in phi in the global coord system
2965 // If planeSym = true, the rotation places the object symetrically
2966 // (with respect to the transverse plane) to its position in the
2967 // case planeSym = false
2970 TGeoTranslation t1(dy*CosD(90.+dphi),dy*SinD(90.+dphi), dz);
2971 TGeoRotation r1("",0.,0.,dphi);
2972 TGeoRotation r2("",90, 180, -90-dphi);
2974 TGeoCombiTrans *combiTrans1 = new TGeoCombiTrans(name);
2975 combiTrans1->SetTranslation(t1);
2976 if (planeSym) combiTrans1->SetRotation(r1);
2977 else combiTrans1->SetRotation(r2);
2981 //________________________________________________________________________
2982 void AliITSUv1Layer::AddTranslationToCombiTrans(TGeoCombiTrans* ct,
2987 // Help method to add a translation to a TGeoCombiTrans matrix
2988 // (from a similar method with same name and function
2989 // in AliITSv11GeometrySDD class by L.Gaudichet)
2992 // Add a dx,dy,dz translation to the initial TGeoCombiTrans
2993 const Double_t *vect = ct->GetTranslation();
2994 Double_t newVect[3] = {vect[0]+dx, vect[1]+dy, vect[2]+dz};
2995 ct->SetTranslation(newVect);