AliPhysics  v5-06-40-01 (42bb456)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
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 
41 class AliAnalysisTaskEMCALPi0CalibSelection : public AliAnalysisTaskSE
42 {
43 
44 public:
45 
46  AliAnalysisTaskEMCALPi0CalibSelection(const char* name);
47 
49 
50  void CorrectClusters();
51 
52  void FillHistograms();
53 
55 
56  void InitGeometryMatrices();
57 
59 
61 
62  void UserExec(Option_t * opt);
63 
64  void PrintInfo();
65 
66  void Terminate(Option_t* opt);
67 
68  void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells* cells, AliVCluster* clu, Int_t& iSM, Int_t& ieta, Int_t& iphi);
69 
70  // Analysis parameter setting
71 
72  void SetPairDTimeCut(Float_t t) { fDTimeCut = t ; }
73 
74  void SetClusterMinTime(Float_t tmin) { fTimeMin = tmin ; }
75 
76  void SetClusterMaxTime(Float_t tmax) { fTimeMax = tmax ; }
77 
78  void SetAsymmetryCut(Float_t asy) { fAsyCut = asy ; }
79 
80  void SetClusterMinEnergy(Float_t emin) { fEmin = emin ; }
81 
82  void SetClusterMaxEnergy(Float_t emax) { fEmax = emax ; }
83 
84  void SetClusterLambda0Cuts(Float_t min, Float_t max){ fL0max = max ;
85  fL0min = min ; }
86  void SetClusterMinNCells(Int_t n) { fMinNCells = n ; }
87 
88  void SetNCellsGroup(Int_t n) { fGroupNCells = n ; }
89 
90  void SetLogWeight(Float_t w) { fLogWeight = w ; }
91 
92  void SetPairMinMassCut(Float_t min) { fInvMassCutMin = min ; }
93 
94  void SetPairMaxMassCut(Float_t max) { fInvMassCutMax = max ; }
95 
96  void SwitchOnSameSM() { fSameSM = kTRUE ; }
97 
98  void SwitchOffSameSM() { fSameSM = kFALSE ; }
99 
101 
102  void UseNormalEventAsInput() { fFilteredInput = kFALSE ; }
103 
104  void SetTriggerName(TString name) { fTriggerName = name ; }
105 
106  // Geometry setters
107 
108  void SetGeometryName(TString name) { fEMCALGeoName = name ; }
109 
110  TString GeometryName() const { return fEMCALGeoName ; }
111 
113 
115 
116  void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fMatrix[i] = m ; }
117 
118  void SetOADBFilePath(TString path) { fOADBFilePath = path ; }
119 
120  void SetCalibrationFilePath( TString path ) { fCalibFilePath = path ; }
121 
122  // Cluster recalculation
123 
125 
127 
129 
131 
132  void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
133 
134  AliEMCALRecoUtils* GetEMCALRecoUtils() const { return fRecoUtils ; }
135 
136  void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
137  fNbins = nBins ; fMinBin = minbin ; fMaxBin = maxbin ; }
138 
139  void SetTimeHistoBinRange (Int_t nBins, Float_t minbin, Float_t maxbin){
140  fNTimeBins = nBins ; fMinTimeBin = minbin ; fMaxTimeBin = maxbin ; }
141 
142 
143  // Mask clusters
144 
145  void SetNMaskCellColumns(Int_t n) ;
146 
147  void SetMaskCellColumn(Int_t ipos, Int_t icol) ;
148 
149  Bool_t MaskFrameCluster(Int_t iSM, Int_t ieta) const;
150 
151 private:
152 
153  AliEMCALGeometry * fEMCALGeo;
154 
156  TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules];
157 
158  Bool_t fLoadMatrices;
159 
160 
161  TString fEMCALGeoName;
162 
163  TString fTriggerName;
164 
165  AliEMCALRecoUtils * fRecoUtils;
166 
167  TString fOADBFilePath ;
168 
169  TString fCalibFilePath;
170 
172 
173  Bool_t fRecalPosition;
174 
175  TRefArray * fCaloClustersArr;
176 
177  AliVCaloCells * fEMCALCells;
178 
179  TList * fCuts ;
180 
182 
183  Double_t fVertex[3];
184 
185  Bool_t fFilteredInput;
186 
187  // Analysis cuts
188 
189  Float_t fEmin;
190  Float_t fEmax;
191 
192  Float_t fL0min;
193  Float_t fL0max;
194 
195  Float_t fDTimeCut;
196  Float_t fTimeMax;
197  Float_t fTimeMin;
198 
199  Float_t fAsyCut;
200 
201  Int_t fMinNCells;
202  Int_t fGroupNCells;
203 
204  Float_t fLogWeight;
205 
206  Bool_t fSameSM;
207 
209 
211  Int_t* fMaskCellColumns; //[fNMaskCellColumns]
212 
213  Float_t fInvMassCutMin;
214  Float_t fInvMassCutMax;
215 
216  // Output histograms and settings
217 
218  Int_t fNbins;
219  Float_t fMinBin;
220  Float_t fMaxBin;
221 
222  Int_t fNTimeBins;
223  Float_t fMinTimeBin;
224  Float_t fMaxTimeBin;
225 
226  // Temporal TLorentzVectors, avoir recreation per event
227 
228  TLorentzVector fMomentum1 ;
229  TLorentzVector fMomentum2 ;
230  TLorentzVector fMomentum12;
231 
232  // Histograms
233 
235  TH1F* fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
236 
237  TH2F* fHmgg;
239  TH2F* fHmggSM[AliEMCALGeoParams::fgkEMCALModules];
240  TH2F* fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2];
241  TH2F* fHmggPairSameSideSM [AliEMCALGeoParams::fgkEMCALModules-2];
242 
245  TH2F* fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules];
246  TH2F* fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2];
247  TH2F* fHmggPairSameSideSMMaskFrame [AliEMCALGeoParams::fgkEMCALModules-2];
248 
251  TH2F* fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules];
252  TH2F* fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules];
253 
254  TH2F* fHAsymmetry;
256  TH2F* fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules];
257  TH2F* fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules];
258 
259  TH2F* fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules] ;
260  TH2F* fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules] ;
261  TH2F* fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules] ;
262  TH2F* fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules] ;
263 
264  TH1I* fhNEvents;
265 
266  // Cluster time histograms
267  TH2F* fHTpi0[4];
268  TH2F* fhClusterTime ;
269  TH2F* fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules] ;
271  TH2F* fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules];
272  TH2F* fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2];
273  TH2F* fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2];
274 
277 
280 
284 
285 };
286 
287 #endif //ALIANALYSISTASKEMCALPI0CALIBSELECTION_H
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]
TH2F * fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2]
! Diference in time of clusters same side.
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.
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.
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.
Float_t fLogWeight
Logarithmic weight used in cluster recalibration.
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.
AliAnalysisTaskEMCALPi0CalibSelection(const char *name)
Default constructor. Arrays initialization is done here.
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 * fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster opening angle vs pt per SM,with mass close to pi0.
TLorentzVector fMomentum2
Cluster kinematics, temporal.
Float_t fInvMassCutMin
Minimum mass cut for clusters to fill time or other histograms.
TH2F * fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster asymmetry vs pt per SM,with mass close to pi0.
TString fCalibFilePath
Full path with file with energy calibration factors per channel from previous iteration.
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...
void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin)
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 fMinBin
Minimum mass bins of invariant mass histograms.
Bool_t fRecalPosition
Switch on/off cluster position calculation, in case alignment matrices are not available.
TString fTriggerName
Trigger name must contain this name.
TH2F * fHmggDifferentSMMaskFrame
! Two-cluster invariant mass vs pt of pair, each cluster in different SM,mask clusters facing frames...
TH2F * fhClusterPairDiffTime
! Diference in time of clusters.
Int_t fNbins
N mass bins of invariant mass histograms.
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.
TH2F * fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules]
! Cells ordered in column/row for different module, accumulated energy in the tower by decay photons...
TH2F * fHmggPairSameSideSM[AliEMCALGeoParams::fgkEMCALModules-2]
! Two-cluster invariant mass per Pair.
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.
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.
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 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 * fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2]
! Two-cluster invariant mass per Pair.