Ion pump and bellows moved out by 15 cm to make space for forward
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALGeometry.cxx
CommitLineData
2012850d 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// Geometry class for EMCAL : singleton
20// EMCAL consists of a shell of Pb
21//
22//*-- Author: Yves Schutz (SUBATECH)
23
24// --- ROOT system ---
25
26// --- Standard library ---
27
28#include <iostream.h>
29
30// --- AliRoot header files ---
31
32#include "AliEMCALGeometry.h"
33#include "AliConst.h"
34
35ClassImp(AliEMCALGeometry) ;
36
37AliEMCALGeometry * AliEMCALGeometry::fgGeom = 0 ;
38Bool_t AliEMCALGeometry::fgInit = kFALSE ;
39
40//____________________________________________________________________________
41AliEMCALGeometry::~AliEMCALGeometry(void)
42{
43 // dtor
44
45}
46
47//____________________________________________________________________________
48
49void AliEMCALGeometry::Init(void)
50{
51 // Initializes the EMCAL parameters
52
53 fgInit = kTRUE ;
54
55 // geometry
56 fAirGap = 5.0 ;
57 fArm1PhiMin = 130.0 ;
58 fArm1PhiMax = 210.0 ;
59 fArm2PhiMin = 330.0 ;
60 fArm2PhiMax = 410.0 ;
61 fIPDistance = 423.0 ;
62 fShellThickness = 50.0 ;
63 fZLength = 817.0 ;
64 fEnvelop[0] = fIPDistance ;
65 fEnvelop[1] = fIPDistance + fShellThickness ;
66 fEnvelop[2] = fZLength ;
c23c27b1 67 fGap2Active = 1.0 ;
2012850d 68 // material
69 fAmat = 207.2;
70 fZmat = 82.;
71 fDmat = 5.798167 ;
72 fRmat = 1.261061;
73 fEmat = 23 ;
74
75}
76
77//____________________________________________________________________________
78AliEMCALGeometry * AliEMCALGeometry::GetInstance()
79{
80 // Returns the pointer of the unique instance
81 return (AliEMCALGeometry *) fgGeom ;
82}
83
84//____________________________________________________________________________
85AliEMCALGeometry * AliEMCALGeometry::GetInstance(const Text_t* name, const Text_t* title)
86{
87 // Returns the pointer of the unique instance
88 AliEMCALGeometry * rv = 0 ;
89 if ( fgGeom == 0 ) {
90 if ( strcmp(name,"") == 0 )
91 rv = 0 ;
92 else {
93 fgGeom = new AliEMCALGeometry(name, title) ;
94 if ( fgInit )
95 rv = (AliEMCALGeometry * ) fgGeom ;
96 else {
97 rv = 0 ;
98 delete fgGeom ;
99 fgGeom = 0 ;
100 }
101 }
102 }
103 else {
104 if ( strcmp(fgGeom->GetName(), name) != 0 ) {
105 cout << "AliEMCALGeometry <E> : current geometry is " << fgGeom->GetName() << endl
106 << " you cannot call " << name << endl ;
107 }
108 else
109 rv = (AliEMCALGeometry *) fgGeom ;
110 }
111 return rv ;
112}
113