Add possibility to recalculate EMCAL distance to bad channels
[u/mrichter/AliRoot.git] / PWG4 / CaloCalib / AliAnalysisTaskEMCALPi0CalibSelection.h
CommitLineData
375cec9b 1#ifndef ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
2#define ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7//---------------------------------------------------------------------------//
8// Fill histograms with two-cluster invariant mass //
9// using calibration coefficients of the previous iteration. //
10//---------------------------------------------------------------------------//
11
12// Root includes
13class TH1F;
6eb2a715 14#include "TH2I.h"
15#include "TObjArray.h"
375cec9b 16
17// AliRoot includes
18#include "AliAnalysisTaskSE.h"
19class AliEMCALGeometry;
6eb2a715 20//class AliEMCALCalibData ;
375cec9b 21#include "AliEMCALGeoParams.h"
9584c261 22class AliEMCALRecoUtils;
375cec9b 23
24class AliAnalysisTaskEMCALPi0CalibSelection : public AliAnalysisTaskSE
25{
26public:
27
375cec9b 28 AliAnalysisTaskEMCALPi0CalibSelection(const char* name);
375cec9b 29 virtual ~AliAnalysisTaskEMCALPi0CalibSelection();
30
9584c261 31private:
32
33 AliAnalysisTaskEMCALPi0CalibSelection(const AliAnalysisTaskEMCALPi0CalibSelection&);
34 AliAnalysisTaskEMCALPi0CalibSelection& operator=(const AliAnalysisTaskEMCALPi0CalibSelection&);
35
36public:
37
375cec9b 38 // Implementation of interface methods
39 virtual void UserCreateOutputObjects();
40 virtual void UserExec(Option_t * opt);
6eb2a715 41 virtual void LocalInit() ;
9fdaff9a 42
43 void SetAsymmetryCut(Float_t asy) {fAsyCut = asy ;}
44 void SetClusterMinEnergy(Float_t emin) {fEmin = emin;}
45 void SetClusterMaxEnergy(Float_t emax) {fEmax = emax;}
46 void SetClusterMinNCells(Int_t n) {fMinNCells = n ;}
47 void SetNCellsGroup(Int_t n) {fGroupNCells = n ;}
48 void SetLogWeight(Float_t w) {fLogWeight = w ;}
49
6eb2a715 50 //void SetCalibCorrections(AliEMCALCalibData* const cdata);
375cec9b 51
247abff4 52 void SwitchOnClusterCorrection() {fCorrectClusters = kTRUE ; }
53 void SwitchOffClusterCorrection() {fCorrectClusters = kFALSE ; }
54
2dfb1428 55 void SwitchOnSameSM() {fSameSM = kTRUE ; }
56 void SwitchOffSameSM() {fSameSM = kFALSE ; }
57
58 Int_t GetEMCALClusters(AliVEvent* event, TRefArray *clusters) const;
59 Bool_t IsEMCALCluster(AliVCluster *clus) const;
60 void SwitchOnOldAODs() {fOldAOD = kTRUE ; }
61 void SwitchOffOldAODs() {fOldAOD = kFALSE ; }
62
3b13c34c 63 void SetGeometryName(TString name) { fEMCALGeoName = name ; }
64 TString GeometryName() const { return fEMCALGeoName ; }
65 void SwitchOnLoadOwnGeometryMatrices() { fLoadMatrices = kTRUE ; }
66 void SwitchOffLoadOwnGeometryMatrices() { fLoadMatrices = kFALSE ; }
67 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fMatrix[i] = m ; }
68
9584c261 69 void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) {fRecoUtils = ru;}
9fdaff9a 70 AliEMCALRecoUtils* GetEMCALRecoUtils() const {return fRecoUtils;}
9584c261 71
6eb2a715 72 void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
73 fNbins = nBins; fMinBin = minbin; fMaxBin = maxbin; }
9584c261 74
9584c261 75 void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells* cells, AliVCluster* clu, Int_t& iSM, Int_t& ieta, Int_t& iphi);
375cec9b 76
247abff4 77 void UseFilteredEventAsInput() {fFilteredInput = kTRUE;}
78 void UseNormalEventAsInput() {fFilteredInput = kFALSE;}
79
3b13c34c 80
5ef94e1b 81 void PrintInfo();
82
375cec9b 83private:
84
cf028690 85 AliEMCALGeometry * fEMCALGeo; //! EMCAL geometry
6eb2a715 86 //AliEMCALCalibData* fCalibData; // corrections to CC from the previous iteration
375cec9b 87
247abff4 88 Float_t fEmin; // min. cluster energy
89 Float_t fEmax; // max. cluster energy
90 Float_t fAsyCut; // Asymmetry cut
91 Int_t fMinNCells; // min. ncells in cluster
92 Int_t fGroupNCells; // group n cells
93 Float_t fLogWeight; // log weight used in cluster recalibration
94 Bool_t fSameSM; // Combine clusters in channels on same SM
95 Bool_t fOldAOD; // Reading Old AODs, created before release 4.20
96 Bool_t fFilteredInput; // Read input produced with filter.
97 Bool_t fCorrectClusters;// Correct clusters energy, position etc.
98 TString fEMCALGeoName; // Name of geometry to use.
99
9584c261 100 AliEMCALRecoUtils * fRecoUtils; // Access to reconstruction utilities
101
375cec9b 102 //Output histograms
6eb2a715 103 Int_t fNbins; // N mass bins of invariant mass histograms
104 Float_t fMinBin; // Minimum mass bins of invariant mass histograms
105 Float_t fMaxBin; // Maximum mass bins of invariant mass histograms
106
cf028690 107 TList* fOutputContainer; //!histogram container
108 TH1F* fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];//! two-cluster inv. mass assigned to each cell.
9584c261 109
110 TH2F* fHmgg; //! two-cluster inv.mass vs pt of pair
111 TH2F* fHmggDifferentSM; //! two-cluster inv.mass vs pt of pair, each cluster in different SM
2dfb1428 112 TH2F* fHmggSM[4]; //! two-cluster inv.mass per SM
113 TH2F* fHmggPairSM[4]; //! two-cluster inv.mass per Pair
9584c261 114
115 TH2F* fHOpeningAngle; //! two-cluster opening angle vs pt of pair, with mass close to pi0
116 TH2F* fHOpeningAngleDifferentSM; //! two-cluster opening angle vs pt of pair, each cluster in different SM, with mass close to pi0
117 TH2F* fHOpeningAngleSM[4]; //! two-cluster opening angle vs pt per SM,with mass close to pi0
118 TH2F* fHOpeningAnglePairSM[4]; //! two-cluster opening angle vs pt per Pair,with mass close to pi0
119
120 TH2F* fHIncidentAngle; //! cluster incident angle vs pt of pair, with mass close to pi0
121 TH2F* fHIncidentAngleDifferentSM; //! cluster incident angle vs pt of pair, each cluster in different SM, with mass close to pi0
122 TH2F* fHIncidentAngleSM[4]; //! cluster incident angle vs pt per SM,with mass close to pi0
123 TH2F* fHIncidentAnglePairSM[4]; //! cluster incident angle vs pt per Pair,with mass close to pi0
124
125 TH2F* fHAsymmetry; //! two-cluster asymmetry vs pt of pair, with mass close to pi0
126 TH2F* fHAsymmetryDifferentSM; //! two-cluster asymmetry vs pt of pair, each cluster in different SM, with mass close to pi0
127 TH2F* fHAsymmetrySM[4]; //! two-cluster asymmetry vs pt per SM,with mass close to pi0
128 TH2F* fHAsymmetryPairSM[4]; //! two-cluster asymmetry vs pt per Pair,with mass close to pi0
129
130 TH2F* fhTowerDecayPhotonHit[4] ; //! Cells ordered in column/row for different module, number of times a decay photon hits
131 TH2F* fhTowerDecayPhotonEnergy[4] ; //! Cells ordered in column/row for different module, accumulated energy in the tower by decay photons.
132 TH2F* fhTowerDecayPhotonAsymmetry[4] ; //! Cells ordered in column/row for different module, accumulated asymmetry in the tower by decay photons.
133
3b13c34c 134 TH1I* fhNEvents; //! Number of events counter histogram
135 TList * fCuts ; //! List with analysis cuts
136 Bool_t fLoadMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
137 TGeoHMatrix * fMatrix[4]; // Geometry matrices with alignments
138
139 ClassDef(AliAnalysisTaskEMCALPi0CalibSelection,11);
375cec9b 140
141};
142
143#endif //ALIANALYSISTASKEMCALPI0CALIBSELECTION_H