]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/CaloCalib/AliAnalysisTaskEMCALPi0CalibSelection.h
Move cluster energy smearing from AliCaloTrackReader to a method in AliEMCALRecoUtils...
[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;
375cec9b 20#include "AliEMCALGeoParams.h"
9584c261 21class AliEMCALRecoUtils;
375cec9b 22
23class AliAnalysisTaskEMCALPi0CalibSelection : public AliAnalysisTaskSE
24{
25public:
26
375cec9b 27 AliAnalysisTaskEMCALPi0CalibSelection(const char* name);
375cec9b 28 virtual ~AliAnalysisTaskEMCALPi0CalibSelection();
29
9584c261 30private:
31
32 AliAnalysisTaskEMCALPi0CalibSelection(const AliAnalysisTaskEMCALPi0CalibSelection&);
33 AliAnalysisTaskEMCALPi0CalibSelection& operator=(const AliAnalysisTaskEMCALPi0CalibSelection&);
34
35public:
36
375cec9b 37 // Implementation of interface methods
afaaef51 38 void UserCreateOutputObjects();
39
40 void UserExec(Option_t * opt);
41
42 void LocalInit() ;
43
44 void PrintInfo();
45
46 void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells* cells, AliVCluster* clu, Int_t& iSM, Int_t& ieta, Int_t& iphi);
47
48 // Analysis parameter setting
49
50 void SetPairDTimeCut(Float_t t) { fDTimeCut = t ; }
51 void SetAsymmetryCut(Float_t asy) { fAsyCut = asy ; }
52 void SetClusterMinEnergy(Float_t emin) { fEmin = emin ; }
53 void SetClusterMaxEnergy(Float_t emax) { fEmax = emax ; }
49b53920 54 void SetClusterLambda0Cuts(Float_t min, Float_t max){ fL0max = max ;
55 fL0min = min ; }
afaaef51 56 void SetClusterMinNCells(Int_t n) { fMinNCells = n ; }
57 void SetNCellsGroup(Int_t n) { fGroupNCells = n ; }
58 void SetLogWeight(Float_t w) { fLogWeight = w ; }
59
60 void SwitchOnSameSM() { fSameSM = kTRUE ; }
61 void SwitchOffSameSM() { fSameSM = kFALSE ; }
62
63 void UseFilteredEventAsInput() { fFilteredInput = kTRUE ; }
64 void UseNormalEventAsInput() { fFilteredInput = kFALSE ; }
65
66 void SetTriggerName(TString name) { fTriggerName = name ; }
49b53920 67
42b19289 68 //Geometry setters
afaaef51 69
70 void SetGeometryName(TString name) { fEMCALGeoName = name ; }
71 TString GeometryName() const { return fEMCALGeoName ; }
72 void SwitchOnLoadOwnGeometryMatrices() { fLoadMatrices = kTRUE ; }
73 void SwitchOffLoadOwnGeometryMatrices() { fLoadMatrices = kFALSE ; }
74 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fMatrix[i] = m ; }
42b19289 75
76 // Cluster recalculation
afaaef51 77 void SwitchOnClusterCorrection() { fCorrectClusters = kTRUE ; }
78 void SwitchOffClusterCorrection() { fCorrectClusters = kFALSE ; }
79 void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
80 AliEMCALRecoUtils* GetEMCALRecoUtils() const { return fRecoUtils ; }
2dfb1428 81
42b19289 82 void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
83 fNbins = nBins; fMinBin = minbin; fMaxBin = maxbin; }
42b19289 84
85 // Mask clusters
86 void SetNMaskCellColumns(Int_t n) {
87 if(n > fNMaskCellColumns){ delete [] fMaskCellColumns ; fMaskCellColumns = new Int_t[n] ; }
88 fNMaskCellColumns = n ; }
89 void SetMaskCellColumn(Int_t ipos, Int_t icol) { if(ipos < fNMaskCellColumns) fMaskCellColumns[ipos] = icol ;
90 else printf("Not set, position larger than allocated set size first") ; }
91 Bool_t MaskFrameCluster(const Int_t iSM, const Int_t ieta) const;
3b13c34c 92
375cec9b 93private:
94
cf028690 95 AliEMCALGeometry * fEMCALGeo; //! EMCAL geometry
375cec9b 96
49b53920 97 Float_t fEmin; // min. cluster energy (GeV)
98 Float_t fEmax; // max. cluster energy (GeV)
99 Float_t fL0min; // min. cluster L0
100 Float_t fL0max; // max. cluster L0
101
102 Float_t fDTimeCut; // Maximum difference between time of cluster pairs (ns)
103 Float_t fAsyCut; // Asymmetry cut
104 Int_t fMinNCells; // min. ncells in cluster
105 Int_t fGroupNCells; // group n cells
106 Float_t fLogWeight; // log weight used in cluster recalibration
107 Bool_t fSameSM; // Combine clusters in channels on same SM
108 Bool_t fFilteredInput; // Read input produced with filter.
109 Bool_t fCorrectClusters; // Correct clusters energy, position etc.
110
111 TString fEMCALGeoName; // Name of geometry to use.
112 TString fTriggerName; // Trigger name must contain this name
113
114 AliEMCALRecoUtils * fRecoUtils; // Access to reconstruction utilities
afaaef51 115
49b53920 116 TList * fCuts ; //! List with analysis cuts
117 Bool_t fLoadMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
118 TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules]; // Geometry matrices with alignments
afaaef51 119
49b53920 120 Int_t fNMaskCellColumns; // Number of masked columns
121 Int_t* fMaskCellColumns; //[fNMaskCellColumns] list of masked cell collumn
afaaef51 122
375cec9b 123 //Output histograms
49b53920 124 Int_t fNbins; // N mass bins of invariant mass histograms
125 Float_t fMinBin; // Minimum mass bins of invariant mass histograms
126 Float_t fMaxBin; // Maximum mass bins of invariant mass histograms
6eb2a715 127
49b53920 128 TList* fOutputContainer; //!histogram container
129
cf028690 130 TH1F* fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];//! two-cluster inv. mass assigned to each cell.
9584c261 131
49b53920 132 TH2F* fHmgg; //! two-cluster inv.mass vs pt of pair
133 TH2F* fHmggDifferentSM; //! two-cluster inv.mass vs pt of pair, each cluster in different SM
134 TH2F* fHmggSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster inv.mass per SM
135 TH2F* fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2]; //! two-cluster inv.mass per Pair
136 TH2F* fHmggPairSameSideSM [AliEMCALGeoParams::fgkEMCALModules-2]; //! two-cluster inv.mass per Pair
137
138 TH2F* fHmggMaskFrame; //! two-cluster inv.mass vs pt of pair, mask clusters facing frames
139 TH2F* fHmggDifferentSMMaskFrame; //! two-cluster inv.mass vs pt of pair, each cluster in different SM,mask clusters facing frames
140 TH2F* fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster inv.mass per SM, mask clusters facing frames
141 TH2F* fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2]; //! two-cluster inv.mass per Pair, mask clusters facing frames
142 TH2F* fHmggPairSameSideSMMaskFrame [AliEMCALGeoParams::fgkEMCALModules-2]; //! two-cluster inv.mass per Pair, mask clusters facing frames
143
144 TH2F* fHOpeningAngle; //! two-cluster opening angle vs pt of pair, with mass close to pi0
145 TH2F* fHOpeningAngleDifferentSM; //! two-cluster opening angle vs pt of pair, each cluster in different SM, with mass close to pi0
146 TH2F* fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster opening angle vs pt per SM,with mass close to pi0
147 TH2F* fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster opening angle vs pt per Pair,with mass close to pi0
148
149 TH2F* fHIncidentAngle; //! cluster incident angle vs pt of pair, with mass close to pi0
150 TH2F* fHIncidentAngleDifferentSM; //! cluster incident angle vs pt of pair, each cluster in different SM, with mass close to pi0
151 TH2F* fHIncidentAngleSM[AliEMCALGeoParams::fgkEMCALModules]; //! cluster incident angle vs pt per SM,with mass close to pi0
152 TH2F* fHIncidentAnglePairSM[AliEMCALGeoParams::fgkEMCALModules]; //! cluster incident angle vs pt per Pair,with mass close to pi0
153
154 TH2F* fHAsymmetry; //! two-cluster asymmetry vs pt of pair, with mass close to pi0
155 TH2F* fHAsymmetryDifferentSM; //! two-cluster asymmetry vs pt of pair, each cluster in different SM, with mass close to pi0
156 TH2F* fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster asymmetry vs pt per SM,with mass close to pi0
157 TH2F* fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster asymmetry vs pt per Pair,with mass close to pi0
158
159 TH2F* fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, number of times a decay photon hits
160 TH2F* fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, accumulated energy in the tower by decay photons.
161 TH2F* fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, accumulated asymmetry in the tower by decay photons.
162 TH2F* fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, number of times a decay photon hits
163
164 TH1I* fhNEvents; //! Number of events counter histogram
afaaef51 165
af2d7c9b 166 //Time
49b53920 167 TH2F* fhClusterTime ; //! Timing of clusters vs energy
168 TH2F* fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules] ; //! Timing of clusters vs energy per SM
169 TH2F* fhClusterPairDiffTime; //! Diference in time of clusters
170 TH2F* fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules]; //! Diference in time of clusters same SM
171 TH2F* fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2]; //! Diference in time of clusters same sector
172 TH2F* fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2]; //! Diference in time of clusters same side
173
174 ClassDef(AliAnalysisTaskEMCALPi0CalibSelection,16);
375cec9b 175
176};
177
178#endif //ALIANALYSISTASKEMCALPI0CALIBSELECTION_H