LCOV - code coverage report
Current view: top level - STRUCT - AliHALL.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 38 171 22.2 %
Date: 2016-06-14 17:26:59 Functions: 4 8 50.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             : //                                                                           //
      23             : //Begin_Html
      24             : /*
      25             : <img src="picts/AliHALLClass.gif">
      26             : </pre>
      27             : <br clear=left>
      28             : <font size=+2 color=red>
      29             : <p>The responsible person for this module is
      30             : <a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
      31             : </font>
      32             : <pre>
      33             : */
      34             : //End_Html
      35             : //                                                                           //
      36             : //                                                                           //
      37             : ///////////////////////////////////////////////////////////////////////////////
      38             : 
      39             : #include <TGeoGlobalMagField.h>
      40             : #include <TVirtualMC.h>
      41             : #include <TArrayI.h>
      42             : 
      43             : #include "AliConst.h"
      44             : #include "AliHALL.h"
      45             : #include "AliMagF.h"
      46             : #include "AliRun.h"
      47             : #include "AliLog.h"
      48             :  
      49          12 : ClassImp(AliHALL)
      50             :  
      51             : //_____________________________________________________________________________
      52          12 : AliHALL::AliHALL()
      53          36 : {
      54             :   //
      55             :   // Default constructor for the experimental Hall
      56             :   //
      57          12 : }
      58             :  
      59             : //_____________________________________________________________________________
      60             : AliHALL::AliHALL(const char *name, const char *title)
      61           1 :        : AliModule(name,title)
      62           3 : {
      63             :   //
      64             :   // Standard constructor for the experimental Hall
      65             :   //
      66             :   //PH  SetMarkerColor(7);
      67             :   //PH  SetMarkerStyle(2);
      68             :   //PH  SetMarkerSize(0.4);
      69           1 : }
      70             :  
      71             : //_____________________________________________________________________________
      72             : void AliHALL::CreateGeometry()
      73             : {
      74             :   //
      75             :   // Create the geometry of the exprimental hall
      76             :   //
      77             :   //Begin_Html
      78             :   /*
      79             :     <img src="picts/AliHALLTree.gif">
      80             :   */
      81             :   //End_Html
      82             :   //
      83             :   // If ZDC is not present the experimental hall includes a short
      84             :   // section of the accelerator tunnel
      85             :   //
      86             :   //Begin_Html
      87             :   /*
      88             :     <img src="picts/AliHALLSmall.gif">
      89             :   */
      90             :   //End_Html
      91             :   //
      92             :   // If ZDC is present the experimental hall includes the accelerator
      93             :   // tunnel beyond the ZDC
      94             :   //
      95             :   //Begin_Html
      96             :   /*
      97             :     <img src="picts/AliHALLLarge.gif">
      98             :   */
      99             :   //End_Html
     100             : 
     101             :   
     102             :   Float_t r2;
     103           0 :   Float_t phid, phim, pbox[3], h, r, tspar[5];
     104             :   Float_t w1, dh, am, bm, dl,cm, hm, dr, dx, xl;
     105           0 :   Int_t idrotm[1999];
     106           0 :   Float_t trdpar[4], trapar[11], hullen;
     107             :   Float_t phi;
     108             :   
     109           0 :   Int_t *idtmed = fIdtmed->GetArray()-1899;
     110             :   
     111             :   //     RB24/26 TUNNEL FLOOR 
     112             :   
     113             :   r   = 220.;
     114             :   h   = 140.;
     115           0 :   phi = TMath::ACos(h / r);
     116           0 :   xl  = r * TMath::Sin(phi);
     117             :   dr  = 1600.;
     118           0 :   dh  = dr * TMath::Cos(phi);
     119           0 :   dl  = dr * TMath::Sin(phi);
     120           0 :   if (gAlice->GetModule("ZDC") == 0) {
     121             :     
     122             :     //     No ZDC 
     123             :     hullen = 370.;
     124           0 :   } else {
     125             :     
     126             :     //     ZDC is present 
     127             :     hullen = 6520.;
     128             :   }
     129           0 :   trdpar[0] = xl + dl;
     130           0 :   trdpar[1] = xl;
     131           0 :   trdpar[2] = hullen;
     132           0 :   trdpar[3] = dh / 2.;
     133           0 :   AliMatrix(idrotm[1900], 90., 0., 0., 0., 90., 90.);
     134           0 :   AliMatrix(idrotm[1901], 270., 0., 90., 90., 0., 0.);
     135           0 :   TVirtualMC::GetMC()->Gsvolu("HUFL", "TRD1", idtmed[1956], trdpar, 4);
     136           0 :   r2 = hullen + 1900.;
     137           0 :   TVirtualMC::GetMC()->Gspos("HUFL", 1, "ALIC", 70.,-100-trdpar[3] , -r2, idrotm[1900], "ONLY");
     138             :   
     139             :   //     RB24/26 wall 
     140             :   
     141           0 :   phid     = phi * 57.296;
     142           0 :   tspar[0] = r;
     143           0 :   tspar[1] = r + dr;
     144           0 :   tspar[2] = hullen;
     145           0 :   tspar[3] = phid - 90.;
     146           0 :   tspar[4] = 270. - phid;
     147           0 :   TVirtualMC::GetMC()->Gsvolu("HUWA", "TUBS", idtmed[1956], tspar, 5);
     148           0 :   TVirtualMC::GetMC()->Gspos("HUWA", 1, "ALIC", 70., 40., -1900 - hullen , 0, "ONLY");
     149             :   
     150             : 
     151             :   //     Hall floor 
     152             :   
     153             :   phid      = 16.197;
     154           0 :   trdpar[0] = 700.;
     155           0 :   trdpar[1] = TMath::Tan(phid * kDegrad) * 190. + 700.;
     156           0 :   trdpar[2] = 550.;
     157           0 :   trdpar[3] = 95.;
     158           0 :   TVirtualMC::GetMC()->Gsvolu("HHF1", "TRD1", idtmed[1956], trdpar, 4);
     159           0 :   TVirtualMC::GetMC()->Gspos("HHF1", 1, "ALIC", 0., -801., 1350., idrotm[1900], "ONLY");
     160           0 :   TVirtualMC::GetMC()->Gspos("HHF1", 2, "ALIC", 0., -801.,-1350., idrotm[1900], "ONLY");
     161             :   
     162             :   //     Hall side walls 
     163             :   
     164           0 :   trapar[0] = 550.;
     165           0 :   trapar[1] = 0.;
     166           0 :   trapar[2] = 0.;
     167           0 :   trapar[3] = 1273.78/2;
     168           0 :   trapar[4] = 235.;
     169           0 :   trapar[5] = 50.;
     170           0 :   trapar[6] = TMath::ATan((trapar[4] - trapar[5]) / 2. / trapar[3]) * kRaddeg;
     171           0 :   trapar[7] = trapar[3];
     172           0 :   trapar[8] = trapar[4];
     173           0 :   trapar[9] = trapar[5];
     174           0 :   trapar[10] = trapar[6];
     175           0 :   dx = trapar[4] * 1.5 + 700. - trapar[5] * .5;
     176           0 :   TVirtualMC::GetMC()->Gsvolu("HHW1", "TRAP", idtmed[1956], trapar, 11);
     177           0 :   TVirtualMC::GetMC()->Gspos("HHW1", 1, "ALIC", dx, -896+trapar[3],  1350., 0, "ONLY");
     178           0 :   TVirtualMC::GetMC()->Gspos("HHW1", 2, "ALIC",-dx, -896+trapar[3],  1350., idrotm[1901], "ONLY");
     179           0 :   TVirtualMC::GetMC()->Gspos("HHW1", 3, "ALIC", dx, -896+trapar[3], -1350., 0, "ONLY");
     180           0 :   TVirtualMC::GetMC()->Gspos("HHW1", 4, "ALIC",-dx, -896+trapar[3], -1350., idrotm[1901], "ONLY");
     181           0 :   pbox[0] = 50.;
     182           0 :   pbox[1] = (500. - (trapar[3] * 2. - 896.)) / 2.;
     183           0 :   pbox[2] = 1900.;
     184           0 :   TVirtualMC::GetMC()->Gsvolu("HBW1", "BOX ", idtmed[1956], pbox, 3);
     185           0 :   TVirtualMC::GetMC()->Gspos("HBW1", 1, "ALIC",  1120., 500-pbox[1], 0., 0, "ONLY");
     186           0 :   TVirtualMC::GetMC()->Gspos("HBW1", 2, "ALIC", -1120., 500-pbox[1], 0., 0, "ONLY");
     187             :   
     188             :   //     slanted wall close to L3 magnet 
     189             :   
     190             :   phim = 45.;
     191             :   hm   = 790.;
     192             :   //rm   = hm / TMath::Cos(phim / 2. * kDegrad);
     193           0 :   am   = hm * TMath::Tan(phim / 2. * kDegrad);
     194           0 :   bm   = (hm + 76.) / hm * am;
     195           0 :   cm   = bm * 2. / TMath::Sqrt(2.);
     196           0 :   trapar[0] = 800.;
     197           0 :   trapar[1] = 0.;
     198           0 :   trapar[2] = 0.;
     199           0 :   trapar[3] = (1273.78 - cm) / 2.;
     200           0 :   trapar[4] = 235. - cm * TMath::Tan(phid * kDegrad) / 2.;
     201           0 :   trapar[5] = 50.;
     202           0 :   trapar[6] = TMath::ATan((trapar[4] - trapar[5]) / 2. / trapar[3]) * kRaddeg;
     203           0 :   trapar[7] = trapar[3];
     204           0 :   trapar[8] = trapar[4];
     205           0 :   trapar[9] = trapar[5];
     206           0 :   trapar[10] = trapar[6];
     207           0 :   w1 = trapar[4];
     208           0 :   dx = cm*TMath::Tan(phid * kDegrad) + 700. + trapar[4] * 1.5 - trapar[5] * .5;
     209           0 :   TVirtualMC::GetMC()->Gsvolu("HHW2", "TRAP", idtmed[1956], trapar, 11);
     210           0 :   r2 = cm - 896. + trapar[3];
     211           0 :   TVirtualMC::GetMC()->Gspos("HHW2", 1, "ALIC", dx, r2, 0., 0, "ONLY");
     212           0 :   TVirtualMC::GetMC()->Gspos("HHW2", 2, "ALIC",-dx, r2, 0., idrotm[1901], "ONLY");
     213           0 :   trapar[3]  = cm / 2.;
     214           0 :   trapar[4]  = w1 + cm / 2.;
     215           0 :   trapar[5]  = w1;
     216           0 :   trapar[6]  = TMath::ATan(.5) * kRaddeg;
     217           0 :   trapar[7]  = trapar[3];
     218           0 :   trapar[8]  = trapar[4];
     219           0 :   trapar[9]  = trapar[5];
     220           0 :   trapar[10] = trapar[6];
     221           0 :   dx = 1170. - trapar[4] * .5 - trapar[5] * .5;
     222           0 :   TVirtualMC::GetMC()->Gsvolu("HHW3", "TRAP", idtmed[1956], trapar, 11);
     223           0 :   r2 = trapar[3] - 896.;
     224           0 :   TVirtualMC::GetMC()->Gspos("HHW3", 1, "ALIC", dx, r2, 0., 0, "ONLY");
     225           0 :   TVirtualMC::GetMC()->Gspos("HHW3", 2, "ALIC",-dx, r2, 0., idrotm[1901], "ONLY");
     226             :   
     227             : 
     228           0 :   tspar[0] = 1070.;
     229           0 :   tspar[1] = 1170.;
     230           0 :   tspar[2] = 1900.;
     231           0 :   tspar[3] = 0.;
     232           0 :   tspar[4] = 180.;
     233           0 :   TVirtualMC::GetMC()->Gsvolu("HHC1", "TUBS", idtmed[1956], tspar, 5);
     234           0 :   TVirtualMC::GetMC()->Gspos("HHC1", 1, "ALIC", 0., 500., 0., 0, "ONLY");
     235           0 :   trdpar[0] = 1170 - trapar[4] * 2.;
     236           0 :   trdpar[1] = trdpar[0] + TMath::Tan(phim * kDegrad) * 76.;
     237           0 :   trdpar[2] = 800.;
     238           0 :   trdpar[3] = 38.;
     239           0 :   TVirtualMC::GetMC()->Gsvolu("HHF2", "TRD1", idtmed[1956], trdpar, 4);
     240           0 :   TVirtualMC::GetMC()->Gspos("HHF2", 1, "ALIC", 0., -858., 0., idrotm[1900], "ONLY");
     241             :   
     242             :   //     pillars for working platform 
     243             :   
     244           0 :   pbox[0] = 40.;
     245           0 :   pbox[1] = 96.;
     246           0 :   pbox[2] = 550.;
     247           0 :   TVirtualMC::GetMC()->Gsvolu("HPIL", "BOX ", idtmed[1956], pbox, 3);
     248           0 :   TVirtualMC::GetMC()->Gspos("HPIL", 1, "ALIC", 165.,-706+pbox[1] , -1350., 0, "ONLY");
     249           0 :   TVirtualMC::GetMC()->Gspos("HPIL", 2, "ALIC",-165.,-706+pbox[1] , -1350., 0, "ONLY");
     250             :   
     251             :   //     simple concrete beam shield 
     252             :   
     253           0 :   Float_t ppgon[10];
     254           0 :   ppgon[0] =    45.;
     255           0 :   ppgon[1] =   360.;
     256           0 :   ppgon[2] =     4.;
     257           0 :   ppgon[3] =     2.;
     258           0 :   ppgon[7] =  1800.;
     259           0 :   ppgon[8] =   150.;
     260           0 :   ppgon[9] =   250.;
     261           0 :   ppgon[4] =   720.;
     262           0 :   ppgon[5] =   150.;
     263           0 :   ppgon[6] =   250.;
     264             : 
     265           0 :   TVirtualMC::GetMC()->Gsvolu("HMBS", "PGON", idtmed[1956], ppgon, 10);
     266           0 :   TVirtualMC::GetMC()->Gspos("HMBS", 1, "ALIC", 0., 70., 0., 0, "ONLY");
     267           0 : }
     268             : 
     269             : //_____________________________________________________________________________
     270             : void AliHALL::CreateMaterials()
     271             : {
     272             :   //
     273             :   // Create materials for the experimental hall
     274             :   //
     275             :     
     276             :   Int_t   isxfld = 0;
     277           2 :   Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
     278             :   
     279           1 :   Float_t aconc[10] = { 1.,12.01,15.994,22.99,24.305,26.98,28.086,39.1,40.08,55.85 };
     280           1 :   Float_t zconc[10] = { 1.,6.,8.,11.,12.,13.,14.,19.,20.,26. };
     281           1 :   Float_t wconc[10] = { .01,.001,.529107,.016,.002,.033872,.337021,.013,.044,.014 };
     282             :   
     283           1 :   Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
     284           1 :   Float_t zAir[4]={6.,7.,8.,18.};
     285           1 :   Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
     286             :   Float_t dAir = 1.20479E-3;
     287             : 
     288             : // Steel  
     289           1 :   Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
     290           1 :   Float_t zsteel[4] = { 26.,24.,28.,14. };
     291           1 :   Float_t wsteel[4] = { .715,.18,.1,.005 };
     292             : 
     293             :   Float_t epsil, stmin, deemax, tmaxfd, stemax;
     294             : 
     295             :   
     296           1 :   AliMixture(15, "AIR0$      ", aAir, zAir, dAir, 4, wAir);
     297           1 :   AliMixture(35, "AIR1$      ", aAir, zAir, dAir, 4, wAir);
     298           1 :   AliMixture(55, "AIR2$      ", aAir, zAir, dAir, 4, wAir);
     299             : 
     300           1 :   AliMixture(17, "CONCRETE0$", aconc, zconc, 2.35, 10, wconc);
     301           1 :   AliMixture(37, "CONCRETE1$", aconc, zconc, 2.35, 10, wconc);
     302           1 :   AliMixture(57, "CONCRETE2$", aconc, zconc, 2.35, 10, wconc);
     303             : 
     304             :   //     Stainless Steel 
     305           1 :   AliMixture(10, "STAINLESS STEEL1", asteel, zsteel, 7.88, 4, wsteel);
     306           1 :   AliMixture(30, "STAINLESS STEEL2", asteel, zsteel, 7.88, 4, wsteel);
     307           1 :   AliMixture(50, "STAINLESS STEEL3", asteel, zsteel, 7.88, 4, wsteel);
     308             :   // Iron
     309             :   //
     310           1 :   AliMaterial(52, "IRON", 55.85, 26., 7.87, 1.76, 17.1);
     311             :   
     312             :   
     313             :   // **************** 
     314             :   //     Defines tracking media parameters. 
     315             :   //     Les valeurs sont commentees pour laisser le defaut 
     316             :   //     a GEANT (version 3-21, page CONS200), f.m. 
     317             :   epsil  = .001;  // Tracking precision, 
     318             :   stemax = -1.;   // Maximum displacement for multiple scat 
     319             :   tmaxfd = -20.;  // Maximum angle due to field deflection 
     320             :   deemax = -.3;   // Maximum fractional energy loss, DLS 
     321             :   stmin  = -.8;
     322             :   // *************** 
     323             :   
     324             :   //  Stainless Steel
     325           1 :   AliMedium(10, "STST_C0             ", 10, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
     326           1 :   AliMedium(30, "STST_C1             ", 30, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
     327           1 :   AliMedium(50, "STST_C2             ", 50, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
     328             :   
     329             :   //    Air 
     330             :   
     331           1 :   AliMedium(15, "AIR_C0           ", 15, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
     332           1 :   AliMedium(35, "AIR_C1           ", 35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
     333           1 :   AliMedium(55, "AIR_C2           ", 55, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
     334             :   
     335             :   //    Concrete 
     336             :   
     337           1 :   AliMedium(17, "CC_C0            ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
     338           1 :   AliMedium(37, "CC_C1            ", 37, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
     339           1 :   AliMedium(57, "CC_C2            ", 57, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
     340             : 
     341             :   // Iron
     342           1 :   AliMedium(52, "FE_C2            ", 52, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
     343           1 : }
     344             : 
     345             : //_____________________________________________________________________________
     346             : void AliHALL::Init()
     347             : {
     348             :   //
     349             :   // Initialise the HALL after it has been built
     350             :   //
     351             :   Int_t i;
     352             :   //
     353           0 :   if(AliLog::GetGlobalDebugLevel()>0) {
     354           0 :     printf("\n%s: ",ClassName());
     355           0 :     for(i=0;i<35;i++) printf("*");
     356           0 :     printf(" HALL_INIT ");
     357           0 :     for(i=0;i<35;i++) printf("*");
     358           0 :     printf("\n%s: ",ClassName());
     359             :     //
     360             :     // Here the HALL initialisation code (if any!)
     361           0 :     for(i=0;i<80;i++) printf("*");
     362           0 :     printf("\n");
     363           0 :   }
     364           0 : }
     365             : 

Generated by: LCOV version 1.11