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 GetMisalShift(const Int_t i) const {
41 if(i < 15 ){return fMisalShift[i]; }
42 else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)); return 0.;}
44 Float_t *GetMisalShiftArray() {return fMisalShift; }
46 void SetMisalShift(const Int_t i, const Float_t shift) {
47 if(i < 15 ){fMisalShift[i] = shift; }
48 else { AliInfo(Form("Index %d larger than 15, do nothing\n",i));}
50 void SetMisalShiftArray(Float_t * misal)
51 { for(Int_t i = 0; i < 15; i++)fMisalShift[i] = misal[i]; }
55 Float_t CorrectClusterEnergyLinearity(AliVCluster* clu);
57 Float_t GetNonLinearityParam(const Int_t i) const {
58 if(i < 6 ){return fNonLinearityParams[i]; }
59 else { AliInfo(Form("Index %d larger than 6, do nothing\n",i)); return 0.;}
61 void SetNonLinearityParam(const Int_t i, const Float_t param) {
62 if(i < 6 ){fNonLinearityParams[i] = param; }
63 else { AliInfo(Form("Index %d larger than 6, do nothing\n",i));}
66 Int_t GetNonLinearityFunction() const {return fNonLinearityFunction;}
67 void SetNonLinearityFunction(Int_t fun) {fNonLinearityFunction = fun ;}
69 void Print(const Option_t*) const;
73 Float_t fMisalShift[15]; // Shift parameters
74 Int_t fNonLinearityFunction; // Non linearity function choice
75 Float_t fNonLinearityParams[6]; // Parameters for the non linearity function
77 ClassDef(AliEMCALRecoUtils, 1)
81 #endif // ALIEMCALRECOUTILS_H