LCOV - code coverage report
Current view: top level - ITSMFT/MFT/MFTbase - AliMFTSupport.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 45 2.2 %
Date: 2016-06-14 17:26:59 Functions: 1 9 11.1 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       3             :  *                                                                        *
       4             :  * Author: The ALICE Off-line Project.                                    *
       5             :  * Contributors are mentioned in the code where appropriate.              *
       6             :  *                                                                        *
       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             :  **************************************************************************/
      15             : 
      16             : //=============================================================================================
      17             : //
      18             : //      Class describing geometry of one MFT half-disk support + PCBs
      19             : //
      20             : //      Contact author: raphael.tieulent@cern.ch
      21             : //
      22             : //=============================================================================================
      23             : 
      24             : #include "TGeoManager.h"
      25             : #include "TGeoTube.h"
      26             : #include "AliMFTSupport.h"
      27             : 
      28          14 : ClassImp(AliMFTSupport)
      29             : 
      30             : //=============================================================================================
      31             : 
      32             : AliMFTSupport::AliMFTSupport():
      33           0 : TNamed(),
      34           0 : fSupportVolume(NULL),
      35           0 : fSupportThickness(1.4), // cm
      36           0 : fPCBThickness(0.1) // cm
      37           0 : {
      38             :   
      39             :   // default constructor
      40             :   
      41           0 : }
      42             : 
      43             : 
      44             : //=============================================================================================
      45             : 
      46           0 : AliMFTSupport::~AliMFTSupport() {
      47             :   
      48           0 : }
      49             : 
      50             : 
      51             : //=============================================================================================
      52             : TGeoVolumeAssembly* AliMFTSupport::CreateVolume(Int_t half, Int_t disk){
      53             : 
      54           0 :   AliInfo(Form("Creating Support and PCB for half %d and disk %d ",half, disk));
      55             : 
      56             : 
      57             :   /*
      58             :   fSupportVolume = new TGeoVolumeAssembly(Form("SupportPCB_%d_%d", half, disk));
      59             :   
      60             :   TGeoVolume * supportVolume =  CreateSupport(half, disk);
      61             :   TGeoVolumeAssembly * pcbVolume =  CreatePCBs(half, disk);
      62             : 
      63             :   
      64             :   // Place the core of the support
      65             :   fSupportVolume->AddNode(supportVolume, 1);
      66             :   
      67             :   
      68             :   // Place the front PCB
      69             :   fSupportVolume->AddNode(pcbVolume, 1,new TGeoTranslation(0.,0.,(fSupportThickness+ fPCBThickness)/2.));
      70             :   // Place the back PCB (supposing both fron and back are the same shapes)
      71             :   fSupportVolume->AddNode(pcbVolume, 2,new TGeoCombiTrans (0.,0.,-(fSupportThickness+ fPCBThickness)/2., new TGeoRotation("rot",0.,180.,0.)));
      72             :   */
      73             : 
      74             : 
      75           0 :   return fSupportVolume;
      76             : }
      77             : 
      78             : //=============================================================================================
      79             : TGeoVolumeAssembly* AliMFTSupport::CreatePCBs(Int_t half, Int_t disk){
      80             :   
      81           0 :   AliInfo(Form("Creating PCB for half %d and disk %d ",half, disk));
      82             : 
      83             :   
      84           0 :   TGeoVolumeAssembly * pcbVolume = new TGeoVolumeAssembly(Form("PCB_%d_%d", half, disk));
      85             : 
      86             :   
      87             :   // Create Shapes
      88             :   Double_t phiMin =0., phiMax=180.;
      89             :   Double_t rMin =20., rMax=40.; // units are cm
      90             :   Double_t copperThickness = 0.05; //units are cm
      91           0 :   Double_t fr4Thickness = fPCBThickness - copperThickness;
      92             : 
      93           0 :   TGeoTubeSeg *varnishShape = new TGeoTubeSeg(rMin, rMax, fr4Thickness/2., phiMin, phiMax);
      94           0 :   TGeoTubeSeg *copperShape = new TGeoTubeSeg(rMin, rMax, copperThickness/2., phiMin, phiMax);
      95             :   
      96             :   // Get Mediums
      97           0 :   TGeoMedium *medFR4  = gGeoManager->GetMedium("MFT_FR4$");
      98           0 :   TGeoMedium *medCu  = gGeoManager->GetMedium("MFT_Cu$");
      99             :   
     100             :   // Create Volumes
     101           0 :   TGeoVolume *varnishVol = new TGeoVolume(Form("Varnish_%d_%d", half, disk), varnishShape, medFR4);
     102           0 :   varnishVol->SetVisibility(kTRUE);
     103           0 :   varnishVol->SetLineColor(kGreen);
     104           0 :   varnishVol->SetLineWidth(1);
     105           0 :   varnishVol->SetFillColor(varnishVol->GetLineColor());
     106           0 :   varnishVol->SetFillStyle(4000); // 0% transparent
     107             :   
     108           0 :   TGeoVolume *copperVol = new TGeoVolume(Form("Copper_%d_%d", half, disk), copperShape, medCu);
     109           0 :   copperVol->SetVisibility(kTRUE);
     110           0 :   copperVol->SetLineColor(kOrange);
     111           0 :   copperVol->SetLineWidth(1);
     112           0 :   copperVol->SetFillColor(copperVol->GetLineColor());
     113           0 :   copperVol->SetFillStyle(4000); // 0% transparent
     114             :   
     115             :   // Position Volumes in the mother PCB Volume
     116           0 :   pcbVolume->AddNode(varnishVol, 1,new TGeoTranslation(0.,0.,fr4Thickness/2.));
     117           0 :   pcbVolume->AddNode(copperVol, 1,new TGeoTranslation(0.,0.,-copperThickness/2.));
     118           0 :   return pcbVolume;
     119           0 : }
     120             : 
     121             : //=============================================================================================
     122             : TGeoVolume* AliMFTSupport::CreateSupport(Int_t half, Int_t disk){
     123             :   
     124           0 :   AliInfo(Form("Creating PCB for half %d and disk %d ",half, disk));
     125             :   
     126             :   // Create Shapes
     127             :   Double_t phiMin =0., phiMax=180.;
     128             :   Double_t rMin =20., rMax=40.; // units are cm
     129             :   
     130           0 :   TGeoTubeSeg *supportShape = new TGeoTubeSeg(rMin, rMax, fSupportThickness/2., phiMin, phiMax);
     131             :   
     132             :   // Get Mediums
     133           0 :   TGeoMedium *medPeek  = gGeoManager->GetMedium("MFT_PEEK$");
     134             :   
     135             :   // Create Volumes
     136           0 :   TGeoVolume *supportVol = new TGeoVolume(Form("Support_%d_%d", half, disk), supportShape, medPeek);
     137           0 :   supportVol->SetVisibility(kTRUE);
     138           0 :   supportVol->SetLineColor(kYellow-6);
     139           0 :   supportVol->SetLineWidth(1);
     140           0 :   supportVol->SetFillColor(supportVol->GetLineColor());
     141           0 :   supportVol->SetFillStyle(4000); // 0% transparent
     142             :   
     143           0 :   return supportVol;
     144           0 : }

Generated by: LCOV version 1.11