1 #ifndef ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
2 #define ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 //---------------------------------------------------------------------------//
8 // Fill histograms with two-cluster invariant mass //
9 // using calibration coefficients of the previous iteration. //
10 //---------------------------------------------------------------------------//
15 #include "TObjArray.h"
18 #include "AliAnalysisTaskSE.h"
19 class AliEMCALGeometry;
20 #include "AliEMCALGeoParams.h"
21 class AliEMCALRecoUtils;
23 class AliAnalysisTaskEMCALPi0CalibSelection : public AliAnalysisTaskSE
27 AliAnalysisTaskEMCALPi0CalibSelection(const char* name);
28 virtual ~AliAnalysisTaskEMCALPi0CalibSelection();
32 AliAnalysisTaskEMCALPi0CalibSelection(const AliAnalysisTaskEMCALPi0CalibSelection&);
33 AliAnalysisTaskEMCALPi0CalibSelection& operator=(const AliAnalysisTaskEMCALPi0CalibSelection&);
37 // Implementation of interface methods
38 void UserCreateOutputObjects();
40 void UserExec(Option_t * opt);
46 void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells* cells, AliVCluster* clu, Int_t& iSM, Int_t& ieta, Int_t& iphi);
48 // Analysis parameter setting
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 ; }
54 void SetClusterLambda0Cuts(Float_t min, Float_t max){ fL0max = max ;
56 void SetClusterMinNCells(Int_t n) { fMinNCells = n ; }
57 void SetNCellsGroup(Int_t n) { fGroupNCells = n ; }
58 void SetLogWeight(Float_t w) { fLogWeight = w ; }
60 void SetPairMinMassCut(Float_t min) { fInvMassCutMin = min ; }
61 void SetPairMaxMassCut(Float_t max) { fInvMassCutMax = max ; }
63 void SwitchOnSameSM() { fSameSM = kTRUE ; }
64 void SwitchOffSameSM() { fSameSM = kFALSE ; }
66 void UseFilteredEventAsInput() { fFilteredInput = kTRUE ; }
67 void UseNormalEventAsInput() { fFilteredInput = kFALSE ; }
69 void SetTriggerName(TString name) { fTriggerName = name ; }
73 void SetGeometryName(TString name) { fEMCALGeoName = name ; }
74 TString GeometryName() const { return fEMCALGeoName ; }
75 void SwitchOnLoadOwnGeometryMatrices() { fLoadMatrices = kTRUE ; }
76 void SwitchOffLoadOwnGeometryMatrices() { fLoadMatrices = kFALSE ; }
77 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fMatrix[i] = m ; }
79 // Cluster recalculation
80 void SwitchOnClusterCorrection() { fCorrectClusters = kTRUE ; }
81 void SwitchOffClusterCorrection() { fCorrectClusters = kFALSE ; }
82 void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
83 AliEMCALRecoUtils* GetEMCALRecoUtils() const { return fRecoUtils ; }
85 void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
86 fNbins = nBins ; fMinBin = minbin ; fMaxBin = maxbin ; }
88 void SetTimeHistoBinRange (Int_t nBins, Float_t minbin, Float_t maxbin){
89 fNTimeBins = nBins ; fMinTimeBin = minbin ; fMaxTimeBin = maxbin ; }
93 void SetNMaskCellColumns(Int_t n) {
94 if(n > fNMaskCellColumns){ delete [] fMaskCellColumns ; fMaskCellColumns = new Int_t[n] ; }
95 fNMaskCellColumns = n ; }
96 void SetMaskCellColumn(Int_t ipos, Int_t icol) { if(ipos < fNMaskCellColumns) fMaskCellColumns[ipos] = icol ;
97 else printf("Not set, position larger than allocated set size first") ; }
98 Bool_t MaskFrameCluster(const Int_t iSM, const Int_t ieta) const;
102 AliEMCALGeometry * fEMCALGeo; //! EMCAL geometry
104 Float_t fEmin; // min. cluster energy (GeV)
105 Float_t fEmax; // max. cluster energy (GeV)
106 Float_t fL0min; // min. cluster L0
107 Float_t fL0max; // max. cluster L0
109 Float_t fDTimeCut; // Maximum difference between time of cluster pairs (ns)
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.
118 TString fEMCALGeoName; // Name of geometry to use.
119 TString fTriggerName; // Trigger name must contain this name
121 AliEMCALRecoUtils * fRecoUtils; // Access to reconstruction utilities
123 TList * fCuts ; //! List with analysis cuts
124 Bool_t fLoadMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
125 TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules]; // Geometry matrices with alignments
127 Int_t fNMaskCellColumns; // Number of masked columns
128 Int_t* fMaskCellColumns; //[fNMaskCellColumns] list of masked cell collumn
130 // Pi0 clusters selection
132 Float_t fInvMassCutMin; // Min mass cut for clusters to fill time or other histograms
133 Float_t fInvMassCutMax; // Mas mass cut for clusters to fill time or other histograms
137 TList* fOutputContainer; //!histogram container
139 Int_t fNbins; // N mass bins of invariant mass histograms
140 Float_t fMinBin; // Minimum mass bins of invariant mass histograms
141 Float_t fMaxBin; // Maximum mass bins of invariant mass histograms
143 Int_t fNTimeBins; // N time bins of invariant mass histograms
144 Float_t fMinTimeBin; // Minimum time bins of invariant mass histograms
145 Float_t fMaxTimeBin; // Maximum time bins of invariant mass histograms
147 TH1F* fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];//! two-cluster inv. mass assigned to each cell.
149 TH2F* fHmgg; //! two-cluster inv.mass vs pt of pair
150 TH2F* fHmggDifferentSM; //! two-cluster inv.mass vs pt of pair, each cluster in different SM
151 TH2F* fHmggSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster inv.mass per SM
152 TH2F* fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2]; //! two-cluster inv.mass per Pair
153 TH2F* fHmggPairSameSideSM [AliEMCALGeoParams::fgkEMCALModules-2]; //! two-cluster inv.mass per Pair
155 TH2F* fHmggMaskFrame; //! two-cluster inv.mass vs pt of pair, mask clusters facing frames
156 TH2F* fHmggDifferentSMMaskFrame; //! two-cluster inv.mass vs pt of pair, each cluster in different SM,mask clusters facing frames
157 TH2F* fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster inv.mass per SM, mask clusters facing frames
158 TH2F* fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2]; //! two-cluster inv.mass per Pair, mask clusters facing frames
159 TH2F* fHmggPairSameSideSMMaskFrame [AliEMCALGeoParams::fgkEMCALModules-2]; //! two-cluster inv.mass per Pair, mask clusters facing frames
161 TH2F* fHOpeningAngle; //! two-cluster opening angle vs pt of pair, with mass close to pi0
162 TH2F* fHOpeningAngleDifferentSM; //! two-cluster opening angle vs pt of pair, each cluster in different SM, with mass close to pi0
163 TH2F* fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster opening angle vs pt per SM,with mass close to pi0
164 TH2F* fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster opening angle vs pt per Pair,with mass close to pi0
166 TH2F* fHIncidentAngle; //! cluster incident angle vs pt of pair, with mass close to pi0
167 TH2F* fHIncidentAngleDifferentSM; //! cluster incident angle vs pt of pair, each cluster in different SM, with mass close to pi0
168 TH2F* fHIncidentAngleSM[AliEMCALGeoParams::fgkEMCALModules]; //! cluster incident angle vs pt per SM,with mass close to pi0
169 TH2F* fHIncidentAnglePairSM[AliEMCALGeoParams::fgkEMCALModules]; //! cluster incident angle vs pt per Pair,with mass close to pi0
171 TH2F* fHAsymmetry; //! two-cluster asymmetry vs pt of pair, with mass close to pi0
172 TH2F* fHAsymmetryDifferentSM; //! two-cluster asymmetry vs pt of pair, each cluster in different SM, with mass close to pi0
173 TH2F* fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster asymmetry vs pt per SM,with mass close to pi0
174 TH2F* fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules]; //! two-cluster asymmetry vs pt per Pair,with mass close to pi0
176 TH2F* fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, number of times a decay photon hits
177 TH2F* fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, accumulated energy in the tower by decay photons.
178 TH2F* fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, accumulated asymmetry in the tower by decay photons.
179 TH2F* fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules] ; //! Cells ordered in column/row for different module, number of times a decay photon hits
181 TH1I* fhNEvents; //! Number of events counter histogram
184 TH2F* fHTpi0[4]; //! Time of cell under pi0 mass, for 4 bunch crossings
185 TH2F* fhClusterTime ; //! Timing of clusters vs energy
186 TH2F* fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules] ; //! Timing of clusters vs energy per SM
187 TH2F* fhClusterPairDiffTime; //! Diference in time of clusters
188 TH2F* fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules]; //! Diference in time of clusters same SM
189 TH2F* fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2]; //! Diference in time of clusters same sector
190 TH2F* fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2]; //! Diference in time of clusters same side
192 ClassDef(AliAnalysisTaskEMCALPi0CalibSelection,17);
196 #endif //ALIANALYSISTASKEMCALPI0CALIBSELECTION_H