LCOV - code coverage report
Current view: top level - STRUCT - AliHALLv3.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 219 241 90.9 %
Date: 2016-06-14 17:26:59 Functions: 8 8 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             : //                                                                           //
      20             : //  Experimental Hall                                                        //
      21             : //  This class contains the description of the experimental hall             //
      22             : //  and the shielding blocks.                                                // 
      23             : //  Author: Andreas Morsch                                                   //
      24             : //  andreas.morsch@cern.ch                                                   //
      25             : //                                                                           //
      26             : ///////////////////////////////////////////////////////////////////////////////
      27             : 
      28             : #include <TVirtualMC.h>
      29             : 
      30             : #include "AliConst.h"
      31             : #include "AliHALLv3.h"
      32             : #include "AliMagF.h"
      33             : #include "AliRun.h"
      34             : #include "AliLog.h"
      35             : #include "AliMC.h"
      36             : #include "AliTrackReference.h"
      37             : #include <TGeoVolume.h>
      38             : #include <TGeoManager.h>
      39             : #include <TGeoMatrix.h>
      40             : #include <TGeoCompositeShape.h>
      41             : #include <TGeoBBox.h>
      42             : #include <TGeoTube.h>
      43             : #include <TGeoPgon.h>
      44             : #include <TGeoPcon.h>
      45             : #include <TGeoCone.h>
      46             : #include <TGeoTrd1.h>
      47             : #include <TGeoArb8.h>
      48             : 
      49          12 : ClassImp(AliHALL)
      50             :  
      51             : //_____________________________________________________________________________
      52          24 : AliHALLv3::AliHALLv3() : fNewShield24(0), fRefVolumeId(-1), fScoring(0), fRackShield(0)
      53          60 : {
      54             :   //
      55             :   // Default constructor for the experimental Hall
      56             :   //
      57          24 : }
      58             :  
      59             : //_____________________________________________________________________________
      60             : AliHALLv3::AliHALLv3(const char *name, const char *title)
      61           2 :   : AliHALL(name,title), fNewShield24(0), fRefVolumeId(-1), fScoring(0), fRackShield(0)
      62           5 : {
      63             :   //
      64             :   // Standard constructor for the experimental Hall
      65             :   //
      66             : 
      67           2 : }
      68             :  
      69             : //_____________________________________________________________________________
      70             : void AliHALLv3::CreateGeometry()
      71             : {
      72             :   //
      73             :   // Create the geometry of the exprimental hall
      74             :   //
      75             :   Float_t r2, dy;
      76             :   Float_t phid, phim, h, r;
      77             :   Float_t w1, dh, am, bm, dl,cm, hm, dr, dx, xl;
      78             :   Float_t hullen;
      79             :   Float_t phi;
      80             : 
      81             :   // The top volume
      82             :   //
      83           2 :   TGeoVolume* top = gGeoManager->GetVolume("ALIC");
      84           1 :   TGeoVolumeAssembly* asHall = new TGeoVolumeAssembly("HALL");
      85             :   
      86             :   // Rotations
      87             :   // rotation by 90 deg in the y-z plane
      88           1 :   TGeoRotation* rot000 = new TGeoRotation("rot000",  90., 0.,180.,  0.,    90., 90.);  
      89           1 :   TGeoRotation* rot001 = new TGeoRotation("rot001", 270., 0., 90., 90.,   180.,  0.);  
      90             : 
      91             :   // Materials
      92           1 :   TGeoMedium* kMedCC     = gGeoManager->GetMedium("HALL_CC_C2");
      93           1 :   TGeoMedium* kMedST     = gGeoManager->GetMedium("HALL_STST_C2");
      94           1 :   TGeoMedium* kMedAir    = gGeoManager->GetMedium("HALL_AIR_C2");
      95           1 :   TGeoMedium* kMedFe     = gGeoManager->GetMedium("HALL_FE_C2");
      96             :   
      97             :   // Floor thickness 
      98             :   Float_t dyFloor  =  190.;
      99             :   // Floor width
     100             :   Float_t dxFloor  = 1400.;
     101             :   // Floor level 
     102             :   Float_t  yFloor  = -801.;
     103             :   // Pit centre
     104             :   Float_t  zPit    = 2300.;
     105             :   // Pit radius
     106             :   Float_t  rPit    = 1140.;
     107             :   // Hall end 
     108             :   Float_t  zHall24 = 1700.;
     109             :   Float_t  zHall26 = 1900.;
     110             :     // Overlap between hall and pit radius
     111             :   Float_t oPit = zHall24 - (zPit - rPit);
     112             :   // Length of the L3 floor
     113             :   Float_t dzL3 = 1700.;
     114             :   // Start of hall roof in y
     115             :   Float_t yHall = 500.;
     116             :   // Radius of the hall roof
     117             :   Float_t rHall = 1070.;
     118             :   //
     119             :   Float_t epsBig   = 100.;
     120             :   Float_t epsSmall =   1.;
     121             :   
     122             :   
     123             : 
     124             :   //
     125             :   // RB24/26 Tunnel Floor 
     126             :   r   = 220.;
     127             :   h   = 140.;
     128           1 :   phi = TMath::ACos(h / r);
     129           1 :   xl  = r * TMath::Sin(phi);
     130             :   dr  = 1600.;
     131           1 :   dh  = dr * TMath::Cos(phi);
     132           1 :   dl  = dr * TMath::Sin(phi);
     133           1 :   if (gAlice->GetModule("ZDC") == 0) {
     134             :     //     No ZDC 
     135             :     hullen = 370.;
     136           0 :   } else {
     137             :     
     138             :     //     ZDC is present 
     139             :     hullen = 6520.;
     140             :   }
     141             : 
     142           2 :   TGeoVolume* voHUFL = new TGeoVolume("HUFL",
     143           3 :                                       new TGeoTrd1(xl +dl, xl, hullen, dh / 2.),
     144             :                                       kMedCC);
     145           1 :   r2 = hullen + zHall26;
     146           2 :   asHall->AddNode(voHUFL, 1, new TGeoCombiTrans(70., -100. - dh / 2., -r2 - 0.755, rot000));
     147             : 
     148             :   //
     149             :   // RB24/26 wall 
     150           1 :   phid     = phi * kRaddeg;
     151           2 :   TGeoVolume* voHUWA = new TGeoVolume("HUWA",
     152           3 :                                       new TGeoTubeSeg(r, r+dr, hullen, phid - 90. + 0.002, 270. - phid - 0.002),
     153             :                                       kMedCC);
     154           2 :   asHall->AddNode(voHUWA, 1, new TGeoTranslation(70., 40., -zHall26 - hullen + 0.002 ));
     155             :   //
     156             :   // Air inside tunnel
     157           1 :   TGeoTube* shHUWAT1 = new TGeoTube(0., r, hullen);
     158           1 :   shHUWAT1->SetName("shHUWAT1");
     159             :   //
     160             :   // Space for ZDC
     161           1 :   TGeoBBox*    shHUWAT2 = new TGeoBBox(70., 110., hullen + 20.);
     162           1 :   shHUWAT2->SetName("shHUWAT2");
     163           1 :   TGeoTranslation*   tHUWAT2 = new TGeoTranslation("tHUWAT2", -70., -30., 0.);
     164           1 :   tHUWAT2->RegisterYourself();
     165             : 
     166           1 :   TGeoBBox*    shHUWAT3 = new TGeoBBox(270., 110., hullen + 20.);
     167           1 :   shHUWAT3->SetName("shHUWAT3");
     168           1 :   TGeoTranslation*   tHUWAT3 = new TGeoTranslation("tHUWAT3", 0., -110. - 140., 0.);
     169           1 :   tHUWAT3->RegisterYourself();
     170             :   
     171           1 :   TGeoCompositeShape*  shHUWAT = new TGeoCompositeShape("HUWAT", "(shHUWAT1-shHUWAT2:tHUWAT2)-shHUWAT3:tHUWAT3");
     172           1 :   TGeoVolume* voHUWAT = new TGeoVolume("HUWAT", shHUWAT, kMedAir);
     173           2 :   asHall->AddNode(voHUWAT, 1, new TGeoTranslation(70., 40., -zHall26 - hullen - 0.755));
     174             :   
     175             :   //
     176             :   //  Hall floor 
     177             :   //  RB26 side
     178             :   phid      = 16.197;
     179           1 :   Float_t dzFloor26 = zHall26 - dzL3/2.;
     180           1 :   TGeoBBox* shHHF1 = new TGeoBBox(dxFloor/2. + 470., dyFloor/2., dzFloor26/2. - 0.002);
     181           1 :   shHHF1->SetName("shHHF1");
     182           1 :   TGeoVolume* voHHF1 = new TGeoVolume("HHF1", shHHF1, kMedCC);
     183           2 :   asHall->AddNode(voHHF1, 2, new TGeoTranslation(0., yFloor, -(dzL3/2. + dzFloor26/2.)));
     184             :   // RB24 side
     185           1 :   Float_t dzFloor24 = zHall24 - dzL3/2.;
     186           1 :   TGeoBBox* shHHF41 = new TGeoBBox(dxFloor/2. + 470., dyFloor/2., dzFloor24/2.);
     187           1 :   shHHF41->SetName("shHHF41");
     188           1 :   TGeoTube* shHHF42 = new TGeoTube(0., rPit + epsBig, dyFloor/2.);
     189           1 :   shHHF42->SetName("shHHF42");
     190           1 :   TGeoCombiTrans* trHHF42 = new TGeoCombiTrans("trHHF42", 0., 0., dzFloor24/2. + rPit - oPit, rot000);
     191           1 :   trHHF42->RegisterYourself();
     192             :   
     193           1 :   TGeoCompositeShape*  shHHF4 = new TGeoCompositeShape("HHF4", "shHHF41+shHHF42:trHHF42");
     194           1 :   TGeoVolume* voHHF4 = new TGeoVolume("HHF4", shHHF4, kMedCC);
     195           2 :   asHall->AddNode(voHHF4, 1, new TGeoTranslation(0., yFloor,  dzL3/2. + dzFloor24/2.));
     196             : 
     197             : 
     198             :   //
     199             :   //  Hall side walls 
     200           1 :   Float_t trH1   = (1273.78 - dyFloor)/ 2.;
     201             :   Float_t trBL1  = 207.3;
     202             :   Float_t trTL1  =  50.;
     203           1 :   Float_t trALP1 = TMath::ATan((trBL1 - trTL1) / 2. / trH1) * kRaddeg;
     204           1 :   dx = 1.5 * trBL1 - 0.5 * trTL1 + dxFloor/2. + dyFloor * TMath::Tan(phid * kDegrad);
     205           2 :   TGeoVolume* voHHW11 = new TGeoVolume("HHW11",
     206           4 :                                        new TGeoTrap(dzFloor26/2. - 0.002, 0., 0., 
     207           1 :                                                     trH1, trBL1, trTL1, trALP1, trH1, trBL1, trTL1, trALP1),
     208             :                                        kMedCC);
     209           2 :   TGeoVolume* voHHW12 = new TGeoVolume("HHW12",
     210           3 :                                        new TGeoTrap(dzFloor24/2., 0., 0., 
     211             :                                                     trH1, trBL1, trTL1, trALP1, trH1, trBL1, trTL1, trALP1),
     212             :                                        kMedCC);
     213             :  
     214           1 :   dy = yFloor + dyFloor/2. + trH1;
     215             :   
     216           2 :   asHall->AddNode(voHHW12, 1, new TGeoTranslation( dx, dy,  (dzL3/2. + dzFloor24/2.)));
     217           2 :   asHall->AddNode(voHHW12, 2, new TGeoCombiTrans (-dx, dy,  (dzL3/2. + dzFloor24/2.), rot001));
     218           2 :   asHall->AddNode(voHHW11, 1, new TGeoTranslation( dx, dy, -(dzL3/2. + dzFloor26/2.)));
     219           2 :   asHall->AddNode(voHHW11, 2, new TGeoCombiTrans (-dx, dy, -(dzL3/2. + dzFloor26/2.), rot001));
     220             : 
     221           1 :   Float_t boDY =  (yHall - (yFloor + dyFloor/2.) - 2. * trH1)/ 2.;
     222             :   Float_t dzHall = zHall26 + zHall24;
     223             : 
     224           3 :   TGeoVolume* voHBW1 = new TGeoVolume("HBW1", new TGeoBBox(50., boDY, dzHall / 2. - 0.05), kMedCC);
     225             : 
     226           2 :   asHall->AddNode(voHBW1, 1,  new TGeoTranslation( 1120., yHall - boDY, (zHall24-zHall26)/2.));
     227           2 :   asHall->AddNode(voHBW1, 2,  new TGeoTranslation(-1120., yHall - boDY, (zHall24-zHall26)/2.));
     228             : 
     229             :   //
     230             :   // Slanted wall close to L3 magnet 
     231             :   //
     232             :   phim =  45.;
     233             :   hm   = 790.;
     234           1 :   am   = hm * TMath::Tan(phim / 2. * kDegrad);
     235           1 :   bm   = (hm + 76.) / hm * am;
     236           1 :   cm   = bm * 2. / TMath::Sqrt(2.);
     237           1 :   trH1   =  (1273.78 - cm) / 2. - 0.002;
     238           1 :   trBL1  =  235. - cm * TMath::Tan(phid * kDegrad) / 2.;
     239             :   trTL1  =   50.;
     240           1 :   trALP1 = TMath::ATan((trBL1 - trTL1) / 2. / trH1) * kRaddeg;
     241             : 
     242             :   w1 = trBL1;
     243           1 :   dx = cm * TMath::Tan(phid * kDegrad) + dxFloor/2. + trBL1 * 1.5 - trTL1 * .5;
     244             : 
     245           2 :   TGeoVolume* voHHW2 = new TGeoVolume("HHW2",
     246           4 :                                       new TGeoTrap(dzL3/2. - 0.002, 0., 0., 
     247           1 :                                                    trH1, trBL1, trTL1, trALP1, trH1, trBL1, trTL1, trALP1),
     248             :                                       kMedCC);
     249             : 
     250           1 :   r2 = cm + yFloor - dyFloor/2. + trH1;
     251             : 
     252           2 :   asHall->AddNode(voHHW2, 1, new TGeoTranslation(dx, r2, 0.));
     253           2 :   asHall->AddNode(voHHW2, 2, new TGeoCombiTrans(-dx, r2, 0., rot001));
     254             : 
     255           1 :   trH1   = cm / 2.;
     256           1 :   trBL1  = w1 + cm / 2.;
     257             :   trTL1  = w1;
     258           1 :   trALP1 = TMath::ATan(.5) * kRaddeg;
     259           1 :   dx = 1170. - trBL1 * .5 - trTL1 * .5;
     260             : 
     261           2 :   TGeoVolume* voHHW3 = new TGeoVolume("HHW3",
     262           4 :                                       new TGeoTrap(dzL3/2., 0., 0., 
     263           1 :                                                    trH1, trBL1, trTL1, trALP1, trH1, trBL1, trTL1, trALP1),
     264             :                                       kMedCC);
     265             : 
     266           1 :   r2 = trH1 - 896.;
     267           2 :   asHall->AddNode(voHHW3, 1, new TGeoTranslation( dx, r2, 0.));
     268           2 :   asHall->AddNode(voHHW3, 2, new TGeoCombiTrans (-dx, r2, 0., rot001));
     269             :   //
     270             :   // Floor L3
     271             :   Float_t dyFloorL3  = 76.;
     272           1 :   Float_t dx1FloorL3 = rHall + epsBig - 2. * trBL1;
     273           1 :   Float_t dx2FloorL3 = dx1FloorL3 + TMath::Tan(phim * kDegrad) * dyFloorL3;
     274             :   
     275             :   
     276           2 :   TGeoVolume* voHHF2 = new TGeoVolume("HHF2", 
     277           3 :                                       new TGeoTrd1(dx1FloorL3 - 0.5, dx2FloorL3 - 0.5, dzL3/2., dyFloorL3/2.), 
     278             :                                       kMedCC);
     279             : 
     280           2 :   asHall->AddNode(voHHF2, 1, new TGeoCombiTrans(0., yFloor - dyFloor / 2. + dyFloorL3 / 2. - 0.5,0., rot000));
     281             :   //
     282             :   // Tunnel roof and pit
     283             :   // Roof
     284           1 :   TGeoTubeSeg* shHHC11 = new TGeoTubeSeg(rHall, rHall + 100., dzHall / 2., 0., 180.);
     285           1 :   shHHC11->SetName("shHHC11");
     286             :   // Pit 
     287           1 :   TGeoTube*    shHHC12 = new TGeoTube(rPit, rPit + 100., 1000.);
     288           1 :   shHHC12->SetName("shHHC12");
     289             :   // Pit inside
     290           1 :   TGeoTube*    shHHC13 = new TGeoTube(   0, rPit - epsSmall, 1000.);
     291           1 :   shHHC13->SetName("shHHC13");
     292             :   // Roof inside
     293           1 :   TGeoTubeSeg* shHHC14 = new TGeoTubeSeg(0., rHall, dzHall / 2. + epsBig, 0., 180.);
     294           1 :   shHHC14->SetName("shHHC14");
     295             : 
     296           1 :   TGeoCombiTrans* trHHC = new TGeoCombiTrans("trHHC", 0., 1000., dzHall/2. + rPit - oPit, rot000);
     297           1 :   trHHC->RegisterYourself();
     298           1 :   TGeoCompositeShape*  shHHC1 = new TGeoCompositeShape("HHC1", "shHHC11+shHHC12:trHHC-(shHHC14+shHHC13:trHHC)");
     299           1 :   TGeoVolume* voHHC1 = new TGeoVolume("HHC1", shHHC1, kMedCC);
     300             : 
     301           2 :   asHall->AddNode(voHHC1, 1, new TGeoTranslation(0., yHall, -(zHall26-zHall24)/2.));
     302             : 
     303             : 
     304             :   //
     305             :   // Pit wall ground level
     306           1 :   dy = yFloor + 1206. / 2. + dyFloor/2.;
     307           1 :   TGeoTube* shHHCPW1 = new TGeoTube(rPit, rPit + 100., 1206./2.);
     308           1 :   shHHCPW1->SetName("shHHCPW1");
     309           1 :   TGeoCombiTrans* trHHCPW1 = new TGeoCombiTrans("trHHCPW1", 0., 0., 0., rot000);
     310           1 :   trHHCPW1->RegisterYourself();
     311             : 
     312           1 :   TGeoBBox* shHHCPW2 = new TGeoBBox(rPit + 100., 1206./ 2. + 20., rPit + 100.);
     313           1 :   shHHCPW2->SetName("shHHCPW2");
     314             :   
     315           1 :   TGeoTube* shHHCPW3 = new TGeoTube(0., 60., 60.);
     316           1 :   shHHCPW3->SetName("shHHCPW3");
     317             : 
     318             :   
     319           1 :   TGeoTranslation* trHHCPW2 = new TGeoTranslation("trHHCPW2", 0., 0., -(rPit + 100.) - oPit);
     320           1 :   trHHCPW2->RegisterYourself();
     321             : 
     322           1 :   TGeoTranslation* trHHCPW3 = new TGeoTranslation("trHHCPW3", 0., -dy, rPit + 50.);
     323           1 :   trHHCPW3->RegisterYourself();
     324             : 
     325             :   TGeoCompositeShape*  shHHCPW 
     326           1 :       = new TGeoCompositeShape("HHCPW", "shHHCPW1:trHHCPW1-(shHHCPW2:trHHCPW2+shHHCPW3:trHHCPW3)");
     327           1 :   TGeoVolume* voHHCPW = new TGeoVolume("HHCPW", shHHCPW, kMedCC);
     328             : 
     329           2 :   asHall->AddNode(voHHCPW, 1, new TGeoTranslation(0., dy, 2300.));
     330             :   // 
     331             :   // Foundations of the Muon Spectrometer
     332             :   // Drawing ALIP2A_0110
     333             :   //
     334           1 :   TGeoVolumeAssembly* asFMS = new TGeoVolumeAssembly("asFMS");
     335             :   Float_t zFil = -1465.86 - 60.;
     336             :   // Muon Filter Foundation
     337             :   // Pillars
     338             :   dy = 263.54/2.;
     339           1 :   Float_t ys = yFloor + dyFloor / 2.;
     340           3 :   TGeoVolume* voFmsMfPil = new TGeoVolume("FmsMfPil", new TGeoBBox( 50., dy, 165.), kMedCC);
     341           1 :   ys += dy;
     342           2 :   asFMS->AddNode(voFmsMfPil, 1, new TGeoTranslation(-330. + 50., ys, zFil + 165. - 90.));
     343           2 :   asFMS->AddNode(voFmsMfPil, 2, new TGeoTranslation( 330. - 50., ys, zFil + 165  - 90.));
     344             :   //
     345             :   // Transverse bars
     346           1 :   ys += dy;
     347             :   dy = 91.32/2.;
     348           1 :   ys += dy;
     349           3 :   TGeoVolume* voFmsMfTb1 = new TGeoVolume("FmsMfTb1", new TGeoBBox(330., dy,  60.), kMedCC);
     350           2 :   asFMS->AddNode(voFmsMfTb1, 1, new TGeoTranslation(0., ys, zFil));
     351           1 :   ys += dy;
     352             :   dy = 41.14/2.;
     353           1 :   ys += dy;
     354           3 :   TGeoVolume* voFmsMfTb2 = new TGeoVolume("FmsMfTb2", new TGeoBBox(330., dy,  60.), kMedCC);
     355           2 :   asFMS->AddNode(voFmsMfTb2, 1, new TGeoTranslation(0., ys, zFil));
     356             :   //
     357             :   // Dipole foundation
     358             :   ys = yFloor + dyFloor / 2.;
     359             :   dy = (263.54 - 6.2)/2.;
     360           1 :   ys += dy;
     361           3 :   TGeoVolume* voFmsDf1 = new TGeoVolume("FmsDf1", new TGeoBBox(370., dy,  448.0 / 2.), kMedCC);
     362           2 :   asFMS->AddNode(voFmsDf1, 1, new TGeoTranslation(0., ys, zFil + 240. + 224.));
     363           3 :   TGeoVolume* voFmsDf2 = new TGeoVolume("FmsDf2", new TGeoBBox(370., (263.54 + 110.)/2.,  112.0 / 2.), kMedCC);
     364           2 :   asFMS->AddNode(voFmsDf2, 1, new TGeoTranslation(0., ys - 110./2., zFil + 688. + 56.));
     365             : 
     366             :   //
     367             :   // Shielding in front of L3 magnet in PX24 and UX25
     368             :   // Drawing ALIP2I__0016
     369             :   //
     370             : 
     371           1 :   TGeoVolumeAssembly* asShRb24 = new TGeoVolumeAssembly("ShRb24");
     372             :   //
     373             :   // Side walls 
     374             :   // start 7450 from IP
     375           3 :   TGeoVolume* voShRb24Sw = new TGeoVolume("ShRb24Sw", new TGeoBBox(80., 420., 520.), kMedCC);
     376           2 :   asShRb24->AddNode(voShRb24Sw, 1, new TGeoTranslation(+315, -420. + 140., 0.));
     377           2 :   asShRb24->AddNode(voShRb24Sw, 2, new TGeoTranslation(-315, -420. + 140., 0.));
     378             :   //
     379             :   // Roof
     380           3 :   TGeoVolume* voShRb24Ro = new TGeoVolume("ShRb24Ro", new TGeoBBox(395., 80., 520.), kMedCC);
     381           2 :   asShRb24->AddNode(voShRb24Ro, 1, new TGeoTranslation(0., +80. + 140., 0.));
     382             :   //
     383             :   // Concrete Plug
     384           1 :   TGeoBBox* shShRb24Pl1 = new TGeoBBox(235., 140., 40.);
     385           1 :   shShRb24Pl1->SetName("ShRb24Pl1");
     386             :   // Steel Plug
     387           1 :   TGeoBBox* shShRb24Pl4 = new TGeoBBox(15., 20., 40.);
     388           1 :   shShRb24Pl4->SetName("ShRb24Pl4");
     389             : 
     390           1 :   TGeoBBox* shShRb24Pl41 = new TGeoBBox(15., 20., 45.);
     391           1 :   shShRb24Pl41->SetName("ShRb24Pl41");
     392             :   
     393             :   //
     394             :   // Opening for beam pipe
     395             :   Float_t dxShRb24Pl = 14.5;
     396             :   Float_t dyShRb24Pl = 20.0;
     397           1 :   if (fNewShield24) {
     398             :     dxShRb24Pl = 6.;
     399             :     dyShRb24Pl = 6.;
     400           0 :   }
     401           1 :   TGeoBBox* shShRb24Pl2 = new TGeoBBox(dxShRb24Pl, dyShRb24Pl, 60.);
     402           1 :   shShRb24Pl2->SetName("ShRb24Pl2");
     403             :   //
     404             :   // Opening for tubes
     405           1 :   TGeoBBox* shShRb24Pl3 = new TGeoBBox(20., 60., 60.);
     406           1 :   shShRb24Pl3->SetName("ShRb24Pl3");
     407             : 
     408           1 :   TGeoTranslation* trPl3 = new TGeoTranslation("trPl3", +235. -90., 80., 0.);
     409           1 :   trPl3->RegisterYourself();
     410             : 
     411           1 :   TGeoTranslation* trPl4 = new TGeoTranslation("trPl4", 0., -6., 0.);
     412           1 :   trPl4->RegisterYourself();
     413           1 :   TGeoTranslation* trPl5 = new TGeoTranslation("trPl5", 0., +6., 0.);
     414           1 :   trPl5->RegisterYourself();
     415             : 
     416             :   TGeoCompositeShape*  shRb24Pl   = 0;
     417             :   TGeoCompositeShape*  shRb24PlSS = 0;
     418           2 :   if (!fNewShield24) {
     419           1 :     shRb24Pl = new TGeoCompositeShape("Rb24Pl", "ShRb24Pl1-ShRb24Pl2:trPl4-ShRb24Pl3:trPl3");
     420           1 :   } else {
     421           1 :     shRb24Pl   = new TGeoCompositeShape("Rb24Pl",   "ShRb24Pl1-(ShRb24Pl41:trPl4+ShRb24Pl3:trPl3)");
     422           0 :     shRb24PlSS = new TGeoCompositeShape("Rb24PlSS", "ShRb24Pl4-ShRb24Pl2:trPl5");
     423             :   }
     424             : 
     425           1 :   TGeoVolume* voRb24Pl = new TGeoVolume("Rb24Pl", shRb24Pl, kMedCC);
     426             : 
     427           2 :   asShRb24->AddNode(voRb24Pl, 1, new TGeoTranslation(0., 0., 520. - 40.));
     428           1 :   if (fNewShield24) {
     429           0 :     TGeoVolume* voRb24PlSS = new TGeoVolume("Rb24PlSS", shRb24PlSS, kMedST);
     430           0 :     asShRb24->AddNode(voRb24PlSS, 1, new TGeoTranslation(0., -6., 520. - 40.));
     431           0 :    }
     432             : 
     433             : 
     434             :   //
     435             :   // Concrete platform and shielding PX24
     436             :   // Drawing LHCJUX 250014
     437             :   //
     438           1 :   TGeoVolumeAssembly* asShPx24 = new TGeoVolumeAssembly("ShPx24");
     439             :   // Platform
     440           3 :   TGeoVolume* voShPx24Pl = new TGeoVolume("ShPx24Pl", new TGeoBBox(1613.5/2., 120./2., 1205./2.), kMedCC);
     441           2 :   asShPx24->AddNode(voShPx24Pl, 1, new TGeoTranslation(55., -140. - 60., 0.));
     442             :   // Pillars
     443           3 :   TGeoVolume* voShPx24Pi = new TGeoVolume("ShPx24Pi", new TGeoBBox(160./2., 440./2., 40/2.), kMedCC);
     444           2 :   asShPx24->AddNode(voShPx24Pi, 1, new TGeoTranslation(-180. - 80., -220. -260.,  1205./2. - 20.));
     445           2 :   asShPx24->AddNode(voShPx24Pi, 2, new TGeoTranslation(+290. + 80., -220. -260.,  1205./2. - 20.));
     446           2 :   asShPx24->AddNode(voShPx24Pi, 3, new TGeoTranslation(-180. - 80., -220. -260., -1205./2. + 20. + 120.));
     447           2 :   asShPx24->AddNode(voShPx24Pi, 4, new TGeoTranslation(+290. + 80., -220. -260., -1205./2. + 20. + 120.));
     448           2 :   asShPx24->AddNode(voShPx24Pi, 5, new TGeoTranslation(-180. - 80., -220. -260., -1205./2. - 20. + 480.));
     449           2 :   asShPx24->AddNode(voShPx24Pi, 6, new TGeoTranslation(+290. + 80., -220. -260., -1205./2. - 20. + 480.));
     450           2 :   asShPx24->AddNode(voShPx24Pi, 7, new TGeoTranslation(-180. - 80., -220. -260., -1205./2. - 20. + 800.));
     451           2 :   asShPx24->AddNode(voShPx24Pi, 8, new TGeoTranslation(+290. + 80., -220. -260., -1205./2. - 20. + 800.));
     452             :   // Side Walls 
     453           3 :   TGeoVolume* voShPx24Sw = new TGeoVolume("ShPx24Sw", new TGeoBBox(160./2., 280./2., 1205./2.), kMedCC);
     454           2 :   asShPx24->AddNode(voShPx24Sw, 1, new TGeoTranslation(-180, 0., 0.));
     455           2 :   asShPx24->AddNode(voShPx24Sw, 2, new TGeoTranslation(+290, 0., 0.));
     456             :   // Roof
     457           3 :   TGeoVolume* voShPx24Ro = new TGeoVolume("ShPx24Ro", new TGeoBBox(630./2., 160./2., 1205./2.), kMedCC);
     458           2 :   asShPx24->AddNode(voShPx24Ro, 1, new TGeoTranslation(55., 80.+ 140., 0.));
     459           2 :   asHall->AddNode(asShRb24, 1, new TGeoTranslation(0., 0., +745. + 520.));
     460           2 :   asHall->AddNode(asShPx24, 1, new TGeoTranslation(0., 0., +745. + 1040. + 1205./ 2.));
     461             :   // Stainless Steel Plug 80 cm thick
     462           1 :   TGeoBBox* shShPx24Pl1 = new TGeoBBox(155., 140., 40.);
     463           1 :   shShPx24Pl1->SetName("ShPx24Pl1");
     464             :   // Opening for beam pipe
     465             :   Float_t dxPx24Pl2 =  9.5;
     466             :   Float_t dyPx24Pl2 = 14.0;
     467             :   // Option for new shielding closer to the beam pipe
     468           1 :   if (fNewShield24) {
     469             :     dxPx24Pl2 = 6.;
     470             :     dyPx24Pl2 = 6.;
     471           0 :   }
     472             :   //
     473           1 :   TGeoBBox* shShPx24Pl2 = new TGeoBBox(dxPx24Pl2, dyPx24Pl2, 60.);
     474           1 :   shShPx24Pl2->SetName("ShPx24Pl2");
     475           1 :   TGeoTranslation* trPl2  = new TGeoTranslation("trPl2",  -55., 0., 0.);
     476           1 :   trPl2->RegisterYourself();
     477             : 
     478           1 :   TGeoCompositeShape*  shPx24Pl = new TGeoCompositeShape("Px24Pl", "ShPx24Pl1-ShPx24Pl2:trPl2");
     479           1 :   TGeoVolume* voPx24Pl = new TGeoVolume("Px24Pl", shPx24Pl, kMedST);
     480           2 :   asShPx24->AddNode(voPx24Pl, 1, new TGeoTranslation(55., 0., -1205./2. + 40.));
     481           2 :   asHall->AddNode(asFMS, 1, new TGeoTranslation(0.,  0., 0.));
     482             : 
     483             :   //
     484             :   // Scoring plane for beam background simulations
     485             :   //
     486           3 :   TGeoVolume* voRB24Scoring = new TGeoVolume("RB24Scoring", new TGeoTube(4.3, 300., 1.), kMedAir);
     487           2 :   asHall->AddNode(voRB24Scoring, 1, new TGeoTranslation(0., 0., 735.));
     488             :   //
     489             :   // Extra shielding in front of racks
     490             :   //
     491           1 :   if (fRackShield) {
     492           0 :     TGeoVolume* voRackShield = new TGeoVolume("RackShield", new TGeoBBox(30., 125., 50.), kMedFe);
     493           0 :     asHall->AddNode(voRackShield, 1, new TGeoTranslation(85., -495., 1726.));
     494           0 :   }
     495             :   //
     496           1 :   top->AddNode(asHall, 1, gGeoIdentity);
     497             :   
     498           1 : }
     499             : 
     500             : void AliHALLv3::Init()
     501             : {
     502             :   //
     503             :   // Initialise the module after the geometry has been defined
     504             :   //
     505           2 :     if(AliLog::GetGlobalDebugLevel()>0) {
     506           0 :         printf("%s: **************************************"
     507             :                " HALL "
     508           0 :                "**************************************\n",ClassName());
     509           0 :         printf("\n%s:      Version 3 of HALL initialised\n\n",ClassName());
     510           0 :         printf("%s: **************************************"
     511             :                " HALL "
     512           0 :                "**************************************\n",ClassName());
     513           0 :     }
     514             : //
     515             : // The reference volume id
     516           1 :     fRefVolumeId = TVirtualMC::GetMC()->VolId("RB24Scoring");
     517           1 : }
     518             : 
     519             : void AliHALLv3::StepManager()
     520             : {
     521             : //
     522             : // Stepmanager of AliHALLv2
     523             : // Used for recording of reference tracks entering scoring plane
     524             : //
     525      259276 :   if (!fScoring) return;
     526           0 :   Int_t   copy, id;
     527             :   
     528             :   //
     529             :   // Only charged tracks
     530           0 :   if( !(TVirtualMC::GetMC()->TrackCharge()) ) return; 
     531             :   //
     532             :   // Only tracks entering mother volume
     533             :   // 
     534             : 
     535           0 :   id=TVirtualMC::GetMC()->CurrentVolID(copy);
     536             : 
     537           0 :   if ((id != fRefVolumeId))   return;
     538           0 :   if(!TVirtualMC::GetMC()->IsTrackEntering()) return;
     539             :   //
     540             :   // Add the reference track
     541             :   //
     542           0 :   AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kHALL);
     543      129638 : }
     544             : 

Generated by: LCOV version 1.11