AliPhysics  9b6b435 (9b6b435)
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 SwitchOnCentrality() { fCheckCentrality = kTRUE ; }
79 
81 
83 
84  void SetCentralityRange(Float_t min, Float_t max) { fCentMin = min; fCentMax = max; }
85 
86  void SetPairDTimeCut(Float_t t) { fDTimeCut = t ; }
87 
88  void SetClusterMinTime(Float_t tmin) { fTimeMin = tmin ; }
89 
90  void SetClusterMaxTime(Float_t tmax) { fTimeMax = tmax ; }
91 
92  void SetAsymmetryCut(Float_t asy) { fAsyCut = asy ; }
93 
94  void SetClusterMinEnergy(Float_t emin) { fEmin = emin ; }
95 
96  void SetClusterMaxEnergy(Float_t emax) { fEmax = emax ; }
97 
99 
101 
102  void SetClusterLambda0Cuts(Float_t min, Float_t max){ fL0max = max ;
103  fL0min = min ; }
105 
107 
109 
111 
112  void SetLogWeight(Float_t w) { fLogWeight = w ; }
113 
115 
117 
118  void SwitchOnSameSM() { fSameSM = kTRUE ; }
119 
120  void SwitchOffSameSM() { fSameSM = kFALSE ; }
121 
123 
124  void UseNormalEventAsInput() { fFilteredInput = kFALSE ; }
125 
126  void SetTriggerName(TString name) { fTriggerName = name ; }
127 
129 
131 
133 
135 
137 
139 
141 
143 
145 
147 
148  // Geometry setters
149 
150  void SetGeometryName(TString name) { fEMCALGeoName = name ; }
151 
152  TString GeometryName() const { return fEMCALGeoName ; }
153 
155 
157 
158  void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fMatrix[i] = m ; }
159 
160  void SetOADBFilePath(TString path) { fOADBFilePath = path ; }
161 
163 
164  // Cluster recalculation
165 
167 
169 
171 
173 
175 
177 
178  void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
179  fNbins = nBins ; fMinBin = minbin ; fMaxBin = maxbin ; }
180 
181  void SetEnergyHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
182  fNEnergybins = nBins ; fMinEnergyBin = minbin ; fMaxEnergyBin = maxbin ; }
183 
184  void SetTimeHistoBinRange (Int_t nBins, Float_t minbin, Float_t maxbin){
185  fNTimeBins = nBins ; fMinTimeBin = minbin ; fMaxTimeBin = maxbin ; }
186 
187 
188  void SetImportGeometryFromFile(Bool_t import, TString path = ""){
189  fImportGeometryFromFile = import ;
190  fImportGeometryFilePath = path ; }
191 
192  // Mask clusters
193 
194  void SetNMaskCellColumns(Int_t n) ;
195 
196  void SetMaskCellColumn(Int_t ipos, Int_t icol) ;
197 
198  Bool_t MaskFrameCluster(Int_t iSM, Int_t ieta) const;
199 
200 
201  // Define zones for clusters for pT dependance in Pi0 calibration study
202 
203 // Int_t IsInWhichZone(Int_t iSupMod, Int_t ieta, Int_t iphi);
204  Bool_t IsInZone1(Int_t iSupMod, Int_t ieta, Int_t iphi);
205 
206  Bool_t IsInZone2(Int_t iSupMod, Int_t ieta, Int_t iphi);
207 
208  Bool_t IsInZone3(Int_t iSupMod, Int_t ieta, Int_t iphi);
209 
210  Bool_t IsInZone4(Int_t iSupMod, Int_t ieta, Int_t iphi);
211 
212  Bool_t IsInZone5(Int_t iSupMod, Int_t ieta, Int_t iphi);
213 
214  Bool_t IsInZone6(Int_t iSupMod, Int_t ieta, Int_t iphi);
215 
216  Bool_t IsInZone7(Int_t iSupMod, Int_t ieta, Int_t iphi);
217 
218 private:
219 
220  AliEMCALGeometry * fEMCALGeo;
221 
223  TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules];
224 
226 
227 
229 
231 
233 
235 
237 
239 
241 
242  TRefArray * fCaloClustersArr;
243 
244  AliVCaloCells * fEMCALCells;
245 
246 //TList * fCuts ; //!<! List with analysis cuts.
247 
249 
251 
253 
255 
258 
260 
262 
264 
266 
267  // Analysis cuts
268 
271 
274 
277 
280 
283 
287 
289 
292 
294 
296 
298 
300  Int_t* fMaskCellColumns; //[fNMaskCellColumns]
301 
303 
305 
307 
309 
311 
312 
315 
316  // Output histograms and settings
317 
321 
325 
329 
330  // Temporal TLorentzVectors, avoir recreation per event
331 
332  TLorentzVector fMomentum1 ;
333  TLorentzVector fMomentum2 ;
334  TLorentzVector fMomentum12;
335 
336  // Histograms
337 
339  TH1F* fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
340  TH1F* fhEnergy[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
341 
344  TH2F* fHmggSM[AliEMCALGeoParams::fgkEMCALModules];
345  TH2F* fHmggSM_Zone1[AliEMCALGeoParams::fgkEMCALModules];
346  TH2F* fHmggSM_Zone2[AliEMCALGeoParams::fgkEMCALModules];
347  TH2F* fHmggSM_Zone3[AliEMCALGeoParams::fgkEMCALModules];
348  TH2F* fHmggSM_Zone4[AliEMCALGeoParams::fgkEMCALModules];
349  TH2F* fHmggSM_Zone5[AliEMCALGeoParams::fgkEMCALModules];
350  TH2F* fHmggSM_Zone6[AliEMCALGeoParams::fgkEMCALModules];
351  TH2F* fHmggSM_Zone7[AliEMCALGeoParams::fgkEMCALModules];
352  TH2F* fhTopoClusterCase0[AliEMCALGeoParams::fgkEMCALModules];
353  TH2F* fhTopoClusterCase1[AliEMCALGeoParams::fgkEMCALModules];
354  TH2F* fhTopoClusterCase2[AliEMCALGeoParams::fgkEMCALModules];
355  TH2F* fhTopoClusterCase3[AliEMCALGeoParams::fgkEMCALModules];
356  TH2F* fhTopoClusterAmpCase0[AliEMCALGeoParams::fgkEMCALModules];
357  TH2F* fhTopoClusterAmpCase1[AliEMCALGeoParams::fgkEMCALModules];
358  TH2F* fhTopoClusterAmpCase2[AliEMCALGeoParams::fgkEMCALModules];
359  TH2F* fhTopoClusterAmpCase3[AliEMCALGeoParams::fgkEMCALModules];
360 
361  TH2F* fhTopoClusterAmpFractionCase0[AliEMCALGeoParams::fgkEMCALModules];
362  TH2F* fhTopoClusterAmpFractionCase1[AliEMCALGeoParams::fgkEMCALModules];
363  TH2F* fhTopoClusterAmpFractionCase2[AliEMCALGeoParams::fgkEMCALModules];
364  TH2F* fhTopoClusterAmpFractionCase3[AliEMCALGeoParams::fgkEMCALModules];
365  TH2F* fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2];
366  TH2F* fHmggPairSameSideSM [AliEMCALGeoParams::fgkEMCALModules-2];
367 
370  TH2F* fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules];
371  TH2F* fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2];
372  TH2F* fHmggPairSameSideSMMaskFrame [AliEMCALGeoParams::fgkEMCALModules-2];
373 
376  TH2F* fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules];
377  TH2F* fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules];
378 
381  TH2F* fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules];
382  TH2F* fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules];
383 
384  TH2F* fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules] ;
385  TH2F* fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules] ;
386  TH2F* fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules] ;
387  TH2F* fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules] ;
388 
390 
391  TH1F * fhCentrality;
392 
394 
395  // Cluster time histograms
396  TH2F* fHTpi0[4];
398  TH2F* fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules] ;
400  TH2F* fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules];
401  TH2F* fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2];
402  TH2F* fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2];
403 
406 
409 
413 
414 };
415 
416 #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)
TH1F * fhCentralitySelected
! Centrality selected events.
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...
Some utilities for cluster and cell treatment.
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.
Bool_t fCheckCentrality
Activate centrality selection.
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.