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: AliITSUv0Layer.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 "AliITSUv0Layer.h"
41 #include "AliITSUGeomTGeo.h"
43 #include <TGeoShape.h>
45 using namespace TMath;
47 const Double_t AliITSUv0Layer::fgkDefaultSensorThick = 300*fgkmicron;
48 const Double_t AliITSUv0Layer::fgkDefaultStaveThick = 1*fgkcm;
50 ClassImp(AliITSUv0Layer)
54 //________________________________________________________________________
55 AliITSUv0Layer::AliITSUv0Layer():
70 fStaveModel(AliITSUv0::kModelDummy)
73 // Standard constructor
77 //________________________________________________________________________
78 AliITSUv0Layer::AliITSUv0Layer(Int_t debug):
79 AliITSv11Geometry(debug),
93 fStaveModel(AliITSUv0::kModelDummy)
96 // Constructor setting debugging level
100 //________________________________________________________________________
101 AliITSUv0Layer::AliITSUv0Layer(Int_t lay, Int_t debug):
102 AliITSv11Geometry(debug),
116 fStaveModel(AliITSUv0::kModelDummy)
119 // Constructor setting layer number and debugging level
123 //________________________________________________________________________
124 AliITSUv0Layer::AliITSUv0Layer(Int_t lay, Bool_t turbo, Int_t debug):
125 AliITSv11Geometry(debug),
139 fStaveModel(AliITSUv0::kModelDummy)
142 // Constructor setting layer number and debugging level
143 // for a "turbo" layer (i.e. where staves overlap in phi)
147 //________________________________________________________________________
148 AliITSUv0Layer::AliITSUv0Layer(const AliITSUv0Layer &s):
149 AliITSv11Geometry(s.GetDebug()),
150 fLayerNumber(s.fLayerNumber),
152 fLayRadius(s.fLayRadius),
153 fZLength(s.fZLength),
154 fSensorThick(s.fSensorThick),
155 fStaveThick(s.fStaveThick),
156 fStaveWidth(s.fStaveWidth),
157 fStaveTilt(s.fStaveTilt),
158 fNStaves(s.fNStaves),
160 fChipTypeID(s.fChipTypeID),
161 fIsTurbo(s.fIsTurbo),
162 fBuildLevel(s.fBuildLevel),
163 fStaveModel(s.fStaveModel)
170 //________________________________________________________________________
171 AliITSUv0Layer& AliITSUv0Layer::operator=(const AliITSUv0Layer &s)
174 // Assignment operator
176 if(&s == this) return *this;
178 fLayerNumber = s.fLayerNumber;
180 fLayRadius = s.fLayRadius;
181 fZLength = s.fZLength;
182 fSensorThick = s.fSensorThick;
183 fStaveThick = s.fStaveThick;
184 fStaveWidth = s.fStaveWidth;
185 fStaveTilt = s.fStaveTilt;
186 fNStaves = s.fNStaves;
188 fIsTurbo = s.fIsTurbo;
189 fChipTypeID = s.fChipTypeID;
190 fBuildLevel = s.fBuildLevel;
191 fStaveModel = s.fStaveModel;
196 //________________________________________________________________________
197 AliITSUv0Layer::~AliITSUv0Layer() {
203 //________________________________________________________________________
204 void AliITSUv0Layer::CreateLayer(TGeoVolume *moth){
206 // Creates the actual Layer and places inside its mother volume
209 // moth : the TGeoVolume owing the volume structure
215 // Created: 17 Jun 2011 Mario Sitta
216 // Updated: 08 Jul 2011 Mario Sitta
217 // Updated: 20 May 2013 Mario Sitta Layer is Assembly instead of Tube
221 Double_t xpos, ypos, zpos;
225 // Check if the user set the proper parameters
226 if (fLayRadius <= 0) AliFatal(Form("Wrong layer radius (%f)",fLayRadius));
227 if (fZLength <= 0) AliFatal(Form("Wrong layer length (%f)",fZLength));
228 if (fNStaves <= 0) AliFatal(Form("Wrong number of staves (%d)",fNStaves));
229 if (fNChips <= 0) AliFatal(Form("Wrong number of chips (%d)",fNChips));
231 if (fStaveThick <= 0) {
232 AliInfo(Form("Stave thickness wrong or not set (%f), using default (%f)",
233 fStaveThick,fgkDefaultStaveThick));
234 fStaveThick = fgkDefaultStaveThick;
237 if (fSensorThick <= 0) {
238 AliInfo(Form("Sensor thickness wrong or not set (%f), using default (%f)",
239 fSensorThick,fgkDefaultSensorThick));
240 fSensorThick = fgkDefaultSensorThick;
243 if (fSensorThick > fStaveThick) {
244 AliWarning(Form("Sensor thickness (%f) is greater than stave thickness (%f), fixing",
245 fSensorThick,fStaveThick));
246 fSensorThick = fStaveThick;
250 // If a Turbo layer is requested, do it and exit
252 CreateLayerTurbo(moth);
257 // First create the stave container
258 alpha = (360./(2*fNStaves))*DegToRad();
260 // fStaveWidth = fLayRadius*Tan(alpha);
262 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(),fLayerNumber);
263 TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
264 layVol->SetUniqueID(fChipTypeID);
266 // layVol->SetVisibility(kFALSE);
267 layVol->SetVisibility(kTRUE);
268 layVol->SetLineColor(1);
270 TGeoVolume *stavVol = CreateStave();
273 // Now build up the layer
274 alpha = 360./fNStaves;
275 Double_t r = fLayRadius + ((TGeoBBox*)stavVol->GetShape())->GetDY();
276 for (Int_t j=0; j<fNStaves; j++) {
277 Double_t phi = j*alpha + fPhi0;
278 xpos = r*CosD(phi);// r*SinD(-phi);
279 ypos = r*SinD(phi);// r*CosD(-phi);
282 layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
283 new TGeoRotation("",phi,0,0)));
287 // Finally put everything in the mother volume
288 moth->AddNode(layVol, 1, 0);
291 // Upgrade geometry is served
295 //________________________________________________________________________
296 void AliITSUv0Layer::CreateLayerTurbo(TGeoVolume *moth){
298 // Creates the actual Layer and places inside its mother volume
299 // A so-called "turbo" layer is a layer where staves overlap in phi
300 // User can set width and tilt angle, no check is performed here
301 // to avoid volume overlaps
304 // moth : the TGeoVolume owing the volume structure
310 // Created: 08 Jul 2011 Mario Sitta
311 // Updated: 08 Mar 2012 Mario Sitta Correct way to compute container R
312 // Updated: 20 May 2013 Mario Sitta Layer is Assemgbly instead of Tube
318 Double_t xpos, ypos, zpos;
322 // Check if the user set the proper (remaining) parameters
323 if (fStaveWidth <= 0)
324 AliFatal(Form("Wrong stave width (%f)",fStaveWidth));
325 if (Abs(fStaveTilt) > 45)
326 AliWarning(Form("Stave tilt angle (%f) greater than 45deg",fStaveTilt));
329 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(), fLayerNumber);
330 TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
331 layVol->SetUniqueID(fChipTypeID);
332 layVol->SetVisibility(kTRUE);
333 layVol->SetLineColor(1);
334 TGeoVolume *stavVol = CreateStave();
337 // Now build up the layer
338 alpha = 360./fNStaves;
339 Double_t r = fLayRadius /* +chip thick ?! */;
340 for (Int_t j=0; j<fNStaves; j++) {
341 Double_t phi = j*alpha + fPhi0;
342 xpos = r*CosD(phi);// r*SinD(-phi);
343 ypos = r*SinD(phi);// r*CosD(-phi);
346 layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
347 new TGeoRotation("", phi-fStaveTilt,0,0)));
351 // Finally put everything in the mother volume
352 moth->AddNode(layVol, 1, 0);
357 //________________________________________________________________________
358 TGeoVolume* AliITSUv0Layer::CreateStave(const TGeoManager * /*mgr*/){
360 // Creates the actual Stave
363 // mgr : the GeoManager (used only to get the proper material)
369 // Created: 22 Jun 2011 Mario Sitta
373 Double_t xlen, ylen, zlen;
374 Double_t xpos, ypos, zpos, zmod;
378 // First create all needed shapes
379 alpha = (360./(2*fNStaves))*DegToRad();
382 xlen = fLayRadius*Tan(alpha);
383 if (fIsTurbo) xlen = 0.5*fStaveWidth;
384 ylen = 0.5*fStaveThick;
387 Double_t yplus = 0.46;
388 // Double_t origin[]={0,-yplus/2,0};
389 // TGeoBBox *stave = new TGeoBBox(xlen, ylen+yplus/2, zlen, origin);
390 TGeoXtru *stave = new TGeoXtru(2); //z sections
391 Double_t xv[5] = {xlen,xlen,0,-xlen,-xlen};
392 Double_t yv[5] = {ylen+0.09,-0.15,-yplus-fSensorThick,-0.15,ylen+0.09};
393 stave->DefinePolygon(5,xv,yv);
394 stave->DefineSection(0,-zlen,0,0,1.);
395 stave->DefineSection(1,+zlen,0,0,1.);
398 // We have all shapes: now create the real volumes
399 // TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
401 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
402 // TGeoVolume *stavVol = new TGeoVolume(volname, stave, medAir);
403 TGeoVolume *stavVol = new TGeoVolumeAssembly(volname);
405 // stavVol->SetVisibility(kFALSE);
406 stavVol->SetVisibility(kTRUE);
407 stavVol->SetLineColor(2);
408 TGeoVolume *modVol = CreateChip(xlen,ylen, zlen);
411 // Now build up the stave
412 zmod = ((TGeoBBox*)modVol->GetShape())->GetDZ();
413 for (Int_t j=0; j<fNChips; j++) {
415 ypos = 0.021; // Remove small overlap - M.S: 21may13
416 zpos = -stave->GetDZ() + j*2*zmod + zmod;
417 stavVol->AddNode(modVol, j, new TGeoTranslation(xpos, ypos, zpos));
421 // put mechanical stave structure, only inner barrel up to now
422 if (fLayerNumber<3) {
423 TGeoVolume *mechStavVol = CreateStaveStruct(xlen,zlen);
425 stavVol->AddNode(mechStavVol, fNChips, new TGeoCombiTrans(0, -0.15-ylen, 0, new TGeoRotation("",0, 0, 180)));
429 // Done, return the stave
433 //________________________________________________________________________
434 TGeoVolume* AliITSUv0Layer::CreateStaveStruct(const Double_t xsta,
436 const TGeoManager *mgr){
438 // Create the mechanical stave structure
443 // mgr : the GeoManager (used only to get the proper material)
449 // Created: 22 Mar 2013 Chinorat Kobdaj
450 // Updated: 26 Apr 2013 Mario Sitta
453 TGeoVolume *mechStavVol = 0;
455 switch (fStaveModel) {
456 case AliITSUv0::kModelDummy:
457 mechStavVol = CreateStaveModelDummy(xsta,zsta,mgr);
459 case AliITSUv0::kModel0:
460 mechStavVol = CreateStaveModel0(xsta,zsta,mgr);
462 case AliITSUv0::kModel1:
463 mechStavVol = CreateStaveModel1(xsta,zsta,mgr);
465 case AliITSUv0::kModel21:
466 mechStavVol = CreateStaveModel21(xsta,zsta,mgr);
468 case AliITSUv0::kModel22:
469 mechStavVol = CreateStaveModel22(xsta,zsta,mgr);
471 case AliITSUv0::kModel3:
472 mechStavVol = CreateStaveModel3(xsta,zsta,mgr);
475 AliFatal(Form("Unknown stave model %d",fStaveModel));
483 //________________________________________________________________________
484 TGeoVolume* AliITSUv0Layer::CreateStaveModelDummy(const Double_t ,
486 const TGeoManager *) const {
488 // Create dummy stave
493 // mgr : the GeoManager (used only to get the proper material)
499 // Created: 22 Mar 2013 Chinorat Kobdaj
500 // Updated: 26 Apr 2013 Mario Sitta
503 // Done, return the stave structur
507 //________________________________________________________________________
508 TGeoVolume* AliITSUv0Layer::CreateStaveModel0(const Double_t xsta,
510 const TGeoManager *mgr){
512 // Create the mechanical stave structure for Model 0 of TDR
517 // mgr : the GeoManager (used only to get the proper material)
523 // Created: 22 Mar 2013 Chinorat Kobdaj
524 // Updated: 26 Apr 2013 Mario Sitta
527 // Materials defined in AliITSUv0
528 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
529 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
531 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
532 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
533 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
534 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
537 Double_t kConeOutRadius = 0.15/2;
538 Double_t kConeInRadius = 0.1430/2;
539 Double_t kStaveLength = zsta*2;
540 Double_t kStaveWidth = xsta*2-kConeOutRadius*2;
541 Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
542 Double_t kStaveHeight = 0.3;
543 Double_t kHeight = kStaveHeight/2;
544 Double_t kAlpha = 90-67;//90-33.69;
545 Double_t kTheta = kAlpha*TMath::DegToRad();
546 Double_t kS1 = kWidth/TMath::Sin(kTheta);
547 Double_t kL1 = kWidth/TMath::Tan(kTheta);
548 Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
549 Double_t kThe2 = TMath::ATan(kHeight/kS1);
550 Double_t kBeta = kThe2*TMath::RadToDeg();
551 // Int_t loop = kStaveLength/(kL1);
552 // Double_t s3 = kWidth/(2*TMath::Sin(kTheta));
553 // Double_t s4 = 3*kWidth/(2*TMath::Sin(kTheta));
555 AliDebug(1, Form("BuildLevel %d\n",fBuildLevel));
558 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
560 Double_t z=0, y=-0.011+0.0150, x=0;
562 TGeoVolume *mechStavVol = 0;
564 if (fBuildLevel < 5) {
567 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
568 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
569 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07};
570 mechStruct->DefinePolygon(5,xv,yv);
571 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
572 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
574 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
575 mechStavVol->SetLineColor(12);
576 mechStavVol->SetFillColor(12);
577 mechStavVol->SetVisibility(kTRUE);
579 // detailed structure ++++++++++++++
580 //Pipe Kapton grey-35
581 TGeoTube *coolTube = new TGeoTube(kConeInRadius,kConeOutRadius,kStaveLength/2);
582 TGeoVolume *volCoolTube= new TGeoVolume("pipe", coolTube, medKapton);
583 volCoolTube->SetFillColor(35);
584 volCoolTube->SetLineColor(35);
585 mechStavVol->AddNode(volCoolTube,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
586 mechStavVol->AddNode(volCoolTube,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
589 if (fBuildLevel < 4) {
590 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength/2);
591 TGeoVolume *volCoolTubeW= new TGeoVolume("pipeWater", coolTubeW, medWater);
592 volCoolTubeW->SetFillColor(4);
593 volCoolTubeW->SetLineColor(4);
594 mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
595 mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
598 //frequency of filament
599 //n = 4 means very dense(4 filaments per interval)
600 //n = 2 means dense(2 filaments per interval)
602 Int_t loop = (Int_t)(kStaveLength/(4*kL1/n) + 2/n)-1;
603 if (fBuildLevel < 3) {
604 //Top CFRP Filament black-12 Carbon structure TGeoBBox (length,thickness,width)
605 TGeoBBox *t2=new TGeoBBox(kS2,0.007/2,0.15/2);//(kS2,0.002,0.02);
606 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
607 volT2->SetLineColor(12);
608 volT2->SetFillColor(12);
610 for(int i=1;i<loop;i++){ //i<60;i++){
611 mechStavVol->AddNode(volT2,4*i+0,
612 new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
613 new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
614 mechStavVol->AddNode(volT2,4*i+1,
615 new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
616 new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
617 mechStavVol->AddNode(volT2,4*i+2,
618 new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
619 new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
620 mechStavVol->AddNode(volT2,4*i+3,
621 new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
622 new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
626 //Bottom CFRP Filament black-12 Carbon structure TGeoBBox (thickness,width,length)
627 TGeoBBox *t1=new TGeoBBox(0.007/2,0.15/2,kS1);//(0.002,0.02,kS1);
628 TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K);
629 volT1->SetLineColor(12);
630 volT1->SetFillColor(12);
632 for(int i=1;i<loop;i++){
633 mechStavVol->AddNode(volT1,4*i+0,
634 new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1),
635 new TGeoRotation("volT1",-90,kAlpha,0)));
636 mechStavVol->AddNode(volT1,4*i+1,
637 new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1),
638 new TGeoRotation("volT1",90,kAlpha,0)));
639 mechStavVol->AddNode(volT1,4*i+2,
640 new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
641 new TGeoRotation("volT1",-90,-kAlpha,0)));
642 mechStavVol->AddNode(volT1,4*i+3,
643 new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
644 new TGeoRotation("volT1",-90,+kAlpha,0)));
648 if (fBuildLevel < 2) {
649 // Glue CFRP-Silicon layers TGeoBBox(thickness,width,kS1);
650 TGeoBBox *tG=new TGeoBBox(0.0075/2,0.18/2,kS1);
651 TGeoVolume *volTG=new TGeoVolume("Glue1", tG, medGlue);
652 volTG->SetLineColor(5);
653 volTG->SetFillColor(5);
655 for(int i=1;i<loop;i++){ //i<60;i++){
656 mechStavVol->AddNode(volTG,4*i+0,
657 new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i),
658 new TGeoRotation("volTG",-90,kAlpha,0)));
659 mechStavVol->AddNode(volTG,4*i+1,
660 new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i),
661 new TGeoRotation("volTG",90,kAlpha,0)));
662 mechStavVol->AddNode(volTG,4*i+2,
663 new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*i*kL1)+kS1/2, //z-14.25+(i*2*kL1),
664 new TGeoRotation("volTG",-90,-kAlpha,0)));
665 mechStavVol->AddNode(volTG,4*i+3,
666 new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
667 new TGeoRotation("volTG",-90,+kAlpha,0)));
670 TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta);
671 TGeoVolume *volGlue=new TGeoVolume("Glue2", glue, medGlue);
672 volGlue->SetLineColor(5);
673 volGlue->SetFillColor(5);
674 //mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
675 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
678 if (fBuildLevel < 1) {
679 //Flex cable brown-28 TGeoBBox(width,thickness,length);
680 TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta);
681 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
682 volCable->SetLineColor(28);
683 volCable->SetFillColor(28);
684 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
687 // Done, return the stave structur
692 //________________________________________________________________________
693 TGeoVolume* AliITSUv0Layer::CreateStaveModel1(const Double_t xsta,
695 const TGeoManager *mgr){
697 // Create the mechanical stave structure for Model 1 of TDR
702 // mgr : the GeoManager (used only to get the proper material)
708 // Created: 22 Mar 2013 Chinorat Kobdaj
709 // Updated: 26 Apr 2013 Mario Sitta
712 // Materials defined in AliITSUv0
713 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
714 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
716 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
717 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
718 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
719 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
722 Double_t kConeOutRadius = 0.15/2;
723 // Double_t kConeInRadius = 0.1430/2;
724 Double_t kStaveLength = zsta*2;
725 // Double_t kStaveWidth = xsta*2-kConeOutRadius*2;
726 Double_t kStaveWidth = xsta*2;
727 Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
728 Double_t kStaveHeight = 0.3;
729 Double_t kHeight = kStaveHeight/2;
730 Double_t kAlpha = 90-33.;//90-30;
731 Double_t kTheta = kAlpha*TMath::DegToRad();
732 Double_t kS1 = kWidth/TMath::Sin(kTheta);
733 Double_t kL1 = kWidth/TMath::Tan(kTheta);
734 Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
735 Double_t kThe2 = TMath::ATan(kHeight/kS1);
736 Double_t kBeta = kThe2*TMath::RadToDeg();
737 Int_t loop = (Int_t)((kStaveLength/(2*kL1))/2);
740 TGeoVolume *mechStavVol = 0;
743 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
746 // detailed structure ++++++++++++++
747 Double_t z=0, y=-0.011+0.0150, x=0;
749 // Polimide micro channels numbers
750 Double_t yMC = y-kHeight+0.01;
751 Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
752 Double_t xstaMC = (nb*0.1-0.08)/2;
755 if (fBuildLevel < 5) {
757 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
758 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
759 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07};
760 mechStruct->DefinePolygon(5,xv,yv);
761 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
762 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
764 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
765 mechStavVol->SetLineColor(12);
766 mechStavVol->SetFillColor(12);
767 mechStavVol->SetVisibility(kTRUE);
769 // Polimide micro channels numbers
770 TGeoBBox *tM0=new TGeoBBox(xstaMC, 0.005/2, zsta);
771 TGeoVolume *volTM0=new TGeoVolume("MicroChanCover", tM0, medKapton);
772 volTM0->SetLineColor(35);
773 volTM0->SetFillColor(35);
774 mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x,-0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
775 mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x,+0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
777 TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta);
778 TGeoVolume *volTM0b=new TGeoVolume("MicroChanWalls", tM0b, medKapton);
779 volTM0b->SetLineColor(35);
780 volTM0b->SetFillColor(35);
781 for (Int_t ib=0;ib<nb;ib++) {
782 mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
787 if (fBuildLevel < 4) {
788 // Water in Polimide micro channels
789 TGeoBBox *water=new TGeoBBox(0.08/2, 0.02/2, zsta+0.1);
790 TGeoVolume *volWater=new TGeoVolume("Water", water, medWater);
791 volWater->SetLineColor(4);
792 volWater->SetFillColor(4);
793 for (Int_t ib=0;ib<(nb-1);ib++) {
794 mechStavVol->AddNode(volWater, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.06,yMC, z, new TGeoRotation("",0, 0, 0)));
798 if (fBuildLevel < 3) {
799 //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length)
800 Double_t filWidth = 0.04;
801 Double_t filHeight= 0.02;
802 TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,kS1);
803 TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K);
804 volT1->SetLineColor(12);
805 volT1->SetFillColor(12);
806 for(int i=0;i<loop;i++){//i<30;i++){
807 mechStavVol->AddNode(volT1,4*i+0,
808 new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1)+kS1/2,
809 new TGeoRotation("volT1",-90,kAlpha,0)));
810 mechStavVol->AddNode(volT1,4*i+1,
811 new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1*i)+kS1/2,
812 new TGeoRotation("volT1",90,kAlpha,0)));
813 mechStavVol->AddNode(volT1,4*i+2,
814 new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
815 new TGeoRotation("volT1",-90,-kAlpha,0)));
816 mechStavVol->AddNode(volT1,4*i+3,
817 new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
818 new TGeoRotation("volT1",-90,+kAlpha,0)));
821 // Top filament CFRP black-12 Carbon structure TGeoBBox (length,thickness,width)
822 TGeoBBox *t2=new TGeoBBox(kS2,filHeight/2,filWidth/2);
823 TGeoVolume *volT2=new TGeoVolume("CFRPTop", t2, medM60J3K);
824 volT2->SetLineColor(12);
825 volT2->SetFillColor(12);
826 for(int i=0;i<loop;i++){ //i<30;i++){
827 mechStavVol->AddNode(volT2,4*i+0,
828 new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
829 new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
830 mechStavVol->AddNode(volT2,4*i+1,
831 new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
832 new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
833 mechStavVol->AddNode(volT2,4*i+2,
834 new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
835 new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
836 mechStavVol->AddNode(volT2,4*i+3,
837 new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
838 new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
842 if (fBuildLevel < 2) {
843 // Glue between filament and polimide micro channel
844 TGeoBBox *t3=new TGeoBBox(0.01/2,0.04,kS1);
845 TGeoVolume *volT3=new TGeoVolume("FilamentGlue", t3, medGlue);
846 volT3->SetLineColor(5);
847 volT3->SetFillColor(5);
848 for(int i=0;i<loop;i++){//i<30;i++){
849 mechStavVol->AddNode(volT3,4*i+0,
850 new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2,
851 new TGeoRotation("volT1",-90,kAlpha,0)));
852 mechStavVol->AddNode(volT3,4*i+1,
853 new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2,
854 new TGeoRotation("volT1",90,kAlpha,0)));
855 mechStavVol->AddNode(volT3,4*i+2,
856 new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
857 new TGeoRotation("volT1",-90,-kAlpha,0)));
858 mechStavVol->AddNode(volT3,4*i+3,
859 new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
860 new TGeoRotation("volT1",-90,+kAlpha,0)));
863 // Glue microchannel and sensor
864 TGeoBBox *glueM = new TGeoBBox(xsta, 0.01/2, zsta);
865 TGeoVolume *volGlueM=new TGeoVolume("MicroChanGlue", glueM, medGlue);
866 volGlueM->SetLineColor(5);
867 volGlueM->SetFillColor(5);
868 mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
870 // Glue sensor and kapton
871 TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta);
872 TGeoVolume *volGlue=new TGeoVolume("SensorGlue", glue, medGlue);
873 volGlue->SetLineColor(5);
874 volGlue->SetFillColor(5);
875 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
878 if (fBuildLevel < 1) {
879 TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta);
880 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
881 volCable->SetLineColor(28);
882 volCable->SetFillColor(28);
883 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
886 // Done, return the stave structur
891 //________________________________________________________________________
892 TGeoVolume* AliITSUv0Layer::CreateStaveModel21(const Double_t xsta,
894 const TGeoManager *mgr){
896 // Create the mechanical stave structure for Model 2.1 of TDR
901 // mgr : the GeoManager (used only to get the proper material)
907 // Created: 22 Mar 2013 Chinorat Kobdaj
908 // Updated: 26 Apr 2013 Mario Sitta
911 // Materials defined in AliITSUv0
912 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
913 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
915 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
916 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
917 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
918 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
919 TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
920 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
921 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
924 Double_t kConeOutRadius =0.151384/2;
925 Double_t kConeInRadius = 0.145034/2;
926 Double_t kStaveLength = zsta;
927 Double_t kStaveWidth = xsta*2;
928 Double_t kWidth = (kStaveWidth+0.005)/4;
929 Double_t kStaveHeigth = 0.33;//0.33;
930 Double_t kHeight = (kStaveHeigth+0.025)/2;
931 Double_t kAlpha = 57; //56.31;
932 Double_t kTheta = kAlpha*TMath::DegToRad();
933 Double_t kS1 = (kStaveWidth/4)/TMath::Sin(kTheta);
934 Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta);
935 Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
936 Double_t kThe2 = TMath::ATan(kHeight/kS1);
937 Double_t kBeta = kThe2*TMath::RadToDeg();
938 // Double_t lay1 = 0.003157;
939 Double_t kLay1 = 0.003;//Amec carbon
940 // Double_t lay2 = 0.0043215;//C Fleece carbon
941 Double_t kLay2 = 0.002;//C Fleece carbon
942 Double_t kLay3 = 0.007;//K13D2U carbon
943 Int_t loop = (Int_t)(kStaveLength/(2*kL1));
947 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
949 Double_t z=0, y=-(kConeOutRadius+0.03)+0.0385, x=0;
951 TGeoVolume *mechStavVol = 0;
953 if (fBuildLevel < 5) {
955 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
956 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
957 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeigth,0,-kConeOutRadius*2-0.07};
958 mechStruct->DefinePolygon(5,xv,yv);
959 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
960 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
962 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
963 mechStavVol->SetLineColor(12);
964 mechStavVol->SetFillColor(12);
965 mechStavVol->SetVisibility(kTRUE);
967 //Pipe Kapton grey-35
968 TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius,kConeInRadius,kConeOutRadius);
969 TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
970 volCone1->SetFillColor(35);
971 volCone1->SetLineColor(35);
972 mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
973 mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
976 if (fBuildLevel < 4) {
978 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength);
979 TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
980 volCoolTubeW->SetFillColor(4);
981 volCoolTubeW->SetLineColor(4);
982 mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
983 mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
986 if (fBuildLevel < 3) {
988 // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width)
989 TGeoBBox *t2=new TGeoBBox(kS2,0.02/2,0.04/2); //TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02);
990 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
991 volT2->SetLineColor(12);
992 volT2->SetFillColor(12);
993 for(int i=0;i<loop;i++){// i<28;i++){
994 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)));
995 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)));
996 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)));
997 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)));
998 // 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)));
1002 //wall side structure out
1003 TGeoBBox *box4 = new TGeoBBox(0.03/2,0.12/2,kStaveLength-0.50);
1004 TGeoVolume *plate4 = new TGeoVolume("WallOut",box4,medM60J3K);
1005 plate4->SetFillColor(35);
1006 plate4->SetLineColor(35);
1007 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)));
1008 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)));
1010 TGeoBBox *box5 = new TGeoBBox(0.015/2,0.12/2,kStaveLength-0.50);
1011 TGeoVolume *plate5 = new TGeoVolume("WallIn",box5,medM60J3K);
1012 plate5->SetFillColor(12);
1013 plate5->SetLineColor(12);
1014 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)));
1015 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)));
1017 //Amec Thermasol red-2 cover tube FGS300
1018 TGeoConeSeg *cons1 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius,kConeOutRadius+kLay1,kConeOutRadius,kConeOutRadius+kLay1,0,180);
1019 TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
1020 cone11->SetFillColor(2);
1021 cone11->SetLineColor(2);
1022 mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
1023 mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
1025 TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,kLay1/2,kStaveLength-0.50);
1026 TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
1027 plate2->SetFillColor(2);
1028 plate2->SetLineColor(2);
1029 mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate2",0,0,0)));
1031 TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay1/2,kStaveLength-0.50);
1032 TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
1033 plate21->SetFillColor(2);
1034 plate21->SetLineColor(2);
1035 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)));
1036 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)));
1038 TGeoBBox *box22 = new TGeoBBox((kLay1/2),kConeOutRadius/2,kStaveLength-0.50);
1039 TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
1040 plate22->SetFillColor(2);
1041 plate22->SetLineColor(2);
1042 mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1043 mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1044 mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1045 mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1048 TGeoConeSeg *cons2 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,0,180);
1049 TGeoVolume *cone12 = new TGeoVolume("CFleecePipeCover",cons2,medCarbonFleece);
1050 cone12->SetFillColor(28);
1051 cone12->SetLineColor(28);
1052 mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
1053 mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
1055 TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+kLay1)))/2,kLay2/2,kStaveLength-0.50);
1056 TGeoVolume *plate3 = new TGeoVolume("CFleeceMiddle",box3,medCarbonFleece);
1057 plate3->SetFillColor(28);
1058 plate3->SetLineColor(28);
1059 mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate3",0,0,0)));
1061 TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay2/2,kStaveLength-0.50);
1062 TGeoVolume *plate31 = new TGeoVolume("CFleeceLeftRight",box31,medCarbonFleece);
1063 plate31->SetFillColor(28);
1064 plate31->SetLineColor(28);
1065 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)));
1066 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)));
1068 TGeoBBox *box32 = new TGeoBBox((kLay2/2),(kConeOutRadius-kLay1)/2,kStaveLength-0.50);
1069 TGeoVolume *plate32 = new TGeoVolume("CFleeceVertical",box32,medCarbonFleece);
1070 plate32->SetFillColor(28);
1071 plate32->SetLineColor(28);
1072 mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1073 mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1074 mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1075 mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1078 //K13D2U carbon plate
1079 TGeoBBox *box1 = new TGeoBBox(2*kWidth,kLay3/2,kStaveLength-0.50);
1080 TGeoVolume *plate1 = new TGeoVolume("CarbonPlate",box1,medK13D2U2k);
1081 plate1->SetFillColor(5);
1082 plate1->SetLineColor(5);
1083 mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(kLay3/2)),z,new TGeoRotation("plate1",0,0,0)));
1085 //C Fleece bottom plate
1086 TGeoBBox *box6 = new TGeoBBox(2*kWidth,kLay2/2,kStaveLength-0.50);
1087 TGeoVolume *plate6 = new TGeoVolume("CFleeceBottom",box6,medCarbonFleece);
1088 plate6->SetFillColor(2);
1089 plate6->SetLineColor(2);
1090 mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)),z,new TGeoRotation("plate1",0,0,0)));
1095 if (fBuildLevel < 2) {
1096 //Glue layers and kapton
1097 TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, 0.005/2, zsta);
1098 TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
1099 volGlue->SetLineColor(5);
1100 volGlue->SetFillColor(5);
1101 mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
1102 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
1105 if (fBuildLevel < 1) {
1106 TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, 0.01/2, zsta);
1107 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
1108 volCable->SetLineColor(28);
1109 volCable->SetFillColor(28);
1110 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)));
1114 // Done, return the stave structure
1119 //________________________________________________________________________
1120 TGeoVolume* AliITSUv0Layer::CreateStaveModel22(const Double_t xsta,
1121 const Double_t zsta,
1122 const TGeoManager *mgr){
1124 // Create the mechanical stave structure for Model 2.2 of TDR
1129 // mgr : the GeoManager (used only to get the proper material)
1135 // Created: 22 Mar 2013 Chinorat Kobdaj
1136 // Updated: 26 Apr 2013 Mario Sitta
1137 // Updated: 30 Apr 2013 Wanchaloem Poonsawat
1140 // Materials defined in AliITSUv0
1141 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1142 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1144 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
1145 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1146 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1147 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
1148 TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
1149 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
1150 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1153 Double_t kConeOutRadius =0.107/2;//0.107/2;
1154 Double_t kConeInRadius = 0.1015/2;//0.10105/2
1155 Double_t kStaveLength = zsta;
1156 Double_t kStaveWidth = xsta*2;
1157 Double_t kWidth = (kStaveWidth)/4;
1158 Double_t kStaveHeight = 0.283;//0.33;
1159 Double_t kHeight = (kStaveHeight)/2;
1160 Double_t kAlpha = 57;//56.31;
1161 Double_t kTheta = kAlpha*TMath::DegToRad();
1162 Double_t kS1 = ((kStaveWidth)/4)/TMath::Sin(kTheta);
1163 Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta);
1164 Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(kThe2);
1165 Double_t kThe2 = TMath::ATan(kHeight/(0.375-0.036));
1166 Double_t kBeta = kThe2*TMath::RadToDeg();
1167 Double_t klay1 = 0.003;//Amec carbon
1168 Double_t klay2 = 0.002;//C Fleece carbon
1169 Double_t klay3 = 0.007;//CFplate K13D2U carbon
1170 Double_t klay4 = 0.007;//GluekStaveLength/2
1171 Double_t klay5 = 0.01;//Flex cable
1172 Double_t kTopVertexMaxWidth = 0.072;
1173 Double_t kTopVertexHeight = 0.04;
1174 Double_t kSideVertexMWidth = 0.052;
1175 Double_t kSideVertexHeight = 0.11;
1178 Int_t loop = (Int_t)(kStaveLength/(2*kL1));
1181 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
1183 Double_t z=0, y=-(2*kConeOutRadius)+klay1+klay2+fSensorThick/2-0.0004, x=0;
1185 TGeoVolume *mechStavVol = 0;
1187 if (fBuildLevel < 5) {
1188 // world (trapezoid)
1189 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
1190 Double_t xv[6] = {kStaveWidth/2,kStaveWidth/2,0.012,-0.012,-kStaveWidth/2,-kStaveWidth/2};
1191 /* Double_t yv[6] = {-2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5),
1192 0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02,
1193 -2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5)}; // (kConeOutRadius*2)-0.0635 */
1194 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
1195 mechStruct->DefinePolygon(6,xv,yv);
1196 mechStruct->DefineSection(0,-kStaveLength,0,0,1.);
1197 mechStruct->DefineSection(1,kStaveLength,0,0,1.);
1199 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
1200 mechStavVol->SetLineColor(12);
1201 mechStavVol->SetFillColor(12);
1202 mechStavVol->SetVisibility(kTRUE);
1204 //Polyimide Pipe Kapton grey-35
1205 TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius-0.0001,kConeInRadius,kConeOutRadius-0.0001);
1206 TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
1207 volCone1->SetFillColor(35);
1208 volCone1->SetLineColor(35);
1209 mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
1210 mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
1213 if (fBuildLevel < 4) {
1214 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius-0.0001,kStaveLength);
1215 TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
1216 volCoolTubeW->SetFillColor(4);
1217 volCoolTubeW->SetLineColor(4);
1218 mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
1219 mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
1222 if (fBuildLevel < 3) {
1224 // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width)
1225 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
1226 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
1227 volT2->SetLineColor(12);
1228 volT2->SetFillColor(12);
1229 for(int i=0;i<loop;i++){// i<28;i++){
1230 // 1) Front Left Top Filament
1231 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)));
1232 // 2) Front Right Top Filament
1233 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)));
1234 // 3) Back Left Top Filament
1235 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)));
1236 // 4) Back Right Top Filament
1237 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)));
1243 TGeoTrd1 *trd1 = new TGeoTrd1(0,kTopVertexMaxWidth/2,kStaveLength,kTopVertexHeight/2);
1244 TGeoVolume *ibdv = new TGeoVolume("TopVertex",trd1,medM60J3K);
1245 ibdv->SetFillColor(12);
1246 ibdv->SetLineColor(12);
1247 mechStavVol->AddNode(ibdv,1,new TGeoCombiTrans(x,y+kStaveHeight+0.03,z,new TGeoRotation("ibdv",0.,-90,0)));//y+kStaveHeight+0.056
1250 TGeoTrd1 *trd2 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
1251 TGeoVolume *ibdv2 = new TGeoVolume("LeftVertex",trd2,medM60J3K);
1252 ibdv2->SetFillColor(12);
1253 ibdv2->SetLineColor(12);
1254 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,
1257 TGeoTrd1 *trd3 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
1258 TGeoVolume *ibdv3 = new TGeoVolume("RightVertex",trd3,medM60J3K);
1259 ibdv3->SetFillColor(12);
1260 ibdv3->SetLineColor(12);
1261 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
1264 TGeoConeSeg *cons2 = new TGeoConeSeg(zsta,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,0,180);
1265 TGeoVolume *cone12 = new TGeoVolume("CarbonFleecePipeCover",cons2,medCarbonFleece);
1266 cone12->SetFillColor(28);
1267 cone12->SetLineColor(28);
1268 mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone12",0,0,0)));
1269 mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone12",0,0,0)));
1271 TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+klay1)))/2,klay2/2,zsta);//kStaveLength-0.50);
1272 TGeoVolume *plate3 = new TGeoVolume("CarbonFleeceMiddle",box3,medCarbonFleece);
1273 plate3->SetFillColor(28);
1274 plate3->SetLineColor(28);
1275 mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate3",0,0,0)));
1277 TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,klay2/2,zsta);
1278 TGeoVolume *plate31 = new TGeoVolume("CarbonFleeceLeftRight",box31,medCarbonFleece);
1279 plate31->SetFillColor(28);
1280 plate31->SetLineColor(28);
1281 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)));
1282 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)));
1284 TGeoBBox *box32 = new TGeoBBox((klay2/2),(kConeOutRadius-klay1)/2,zsta);
1285 TGeoVolume *plate32 = new TGeoVolume("CarbonFleeceVertical",box32,medCarbonFleece);
1286 plate32->SetFillColor(28);
1287 plate32->SetLineColor(28);
1288 mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1289 mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1290 mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1291 mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1293 //Amec Thermasol red-2 cover tube FGS300 or Carbon Paper
1294 TGeoConeSeg *cons1 = new TGeoConeSeg(zsta,kConeOutRadius,kConeOutRadius+klay1-0.0001,kConeOutRadius,kConeOutRadius+klay1-0.0001,0,180);//kConeOutRadius+klay1-0.0001
1295 TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
1296 cone11->SetFillColor(2);
1297 cone11->SetLineColor(2);
1298 mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone11",0,0,0)));
1299 mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone11",0,0,0)));
1301 TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,(klay1/2),zsta);//kStaveLength-0.50);
1302 TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
1303 plate2->SetFillColor(2);
1304 plate2->SetLineColor(2);
1305 mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate2",0,0,0)));
1307 TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,(klay1/2),zsta);
1308 TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
1309 plate21->SetFillColor(2);
1310 plate21->SetLineColor(2);
1311 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)));
1312 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)));
1314 TGeoBBox *box22 = new TGeoBBox((klay1/2),kConeOutRadius/2,zsta);
1315 TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
1316 plate22->SetFillColor(2);
1317 plate22->SetLineColor(2);
1318 mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1319 mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1320 mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1321 mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1324 TGeoBBox *box1 = new TGeoBBox(2*kWidth,(klay3)/2,zsta);
1325 TGeoVolume *plate1 = new TGeoVolume("CFPlate",box1,medK13D2U2k);
1326 plate1->SetFillColor(5);
1327 plate1->SetLineColor(5);
1328 mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(klay3/2)),z,new TGeoRotation("plate1",0,0,0)));
1330 //C Fleece bottom plate
1331 TGeoBBox *box6 = new TGeoBBox(2*kWidth,(klay2)/2,zsta);
1332 TGeoVolume *plate6 = new TGeoVolume("CarbonFleeceBottom",box6,medCarbonFleece);
1333 plate6->SetFillColor(2);
1334 plate6->SetLineColor(2);
1335 mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+(klay2/2)),z,new TGeoRotation("plate6",0,0,0)));
1338 if (fBuildLevel < 2) {
1339 //Glue klayers and kapton
1340 TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, (klay4)/2, zsta);
1341 TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
1342 volGlue->SetLineColor(5);
1343 volGlue->SetFillColor(5);
1344 // mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4/2)), z, new TGeoRotation("",0, 0, 0)));
1345 mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4)/2)+0.00005, z, new TGeoRotation("",0, 0, 0)));
1348 if (fBuildLevel < 1) {
1350 TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, klay5/2, zsta);//klay5/2
1351 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
1352 volCable->SetLineColor(28);
1353 volCable->SetFillColor(28);
1354 // mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.0002, z, new TGeoRotation("",0, 0, 0)));
1355 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.01185, z, new TGeoRotation("",0, 0, 0)));
1357 // Done, return the stave structe
1362 //________________________________________________________________________
1363 TGeoVolume* AliITSUv0Layer::CreateStaveModel3(const Double_t xsta,
1364 const Double_t zsta,
1365 const TGeoManager *mgr){
1367 // Create the mechanical stave structure for Model 3 of TDR
1372 // mgr : the GeoManager (used only to get the proper material)
1378 // Created: 28 May 2013 Chinorat Kobdaj
1379 // Updated: Mario Sitta
1380 // Updated: Wanchaloem Poonsawat
1383 // Materials defined in AliITSUv0
1384 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1385 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1387 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
1388 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1389 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1390 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
1391 //TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
1392 //TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
1393 //TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1396 Double_t kConeOutRadius = 0.15/2;
1397 Double_t kStaveLength = zsta*2;
1398 Double_t kStaveWidth = xsta*2;
1399 Double_t w = kStaveWidth/4;//1/2 of W
1400 Double_t staveHeight = 0.3;
1401 Double_t h = staveHeight/2;
1402 Double_t alpha = 90-33.;//90-30;
1403 Double_t the1 = alpha*TMath::DegToRad();
1404 Double_t s1 = w/TMath::Sin(the1);
1405 Double_t l = w/TMath::Tan(the1);
1406 Double_t s2 = TMath::Sqrt(h*h + s1*s1);//TMath::Sin(the2);
1407 Double_t the2 = TMath::ATan(h/s1);
1408 Double_t beta = the2*TMath::RadToDeg();
1409 Double_t klay4 = 0.007; //Glue
1410 Double_t klay5 = 0.01; //Flexcable
1411 Int_t loop = (kStaveLength/(2*l))/2;
1413 Double_t ang1 = 0*TMath::DegToRad();
1414 Double_t ang2 = 0*TMath::DegToRad();
1415 Double_t ang3 = 0*TMath::DegToRad();
1417 Double_t headWidth=0.25;
1418 Double_t smcLength=kStaveLength/chips-2*headWidth;//6.25;
1419 Double_t smcWidth=kStaveWidth;
1420 Double_t smcSide1Thick=0.03;
1421 Double_t vaporThick=0.032;
1422 Double_t liquidThick=0.028;
1423 Double_t smcSide2Thick=0.01;
1424 Double_t smcSide3Thick=0.0055;
1425 Double_t smcSide4Thick=0.0095;
1426 Double_t smcSide5Thick=0.0075;
1427 Double_t smcSpace=0.01;
1431 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber);
1433 // detailed structure ++++++++++++++
1434 Double_t z=0, y=0-0.007, x=0;
1436 // Polimide micro channels numbers
1437 Double_t yMC = y-h+0.01;
1438 Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
1439 Double_t xstaMC = (nb*0.1-0.08)/2;
1442 TGeoVolume *mechStavVol = 0;
1443 if (fBuildLevel < 5) {
1444 // world (trapezoid)
1445 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
1446 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
1447 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,staveHeight,0,-kConeOutRadius*2-0.07};
1448 mechStruct->DefinePolygon(5,xv,yv);
1449 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
1450 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
1451 mechStavVol = new TGeoVolume(volname, mechStruct, medAir);
1452 mechStavVol->SetLineColor(12);
1453 mechStavVol->SetFillColor(12);
1454 mechStavVol->SetVisibility(kTRUE);
1456 // Silicon micro channels numbers
1458 TGeoBBox *tM0a=new TGeoBBox(smcWidth/2, 0.003/2, headWidth/2);
1459 TGeoVolume *volTM0a=new TGeoVolume("microChanTop1", tM0a, medKapton);
1460 volTM0a->SetLineColor(35);
1461 volTM0a->SetFillColor(35);
1463 for(Int_t mo=1; mo<=chips; mo++) {
1464 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)));
1465 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)));
1467 TGeoBBox *tM0c=new TGeoBBox(0.3/2, 0.003/2,smcLength/2);
1468 TGeoVolume *volTM0c=new TGeoVolume("microChanTop2", tM0c, medKapton);
1469 volTM0c->SetLineColor(35);
1470 volTM0c->SetFillColor(35);
1471 for(Int_t mo=1; mo<=chips; mo++) {
1472 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)));
1473 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)));
1475 TGeoBBox *tM0c1=new TGeoBBox(0.2225/2, 0.003/2,smcLength/2);
1476 TGeoVolume *volTM0c1=new TGeoVolume("microChanBot1", tM0c1, medKapton);
1477 volTM0c1->SetLineColor(6);
1478 volTM0c1->SetFillColor(6);
1479 for(Int_t mo=1; mo<=chips; mo++) {
1480 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)));
1481 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)));
1483 TGeoBBox *tM0c2=new TGeoBBox(0.072/2, 0.003/2,smcLength/2);
1484 TGeoVolume *volTM0c2=new TGeoVolume("microChanBot2", tM0c2, medKapton);
1485 volTM0c2->SetLineColor(35);
1486 volTM0c2->SetFillColor(35);
1487 for(Int_t mo=1; mo<=chips; mo++) {
1488 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)));
1490 TGeoBBox *tM0c2r=new TGeoBBox(0.068/2, 0.003/2,smcLength/2);
1491 TGeoVolume *volTM0c2r=new TGeoVolume("microChanBot3", tM0c2r, medKapton);
1492 volTM0c2r->SetLineColor(35);
1493 volTM0c2r->SetFillColor(35);
1494 for(Int_t mo=1; mo<=chips; mo++) {
1495 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)));
1497 TGeoBBox *tM0d=new TGeoBBox(smcSide1Thick/2, 0.035/2,smcLength/2);
1498 TGeoVolume *volTM0d=new TGeoVolume("microChanSide1", tM0d, medKapton);
1499 volTM0d->SetLineColor(12);
1500 volTM0d->SetFillColor(12);
1501 for(Int_t mo=1; mo<=chips; mo++) {
1502 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)));
1503 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)));
1506 TGeoBBox *tM0d1=new TGeoBBox(smcSide2Thick/2, 0.035/2,smcLength/2);
1507 TGeoVolume *volTM0d1=new TGeoVolume("microChanSide2", tM0d1, medKapton);
1508 volTM0d1->SetLineColor(12);
1509 volTM0d1->SetFillColor(12);
1510 for(Int_t mo=1; mo<=chips; mo++) {
1511 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)));
1512 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)));
1514 TGeoBBox *tM0d2=new TGeoBBox(smcSide3Thick/2, (hh+0.003)/2, smcLength/2);
1515 TGeoVolume *volTM0d2=new TGeoVolume("microChanSide3", tM0d2, medKapton);
1516 volTM0d2->SetLineColor(12);
1517 volTM0d2->SetFillColor(12);
1518 for(Int_t mo=1; mo<=chips; mo++) {
1519 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)));
1521 TGeoBBox *tM0d2r=new TGeoBBox(smcSide4Thick/2, (hh+0.003)/2, smcLength/2);
1522 TGeoVolume *volTM0d2r=new TGeoVolume("microChanSide4", tM0d2r, medKapton);
1523 volTM0d2r->SetLineColor(12);
1524 volTM0d2r->SetFillColor(12);
1525 for(Int_t mo=1; mo<=chips; mo++) {
1526 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)));
1528 TGeoBBox *tM0e=new TGeoBBox(smcSide5Thick/2, hh/2,smcLength/2);
1529 TGeoVolume *volTM0e=new TGeoVolume("microChanSide5", tM0e, medKapton);
1530 volTM0e->SetLineColor(12);
1531 volTM0e->SetFillColor(12);
1532 for(Int_t mo=1; mo<=chips; mo++) {
1533 for (Int_t ie=0;ie<11;ie++) {
1534 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)));
1535 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)));
1539 TGeoBBox *tM0f=new TGeoBBox(0.02/2, hh/2, smcLength/2);
1540 TGeoVolume *volTM0f=new TGeoVolume("microChanTop3", tM0f, medKapton);
1541 //Double_t smcChannels=12;
1542 Double_t smcCloseWallvapor=smcWidth/2-smcSide1Thick-vaporThick-smcSide2Thick-smcSide3Thick-12*smcSpace-11*smcSide5Thick;
1543 Double_t smcCloseWallliquid=smcWidth/2-smcSide1Thick-liquidThick-smcSide2Thick-smcSide4Thick-12*smcSpace-11*smcSide5Thick;
1544 volTM0f->SetLineColor(12);
1545 volTM0f->SetFillColor(12);
1546 for(Int_t mo=1; mo<=chips; mo++) {
1547 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)));
1548 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)));
1550 //Head(back) microchannel
1552 TGeoBBox *tM0hb=new TGeoBBox(smcWidth/2, 0.025/2, headWidth/2);
1553 TGeoVolume *volTM0hb=new TGeoVolume("microChanHeadBackBottom1", tM0hb, medKapton);
1554 volTM0hb->SetLineColor(4);
1555 volTM0hb->SetFillColor(4);
1556 for(Int_t mo=1; mo<=chips; mo++) {
1557 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)));
1558 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)));
1560 TGeoBBox *tM0h1=new TGeoBBox(smcWidth/2, 0.013/2, 0.05/2);
1561 TGeoVolume *volTM0h1=new TGeoVolume("microChanHeadBackBottom2", tM0h1, medKapton);
1562 volTM0h1->SetLineColor(5);
1563 volTM0h1->SetFillColor(5);
1564 for(Int_t mo=1; mo<=chips; mo++) {
1565 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)));
1567 TGeoBBox *tM0h2=new TGeoBBox(smcWidth/2, 0.003/2, 0.18/2);
1568 TGeoVolume *volTM0h2=new TGeoVolume("microChanHeadBackBottom7", tM0h2, medKapton);
1569 volTM0h2->SetLineColor(6);
1570 volTM0h2->SetFillColor(6);
1571 for(Int_t mo=1; mo<=chips; mo++) {
1572 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)));
1574 TGeoBBox *tM0h3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
1575 TGeoVolume *volTM0h3=new TGeoVolume("microChanHeadBackBottom3", tM0h3, medKapton);
1576 volTM0h3->SetLineColor(5);
1577 volTM0h3->SetFillColor(5);
1578 for(Int_t mo=1; mo<=chips; mo++) {
1579 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)));
1581 TGeoBBox *tM0b1=new TGeoBBox(smcWidth/2, 0.013/2, 0.03/2);
1582 TGeoVolume *volTM0b1=new TGeoVolume("microChanHeadBackBottom4", tM0b1, medKapton);
1583 volTM0b1->SetLineColor(5);
1584 volTM0b1->SetFillColor(5);
1585 for(Int_t mo=1; mo<=chips; mo++) {
1586 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)));
1588 TGeoBBox *tM0b2=new TGeoBBox(smcWidth/2, 0.003/2, 0.2/2);
1589 TGeoVolume *volTM0b2=new TGeoVolume("microChanHeadBackBottom5", tM0b2, medKapton);
1590 volTM0b2->SetLineColor(6);
1591 volTM0b2->SetFillColor(6);
1592 for(Int_t mo=1; mo<=chips; mo++) {
1593 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)));
1595 TGeoBBox *tM0b3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
1596 TGeoVolume *volTM0b3=new TGeoVolume("microChanHeadBackBottom6", tM0b3, medKapton);
1597 volTM0b3->SetLineColor(5);
1598 volTM0b3->SetFillColor(5);
1599 for(Int_t mo=1; mo<=chips; mo++) {
1600 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)));
1603 TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta);
1604 TGeoVolume *volTM0b=new TGeoVolume("microChanWalls", tM0b, medKapton);
1605 volTM0b->SetLineColor(35);
1606 volTM0b->SetFillColor(35);
1607 for (Int_t ib=0;ib<nb;ib++) {
1608 //mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
1613 if (fBuildLevel < 4) {
1615 //**********cooling inlet outlet
1617 TGeoBBox *tM0dv=new TGeoBBox(vaporThick/2, 0.035/2,smcLength/2);
1618 TGeoVolume *volTM0dv=new TGeoVolume("microChanVapor", tM0dv, medWater);
1619 volTM0dv->SetLineColor(2);
1620 volTM0dv->SetFillColor(2);
1621 for(Int_t mo=1; mo<=chips; mo++) {
1622 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)));
1624 TGeoBBox *tM0dl=new TGeoBBox(liquidThick/2, 0.035/2,smcLength/2);
1625 TGeoVolume *volTM0dl=new TGeoVolume("microChanLiquid", tM0dl, medWater);
1626 volTM0dl->SetLineColor(3);
1627 volTM0dl->SetFillColor(3);
1628 for(Int_t mo=1; mo<=chips; mo++) {
1629 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)));
1631 // small cooling fluid now using water wait for freeon value
1632 TGeoBBox *tM0dlq=new TGeoBBox(smcSpace/2, hh/2,smcLength/2);
1633 TGeoVolume *volTM0dlq=new TGeoVolume("smallLiquid", tM0dlq, medWater);
1634 volTM0dlq->SetLineColor(3);
1635 volTM0dlq->SetFillColor(3);
1636 TGeoBBox *tM0dvp=new TGeoBBox(smcSpace/2, hh/2,smcLength/2);
1637 TGeoVolume *volTM0dvp=new TGeoVolume("microChanVapor", tM0dvp, medWater);
1638 volTM0dvp->SetLineColor(2);
1639 volTM0dvp->SetFillColor(2);
1640 for(Int_t mo=1; mo<=chips; mo++) {
1641 for (Int_t is=0;is<12;is++) {
1642 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)));
1643 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)));
1651 if (fBuildLevel < 3) {
1653 //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length)
1655 Double_t filWidth = 0.04;
1656 Double_t filHeight= 0.02;
1657 TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,s1);
1658 TGeoVolume *volT1=new TGeoVolume("bottomFilament", t1, medM60J3K);
1659 volT1->SetLineColor(12);
1660 volT1->SetFillColor(12);
1661 for(int i=0;i<loop;i++){//i<30;i++){
1662 mechStavVol->AddNode(volT1,4*i+0,
1663 new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2,
1664 new TGeoRotation("volT1",-90,alpha,0)));
1665 mechStavVol->AddNode(volT1,4*i+1,
1666 new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2,
1667 new TGeoRotation("volT1",90,alpha,0)));
1668 mechStavVol->AddNode(volT1,4*i+2,
1669 new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1670 new TGeoRotation("volT1",-90,-alpha,0)));
1671 mechStavVol->AddNode(volT1,4*i+3,
1672 new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1673 new TGeoRotation("volT1",-90,+alpha,0)));
1676 // Top filament CERP black-12 Carbon structure TGeoBBox (length,thickness,width)
1678 TGeoBBox *t2=new TGeoBBox(s2,filHeight/2,filWidth/2);
1679 TGeoVolume *volT2=new TGeoVolume("topFilament", t2, medM60J3K);
1680 volT2->SetLineColor(12);
1681 volT2->SetFillColor(12);
1682 for(int i=0;i<loop;i++){ //i<30;i++){
1683 mechStavVol->AddNode(volT2,4*i+0,
1684 new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
1685 new TGeoRotation("volT2",90,90-alpha,90-beta)));
1686 mechStavVol->AddNode(volT2,4*i+1,
1687 new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
1688 new TGeoRotation("volT2",90,-90+alpha,-90+beta)));
1689 mechStavVol->AddNode(volT2,4*i+2,
1690 new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1691 new TGeoRotation("volT2",90,-90+alpha,90-beta)));
1692 mechStavVol->AddNode(volT2,4*i+3,
1693 new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1694 new TGeoRotation("volT2",90,90-alpha,-90+beta)));
1698 if (fBuildLevel < 2) {
1700 // Glue Filament and Silicon MicroChannel
1701 TGeoBBox *tM0=new TGeoBBox(xstaMC/5, klay4/2, zsta);
1702 TGeoVolume *volTM0=new TGeoVolume("glueFM", tM0,medGlue );
1703 volTM0->SetLineColor(5);
1704 volTM0->SetFillColor(5);
1705 mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x-xsta/2-0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
1706 mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x+xsta/2+0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
1709 // Glue microchannel and sensor
1710 TGeoBBox *glueM = new TGeoBBox(xstaMC/5, klay4/2, zsta);
1711 TGeoVolume *volGlueM=new TGeoVolume("glueMS", glueM, medGlue);
1712 volGlueM->SetLineColor(5);
1713 volGlueM->SetFillColor(5);
1714 mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x-xsta/2-0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
1715 mechStavVol->AddNode(volGlueM, 1, new TGeoCombiTrans(x+xsta/2+0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
1717 // Glue sensor and kapton
1718 TGeoBBox *glue = new TGeoBBox(xsta, klay4/2, zsta);
1719 TGeoVolume *volGlue=new TGeoVolume("glueSensorBus", glue, medGlue);
1720 volGlue->SetLineColor(5);
1721 volGlue->SetFillColor(5);
1722 mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4/2, z, new TGeoRotation("",0, 0, 0)));
1725 if (fBuildLevel < 1) {
1726 TGeoBBox *kapCable = new TGeoBBox(xsta, klay5/2, zsta);
1727 TGeoVolume *volCable=new TGeoVolume("Flexcable", kapCable, medFlexCable);
1728 volCable->SetLineColor(28);
1729 volCable->SetFillColor(28);
1730 mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4-klay5/2, z, new TGeoRotation("",0, 0, 0)));
1733 // Done, return the stave structur
1737 //________________________________________________________________________
1738 TGeoVolume* AliITSUv0Layer::CreateChip(const Double_t xsta,
1739 const Double_t ysta,
1740 const Double_t zsta,
1741 const TGeoManager *mgr){
1743 // Creates the actual Chip
1746 // xsta,zsta : the stave dimensions
1747 // mgr : the GeoManager (used only to get the proper material)
1753 // Created: 22 Jun 2011 Mario Sitta
1757 Double_t xlen, ylen, zlen;
1758 Double_t xpos, ypos, zpos;
1761 // First create all needed shapes
1764 TGeoBBox *chip = new TGeoBBox(xsta, ysta, zsta/fNChips);
1767 xlen = chip->GetDX();
1768 ylen = 0.5*fSensorThick;
1769 zlen = chip->GetDZ();
1770 TGeoBBox *sensor = new TGeoBBox(xlen, ylen, zlen);
1773 // We have all shapes: now create the real volumes
1774 //TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1775 TGeoMedium *medSi = mgr->GetMedium("ITS_SI$");
1777 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSChipPattern(), fLayerNumber);
1778 // TGeoVolume *modVol = new TGeoVolume(volname, chip, medAir);
1779 TGeoVolume *modVol = new TGeoVolume(volname, chip, medSi);
1780 modVol->SetVisibility(kTRUE);
1781 modVol->SetLineColor(1);
1783 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSSensorPattern(), fLayerNumber);
1784 TGeoVolume *sensVol = new TGeoVolume(volname, sensor, medSi);
1785 sensVol->SetVisibility(kTRUE);
1786 sensVol->SetLineColor(8);
1787 sensVol->SetLineWidth(1);
1788 sensVol->SetFillColor(sensVol->GetLineColor());
1789 sensVol->SetFillStyle(4000); // 0% transparent
1792 // Now build up the chip
1794 ypos = -chip->GetDY() + sensor->GetDY();
1797 modVol->AddNode(sensVol, 1, new TGeoTranslation(xpos, ypos, zpos));
1799 // Done, return the chip
1803 //________________________________________________________________________
1804 Double_t AliITSUv0Layer::RadiusOfTurboContainer(){
1806 // Computes the inner radius of the air container for the Turbo configuration
1807 // as the radius of either the circle tangent to the stave or the circle
1808 // passing for the stave's lower vertex
1811 // none (all needed parameters are class members)
1816 // the radius of the container if >0, else flag to use the lower vertex
1818 // Created: 08 Mar 2012 Mario Sitta
1821 Double_t rr, delta, z, lstav, rstav;
1823 if (fStaveThick > 89.) // Very big angle: avoid overflows since surely
1824 return -1; // the radius from lower vertex is the right value
1826 rstav = fLayRadius + 0.5*fStaveThick;
1827 delta = (0.5*fStaveThick)/CosD(fStaveTilt);
1828 z = (0.5*fStaveThick)*TanD(fStaveTilt);
1831 lstav = (0.5*fStaveWidth) - z;
1833 if ( (rr*SinD(fStaveTilt) < lstav) )
1834 return (rr*CosD(fStaveTilt));
1839 //________________________________________________________________________
1840 void AliITSUv0Layer::SetStaveTilt(const Double_t t)
1843 // Sets the Stave tilt angle (for turbo layers only)
1846 // t : the stave tilt angle
1852 // Created: 08 Jul 2011 Mario Sitta
1858 AliError("Not a Turbo layer");
1862 //________________________________________________________________________
1863 void AliITSUv0Layer::SetStaveWidth(const Double_t w){
1865 // Sets the Stave width (for turbo layers only)
1868 // w : the stave width
1874 // Created: 08 Jul 2011 Mario Sitta
1880 AliError("Not a Turbo layer");