AliPhysics  fde8a9f (fde8a9f)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEMCALPi0CalibSelection.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
2 #define ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
3 
4 //---------------------------------------------------------------------------
27 //---------------------------------------------------------------------------
28 
29 // Root includes
30 class TH1F;
31 #include "TH2I.h"
32 #include "TObjArray.h"
33 #include "TLorentzVector.h"
34 
35 // AliRoot includes
36 #include "AliAnalysisTaskSE.h"
37 class AliEMCALGeometry;
38 #include "AliEMCALGeoParams.h"
39 class AliEMCALRecoUtils;
40 
42 {
43 
44 public:
45 
47 
48  AliAnalysisTaskEMCALPi0CalibSelection(const char* name);
49 
51 
52  void CorrectClusters();
53 
54  void FillHistograms();
55 
57 
58  void InitGeometryMatrices();
59 
61 
63 
64  void UserExec(Option_t * opt);
65 
66  void PrintInfo();
67 
68  void Terminate(Option_t* opt);
69 
70  void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells* cells, AliVCluster* clu, Int_t& iSM, Int_t& ieta, Int_t& iphi);
71 
73 
74  // Analysis parameter setting
75 
76  void SetPairDTimeCut(Float_t t) { fDTimeCut = t ; }
77 
78  void SetClusterMinTime(Float_t tmin) { fTimeMin = tmin ; }
79 
80  void SetClusterMaxTime(Float_t tmax) { fTimeMax = tmax ; }
81 
82  void SetAsymmetryCut(Float_t asy) { fAsyCut = asy ; }
83 
84  void SetClusterMinEnergy(Float_t emin) { fEmin = emin ; }
85 
86  void SetClusterMaxEnergy(Float_t emax) { fEmax = emax ; }
87 
89 
91 
92  void SetClusterLambda0Cuts(Float_t min, Float_t max){ fL0max = max ;
93  fL0min = min ; }
95 
97 
99 
101 
102  void SetLogWeight(Float_t w) { fLogWeight = w ; }
103 
105 
107 
108  void SwitchOnSameSM() { fSameSM = kTRUE ; }
109 
110  void SwitchOffSameSM() { fSameSM = kFALSE ; }
111 
113 
114  void UseNormalEventAsInput() { fFilteredInput = kFALSE ; }
115 
116  void SetTriggerName(TString name) { fTriggerName = name ; }
117 
119 
121 
123 
125 
127 
129 
131 
133 
135 
137 
138  // Geometry setters
139 
140  void SetGeometryName(TString name) { fEMCALGeoName = name ; }
141 
142  TString GeometryName() const { return fEMCALGeoName ; }
143 
145 
147 
148  void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fMatrix[i] = m ; }
149 
150  void SetOADBFilePath(TString path) { fOADBFilePath = path ; }
151 
153 
154  // Cluster recalculation
155 
157 
159 
161 
163 
164  void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
165 
166  AliEMCALRecoUtils* GetEMCALRecoUtils() const { return fRecoUtils ; }
167 
168  void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
169  fNbins = nBins ; fMinBin = minbin ; fMaxBin = maxbin ; }
170 
171  void SetEnergyHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
172  fNEnergybins = nBins ; fMinEnergyBin = minbin ; fMaxEnergyBin = maxbin ; }
173 
174  void SetTimeHistoBinRange (Int_t nBins, Float_t minbin, Float_t maxbin){
175  fNTimeBins = nBins ; fMinTimeBin = minbin ; fMaxTimeBin = maxbin ; }
176 
177 
178  void SetImportGeometryFromFile(Bool_t import, TString path = ""){
179  fImportGeometryFromFile = import ;
180  fImportGeometryFilePath = path ; }
181 
182  // Mask clusters
183 
184  void SetNMaskCellColumns(Int_t n) ;
185 
186  void SetMaskCellColumn(Int_t ipos, Int_t icol) ;
187 
188  Bool_t MaskFrameCluster(Int_t iSM, Int_t ieta) const;
189 
190 
191  // Define zones for clusters for pT dependance in Pi0 calibration study
192 
193 // Int_t IsInWhichZone(Int_t iSupMod, Int_t ieta, Int_t iphi);
194  Bool_t IsInZone1(Int_t iSupMod, Int_t ieta, Int_t iphi);
195 
196  Bool_t IsInZone2(Int_t iSupMod, Int_t ieta, Int_t iphi);
197 
198  Bool_t IsInZone3(Int_t iSupMod, Int_t ieta, Int_t iphi);
199 
200  Bool_t IsInZone4(Int_t iSupMod, Int_t ieta, Int_t iphi);
201 
202  Bool_t IsInZone5(Int_t iSupMod, Int_t ieta, Int_t iphi);
203 
204  Bool_t IsInZone6(Int_t iSupMod, Int_t ieta, Int_t iphi);
205 
206  Bool_t IsInZone7(Int_t iSupMod, Int_t ieta, Int_t iphi);
207 
208 private:
209 
210  AliEMCALGeometry * fEMCALGeo;
211 
213  TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules];
214 
216 
217 
219 
221 
222  AliEMCALRecoUtils * fRecoUtils;
223 
225 
227 
229 
231 
232  TRefArray * fCaloClustersArr;
233 
234  AliVCaloCells * fEMCALCells;
235 
236 //TList * fCuts ; //!<! List with analysis cuts.
237 
239 
241 
243 
245 
247 
248  // Analysis cuts
249 
252 
255 
258 
261 
264 
268 
270 
273 
275 
277 
279 
281  Int_t* fMaskCellColumns; //[fNMaskCellColumns]
282 
284 
286 
288 
290 
292 
293 
296 
297  // Output histograms and settings
298 
302 
306 
310 
311  // Temporal TLorentzVectors, avoir recreation per event
312 
313  TLorentzVector fMomentum1 ;
314  TLorentzVector fMomentum2 ;
315  TLorentzVector fMomentum12;
316 
317  // Histograms
318 
320  TH1F* fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
321  TH1F* fhEnergy[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
322 
325  TH2F* fHmggSM[AliEMCALGeoParams::fgkEMCALModules];
326  TH2F* fHmggSM_Zone1[AliEMCALGeoParams::fgkEMCALModules];
327  TH2F* fHmggSM_Zone2[AliEMCALGeoParams::fgkEMCALModules];
328  TH2F* fHmggSM_Zone3[AliEMCALGeoParams::fgkEMCALModules];
329  TH2F* fHmggSM_Zone4[AliEMCALGeoParams::fgkEMCALModules];
330  TH2F* fHmggSM_Zone5[AliEMCALGeoParams::fgkEMCALModules];
331  TH2F* fHmggSM_Zone6[AliEMCALGeoParams::fgkEMCALModules];
332  TH2F* fHmggSM_Zone7[AliEMCALGeoParams::fgkEMCALModules];
333  TH2F* fhTopoClusterCase0[AliEMCALGeoParams::fgkEMCALModules];
334  TH2F* fhTopoClusterCase1[AliEMCALGeoParams::fgkEMCALModules];
335  TH2F* fhTopoClusterCase2[AliEMCALGeoParams::fgkEMCALModules];
336  TH2F* fhTopoClusterCase3[AliEMCALGeoParams::fgkEMCALModules];
337  TH2F* fhTopoClusterAmpCase0[AliEMCALGeoParams::fgkEMCALModules];
338  TH2F* fhTopoClusterAmpCase1[AliEMCALGeoParams::fgkEMCALModules];
339  TH2F* fhTopoClusterAmpCase2[AliEMCALGeoParams::fgkEMCALModules];
340  TH2F* fhTopoClusterAmpCase3[AliEMCALGeoParams::fgkEMCALModules];
341 
342  TH2F* fhTopoClusterAmpFractionCase0[AliEMCALGeoParams::fgkEMCALModules];
343  TH2F* fhTopoClusterAmpFractionCase1[AliEMCALGeoParams::fgkEMCALModules];
344  TH2F* fhTopoClusterAmpFractionCase2[AliEMCALGeoParams::fgkEMCALModules];
345  TH2F* fhTopoClusterAmpFractionCase3[AliEMCALGeoParams::fgkEMCALModules];
346  TH2F* fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2];
347  TH2F* fHmggPairSameSideSM [AliEMCALGeoParams::fgkEMCALModules-2];
348 
351  TH2F* fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules];
352  TH2F* fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2];
353  TH2F* fHmggPairSameSideSMMaskFrame [AliEMCALGeoParams::fgkEMCALModules-2];
354 
357  TH2F* fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules];
358  TH2F* fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules];
359 
362  TH2F* fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules];
363  TH2F* fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules];
364 
365  TH2F* fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules] ;
366  TH2F* fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules] ;
367  TH2F* fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules] ;
368  TH2F* fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules] ;
369 
371 
372  // Cluster time histograms
373  TH2F* fHTpi0[4];
375  TH2F* fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules] ;
377  TH2F* fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules];
378  TH2F* fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2];
379  TH2F* fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2];
380 
383 
386 
390 
391 };
392 
393 #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.