memory leak fixed
[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
38 virtual void UserCreateOutputObjects();
39 virtual void UserExec(Option_t * opt);
6eb2a715 40 virtual void LocalInit() ;
9fdaff9a 41
af2d7c9b 42 void SetPairDTimeCut(Float_t t) {fDTimeCut = t ;}
42b19289 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
50 void SwitchOnSameSM() {fSameSM = kTRUE ; }
51 void SwitchOffSameSM() {fSameSM = kFALSE ; }
9fdaff9a 52
42b19289 53 //Geometry setters
54 void SetGeometryName(TString name) { fEMCALGeoName = name ; }
55 TString GeometryName() const { return fEMCALGeoName ; }
56 void SwitchOnLoadOwnGeometryMatrices() { fLoadMatrices = kTRUE ; }
57 void SwitchOffLoadOwnGeometryMatrices() { fLoadMatrices = kFALSE ; }
58 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fMatrix[i] = m ; }
59
60 // Cluster recalculation
61 void SwitchOnClusterCorrection() {fCorrectClusters = kTRUE ; }
62 void SwitchOffClusterCorrection() {fCorrectClusters = kFALSE ; }
63 void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) {fRecoUtils = ru ; }
64 AliEMCALRecoUtils* GetEMCALRecoUtils() const {return fRecoUtils ; }
2dfb1428 65
42b19289 66 void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
67 fNbins = nBins; fMinBin = minbin; fMaxBin = maxbin; }
9584c261 68
42b19289 69 void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells* cells, AliVCluster* clu, Int_t& iSM, Int_t& ieta, Int_t& iphi);
70
71 // Mask clusters
72 void SetNMaskCellColumns(Int_t n) {
73 if(n > fNMaskCellColumns){ delete [] fMaskCellColumns ; fMaskCellColumns = new Int_t[n] ; }
74 fNMaskCellColumns = n ; }
75 void SetMaskCellColumn(Int_t ipos, Int_t icol) { if(ipos < fNMaskCellColumns) fMaskCellColumns[ipos] = icol ;
76 else printf("Not set, position larger than allocated set size first") ; }
77 Bool_t MaskFrameCluster(const Int_t iSM, const Int_t ieta) const;
3b13c34c 78
42b19289 79 void UseFilteredEventAsInput() {fFilteredInput = kTRUE ;}
80 void UseNormalEventAsInput() {fFilteredInput = kFALSE;}
81
82 void PrintInfo();
5ef94e1b 83
375cec9b 84private:
85
cf028690 86 AliEMCALGeometry * fEMCALGeo; //! EMCAL geometry
375cec9b 87
af2d7c9b 88 Float_t fEmin; // min. cluster energy (GeV)
89 Float_t fEmax; // max. cluster energy (GeV)
90 Float_t fDTimeCut; // Maximum difference between time of cluster pairs (ns)
247abff4 91 Float_t fAsyCut; // Asymmetry cut
92 Int_t fMinNCells; // min. ncells in cluster
93 Int_t fGroupNCells; // group n cells
94 Float_t fLogWeight; // log weight used in cluster recalibration
95 Bool_t fSameSM; // Combine clusters in channels on same SM
247abff4 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
42b19289 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
112 TH2F* fHmggSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster inv.mass per SM
113 TH2F* fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2]; //! two-cluster inv.mass per Pair
114 TH2F* fHmggPairSameSideSM [AliEMCALGeoParams::fgkEMCALModules-2]; //! two-cluster inv.mass per Pair
44cf05d7 115
42b19289 116 TH2F* fHmggMaskFrame; //! two-cluster inv.mass vs pt of pair, mask clusters facing frames
117 TH2F* fHmggDifferentSMMaskFrame; //! two-cluster inv.mass vs pt of pair, each cluster in different SM,mask clusters facing frames
118 TH2F* fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster inv.mass per SM, mask clusters facing frames
119 TH2F* fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2]; //! two-cluster inv.mass per Pair, mask clusters facing frames
120 TH2F* fHmggPairSameSideSMMaskFrame [AliEMCALGeoParams::fgkEMCALModules-2]; //! two-cluster inv.mass per Pair, mask clusters facing frames
121
122 TH2F* fHOpeningAngle; //! two-cluster opening angle vs pt of pair, with mass close to pi0
123 TH2F* fHOpeningAngleDifferentSM; //! two-cluster opening angle vs pt of pair, each cluster in different SM, with mass close to pi0
124 TH2F* fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster opening angle vs pt per SM,with mass close to pi0
125 TH2F* fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster opening angle vs pt per Pair,with mass close to pi0
126
127 TH2F* fHIncidentAngle; //! cluster incident angle vs pt of pair, with mass close to pi0
128 TH2F* fHIncidentAngleDifferentSM; //! cluster incident angle vs pt of pair, each cluster in different SM, with mass close to pi0
129 TH2F* fHIncidentAngleSM[AliEMCALGeoParams::fgkEMCALModules]; //! cluster incident angle vs pt per SM,with mass close to pi0
130 TH2F* fHIncidentAnglePairSM[AliEMCALGeoParams::fgkEMCALModules]; //! cluster incident angle vs pt per Pair,with mass close to pi0
44cf05d7 131
42b19289 132 TH2F* fHAsymmetry; //! two-cluster asymmetry vs pt of pair, with mass close to pi0
133 TH2F* fHAsymmetryDifferentSM; //! two-cluster asymmetry vs pt of pair, each cluster in different SM, with mass close to pi0
134 TH2F* fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster asymmetry vs pt per SM,with mass close to pi0
135 TH2F* fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster asymmetry vs pt per Pair,with mass close to pi0
136
137 TH2F* fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, number of times a decay photon hits
138 TH2F* fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, accumulated energy in the tower by decay photons.
139 TH2F* fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules] ;//! Cells ordered in column/row for different module, accumulated asymmetry in the tower by decay photons.
140 TH2F* fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules] ;//! Cells ordered in column/row for different module, number of times a decay photon hits
141
142 TH1I* fhNEvents; //! Number of events counter histogram
143 TList * fCuts ; //! List with analysis cuts
144 Bool_t fLoadMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
44cf05d7 145 TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules]; // Geometry matrices with alignments
3b13c34c 146
42b19289 147 Int_t fNMaskCellColumns; // Number of masked columns
148 Int_t* fMaskCellColumns; //[fNMaskCellColumns] list of masked cell collumn
af2d7c9b 149
150 //Time
151 TH2F* fhClusterTime ; // Timing of clusters vs energy
b5872b3c 152 TH2F* fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules] ; // Timing of clusters vs energy per SM
af2d7c9b 153 TH2F* fhClusterPairDiffTime; // Diference in time of clusters
154 TH2F* fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules]; // Diference in time of clusters same SM
155 TH2F* fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2]; // Diference in time of clusters same sector
156 TH2F* fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2]; // Diference in time of clusters same side
157
158 ClassDef(AliAnalysisTaskEMCALPi0CalibSelection,14);
375cec9b 159
160};
161
162#endif //ALIANALYSISTASKEMCALPI0CALIBSELECTION_H