LCOV - code coverage report
Current view: top level - ITSMFT/MFT/MFTbase - AliMFTFlex.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 204 0.5 %
Date: 2016-06-14 17:26:59 Functions: 1 15 6.7 %

          Line data    Source code
       1             : 
       2             : /**************************************************************************
       3             :  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  *                                                                        *
       5             :  * Author: The ALICE Off-line Project.                                    *
       6             :  * Contributors are mentioned in the code where appropriate.              *
       7             :  *                                                                        *
       8             :  * Permission to use, copy, modify and distribute this software and its   *
       9             :  * documentation strictly for non-commercial purposes is hereby granted   *
      10             :  * without fee, provided that the above copyright notice appears in all   *
      11             :  * copies and that both the copyright notice and this permission notice   *
      12             :  * appear in the supporting documentation. The authors make no claims     *
      13             :  * about the suitability of this software for any purpose. It is          *
      14             :  * provided "as is" without express or implied warranty.                  *
      15             :  **************************************************************************/
      16             : 
      17             : //-------------------------------------------------------------------------
      18             : //  Flex class for ALICE MFT upgrade
      19             : //  This version uses TGeo
      20             : //  Authors:
      21             : //  F. Manso
      22             : // march 2016: main implementaion of the class
      23             : //-------------------------------------------------------------------------
      24             : 
      25             : #include "TGeoManager.h"
      26             : #include "TGeoVolume.h"
      27             : #include "TGeoTrd2.h"
      28             : #include "TGeoMatrix.h"
      29             : #include "TGeoBBox.h"
      30             : #include "TGeoTube.h"
      31             : #include "AliLog.h"
      32             : #include "AliMFTLadderSegmentation.h"
      33             : #include "AliMFTChipSegmentation.h"
      34             : #include "AliMFTFlex.h"
      35             : #include "AliMFTChip.h"
      36             : #include "AliMFTLadder.h"
      37             : #include "AliMFTGeometry.h"
      38             : #include "AliMFTPlane.h"
      39             : #include "TGeoCompositeShape.h"
      40             : #include "TGeoBoolNode.h"
      41             : 
      42          14 : ClassImp(AliMFTFlex)
      43             : 
      44             : AliMFTFlex::AliMFTFlex():
      45           0 : TNamed(),
      46           0 : fLadderSeg(NULL)
      47           0 : {
      48             :   // Constructor
      49           0 : }
      50             : 
      51           0 : AliMFTFlex::~AliMFTFlex() {
      52           0 : }
      53             : 
      54             : AliMFTFlex::AliMFTFlex(AliMFTLadderSegmentation *ladder):
      55           0 : TNamed(),
      56           0 : fLadderSeg(ladder)
      57           0 : {
      58             :   // Constructor
      59           0 : }
      60             : 
      61             : 
      62             : TGeoVolumeAssembly* AliMFTFlex::MakeFlex(Int_t nbsensors, Double_t length)
      63             : {
      64             :   // Informations from the technical report mft_flex_proto_5chip_v08_laz50p.docx on MFT twiki and private communications
      65             : 
      66             :   // For the naming
      67           0 :   AliMFTGeometry * mftGeom = AliMFTGeometry::Instance();
      68           0 :   Int_t idHalfMFT = mftGeom->GetHalfMFTID(fLadderSeg->GetUniqueID());
      69           0 :   Int_t idHalfDisk = mftGeom->GetHalfDiskID(fLadderSeg->GetUniqueID());
      70           0 :   Int_t idLadder = mftGeom->GetLadderID(fLadderSeg->GetUniqueID());
      71             : 
      72             :   // First a global pointer for the flex
      73           0 :   TGeoMedium *kMedAir = gGeoManager->GetMedium("MFT_Air$");
      74           0 :   TGeoVolumeAssembly*  flex  = new TGeoVolumeAssembly(Form("flex_%d_%d_%d",idHalfMFT,idHalfDisk,idLadder));
      75             : 
      76             :   // Defining one single layer for the strips and the AVDD and DVDD
      77           0 :   TGeoVolume* lines = Make_Lines(nbsensors,length-AliMFTGeometry::kClearance, AliMFTGeometry::kFlexHeight - AliMFTGeometry::kClearance, AliMFTGeometry::kAluThickness);
      78             : 
      79             :   // AGND and DGND layers
      80           0 :   TGeoVolume* agnd_dgnd = Make_AGND_DGND(length-AliMFTGeometry::kClearance, AliMFTGeometry::kFlexHeight-AliMFTGeometry::kClearance, AliMFTGeometry::kAluThickness);
      81             : 
      82             :   // The others layers
      83           0 :   TGeoVolume* kaptonlayer     = Make_Kapton(length, AliMFTGeometry::kFlexHeight, AliMFTGeometry::kKaptonThickness);
      84           0 :   TGeoVolume* varnishlayerIn  = Make_Varnish(length, AliMFTGeometry::kFlexHeight, AliMFTGeometry::kVarnishThickness,0);
      85           0 :   TGeoVolume* varnishlayerOut = Make_Varnish(length, AliMFTGeometry::kFlexHeight, AliMFTGeometry::kVarnishThickness,1);
      86             :     
      87             :   // Final flex building
      88           0 :   Double_t zvarnishIn = AliMFTGeometry::kKaptonThickness/2+AliMFTGeometry::kAluThickness+AliMFTGeometry::kVarnishThickness/2-AliMFTGeometry::kGlueThickness;
      89           0 :   Double_t zgnd = AliMFTGeometry::kKaptonThickness/2+AliMFTGeometry::kAluThickness/2-AliMFTGeometry::kGlueThickness;
      90           0 :   Double_t zkaptonlayer = -AliMFTGeometry::kGlueThickness;
      91           0 :   Double_t zlines = -AliMFTGeometry::kKaptonThickness/2-AliMFTGeometry::kAluThickness/2-AliMFTGeometry::kGlueThickness;
      92           0 :   Double_t zvarnishOut = -AliMFTGeometry::kKaptonThickness/2-AliMFTGeometry::kAluThickness-AliMFTGeometry::kVarnishThickness/2-AliMFTGeometry::kGlueThickness;
      93             : 
      94             :   //-----------------------------------------------------------------------------------------
      95             :  //-------------------------- Adding all layers of the FPC ----------------------------------
      96             :   //-----------------------------------------------------------------------------------------
      97           0 :   flex->AddNode(varnishlayerIn,  1,  new TGeoTranslation(0., 0., zvarnishIn));    // inside, in front of the cold plate
      98           0 :   flex->AddNode(agnd_dgnd,       1,  new TGeoTranslation(0., 0., zgnd));
      99           0 :   flex->AddNode(kaptonlayer,     1,  new TGeoTranslation(0., 0., zkaptonlayer));
     100           0 :   flex->AddNode(lines,           1,  new TGeoTranslation(0., 0., zlines));
     101           0 :   flex->AddNode(varnishlayerOut, 1,  new TGeoTranslation(0., 0., zvarnishOut));   // outside
     102             : 
     103           0 :   Make_ElectricComponents(flex, nbsensors, length, zvarnishOut);
     104             :   //-----------------------------------------------------------------------------------------
     105             :   //-----------------------------------------------------------------------------------------
     106             :   //-----------------------------------------------------------------------------------------
     107             : 
     108           0 :   return flex;
     109           0 : }
     110             : 
     111             : 
     112             : void AliMFTFlex::Make_ElectricComponents(TGeoVolumeAssembly*  flex, Int_t nbsensors, Double_t length, Double_t zvarnish) 
     113             : {
     114             :   // Making and adding all the electric components
     115           0 :   TGeoVolume *electric[200];
     116             : 
     117             :   // 2 components on the connector side
     118             :   Int_t total;
     119           0 :   for(Int_t id=0; id < 2; id++)electric[id] = Make_ElectricComponent(AliMFTGeometry::kCapacitorDx, AliMFTGeometry::kCapacitorDy, AliMFTGeometry::kCapacitorDz, id);
     120           0 :   flex->AddNode(electric[0], 1,  new TGeoTranslation(length/2 - 0.1, AliMFTGeometry::kFlexHeight/2-0.2, 
     121           0 :                                                      zvarnish-AliMFTGeometry::kVarnishThickness/2-AliMFTGeometry::kCapacitorDz/2));
     122           0 :   flex->AddNode(electric[1], 2,  new TGeoTranslation(length/2 - 0.1, AliMFTGeometry::kFlexHeight/2-0.6, 
     123           0 :                                                      zvarnish-AliMFTGeometry::kVarnishThickness/2-AliMFTGeometry::kCapacitorDz/2));
     124             :   total=2;
     125             : 
     126             :   // The connector of the FPC
     127           0 :   for(Int_t id=0; id < 74; id++)electric[id+total] = Make_ElectricComponent(AliMFTGeometry::kConnectorLength, AliMFTGeometry::kConnectorWidth, 
     128           0 :                                                                             AliMFTGeometry::kConnectorThickness, id+total);
     129           0 :   for(Int_t id=0; id < 37; id++){
     130           0 :     flex->AddNode(electric[id+total], id+100, new TGeoTranslation(length/2+0.15-AliMFTGeometry::kConnectorOffset, id*0.04-AliMFTGeometry::kFlexHeight/2 + 0.1, 
     131           0 :                                                                   zvarnish-AliMFTGeometry::kVarnishThickness/2-AliMFTGeometry::kCapacitorDz/2));
     132           0 :     flex->AddNode(electric[id+total+37], id+200, new TGeoTranslation(length/2-0.15-AliMFTGeometry::kConnectorOffset, id*0.04-AliMFTGeometry::kFlexHeight/2 + 0.1, 
     133           0 :                                                                      zvarnish - AliMFTGeometry::kVarnishThickness/2 - AliMFTGeometry::kCapacitorDz/2));
     134             :   }
     135             :   total=total+74;
     136             : 
     137             :    // 2 lines of electric components along the FPC in the middle (4 per sensor)
     138           0 :   for(Int_t id=0; id < 4*nbsensors; id++)electric[id+total] = Make_ElectricComponent(AliMFTGeometry::kCapacitorDy, AliMFTGeometry::kCapacitorDx, 
     139           0 :                                                                                      AliMFTGeometry::kCapacitorDz, id+total);
     140           0 :   for(Int_t id=0; id < 2*nbsensors; id++){
     141           0 :     flex->AddNode(electric[id+total], id+1000, new TGeoTranslation(-length/2 + (id+0.5)*AliMFTGeometry::kSensorLength/2, AliMFTGeometry::kFlexHeight/2 - 0.35, 
     142           0 :                                                                    zvarnish - AliMFTGeometry::kVarnishThickness/2 - AliMFTGeometry::kCapacitorDz/2));
     143           0 :     flex->AddNode(electric[id+total+2*nbsensors], id+2000, new TGeoTranslation(-length/2 + (id+0.5)*AliMFTGeometry::kSensorLength/2, 0., 
     144           0 :                                                                                zvarnish - AliMFTGeometry::kVarnishThickness/2 - AliMFTGeometry::kCapacitorDz/2));
     145             :   }
     146           0 :   total=total+4*nbsensors;
     147             : 
     148             :   // ------- 3 components on the FPC side -------- 
     149           0 :   for(Int_t id=0; id < 3; id++)electric[id+total] = Make_ElectricComponent(AliMFTGeometry::kCapacitorDy, AliMFTGeometry::kCapacitorDx, 
     150           0 :                                                                            AliMFTGeometry::kCapacitorDz, id+total);
     151           0 :   for(Int_t id=0 ; id < 3; id++){
     152           0 :     flex->AddNode(electric[id+total], id+3000, new TGeoTranslation(-length/2+AliMFTGeometry::kSensorLength+(id+1)*0.3-0.6, -AliMFTGeometry::kFlexHeight/2 + 0.2, 
     153           0 :                                                                    zvarnish-AliMFTGeometry::kVarnishThickness/2 - AliMFTGeometry::kCapacitorDz/2));
     154             :   }
     155           0 : }
     156             : 
     157             : 
     158             : TGeoVolume* AliMFTFlex::Make_ElectricComponent(Double_t dx, Double_t dy,  Double_t dz, Int_t id)
     159             : {
     160             :   // the medium has to be changed, see ITS capacitors...
     161           0 :   TGeoMedium *kMedCopper = gGeoManager->GetMedium("MFT_Cu$");
     162             : 
     163           0 :   AliMFTGeometry * mftGeom = AliMFTGeometry::Instance();
     164           0 :   Int_t idHalfMFT = mftGeom->GetHalfMFTID(fLadderSeg->GetUniqueID());
     165           0 :   Int_t idHalfDisk = mftGeom->GetHalfDiskID(fLadderSeg->GetUniqueID());
     166           0 :   Int_t idLadder = mftGeom->GetLadderID(fLadderSeg->GetUniqueID());
     167             : 
     168           0 :   TGeoVolume* electriccomponent = new TGeoVolume(Form("electric_%d_%d_%d_%d",idHalfMFT,idHalfDisk,idLadder,id), new TGeoBBox("BOX", dy/2, dx/2, dz/2), kMedCopper);
     169           0 :   electriccomponent->SetVisibility(1);
     170           0 :   electriccomponent->SetLineColor(kRed);
     171           0 :   return electriccomponent;
     172           0 : }
     173             : 
     174             : 
     175             : TGeoVolume* AliMFTFlex::Make_Lines(Int_t nbsensors, Double_t length, Double_t widthflex,  Double_t thickness)
     176             : {
     177             :   // One line is built by removing 3 lines of aluminium in the TGeoBBox *layer_def layer. Then one line is made by the 2 remaining aluminium strips. 
     178             : 
     179             :   // the initial layer of aluminium
     180           0 :   TGeoBBox *layer_def = new TGeoBBox("layer_def", length/2, widthflex/2, thickness/2);
     181             : 
     182             :   // Two holes for fixing and positionning of the FPC on the cold plate
     183           0 :   TGeoTube *hole1 = new TGeoTube("hole1", 0., AliMFTGeometry::kRadiusHole1, thickness/2 + AliMFTGeometry::kEpsilon);
     184           0 :   TGeoTube *hole2 = new TGeoTube("hole2", 0., AliMFTGeometry::kRadiusHole2, thickness/2 + AliMFTGeometry::kEpsilon);
     185             : 
     186           0 :   TGeoTranslation    *t1= new TGeoTranslation ("t1", length/2 - AliMFTGeometry::kHoleShift1, 0., 0.);
     187           0 :   TGeoSubtraction    *layerholesub1 = new TGeoSubtraction(layer_def, hole1, NULL, t1);
     188           0 :   TGeoCompositeShape *layerhole1 = new TGeoCompositeShape("layerhole1", layerholesub1);
     189             : 
     190           0 :   TGeoTranslation    *t2= new TGeoTranslation ("t2", length/2 - AliMFTGeometry::kHoleShift2, 0., 0.);
     191           0 :   TGeoSubtraction    *layerholesub2 = new TGeoSubtraction(layerhole1, hole2, NULL, t2);
     192           0 :   TGeoCompositeShape *layer = new TGeoCompositeShape("layerhole2", layerholesub2);
     193             : 
     194           0 :   TGeoBBox *line[25];
     195           0 :   TGeoTranslation *t[6],*ts[15],*tvdd, *tl[2];
     196           0 :   TGeoSubtraction *layerl[25];
     197           0 :   TGeoCompositeShape *layern[25];
     198             :   Int_t istart, istop;
     199             :   Int_t kTotalLinesNb=0;
     200             :   Int_t kTotalLinesNb1, kTotalLinesNb2;
     201             :   Double_t length_line;
     202             : 
     203             : 
     204             :   // ----------- two lines along the FPC digital side --------------
     205           0 :   t[0] = new TGeoTranslation ("t0", AliMFTGeometry::kSensorLength/2-AliMFTGeometry::kConnectorOffset/2, -widthflex/2 + 2*AliMFTGeometry::kLineWidth, 0.);    
     206           0 :   line[0]  = new TGeoBBox("line0",  length/2 - AliMFTGeometry::kConnectorOffset/2 - AliMFTGeometry::kSensorLength/2, AliMFTGeometry::kLineWidth/2, 
     207           0 :                           thickness/2 + AliMFTGeometry::kEpsilon);
     208           0 :   layerl[0] = new TGeoSubtraction(layer, line[0], NULL, t[0]);
     209           0 :   layern[0] = new TGeoCompositeShape(Form("layer%d",0), layerl[0]);
     210             : 
     211             :   istart = 1; istop = 6;
     212           0 :   for (int iline = istart; iline < istop; iline++){
     213           0 :     t[iline] = new TGeoTranslation (Form("t%d",iline), AliMFTGeometry::kSensorLength/2 - AliMFTGeometry::kConnectorOffset/2, 
     214           0 :                                     -widthflex/2 + 2*(iline+1)*AliMFTGeometry::kLineWidth, 0.);
     215           0 :     line[iline]  = new TGeoBBox(Form("line%d",iline),  length/2 - AliMFTGeometry::kConnectorOffset/2 - AliMFTGeometry::kSensorLength/2, AliMFTGeometry::kLineWidth/2, 
     216           0 :                                   thickness/2 + AliMFTGeometry::kEpsilon);
     217           0 :     layerl[iline] = new TGeoSubtraction(layern[iline-1], line[iline], NULL, t[iline]);
     218           0 :     layern[iline] = new TGeoCompositeShape(Form("layer%d",iline), layerl[iline]);
     219           0 :     kTotalLinesNb++;
     220             :   }
     221             : 
     222             :   // ---------  lines for the sensors, one line/sensor -------------
     223           0 :   istart = kTotalLinesNb+1; istop = 6+3*nbsensors;
     224           0 :   for (int iline = istart; iline < istop; iline++){
     225           0 :     length_line=length - AliMFTGeometry::kConnectorOffset - TMath::Nint((iline-6)/3)*AliMFTGeometry::kSensorLength - AliMFTGeometry::kSensorLength/2;
     226           0 :     ts[iline] = new TGeoTranslation (Form("t%d",iline), length/2-length_line/2-AliMFTGeometry::kConnectorOffset, -2*(iline-6)*AliMFTGeometry::kLineWidth+0.5-widthflex/2, 0.);
     227           0 :     line[iline]  = new TGeoBBox(Form("line%d",iline), length_line/2, AliMFTGeometry::kLineWidth/2, thickness/2 + AliMFTGeometry::kEpsilon);
     228           0 :     layerl[iline] = new TGeoSubtraction(layern[iline-1], line[iline], NULL, ts[iline]);
     229           0 :     layern[iline] = new TGeoCompositeShape(Form("layer%d",iline), layerl[iline]);
     230           0 :     kTotalLinesNb++;
     231             :   }
     232             : 
     233             :   // ---------  an interspace to separate AVDD and DVDD -------------
     234           0 :   kTotalLinesNb++;
     235           0 :   tvdd = new TGeoTranslation ("tvdd", 0., widthflex/2-AliMFTGeometry::kShiftDDGNDline, 0.);    
     236           0 :   line[kTotalLinesNb]  = new TGeoBBox(Form("line%d",kTotalLinesNb),  length/2, 2*AliMFTGeometry::kLineWidth/2, thickness/2 + AliMFTGeometry::kEpsilon);
     237           0 :   layerl[kTotalLinesNb] = new TGeoSubtraction(layern[kTotalLinesNb-1], line[kTotalLinesNb], NULL, tvdd);
     238           0 :   layern[kTotalLinesNb] = new TGeoCompositeShape(Form("layer%d",kTotalLinesNb), layerl[kTotalLinesNb]);
     239           0 :   kTotalLinesNb++;
     240             : 
     241             :   // ---------  one line along the FPC analog side -------------  
     242           0 :   istart = kTotalLinesNb; istop = kTotalLinesNb + 2;
     243           0 :   for (int iline = istart; iline < istop; iline++){
     244           0 :     length_line=length - AliMFTGeometry::kConnectorOffset;
     245           0 :     tl[iline-istart] = new TGeoTranslation (Form("tl%d",iline), length/2-length_line/2-AliMFTGeometry::kConnectorOffset, 
     246           0 :                                             widthflex/2-AliMFTGeometry::kShiftline-2.*(iline-istart)*AliMFTGeometry::kLineWidth, 0.);
     247           0 :     line[iline]  = new TGeoBBox(Form("line%d",iline), length_line/2, AliMFTGeometry::kLineWidth/2, thickness/2 + AliMFTGeometry::kEpsilon);
     248           0 :     layerl[iline] = new TGeoSubtraction(layern[iline-1], line[iline], NULL, tl[iline-istart]);
     249           0 :     layern[iline] = new TGeoCompositeShape(Form("layer%d",iline), layerl[iline]);
     250           0 :     kTotalLinesNb++;
     251             :   }
     252             : 
     253           0 :   AliMFTGeometry * mftGeom = AliMFTGeometry::Instance();
     254           0 :   Int_t idHalfMFT = mftGeom->GetHalfMFTID(fLadderSeg->GetUniqueID());
     255           0 :   Int_t idHalfDisk = mftGeom->GetHalfDiskID(fLadderSeg->GetUniqueID());
     256           0 :   Int_t idLadder = mftGeom->GetLadderID(fLadderSeg->GetUniqueID());
     257             : 
     258           0 :   TGeoMedium *kMedAlu = gGeoManager->GetMedium("MFT_Alu$");
     259             : 
     260           0 :   TGeoVolume *lineslayer = new TGeoVolume(Form("lineslayer_%d_%d_%d",idHalfMFT,idHalfDisk,idLadder), layern[kTotalLinesNb-1], kMedAlu);
     261           0 :   lineslayer->SetVisibility(1);
     262           0 :   lineslayer->SetLineColor(kBlue);
     263           0 :   return lineslayer;
     264           0 : }
     265             : 
     266             : 
     267             : TGeoVolume* AliMFTFlex::Make_AGND_DGND(Double_t length, Double_t widthflex,  Double_t thickness)
     268             : {  
     269             :   // AGND and DGND layers
     270           0 :   TGeoBBox *layer = new TGeoBBox("layer", length/2, widthflex/2, thickness/2);
     271           0 :   TGeoTube *hole1 = new TGeoTube("hole1", 0., AliMFTGeometry::kRadiusHole1, thickness/2 + AliMFTGeometry::kEpsilon);
     272           0 :   TGeoTube *hole2 = new TGeoTube("hole2", 0., AliMFTGeometry::kRadiusHole2, thickness/2 + AliMFTGeometry::kEpsilon);
     273             :   
     274           0 :   TGeoTranslation    *t1= new TGeoTranslation ("t1", length/2-AliMFTGeometry::kHoleShift1, 0., 0.);
     275           0 :   TGeoSubtraction    *layerholesub1 = new TGeoSubtraction(layer, hole1, NULL, t1);
     276           0 :   TGeoCompositeShape *layerhole1 = new TGeoCompositeShape("layerhole1", layerholesub1);
     277             : 
     278           0 :   TGeoTranslation    *t2= new TGeoTranslation ("t2", length/2-AliMFTGeometry::kHoleShift2, 0., 0.);
     279           0 :   TGeoSubtraction    *layerholesub2 = new TGeoSubtraction(layerhole1, hole2, NULL, t2);
     280           0 :   TGeoCompositeShape *layerhole2 = new TGeoCompositeShape("layerhole2", layerholesub2);
     281             : 
     282             :   //--------------
     283             :   TGeoBBox *line[3];
     284             :   TGeoTranslation *t[3];
     285             :   TGeoCompositeShape *layern[3];
     286             :   TGeoSubtraction *layerl[3];
     287             :   Double_t length_line;
     288           0 :   length_line=length - AliMFTGeometry::kConnectorOffset;
     289             : 
     290             :   // First, the two lines along the FPC side
     291           0 :   t[0] = new TGeoTranslation("t0", length/2-length_line/2-AliMFTGeometry::kConnectorOffset, widthflex/2 - AliMFTGeometry::kShiftline, 0.);
     292           0 :   line[0]  = new TGeoBBox("line0",  length/2 - AliMFTGeometry::kConnectorOffset/2, AliMFTGeometry::kLineWidth/2, thickness/2 + AliMFTGeometry::kEpsilon);
     293           0 :   layerl[0] = new TGeoSubtraction(layerhole2, line[0], NULL, t[0]);
     294           0 :   layern[0] = new TGeoCompositeShape(Form("layer%d",0), layerl[0]);
     295             : 
     296           0 :   t[1] = new TGeoTranslation("t1", length/2-length_line/2-AliMFTGeometry::kConnectorOffset, 
     297           0 :                              widthflex/2 - AliMFTGeometry::kShiftline - 2*AliMFTGeometry::kLineWidth, 0.);
     298           0 :   line[1]  = new TGeoBBox("line1",  length/2 - AliMFTGeometry::kConnectorOffset/2, AliMFTGeometry::kLineWidth/2, 
     299           0 :                           thickness/2 + AliMFTGeometry::kEpsilon);
     300           0 :   layerl[1] = new TGeoSubtraction(layern[0], line[1], NULL, t[1]);
     301           0 :   layern[1] = new TGeoCompositeShape(Form("layer%d",1), layerl[1]);
     302             : 
     303             :   // Now the interspace to separate the AGND et DGND --> same interspace compare the AVDD et DVDD
     304           0 :   t[2] = new TGeoTranslation("t2", length/2-length_line/2, widthflex/2 - AliMFTGeometry::kShiftDDGNDline, 0.);
     305           0 :   line[2]  = new TGeoBBox("line2",  length/2 - AliMFTGeometry::kConnectorOffset/2, AliMFTGeometry::kLineWidth, 
     306           0 :                           thickness/2 + AliMFTGeometry::kEpsilon);
     307           0 :   layerl[2] = new TGeoSubtraction(layern[1], line[2], NULL, t[2]);
     308           0 :   layern[2] = new TGeoCompositeShape(Form("layer%d",2), layerl[2]);
     309             : 
     310             :   //--------------
     311             : 
     312           0 :   AliMFTGeometry * mftGeom = AliMFTGeometry::Instance();
     313           0 :   Int_t idHalfMFT = mftGeom->GetHalfMFTID(fLadderSeg->GetUniqueID());
     314           0 :   Int_t idHalfDisk = mftGeom->GetHalfDiskID(fLadderSeg->GetUniqueID());
     315           0 :   Int_t idLadder = mftGeom->GetLadderID(fLadderSeg->GetUniqueID());
     316             : 
     317           0 :   TGeoMedium *kMedAlu = gGeoManager->GetMedium("MFT_Alu$");
     318           0 :   TGeoVolume *alulayer = new TGeoVolume(Form("alulayer_%d_%d_%d",idHalfMFT,idHalfDisk,idLadder), layern[2], kMedAlu);
     319           0 :   alulayer->SetVisibility(1);
     320           0 :   alulayer->SetLineColor(kBlue);
     321           0 :   return alulayer;
     322           0 : }
     323             : 
     324             : 
     325             : TGeoVolume* AliMFTFlex::Make_Kapton(Double_t length, Double_t widthflex, Double_t thickness)
     326             : {
     327           0 :   TGeoBBox *layer = new TGeoBBox("layer", length/2, widthflex/2, thickness/2);
     328             :   // Two holes for fixing and positionning of the FPC on the cold plate
     329           0 :   TGeoTube *hole1 = new TGeoTube("hole1", 0., AliMFTGeometry::kRadiusHole1, thickness/2+AliMFTGeometry::kEpsilon);
     330           0 :   TGeoTube *hole2 = new TGeoTube("hole2", 0., AliMFTGeometry::kRadiusHole2, thickness/2+AliMFTGeometry::kEpsilon);
     331             :   
     332           0 :   TGeoTranslation    *t1= new TGeoTranslation ("t1", length/2-AliMFTGeometry::kHoleShift1, 0., 0.);
     333           0 :   TGeoSubtraction    *layerholesub1 = new TGeoSubtraction(layer, hole1, NULL, t1);
     334           0 :   TGeoCompositeShape *layerhole1 = new TGeoCompositeShape("layerhole1", layerholesub1);
     335             : 
     336           0 :   TGeoTranslation    *t2= new TGeoTranslation ("t2", length/2-AliMFTGeometry::kHoleShift2, 0., 0.);
     337           0 :   TGeoSubtraction    *layerholesub2 = new TGeoSubtraction(layerhole1, hole2, NULL, t2);
     338           0 :   TGeoCompositeShape *layerhole2 = new TGeoCompositeShape("layerhole2", layerholesub2);
     339             : 
     340           0 :   AliMFTGeometry * mftGeom = AliMFTGeometry::Instance();
     341           0 :   Int_t idHalfMFT = mftGeom->GetHalfMFTID(fLadderSeg->GetUniqueID());
     342           0 :   Int_t idHalfDisk = mftGeom->GetHalfDiskID(fLadderSeg->GetUniqueID());
     343           0 :   Int_t idLadder = mftGeom->GetLadderID(fLadderSeg->GetUniqueID());
     344             : 
     345           0 :   TGeoMedium *kMedKapton = gGeoManager->GetMedium("MFT_Kapton$");
     346           0 :   TGeoVolume *kaptonlayer = new TGeoVolume(Form("kaptonlayer_%d_%d_%d",idHalfMFT,idHalfDisk,idLadder), layerhole2, kMedKapton);
     347           0 :   kaptonlayer->SetVisibility(1);
     348           0 :   kaptonlayer->SetLineColor(kYellow);
     349           0 :   return kaptonlayer;
     350           0 : }
     351             : 
     352             : 
     353             : TGeoVolume* AliMFTFlex::Make_Varnish(Double_t length, Double_t widthflex,  Double_t thickness, Int_t iflag)
     354             : {
     355           0 :   TGeoBBox *layer = new TGeoBBox("layer", length/2, widthflex/2, thickness/2);
     356             :   // Two holes for fixing and positionning of the FPC on the cold plate
     357           0 :   TGeoTube *hole1 = new TGeoTube("hole1", 0., AliMFTGeometry::kRadiusHole1, thickness/2+AliMFTGeometry::kEpsilon);
     358           0 :   TGeoTube *hole2 = new TGeoTube("hole2", 0., AliMFTGeometry::kRadiusHole2, thickness/2+AliMFTGeometry::kEpsilon);
     359             :   
     360           0 :   TGeoTranslation    *t1= new TGeoTranslation ("t1", length/2-AliMFTGeometry::kHoleShift1, 0., 0.);
     361           0 :   TGeoSubtraction    *layerholesub1 = new TGeoSubtraction(layer, hole1, NULL, t1);
     362           0 :   TGeoCompositeShape *layerhole1 = new TGeoCompositeShape("layerhole1", layerholesub1);
     363             : 
     364           0 :   TGeoTranslation    *t2= new TGeoTranslation ("t2", length/2-AliMFTGeometry::kHoleShift2, 0., 0.);
     365           0 :   TGeoSubtraction    *layerholesub2 = new TGeoSubtraction(layerhole1, hole2, NULL, t2);
     366           0 :   TGeoCompositeShape *layerhole2 = new TGeoCompositeShape("layerhole2", layerholesub2);
     367             : 
     368           0 :   AliMFTGeometry * mftGeom = AliMFTGeometry::Instance();
     369           0 :   Int_t idHalfMFT = mftGeom->GetHalfMFTID(fLadderSeg->GetUniqueID());
     370           0 :   Int_t idHalfDisk = mftGeom->GetHalfDiskID(fLadderSeg->GetUniqueID());
     371           0 :   Int_t idLadder = mftGeom->GetLadderID(fLadderSeg->GetUniqueID());
     372             : 
     373           0 :   TGeoMedium *kMedVarnish = gGeoManager->GetMedium("MFT_Epoxy$");  // we assume that varnish = epoxy ...
     374           0 :   TGeoVolume *varnishlayer = new TGeoVolume(Form("varnishlayer_%d_%d_%d_%d",idHalfMFT,idHalfDisk,idLadder,iflag), layerhole2, kMedVarnish);
     375           0 :   varnishlayer->SetVisibility(1);
     376           0 :   varnishlayer->SetLineColor(kGreen-1);
     377           0 :   return varnishlayer;
     378           0 : }
     379             : 

Generated by: LCOV version 1.11