]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALRecoUtils.h
correcting AliHLTGlobalTriggerDecision::Clear(): using Delete instead of Clear for...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALRecoUtils.h
CommitLineData
d9b3567c 1#ifndef ALIEMCALRECOUTILS_H
2#define ALIEMCALRECOUTILS_H
3
4/* $Id: AliEMCALRecoUtils.h 33808 2009-07-15 09:48:08Z gconesab $ */
5
6///////////////////////////////////////////////////////////////////////////////
7//
8// Class AliEMCALRecoUtils
9// Some utilities to recalculate the cluster position or energy linearity
10//
11//
12// Author: Gustavo Conesa (LPSC- Grenoble)
13///////////////////////////////////////////////////////////////////////////////
14
15//Root includes
16#include "TNamed.h"
17
18//AliRoot includes
19class AliVCluster;
20class AliVCaloCells;
21#include "AliLog.h"
22class AliEMCALGeoUtils;
23
24class AliEMCALRecoUtils : public TNamed {
25
26public:
27
28 AliEMCALRecoUtils();
29 AliEMCALRecoUtils(const AliEMCALRecoUtils&);
30 AliEMCALRecoUtils& operator=(const AliEMCALRecoUtils&);
31 virtual ~AliEMCALRecoUtils() {;}
32
33 enum NonlinearityFunctions{kPi0MC=0,kPi0GammaGamma=1,kPi0GammaConversion=2,kNoCorrection=3};
34
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);
39
2a71e873 40 Float_t GetMisalTransShift(const Int_t i) const {
41 if(i < 15 ){return fMisalTransShift[i]; }
d9b3567c 42 else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)); return 0.;}
43 }
2a71e873 44 Float_t *GetMisalTransShiftArray() {return fMisalTransShift; }
d9b3567c 45
2a71e873 46 void SetMisalTransShift(const Int_t i, const Float_t shift) {
47 if(i < 15 ){fMisalTransShift[i] = shift; }
d9b3567c 48 else { AliInfo(Form("Index %d larger than 15, do nothing\n",i));}
49 }
2a71e873 50 void SetMisalTransShiftArray(Float_t * misal)
51 { for(Int_t i = 0; i < 15; i++)fMisalTransShift[i] = misal[i]; }
d9b3567c 52
2a71e873 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.;}
56 }
57 Float_t *GetMisalRotShiftArray() {return fMisalRotShift; }
58
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));}
62 }
63 void SetMisalRotShiftArray(Float_t * misal)
64 { for(Int_t i = 0; i < 15; i++)fMisalRotShift[i] = misal[i]; }
65
66
67
d9b3567c 68 //Non Linearity
69
70 Float_t CorrectClusterEnergyLinearity(AliVCluster* clu);
71
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.;}
75 }
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));}
79 }
80
81 Int_t GetNonLinearityFunction() const {return fNonLinearityFunction;}
82 void SetNonLinearityFunction(Int_t fun) {fNonLinearityFunction = fun ;}
83
84 void Print(const Option_t*) const;
85
86private:
87
2a71e873 88 Float_t fMisalTransShift[15]; // Shift parameters
89 Float_t fMisalRotShift[15]; // Shift parameters
d9b3567c 90 Int_t fNonLinearityFunction; // Non linearity function choice
91 Float_t fNonLinearityParams[6]; // Parameters for the non linearity function
92
2a71e873 93 ClassDef(AliEMCALRecoUtils, 2)
d9b3567c 94
95};
96
97#endif // ALIEMCALRECOUTILS_H
98
99