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;
47 const Double_t AliITSUv1Layer::fgkDefaultSensorThick = 300*fgkmicron;
48 const Double_t AliITSUv1Layer::fgkDefaultLadderThick = 1*fgkcm;
50 const Double_t AliITSUv1Layer::fgkOBHalfStaveWidth = 3.01 *fgkcm;
51 const Double_t AliITSUv1Layer::fgkOBModuleGap = 0.01 *fgkcm;
52 const Double_t AliITSUv1Layer::fgkOBFlexCable1Thick = 0.005*fgkcm;
53 const Double_t AliITSUv1Layer::fgkOBFlexCable2Thick = 0.01 *fgkcm;
54 const Double_t AliITSUv1Layer::fgkOBBusCable1Thick = 0.02 *fgkcm;
55 const Double_t AliITSUv1Layer::fgkOBBusCable2Thick = 0.02 *fgkcm;
56 const Double_t AliITSUv1Layer::fgkOBColdPlateThick = 0.012*fgkcm;
57 const Double_t AliITSUv1Layer::fgkOBCarbonPlateThick = 0.012*fgkcm;
58 const Double_t AliITSUv1Layer::fgkOBGlueThick = 0.03 *fgkcm;
59 const Double_t AliITSUv1Layer::fgkOBModuleZLength = 21.06 *fgkcm;
62 ClassImp(AliITSUv1Layer)
66 //________________________________________________________________________
67 AliITSUv1Layer::AliITSUv1Layer():
82 fStaveModel(AliITSUv1::kIBModelDummy)
85 // Standard constructor
89 //________________________________________________________________________
90 AliITSUv1Layer::AliITSUv1Layer(Int_t debug):
91 AliITSv11Geometry(debug),
105 fStaveModel(AliITSUv1::kIBModelDummy)
108 // Constructor setting debugging level
112 //________________________________________________________________________
113 AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Int_t debug):
114 AliITSv11Geometry(debug),
128 fStaveModel(AliITSUv1::kIBModelDummy)
131 // Constructor setting layer number and debugging level
135 //________________________________________________________________________
136 AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Bool_t turbo, Int_t debug):
137 AliITSv11Geometry(debug),
151 fStaveModel(AliITSUv1::kIBModelDummy)
154 // Constructor setting layer number and debugging level
155 // for a "turbo" layer (i.e. where ladders overlap in phi)
159 //________________________________________________________________________
160 AliITSUv1Layer::AliITSUv1Layer(const AliITSUv1Layer &s):
161 AliITSv11Geometry(s.GetDebug()),
162 fLayerNumber(s.fLayerNumber),
164 fLayRadius(s.fLayRadius),
165 fZLength(s.fZLength),
166 fSensorThick(s.fSensorThick),
167 fLadderThick(s.fLadderThick),
168 fLadderWidth(s.fLadderWidth),
169 fLadderTilt(s.fLadderTilt),
170 fNLadders(s.fNLadders),
171 fNModules(s.fNModules),
172 fDetTypeID(s.fDetTypeID),
173 fIsTurbo(s.fIsTurbo),
174 fBuildLevel(s.fBuildLevel),
175 fStaveModel(s.fStaveModel)
182 //________________________________________________________________________
183 AliITSUv1Layer& AliITSUv1Layer::operator=(const AliITSUv1Layer &s)
186 // Assignment operator
188 if(&s == this) return *this;
190 fLayerNumber = s.fLayerNumber;
192 fLayRadius = s.fLayRadius;
193 fZLength = s.fZLength;
194 fSensorThick = s.fSensorThick;
195 fLadderThick = s.fLadderThick;
196 fLadderWidth = s.fLadderWidth;
197 fLadderTilt = s.fLadderTilt;
198 fNLadders = s.fNLadders;
199 fNModules = s.fNModules;
200 fIsTurbo = s.fIsTurbo;
201 fDetTypeID = s.fDetTypeID;
202 fBuildLevel = s.fBuildLevel;
203 fStaveModel = s.fStaveModel;
208 //________________________________________________________________________
209 AliITSUv1Layer::~AliITSUv1Layer() {
215 //________________________________________________________________________
216 void AliITSUv1Layer::CreateLayer(TGeoVolume *moth){
218 // Creates the actual Layer and places inside its mother volume
221 // moth : the TGeoVolume owing the volume structure
227 // Created: 17 Jun 2011 Mario Sitta
228 // Updated: 08 Jul 2011 Mario Sitta
229 // Updated: 20 May 2013 Mario Sitta Layer is Assembly instead of Tube
233 Double_t xpos, ypos, zpos;
237 // Check if the user set the proper parameters
238 if (fLayRadius <= 0) AliFatal(Form("Wrong layer radius (%f)",fLayRadius));
239 if (fZLength <= 0) AliFatal(Form("Wrong layer length (%f)",fZLength));
240 if (fNLadders <= 0) AliFatal(Form("Wrong number of ladders (%d)",fNLadders));
241 if (fNModules <= 0) AliFatal(Form("Wrong number of modules (%d)",fNModules));
243 if (fLadderThick <= 0) {
244 AliInfo(Form("Ladder thickness wrong or not set (%f), using default (%f)",
245 fLadderThick,fgkDefaultLadderThick));
246 fLadderThick = fgkDefaultLadderThick;
249 if (fSensorThick <= 0) {
250 AliInfo(Form("Sensor thickness wrong or not set (%f), using default (%f)",
251 fSensorThick,fgkDefaultSensorThick));
252 fSensorThick = fgkDefaultSensorThick;
255 if (fSensorThick > fLadderThick) {
256 AliWarning(Form("Sensor thickness (%f) is greater than ladder thickness (%f), fixing",
257 fSensorThick,fLadderThick));
258 fSensorThick = fLadderThick;
262 // If a Turbo layer is requested, do it and exit
264 CreateLayerTurbo(moth);
269 // First create the ladder container
270 alpha = (360./(2*fNLadders))*DegToRad();
272 // fLadderWidth = fLayRadius*Tan(alpha);
274 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(),fLayerNumber);
275 TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
276 layVol->SetUniqueID(fDetTypeID);
278 // layVol->SetVisibility(kFALSE);
279 layVol->SetVisibility(kTRUE);
280 layVol->SetLineColor(1);
282 TGeoVolume *laddVol = CreateLadder();
285 // Now build up the layer
286 alpha = 360./fNLadders;
287 Double_t r = fLayRadius + ((TGeoBBox*)laddVol->GetShape())->GetDY();
288 for (Int_t j=0; j<fNLadders; j++) {
289 Double_t phi = j*alpha + fPhi0;
290 xpos = r*CosD(phi);// r*SinD(-phi);
291 ypos = r*SinD(phi);// r*CosD(-phi);
294 layVol->AddNode(laddVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
295 new TGeoRotation("",phi,0,0)));
299 // Finally put everything in the mother volume
300 moth->AddNode(layVol, 1, 0);
303 // Upgrade geometry is served
307 //________________________________________________________________________
308 void AliITSUv1Layer::CreateLayerTurbo(TGeoVolume *moth){
310 // Creates the actual Layer and places inside its mother volume
311 // A so-called "turbo" layer is a layer where ladders overlap in phi
312 // User can set width and tilt angle, no check is performed here
313 // to avoid volume overlaps
316 // moth : the TGeoVolume owing the volume structure
322 // Created: 08 Jul 2011 Mario Sitta
323 // Updated: 08 Mar 2012 Mario Sitta Correct way to compute container R
324 // Updated: 20 May 2013 Mario Sitta Layer is Assemgbly instead of Tube
330 Double_t xpos, ypos, zpos;
334 // Check if the user set the proper (remaining) parameters
335 if (fLadderWidth <= 0)
336 AliFatal(Form("Wrong ladder width (%f)",fLadderWidth));
337 if (Abs(fLadderTilt) > 45)
338 AliWarning(Form("Ladder tilt angle (%f) greater than 45deg",fLadderTilt));
341 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(), fLayerNumber);
342 TGeoVolume *layVol = new TGeoVolumeAssembly(volname);
343 layVol->SetUniqueID(fDetTypeID);
344 layVol->SetVisibility(kTRUE);
345 layVol->SetLineColor(1);
346 TGeoVolume *laddVol = CreateLadder();
349 // Now build up the layer
350 alpha = 360./fNLadders;
351 Double_t r = fLayRadius /* +module thick ?! */;
352 for (Int_t j=0; j<fNLadders; j++) {
353 Double_t phi = j*alpha + fPhi0;
354 xpos = r*CosD(phi);// r*SinD(-phi);
355 ypos = r*SinD(phi);// r*CosD(-phi);
358 layVol->AddNode(laddVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
359 new TGeoRotation("", phi-fLadderTilt,0,0)));
363 // Finally put everything in the mother volume
364 moth->AddNode(layVol, 1, 0);
369 //________________________________________________________________________
370 TGeoVolume* AliITSUv1Layer::CreateLadder(const TGeoManager * /*mgr*/){
372 // Creates the actual Ladder
375 // mgr : the GeoManager (used only to get the proper material)
381 // Created: 22 Jun 2011 Mario Sitta
382 // Updated: 18 Dec 2013 Mario Sitta Handle IB and OB
386 Double_t xLenO = 5.79/2;
388 Double_t xlenI, ylen, zlen;
389 Double_t xpos, ypos, zpos, zmod;
393 // First create all needed shapes
394 alpha = (360./(2*fNLadders))*DegToRad();
397 xlenI = fLayRadius*Tan(alpha);
398 if (fIsTurbo) xlenI = 0.5*fLadderWidth;
399 ylen = 0.5*fLadderThick;
402 Double_t yplus = 0.46;
403 TGeoXtru *ladder = new TGeoXtru(2); //z sections
404 Double_t xv[5] = {xlenI,xlenI,0,-xlenI,-xlenI};
405 Double_t yv[5] = {ylen+0.09,-0.15,-yplus-fSensorThick,-0.15,ylen+0.09};
406 ladder->DefinePolygon(5,xv,yv);
407 ladder->DefineSection(0,-zlen,0,0,1.);
408 ladder->DefineSection(1,+zlen,0,0,1.);
410 // We have all shapes: now create the real volumes
412 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
413 // TGeoVolume *laddVol = new TGeoVolume(volname, ladder, medAir);
414 TGeoVolume *laddVol = new TGeoVolumeAssembly(volname);
416 // laddVol->SetVisibility(kFALSE);
417 laddVol->SetVisibility(kTRUE);
418 laddVol->SetLineColor(2);
419 TGeoVolume *modVol = 0;
420 TGeoVolume *mechLaddVol = 0;
422 // Now build up the ladder
423 if (fLayerNumber<3) {
424 modVol = CreateModuleInnerB(xlenI,ylen,zlen);
425 zmod = ((TGeoBBox*)modVol->GetShape())->GetDZ();
426 for (Int_t j=0; j<fNModules; j++) {
428 ypos = 0.021; // Remove small overlap - M.S: 21may13
429 zpos = -ladder->GetDZ() + j*2*zmod + zmod;
430 laddVol->AddNode(modVol, j, new TGeoTranslation(xpos, ypos, zpos));
433 // put mechanical stave structure, only inner barrel up to now
434 mechLaddVol = CreateStaveStructInnerB(xlenI,zlen);
436 laddVol->AddNode(mechLaddVol, fNModules, new TGeoCombiTrans(0, -0.15-ylen, 0, new TGeoRotation("",0, 0, 180)));
440 if (fStaveModel == AliITSUv1::kOBModel0) { // Create simplified stave struct as in v0
441 modVol = CreateModuleInnerB(xlenI,ylen,zlen);
442 printf("?????? %f %f %f\n",xlenI,ylen,zlen);
443 zmod = ((TGeoBBox*)modVol->GetShape())->GetDZ();
444 for (Int_t j=0; j<fNModules; j++) {
446 ypos = 0.021; // Remove small overlap - M.S: 21may13
447 zpos = -ladder->GetDZ() + j*2*zmod + zmod;
448 laddVol->AddNode(modVol, j, new TGeoTranslation(xpos, ypos, zpos));
450 } else { // (if fStaveModel) Create new stave struct as in TDR
451 modVol = CreateStaveOuterB(xLenO);
452 laddVol->AddNode(modVol, 1, new TGeoTranslation(0, 2.5, 0));
454 mechLaddVol = CreateSpaceFrameOuterB(xLenO);
456 laddVol->AddNode(mechLaddVol, 1,
457 new TGeoCombiTrans(0, 0, 0,
458 new TGeoRotation("", 180, 0, 0)));
459 } // if (fStaveModel)
463 // Done, return the ladder
467 //________________________________________________________________________
468 TGeoVolume* AliITSUv1Layer::CreateStaveStructInnerB(const Double_t xlad,
470 const TGeoManager *mgr){
472 // Create the mechanical stave structure
477 // mgr : the GeoManager (used only to get the proper material)
483 // Created: 22 Mar 2013 Chinorat Kobdaj
484 // Updated: 26 Apr 2013 Mario Sitta
487 TGeoVolume *mechLaddVol = 0;
489 switch (fStaveModel) {
490 case AliITSUv1::kIBModelDummy:
491 mechLaddVol = CreateStaveModelInnerBDummy(xlad,zlad,mgr);
493 case AliITSUv1::kIBModel0:
494 mechLaddVol = CreateStaveModelInnerB0(xlad,zlad,mgr);
496 case AliITSUv1::kIBModel1:
497 mechLaddVol = CreateStaveModelInnerB1(xlad,zlad,mgr);
499 case AliITSUv1::kIBModel21:
500 mechLaddVol = CreateStaveModelInnerB21(xlad,zlad,mgr);
502 case AliITSUv1::kIBModel22:
503 mechLaddVol = CreateStaveModelInnerB22(xlad,zlad,mgr);
505 case AliITSUv1::kIBModel3:
506 mechLaddVol = CreateStaveModelInnerB3(xlad,zlad,mgr);
509 AliFatal(Form("Unknown stave model %d",fStaveModel));
517 //________________________________________________________________________
518 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerBDummy(const Double_t ,
520 const TGeoManager *) const {
522 // Create dummy stave
527 // mgr : the GeoManager (used only to get the proper material)
533 // Created: 22 Mar 2013 Chinorat Kobdaj
534 // Updated: 26 Apr 2013 Mario Sitta
537 // Done, return the stave structur
541 //________________________________________________________________________
542 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xlad,
544 const TGeoManager *mgr){
546 // Create the mechanical stave structure for Model 0 of TDR
551 // mgr : the GeoManager (used only to get the proper material)
557 // Created: 22 Mar 2013 Chinorat Kobdaj
558 // Updated: 26 Apr 2013 Mario Sitta
561 // Materials defined in AliITSUv1
562 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
563 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
565 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
566 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
567 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
568 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
571 Double_t kConeOutRadius = 0.15/2;
572 Double_t kConeInRadius = 0.1430/2;
573 Double_t kStaveLength = zlad*2;
574 Double_t kStaveWidth = xlad*2-kConeOutRadius*2;
575 Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
576 Double_t kStaveHeight = 0.3;
577 Double_t kHeight = kStaveHeight/2;
578 Double_t kAlpha = 90-67;//90-33.69;
579 Double_t kTheta = kAlpha*TMath::DegToRad();
580 Double_t kS1 = kWidth/TMath::Sin(kTheta);
581 Double_t kL1 = kWidth/TMath::Tan(kTheta);
582 Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
583 Double_t kThe2 = TMath::ATan(kHeight/kS1);
584 Double_t kBeta = kThe2*TMath::RadToDeg();
585 // Int_t loop = kStaveLength/(kL1);
586 // Double_t s3 = kWidth/(2*TMath::Sin(kTheta));
587 // Double_t s4 = 3*kWidth/(2*TMath::Sin(kTheta));
589 AliDebug(1, Form("BuildLevel %d\n",fBuildLevel));
592 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
594 Double_t z=0, y=-0.011+0.0150, x=0;
596 TGeoVolume *mechLaddVol = 0;
598 if (fBuildLevel < 5) {
601 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
602 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
603 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07};
604 mechStruct->DefinePolygon(5,xv,yv);
605 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
606 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
608 mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
609 mechLaddVol->SetLineColor(12);
610 mechLaddVol->SetFillColor(12);
611 mechLaddVol->SetVisibility(kTRUE);
613 // detailed structure ++++++++++++++
614 //Pipe Kapton grey-35
615 TGeoTube *coolTube = new TGeoTube(kConeInRadius,kConeOutRadius,kStaveLength/2);
616 TGeoVolume *volCoolTube= new TGeoVolume("pipe", coolTube, medKapton);
617 volCoolTube->SetFillColor(35);
618 volCoolTube->SetLineColor(35);
619 mechLaddVol->AddNode(volCoolTube,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
620 mechLaddVol->AddNode(volCoolTube,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
623 if (fBuildLevel < 4) {
624 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength/2);
625 TGeoVolume *volCoolTubeW= new TGeoVolume("pipeWater", coolTubeW, medWater);
626 volCoolTubeW->SetFillColor(4);
627 volCoolTubeW->SetLineColor(4);
628 mechLaddVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
629 mechLaddVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0));
632 //frequency of filament
633 //n = 4 means very dense(4 filaments per interval)
634 //n = 2 means dense(2 filaments per interval)
636 Int_t loop = (Int_t)(kStaveLength/(4*kL1/n) + 2/n)-1;
637 if (fBuildLevel < 3) {
638 //Top CFRP Filament black-12 Carbon structure TGeoBBox (length,thickness,width)
639 TGeoBBox *t2=new TGeoBBox(kS2,0.007/2,0.15/2);//(kS2,0.002,0.02);
640 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
641 volT2->SetLineColor(12);
642 volT2->SetFillColor(12);
644 for(int i=1;i<loop;i++){ //i<60;i++){
645 mechLaddVol->AddNode(volT2,4*i+0,
646 new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
647 new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
648 mechLaddVol->AddNode(volT2,4*i+1,
649 new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
650 new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
651 mechLaddVol->AddNode(volT2,4*i+2,
652 new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
653 new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
654 mechLaddVol->AddNode(volT2,4*i+3,
655 new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1),
656 new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
660 //Bottom CFRP Filament black-12 Carbon structure TGeoBBox (thickness,width,length)
661 TGeoBBox *t1=new TGeoBBox(0.007/2,0.15/2,kS1);//(0.002,0.02,kS1);
662 TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K);
663 volT1->SetLineColor(12);
664 volT1->SetFillColor(12);
666 for(int i=1;i<loop;i++){
667 mechLaddVol->AddNode(volT1,4*i+0,
668 new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1),
669 new TGeoRotation("volT1",-90,kAlpha,0)));
670 mechLaddVol->AddNode(volT1,4*i+1,
671 new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1),
672 new TGeoRotation("volT1",90,kAlpha,0)));
673 mechLaddVol->AddNode(volT1,4*i+2,
674 new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
675 new TGeoRotation("volT1",-90,-kAlpha,0)));
676 mechLaddVol->AddNode(volT1,4*i+3,
677 new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
678 new TGeoRotation("volT1",-90,+kAlpha,0)));
682 if (fBuildLevel < 2) {
683 // Glue CFRP-Silicon layers TGeoBBox(thickness,width,kS1);
684 TGeoBBox *tG=new TGeoBBox(0.0075/2,0.18/2,kS1);
685 TGeoVolume *volTG=new TGeoVolume("Glue1", tG, medGlue);
686 volTG->SetLineColor(5);
687 volTG->SetFillColor(5);
689 for(int i=1;i<loop;i++){ //i<60;i++){
690 mechLaddVol->AddNode(volTG,4*i+0,
691 new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i),
692 new TGeoRotation("volTG",-90,kAlpha,0)));
693 mechLaddVol->AddNode(volTG,4*i+1,
694 new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i),
695 new TGeoRotation("volTG",90,kAlpha,0)));
696 mechLaddVol->AddNode(volTG,4*i+2,
697 new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*i*kL1)+kS1/2, //z-14.25+(i*2*kL1),
698 new TGeoRotation("volTG",-90,-kAlpha,0)));
699 mechLaddVol->AddNode(volTG,4*i+3,
700 new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1),
701 new TGeoRotation("volTG",-90,+kAlpha,0)));
704 TGeoBBox *glue = new TGeoBBox(xlad, 0.005/2, zlad);
705 TGeoVolume *volGlue=new TGeoVolume("Glue2", glue, medGlue);
706 volGlue->SetLineColor(5);
707 volGlue->SetFillColor(5);
708 //mechLaddVol->AddNode(volGlue, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
709 mechLaddVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
712 if (fBuildLevel < 1) {
713 //Flex cable brown-28 TGeoBBox(width,thickness,length);
714 TGeoBBox *kapCable = new TGeoBBox(xlad, 0.01/2, zlad);
715 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
716 volCable->SetLineColor(28);
717 volCable->SetFillColor(28);
718 mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
721 // Done, return the stave structur
726 //________________________________________________________________________
727 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xlad,
729 const TGeoManager *mgr){
731 // Create the mechanical stave structure for Model 1 of TDR
736 // mgr : the GeoManager (used only to get the proper material)
742 // Created: 22 Mar 2013 Chinorat Kobdaj
743 // Updated: 26 Apr 2013 Mario Sitta
746 // Materials defined in AliITSUv1
747 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
748 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
750 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
751 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
752 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
753 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
756 Double_t kConeOutRadius = 0.15/2;
757 // Double_t kConeInRadius = 0.1430/2;
758 Double_t kStaveLength = zlad*2;
759 // Double_t kStaveWidth = xlad*2-kConeOutRadius*2;
760 Double_t kStaveWidth = xlad*2;
761 Double_t kWidth = kStaveWidth/4;//1/2 of kWidth
762 Double_t kStaveHeight = 0.3;
763 Double_t kHeight = kStaveHeight/2;
764 Double_t kAlpha = 90-33.;//90-30;
765 Double_t kTheta = kAlpha*TMath::DegToRad();
766 Double_t kS1 = kWidth/TMath::Sin(kTheta);
767 Double_t kL1 = kWidth/TMath::Tan(kTheta);
768 Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
769 Double_t kThe2 = TMath::ATan(kHeight/kS1);
770 Double_t kBeta = kThe2*TMath::RadToDeg();
771 Int_t loop = (Int_t)((kStaveLength/(2*kL1))/2);
774 TGeoVolume *mechLaddVol = 0;
777 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
780 // detailed structure ++++++++++++++
781 Double_t z=0, y=-0.011+0.0150, x=0;
783 // Polimide micro channels numbers
784 Double_t yMC = y-kHeight+0.01;
785 Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
786 Double_t xladMC = (nb*0.1-0.08)/2;
789 if (fBuildLevel < 5) {
791 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
792 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
793 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07};
794 mechStruct->DefinePolygon(5,xv,yv);
795 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
796 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
798 mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
799 mechLaddVol->SetLineColor(12);
800 mechLaddVol->SetFillColor(12);
801 mechLaddVol->SetVisibility(kTRUE);
803 // Polimide micro channels numbers
804 TGeoBBox *tM0=new TGeoBBox(xladMC, 0.005/2, zlad);
805 TGeoVolume *volTM0=new TGeoVolume("MicroChanCover", tM0, medKapton);
806 volTM0->SetLineColor(35);
807 volTM0->SetFillColor(35);
808 mechLaddVol->AddNode(volTM0, 0, new TGeoCombiTrans(x,-0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
809 mechLaddVol->AddNode(volTM0, 1, new TGeoCombiTrans(x,+0.0125+yMC, z, new TGeoRotation("",0, 0, 0)));
811 TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zlad);
812 TGeoVolume *volTM0b=new TGeoVolume("MicroChanWalls", tM0b, medKapton);
813 volTM0b->SetLineColor(35);
814 volTM0b->SetFillColor(35);
815 for (Int_t ib=0;ib<nb;ib++) {
816 mechLaddVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xladMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
821 if (fBuildLevel < 4) {
822 // Water in Polimide micro channels
823 TGeoBBox *water=new TGeoBBox(0.08/2, 0.02/2, zlad+0.1);
824 TGeoVolume *volWater=new TGeoVolume("Water", water, medWater);
825 volWater->SetLineColor(4);
826 volWater->SetFillColor(4);
827 for (Int_t ib=0;ib<(nb-1);ib++) {
828 mechLaddVol->AddNode(volWater, ib, new TGeoCombiTrans(x+ib*0.1-xladMC+0.06,yMC, z, new TGeoRotation("",0, 0, 0)));
832 if (fBuildLevel < 3) {
833 //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length)
834 Double_t filWidth = 0.04;
835 Double_t filHeight= 0.02;
836 TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,kS1);
837 TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K);
838 volT1->SetLineColor(12);
839 volT1->SetFillColor(12);
840 for(int i=0;i<loop;i++){//i<30;i++){
841 mechLaddVol->AddNode(volT1,4*i+0,
842 new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1)+kS1/2,
843 new TGeoRotation("volT1",-90,kAlpha,0)));
844 mechLaddVol->AddNode(volT1,4*i+1,
845 new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1*i)+kS1/2,
846 new TGeoRotation("volT1",90,kAlpha,0)));
847 mechLaddVol->AddNode(volT1,4*i+2,
848 new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
849 new TGeoRotation("volT1",-90,-kAlpha,0)));
850 mechLaddVol->AddNode(volT1,4*i+3,
851 new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
852 new TGeoRotation("volT1",-90,+kAlpha,0)));
855 // Top filament CFRP black-12 Carbon structure TGeoBBox (length,thickness,width)
856 TGeoBBox *t2=new TGeoBBox(kS2,filHeight/2,filWidth/2);
857 TGeoVolume *volT2=new TGeoVolume("CFRPTop", t2, medM60J3K);
858 volT2->SetLineColor(12);
859 volT2->SetFillColor(12);
860 for(int i=0;i<loop;i++){ //i<30;i++){
861 mechLaddVol->AddNode(volT2,4*i+0,
862 new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
863 new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
864 mechLaddVol->AddNode(volT2,4*i+1,
865 new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2,
866 new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
867 mechLaddVol->AddNode(volT2,4*i+2,
868 new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
869 new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
870 mechLaddVol->AddNode(volT2,4*i+3,
871 new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
872 new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
876 if (fBuildLevel < 2) {
877 // Glue between filament and polimide micro channel
878 TGeoBBox *t3=new TGeoBBox(0.01/2,0.04,kS1);
879 TGeoVolume *volT3=new TGeoVolume("FilamentGlue", t3, medGlue);
880 volT3->SetLineColor(5);
881 volT3->SetFillColor(5);
882 for(int i=0;i<loop;i++){//i<30;i++){
883 mechLaddVol->AddNode(volT3,4*i+0,
884 new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2,
885 new TGeoRotation("volT1",-90,kAlpha,0)));
886 mechLaddVol->AddNode(volT3,4*i+1,
887 new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2,
888 new TGeoRotation("volT1",90,kAlpha,0)));
889 mechLaddVol->AddNode(volT3,4*i+2,
890 new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
891 new TGeoRotation("volT1",-90,-kAlpha,0)));
892 mechLaddVol->AddNode(volT3,4*i+3,
893 new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2,
894 new TGeoRotation("volT1",-90,+kAlpha,0)));
897 // Glue microchannel and sensor
898 TGeoBBox *glueM = new TGeoBBox(xlad, 0.01/2, zlad);
899 TGeoVolume *volGlueM=new TGeoVolume("MicroChanGlue", glueM, medGlue);
900 volGlueM->SetLineColor(5);
901 volGlueM->SetFillColor(5);
902 mechLaddVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0)));
904 // Glue sensor and kapton
905 TGeoBBox *glue = new TGeoBBox(xlad, 0.005/2, zlad);
906 TGeoVolume *volGlue=new TGeoVolume("SensorGlue", glue, medGlue);
907 volGlue->SetLineColor(5);
908 volGlue->SetFillColor(5);
909 mechLaddVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0)));
912 if (fBuildLevel < 1) {
913 TGeoBBox *kapCable = new TGeoBBox(xlad, 0.01/2, zlad);
914 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
915 volCable->SetLineColor(28);
916 volCable->SetFillColor(28);
917 mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0)));
920 // Done, return the stave structur
925 //________________________________________________________________________
926 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xlad,
928 const TGeoManager *mgr){
930 // Create the mechanical stave structure for Model 2.1 of TDR
935 // mgr : the GeoManager (used only to get the proper material)
941 // Created: 22 Mar 2013 Chinorat Kobdaj
942 // Updated: 26 Apr 2013 Mario Sitta
945 // Materials defined in AliITSUv1
946 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
947 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
949 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
950 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
951 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
952 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
953 TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
954 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
955 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
958 Double_t kConeOutRadius =0.151384/2;
959 Double_t kConeInRadius = 0.145034/2;
960 Double_t kStaveLength = zlad;
961 Double_t kStaveWidth = xlad*2;
962 Double_t kWidth = (kStaveWidth+0.005)/4;
963 Double_t kStaveHeigth = 0.33;//0.33;
964 Double_t kHeight = (kStaveHeigth+0.025)/2;
965 Double_t kAlpha = 57; //56.31;
966 Double_t kTheta = kAlpha*TMath::DegToRad();
967 Double_t kS1 = (kStaveWidth/4)/TMath::Sin(kTheta);
968 Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta);
969 Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2);
970 Double_t kThe2 = TMath::ATan(kHeight/kS1);
971 Double_t kBeta = kThe2*TMath::RadToDeg();
972 // Double_t lay1 = 0.003157;
973 Double_t kLay1 = 0.003;//Amec carbon
974 // Double_t lay2 = 0.0043215;//C Fleece carbon
975 Double_t kLay2 = 0.002;//C Fleece carbon
976 Double_t kLay3 = 0.007;//K13D2U carbon
977 Int_t loop = (Int_t)(kStaveLength/(2*kL1));
981 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
983 Double_t z=0, y=-(kConeOutRadius+0.03)+0.0385, x=0;
985 TGeoVolume *mechLaddVol = 0;
987 if (fBuildLevel < 5) {
989 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
990 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
991 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeigth,0,-kConeOutRadius*2-0.07};
992 mechStruct->DefinePolygon(5,xv,yv);
993 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
994 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
996 mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
997 mechLaddVol->SetLineColor(12);
998 mechLaddVol->SetFillColor(12);
999 mechLaddVol->SetVisibility(kTRUE);
1001 //Pipe Kapton grey-35
1002 TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius,kConeInRadius,kConeOutRadius);
1003 TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
1004 volCone1->SetFillColor(35);
1005 volCone1->SetLineColor(35);
1006 mechLaddVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
1007 mechLaddVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
1010 if (fBuildLevel < 4) {
1012 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength);
1013 TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
1014 volCoolTubeW->SetFillColor(4);
1015 volCoolTubeW->SetLineColor(4);
1016 mechLaddVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
1017 mechLaddVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
1020 if (fBuildLevel < 3) {
1022 // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width)
1023 TGeoBBox *t2=new TGeoBBox(kS2,0.02/2,0.04/2); //TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02);
1024 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
1025 volT2->SetLineColor(12);
1026 volT2->SetFillColor(12);
1027 for(int i=0;i<loop;i++){// i<28;i++){
1028 mechLaddVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta)));
1029 mechLaddVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta)));
1030 mechLaddVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta)));
1031 mechLaddVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta)));
1032 // mechLaddVol->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)));
1036 //wall side structure out
1037 TGeoBBox *box4 = new TGeoBBox(0.03/2,0.12/2,kStaveLength-0.50);
1038 TGeoVolume *plate4 = new TGeoVolume("WallOut",box4,medM60J3K);
1039 plate4->SetFillColor(35);
1040 plate4->SetLineColor(35);
1041 mechLaddVol->AddNode(plate4,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0)));
1042 mechLaddVol->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)));
1044 TGeoBBox *box5 = new TGeoBBox(0.015/2,0.12/2,kStaveLength-0.50);
1045 TGeoVolume *plate5 = new TGeoVolume("WallIn",box5,medM60J3K);
1046 plate5->SetFillColor(12);
1047 plate5->SetLineColor(12);
1048 mechLaddVol->AddNode(plate5,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-0.03-0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0)));
1049 mechLaddVol->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)));
1051 //Amec Thermasol red-2 cover tube FGS300
1052 TGeoConeSeg *cons1 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius,kConeOutRadius+kLay1,kConeOutRadius,kConeOutRadius+kLay1,0,180);
1053 TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
1054 cone11->SetFillColor(2);
1055 cone11->SetLineColor(2);
1056 mechLaddVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
1057 mechLaddVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone11",0,0,0)));
1059 TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,kLay1/2,kStaveLength-0.50);
1060 TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
1061 plate2->SetFillColor(2);
1062 plate2->SetLineColor(2);
1063 mechLaddVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate2",0,0,0)));
1065 TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay1/2,kStaveLength-0.50);
1066 TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
1067 plate21->SetFillColor(2);
1068 plate21->SetLineColor(2);
1069 mechLaddVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0)));
1070 mechLaddVol->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)));
1072 TGeoBBox *box22 = new TGeoBBox((kLay1/2),kConeOutRadius/2,kStaveLength-0.50);
1073 TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
1074 plate22->SetFillColor(2);
1075 plate22->SetLineColor(2);
1076 mechLaddVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1077 mechLaddVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1078 mechLaddVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1079 mechLaddVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1082 TGeoConeSeg *cons2 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,0,180);
1083 TGeoVolume *cone12 = new TGeoVolume("CFleecePipeCover",cons2,medCarbonFleece);
1084 cone12->SetFillColor(28);
1085 cone12->SetLineColor(28);
1086 mechLaddVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
1087 mechLaddVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone12",0,0,0)));
1089 TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+kLay1)))/2,kLay2/2,kStaveLength-0.50);
1090 TGeoVolume *plate3 = new TGeoVolume("CFleeceMiddle",box3,medCarbonFleece);
1091 plate3->SetFillColor(28);
1092 plate3->SetLineColor(28);
1093 mechLaddVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate3",0,0,0)));
1095 TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay2/2,kStaveLength-0.50);
1096 TGeoVolume *plate31 = new TGeoVolume("CFleeceLeftRight",box31,medCarbonFleece);
1097 plate31->SetFillColor(28);
1098 plate31->SetLineColor(28);
1099 mechLaddVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0)));
1100 mechLaddVol->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)));
1102 TGeoBBox *box32 = new TGeoBBox((kLay2/2),(kConeOutRadius-kLay1)/2,kStaveLength-0.50);
1103 TGeoVolume *plate32 = new TGeoVolume("CFleeceVertical",box32,medCarbonFleece);
1104 plate32->SetFillColor(28);
1105 plate32->SetLineColor(28);
1106 mechLaddVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1107 mechLaddVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1108 mechLaddVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1109 mechLaddVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1112 //K13D2U carbon plate
1113 TGeoBBox *box1 = new TGeoBBox(2*kWidth,kLay3/2,kStaveLength-0.50);
1114 TGeoVolume *plate1 = new TGeoVolume("CarbonPlate",box1,medK13D2U2k);
1115 plate1->SetFillColor(5);
1116 plate1->SetLineColor(5);
1117 mechLaddVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(kLay3/2)),z,new TGeoRotation("plate1",0,0,0)));
1119 //C Fleece bottom plate
1120 TGeoBBox *box6 = new TGeoBBox(2*kWidth,kLay2/2,kStaveLength-0.50);
1121 TGeoVolume *plate6 = new TGeoVolume("CFleeceBottom",box6,medCarbonFleece);
1122 plate6->SetFillColor(2);
1123 plate6->SetLineColor(2);
1124 mechLaddVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)),z,new TGeoRotation("plate1",0,0,0)));
1129 if (fBuildLevel < 2) {
1130 //Glue layers and kapton
1131 TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, 0.005/2, zlad);
1132 TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
1133 volGlue->SetLineColor(5);
1134 volGlue->SetFillColor(5);
1135 mechLaddVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
1136 mechLaddVol->AddNode(volGlue, 1, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+(0.01/2)), z, new TGeoRotation("",0, 0, 0)));
1139 if (fBuildLevel < 1) {
1140 TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, 0.01/2, zlad);
1141 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
1142 volCable->SetLineColor(28);
1143 volCable->SetFillColor(28);
1144 mechLaddVol->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)));
1148 // Done, return the stave structure
1153 //________________________________________________________________________
1154 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xlad,
1155 const Double_t zlad,
1156 const TGeoManager *mgr){
1158 // Create the mechanical stave structure for Model 2.2 of TDR
1163 // mgr : the GeoManager (used only to get the proper material)
1169 // Created: 22 Mar 2013 Chinorat Kobdaj
1170 // Updated: 26 Apr 2013 Mario Sitta
1171 // Updated: 30 Apr 2013 Wanchaloem Poonsawat
1174 // Materials defined in AliITSUv1
1175 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1176 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1178 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
1179 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1180 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1181 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
1182 TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
1183 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
1184 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1187 Double_t kConeOutRadius =0.107/2;//0.107/2;
1188 Double_t kConeInRadius = 0.1015/2;//0.10105/2
1189 Double_t kStaveLength = zlad;
1190 Double_t kStaveWidth = xlad*2;
1191 Double_t kWidth = (kStaveWidth)/4;
1192 Double_t kStaveHeight = 0.283;//0.33;
1193 Double_t kHeight = (kStaveHeight)/2;
1194 Double_t kAlpha = 57;//56.31;
1195 Double_t kTheta = kAlpha*TMath::DegToRad();
1196 Double_t kS1 = ((kStaveWidth)/4)/TMath::Sin(kTheta);
1197 Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta);
1198 Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(kThe2);
1199 Double_t kThe2 = TMath::ATan(kHeight/(0.375-0.036));
1200 Double_t kBeta = kThe2*TMath::RadToDeg();
1201 Double_t klay1 = 0.003;//Amec carbon
1202 Double_t klay2 = 0.002;//C Fleece carbon
1203 Double_t klay3 = 0.007;//CFplate K13D2U carbon
1204 Double_t klay4 = 0.007;//GluekStaveLength/2
1205 Double_t klay5 = 0.01;//Flex cable
1206 Double_t kTopVertexMaxWidth = 0.072;
1207 Double_t kTopVertexHeight = 0.04;
1208 Double_t kSideVertexMWidth = 0.052;
1209 Double_t kSideVertexHeight = 0.11;
1212 Int_t loop = (Int_t)(kStaveLength/(2*kL1));
1215 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
1217 Double_t z=0, y=-(2*kConeOutRadius)+klay1+klay2+fSensorThick/2-0.0004, x=0;
1219 TGeoVolume *mechLaddVol = 0;
1221 if (fBuildLevel < 5) {
1222 // world (trapezoid)
1223 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
1224 Double_t xv[6] = {kStaveWidth/2,kStaveWidth/2,0.012,-0.012,-kStaveWidth/2,-kStaveWidth/2};
1225 /* Double_t yv[6] = {-2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5),
1226 0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02,
1227 -2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5)}; // (kConeOutRadius*2)-0.0635 */
1228 Double_t yv[6] = {-(kConeOutRadius*2)-0.06395,0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02,-(kConeOutRadius*2)-0.06395}; // (kConeOutRadius*2)-0.064
1229 mechStruct->DefinePolygon(6,xv,yv);
1230 mechStruct->DefineSection(0,-kStaveLength,0,0,1.);
1231 mechStruct->DefineSection(1,kStaveLength,0,0,1.);
1233 mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
1234 mechLaddVol->SetLineColor(12);
1235 mechLaddVol->SetFillColor(12);
1236 mechLaddVol->SetVisibility(kTRUE);
1238 //Polyimide Pipe Kapton grey-35
1239 TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius-0.0001,kConeInRadius,kConeOutRadius-0.0001);
1240 TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton);
1241 volCone1->SetFillColor(35);
1242 volCone1->SetLineColor(35);
1243 mechLaddVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z));
1244 mechLaddVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z));
1247 if (fBuildLevel < 4) {
1248 TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius-0.0001,kStaveLength);
1249 TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater);
1250 volCoolTubeW->SetFillColor(4);
1251 volCoolTubeW->SetLineColor(4);
1252 mechLaddVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z));
1253 mechLaddVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z));
1256 if (fBuildLevel < 3) {
1258 // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width)
1259 TGeoBBox *t2=new TGeoBBox(kS2-0.028,0.02/2,0.02/2); //0.04/2//TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02);//kS2-0.03 old Config.C
1260 TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K);
1261 volT2->SetLineColor(12);
1262 volT2->SetFillColor(12);
1263 for(int i=0;i<loop;i++){// i<28;i++){
1264 // 1) Front Left Top Filament
1265 mechLaddVol->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)));
1266 // 2) Front Right Top Filament
1267 mechLaddVol->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)));
1268 // 3) Back Left Top Filament
1269 mechLaddVol->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)));
1270 // 4) Back Right Top Filament
1271 mechLaddVol->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)));
1277 TGeoTrd1 *trd1 = new TGeoTrd1(0,kTopVertexMaxWidth/2,kStaveLength,kTopVertexHeight/2);
1278 TGeoVolume *ibdv = new TGeoVolume("TopVertex",trd1,medM60J3K);
1279 ibdv->SetFillColor(12);
1280 ibdv->SetLineColor(12);
1281 mechLaddVol->AddNode(ibdv,1,new TGeoCombiTrans(x,y+kStaveHeight+0.03,z,new TGeoRotation("ibdv",0.,-90,0)));//y+kStaveHeight+0.056
1284 TGeoTrd1 *trd2 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
1285 TGeoVolume *ibdv2 = new TGeoVolume("LeftVertex",trd2,medM60J3K);
1286 ibdv2->SetFillColor(12);
1287 ibdv2->SetLineColor(12);
1288 mechLaddVol->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,
1291 TGeoTrd1 *trd3 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2);
1292 TGeoVolume *ibdv3 = new TGeoVolume("RightVertex",trd3,medM60J3K);
1293 ibdv3->SetFillColor(12);
1294 ibdv3->SetLineColor(12);
1295 mechLaddVol->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
1298 TGeoConeSeg *cons2 = new TGeoConeSeg(zlad,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,0,180);
1299 TGeoVolume *cone12 = new TGeoVolume("CarbonFleecePipeCover",cons2,medCarbonFleece);
1300 cone12->SetFillColor(28);
1301 cone12->SetLineColor(28);
1302 mechLaddVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone12",0,0,0)));
1303 mechLaddVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone12",0,0,0)));
1305 TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+klay1)))/2,klay2/2,zlad);//kStaveLength-0.50);
1306 TGeoVolume *plate3 = new TGeoVolume("CarbonFleeceMiddle",box3,medCarbonFleece);
1307 plate3->SetFillColor(28);
1308 plate3->SetLineColor(28);
1309 mechLaddVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate3",0,0,0)));
1311 TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,klay2/2,zlad);
1312 TGeoVolume *plate31 = new TGeoVolume("CarbonFleeceLeftRight",box31,medCarbonFleece);
1313 plate31->SetFillColor(28);
1314 plate31->SetLineColor(28);
1315 mechLaddVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0)));
1316 mechLaddVol->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)));
1318 TGeoBBox *box32 = new TGeoBBox((klay2/2),(kConeOutRadius-klay1)/2,zlad);
1319 TGeoVolume *plate32 = new TGeoVolume("CarbonFleeceVertical",box32,medCarbonFleece);
1320 plate32->SetFillColor(28);
1321 plate32->SetLineColor(28);
1322 mechLaddVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1323 mechLaddVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1324 mechLaddVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1325 mechLaddVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0)));
1327 //Amec Thermasol red-2 cover tube FGS300 or Carbon Paper
1328 TGeoConeSeg *cons1 = new TGeoConeSeg(zlad,kConeOutRadius,kConeOutRadius+klay1-0.0001,kConeOutRadius,kConeOutRadius+klay1-0.0001,0,180);//kConeOutRadius+klay1-0.0001
1329 TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003);
1330 cone11->SetFillColor(2);
1331 cone11->SetLineColor(2);
1332 mechLaddVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone11",0,0,0)));
1333 mechLaddVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone11",0,0,0)));
1335 TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,(klay1/2),zlad);//kStaveLength-0.50);
1336 TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003);
1337 plate2->SetFillColor(2);
1338 plate2->SetLineColor(2);
1339 mechLaddVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate2",0,0,0)));
1341 TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,(klay1/2),zlad);
1342 TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003);
1343 plate21->SetFillColor(2);
1344 plate21->SetLineColor(2);
1345 mechLaddVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(klay1/2)+0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0)));
1346 mechLaddVol->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)));
1348 TGeoBBox *box22 = new TGeoBBox((klay1/2),kConeOutRadius/2,zlad);
1349 TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003);
1350 plate22->SetFillColor(2);
1351 plate22->SetLineColor(2);
1352 mechLaddVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1353 mechLaddVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1354 mechLaddVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1355 mechLaddVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0)));
1358 TGeoBBox *box1 = new TGeoBBox(2*kWidth,(klay3)/2,zlad);
1359 TGeoVolume *plate1 = new TGeoVolume("CFPlate",box1,medK13D2U2k);
1360 plate1->SetFillColor(5);
1361 plate1->SetLineColor(5);
1362 mechLaddVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(klay3/2)),z,new TGeoRotation("plate1",0,0,0)));
1364 //C Fleece bottom plate
1365 TGeoBBox *box6 = new TGeoBBox(2*kWidth,(klay2)/2,zlad);
1366 TGeoVolume *plate6 = new TGeoVolume("CarbonFleeceBottom",box6,medCarbonFleece);
1367 plate6->SetFillColor(2);
1368 plate6->SetLineColor(2);
1369 mechLaddVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+(klay2/2)),z,new TGeoRotation("plate6",0,0,0)));
1372 if (fBuildLevel < 2) {
1373 //Glue klayers and kapton
1374 TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, (klay4)/2, zlad);
1375 TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue);
1376 volGlue->SetLineColor(5);
1377 volGlue->SetFillColor(5);
1378 // mechLaddVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4/2)), z, new TGeoRotation("",0, 0, 0)));
1379 mechLaddVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4)/2)+0.00005, z, new TGeoRotation("",0, 0, 0)));
1382 if (fBuildLevel < 1) {
1384 TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, klay5/2, zlad);//klay5/2
1385 TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable);
1386 volCable->SetLineColor(28);
1387 volCable->SetFillColor(28);
1388 // mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.0002, z, new TGeoRotation("",0, 0, 0)));
1389 mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.01185, z, new TGeoRotation("",0, 0, 0)));
1391 // Done, return the stave structe
1396 //________________________________________________________________________
1397 TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xlad,
1398 const Double_t zlad,
1399 const TGeoManager *mgr){
1401 // Create the mechanical stave structure for Model 3 of TDR
1406 // mgr : the GeoManager (used only to get the proper material)
1412 // Created: 28 May 2013 Chinorat Kobdaj
1413 // Updated: Mario Sitta
1414 // Updated: Wanchaloem Poonsawat
1417 // Materials defined in AliITSUv1
1418 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1419 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1421 TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$");
1422 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1423 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1424 TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$");
1425 //TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$");
1426 //TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$");
1427 //TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1430 Double_t kConeOutRadius = 0.15/2;
1431 Double_t kStaveLength = zlad*2;
1432 Double_t kStaveWidth = xlad*2;
1433 Double_t w = kStaveWidth/4;//1/2 of W
1434 Double_t staveHeight = 0.3;
1435 Double_t h = staveHeight/2;
1436 Double_t alpha = 90-33.;//90-30;
1437 Double_t the1 = alpha*TMath::DegToRad();
1438 Double_t s1 = w/TMath::Sin(the1);
1439 Double_t l = w/TMath::Tan(the1);
1440 Double_t s2 = TMath::Sqrt(h*h + s1*s1);//TMath::Sin(the2);
1441 Double_t the2 = TMath::ATan(h/s1);
1442 Double_t beta = the2*TMath::RadToDeg();
1443 Double_t klay4 = 0.007; //Glue
1444 Double_t klay5 = 0.01; //Flexcable
1445 Int_t loop = (Int_t)((kStaveLength/(2*l))/2);
1447 Double_t ang1 = 0*TMath::DegToRad();
1448 Double_t ang2 = 0*TMath::DegToRad();
1449 Double_t ang3 = 0*TMath::DegToRad();
1451 Double_t headWidth=0.25;
1452 Double_t smcLength=kStaveLength/modules-2*headWidth;//6.25;
1453 Double_t smcWidth=kStaveWidth;
1454 Double_t smcSide1Thick=0.03;
1455 Double_t vaporThick=0.032;
1456 Double_t liquidThick=0.028;
1457 Double_t smcSide2Thick=0.01;
1458 Double_t smcSide3Thick=0.0055;
1459 Double_t smcSide4Thick=0.0095;
1460 Double_t smcSide5Thick=0.0075;
1461 Double_t smcSpace=0.01;
1465 snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSLadderPattern(), fLayerNumber);
1467 // detailed structure ++++++++++++++
1468 Double_t z=0, y=0-0.007, x=0;
1470 // Polimide micro channels numbers
1471 Double_t yMC = y-h+0.01;
1472 Int_t nb = (Int_t)(kStaveWidth/0.1)+1;
1473 Double_t xladMC = (nb*0.1-0.08)/2;
1476 TGeoVolume *mechLaddVol = 0;
1477 if (fBuildLevel < 5) {
1478 // world (trapezoid)
1479 TGeoXtru *mechStruct = new TGeoXtru(2); //z sections
1480 Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1};
1481 Double_t yv[5] = {-kConeOutRadius*2-0.07,0,staveHeight,0,-kConeOutRadius*2-0.07};
1482 mechStruct->DefinePolygon(5,xv,yv);
1483 mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.);
1484 mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.);
1485 mechLaddVol = new TGeoVolume(volname, mechStruct, medAir);
1486 mechLaddVol->SetLineColor(12);
1487 mechLaddVol->SetFillColor(12);
1488 mechLaddVol->SetVisibility(kTRUE);
1490 // Silicon micro channels numbers
1492 TGeoBBox *tM0a=new TGeoBBox(smcWidth/2, 0.003/2, headWidth/2);
1493 TGeoVolume *volTM0a=new TGeoVolume("microChanTop1", tM0a, medKapton);
1494 volTM0a->SetLineColor(35);
1495 volTM0a->SetFillColor(35);
1497 for(Int_t mo=1; mo<=modules; mo++) {
1498 mechLaddVol->AddNode(volTM0a, 0, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));
1499 mechLaddVol->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)));
1501 TGeoBBox *tM0c=new TGeoBBox(0.3/2, 0.003/2,smcLength/2);
1502 TGeoVolume *volTM0c=new TGeoVolume("microChanTop2", tM0c, medKapton);
1503 volTM0c->SetLineColor(35);
1504 volTM0c->SetFillColor(35);
1505 for(Int_t mo=1; mo<=modules; mo++) {
1506 mechLaddVol->AddNode(volTM0c, 0, new TGeoCombiTrans(x+(smcWidth/2)-(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));
1507 mechLaddVol->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)));
1509 TGeoBBox *tM0c1=new TGeoBBox(0.2225/2, 0.003/2,smcLength/2);
1510 TGeoVolume *volTM0c1=new TGeoVolume("microChanBot1", tM0c1, medKapton);
1511 volTM0c1->SetLineColor(6);
1512 volTM0c1->SetFillColor(6);
1513 for(Int_t mo=1; mo<=modules; mo++) {
1514 mechLaddVol->AddNode(volTM0c1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1515 mechLaddVol->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)));
1517 TGeoBBox *tM0c2=new TGeoBBox(0.072/2, 0.003/2,smcLength/2);
1518 TGeoVolume *volTM0c2=new TGeoVolume("microChanBot2", tM0c2, medKapton);
1519 volTM0c2->SetLineColor(35);
1520 volTM0c2->SetFillColor(35);
1521 for(Int_t mo=1; mo<=modules; mo++) {
1522 mechLaddVol->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)));
1524 TGeoBBox *tM0c2r=new TGeoBBox(0.068/2, 0.003/2,smcLength/2);
1525 TGeoVolume *volTM0c2r=new TGeoVolume("microChanBot3", tM0c2r, medKapton);
1526 volTM0c2r->SetLineColor(35);
1527 volTM0c2r->SetFillColor(35);
1528 for(Int_t mo=1; mo<=modules; mo++) {
1529 mechLaddVol->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)));
1531 TGeoBBox *tM0d=new TGeoBBox(smcSide1Thick/2, 0.035/2,smcLength/2);
1532 TGeoVolume *volTM0d=new TGeoVolume("microChanSide1", tM0d, medKapton);
1533 volTM0d->SetLineColor(12);
1534 volTM0d->SetFillColor(12);
1535 for(Int_t mo=1; mo<=modules; mo++) {
1536 mechLaddVol->AddNode(volTM0d, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1537 mechLaddVol->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)));
1540 TGeoBBox *tM0d1=new TGeoBBox(smcSide2Thick/2, 0.035/2,smcLength/2);
1541 TGeoVolume *volTM0d1=new TGeoVolume("microChanSide2", tM0d1, medKapton);
1542 volTM0d1->SetLineColor(12);
1543 volTM0d1->SetFillColor(12);
1544 for(Int_t mo=1; mo<=modules; mo++) {
1545 mechLaddVol->AddNode(volTM0d1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1546 mechLaddVol->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)));
1548 TGeoBBox *tM0d2=new TGeoBBox(smcSide3Thick/2, (hh+0.003)/2, smcLength/2);
1549 TGeoVolume *volTM0d2=new TGeoVolume("microChanSide3", tM0d2, medKapton);
1550 volTM0d2->SetLineColor(12);
1551 volTM0d2->SetFillColor(12);
1552 for(Int_t mo=1; mo<=modules; mo++) {
1553 mechLaddVol->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)));
1555 TGeoBBox *tM0d2r=new TGeoBBox(smcSide4Thick/2, (hh+0.003)/2, smcLength/2);
1556 TGeoVolume *volTM0d2r=new TGeoVolume("microChanSide4", tM0d2r, medKapton);
1557 volTM0d2r->SetLineColor(12);
1558 volTM0d2r->SetFillColor(12);
1559 for(Int_t mo=1; mo<=modules; mo++) {
1560 mechLaddVol->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)));
1562 TGeoBBox *tM0e=new TGeoBBox(smcSide5Thick/2, hh/2,smcLength/2);
1563 TGeoVolume *volTM0e=new TGeoVolume("microChanSide5", tM0e, medKapton);
1564 volTM0e->SetLineColor(12);
1565 volTM0e->SetFillColor(12);
1566 for(Int_t mo=1; mo<=modules; mo++) {
1567 for (Int_t ie=0;ie<11;ie++) {
1568 mechLaddVol->AddNode(volTM0e, 0, new TGeoCombiTrans(x-(ie*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace-(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1569 mechLaddVol->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)));
1573 TGeoBBox *tM0f=new TGeoBBox(0.02/2, hh/2, smcLength/2);
1574 TGeoVolume *volTM0f=new TGeoVolume("microChanTop3", tM0f, medKapton);
1575 //Double_t smcChannels=12;
1576 Double_t smcCloseWallvapor=smcWidth/2-smcSide1Thick-vaporThick-smcSide2Thick-smcSide3Thick-12*smcSpace-11*smcSide5Thick;
1577 Double_t smcCloseWallliquid=smcWidth/2-smcSide1Thick-liquidThick-smcSide2Thick-smcSide4Thick-12*smcSpace-11*smcSide5Thick;
1578 volTM0f->SetLineColor(12);
1579 volTM0f->SetFillColor(12);
1580 for(Int_t mo=1; mo<=modules; mo++) {
1581 mechLaddVol->AddNode(volTM0f, 0, new TGeoCombiTrans(x+smcCloseWallvapor-(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1582 mechLaddVol->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)));
1584 //Head(back) microchannel
1586 TGeoBBox *tM0hb=new TGeoBBox(smcWidth/2, 0.025/2, headWidth/2);
1587 TGeoVolume *volTM0hb=new TGeoVolume("microChanHeadBackBottom1", tM0hb, medKapton);
1588 volTM0hb->SetLineColor(4);
1589 volTM0hb->SetFillColor(4);
1590 for(Int_t mo=1; mo<=modules; mo++) {
1591 mechLaddVol->AddNode(volTM0hb, 0, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1592 mechLaddVol->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)));
1594 TGeoBBox *tM0h1=new TGeoBBox(smcWidth/2, 0.013/2, 0.05/2);
1595 TGeoVolume *volTM0h1=new TGeoVolume("microChanHeadBackBottom2", tM0h1, medKapton);
1596 volTM0h1->SetLineColor(5);
1597 volTM0h1->SetFillColor(5);
1598 for(Int_t mo=1; mo<=modules; mo++) {
1599 mechLaddVol->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)));
1601 TGeoBBox *tM0h2=new TGeoBBox(smcWidth/2, 0.003/2, 0.18/2);
1602 TGeoVolume *volTM0h2=new TGeoVolume("microChanHeadBackBottom7", tM0h2, medKapton);
1603 volTM0h2->SetLineColor(6);
1604 volTM0h2->SetFillColor(6);
1605 for(Int_t mo=1; mo<=modules; mo++) {
1606 mechLaddVol->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)));
1608 TGeoBBox *tM0h3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
1609 TGeoVolume *volTM0h3=new TGeoVolume("microChanHeadBackBottom3", tM0h3, medKapton);
1610 volTM0h3->SetLineColor(5);
1611 volTM0h3->SetFillColor(5);
1612 for(Int_t mo=1; mo<=modules; mo++) {
1613 mechLaddVol->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)));
1615 TGeoBBox *tM0b1=new TGeoBBox(smcWidth/2, 0.013/2, 0.03/2);
1616 TGeoVolume *volTM0b1=new TGeoVolume("microChanHeadBackBottom4", tM0b1, medKapton);
1617 volTM0b1->SetLineColor(5);
1618 volTM0b1->SetFillColor(5);
1619 for(Int_t mo=1; mo<=modules; mo++) {
1620 mechLaddVol->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)));
1622 TGeoBBox *tM0b2=new TGeoBBox(smcWidth/2, 0.003/2, 0.2/2);
1623 TGeoVolume *volTM0b2=new TGeoVolume("microChanHeadBackBottom5", tM0b2, medKapton);
1624 volTM0b2->SetLineColor(6);
1625 volTM0b2->SetFillColor(6);
1626 for(Int_t mo=1; mo<=modules; mo++) {
1627 mechLaddVol->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)));
1629 TGeoBBox *tM0b3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2);
1630 TGeoVolume *volTM0b3=new TGeoVolume("microChanHeadBackBottom6", tM0b3, medKapton);
1631 volTM0b3->SetLineColor(5);
1632 volTM0b3->SetFillColor(5);
1633 for(Int_t mo=1; mo<=modules; mo++) {
1634 mechLaddVol->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)));
1637 TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zlad);
1638 TGeoVolume *volTM0b=new TGeoVolume("microChanWalls", tM0b, medKapton);
1639 volTM0b->SetLineColor(35);
1640 volTM0b->SetFillColor(35);
1641 for (Int_t ib=0;ib<nb;ib++) {
1642 //mechLaddVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xladMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0)));
1647 if (fBuildLevel < 4) {
1649 //**********cooling inlet outlet
1651 TGeoBBox *tM0dv=new TGeoBBox(vaporThick/2, 0.035/2,smcLength/2);
1652 TGeoVolume *volTM0dv=new TGeoVolume("microChanVapor", tM0dv, medWater);
1653 volTM0dv->SetLineColor(2);
1654 volTM0dv->SetFillColor(2);
1655 for(Int_t mo=1; mo<=modules; mo++) {
1656 mechLaddVol->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)));
1658 TGeoBBox *tM0dl=new TGeoBBox(liquidThick/2, 0.035/2,smcLength/2);
1659 TGeoVolume *volTM0dl=new TGeoVolume("microChanLiquid", tM0dl, medWater);
1660 volTM0dl->SetLineColor(3);
1661 volTM0dl->SetFillColor(3);
1662 for(Int_t mo=1; mo<=modules; mo++) {
1663 mechLaddVol->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)));
1665 // small cooling fluid now using water wait for freeon value
1666 TGeoBBox *tM0dlq=new TGeoBBox(smcSpace/2, hh/2,smcLength/2);
1667 TGeoVolume *volTM0dlq=new TGeoVolume("smallLiquid", tM0dlq, medWater);
1668 volTM0dlq->SetLineColor(3);
1669 volTM0dlq->SetFillColor(3);
1670 TGeoBBox *tM0dvp=new TGeoBBox(smcSpace/2, hh/2,smcLength/2);
1671 TGeoVolume *volTM0dvp=new TGeoVolume("microChanVapor", tM0dvp, medWater);
1672 volTM0dvp->SetLineColor(2);
1673 volTM0dvp->SetFillColor(2);
1674 for(Int_t mo=1; mo<=modules; mo++) {
1675 for (Int_t is=0;is<12;is++) {
1676 mechLaddVol->AddNode(volTM0dlq, 0, new TGeoCombiTrans(x+(is*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(vaporThick)+(smcSide2Thick)+(smcSide3Thick)+smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0)));
1677 mechLaddVol->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)));
1685 if (fBuildLevel < 3) {
1687 //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length)
1689 Double_t filWidth = 0.04;
1690 Double_t filHeight= 0.02;
1691 TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,s1);
1692 TGeoVolume *volT1=new TGeoVolume("bottomFilament", t1, medM60J3K);
1693 volT1->SetLineColor(12);
1694 volT1->SetFillColor(12);
1695 for(int i=0;i<loop;i++){//i<30;i++){
1696 mechLaddVol->AddNode(volT1,4*i+0,
1697 new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2,
1698 new TGeoRotation("volT1",-90,alpha,0)));
1699 mechLaddVol->AddNode(volT1,4*i+1,
1700 new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2,
1701 new TGeoRotation("volT1",90,alpha,0)));
1702 mechLaddVol->AddNode(volT1,4*i+2,
1703 new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1704 new TGeoRotation("volT1",-90,-alpha,0)));
1705 mechLaddVol->AddNode(volT1,4*i+3,
1706 new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1707 new TGeoRotation("volT1",-90,+alpha,0)));
1710 // Top filament CERP black-12 Carbon structure TGeoBBox (length,thickness,width)
1712 TGeoBBox *t2=new TGeoBBox(s2,filHeight/2,filWidth/2);
1713 TGeoVolume *volT2=new TGeoVolume("topFilament", t2, medM60J3K);
1714 volT2->SetLineColor(12);
1715 volT2->SetFillColor(12);
1716 for(int i=0;i<loop;i++){ //i<30;i++){
1717 mechLaddVol->AddNode(volT2,4*i+0,
1718 new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
1719 new TGeoRotation("volT2",90,90-alpha,90-beta)));
1720 mechLaddVol->AddNode(volT2,4*i+1,
1721 new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2,
1722 new TGeoRotation("volT2",90,-90+alpha,-90+beta)));
1723 mechLaddVol->AddNode(volT2,4*i+2,
1724 new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1725 new TGeoRotation("volT2",90,-90+alpha,90-beta)));
1726 mechLaddVol->AddNode(volT2,4*i+3,
1727 new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2,
1728 new TGeoRotation("volT2",90,90-alpha,-90+beta)));
1732 if (fBuildLevel < 2) {
1734 // Glue Filament and Silicon MicroChannel
1735 TGeoBBox *tM0=new TGeoBBox(xladMC/5, klay4/2, zlad);
1736 TGeoVolume *volTM0=new TGeoVolume("glueFM", tM0,medGlue );
1737 volTM0->SetLineColor(5);
1738 volTM0->SetFillColor(5);
1739 mechLaddVol->AddNode(volTM0, 0, new TGeoCombiTrans(x-xlad/2-0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
1740 mechLaddVol->AddNode(volTM0, 1, new TGeoCombiTrans(x+xlad/2+0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0)));
1743 // Glue microchannel and sensor
1744 TGeoBBox *glueM = new TGeoBBox(xladMC/5, klay4/2, zlad);
1745 TGeoVolume *volGlueM=new TGeoVolume("glueMS", glueM, medGlue);
1746 volGlueM->SetLineColor(5);
1747 volGlueM->SetFillColor(5);
1748 mechLaddVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x-xlad/2-0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
1749 mechLaddVol->AddNode(volGlueM, 1, new TGeoCombiTrans(x+xlad/2+0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0)));
1751 // Glue sensor and kapton
1752 TGeoBBox *glue = new TGeoBBox(xlad, klay4/2, zlad);
1753 TGeoVolume *volGlue=new TGeoVolume("glueSensorBus", glue, medGlue);
1754 volGlue->SetLineColor(5);
1755 volGlue->SetFillColor(5);
1756 mechLaddVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4/2, z, new TGeoRotation("",0, 0, 0)));
1759 if (fBuildLevel < 1) {
1760 TGeoBBox *kapCable = new TGeoBBox(xlad, klay5/2, zlad);
1761 TGeoVolume *volCable=new TGeoVolume("Flexcable", kapCable, medFlexCable);
1762 volCable->SetLineColor(28);
1763 volCable->SetFillColor(28);
1764 mechLaddVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4-klay5/2, z, new TGeoRotation("",0, 0, 0)));
1767 // Done, return the stave structur
1771 //________________________________________________________________________
1772 TGeoVolume* AliITSUv1Layer::CreateStaveOuterB(const Double_t xlad,
1773 const TGeoManager *mgr){
1775 // Create the module stave for the Outer Barrel
1779 // mgr : the GeoManager (used only to get the proper material)
1785 // Created: 20 Dec 2013 Mario Sitta
1788 TGeoVolume *mechLaddVol = 0;
1790 switch (fStaveModel) {
1791 case AliITSUv1::kOBModelDummy:
1792 mechLaddVol = CreateStaveModelOuterBDummy(xlad,mgr);
1794 case AliITSUv1::kOBModel0:
1795 mechLaddVol = CreateStaveModelOuterB0(xlad,mgr);
1797 case AliITSUv1::kOBModel1:
1798 mechLaddVol = CreateStaveModelOuterB1(xlad,mgr);
1801 AliFatal(Form("Unknown stave model %d",fStaveModel));
1808 //________________________________________________________________________
1809 TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterBDummy(const Double_t ,
1810 const TGeoManager *) const {
1812 // Create dummy stave
1816 // mgr : the GeoManager (used only to get the proper material)
1822 // Created: 20 Dec 2013 Mario Sitta
1826 // Done, return the stave structure
1830 //________________________________________________________________________
1831 TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB0(const Double_t ,
1832 const TGeoManager *) const {
1834 // Creation of the mechanical stave structure for the Outer Barrel as in v0
1835 // is done directly in CreateLadder, so this method does nothing
1836 // (doing it there is simpler, since all needed dimensions are known)
1840 // mgr : the GeoManager (used only to get the proper material)
1846 // Created: 20 Dec 2013 Mario Sitta
1849 // Done, return the stave structure
1853 //________________________________________________________________________
1854 TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB1(const Double_t xlad,
1855 const TGeoManager *mgr){
1857 // Create the mechanical stave structure for the Outer Barrel as in TDR
1861 // mgr : the GeoManager (used only to get the proper material)
1867 // Created: 20 Nov 2013 Anastasia Barbano
1868 // Updated: 16 Jan 2014 Mario Sitta
1871 // Materials defined in AliITSUv0
1872 TGeoMedium *medAluminum = mgr->GetMedium("ITS_ALUMINUM$");
1873 TGeoMedium *medCarbon = mgr->GetMedium("ITS_CARBON$");
1874 TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$");
1875 TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$");
1876 TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$");
1877 TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$");
1878 TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); //amec thermasol
1879 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
1883 Double_t modGap = fgkOBModuleGap;
1884 Double_t yFlex1 = fgkOBFlexCable1Thick;
1885 Double_t yFlex2 = fgkOBFlexCable2Thick;
1886 Double_t yBus1 = fgkOBBusCable1Thick;
1887 Double_t yBus2 = fgkOBBusCable2Thick;
1888 Double_t xModPlate = fgkOBHalfStaveWidth;
1889 Double_t yModPlate = fgkOBCarbonPlateThick;
1890 Double_t xCPlate = fgkOBHalfStaveWidth;
1891 Double_t yCPlate = fgkOBColdPlateThick;
1892 Double_t yGlue = fgkOBGlueThick;
1893 Double_t flexOverlap = 5;
1894 Double_t deltaY = 0.176;
1895 Double_t xOverlap = 0.23; //overlapping of the halfStaves to cover the dead zone of sensors
1896 Double_t zMod = fgkOBModuleZLength;
1897 Double_t xHalfSt = fgkOBHalfStaveWidth/2;
1898 Double_t xPos = xOverlap/2 - xHalfSt;
1899 Double_t xlen = xlad;
1900 Double_t rMin = 0.267/2;
1901 Double_t rMax = rMin + 0.0065;
1902 Double_t kLay1 = 0.004; //carbon fleece
1903 Double_t kLay2 = 0.003; //carbon paper
1904 Double_t yPos = kLay1+kLay2;
1906 Double_t zpos, zpos5cm;
1912 if (fIsTurbo) xlen = 0.5*fLadderWidth;
1913 //ylen = 0.5*fLadderThick;
1914 ymod = 0.005/2;//0.5*fSensorThick;
1915 ylen = 0.5*(2*kLay1+2*kLay2+2*rMax+yCPlate+yGlue+ yModPlate + ymod + 2*yFlex1 + 2*yFlex2 + yBus1 + yBus2 + deltaY);
1916 zact = fNModules*zMod; //active area
1917 zbus = zact + (fNModules-1)*modGap;
1921 // First create all needed shapes
1923 TGeoTube *coolTube = new TGeoTube("CoolingTube",rMin,rMax,zbus/2);
1924 TGeoTube *coolTubeW = new TGeoTube("CoolingTubeWater",0,rMin,zbus/2);
1925 TGeoBBox *coldPlate = new TGeoBBox("ColdPlate",xCPlate/2,yCPlate/2,zbus/2);
1926 TGeoBBox *glue = new TGeoBBox("Glue",xCPlate/2,yGlue/2,zbus/2);
1927 TGeoBBox *modPlate = new TGeoBBox("CarbonPlate",xModPlate/2,yModPlate/2,zbus/2);
1928 TGeoBBox *flex1 = new TGeoBBox("Flex1MV",xHalfSt,yFlex1/2,zMod/2);
1929 TGeoBBox *flex2 = new TGeoBBox("Flex2MV",xHalfSt,yFlex2/2,zMod/2);
1930 TGeoBBox *flex1_5cm = new TGeoBBox("Flex1MV_5cm",xHalfSt,yFlex1/2,flexOverlap/2);
1931 TGeoBBox *flex2_5cm = new TGeoBBox("Flex2MV_5cm",xHalfSt,yFlex2/2,flexOverlap/2);
1932 TGeoBBox *bus1 = new TGeoBBox("Bus1HV",xHalfSt,yBus1/2,zbus/2);
1933 TGeoBBox *bus2 = new TGeoBBox("Bus2HV",xHalfSt,yBus2/2,zbus/2);
1934 TGeoTubeSeg *cone1 = new TGeoTubeSeg(rMax +kLay2,rMax+kLay1+kLay2,zlen,180.,360.); //Carbon Fleece
1935 TGeoTubeSeg *cone2 = new TGeoTubeSeg(rMax ,rMax+kLay2,zlen,180.,360.); //Graphite paper
1936 TGeoBBox *box11 = new TGeoBBox((0.95-kLay2-rMax)/2,kLay1/2,zlen);
1937 TGeoBBox *box12 = new TGeoBBox((1.11-2*kLay2-2*rMax)/2,kLay1/2,zlen);
1938 TGeoBBox *box13 = new TGeoBBox(kLay1/2,(rMax-(kLay1+kLay2))/2,zlen);
1939 TGeoBBox *box21 = new TGeoBBox((0.95-rMax)/2,kLay2/2,zlen);
1940 TGeoBBox *box22 = new TGeoBBox((1.11-2*rMax)/2,kLay2/2,zlen);
1941 TGeoBBox *box23 = new TGeoBBox(kLay2/2,(rMax-kLay2)/2,zlen);
1942 TGeoBBox *mechStruct = new TGeoBBox("mechanicalStructure",xlen, ylen, 0.5*fZLength);
1945 TGeoVolume *modVol = CreateModuleOuterB(xHalfSt, ymod, zMod);
1947 TGeoVolume *coolTubeVol = new TGeoVolume("CoolingTubeVol",coolTube,medKapton);
1948 TGeoVolume *coolTubeWVol = new TGeoVolume("CoolingTubeWaterVol",coolTubeW,medWater);
1949 TGeoVolume *coldPlateVol = new TGeoVolume("ColdPlateVol",coldPlate,medCarbon);
1950 TGeoVolume *glueVol = new TGeoVolume("GlueVol",glue,medGlue);
1951 TGeoVolume *modPlateVol = new TGeoVolume("CarbonPlateVol",modPlate,medCarbon);
1952 TGeoVolume *flex1Vol = new TGeoVolume("Flex1Vol",flex1,medAluminum);
1953 TGeoVolume *flex2Vol = new TGeoVolume("Flex2Vol",flex2,medKapton);
1954 TGeoVolume *flex1_5cmVol = new TGeoVolume("Flex1Vol5cm",flex1_5cm,medAluminum);
1955 TGeoVolume *flex2_5cmVol = new TGeoVolume("Flex2Vol5cm",flex2_5cm,medKapton);
1956 TGeoVolume *bus1Vol = new TGeoVolume("Bus1Vol",bus1,medAluminum);
1957 TGeoVolume *bus2Vol = new TGeoVolume("Bus2Vol",bus2,medKapton);
1958 TGeoVolume *cone1Vol = new TGeoVolume("CarbonFleecePipeCover",cone1,medCarbonFleece);
1959 TGeoVolume *cone2Vol = new TGeoVolume("GraphitePaperPipeCover",cone2,medFGS003);
1960 TGeoVolume *plate11Vol = new TGeoVolume("CarbonFleeceLR1",box11,medCarbonFleece);
1961 TGeoVolume *plate12Vol = new TGeoVolume("CarbonFleeceMiddle1",box12,medCarbonFleece);
1962 TGeoVolume *plate13Vol = new TGeoVolume("CarbonFleeceVertical1",box13,medCarbonFleece);
1963 TGeoVolume *plate21Vol = new TGeoVolume("CarbonFleeceLR2",box21,medFGS003);
1964 TGeoVolume *plate22Vol = new TGeoVolume("CarbonFleeceMiddle2",box22,medFGS003);
1965 TGeoVolume *plate23Vol = new TGeoVolume("CarbonFleeceVertical2",box23,medFGS003);
1966 TGeoVolume *mechLaddVol = new TGeoVolume("mechLadderVolume",mechStruct,medAir);
1968 mechLaddVol->SetLineColor(12);
1969 mechLaddVol->SetFillColor(12);
1970 mechLaddVol->SetVisibility(kTRUE);
1972 modVol->SetVisibility(kTRUE);
1973 flex1_5cmVol->SetLineColor(kRed);
1974 flex2_5cmVol->SetLineColor(kGreen);
1975 modPlateVol->SetLineColor(kMagenta-8);
1976 coolTubeVol->SetLineColor(kGray);
1977 coolTubeWVol->SetLineColor(kBlue);
1978 coldPlateVol->SetLineColor(kYellow-3);
1979 glueVol->SetLineColor(kBlack);
1980 flex1Vol->SetLineColor(kRed);
1981 flex2Vol->SetLineColor(kGreen);
1982 bus1Vol->SetLineColor(kCyan);
1983 bus2Vol->SetLineColor(kBlue);
1984 cone1Vol->SetFillColor(kViolet);
1985 plate11Vol->SetFillColor(kViolet);
1986 plate12Vol->SetLineColor(kViolet);
1987 plate13Vol->SetLineColor(kViolet);
1988 cone2Vol->SetLineColor(kGreen);
1989 plate22Vol->SetFillColor(kGreen);
1990 plate21Vol->SetLineColor(kGreen);
1991 plate23Vol->SetLineColor(kGreen);
1996 mechLaddVol->AddNode(plate11Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2,0));
1997 mechLaddVol->AddNode(plate11Vol,2,new TGeoTranslation(xPos +(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2,0));
1998 mechLaddVol->AddNode(plate11Vol,3,new TGeoTranslation(-xPos -(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2 +deltaY,0));
1999 mechLaddVol->AddNode(plate11Vol,4,new TGeoTranslation(-xPos +(1.11/2+rMax+box11->GetDX()+kLay2),-ylen + yPos +2*rMax-kLay2-kLay1/2 +deltaY,0));
2000 mechLaddVol->AddNode(plate12Vol,1,new TGeoTranslation(xPos ,-ylen + yPos +2*rMax-kLay2-kLay1/2,0));
2001 mechLaddVol->AddNode(plate12Vol,2,new TGeoTranslation(-xPos ,-ylen + yPos +2*rMax-kLay2-kLay1/2 + deltaY,0));
2002 mechLaddVol->AddNode(plate13Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
2003 mechLaddVol->AddNode(plate13Vol,2,new TGeoTranslation(xPos -1.11/2+rMax+kLay2+box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
2004 mechLaddVol->AddNode(plate13Vol,3,new TGeoTranslation(xPos +(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
2005 mechLaddVol->AddNode(plate13Vol,4,new TGeoTranslation(xPos +1.11/2-rMax-kLay2-box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY(),0));
2006 mechLaddVol->AddNode(plate13Vol,5,new TGeoTranslation(-xPos -(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
2007 mechLaddVol->AddNode(plate13Vol,6,new TGeoTranslation(-xPos -1.11/2+rMax+kLay2+box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
2008 mechLaddVol->AddNode(plate13Vol,7,new TGeoTranslation(-xPos +(1.11/2+rMax+kLay2+box13->GetDX()),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
2009 mechLaddVol->AddNode(plate13Vol,8,new TGeoTranslation(-xPos +1.11/2-rMax-kLay2-box13->GetDX(),-ylen + yPos +2*rMax-kLay1-kLay2-box13->GetDY() +deltaY,0));
2011 mechLaddVol->AddNode(cone1Vol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
2012 mechLaddVol->AddNode(cone1Vol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
2013 mechLaddVol->AddNode(cone1Vol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
2014 mechLaddVol->AddNode(cone1Vol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
2019 mechLaddVol->AddNode(plate21Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+box21->GetDX()),-ylen + yPos +2*rMax-kLay2/2,0));
2020 mechLaddVol->AddNode(plate21Vol,2,new TGeoTranslation(xPos +(1.11/2+rMax+box21->GetDX()) ,-ylen + yPos +2*rMax-kLay2/2,0));
2021 mechLaddVol->AddNode(plate21Vol,3,new TGeoTranslation(-xPos -(1.11/2+rMax+box21->GetDX()) ,-ylen + yPos +2*rMax-kLay2/2 +deltaY,0));
2022 mechLaddVol->AddNode(plate21Vol,4,new TGeoTranslation(-xPos +(1.11/2+rMax+box21->GetDX()) ,-ylen + yPos +2*rMax-kLay2/2 +deltaY,0));
2023 mechLaddVol->AddNode(plate22Vol,1,new TGeoTranslation(xPos ,-ylen + yPos +2*rMax-kLay2/2,0));
2024 mechLaddVol->AddNode(plate22Vol,2,new TGeoTranslation(-xPos ,-ylen + yPos +2*rMax-kLay2/2 + deltaY,0));
2025 mechLaddVol->AddNode(plate23Vol,1,new TGeoTranslation(xPos -(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
2026 mechLaddVol->AddNode(plate23Vol,2,new TGeoTranslation(xPos -1.11/2+rMax+box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
2027 mechLaddVol->AddNode(plate23Vol,3,new TGeoTranslation(xPos +(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
2028 mechLaddVol->AddNode(plate23Vol,4,new TGeoTranslation(xPos +1.11/2-rMax-box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2,0));
2029 mechLaddVol->AddNode(plate23Vol,5,new TGeoTranslation(-xPos -(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
2030 mechLaddVol->AddNode(plate23Vol,6,new TGeoTranslation(-xPos -1.11/2+rMax+box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
2031 mechLaddVol->AddNode(plate23Vol,7,new TGeoTranslation(-xPos +(1.11/2+rMax+box23->GetDX()),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
2032 mechLaddVol->AddNode(plate23Vol,8,new TGeoTranslation(-xPos +1.11/2-rMax-box23->GetDX(),-ylen + yPos +2*rMax-kLay2-(rMax-kLay2)/2+deltaY,0));
2034 mechLaddVol->AddNode(cone2Vol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
2035 mechLaddVol->AddNode(cone2Vol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
2036 mechLaddVol->AddNode(cone2Vol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
2037 mechLaddVol->AddNode(cone2Vol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
2039 //Cooling Tubes + water
2041 mechLaddVol->AddNode(coolTubeVol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
2042 mechLaddVol->AddNode(coolTubeWVol,1,new TGeoTranslation(xPos - 0.555,-ylen + yPos + rMax,0));
2043 mechLaddVol->AddNode(coolTubeVol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
2044 mechLaddVol->AddNode(coolTubeWVol,2,new TGeoTranslation(xPos + 0.555,-ylen + yPos + rMax,0));
2045 mechLaddVol->AddNode(coolTubeVol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
2046 mechLaddVol->AddNode(coolTubeWVol,3,new TGeoTranslation(-xPos - 0.555,-ylen + yPos + rMax + deltaY,0));
2047 mechLaddVol->AddNode(coolTubeVol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
2048 mechLaddVol->AddNode(coolTubeWVol,4,new TGeoTranslation(-xPos + 0.555,-ylen + yPos + rMax + deltaY,0));
2052 mechLaddVol->AddNode(coldPlateVol,1,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate/2,0));
2053 mechLaddVol->AddNode(coldPlateVol,2,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate/2 + deltaY,0));
2057 mechLaddVol->AddNode(glueVol,1,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue/2,0));
2058 mechLaddVol->AddNode(glueVol,2,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue/2 + deltaY,0));
2060 //Module Carbon Plate
2062 mechLaddVol->AddNode(modPlateVol,1,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate/2,0));
2063 mechLaddVol->AddNode(modPlateVol,2,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate/2 + deltaY,0));
2067 mechLaddVol->AddNode(bus1Vol,1,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1/2,0));
2068 mechLaddVol->AddNode(bus1Vol,2,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1/2 + deltaY,0));
2069 mechLaddVol->AddNode(bus2Vol,1,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1 + yBus2/2,0));
2070 mechLaddVol->AddNode(bus2Vol,2,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 2*yFlex2 + yBus1 + yBus2/2 + deltaY,0));
2074 for (Int_t j=0; j<fNModules; j++) {
2076 zpos = -(zact + (fNModules-1)*modGap)/2 + j*(zMod + modGap) + zMod/2;
2077 zpos5cm = -(zact + (fNModules-1)*modGap)/2 + (j+1)*(zMod + modGap) + flexOverlap/2 ;
2079 mechLaddVol->AddNode(modVol, j, new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + ymod, zpos));
2080 mechLaddVol->AddNode(modVol, fNModules+j, new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + ymod +deltaY, zpos));
2081 mechLaddVol->AddNode(flex1Vol,j,new TGeoTranslation(xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos));
2082 mechLaddVol->AddNode(flex1Vol,fNModules+j,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 + deltaY,zpos));
2083 mechLaddVol->AddNode(flex2Vol,j,new TGeoTranslation(xPos, -ylen + yPos + yModPlate + 2*rMax + yCPlate + yGlue + 2*ymod + yFlex1 + yFlex2/2,zpos));
2084 mechLaddVol->AddNode(flex2Vol,fNModules+j,new TGeoTranslation(-xPos, -ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 + deltaY,zpos));
2086 if((j+1)!=fNModules){
2087 mechLaddVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2,zpos5cm));
2088 mechLaddVol->AddNode(flex1_5cmVol,fNModules+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2 +deltaY,zpos5cm));
2089 mechLaddVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2,zpos5cm));
2090 mechLaddVol->AddNode(flex2_5cmVol,fNModules+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2 +deltaY,zpos5cm));
2093 mechLaddVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos5cm-modGap));
2094 mechLaddVol->AddNode(flex1_5cmVol,fNModules+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 +deltaY,zpos5cm-modGap));
2095 mechLaddVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate +2*ymod + yFlex1 + yFlex2/2,zpos5cm-modGap));
2096 mechLaddVol->AddNode(flex2_5cmVol,fNModules+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 +deltaY,zpos5cm-modGap));
2102 // Done, return the stave structur
2106 //________________________________________________________________________
2107 TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB(const Double_t xlad,
2108 const TGeoManager *mgr){
2110 // Create the space frame for the Outer Barrel
2114 // mgr : the GeoManager (used only to get the proper material)
2122 TGeoVolume *mechLaddVol = 0;
2124 switch (fStaveModel) {
2125 case AliITSUv1::kOBModelDummy:
2126 mechLaddVol = CreateSpaceFrameOuterBDummy(xlad,mgr);
2128 case AliITSUv1::kOBModel1:
2129 mechLaddVol = CreateSpaceFrameOuterB0(xlad,mgr);
2132 AliFatal(Form("Unknown stave model %d",fStaveModel));
2139 //________________________________________________________________________
2140 TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterBDummy(const Double_t ,
2141 const TGeoManager *) const {
2143 // Create dummy stave
2147 // mgr : the GeoManager (used only to get the proper material)
2155 // Done, return the stave structur
2159 //________________________________________________________________________
2160 TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB0(const Double_t xlen,
2161 const TGeoManager *mgr){
2163 // Create the space frame for the Outer Barrel (Model 0)
2167 // mgr : the GeoManager (used only to get the proper material)
2172 // a TGeoVolume with the Space Frame of a stave
2174 // Created: 20 Dec 2013 Anastasia Barbano
2175 // Updated: 15 Jan 2014 Mario Sitta
2179 // Materials defined in AliITSUv0
2180 TGeoMedium *medCarbon = mgr->GetMedium("ITS_CARBON$");
2181 TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
2185 Double_t ladderWidth = 4.2;
2186 Double_t ladderHeight = 4.2;
2187 // Double_t ladderSegBoxDW = 7.5;
2188 // Double_t ladderSegBoxDH = 7.1;
2189 Double_t ladderBeamRadius = 0.06;
2190 Double_t ladderLa = 0.3;
2191 Double_t ladderHa = 0.0721979;
2192 Double_t ladderLb = 0.37;
2193 Double_t ladderHb = 0.0890428;
2194 Double_t ladderl = 0.025;
2195 Double_t beamSidePhi = 65;
2196 Double_t bottomBeamAngle = 61.5; //56.5;
2197 // Double_t dy = ladderSegBoxDH/2;
2198 Double_t triangleHeight = ladderHeight - ladderBeamRadius;
2199 Double_t halfTheta = TMath::ATan( 0.5*ladderWidth/triangleHeight );
2200 Double_t alpha = TMath::Pi()*3./4. - halfTheta/2.;
2201 Double_t beta = (TMath::Pi() - 2.*halfTheta)/4.;
2202 // Double_t dYTranslation = (ladderHeight/2. -0.5*ladderWidth*TMath::Tan(beta)-ladderBeamRadius);
2203 Double_t distCenterSideDown = 0.5*ladderWidth/TMath::Cos(beta);
2210 zact = fNModules*fgkOBModuleZLength; //active area
2211 zbus = zact + (fNModules-1)*fgkOBModuleGap;
2215 // First create all needed shapes and volumes
2217 TGeoBBox *spaceFrame = new TGeoBBox("CarbonFrame",xlen, 2.2, zlen);
2218 TGeoBBox *segment = new TGeoBBox(ladderWidth/2,ladderHeight/2,seglen/2);
2220 TGeoVolume *spaceFrameVol = new TGeoVolume("CarbonFrameVolume",
2221 spaceFrame, medAir);
2222 spaceFrameVol->SetVisibility(kTRUE);
2224 TGeoVolume *segmentVol = new TGeoVolume("segmentVol",segment,medAir);
2228 //--- the top V of the Carbon Fiber Ladder (segment)
2229 TGeoArb8 *cfLaddTop1 = CreateLadderSide("CFladdTopCornerVol1shape", seglen/2., halfTheta, -1, ladderLa, ladderHa, ladderl);
2230 TGeoVolume *cfLaddTopVol1 = new TGeoVolume("ITSsddCFladdTopCornerVol1", cfLaddTop1,medCarbon);
2231 TGeoArb8 *cfLaddTop2 = CreateLadderSide( "CFladdTopCornerVol2shape", seglen/2., halfTheta, 1, ladderLa, ladderHa, ladderl);
2232 TGeoVolume *cfLaddTopVol2 = new TGeoVolume("ITSsddCFladdTopCornerVol2",cfLaddTop2,medCarbon );
2234 //TGeoTranslation *trTop1 = new TGeoTranslation(0, fgkLadderHeight/2-dy, 0);
2235 TGeoTranslation *trTop1 = new TGeoTranslation(0, ladderHeight/2, 0);
2238 TGeoArb8 *cfLaddSide1 = CreateLadderSide( "CFladdSideCornerVol1shape", seglen/2., beta, -1,ladderLb, ladderHb, ladderl);
2239 TGeoVolume *cfLaddSideVol1 = new TGeoVolume( "ITSsddCFladdSideCornerVol1", cfLaddSide1,medCarbon);
2240 TGeoArb8 *cfLaddSide2 = CreateLadderSide( "CFladdSideCornerVol2shape", seglen/2., beta, 1, ladderLb, ladderHb, ladderl);
2241 TGeoVolume *cfLaddSideVol2 = new TGeoVolume( "ITSsddCFladdSideCornerVol2", cfLaddSide2,medCarbon );
2244 TGeoCombiTrans *ctSideR = CreateCombiTrans("", distCenterSideDown, 0,alpha*TMath::RadToDeg());
2245 //AddTranslationToCombiTrans(ctSideR, 0, -dYTranslation-dy, 0);
2246 AddTranslationToCombiTrans(ctSideR, 0, ladderHeight/2-2.85/*2.765250*//*triangleHeight*/, 0);
2247 TGeoCombiTrans *ctSideL = CreateCombiTrans("", distCenterSideDown,0,-alpha*TMath::RadToDeg());
2248 //AddTranslationToCombiTrans(ctSideL, 0, -dYTranslation-dy, 0);
2249 AddTranslationToCombiTrans(ctSideL, 0, ladderHeight/2-2.85/*triangleHeight*/, 0);
2251 segmentVol->AddNode(cfLaddTopVol1,1,trTop1);
2252 segmentVol->AddNode(cfLaddTopVol2,1,trTop1);
2253 segmentVol->AddNode(cfLaddSideVol1,1,ctSideR);
2254 segmentVol->AddNode(cfLaddSideVol1,2,ctSideL);
2255 segmentVol->AddNode(cfLaddSideVol2,1,ctSideR);
2256 segmentVol->AddNode(cfLaddSideVol2,2,ctSideL);
2260 // Beams on the sides
2261 Double_t beamPhiPrime = TMath::ASin(1./TMath::Sqrt( (1+TMath::Sin(2*beta)*TMath::Sin(2*beta)/(TanD(beamSidePhi)*TanD(beamSidePhi))) ));
2262 Double_t beamLength = TMath::Sqrt( ladderHeight*ladderHeight/( TMath::Sin(beamPhiPrime)*TMath::Sin(beamPhiPrime))+ ladderWidth*ladderWidth/4.)-ladderLa/2-ladderLb/2;
2263 TGeoTubeSeg *sideBeamS = new TGeoTubeSeg(0, ladderBeamRadius,beamLength/2.,0, 180);
2264 TGeoVolume *sideBeam = new TGeoVolume("ITSsddCFSideBeamVol", sideBeamS,medCarbon);
2266 //Euler rotation : about Z, then new X, then new Z
2267 TGeoRotation *beamRot1 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(),-beamPhiPrime*TMath::RadToDeg(),-90);
2268 TGeoRotation *beamRot2 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(), beamPhiPrime*TMath::RadToDeg(), -90);
2269 TGeoRotation *beamRot3 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(), beamPhiPrime*TMath::RadToDeg(), -90);
2270 TGeoRotation *beamRot4 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),-beamPhiPrime*TMath::RadToDeg(),-90);
2272 TGeoCombiTrans *beamTransf[8];
2273 beamTransf[0] = new TGeoCombiTrans( 0.5*triangleHeight*TMath::Tan(halfTheta),ladderBeamRadius/2. ,-3*seglen/8, beamRot1);
2275 beamTransf[1] = new TGeoCombiTrans( 0.5*triangleHeight*TMath::Tan(halfTheta),ladderBeamRadius/2. ,-3*seglen/8, beamRot1);
2276 AddTranslationToCombiTrans(beamTransf[1], 0, 0, seglen/2);
2278 beamTransf[2] = new TGeoCombiTrans(0.5*triangleHeight*TMath::Tan(halfTheta),ladderBeamRadius/2. ,-seglen/8, beamRot2);
2280 beamTransf[3] = new TGeoCombiTrans(0.5*triangleHeight*TMath::Tan(halfTheta),ladderBeamRadius/2. ,-seglen/8, beamRot2);
2281 AddTranslationToCombiTrans(beamTransf[3], 0, 0, seglen/2);
2283 beamTransf[4] = new TGeoCombiTrans(-0.5*triangleHeight*TMath::Tan(halfTheta),ladderBeamRadius/2. ,-3*seglen/8, beamRot3);
2285 beamTransf[5] = new TGeoCombiTrans(-0.5*triangleHeight*TMath::Tan(halfTheta),ladderBeamRadius/2. ,-3*seglen/8, beamRot3);
2286 AddTranslationToCombiTrans(beamTransf[5], 0, 0, seglen/2);
2288 beamTransf[6] = new TGeoCombiTrans(-0.5*triangleHeight* TMath::Tan(halfTheta),ladderBeamRadius/2., -seglen/8,beamRot4);
2289 beamTransf[7] = new TGeoCombiTrans(-0.5*triangleHeight* TMath::Tan(halfTheta),ladderBeamRadius/2.,3*seglen/8,beamRot4);
2291 //--- Beams of the bottom
2292 TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, ladderBeamRadius,ladderWidth/2.-ladderLb/3, 0, 180);
2293 TGeoVolume *bottomBeam1Vol = new TGeoVolume("ITSsddBottomBeam1Vol", bottomBeam1, medCarbon);
2294 TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, ladderBeamRadius,ladderWidth/2.-ladderLb/3, 0, 90);
2295 TGeoVolume *bottomBeam2Vol = new TGeoVolume("ITSsddBottomBeam2Vol",bottomBeam2, medCarbon);
2296 TGeoTubeSeg *bottomBeam3 = new TGeoTubeSeg(0, ladderBeamRadius,0.5*ladderWidth/SinD(bottomBeamAngle) - ladderLb/3, 0, 180);
2297 TGeoVolume *bottomBeam3Vol = new TGeoVolume("ITSsddBottomBeam3Vol", bottomBeam3, medCarbon);
2298 TGeoRotation *bottomBeamRot1 = new TGeoRotation("", 90, 90, 90);
2299 TGeoRotation *bottomBeamRot2 = new TGeoRotation("",-90, 90, -90);
2301 TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans("",0,-(ladderHeight/2-ladderBeamRadius),0, bottomBeamRot1);
2302 TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0,-(ladderHeight/2-ladderBeamRadius),-seglen/2, bottomBeamRot1);
2303 TGeoCombiTrans *bottomBeamTransf3 = new TGeoCombiTrans(0,-(ladderHeight/2-ladderBeamRadius), seglen/2, bottomBeamRot2);
2304 // be careful for beams #3: when "reading" from -z to +z and
2305 // from the bottom of the ladder, it should draw a Lambda, and not a V
2306 TGeoRotation *bottomBeamRot4 = new TGeoRotation("", -90, bottomBeamAngle, -90);
2307 TGeoRotation *bottomBeamRot5 = new TGeoRotation("" ,-90,-bottomBeamAngle, -90);
2308 TGeoCombiTrans *bottomBeamTransf4 = new TGeoCombiTrans(0,-(ladderHeight/2-ladderBeamRadius),-seglen/4,bottomBeamRot4);
2309 TGeoCombiTrans *bottomBeamTransf5 = new TGeoCombiTrans(0,-(ladderHeight/2-ladderBeamRadius),seglen/4, bottomBeamRot5);
2311 cfLaddTopVol1->SetLineColor(35);
2312 cfLaddTopVol2->SetLineColor(35);
2313 cfLaddSideVol1->SetLineColor(35);
2314 cfLaddSideVol2->SetLineColor(35);
2315 sideBeam->SetLineColor(35);
2316 bottomBeam1Vol->SetLineColor(35);
2317 bottomBeam2Vol->SetLineColor(35);
2318 bottomBeam3Vol->SetLineColor(35);
2321 segmentVol->AddNode(sideBeam,1, beamTransf[0]);
2322 segmentVol->AddNode(sideBeam,2, beamTransf[1]);
2323 segmentVol->AddNode(sideBeam,3, beamTransf[2]);
2324 segmentVol->AddNode(sideBeam,4, beamTransf[3]);
2325 segmentVol->AddNode(sideBeam,5, beamTransf[4]);
2326 segmentVol->AddNode(sideBeam,6, beamTransf[5]);
2327 segmentVol->AddNode(sideBeam,7, beamTransf[6]);
2328 segmentVol->AddNode(sideBeam,8, beamTransf[7]);
2329 segmentVol->AddNode(bottomBeam1Vol,1,bottomBeamTransf1);
2330 segmentVol->AddNode(bottomBeam2Vol,1,bottomBeamTransf2);
2331 segmentVol->AddNode(bottomBeam2Vol,1,bottomBeamTransf3);
2332 segmentVol->AddNode(bottomBeam3Vol,1,bottomBeamTransf4);
2333 segmentVol->AddNode(bottomBeam3Vol,1,bottomBeamTransf5);
2335 for(Int_t i=0;i<10;i++){
2336 spaceFrameVol->AddNode(segmentVol,i,new TGeoTranslation(0,0,seglen*(0.5+i)));
2337 spaceFrameVol->AddNode(segmentVol,11+i,new TGeoTranslation(0,0,-seglen*(0.5+i)));
2341 // Done, return the stave structur
2342 return spaceFrameVol;
2345 //________________________________________________________________________
2346 TGeoVolume* AliITSUv1Layer::CreateModuleInnerB(const Double_t xlad,
2347 const Double_t ylad,
2348 const Double_t zlad,
2349 const TGeoManager *mgr){
2351 // Creates the actual Module
2354 // xlad,zlad : the ladder dimensions
2355 // mgr : the GeoManager (used only to get the proper material)
2361 // Created: 22 Jun 2011 Mario Sitta
2365 Double_t xlen, ylen, zlen;
2366 Double_t xpos, ypos, zpos;
2369 // First create all needed shapes
2372 TGeoBBox *module = new TGeoBBox(xlad, ylad, zlad/fNModules);
2375 xlen = module->GetDX();
2376 ylen = 0.5*fSensorThick;
2377 zlen = module->GetDZ();
2378 TGeoBBox *sensor = new TGeoBBox(xlen, ylen, zlen);
2381 // We have all shapes: now create the real volumes
2382 //TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$");
2383 TGeoMedium *medSi = mgr->GetMedium("ITS_SI$");
2385 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber);
2386 // TGeoVolume *modVol = new TGeoVolume(volname, module, medAir);
2387 TGeoVolume *modVol = new TGeoVolume(volname, module, medSi);
2388 modVol->SetVisibility(kTRUE);
2389 modVol->SetLineColor(1);
2391 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSSensorPattern(), fLayerNumber);
2392 TGeoVolume *sensVol = new TGeoVolume(volname, sensor, medSi);
2393 sensVol->SetVisibility(kTRUE);
2394 sensVol->SetLineColor(8);
2395 sensVol->SetLineWidth(1);
2396 sensVol->SetFillColor(sensVol->GetLineColor());
2397 sensVol->SetFillStyle(4000); // 0% transparent
2400 // Now build up the module
2402 ypos = -module->GetDY() + sensor->GetDY();
2405 modVol->AddNode(sensVol, 1, new TGeoTranslation(xpos, ypos, zpos));
2407 // Done, return the module
2411 //________________________________________________________________________
2412 TGeoVolume* AliITSUv1Layer::CreateModuleOuterB(const Double_t xlad,
2413 const Double_t ylad,
2414 const Double_t zmod,
2415 const TGeoManager *mgr){
2417 // Creates the actual Module
2420 // xlad,ylad,zlad : the half stave dimensions
2421 // mgr : the GeoManager (used only to get the proper material)
2427 // Created: 18 Dec 2013 M. Sitta, A. Barbano
2433 Double_t xGap = 0.01;
2434 Double_t zGap = 0.01;
2436 Double_t xlen, ylen, zlen;
2437 Double_t xpos, ypos, zpos;
2439 // First create all needed shapes
2442 TGeoBBox *module = new TGeoBBox(xlad, ylad, zmod/2);
2445 xlen = 0.5*(module->GetDX()-xGap/2);
2448 zlen = (2*module->GetDZ()-6*zGap)/14;
2449 TGeoBBox *sensor = new TGeoBBox(xlen, ylen, zlen);
2452 // We have all shapes: now create the real volumes
2454 TGeoMedium *medSi = mgr->GetMedium("ITS_SI$");
2455 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber);
2456 TGeoVolume *modVol = new TGeoVolume(volname, module, medSi);
2457 modVol->SetVisibility(kTRUE);
2459 snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSSensorPattern(), fLayerNumber);
2460 TGeoVolume *sensVol = new TGeoVolume(volname, sensor, medSi);
2464 // Now build up the module
2465 xpos = -module->GetDX() + sensor->GetDX();
2466 //xpos = -xGap/2 -sensor->GetDX();
2467 ypos = -module->GetDY() + sensor->GetDY();
2468 for(Int_t k=0;k<7;k++) //put 7x2 chip into one module
2470 zpos = -module->GetDZ() + sensor->GetDZ() + k*(2*sensor->GetDZ() + zGap);
2471 modVol->AddNode(sensVol, k+1, new TGeoTranslation(xpos, ypos, zpos));
2472 modVol->AddNode(sensVol, k+2, new TGeoTranslation(-xpos, ypos, zpos));
2475 //sensVol->SetVisibility(kTRUE);
2476 sensVol->SetLineColor(kYellow);
2477 //sensVol->SetLineWidth(1);
2478 //sensVol->SetTransparency(30);
2479 sensVol->SetFillColor(sensVol->GetLineColor());
2480 sensVol->SetFillStyle(4000); // 0% transparent
2481 // Done, return the module
2485 //________________________________________________________________________
2486 Double_t AliITSUv1Layer::RadiusOfTurboContainer(){
2488 // Computes the inner radius of the air container for the Turbo configuration
2489 // as the radius of either the circle tangent to the ladder or the circle
2490 // passing for the ladder's lower vertex
2493 // none (all needed parameters are class members)
2498 // the radius of the container if >0, else flag to use the lower vertex
2500 // Created: 08 Mar 2012 Mario Sitta
2503 Double_t rr, delta, z, lladd, rladd;
2505 if (fLadderThick > 89.) // Very big angle: avoid overflows since surely
2506 return -1; // the radius from lower vertex is the right value
2508 rladd = fLayRadius + 0.5*fLadderThick;
2509 delta = (0.5*fLadderThick)/CosD(fLadderTilt);
2510 z = (0.5*fLadderThick)*TanD(fLadderTilt);
2513 lladd = (0.5*fLadderWidth) - z;
2515 if ( (rr*SinD(fLadderTilt) < lladd) )
2516 return (rr*CosD(fLadderTilt));
2521 //________________________________________________________________________
2522 void AliITSUv1Layer::SetLadderTilt(const Double_t t)
2525 // Sets the Ladder tilt angle (for turbo layers only)
2528 // t : the ladder tilt angle
2534 // Created: 08 Jul 2011 Mario Sitta
2540 AliError("Not a Turbo layer");
2544 //________________________________________________________________________
2545 void AliITSUv1Layer::SetLadderWidth(const Double_t w){
2547 // Sets the Ladder width (for turbo layers only)
2550 // w : the ladder width
2556 // Created: 08 Jul 2011 Mario Sitta
2562 AliError("Not a Turbo layer");
2566 //________________________________________________________________________
2567 TGeoArb8 *AliITSUv1Layer::CreateLadderSide(const char *name,
2568 Double_t dz, Double_t angle, Double_t xSign,
2569 Double_t L, Double_t H, Double_t l) {
2571 // Creates the V-shaped sides of the OB space frame
2572 // (from a similar method with same name and function
2573 // in AliITSv11GeometrySDD class by L.Gaudichet)
2576 // Create one half of the V shape corner of CF ladder
2578 TGeoArb8 *cfLaddSide = new TGeoArb8(dz);
2579 cfLaddSide->SetName(name);
2581 // Points must be in clockwise order
2582 cfLaddSide->SetVertex(0, 0, 0);
2583 cfLaddSide->SetVertex(2, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
2584 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
2585 cfLaddSide->SetVertex(4, 0, 0);
2586 cfLaddSide->SetVertex(6, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
2587 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
2589 cfLaddSide->SetVertex(1, 0, -H);
2590 cfLaddSide->SetVertex(3, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
2591 cfLaddSide->SetVertex(5, 0, -H);
2592 cfLaddSide->SetVertex(7, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
2594 cfLaddSide->SetVertex(1, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
2595 cfLaddSide->SetVertex(3, 0, -H);
2596 cfLaddSide->SetVertex(5, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
2597 cfLaddSide->SetVertex(7, 0, -H);
2602 //________________________________________________________________________
2603 TGeoCombiTrans *AliITSUv1Layer::CreateCombiTrans(const char *name,
2604 Double_t dy, Double_t dz,
2605 Double_t dphi, Bool_t planeSym) {
2607 // Help method to create a TGeoCombiTrans matrix
2608 // (from a similar method with same name and function
2609 // in AliITSv11GeometrySDD class by L.Gaudichet)
2613 // return the TGeoCombiTrans which make a translation in y and z
2614 // and a rotation in phi in the global coord system
2615 // If planeSym = true, the rotation places the object symetrically
2616 // (with respect to the transverse plane) to its position in the
2617 // case planeSym = false
2620 TGeoTranslation t1(dy*CosD(90.+dphi),dy*SinD(90.+dphi), dz);
2621 TGeoRotation r1("",0.,0.,dphi);
2622 TGeoRotation r2("",90, 180, -90-dphi);
2624 TGeoCombiTrans *combiTrans1 = new TGeoCombiTrans(name);
2625 combiTrans1->SetTranslation(t1);
2626 if (planeSym) combiTrans1->SetRotation(r1);
2627 else combiTrans1->SetRotation(r2);
2631 //________________________________________________________________________
2632 void AliITSUv1Layer::AddTranslationToCombiTrans(TGeoCombiTrans* ct,
2637 // Help method to add a translation to a TGeoCombiTrans matrix
2638 // (from a similar method with same name and function
2639 // in AliITSv11GeometrySDD class by L.Gaudichet)
2642 // Add a dx,dy,dz translation to the initial TGeoCombiTrans
2643 const Double_t *vect = ct->GetTranslation();
2644 Double_t newVect[3] = {vect[0]+dx, vect[1]+dy, vect[2]+dz};
2645 ct->SetTranslation(newVect);