]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSGeometry.h
Several nonlinearity corrections implemented
[u/mrichter/AliRoot.git] / PHOS / AliPHOSGeometry.h
CommitLineData
daa2ae2f 1#ifndef ALIPHOSGEOMETRY_H
2#define ALIPHOSGEOMETRY_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6ad0bfa0 6/* $Id$ */
7
b2a60966 8//_________________________________________________________________________
a3dfe79c 9// Geometry class for PHOS : singleton
10// PHOS consists of the electromagnetic calorimeter (EMCA)
11// and a charged particle veto either in the Subatech's version (PPSD)
12// or in the IHEP's one (CPV).
13// The EMCA/PPSD/CPV modules are parametrized so that any configuration
14// can be easily implemented
15// The title is used to identify the version of CPV used.
16//
b2a60966 17//*-- Author: Yves Schutz (SUBATECH)
d15a28e7 18
19// --- ROOT system ---
20
d15a28e7 21// --- AliRoot header files ---
22
bcc9e89e 23#include "AliPHOSGeoUtils.h"
eb92d866 24#include "AliPHOSEMCAGeometry.h"
25#include "AliPHOSCPVGeometry.h"
ed19b2e1 26#include "AliPHOSSupportGeometry.h"
bcc9e89e 27#include <TMatrixFfwd.h>
daa2ae2f 28
bcc9e89e 29class AliRecPoint ;
9ee9f78d 30class AliPHOSRecPoint;
31class TVector3;
9f616d61 32
bcc9e89e 33class AliPHOSGeometry : public AliPHOSGeoUtils {
daa2ae2f 34
35public:
36
e957fea8 37 AliPHOSGeometry() ;
3663622c 38 AliPHOSGeometry(const AliPHOSGeometry & geom) ;
6c370def 39
daa2ae2f 40 virtual ~AliPHOSGeometry(void) ;
282c5906 41 static AliPHOSGeometry * GetInstance(const Text_t* name, const Text_t* title="") ;
daa2ae2f 42 static AliPHOSGeometry * GetInstance() ;
bcc9e89e 43
ccb05665 44 virtual void GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TMatrixF & /* gmat */) const
45 {GetGlobal(RecPoint,gpos); }
1c9d8212 46 virtual void GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos) const ;
9ee9f78d 47 virtual void GetGlobalPHOS(const AliPHOSRecPoint* RecPoint, TVector3 & gpos) const ;
48 virtual void GetGlobalPHOS(const AliPHOSRecPoint* RecPoint, TVector3 & gpos, TMatrixF & /* gmat */) const
49 {GetGlobalPHOS(RecPoint,gpos); }
daa2ae2f 50
3663622c 51 AliPHOSGeometry & operator = (const AliPHOSGeometry & /*rvalue*/) {
52 Fatal("operator =", "not implemented") ;
53 return *this ;
54 }
cf0c2bc1 55
88cb7938 56
710f859a 57 Bool_t IsInitialized(void) const { return fgInit ; }
c198e326 58
52a36ffd 59 // Return general PHOS parameters
710f859a 60 Int_t GetNModules(void) const { return fNModules ; }
61 Float_t GetPHOSAngle(Int_t index) const { return fPHOSAngle[index-1] ; }
62 Float_t* GetPHOSParams(void) { return fPHOSParams;} //Half-sizes of PHOS trapecoid
63 Float_t GetIPtoUpperCPVsurface(void) const { return fIPtoUpperCPVsurface ; }
64 Float_t GetOuterBoxSize(Int_t index) const { return 2.*fPHOSParams[index]; }
65 Float_t GetCrystalSize(Int_t index) const { return fGeometryEMCA->GetCrystalSize(index) ; }
07ca2d72 66 Float_t GetCellStep(void) const { return 2.*fGeometryEMCA->GetAirCellHalfSize()[0];}
710f859a 67
05d33a3d 68 Float_t GetModuleCenter(Int_t module, Int_t axis) const {
69 return fModuleCenter[module][axis];}
70 Float_t GetModuleAngle(Int_t module, Int_t axis, Int_t angle) const {
71 return fModuleAngle[module][axis][angle];}
72
73
ccb05665 74 // Return ideal EMCA geometry parameters
710f859a 75
76 AliPHOSEMCAGeometry * GetEMCAGeometry() const {return fGeometryEMCA ;}
77 Float_t GetIPtoCrystalSurface(void) const { return fGeometryEMCA->GetIPtoCrystalSurface() ; }
78 Float_t GetIPtoOuterCoverDistance(void) const { return fGeometryEMCA->GetIPtoOuterCoverDistance() ; }
79 Int_t GetNPhi(void) const { return fGeometryEMCA->GetNPhi() ; }
80 Int_t GetNZ(void) const { return fGeometryEMCA->GetNZ() ; }
81 Int_t GetNCristalsInModule(void) const { return fGeometryEMCA->GetNPhi() * fGeometryEMCA->GetNZ() ; }
82
ccb05665 83 // Return ideal CPV geometry parameters
ed4205d8 84 Int_t GetNumberOfCPVLayers(void) const { return fGeometryCPV ->GetNumberOfCPVLayers(); }
ed4205d8 85 Float_t GetCPVActiveSize(Int_t index) const { return fGeometryCPV->GetCPVActiveSize(index); }
86 Int_t GetNumberOfCPVChipsPhi(void) const { return fGeometryCPV->GetNumberOfCPVChipsPhi(); }
87 Int_t GetNumberOfCPVChipsZ(void) const { return fGeometryCPV->GetNumberOfCPVChipsZ(); }
88 Int_t GetNumberOfCPVPadsPhi(void) const { return fGeometryCPV->GetNumberOfCPVPadsPhi(); }
89 Int_t GetNumberOfCPVPadsZ(void) const { return fGeometryCPV->GetNumberOfCPVPadsZ(); }
90 Float_t GetPadSizePhi(void) const { return fGeometryCPV->GetCPVPadSizePhi(); }
91 Float_t GetPadSizeZ(void) const { return fGeometryCPV->GetCPVPadSizeZ(); }
92 Float_t GetGassiplexChipSize(Int_t index) const { return fGeometryCPV->GetGassiplexChipSize(index); }
93 Float_t GetCPVGasThickness(void) const { return fGeometryCPV->GetCPVGasThickness(); }
94 Float_t GetCPVTextoliteThickness(void) const { return fGeometryCPV->GetCPVTextoliteThickness(); }
95 Float_t GetCPVCuNiFoilThickness(void) const { return fGeometryCPV->GetCPVCuNiFoilThickness(); }
96 Float_t GetFTPosition(Int_t index) const { return fGeometryCPV->GetFTPosition(index); }
97 Float_t GetCPVFrameSize(Int_t index) const { return fGeometryCPV->GetCPVFrameSize(index); }
710f859a 98 Float_t GetCPVBoxSize(Int_t index) const { return fGeometryCPV ->GetCPVBoxSize(index); }
99 Float_t GetIPtoCPVDistance(void) const { return GetIPtoOuterCoverDistance() -
100 GetCPVBoxSize(1) - 1.0; }
ccb05665 101
102
103 // Return real CPV geometry parameters
7b51037f 104 void GetModuleCenter(TVector3& center, const char *det, Int_t module) const;
52a36ffd 105
710f859a 106 // Return PHOS' support geometry parameters
ed19b2e1 107
108 Float_t GetRailOuterSize(Int_t index) const { return fGeometrySUPP->GetRailOuterSize(index); }
109 Float_t GetRailPart1 (Int_t index) const { return fGeometrySUPP->GetRailPart1 (index); }
110 Float_t GetRailPart2 (Int_t index) const { return fGeometrySUPP->GetRailPart2 (index); }
111 Float_t GetRailPart3 (Int_t index) const { return fGeometrySUPP->GetRailPart3 (index); }
112 Float_t GetRailPos (Int_t index) const { return fGeometrySUPP->GetRailPos (index); }
710f859a 113 Float_t GetRailLength (void) const { return fGeometrySUPP->GetRailLength (); }
114 Float_t GetDistanceBetwRails(void) const { return fGeometrySUPP->GetDistanceBetwRails(); }
115 Float_t GetRailsDistanceFromIP(void) const { return fGeometrySUPP->GetRailsDistanceFromIP();}
ed19b2e1 116 Float_t GetRailRoadSize (Int_t index) const { return fGeometrySUPP->GetRailRoadSize (index); }
710f859a 117 Float_t GetCradleWallThickness(void) const { return fGeometrySUPP->GetCradleWallThickness();}
ed19b2e1 118 Float_t GetCradleWall (Int_t index) const { return fGeometrySUPP->GetCradleWall (index); }
119 Float_t GetCradleWheel (Int_t index) const { return fGeometrySUPP->GetCradleWheel (index); }
05d33a3d 120 void Init(void) ; // steering method for PHOS and PPSD/CPV
121
122
6c370def 123protected:
124
3663622c 125 AliPHOSGeometry(const Text_t* name, const Text_t* title="") ;
daa2ae2f 126private:
bcc9e89e 127 void SetPHOSAngles(); // calculates the PHOS modules PHI angle
128
6c370def 129
ed4205d8 130 Float_t fAngle ; // Position angles between modules
eb92d866 131 Float_t *fPHOSAngle ; //[fNModules] Position angles of modules
710f859a 132 Float_t fPHOSParams[4] ; // Half-sizes of PHOS trapecoid
133 Float_t fIPtoUpperCPVsurface; // Minimal distance from IP to PHOS
8e20650f 134 Float_t fCrystalShift ; //Distance from crystal center to front surface
135 Float_t fCryCellShift ; //Distance from crystal center to front surface
eb92d866 136 TObjArray *fRotMatrixArray ; // Liste of rotation matrices (one per phos module)
05d33a3d 137 Float_t fModuleCenter[5][3]; // xyz-position of the module center
138 Float_t fModuleAngle[5][3][2]; // polar and azymuth angles for 3 axes of modules
52a36ffd 139
daa2ae2f 140
88714635 141 static AliPHOSGeometry * fgGeom ; // pointer to the unique instance of the singleton
52a36ffd 142 static Bool_t fgInit ; // Tells if geometry has been succesfully set up
daa2ae2f 143
bcc9e89e 144 ClassDef(AliPHOSGeometry,3) // PHOS geometry class
daa2ae2f 145
146} ;
147
148#endif // AliPHOSGEOMETRY_H