AliPhysics  vAN-20151012 (2287573)
 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 
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 
72  // Analysis parameter setting
73 
74  void SetPairDTimeCut(Float_t t) { fDTimeCut = t ; }
75 
76  void SetClusterMinTime(Float_t tmin) { fTimeMin = tmin ; }
77 
78  void SetClusterMaxTime(Float_t tmax) { fTimeMax = tmax ; }
79 
80  void SetAsymmetryCut(Float_t asy) { fAsyCut = asy ; }
81 
82  void SetClusterMinEnergy(Float_t emin) { fEmin = emin ; }
83 
84  void SetClusterMaxEnergy(Float_t emax) { fEmax = emax ; }
85 
86  void SetClusterLambda0Cuts(Float_t min, Float_t max){ fL0max = max ;
87  fL0min = min ; }
88  void SetClusterMinNCells(Int_t n) { fMinNCells = n ; }
89 
90  void SetNCellsGroup(Int_t n) { fGroupNCells = n ; }
91 
92  void SetLogWeight(Float_t w) { fLogWeight = w ; }
93 
94  void SetPairMinMassCut(Float_t min) { fInvMassCutMin = min ; }
95 
96  void SetPairMaxMassCut(Float_t max) { fInvMassCutMax = max ; }
97 
98  void SwitchOnSameSM() { fSameSM = kTRUE ; }
99 
100  void SwitchOffSameSM() { fSameSM = kFALSE ; }
101 
103 
104  void UseNormalEventAsInput() { fFilteredInput = kFALSE ; }
105 
106  void SetTriggerName(TString name) { fTriggerName = name ; }
107 
108  // Geometry setters
109 
110  void SetGeometryName(TString name) { fEMCALGeoName = name ; }
111 
112  TString GeometryName() const { return fEMCALGeoName ; }
113 
115 
117 
118  void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fMatrix[i] = m ; }
119 
120  void SetOADBFilePath(TString path) { fOADBFilePath = path ; }
121 
122  void SetCalibrationFilePath( TString path ) { fCalibFilePath = path ; }
123 
124  // Cluster recalculation
125 
127 
129 
131 
133 
134  void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
135 
136  AliEMCALRecoUtils* GetEMCALRecoUtils() const { return fRecoUtils ; }
137 
138  void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
139  fNbins = nBins ; fMinBin = minbin ; fMaxBin = maxbin ; }
140 
141  void SetTimeHistoBinRange (Int_t nBins, Float_t minbin, Float_t maxbin){
142  fNTimeBins = nBins ; fMinTimeBin = minbin ; fMaxTimeBin = maxbin ; }
143 
144 
145  void SetImportGeometryFromFile(Bool_t import, TString path = ""){
146  fImportGeometryFromFile = import ;
147  fImportGeometryFilePath = path ; }
148 
149  // Mask clusters
150 
151  void SetNMaskCellColumns(Int_t n) ;
152 
153  void SetMaskCellColumn(Int_t ipos, Int_t icol) ;
154 
155  Bool_t MaskFrameCluster(Int_t iSM, Int_t ieta) const;
156 
157 private:
158 
159  AliEMCALGeometry * fEMCALGeo;
160 
162  TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules];
163 
164  Bool_t fLoadMatrices;
165 
166 
167  TString fEMCALGeoName;
168 
169  TString fTriggerName;
170 
171  AliEMCALRecoUtils * fRecoUtils;
172 
173  TString fOADBFilePath ;
174 
175  TString fCalibFilePath;
176 
178 
179  Bool_t fRecalPosition;
180 
181  TRefArray * fCaloClustersArr;
182 
183  AliVCaloCells * fEMCALCells;
184 
185 // TList * fCuts ; //!<! List with analysis cuts.
186 
188 
189  Double_t fVertex[3];
190 
191  Bool_t fFilteredInput;
192 
194 
196 
197  // Analysis cuts
198 
199  Float_t fEmin;
200  Float_t fEmax;
201 
202  Float_t fL0min;
203  Float_t fL0max;
204 
205  Float_t fDTimeCut;
206  Float_t fTimeMax;
207  Float_t fTimeMin;
208 
209  Float_t fAsyCut;
210 
211  Int_t fMinNCells;
212  Int_t fGroupNCells;
213 
214  Float_t fLogWeight;
215 
216  Bool_t fSameSM;
217 
219 
221  Int_t* fMaskCellColumns; //[fNMaskCellColumns]
222 
223  Float_t fInvMassCutMin;
224  Float_t fInvMassCutMax;
225 
226  // Output histograms and settings
227 
228  Int_t fNbins;
229  Float_t fMinBin;
230  Float_t fMaxBin;
231 
232  Int_t fNTimeBins;
233  Float_t fMinTimeBin;
234  Float_t fMaxTimeBin;
235 
236  // Temporal TLorentzVectors, avoir recreation per event
237 
238  TLorentzVector fMomentum1 ;
239  TLorentzVector fMomentum2 ;
240  TLorentzVector fMomentum12;
241 
242  // Histograms
243 
245  TH1F* fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
246 
247  TH2F* fHmgg;
249  TH2F* fHmggSM[AliEMCALGeoParams::fgkEMCALModules];
250  TH2F* fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2];
251  TH2F* fHmggPairSameSideSM [AliEMCALGeoParams::fgkEMCALModules-2];
252 
255  TH2F* fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules];
256  TH2F* fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2];
257  TH2F* fHmggPairSameSideSMMaskFrame [AliEMCALGeoParams::fgkEMCALModules-2];
258 
261  TH2F* fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules];
262  TH2F* fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules];
263 
264  TH2F* fHAsymmetry;
266  TH2F* fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules];
267  TH2F* fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules];
268 
269  TH2F* fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules] ;
270  TH2F* fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules] ;
271  TH2F* fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules] ;
272  TH2F* fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules] ;
273 
274  TH1I* fhNEvents;
275 
276  // Cluster time histograms
277  TH2F* fHTpi0[4];
278  TH2F* fhClusterTime ;
279  TH2F* fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules] ;
281  TH2F* fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules];
282  TH2F* fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2];
283  TH2F* fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2];
284 
287 
290 
294 
295 };
296 
297 #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.
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.
TString fImportGeometryFilePath
Path fo geometry.root file.
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.
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.
AliAnalysisTaskEMCALPi0CalibSelection()
Default constructor. Arrays initialization is done here.
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. 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...
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.
Bool_t fImportGeometryFromFile
Import geometry settings in geometry.root file.
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.