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