1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //_________________________________________________________________________
19 // Geometry class for EMCAL : singleton
20 // EMCAL consists of a shell of Pb
22 //*-- Author: Yves Schutz (SUBATECH)
24 // --- ROOT system ---
26 // --- Standard library ---
30 // --- AliRoot header files ---
32 #include "AliEMCALGeometry.h"
35 ClassImp(AliEMCALGeometry) ;
37 AliEMCALGeometry * AliEMCALGeometry::fgGeom = 0 ;
38 Bool_t AliEMCALGeometry::fgInit = kFALSE ;
40 //____________________________________________________________________________
41 AliEMCALGeometry::~AliEMCALGeometry(void)
47 //____________________________________________________________________________
49 void AliEMCALGeometry::Init(void)
51 // Initializes the EMCAL parameters
62 fShellThickness = 50.0 ;
64 fEnvelop[0] = fIPDistance ;
65 fEnvelop[1] = fIPDistance + fShellThickness ;
66 fEnvelop[2] = fZLength ;
77 //____________________________________________________________________________
78 AliEMCALGeometry * AliEMCALGeometry::GetInstance()
80 // Returns the pointer of the unique instance
81 return (AliEMCALGeometry *) fgGeom ;
84 //____________________________________________________________________________
85 AliEMCALGeometry * AliEMCALGeometry::GetInstance(const Text_t* name, const Text_t* title)
87 // Returns the pointer of the unique instance
88 AliEMCALGeometry * rv = 0 ;
90 if ( strcmp(name,"") == 0 )
93 fgGeom = new AliEMCALGeometry(name, title) ;
95 rv = (AliEMCALGeometry * ) fgGeom ;
104 if ( strcmp(fgGeom->GetName(), name) != 0 ) {
105 cout << "AliEMCALGeometry <E> : current geometry is " << fgGeom->GetName() << endl
106 << " you cannot call " << name << endl ;
109 rv = (AliEMCALGeometry *) fgGeom ;