]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALRecoUtils.h
Update TOF combinatorial algorithm for event times estimate (F.Noferini)
[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
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.;}
43 }
44 Float_t *GetMisalShiftArray() {return fMisalShift; }
45
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));}
49 }
50 void SetMisalShiftArray(Float_t * misal)
51 { for(Int_t i = 0; i < 15; i++)fMisalShift[i] = misal[i]; }
52
53 //Non Linearity
54
55 Float_t CorrectClusterEnergyLinearity(AliVCluster* clu);
56
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.;}
60 }
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));}
64 }
65
66 Int_t GetNonLinearityFunction() const {return fNonLinearityFunction;}
67 void SetNonLinearityFunction(Int_t fun) {fNonLinearityFunction = fun ;}
68
69 void Print(const Option_t*) const;
70
71private:
72
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
76
77 ClassDef(AliEMCALRecoUtils, 1)
78
79};
80
81#endif // ALIEMCALRECOUTILS_H
82
83