LCOV - code coverage report
Current view: top level - STRUCT - AliABSOv3.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 264 265 99.6 %
Date: 2016-06-14 17:26:59 Functions: 7 7 100.0 %

          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             : /* $Id$ */
      17             : 
      18             : //-------------------------------------------------------------------------
      19             : // The Front Absorber FA
      20             : // As built
      21             : // Author: A.Morsch
      22             : // andreas.morsch@cern.ch
      23             : //-------------------------------------------------------------------------
      24             : 
      25             : #include <TVirtualMC.h>
      26             : #include <TArrayI.h>
      27             : #include <TGeoVolume.h>
      28             : #include <TGeoTube.h>
      29             : #include <TGeoManager.h>
      30             : #include <TGeoMatrix.h>
      31             : #include <TGeoCompositeShape.h>
      32             : #include <TGeoBBox.h>
      33             : #include <TGeoPgon.h>
      34             : #include <TGeoTorus.h>
      35             : #include <TGeoCone.h>
      36             : #include <TGeoArb8.h>
      37             : 
      38             : #include "AliABSOv3.h"
      39             : #include "AliConst.h"
      40             : #include "AliLog.h"
      41             : 
      42          12 : ClassImp(AliABSOv3)
      43             :  
      44             : //_____________________________________________________________________________
      45          12 : AliABSOv3::AliABSOv3()
      46          60 : {
      47             :   //
      48             :   // Default constructor for muon shield
      49             :   //
      50          24 : }
      51             :  
      52             : //_____________________________________________________________________________
      53             : AliABSOv3::AliABSOv3(const char *name, const char *title)
      54           1 :   : AliABSO(name,title)
      55           5 : {
      56             :   // Standard constructor for muon shield
      57             :   //
      58           2 : }
      59             :  
      60             : //_____________________________________________________________________________
      61             : void AliABSOv3::CreateGeometry()
      62             : {
      63             :   // 
      64             :   // Build muon shield geometry
      65             :   //
      66             :   //
      67             : 
      68             :     Float_t z, z0, dz;
      69             : //
      70             : // The top volume
      71             : //
      72           2 :     TGeoVolume* top = gGeoManager->GetVolume("ALIC");
      73             :     
      74             : //
      75             : // Media
      76             : //
      77           1 :     TGeoMedium* kMedNiW     = gGeoManager->GetMedium("ABSO_Ni/W0");
      78           1 :     TGeoMedium* kMedNiWsh   = gGeoManager->GetMedium("ABSO_Ni/W3");
      79             : //
      80           1 :     TGeoMedium* kMedSteel   = gGeoManager->GetMedium("ABSO_ST_C0");
      81           1 :     TGeoMedium* kMedSteelSh = gGeoManager->GetMedium("ABSO_ST_C3");
      82             : //
      83           1 :     TGeoMedium* kMedAir     = gGeoManager->GetMedium("ABSO_AIR_C0");
      84             : //
      85           1 :     TGeoMedium* kMedPb      = gGeoManager->GetMedium("ABSO_PB_C0");
      86           1 :     TGeoMedium* kMedPbSh    = gGeoManager->GetMedium("ABSO_PB_C2");
      87             : //
      88           1 :     TGeoMedium* kMedConcSh  = gGeoManager->GetMedium("ABSO_CC_C2");
      89             : //
      90           1 :     TGeoMedium* kMedCH2Sh   = gGeoManager->GetMedium("ABSO_CH2_C2");    
      91             : //
      92           1 :     TGeoMedium* kMedC       = gGeoManager->GetMedium("ABSO_C_C0");    
      93           1 :     TGeoMedium* kMedCsh     = gGeoManager->GetMedium("ABSO_C_C2");    
      94             : //
      95           1 :     TGeoMedium* kMedAlu     = gGeoManager->GetMedium("ABSO_ALU_C0");    
      96             : //
      97           1 :     TGeoMedium* kMedMg      = gGeoManager->GetMedium("ABSO_MG_C0");    
      98             : //
      99           1 :     const Float_t kDegRad = TMath::Pi() / 180.;
     100             :     
     101             : //
     102           1 :     TGeoRotation* rotxz  = new TGeoRotation("rotxz",   90.,   0., 90.,  90., 180., 0.);
     103             : ///////////////////////////////////
     104             : //                               //
     105             : //        Front Absorber         //
     106             : //        Drawing ALIP2A__0106   //
     107             : //                               //
     108             : //                               //
     109             : ///////////////////////////////////
     110             : // 
     111             : // Pos  1 Steel Envelope
     112             : // Pos  2 End Plate
     113             : // Pos  3 Flange (wrong arrow in the drawing)
     114             : // Pos  4 W Plate A
     115             : // Pos  5 W Plate B
     116             : // Pos  6 Tungsten Tube Part 1
     117             : // Pos  7 Tungsten Tube Part 2
     118             : // Pos  8 Tungsten Tube Part 3
     119             : // Pos  9 Tungsten Tube Part 4
     120             : // Pos 10 Tungsten Tail
     121             : // Pos 11 Graphite Cone
     122             : // Pos 12 Pb       Cone
     123             : // Pos 13 Concrete Cone
     124             : // Pos 14 Polyethylene Parts
     125             : // Pos 15 Steel Plate 25 cm
     126             : // Pos 16 Steel Plate 31 cm
     127             : // Pos 17 Magnesium Ring
     128             : // Pos 18 Composite Ring
     129             : //
     130             : //
     131             : // Mimimum angle of the tracking region
     132           1 :       const Float_t angle02 = TMath::Tan( 2.   * kDegRad);   
     133             : // Maximum angle of the tracking region
     134           1 :       const Float_t angle10 = TMath::Tan(10.   * kDegRad);
     135             : // Opening angle of W rear plug
     136           1 :       const Float_t angle03 = TMath::Tan( 3.   * kDegRad);
     137             : //   
     138           1 :       const Float_t angle05 = TMath::Tan( 5.   * kDegRad);
     139             : // Opening angle of the FA snout
     140           1 :       const Float_t angle24 = TMath::Tan(24.   * kDegRad);
     141             : // Opneing angle of the inner cone
     142           1 :       const Float_t angle71 = TMath::Tan(0.697 * kDegRad);
     143             : // Starting position in z      
     144             :       const Float_t zFa           =   90.0;
     145             : 
     146             : // Pos 1
     147             : ///////////////////////////////////
     148             : //    FA Steel Envelope          //
     149             : //    Drawing ALIP2A__0036       //
     150             : ///////////////////////////////////
     151             :       // Thickness of the envelope
     152             :       Float_t dSteelEnvelope      =    1.5;
     153             :       // Front cover
     154             :       //
     155             :       // Length
     156             :       Float_t dzSteelEnvelopeFC   =    4.00;
     157             :       // Inner Radius
     158             :       Float_t rInSteelEnvelopeFC1 =  35.90/2.;
     159           1 :       Float_t rInSteelEnvelopeFC2 = rInSteelEnvelopeFC1 + dzSteelEnvelopeFC * angle10;
     160             :       // Outer Radius
     161             :       Float_t rOuSteelEnvelopeFC1 =  88.97/2.;
     162           1 :       Float_t rOuSteelEnvelopeFC2 = rOuSteelEnvelopeFC1 + dzSteelEnvelopeFC * angle05;
     163             :       //
     164             :       // 5 deg cone
     165             :       Float_t dzSteelEnvelopeC5   = 168.9;
     166           1 :       Float_t rInSteelEnvelopeC5  = rOuSteelEnvelopeFC2 - dSteelEnvelope/TMath::Cos(5 * kDegRad);
     167             :       Float_t rOuSteelEnvelopeC5  = rOuSteelEnvelopeFC2;
     168             :       // 10 deg cone
     169             :       Float_t dzSteelEnvelopeC10   = 227.1 - 4.;
     170             :       Float_t rInSteelEnvelopeC10  = 116.22/2.;
     171           1 :       Float_t rOuSteelEnvelopeC10  = rInSteelEnvelopeC10 + dSteelEnvelope/TMath::Cos(10 * kDegRad);
     172             :       // Rear ring
     173             :       Float_t dzSteelEnvelopeR     =   4.;
     174             :       Float_t rInSteelEnvelopeR2   = 196.3/2.;
     175             :       Float_t rOuSteelEnvelopeR2   = 212.0/2.;
     176           1 :       Float_t rInSteelEnvelopeR1   = rInSteelEnvelopeR2 - dzSteelEnvelopeR * angle10;
     177           1 :       Float_t rOuSteelEnvelopeR1   = rInSteelEnvelopeR1 + dSteelEnvelope/TMath::Cos(10 * kDegRad);
     178             :       // Front insert 
     179             :       Float_t dzSteelEnvelopeFI    =  1.;
     180             :       Float_t rInSteelEnvelopeFI   = 42.0/2.;
     181             :       Float_t rOuSteelEnvelopeFI   = 85.0/2.+ 0.06;      
     182             :       
     183           1 :       TGeoPcon* shFaSteelEnvelopeC = new TGeoPcon(0., 360., 7);
     184             :       z = 0.;
     185             :       // Front cover 
     186           1 :       shFaSteelEnvelopeC->DefineSection( 0, z, rInSteelEnvelopeFC1, rOuSteelEnvelopeFC1);
     187             :       z += dzSteelEnvelopeFC;
     188           1 :       shFaSteelEnvelopeC->DefineSection( 1, z, rInSteelEnvelopeFC2, rOuSteelEnvelopeFC2); 
     189             :       // 5 deg cone
     190           1 :       shFaSteelEnvelopeC->DefineSection( 2, z, rInSteelEnvelopeC5, rOuSteelEnvelopeC5);
     191             :       z += dzSteelEnvelopeC5;
     192           1 :       shFaSteelEnvelopeC->DefineSection( 3, z, rInSteelEnvelopeC10, rOuSteelEnvelopeC10);
     193             :       // 10 deg cone
     194             :       z += dzSteelEnvelopeC10;
     195           1 :       shFaSteelEnvelopeC->DefineSection( 4, z, rInSteelEnvelopeR1, rOuSteelEnvelopeR1);
     196             :       // Rear Ring
     197           1 :       shFaSteelEnvelopeC->DefineSection( 5, z, rInSteelEnvelopeR1, rOuSteelEnvelopeR2);
     198             :       z += dzSteelEnvelopeR;
     199           1 :       shFaSteelEnvelopeC->DefineSection( 6, z, rInSteelEnvelopeR2, rOuSteelEnvelopeR2);
     200             :       
     201             :       // Insert 
     202           1 :       shFaSteelEnvelopeC->SetName("steelEnvC");
     203           1 :       TGeoTube* shFaSteelEnvelopeT = new TGeoTube(rInSteelEnvelopeFI, rOuSteelEnvelopeFI, dzSteelEnvelopeFI);
     204           1 :       shFaSteelEnvelopeT->SetName("steelEnvT");
     205           1 :       TGeoCompositeShape*  shFaSteelEnvelope = new TGeoCompositeShape("shFaSteelEnvelope", "steelEnvC-steelEnvT");
     206             : 
     207           1 :       TGeoVolume* voFaSteelEnvelope = new TGeoVolume("AFaSteelEnvelope", shFaSteelEnvelope, kMedSteel);
     208             :  
     209             : // Pos 2
     210             : ///////////////////////////////////
     211             : //    FA End Plate               //
     212             : //    Drawing ALIP2A__0037       //
     213             : ///////////////////////////////////
     214             : //
     215             : //
     216             : //    
     217             : //    Outer dimensions dx, dy, dz
     218             :       Float_t dxEndPlate   = 220.0;
     219             :       Float_t dyEndPlate   = 220.0;      
     220             :       Float_t dzEndPlate   =   6.0;      
     221             : //    Inner radius
     222             :       Float_t rInEndPlate  =  52.5/2.;
     223             : //    Insert 
     224             :       Float_t rInEndPlateI = 175.3/2.;
     225             :       Float_t rOuEndPlateI = 212.2/2.;
     226             :       Float_t dzEndPlateI  =   2.0;
     227             :       
     228             :       
     229           1 :       TGeoBBox* endPlate1 = new TGeoBBox(dxEndPlate/2., dyEndPlate/2., dzEndPlate/2.);
     230           1 :       endPlate1->SetName("endPlate1");
     231             : 
     232           1 :       TGeoTube* endPlate2 = new TGeoTube(0., rInEndPlate , (dzEndPlate + 0.1) / 2.) ;
     233           1 :       endPlate2->SetName("endPlate2");
     234           1 :       TGeoTube* endPlate3 = new TGeoTube(rInEndPlateI, rOuEndPlateI, (dzEndPlateI + 0.1)/2.);
     235           1 :       endPlate3->SetName("endPlate3");
     236             : 
     237           1 :       TGeoTranslation* tPlate = new TGeoTranslation("tPlate", 0., 0., -dzEndPlateI - 0.05);
     238           1 :       tPlate->RegisterYourself();
     239             : 
     240           1 :       TGeoCompositeShape*  shFaEndPlate = new TGeoCompositeShape("shFaEndPlate", "endPlate1-(endPlate2+endPlate3:tPlate)");
     241           1 :       TGeoVolume* voFaEndPlate = new TGeoVolume("AFaEndPlate", shFaEndPlate, kMedSteel);
     242             : 
     243             : // Pos 3
     244             : ///////////////////////////////////
     245             : //    FA Flange                  //
     246             : //    Drawing ALIP2A__0038       //
     247             : ///////////////////////////////////
     248             :       // Width of the Flange
     249             :       Float_t dzFaFlange   =  2.;
     250             :       // Outer radius
     251             :       Float_t rOuFaFlange  = 41.0/2.;
     252             :       // 1st section
     253             :       Float_t dzFaFlange1  =  0.8;
     254             :       Float_t rInFaFlange1 = 33.4/2.;
     255             :       // 2nd section
     256             :       Float_t dzFaFlange2  =  1.2;
     257             :       Float_t rInFaFlange2 = 36.4/2.;
     258             : 
     259           1 :       TGeoPcon* shFaFlange = new TGeoPcon(0., 360., 4);
     260             :       z = 0;
     261           1 :       shFaFlange->DefineSection(0, z, rInFaFlange1, rOuFaFlange);
     262             :       z += dzFaFlange1;
     263           1 :       shFaFlange->DefineSection(1, z, rInFaFlange1, rOuFaFlange);
     264           1 :       shFaFlange->DefineSection(2, z, rInFaFlange2, rOuFaFlange);
     265             :       z += dzFaFlange2;
     266           1 :       shFaFlange->DefineSection(3, z, rInFaFlange2, rOuFaFlange);
     267             : 
     268           1 :       TGeoVolume* voFaFlange = new TGeoVolume("AFaFlange", shFaFlange, kMedSteel);
     269             : 
     270             : // Pos 4+5
     271             : ///////////////////////////////////
     272             : //    FA W Plate A+B             //
     273             : //    Drawing ALIP2A__0043       //
     274             : ///////////////////////////////////
     275             :       // Front Flange
     276             :       Float_t dzFaWPlateF   =  2.00;
     277             :       Float_t rInFaQPlateF  = 20.50;
     278             :       Float_t rOuFaQPlateF  = 40.05;
     279             :       // 1st Central Part 24 deg
     280             :       Float_t dzFaWPlateC1  =  7.95;
     281             :       Float_t rInFaQPlateC1 = 16.35;
     282           1 :       Float_t rOuFaQPlateC1 =  rOuFaQPlateF + dzFaWPlateF * angle24;
     283             :       // 2nd Central Part 5 deg
     284             :       Float_t dzFaWPlateC2  =  1.05;
     285           1 :       Float_t rInFaQPlateC2 =  rInFaQPlateC1 + dzFaWPlateC1  * angle10;
     286           1 :       Float_t rOuFaQPlateC2 =  rOuFaQPlateC1 + dzFaWPlateC1  * angle24;
     287             :       Float_t rInFaQPlateC3 =  17.94;
     288             :       Float_t rOuFaQPlateC3 =  44.49;
     289             :       // Rear Flange
     290             :       Float_t dzFaWPlateR   =  1.00;
     291             :       Float_t rInFaQPlateR  = 21.00;
     292             :       Float_t rOuFaQPlateR  = 42.55;
     293             :       // Lenth of Plate - Rear Flange
     294             :       Float_t dzFaWPlate    = dzFaWPlateF + dzFaWPlateC1 + dzFaWPlateC2;
     295             :       
     296           1 :       TGeoPcon* shFaWPlateA = new TGeoPcon(0., 360., 7);
     297             :       z = 0.;
     298             :       // Front Flange
     299           1 :       shFaWPlateA->DefineSection(0, z, rInFaQPlateF, rOuFaQPlateF);
     300             :       z += dzFaWPlateF;
     301           1 :       shFaWPlateA->DefineSection(1, z, rInFaQPlateF, rOuFaQPlateC1);
     302             :       // 24 deg cone
     303           1 :       shFaWPlateA->DefineSection(2, z, rInFaQPlateC1, rOuFaQPlateC1);
     304             :       z += dzFaWPlateC1;
     305           1 :       shFaWPlateA->DefineSection(3, z, rInFaQPlateC2, rOuFaQPlateC2);
     306             :       // 5 deg cone
     307             :       z += dzFaWPlateC2;
     308           1 :       shFaWPlateA->DefineSection(4, z, rInFaQPlateC3, rOuFaQPlateC3);
     309             :       // Rear Flange
     310           1 :       shFaWPlateA->DefineSection(5, z, rInFaQPlateR, rOuFaQPlateR);
     311             :       z += dzFaWPlateR;
     312           1 :       shFaWPlateA->DefineSection(6, z, rInFaQPlateR, rOuFaQPlateR);
     313             : 
     314           1 :       TGeoVolume* voFaWPlateA = new TGeoVolume("AFaWPlateA", shFaWPlateA, kMedNiW);
     315             :       // Inner region with higher transport cuts
     316           1 :       TGeoPcon* shFaWPlateAI = new TGeoPcon(0., 360., 5);
     317             :       z = 3.;
     318           1 :       shFaWPlateAI->DefineSection(0, z, rInFaQPlateF + z * angle10, rOuFaQPlateC1 + (z - dzFaWPlateF) * angle24);
     319          10 :       for (Int_t i = 1; i < 5; i++) {
     320           4 :           Float_t rmin = shFaWPlateA->GetRmin(i+2);
     321           4 :           Float_t rmax = shFaWPlateA->GetRmax(i+2) - 3.;     
     322           4 :           Float_t zpos = shFaWPlateA->GetZ(i+2);
     323           4 :           shFaWPlateAI->DefineSection(i, zpos, rmin, rmax);
     324             :       }
     325           1 :       TGeoVolume* voFaWPlateAI = new TGeoVolume("AFaWPlateAI", shFaWPlateAI, kMedNiWsh);
     326           1 :       voFaWPlateA->AddNode(voFaWPlateAI, 1, gGeoIdentity);
     327             :       
     328             : //
     329             : // Inner Tungsten Shield
     330             : // Part 1  99.8 cm
     331             : // Part 2 143.5 cm
     332             : // Part 3  25.0 cm
     333             : // Part 4  31.0 cm
     334             : // ====================
     335             : //        299.3 cm - 0.6 overlap between Part 1 and Part 2
     336             : //        298.7 cm
     337             : // Starting position 499.0 - 298.7 = 200.3
     338             : // Within C cone:    200.3 -  92.0 = 108.3 = end of straight section of the Graphite Cone
     339             : //
     340             :       
     341             : // Pos 6
     342             : ///////////////////////////////////
     343             : //    FA Tungsten Tube Part 1    //
     344             : //    Drawing ALIP2A__0045       //
     345             : ///////////////////////////////////
     346             :       //
     347             :       // Inner radius
     348             :       Float_t rInFaWTube1C1 =  9.1/2.;
     349             :       // Central part
     350             :       Float_t dzFaWTube1C   = 98.8;
     351             :       Float_t rOuFaWTube1C1 = 13.8/2.;
     352             :       Float_t rOuFaWTube1C2 = 20.7/2.;
     353             :       // Rear Flange 
     354             :       Float_t dzFaWTube1R   =  1.0;
     355             :       Float_t rOuFaWTube1R  = 15.0/2.;
     356             :       // Total length 
     357             :       Float_t dzFaWTube1    = dzFaWTube1C + dzFaWTube1R;
     358             :       
     359           1 :       TGeoPcon* shFaWTube1 = new TGeoPcon(0., 360., 4);
     360             :       z = 0.;
     361             :       // Central Part
     362           1 :       shFaWTube1->DefineSection(0, z, rInFaWTube1C1, rOuFaWTube1C1);
     363             :       z += dzFaWTube1C;
     364           1 :       shFaWTube1->DefineSection(1, z, rInFaWTube1C1, rOuFaWTube1C2);
     365             :       // Rear Flange
     366           1 :       shFaWTube1->DefineSection(2, z, rInFaWTube1C1, rOuFaWTube1R);
     367             :       z += dzFaWTube1R;
     368           1 :       shFaWTube1->DefineSection(3, z, rInFaWTube1C1, rOuFaWTube1R);
     369             :       
     370           1 :       TGeoVolume* voFaWTube1 = new TGeoVolume("AFaWTube1", shFaWTube1, kMedNiWsh);
     371             :       
     372             : // Pos 7
     373             : ///////////////////////////////////
     374             : //    FA Tungsten Tube Part 2    //
     375             : //    Drawing ALIP2A__0046       //
     376             : ///////////////////////////////////
     377             :       //
     378             : 
     379             :       // Central part
     380             :       Float_t dzFaWTube2C   = 142.9;
     381             :       Float_t rInFaWTube2C1 =   9.10/2.;
     382             :       Float_t rInFaWTube2C2 =  12.58/2.;
     383             :       Float_t rOuFaWTube2C1 =  20.70/2.;
     384             :       Float_t rOuFaWTube2C2 =  30.72/2.- 0.05;
     385             :       // Front Flange 
     386             :       Float_t dzFaWTube2F   =  0.6;
     387             :       Float_t rInFaWTube2F  = 15.4/2.;
     388             :       // Total length 
     389             :       Float_t dzFaWTube2    = dzFaWTube2C + dzFaWTube2F;
     390             : 
     391           1 :       TGeoPcon* shFaWTube2 = new TGeoPcon(0., 360., 4);
     392             :       z = 0.;
     393             :       // Front Flange
     394           1 :       shFaWTube2->DefineSection(0, z, rInFaWTube2F, rOuFaWTube2C1);
     395             :       z += dzFaWTube2F;
     396           1 :       shFaWTube2->DefineSection(1, z, rInFaWTube2F, rOuFaWTube2C1);
     397             :       // Central part
     398           1 :       shFaWTube2->DefineSection(2, z, rInFaWTube2C1, rOuFaWTube2C1);
     399             :       z += dzFaWTube2C;
     400           1 :       shFaWTube2->DefineSection(3, z, rInFaWTube2C2, rOuFaWTube2C2);
     401             : 
     402           1 :       TGeoVolume* voFaWTube2 = new TGeoVolume("AFaWTube2", shFaWTube2, kMedNiWsh);
     403             : 
     404             : // Pos 8
     405             : ///////////////////////////////////
     406             : //    FA Tungsten Tube Part 3    //
     407             : //    Drawing ALIP2A__0047       //
     408             : ///////////////////////////////////
     409             :       Float_t dzFaWTube3    =  25.0;
     410             :       Float_t rInFaWTube3C1 =  12.59/2.;
     411             :       Float_t rInFaWTube3C2 =  13.23/2.;
     412             :       Float_t rOuFaWTube3C1 =  30.60/2.;
     413             :       Float_t rOuFaWTube3C2 =  32.35/2.;
     414           2 :       TGeoVolume* voFaWTube3 = new TGeoVolume("AFaWTube3", 
     415           3 :                                               new TGeoCone(dzFaWTube3/2., rInFaWTube3C1, rOuFaWTube3C1, rInFaWTube3C2, rOuFaWTube3C2), 
     416             :                                               kMedNiWsh);
     417             : 
     418             : // Pos 9
     419             : ///////////////////////////////////
     420             : //    FA Tungsten Tube Part 4    //
     421             : //    Drawing ALIP2A__0048       //
     422             : ///////////////////////////////////
     423             :       Float_t dzFaWTube4    =  31.0;
     424             :       Float_t rInFaWTube4C1 =  13.23/2.;
     425             :       Float_t rInFaWTube4C2 =  13.98/2.;
     426             :       Float_t rOuFaWTube4C1 =  48.80/2.;
     427             :       Float_t rOuFaWTube4C2 =  52.05/2.;
     428           2 :       TGeoVolume* voFaWTube4 = new TGeoVolume("AFaWTube4", 
     429           3 :                                               new TGeoCone(dzFaWTube4/2., rInFaWTube4C1, rOuFaWTube4C1, rInFaWTube4C2, rOuFaWTube4C2), 
     430             :                                               kMedNiWsh);
     431             : 
     432             : // Pos 10
     433             : //
     434             : // This section has been moved to AliSHILv3
     435             :       
     436             : //
     437             : // Pos 11
     438             : ///////////////////////////////////
     439             : //    FA Graphite Cone           //
     440             : //    Drawing ALIP2_0002         //
     441             : ///////////////////////////////////
     442             : //
     443             :       // Total length 
     444             :       Float_t dzFaGraphiteCone   = 225.0;
     445             :       // Straight section = start of the 2deg inner cone
     446             :       Float_t dzFaGraphiteConeS  =  108.3;
     447             :       // Inner radius at the front
     448             :       Float_t rInFaGraphiteCone1 =   4.5;
     449             :       // Outer radius at the front
     450           1 :       Float_t rOuFaGraphiteCone1 =  (zFa + dzFaFlange) * angle10; 
     451             :       // Inner radius at start of inner opening cone
     452             :       Float_t rInFaGraphiteCone2 =   7.0;
     453             :       // Outer radius at start of inner opening cone
     454           1 :       Float_t rOuFaGraphiteCone2 =  (zFa + dzFaFlange + dzFaGraphiteConeS) * angle10; 
     455             :       // Inner radius the rear 
     456             :       Float_t rInFaGraphiteCone3 =  11.0;
     457             :       // Ouer radius at the rear
     458           1 :       Float_t rOuFaGraphiteCone3 =  (zFa + dzFaFlange + dzFaGraphiteCone) * angle10; 
     459             : 
     460           1 :       TGeoPcon* shFaGraphiteCone = new TGeoPcon(0., 360., 4);
     461             :       
     462             :       z = 0;
     463             :       // Straight section
     464           1 :       shFaGraphiteCone->DefineSection(0, z, rInFaGraphiteCone1, rOuFaGraphiteCone1);
     465             :       z += dzFaGraphiteConeS;
     466           1 :       shFaGraphiteCone->DefineSection(1, z, rInFaGraphiteCone1, rOuFaGraphiteCone2);
     467             :       // 2 deg opening cone
     468           1 :       shFaGraphiteCone->DefineSection(2, z, rInFaGraphiteCone2, rOuFaGraphiteCone2);
     469             :       z = dzFaGraphiteCone;
     470           1 :       shFaGraphiteCone->DefineSection(3, z, rInFaGraphiteCone3, rOuFaGraphiteCone3);
     471             : 
     472           1 :       TGeoVolume* voFaGraphiteCone = new TGeoVolume("AFaGraphiteCone", shFaGraphiteCone, kMedCsh);
     473             :       //
     474             :       // Outer region with lower transport cuts
     475             :       dz = 50.;
     476           2 :       TGeoCone* shFaGraphiteConeO = new TGeoCone(dz/2.,
     477             :                                                  rInFaGraphiteCone1, rOuFaGraphiteCone1, 
     478           1 :                                                  rInFaGraphiteCone1, rOuFaGraphiteCone1 + dz * angle10);
     479             :       
     480           1 :       TGeoVolume* voFaGraphiteConeO = new TGeoVolume("AFaGraphiteConeO", shFaGraphiteConeO, kMedC);
     481           2 :       voFaGraphiteCone->AddNode(voFaGraphiteConeO, 1, new TGeoTranslation(0., 0., dz/2.));
     482             : 
     483             : // Pos 12
     484             : ///////////////////////////////////
     485             : //    FA Lead Cone               //
     486             : //    Drawing ALIP2A__0077       //
     487             : ///////////////////////////////////
     488             :       // 5 deg cone
     489             :       Float_t dzFaPbCone5   = 168.9;
     490             :       Float_t rInFaPbCone5  =  37.35/2.;
     491             :       Float_t rOuFaPbCone5  =  85.66/2.;      
     492             :       // 10 deg cone
     493             :       Float_t dzFaPbCone10  =  25.9;
     494           1 :       Float_t rInFaPbCone10 =  rInFaPbCone5 + dzFaPbCone5 * angle10;
     495             :       Float_t rOuFaPbCone10 =  115.2/2.;
     496             :       // end
     497             :       Float_t rInFaPbConeE  =  106.05/2.;
     498             :       Float_t rOuFaPbConeE  =  124.35/2.;
     499             :       // Total length
     500             :       Float_t dzFaPbCone    =  dzFaPbCone5 + dzFaPbCone10;
     501             : 
     502           1 :       TGeoPcon* shFaPbCone = new TGeoPcon(0., 360., 3);
     503             :       z = 0.;
     504             :       // 5 deg cone
     505           1 :       shFaPbCone->DefineSection(0, z, rInFaPbCone5,  rOuFaPbCone5);
     506             :       z += dzFaPbCone5;
     507             :       // 10 deg cone
     508           1 :       shFaPbCone->DefineSection(1, z, rInFaPbCone10, rOuFaPbCone10);
     509             :       z += dzFaPbCone10;
     510           1 :       shFaPbCone->DefineSection(2, z, rInFaPbConeE,  rOuFaPbConeE);
     511             : 
     512           1 :       TGeoVolume* voFaPbCone = new TGeoVolume("AFaPbCone", shFaPbCone, kMedPb);
     513             :       //
     514             :       // Inner region with higher transport cuts
     515           1 :       TGeoPcon*   shFaPbConeI = MakeShapeFromTemplate(shFaPbCone, 0., -3.);
     516           1 :       TGeoVolume* voFaPbConeI  = new TGeoVolume("AFaPbConeI", shFaPbConeI, kMedPbSh);
     517           1 :       voFaPbCone->AddNode(voFaPbConeI, 1, gGeoIdentity);
     518             :       
     519             :       
     520             : // Pos 13
     521             : ///////////////////////////////////
     522             : //    FA Concrete Cone           //
     523             : //    Drawing ALIP2A__00xx       //
     524             : ///////////////////////////////////
     525             :       Float_t dzFaConcreteCone    = 126.;
     526             :       Float_t rOuFaConcreteCone1  = rOuFaGraphiteCone3;
     527             :       Float_t rInFaConcreteCone1  =  11.;
     528           1 :       Float_t rOuFaConcreteCone2  = rOuFaConcreteCone1 + dzFaConcreteCone * angle10;
     529           1 :       Float_t rInFaConcreteCone2  = rInFaConcreteCone1 + dzFaConcreteCone * angle02;
     530             :       
     531           2 :       TGeoVolume* voFaConcreteCone = new TGeoVolume("AFaConcreteCone", 
     532           4 :                                                     new TGeoCone(dzFaConcreteCone/2., 
     533             :                                                                  rInFaConcreteCone1, rOuFaConcreteCone1, 
     534           1 :                                                                  rInFaConcreteCone2, rOuFaConcreteCone2), 
     535             :                                                     kMedConcSh);  
     536             : 
     537             : // Pos 14
     538             : ///////////////////////////////////
     539             : //    FA Polyethylene Parts      //
     540             : //    Drawing ALIP2A__0034       //
     541             : ///////////////////////////////////
     542             :       Float_t dzFaCH2Cone    = 201.;
     543             :       Float_t rInFaCH2Cone1  = 106.0/2.;
     544             :       Float_t rInFaCH2Cone2  = 176.9/2.;      
     545           1 :       Float_t dFaCH2Cone     = 7.5 / TMath::Cos(10. * kDegRad);
     546             :       
     547           2 :       TGeoVolume* voFaCH2Cone = new TGeoVolume("AFaCH2Cone", 
     548           4 :                                                new TGeoCone(dzFaCH2Cone/2., 
     549           1 :                                                             rInFaCH2Cone1, rInFaCH2Cone1 + dFaCH2Cone,      
     550           1 :                                                             rInFaCH2Cone2, rInFaCH2Cone2 + dFaCH2Cone),             
     551             :                                                kMedCH2Sh);
     552             :       
     553             :       
     554             : // Pos 15
     555             : ///////////////////////////////////
     556             : //    FA Steel Plate 250 mm      //
     557             : //    Drawing ALIP2A__00xx       //
     558             : ///////////////////////////////////     
     559             :       Float_t dzFaSteelCone25   = 25.;
     560             :       Float_t eps = 0.001;
     561             :       Float_t rInFaSteelCone25A = rInFaConcreteCone2;
     562             :       Float_t rOuFaSteelCone25A = rOuFaConcreteCone2;      
     563           1 :       Float_t rInFaSteelCone25B = rInFaSteelCone25A + dzFaSteelCone25 * angle02;
     564           1 :       Float_t rOuFaSteelCone25B = rOuFaSteelCone25A + dzFaSteelCone25 * angle10;
     565             :       
     566           2 :       TGeoVolume* voFaSteelCone25 = new TGeoVolume("AFaSteelCone25", 
     567           4 :                                                    new TGeoCone(dzFaSteelCone25/2., 
     568           1 :                                                                 rInFaSteelCone25A + eps, rOuFaSteelCone25A - eps,           
     569           1 :                                                                 rInFaSteelCone25B + eps, rOuFaSteelCone25B - eps),
     570             :                                                    kMedSteelSh);
     571             : 
     572             : // Pos 16
     573             : ///////////////////////////////////
     574             : //    FA Steel Plate 310 mm      //
     575             : //    Drawing ALIP2A__00xx       //
     576             : ///////////////////////////////////  
     577             :       Float_t dzFaSteelCone31   = 31.;
     578             :       Float_t rInFaSteelCone31A = rOuFaWTube4C1;;
     579             :       Float_t rOuFaSteelCone31A = rOuFaSteelCone25B;      
     580             :       Float_t rInFaSteelCone31B = rOuFaWTube4C2;
     581           1 :       Float_t rOuFaSteelCone31B = rOuFaSteelCone31A + dzFaSteelCone31 * angle10;
     582             :       
     583           2 :       TGeoVolume* voFaSteelCone31 = new TGeoVolume("AFaSteelCone31", 
     584           4 :                                                    new TGeoCone(dzFaSteelCone31/2., 
     585             :                                                                 rInFaSteelCone31A + eps, rOuFaSteelCone31A - eps,           
     586           1 :                                                                 rInFaSteelCone31B + eps, rOuFaSteelCone31B - eps),
     587             :                                                    kMedSteelSh);
     588             :       // Outer Region with higher transport cuts
     589             :       dz = 5.;
     590           2 :       TGeoVolume* voFaSteelCone31I = new TGeoVolume("AFaSteelCone31I", 
     591           4 :                                                     new TGeoCone(dz/2., 
     592           1 :                                                                  rInFaSteelCone31B - dz * angle03 + eps, 
     593           1 :                                                                  rOuFaSteelCone31B - dz * angle10 - eps, 
     594             :                                                                  rInFaSteelCone31B + eps, rOuFaSteelCone31B - eps),
     595             :                                                     kMedSteel);
     596             :       
     597           2 :       voFaSteelCone31->AddNode(voFaSteelCone31I, 1,  new TGeoTranslation(0., 0., dzFaSteelCone31/2. - dz/2.));
     598             :       
     599             : 
     600             : ///////////////////////////////////
     601             : //    FA Composite Ring          //
     602             : //    Drawing ALIP2A__0126       //
     603             : ///////////////////////////////////  
     604             :       // 1st section
     605             :       Float_t dzFaCompRing1  =  0.8;
     606             :       Float_t rInFaCompRing1 = 11.0/2.;
     607             :       Float_t rOuFaCompRing1 = 32.4/2.;
     608             :       // 2nd section
     609             :       Float_t dzFaCompRing2  =  1.2;
     610             :       Float_t rInFaCompRing2 = 14.0/2.;
     611             :       Float_t rOuFaCompRing2 = 35.3/2.;
     612             : 
     613           1 :       TGeoPcon* shFaCompRing = new TGeoPcon(0., 360., 4);
     614             :       z = 0.;
     615             :       // 1st section
     616           1 :       shFaCompRing->DefineSection(0, z, rInFaCompRing1, rOuFaCompRing1);
     617             :       z +=  dzFaCompRing1;
     618           1 :       shFaCompRing->DefineSection(1, z, rInFaCompRing1, rOuFaCompRing1);
     619             :       // 2nd section
     620           1 :       shFaCompRing->DefineSection(2, z, rInFaCompRing2, rOuFaCompRing2);;
     621             :       z +=  dzFaCompRing2;
     622           1 :       shFaCompRing->DefineSection(3, z, rInFaCompRing2, rOuFaCompRing2);
     623             : 
     624           1 :       TGeoVolume* voFaCompRing = new TGeoVolume("AFaCompRing", shFaCompRing, kMedC);
     625             : 
     626             : ///////////////////////////////////
     627             : //    FA Magnesium Ring          //
     628             : //    Drawing ALIP2A__0127       //
     629             : ///////////////////////////////////  
     630             :       //
     631             :       // The inner radii
     632             :       // section 1+3
     633             :       Float_t dzFaMgRingO   = 0.7;
     634             :       Float_t rInFaMgRingO  = 3.0;
     635             :       // section 2
     636             :       Float_t dzFaMgRingI   = 0.6;
     637             :       Float_t rInFaMgRingI  = 3.5;
     638             : 
     639           1 :       TGeoPcon* shFaMgRing = new TGeoPcon(0., 360., 8);
     640             :       // 1st section 
     641             :       z = 0.;
     642           1 :       shFaMgRing->DefineSection(0, z,  rInFaMgRingO, rInFaCompRing1);
     643             :       z += dzFaMgRingO;
     644           1 :       shFaMgRing->DefineSection(1, z,  rInFaMgRingO, rInFaCompRing1);
     645             :       // 2nd section
     646           1 :       shFaMgRing->DefineSection(2, z,  rInFaMgRingI, rInFaCompRing1);
     647           1 :       z +=  dzFaMgRingI/2.;
     648           1 :       shFaMgRing->DefineSection(3, z,  rInFaMgRingI, rInFaCompRing1);
     649             :       // 3rd section
     650           1 :       shFaMgRing->DefineSection(4, z,  rInFaMgRingI, rInFaCompRing2);
     651           1 :       z +=  dzFaMgRingI/2.;
     652           1 :       shFaMgRing->DefineSection(5, z,  rInFaMgRingI, rInFaCompRing2);
     653             :       // 4th section
     654           1 :       shFaMgRing->DefineSection(6, z,  rInFaMgRingO, rInFaCompRing2);
     655           1 :       z += dzFaMgRingO;
     656           1 :       shFaMgRing->DefineSection(7, z,  rInFaMgRingO, rInFaCompRing2);
     657           1 :       TGeoVolume* voFaMgRing = new TGeoVolume("AFaMgRing", shFaMgRing, kMedMg);
     658             : 
     659             : 
     660             : //
     661             : //    Absorber mother volume
     662             : //
     663             : //
     664             : // Length of the absorber without endplate
     665             :       Float_t dzFa = dzFaFlange + dzFaGraphiteCone + dzFaConcreteCone + dzFaSteelCone25 + dzFaSteelCone31;
     666           1 :       TGeoPcon* shFaM = new TGeoPcon(0., 360., 16);
     667             :       // Front -> Flange (Mg Ring details)
     668             :       z = 0.;
     669           1 :       shFaM->DefineSection( 0, z, rInFaMgRingO,       rOuFaQPlateF);
     670             :       z +=  dzFaMgRingO;
     671             :       dz =  dzFaMgRingO;
     672           1 :       shFaM->DefineSection( 1, z, rInFaMgRingO,       rOuFaQPlateF +  dz * angle24);
     673           1 :       shFaM->DefineSection( 2, z, rInFaMgRingI,       rOuFaQPlateF +  dz * angle24);
     674             :       z  += dzFaMgRingI;
     675             :       dz += dzFaMgRingI;
     676           1 :       shFaM->DefineSection( 3, z, rInFaMgRingI,       rOuFaQPlateF +  dz * angle24);
     677           1 :       shFaM->DefineSection( 4, z, rInFaMgRingO,       rOuFaQPlateF +  dz * angle24);
     678             :       z +=  dzFaMgRingO;
     679             :       dz += dzFaMgRingO;
     680           1 :       shFaM->DefineSection( 5, z, rInFaMgRingO,       rOuFaQPlateF +  dz * angle24);
     681           1 :       shFaM->DefineSection( 6, z, rInFaGraphiteCone1, rOuFaQPlateF +  dz * angle24);
     682             :       // Flange -> W-Plate B
     683             :       z += dzFaWPlateC1;
     684           1 :       shFaM->DefineSection( 7, z, rInFaGraphiteCone1, rOuFaQPlateC2);
     685             :       z += dzFaWPlateC2;
     686             :       Float_t zFaSteelEnvelope = z;
     687           1 :       shFaM->DefineSection( 8, z, rInFaGraphiteCone1, rOuFaQPlateC3);
     688             :       // 5 deg cone -> 10 deg cone
     689             :       z  = zFaSteelEnvelope + dzSteelEnvelopeFC  + dzSteelEnvelopeC5;
     690           1 :       shFaM->DefineSection( 9, z, rInFaGraphiteCone1, rOuSteelEnvelopeC10);
     691             :       // 10 deg cone  up to end of straight section
     692             :       z0 = z;
     693             :       z  = dzFaFlange + dzFaGraphiteConeS + dzFaWTube1C;
     694             :       dz = z - z0;
     695           1 :       shFaM->DefineSection(10, z, rInFaGraphiteCone1, rOuSteelEnvelopeC10 + dz * angle10);
     696             :       // 0.7 deg inner opening cone up to outer rear ring
     697             :       z0 = z;
     698           1 :       z = dzFa - dzSteelEnvelopeR/2.;
     699           1 :       dz = (z - z0);
     700           1 :       shFaM->DefineSection(11, z,  rInFaGraphiteCone1 +dz * angle71, rOuSteelEnvelopeR1);
     701           1 :       shFaM->DefineSection(12, z,  rInFaGraphiteCone1 +dz * angle71, rOuSteelEnvelopeR2);
     702           1 :       z += dzSteelEnvelopeR/2.;
     703           1 :       shFaM->DefineSection(13, z,  rInFaWTube4C2,                    rOuSteelEnvelopeR2);
     704             :       // Recess for end plate
     705           1 :       dz = dzSteelEnvelopeR/2;
     706           1 :       shFaM->DefineSection(14, z,  rInFaCH2Cone2 - dz * angle10,     rOuSteelEnvelopeR2);
     707           1 :       z += dzSteelEnvelopeR/2.;
     708           1 :       shFaM->DefineSection(15, z,  rInFaCH2Cone2,                    rOuSteelEnvelopeR2);
     709             : 
     710           1 :       TGeoVolume* voFaM = new TGeoVolume("AFaM", shFaM, kMedAir);
     711           1 :       voFaM->SetVisibility(0);
     712             :       
     713             : 
     714             : //
     715             : //    Assemble volumes inside acceptance
     716           1 :       TGeoPcon* shFaAccM = new TGeoPcon(0., 360., 7);
     717          10 :       for (Int_t i = 0; i < 4; i++) {
     718           4 :           Float_t zpos  = shFaGraphiteCone->GetZ(i);
     719           4 :           Float_t rmin  = shFaGraphiteCone->GetRmin(i);
     720           4 :           Float_t rmax  = shFaGraphiteCone->GetRmax(i);
     721           4 :           shFaAccM->DefineSection(i, zpos, rmin, rmax);
     722             :       }
     723             :       z  = dzFaGraphiteCone + dzFaConcreteCone + dzFaSteelCone25;
     724             :       z0 = z + zFa + dzFaFlange;
     725           1 :       shFaAccM->DefineSection(4, z, rOuFaWTube3C2, z0 * angle10);
     726           1 :       shFaAccM->DefineSection(5, z, rOuFaWTube4C1, z0 * angle10);
     727             :       z  += dzFaSteelCone31;
     728             :       z0 += dzFaSteelCone31;
     729           1 :       shFaAccM->DefineSection(6, z, rOuFaWTube4C2,  z0 * angle10);
     730           1 :       TGeoVolume* voFaAccM = new TGeoVolume("AFaAcc", shFaAccM, kMedAir);
     731             :       
     732             :       z = 0;
     733           1 :       voFaAccM->AddNode(voFaGraphiteCone, 1, gGeoIdentity);
     734             :       z += dzFaGraphiteCone;
     735           2 :       voFaAccM->AddNode(voFaConcreteCone, 1, new TGeoTranslation(0., 0., z + dzFaConcreteCone / 2.));
     736             :       z += dzFaConcreteCone;
     737           2 :       voFaAccM->AddNode(voFaSteelCone25,  1, new TGeoTranslation(0., 0., z + dzFaSteelCone25 / 2.));
     738             :       z += dzFaSteelCone25;
     739           2 :       voFaAccM->AddNode(voFaSteelCone31,  1, new TGeoTranslation(0., 0., z + dzFaSteelCone31 / 2.));
     740             : 
     741             : //
     742             : // Inner shield
     743           1 :       TGeoVolumeAssembly* voFaInnerShield = new TGeoVolumeAssembly("AFaInnerShield");
     744           1 :       voFaInnerShield->AddNode(voFaWTube1, 1, gGeoIdentity);
     745             :       z = dzFaWTube1 - 0.6;
     746           2 :       voFaInnerShield->AddNode(voFaWTube2, 1, new TGeoTranslation(0., 0., z) );
     747             :       z += dzFaWTube2;
     748           2 :       voFaInnerShield->AddNode(voFaWTube3, 1, new TGeoTranslation(0., 0., z + dzFaWTube3 / 2.) );
     749             :       z += dzFaWTube3;
     750           2 :       voFaInnerShield->AddNode(voFaWTube4, 1, new TGeoTranslation(0., 0., z + dzFaWTube4 / 2.) );
     751             :       z = dzFaGraphiteConeS + dzFaFlange;
     752           2 :       voFaM->AddNode(voFaInnerShield, 1, new TGeoTranslation(0., 0., z));
     753             : 
     754             : 
     755             : //
     756             : //    Adding volumes to mother volume
     757             : //
     758             :       z = 0.;
     759           1 :       voFaM->AddNode(voFaWPlateA,       1, gGeoIdentity);
     760             :       z += dzFaWPlate;
     761           2 :       voFaM->AddNode(voFaSteelEnvelope, 1, new TGeoTranslation(0., 0., z));
     762             :       z += dzSteelEnvelopeFC;
     763           2 :       voFaM->AddNode(voFaPbCone,        1, new TGeoTranslation(0., 0., z));
     764           1 :       z += (dzFaPbCone + dzFaCH2Cone / 2.);
     765           2 :       voFaM->AddNode(voFaCH2Cone,       1, new TGeoTranslation(0., 0., z));
     766           1 :       voFaM->AddNode(voFaFlange,   1, gGeoIdentity);
     767           1 :       voFaM->AddNode(voFaMgRing,   1, gGeoIdentity);
     768           1 :       voFaM->AddNode(voFaCompRing, 1, gGeoIdentity);
     769           2 :       voFaM->AddNode(voFaAccM, 1, new TGeoTranslation(0., 0., dzFaFlange));
     770             : 
     771             : ////////////////////////////////////////////////////
     772             : //                                                // 
     773             : //    Front Absorber Support Structure FASS       // 
     774             : //                                                //
     775             : //    Drawing ALIP2A__0035                        //
     776             : //    Drawing ALIP2A__0089                        //
     777             : //    Drawing ALIP2A__0090                        //
     778             : //    Drawing ALIP2A__0109                        //
     779             : ////////////////////////////////////////////////////
     780           1 :       TGeoVolumeAssembly* voFass = new TGeoVolumeAssembly("AFass");
     781             :       const Float_t kFassUBFlangeH = 380.;
     782             :       const Float_t kFassUBFlangeW =  77.;
     783             : 
     784             :       const Float_t kFassUMFlangeH = 380.;
     785             :       const Float_t kFassUMFlangeB = 246.;
     786             :       const Float_t kFassUMFlangeT =  10.;
     787           1 :       const Float_t kFassUMFalpha  = - TMath::ATan((kFassUMFlangeB-kFassUMFlangeT)/ kFassUMFlangeH / 2.) / kDegRad;      
     788             : // Upper back   flange
     789             : // B1
     790             : // 380 x 77
     791           3 :       TGeoVolume* voFassUBFlange = new TGeoVolume("AFassUBFlange", new TGeoBBox(kFassUBFlangeW/2., 
     792             :                                                                                kFassUBFlangeH/2., 3./2.), kMedSteel);
     793           2 :       voFass->AddNode(voFassUBFlange, 1, new TGeoTranslation(+1.5 + kFassUBFlangeW/2., 
     794             :                                                              180. + kFassUBFlangeH/2.,
     795             :                                                              kFassUMFlangeB - 1.5));
     796           2 :       voFass->AddNode(voFassUBFlange, 2, new TGeoTranslation(-1.5 - kFassUBFlangeW/2., 
     797             :                                                              180. + kFassUBFlangeH/2.,
     798             :                                                              kFassUMFlangeB - 1.5));
     799             : 
     800             :       
     801             : // Lower back   flange
     802             : // Upper median flange
     803             : //    Drawing ALIP2A__0090                        //
     804             : //    Drawing ALIP2A__0089                        //
     805             : //    A2
     806             : 
     807           2 :       TGeoVolume* voFassUMFlange = new TGeoVolume("AFassUMFlange", 
     808           3 :                                                   new TGeoTrap(kFassUMFlangeH/2., kFassUMFalpha,  
     809             :                                                                0., 1.5, 
     810             :                                                                kFassUMFlangeB/2., kFassUMFlangeB/2.,
     811             :                                                                0., 1.5, 
     812             :                                                                kFassUMFlangeT/2., kFassUMFlangeT/2.,
     813             :                                                                0.), kMedSteel);
     814             :       
     815           1 :       TGeoRotation* rotFass1 = new TGeoRotation("rotFass1", 180., 0., 90., 0., 90., 90.);
     816           2 :       voFass->AddNode(voFassUMFlange,1 , 
     817           2 :                       new TGeoCombiTrans(0., 180. + kFassUMFlangeH/2., -(kFassUMFlangeB+kFassUMFlangeT)/4. + kFassUMFlangeB, 
     818             :                                          rotFass1));
     819             :       
     820             : 
     821             : // Lower median flange
     822             : //    Drawing ALIP2A__0090                        //
     823             : //    Drawing ALIP2A__0089                        //
     824             : //    A1
     825             :       const Float_t kFassLMFlangeH = 242.;
     826             :       const Float_t kFassLMFlangeB = 246.;
     827             :       const Float_t kFassLMFlangeT =  43.;
     828           1 :       const Float_t kFassLMFalpha  = - TMath::ATan((kFassLMFlangeB-kFassLMFlangeT)/ kFassLMFlangeH / 2.) / kDegRad;
     829           2 :       TGeoVolume* voFassLMFlange = new TGeoVolume("AFassLMFlange", 
     830           3 :                                                   new TGeoTrap(kFassLMFlangeH/2., kFassLMFalpha,  
     831             :                                                                0., 1.5, 
     832             :                                                                kFassLMFlangeB/2., kFassLMFlangeB/2.,
     833             :                                                                0., 1.5, 
     834             :                                                                kFassLMFlangeT/2., kFassLMFlangeT/2.,
     835             :                                                                0.), kMedSteel);
     836           1 :       TGeoRotation* rotFass2 = new TGeoRotation("rotFass2", 180., 0., 90., 0., 90., 270.);
     837           2 :       voFass->AddNode(voFassLMFlange, 1, 
     838           2 :                       new TGeoCombiTrans(0., -180. - kFassLMFlangeH/2., -(kFassLMFlangeB+kFassLMFlangeT)/4. + kFassLMFlangeB, 
     839             :                                         rotFass2));
     840             : 
     841             : // Stiffeners
     842             : // Support Plate
     843             : //
     844             : // Central cone
     845           1 :       TGeoPgon* shFassCone = new TGeoPgon(22.5, 360., 8, 4);
     846           1 :       shFassCone->DefineSection(0,   0.,   0., 180.);
     847           1 :       shFassCone->DefineSection(1,   3.,   0., 180.);
     848           1 :       shFassCone->DefineSection(2,   3., 177., 180.);
     849           1 :       shFassCone->DefineSection(3, 246., 177., 180.);
     850           1 :       shFassCone->SetName("FassCone");
     851             : 
     852           1 :       TGeoBBox* shFassWindow = new TGeoBBox( 190., 53., 28.);
     853           1 :       shFassWindow->SetName("FassWindow");
     854           1 :       TGeoTranslation* tFassWindow = new TGeoTranslation("tFassWindow", 0., 0., 78.);
     855           1 :       tFassWindow->RegisterYourself();
     856             : 
     857           1 :       TGeoTube* shFassApperture = new TGeoTube(0., 104., 3.);
     858           1 :       shFassApperture->SetName("FassApperture");
     859             :       
     860             :       TGeoCompositeShape* shFassCentral = 
     861           1 :           new TGeoCompositeShape("shFassCentral", "FassCone-(FassWindow:tFassWindow+FassApperture)");
     862             :       
     863           1 :       TGeoVolume* voFassCentral = new TGeoVolume("AFassCentral", shFassCentral, kMedSteel);
     864           1 :       voFass->AddNode(voFassCentral, 1, gGeoIdentity);
     865             :       
     866             : //
     867             : // Aluminum ring
     868             : //
     869           3 :       TGeoVolume* voFassAlRing = new TGeoVolume("AFassAlRing", new TGeoTube(104., 180., 10.), kMedAlu);
     870             :       
     871             :       
     872             : //
     873             : // Assemble the FA
     874             : //
     875             : // Inside muon spectrometer acceptance
     876             : //
     877             : //    Composite  2 cm
     878             : //    Graphite 225 cm
     879             : //    Concrete 126 cm
     880             : //    Steel     56 cm
     881             : // ===================
     882             : //             409 cm
     883             : // should be   409 cm
     884             : 
     885             : 
     886             :       
     887             :             
     888             : //
     889             : // Absorber and Support
     890           1 :       TGeoVolumeAssembly* voFA = new TGeoVolumeAssembly("AFA");
     891           1 :       voFA->AddNode(voFaM,        1, gGeoIdentity);
     892           2 :       voFA->AddNode(voFaEndPlate, 1, new TGeoTranslation(0., 0., dzFa + dzEndPlate/2.));
     893           2 :       voFA->AddNode(voFass, 1, new TGeoTranslation(0., 0., 388.45));
     894           2 :       voFA->AddNode(voFassAlRing, 1, new TGeoTranslation(0., 0., 382. - 3.56));
     895           2 :       top->AddNode(voFA, 1, new TGeoCombiTrans(0., 0., -90., rotxz));
     896           1 : }
     897             : 
     898             : 
     899             : TGeoPcon* AliABSOv3::MakeShapeFromTemplate(const TGeoPcon* pcon, Float_t drMin, Float_t drMax)
     900             : {
     901             :     // 
     902             :     // Returns new shape based on a template changing
     903             :     // the inner radii by drMin and the outer radii by drMax.
     904             :     //
     905           2 :     Int_t nz = pcon->GetNz();
     906           1 :     TGeoPcon* cpcon = new TGeoPcon(0., 360., nz);
     907           8 :     for (Int_t i = 0; i < nz; i++) 
     908           3 :         cpcon->DefineSection(i, pcon->GetZ(i), pcon->GetRmin(i) + drMin, pcon->GetRmax(i) + drMax);
     909           1 :     return cpcon;
     910           0 : }

Generated by: LCOV version 1.11