1 #ifndef ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
2 #define ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
12 #include "AliAnalysisTaskSE.h"
13 class AliEMCALGeometry;
14 #include "AliEMCALGeoParams.h"
15 class AliEMCALRecoUtils;
17 class AliAnalysisTaskEMCALPi0CalibSelection : public AliAnalysisTaskSE
21 AliAnalysisTaskEMCALPi0CalibSelection(const char* name);
22 virtual ~AliAnalysisTaskEMCALPi0CalibSelection();
26 AliAnalysisTaskEMCALPi0CalibSelection(const AliAnalysisTaskEMCALPi0CalibSelection&);
27 AliAnalysisTaskEMCALPi0CalibSelection& operator=(const AliAnalysisTaskEMCALPi0CalibSelection&);
31 // Implementation of interface methods
32 void UserCreateOutputObjects();
34 void UserExec(Option_t * opt);
40 void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells* cells, AliVCluster* clu, Int_t& iSM, Int_t& ieta, Int_t& iphi);
42 // Analysis parameter setting
44 void SetPairDTimeCut(Float_t t) { fDTimeCut = t ; }
45 void SetAsymmetryCut(Float_t asy) { fAsyCut = asy ; }
46 void SetClusterMinEnergy(Float_t emin) { fEmin = emin ; }
47 void SetClusterMaxEnergy(Float_t emax) { fEmax = emax ; }
48 void SetClusterLambda0Cuts(Float_t min, Float_t max){ fL0max = max ;
50 void SetClusterMinNCells(Int_t n) { fMinNCells = n ; }
51 void SetNCellsGroup(Int_t n) { fGroupNCells = n ; }
52 void SetLogWeight(Float_t w) { fLogWeight = w ; }
54 void SetPairMinMassCut(Float_t min) { fInvMassCutMin = min ; }
55 void SetPairMaxMassCut(Float_t max) { fInvMassCutMax = max ; }
57 void SwitchOnSameSM() { fSameSM = kTRUE ; }
58 void SwitchOffSameSM() { fSameSM = kFALSE ; }
60 void UseFilteredEventAsInput() { fFilteredInput = kTRUE ; }
61 void UseNormalEventAsInput() { fFilteredInput = kFALSE ; }
63 void SetTriggerName(TString name) { fTriggerName = name ; }
67 void SetGeometryName(TString name) { fEMCALGeoName = name ; }
68 TString GeometryName() const { return fEMCALGeoName ; }
69 void SwitchOnLoadOwnGeometryMatrices() { fLoadMatrices = kTRUE ; }
70 void SwitchOffLoadOwnGeometryMatrices() { fLoadMatrices = kFALSE ; }
71 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fMatrix[i] = m ; }
73 // Cluster recalculation
74 void SwitchOnClusterCorrection() { fCorrectClusters = kTRUE ; }
75 void SwitchOffClusterCorrection() { fCorrectClusters = kFALSE ; }
76 void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
77 AliEMCALRecoUtils* GetEMCALRecoUtils() const { return fRecoUtils ; }
79 void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
80 fNbins = nBins ; fMinBin = minbin ; fMaxBin = maxbin ; }
82 void SetTimeHistoBinRange (Int_t nBins, Float_t minbin, Float_t maxbin){
83 fNTimeBins = nBins ; fMinTimeBin = minbin ; fMaxTimeBin = maxbin ; }
87 void SetNMaskCellColumns(Int_t n) {
88 if(n > fNMaskCellColumns){ delete [] fMaskCellColumns ; fMaskCellColumns = new Int_t[n] ; }
89 fNMaskCellColumns = n ; }
90 void SetMaskCellColumn(Int_t ipos, Int_t icol) { if(ipos < fNMaskCellColumns) fMaskCellColumns[ipos] = icol ;
91 else printf("Not set, position larger than allocated set size first") ; }
92 Bool_t MaskFrameCluster(const Int_t iSM, const Int_t ieta) const;
96 AliEMCALGeometry * fEMCALGeo; //! EMCAL geometry
98 Float_t fEmin; // min. cluster energy (GeV)
99 Float_t fEmax; // max. cluster energy (GeV)
100 Float_t fL0min; // min. cluster L0
101 Float_t fL0max; // max. cluster L0
103 Float_t fDTimeCut; // Maximum difference between time of cluster pairs (ns)
104 Float_t fAsyCut; // Asymmetry cut
105 Int_t fMinNCells; // min. ncells in cluster
106 Int_t fGroupNCells; // group n cells
107 Float_t fLogWeight; // log weight used in cluster recalibration
108 Bool_t fSameSM; // Combine clusters in channels on same SM
109 Bool_t fFilteredInput; // Read input produced with filter.
110 Bool_t fCorrectClusters; // Correct clusters energy, position etc.
112 TString fEMCALGeoName; // Name of geometry to use.
113 TString fTriggerName; // Trigger name must contain this name
115 AliEMCALRecoUtils * fRecoUtils; // Access to reconstruction utilities
117 TList * fCuts ; //! List with analysis cuts
118 Bool_t fLoadMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
119 TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules]; // Geometry matrices with alignments
121 Int_t fNMaskCellColumns; // Number of masked columns
122 Int_t* fMaskCellColumns; //[fNMaskCellColumns] list of masked cell collumn
124 // Pi0 clusters selection
126 Float_t fInvMassCutMin; // Min mass cut for clusters to fill time or other histograms
127 Float_t fInvMassCutMax; // Mas mass cut for clusters to fill time or other histograms
131 TList* fOutputContainer; //!histogram container
133 Int_t fNbins; // N mass bins of invariant mass histograms
134 Float_t fMinBin; // Minimum mass bins of invariant mass histograms
135 Float_t fMaxBin; // Maximum mass bins of invariant mass histograms
137 Int_t fNTimeBins; // N time bins of invariant mass histograms
138 Float_t fMinTimeBin; // Minimum time bins of invariant mass histograms
139 Float_t fMaxTimeBin; // Maximum time bins of invariant mass histograms
141 TH1F* fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];//! two-cluster inv. mass assigned to each cell.
143 TH2F* fHmgg; //! two-cluster inv.mass vs pt of pair
144 TH2F* fHmggDifferentSM; //! two-cluster inv.mass vs pt of pair, each cluster in different SM
145 TH2F* fHmggSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster inv.mass per SM
146 TH2F* fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2]; //! two-cluster inv.mass per Pair
147 TH2F* fHmggPairSameSideSM [AliEMCALGeoParams::fgkEMCALModules-2]; //! two-cluster inv.mass per Pair
149 TH2F* fHmggMaskFrame; //! two-cluster inv.mass vs pt of pair, mask clusters facing frames
150 TH2F* fHmggDifferentSMMaskFrame; //! two-cluster inv.mass vs pt of pair, each cluster in different SM,mask clusters facing frames
151 TH2F* fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster inv.mass per SM, mask clusters facing frames
152 TH2F* fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2]; //! two-cluster inv.mass per Pair, mask clusters facing frames
153 TH2F* fHmggPairSameSideSMMaskFrame [AliEMCALGeoParams::fgkEMCALModules-2]; //! two-cluster inv.mass per Pair, mask clusters facing frames
155 TH2F* fHOpeningAngle; //! two-cluster opening angle vs pt of pair, with mass close to pi0
156 TH2F* fHOpeningAngleDifferentSM; //! two-cluster opening angle vs pt of pair, each cluster in different SM, with mass close to pi0
157 TH2F* fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster opening angle vs pt per SM,with mass close to pi0
158 TH2F* fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster opening angle vs pt per Pair,with mass close to pi0
160 TH2F* fHIncidentAngle; //! cluster incident angle vs pt of pair, with mass close to pi0
161 TH2F* fHIncidentAngleDifferentSM; //! cluster incident angle vs pt of pair, each cluster in different SM, with mass close to pi0
162 TH2F* fHIncidentAngleSM[AliEMCALGeoParams::fgkEMCALModules]; //! cluster incident angle vs pt per SM,with mass close to pi0
163 TH2F* fHIncidentAnglePairSM[AliEMCALGeoParams::fgkEMCALModules]; //! cluster incident angle vs pt per Pair,with mass close to pi0
165 TH2F* fHAsymmetry; //! two-cluster asymmetry vs pt of pair, with mass close to pi0
166 TH2F* fHAsymmetryDifferentSM; //! two-cluster asymmetry vs pt of pair, each cluster in different SM, with mass close to pi0
167 TH2F* fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster asymmetry vs pt per SM,with mass close to pi0
168 TH2F* fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster asymmetry vs pt per Pair,with mass close to pi0
170 TH2F* fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, number of times a decay photon hits
171 TH2F* fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, accumulated energy in the tower by decay photons.
172 TH2F* fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, accumulated asymmetry in the tower by decay photons.
173 TH2F* fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, number of times a decay photon hits
175 TH1I* fhNEvents; //! Number of events counter histogram
178 TH2F* fHTpi0[4]; //! Time of cell under pi0 mass, for 4 bunch crossings
179 TH2F* fhClusterTime ; //! Timing of clusters vs energy
180 TH2F* fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules] ; //! Timing of clusters vs energy per SM
181 TH2F* fhClusterPairDiffTime; //! Diference in time of clusters
182 TH2F* fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules]; //! Diference in time of clusters same SM
183 TH2F* fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2]; //! Diference in time of clusters same sector
184 TH2F* fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2]; //! Diference in time of clusters same side
186 ClassDef(AliAnalysisTaskEMCALPi0CalibSelection,17);
190 #endif //ALIANALYSISTASKEMCALPI0CALIBSELECTION_H