1 #ifndef ALIEMCALRECOUTILS_H
2 #define ALIEMCALRECOUTILS_H
4 /* $Id: AliEMCALRecoUtils.h 33808 2009-07-15 09:48:08Z gconesab $ */
6 ///////////////////////////////////////////////////////////////////////////////
8 // Class AliEMCALRecoUtils
9 // Some utilities to recalculate the cluster position or energy linearity
12 // Author: Gustavo Conesa (LPSC- Grenoble)
13 ///////////////////////////////////////////////////////////////////////////////
22 class AliEMCALGeoUtils;
24 class AliEMCALRecoUtils : public TNamed {
29 AliEMCALRecoUtils(const AliEMCALRecoUtils&);
30 AliEMCALRecoUtils& operator=(const AliEMCALRecoUtils&);
31 virtual ~AliEMCALRecoUtils() {;}
33 enum NonlinearityFunctions{kPi0MC=0,kPi0GammaGamma=1,kPi0GammaConversion=2,kNoCorrection=3};
35 //Position recalculation
36 void RecalculateClusterPosition(AliEMCALGeoUtils *geom, AliVCaloCells* cells, AliVCluster* clu, const Int_t iParticle);
37 void GetMaxEnergyCell(AliEMCALGeoUtils *geom, AliVCaloCells* cells, AliVCluster* clu,
38 Int_t & absId, Int_t& iSupMod, Int_t& ieta, Int_t& iphi);
40 Float_t GetMisalTransShift(const Int_t i) const {
41 if(i < 15 ){return fMisalTransShift[i]; }
42 else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)); return 0.;}
44 Float_t *GetMisalTransShiftArray() {return fMisalTransShift; }
46 void SetMisalTransShift(const Int_t i, const Float_t shift) {
47 if(i < 15 ){fMisalTransShift[i] = shift; }
48 else { AliInfo(Form("Index %d larger than 15, do nothing\n",i));}
50 void SetMisalTransShiftArray(Float_t * misal)
51 { for(Int_t i = 0; i < 15; i++)fMisalTransShift[i] = misal[i]; }
53 Float_t GetMisalRotShift(const Int_t i) const {
54 if(i < 15 ){return fMisalRotShift[i]; }
55 else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)); return 0.;}
57 Float_t *GetMisalRotShiftArray() {return fMisalRotShift; }
59 void SetMisalRotShift(const Int_t i, const Float_t shift) {
60 if(i < 15 ){fMisalRotShift[i] = shift; }
61 else { AliInfo(Form("Index %d larger than 15, do nothing\n",i));}
63 void SetMisalRotShiftArray(Float_t * misal)
64 { for(Int_t i = 0; i < 15; i++)fMisalRotShift[i] = misal[i]; }
70 Float_t CorrectClusterEnergyLinearity(AliVCluster* clu);
72 Float_t GetNonLinearityParam(const Int_t i) const {
73 if(i < 6 ){return fNonLinearityParams[i]; }
74 else { AliInfo(Form("Index %d larger than 6, do nothing\n",i)); return 0.;}
76 void SetNonLinearityParam(const Int_t i, const Float_t param) {
77 if(i < 6 ){fNonLinearityParams[i] = param; }
78 else { AliInfo(Form("Index %d larger than 6, do nothing\n",i));}
81 Int_t GetNonLinearityFunction() const {return fNonLinearityFunction;}
82 void SetNonLinearityFunction(Int_t fun) {fNonLinearityFunction = fun ;}
84 void Print(const Option_t*) const;
88 Float_t fMisalTransShift[15]; // Shift parameters
89 Float_t fMisalRotShift[15]; // Shift parameters
90 Int_t fNonLinearityFunction; // Non linearity function choice
91 Float_t fNonLinearityParams[6]; // Parameters for the non linearity function
93 ClassDef(AliEMCALRecoUtils, 2)
97 #endif // ALIEMCALRECOUTILS_H