AliPhysics  dab84fb (dab84fb)
AliAnalysisTaskEMCALPi0CalibSelection.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
2 #define ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
3 
4 //---------------------------------------------------------------------------
28 //---------------------------------------------------------------------------
29 
30 // Root includes
31 class TH1F;
32 #include "TH2I.h"
33 #include "TObjArray.h"
34 #include "TLorentzVector.h"
35 
36 // AliRoot includes
37 #include "AliAnalysisTaskSE.h"
38 class AliEMCALGeometry;
39 #include "AliEMCALGeoParams.h"
40 class AliEMCALRecoUtils;
41 
43 {
44 
45 public:
46 
48 
49  AliAnalysisTaskEMCALPi0CalibSelection(const char* name);
50 
52 
53  void CorrectClusters();
54 
55  void FillHistograms();
56 
58 
59  void InitGeometryMatrices();
60 
62 
64 
65  void UserExec(Option_t * opt);
66 
67  void PrintInfo();
68 
69  void Terminate(Option_t* opt);
70 
71  void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells* cells, AliVCluster* clu, Int_t& iSM, Int_t& ieta, Int_t& iphi);
72 
74 
75  // Analysis parameter setting
76 
77  void SetPairDTimeCut(Float_t t) { fDTimeCut = t ; }
78 
79  void SetClusterMinTime(Float_t tmin) { fTimeMin = tmin ; }
80 
81  void SetClusterMaxTime(Float_t tmax) { fTimeMax = tmax ; }
82 
83  void SetAsymmetryCut(Float_t asy) { fAsyCut = asy ; }
84 
85  void SetClusterMinEnergy(Float_t emin) { fEmin = emin ; }
86 
87  void SetClusterMaxEnergy(Float_t emax) { fEmax = emax ; }
88 
90 
92 
93  void SetClusterLambda0Cuts(Float_t min, Float_t max){ fL0max = max ;
94  fL0min = min ; }
96 
98 
100 
102 
103  void SetLogWeight(Float_t w) { fLogWeight = w ; }
104 
106 
108 
109  void SwitchOnSameSM() { fSameSM = kTRUE ; }
110 
111  void SwitchOffSameSM() { fSameSM = kFALSE ; }
112 
114 
115  void UseNormalEventAsInput() { fFilteredInput = kFALSE ; }
116 
117  void SetTriggerName(TString name) { fTriggerName = name ; }
118 
120 
122 
124 
126 
128 
130 
132 
134 
136 
138 
139  // Geometry setters
140 
141  void SetGeometryName(TString name) { fEMCALGeoName = name ; }
142 
143  TString GeometryName() const { return fEMCALGeoName ; }
144 
146 
148 
149  void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fMatrix[i] = m ; }
150 
151  void SetOADBFilePath(TString path) { fOADBFilePath = path ; }
152 
154 
155  // Cluster recalculation
156 
158 
160 
162 
164 
165  void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
166 
167  AliEMCALRecoUtils* GetEMCALRecoUtils() const { return fRecoUtils ; }
168 
169  void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
170  fNbins = nBins ; fMinBin = minbin ; fMaxBin = maxbin ; }
171 
172  void SetEnergyHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
173  fNEnergybins = nBins ; fMinEnergyBin = minbin ; fMaxEnergyBin = maxbin ; }
174 
175  void SetTimeHistoBinRange (Int_t nBins, Float_t minbin, Float_t maxbin){
176  fNTimeBins = nBins ; fMinTimeBin = minbin ; fMaxTimeBin = maxbin ; }
177 
178 
179  void SetImportGeometryFromFile(Bool_t import, TString path = ""){
180  fImportGeometryFromFile = import ;
181  fImportGeometryFilePath = path ; }
182 
183  // Mask clusters
184 
185  void SetNMaskCellColumns(Int_t n) ;
186 
187  void SetMaskCellColumn(Int_t ipos, Int_t icol) ;
188 
189  Bool_t MaskFrameCluster(Int_t iSM, Int_t ieta) const;
190 
191 
192  // Define zones for clusters for pT dependance in Pi0 calibration study
193 
194 // Int_t IsInWhichZone(Int_t iSupMod, Int_t ieta, Int_t iphi);
195  Bool_t IsInZone1(Int_t iSupMod, Int_t ieta, Int_t iphi);
196 
197  Bool_t IsInZone2(Int_t iSupMod, Int_t ieta, Int_t iphi);
198 
199  Bool_t IsInZone3(Int_t iSupMod, Int_t ieta, Int_t iphi);
200 
201  Bool_t IsInZone4(Int_t iSupMod, Int_t ieta, Int_t iphi);
202 
203  Bool_t IsInZone5(Int_t iSupMod, Int_t ieta, Int_t iphi);
204 
205  Bool_t IsInZone6(Int_t iSupMod, Int_t ieta, Int_t iphi);
206 
207  Bool_t IsInZone7(Int_t iSupMod, Int_t ieta, Int_t iphi);
208 
209 private:
210 
211  AliEMCALGeometry * fEMCALGeo;
212 
214  TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules];
215 
217 
218 
220 
222 
223  AliEMCALRecoUtils * fRecoUtils;
224 
226 
228 
230 
232 
233  TRefArray * fCaloClustersArr;
234 
235  AliVCaloCells * fEMCALCells;
236 
237 //TList * fCuts ; //!<! List with analysis cuts.
238 
240 
242 
244 
246 
248 
249  // Analysis cuts
250 
253 
256 
259 
262 
265 
269 
271 
274 
276 
278 
280 
282  Int_t* fMaskCellColumns; //[fNMaskCellColumns]
283 
285 
287 
289 
291 
293 
294 
297 
298  // Output histograms and settings
299 
303 
307 
311 
312  // Temporal TLorentzVectors, avoir recreation per event
313 
314  TLorentzVector fMomentum1 ;
315  TLorentzVector fMomentum2 ;
316  TLorentzVector fMomentum12;
317 
318  // Histograms
319 
321  TH1F* fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
322  TH1F* fhEnergy[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
323 
326  TH2F* fHmggSM[AliEMCALGeoParams::fgkEMCALModules];
327  TH2F* fHmggSM_Zone1[AliEMCALGeoParams::fgkEMCALModules];
328  TH2F* fHmggSM_Zone2[AliEMCALGeoParams::fgkEMCALModules];
329  TH2F* fHmggSM_Zone3[AliEMCALGeoParams::fgkEMCALModules];
330  TH2F* fHmggSM_Zone4[AliEMCALGeoParams::fgkEMCALModules];
331  TH2F* fHmggSM_Zone5[AliEMCALGeoParams::fgkEMCALModules];
332  TH2F* fHmggSM_Zone6[AliEMCALGeoParams::fgkEMCALModules];
333  TH2F* fHmggSM_Zone7[AliEMCALGeoParams::fgkEMCALModules];
334  TH2F* fhTopoClusterCase0[AliEMCALGeoParams::fgkEMCALModules];
335  TH2F* fhTopoClusterCase1[AliEMCALGeoParams::fgkEMCALModules];
336  TH2F* fhTopoClusterCase2[AliEMCALGeoParams::fgkEMCALModules];
337  TH2F* fhTopoClusterCase3[AliEMCALGeoParams::fgkEMCALModules];
338  TH2F* fhTopoClusterAmpCase0[AliEMCALGeoParams::fgkEMCALModules];
339  TH2F* fhTopoClusterAmpCase1[AliEMCALGeoParams::fgkEMCALModules];
340  TH2F* fhTopoClusterAmpCase2[AliEMCALGeoParams::fgkEMCALModules];
341  TH2F* fhTopoClusterAmpCase3[AliEMCALGeoParams::fgkEMCALModules];
342 
343  TH2F* fhTopoClusterAmpFractionCase0[AliEMCALGeoParams::fgkEMCALModules];
344  TH2F* fhTopoClusterAmpFractionCase1[AliEMCALGeoParams::fgkEMCALModules];
345  TH2F* fhTopoClusterAmpFractionCase2[AliEMCALGeoParams::fgkEMCALModules];
346  TH2F* fhTopoClusterAmpFractionCase3[AliEMCALGeoParams::fgkEMCALModules];
347  TH2F* fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2];
348  TH2F* fHmggPairSameSideSM [AliEMCALGeoParams::fgkEMCALModules-2];
349 
352  TH2F* fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules];
353  TH2F* fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2];
354  TH2F* fHmggPairSameSideSMMaskFrame [AliEMCALGeoParams::fgkEMCALModules-2];
355 
358  TH2F* fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules];
359  TH2F* fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules];
360 
363  TH2F* fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules];
364  TH2F* fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules];
365 
366  TH2F* fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules] ;
367  TH2F* fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules] ;
368  TH2F* fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules] ;
369  TH2F* fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules] ;
370 
372 
373  // Cluster time histograms
374  TH2F* fHTpi0[4];
376  TH2F* fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules] ;
378  TH2F* fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules];
379  TH2F* fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2];
380  TH2F* fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2];
381 
384 
387 
391 
392 };
393 
394 #endif //ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
TH2F * fHmggSM_Zone4[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 4.
Float_t fDTimeCut
Maximum difference between time of cluster pairs (ns).
TH2F * fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2]
! Two-cluster invariant mass per Pair, mask clusters facing frames.
TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules]
Bool_t IsInZone3(Int_t iSupMod, Int_t ieta, Int_t iphi)
TH2F * fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2]
! Diference in time of clusters same side.
Bool_t IsInZone6(Int_t iSupMod, Int_t ieta, Int_t iphi)
Float_t fEBkgmin
Minimum cluster energy (GeV) for bkg shape study (only for high M02 clusters).
TH2F * fHmggSM_Zone3[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 3.
double Double_t
Definition: External.C:58
Int_t fNTimeBins
N time bins of invariant mass histograms.
TH2F * fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules]
! Cells ordered in column/row for different module, number of times a decay photon hits...
Float_t fInvMassCutMax
Maximum mass cut for clusters to fill time or other histograms.
Definition: External.C:236
void SetImportGeometryFromFile(Bool_t import, TString path="")
TH2F * fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster asymmetry vs pt per Pair,with mass close to pi0.
TH1F * fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]
< Two-cluster invariant mass assigned to each cell.
void SetClusterOpeningAngleCutsForBkgShapeStudy(Float_t opmin, Float_t opmax)
Bool_t IsInZone4(Int_t iSupMod, Int_t ieta, Int_t iphi)
TString fImportGeometryFilePath
Path fo geometry.root file.
TH2F * fhTopoClusterAmpCase0[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 0 cluster in noisy quartet
Bool_t fSameSM
Combine clusters in channels on same SM.
Bool_t fLoadMatrices
Matrices set from configuration, not get from geometry.root or from ESDs/AODs.
AliEMCALRecoUtils * fRecoUtils
Access to reconstruction utilities.
AliEMCALGeometry * fEMCALGeo
! EMCAL geometry pointer.
Float_t fMaxTimeBin
Maximum time bins of invariant mass histograms.
Bool_t fSelectOnlyPhotonsInDifferentSM
Select only pairs of photons that are not in the same SM.
Float_t fLogWeight
Logarithmic weight used in cluster recalibration.
Bool_t IsInZone7(Int_t iSupMod, Int_t ieta, Int_t iphi)
TH2F * fHAsymmetry
! Two-cluster asymmetry vs pt of pair, with mass close to pi0.
This task provides the input for the EMCal energy calibration with pi0 invariant mass analysis per ch...
Float_t fMinTimeBin
Minimum time bins of invariant mass histograms.
Bool_t IsInZone5(Int_t iSupMod, Int_t ieta, Int_t iphi)
Int_t FindPositionInNoisyQuartet(Int_t irow, Int_t icol, Int_t iSM)
TH2F * fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules]
! Diference in time of clusters same SM.
TH2F * fHOpeningAngleDifferentSM
! Two-cluster opening angle vs pt of pair, each cluster in different SM, with mass close to pi0...
TH2F * fHOpeningAngle
! Two-cluster opening angle vs pt of pair, with mass close to pi0.
TH2F * fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules]
! Timing of clusters vs energy per SM.
TH2F * fHmggSM_Zone5[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 5.
TH2F * fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster opening angle vs pt per SM,with mass close to pi0.
TLorentzVector fMomentum2
Cluster kinematics, temporal.
TH2F * fhTopoClusterAmpCase2[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 2 cluster in noisy quartet
Float_t fInvMassCutMin
Minimum mass cut for clusters to fill time or other histograms.
TH2F * fhTopoClusterAmpCase3[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 3 cluster in noisy quartet
Float_t fOpAnglemax
Maximum cluster opening angle for bkg shape study.
Float_t fMinEnergyBin
Minimum energy bins of cell energy histograms.
Bool_t IsInZone2(Int_t iSupMod, Int_t ieta, Int_t iphi)
int Int_t
Definition: External.C:63
Int_t fNEnergybins
N energy bins of cell energy histograms.
TH2F * fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster asymmetry vs pt per SM,with mass close to pi0.
Definition: External.C:204
TString fCalibFilePath
Full path with file with energy calibration factors per channel from previous iteration.
float Float_t
Definition: External.C:68
TH2F * fHmggSM[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM.
TH2F * fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules]
! Cells ordered in column/row for different module, number of times a decay photon hits...
TH2F * fhTopoClusterAmpCase1[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 1 cluster in noisy quartet
TH2F * fhTopoClusterCase2[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 2 cluster in noisy quartet
void SetEnergyHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin)
void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin)
Bool_t fSelectOnlyCellSignalOutOfCollision
Select cells / clusters that are due to noise, i.e. signal in EMCal that happens not during collision...
TH2F * fHmggSM_Zone6[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 6.
TH2F * fHmgg
! Two-cluster invariant mass vs pt of pair.
TH2F * fHTpi0[4]
! Time of cell under pi0 mass, for 4 bunch crossings.
Float_t fEBkgmax
Maximum cluster energy (GeV) for bkg shape study (only for high M02 clusters).
AliAnalysisTaskEMCALPi0CalibSelection()
Default constructor. Arrays initialization is done here.
TH1F * fhEnergy[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]
! Energy distribution for each cell.
Float_t fMinBin
Minimum mass bins of invariant mass histograms.
TH2F * fhTopoClusterAmpFractionCase2[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude fraction map for type 2 cluster in noisy quartet
TH2F * fhTopoClusterCase0[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 0 cluster in noisy quartet
Bool_t fRecalPosition
Switch on/off cluster position calculation, in case alignment matrices are not available.
TH2F * fhTopoClusterCase1[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 1 cluster in noisy quartet
Float_t fMaxEnergyBin
Maximum energy bins of cell energy histograms.
TString fTriggerName
Trigger name must contain this name.
Bool_t fChangeBkgShape
Select clusters with nominal M02 cuts (fL0min,fL0max) plus high M02 clusters (fL0Bkgmin,fL0Bkgmax)
TH2F * fHmggDifferentSMMaskFrame
! Two-cluster invariant mass vs pt of pair, each cluster in different SM,mask clusters facing frames...
TH2F * fhTopoClusterAmpFractionCase3[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude fraction map for type 3 cluster in noisy quartet
TH2F * fhClusterPairDiffTime
! Diference in time of clusters.
Int_t fNbins
N mass bins of invariant mass histograms.
TH2F * fHmggSM_Zone2[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 2.
void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells *cells, AliVCluster *clu, Int_t &iSM, Int_t &ieta, Int_t &iphi)
TH2F * fhClusterTime
! Timing of clusters vs energy.
TLorentzVector fMomentum12
Cluster pair kinematics, temporal.
TH2F * fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules]
! Cells ordered in column/row for different module, accumulated asymmetry in the tower by decay photo...
TH2F * fHmggPairSameSideSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules-2]
! Two-cluster invariant mass per Pair, mask clusters facing frames.
Bool_t fCorrectClusters
Correct clusters energy, position etc.
void UserCreateOutputObjects()
Create output container, init geometry.
TH2F * fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM, mask clusters facing frames.
void Terminate(Option_t *opt)
Create cuts/param objects and publish to slot. Comment out for the moment.
TH2F * fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules]
! Cells ordered in column/row for different module, accumulated energy in the tower by decay photons...
Float_t fL0Bkgmax
Maximum cluster L0 for bkg shape study.
TH2F * fHmggPairSameSideSM[AliEMCALGeoParams::fgkEMCALModules-2]
! Two-cluster invariant mass per Pair.
TH2F * fhTopoClusterAmpFractionCase0[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude fraction map for type 0 cluster in noisy quartet
Float_t fL0Bkgmin
Minimum cluster L0 for bkg shape study.
TH2F * fhTopoClusterCase3[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 3 cluster in noisy quartet
Float_t fMaxBin
Maximum mass bins of invariant mass histograms.
TH2F * fHmggDifferentSM
! Two-cluster invariant mass vs pt of pair, each cluster in different SM.
AliAnalysisTaskEMCALPi0CalibSelection & operator=(const AliAnalysisTaskEMCALPi0CalibSelection &)
Assignment operator not implemented.
TH2F * fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2]
! Diference in time of clusters same sector.
const char Option_t
Definition: External.C:48
TH1I * fhNEvents
! Number of events counter histogram.
TLorentzVector fMomentum1
Cluster kinematics, temporal.
TH2F * fHmggMaskFrame
! Two-cluster invariant mass vs pt of pair, mask clusters facing frames.
Bool_t fImportGeometryFromFile
Import geometry settings in geometry.root file.
Bool_t IsInZone1(Int_t iSupMod, Int_t ieta, Int_t iphi)
bool Bool_t
Definition: External.C:53
TString fOADBFilePath
Default path $ALICE_PHYSICS/OADB/EMCAL, if needed change.
TH2F * fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster opening angle vs pt per Pair,with mass close to pi0.
void SetClusterLambda0CutsForBkgShapeStudy(Float_t min, Float_t max)
Float_t fOpAnglemin
Minimum cluster opening angle for bkg shape study.
void SetTimeHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin)
Bool_t fFilteredInput
Read input produced with filter.
TH2F * fHAsymmetryDifferentSM
! Two-cluster asymmetry vs pt of pair, each cluster in different SM, with mass close to pi0...
TH2F * fHmggSM_Zone1[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 1.
TH2F * fhTopoClusterAmpFractionCase1[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude fraction map for type 1 cluster in noisy quartet
TH2F * fHmggSM_Zone7[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 7.
TH2F * fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2]
! Two-cluster invariant mass per Pair.