AliPhysics  a0db429 (a0db429)
 All Classes Namespaces Files Functions Variables Typedefs 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 
158  // Define zones for clusters for pT dependance in Pi0 calibration study
159 
160 // Int_t IsInWhichZone(Int_t iSupMod, Int_t ieta, Int_t iphi);
161  Bool_t IsInZone1(Int_t iSupMod, Int_t ieta, Int_t iphi);
162 
163  Bool_t IsInZone2(Int_t iSupMod, Int_t ieta, Int_t iphi);
164 
165  Bool_t IsInZone3(Int_t iSupMod, Int_t ieta, Int_t iphi);
166 
167  Bool_t IsInZone4(Int_t iSupMod, Int_t ieta, Int_t iphi);
168 
169  Bool_t IsInZone5(Int_t iSupMod, Int_t ieta, Int_t iphi);
170 
171  Bool_t IsInZone6(Int_t iSupMod, Int_t ieta, Int_t iphi);
172 
173  Bool_t IsInZone7(Int_t iSupMod, Int_t ieta, Int_t iphi);
174 
175 private:
176 
177  AliEMCALGeometry * fEMCALGeo;
178 
180  TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules];
181 
182  Bool_t fLoadMatrices;
183 
184 
185  TString fEMCALGeoName;
186 
187  TString fTriggerName;
188 
189  AliEMCALRecoUtils * fRecoUtils;
190 
191  TString fOADBFilePath ;
192 
193  TString fCalibFilePath;
194 
196 
197  Bool_t fRecalPosition;
198 
199  TRefArray * fCaloClustersArr;
200 
201  AliVCaloCells * fEMCALCells;
202 
203 // TList * fCuts ; //!<! List with analysis cuts.
204 
206 
207  Double_t fVertex[3];
208 
209  Bool_t fFilteredInput;
210 
212 
214 
215  // Analysis cuts
216 
217  Float_t fEmin;
218  Float_t fEmax;
219 
220  Float_t fL0min;
221  Float_t fL0max;
222 
223  Float_t fDTimeCut;
224  Float_t fTimeMax;
225  Float_t fTimeMin;
226 
227  Float_t fAsyCut;
228 
229  Int_t fMinNCells;
230  Int_t fGroupNCells;
231 
232  Float_t fLogWeight;
233 
234  Bool_t fSameSM;
235 
237 
239  Int_t* fMaskCellColumns; //[fNMaskCellColumns]
240 
241  Float_t fInvMassCutMin;
242  Float_t fInvMassCutMax;
243 
244  // Output histograms and settings
245 
246  Int_t fNbins;
247  Float_t fMinBin;
248  Float_t fMaxBin;
249 
250  Int_t fNTimeBins;
251  Float_t fMinTimeBin;
252  Float_t fMaxTimeBin;
253 
254  // Temporal TLorentzVectors, avoir recreation per event
255 
256  TLorentzVector fMomentum1 ;
257  TLorentzVector fMomentum2 ;
258  TLorentzVector fMomentum12;
259 
260  // Histograms
261 
263  TH1F* fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
264 
265  TH2F* fHmgg;
267  TH2F* fHmggSM[AliEMCALGeoParams::fgkEMCALModules];
268  TH2F* fHmggSM_Zone1[AliEMCALGeoParams::fgkEMCALModules];
269  TH2F* fHmggSM_Zone2[AliEMCALGeoParams::fgkEMCALModules];
270  TH2F* fHmggSM_Zone3[AliEMCALGeoParams::fgkEMCALModules];
271  TH2F* fHmggSM_Zone4[AliEMCALGeoParams::fgkEMCALModules];
272  TH2F* fHmggSM_Zone5[AliEMCALGeoParams::fgkEMCALModules];
273  TH2F* fHmggSM_Zone6[AliEMCALGeoParams::fgkEMCALModules];
274  TH2F* fHmggSM_Zone7[AliEMCALGeoParams::fgkEMCALModules];
275  TH2F* fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2];
276  TH2F* fHmggPairSameSideSM [AliEMCALGeoParams::fgkEMCALModules-2];
277 
280  TH2F* fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules];
281  TH2F* fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2];
282  TH2F* fHmggPairSameSideSMMaskFrame [AliEMCALGeoParams::fgkEMCALModules-2];
283 
286  TH2F* fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules];
287  TH2F* fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules];
288 
289  TH2F* fHAsymmetry;
291  TH2F* fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules];
292  TH2F* fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules];
293 
294  TH2F* fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules] ;
295  TH2F* fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules] ;
296  TH2F* fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules] ;
297  TH2F* fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules] ;
298 
299  TH1I* fhNEvents;
300 
301  // Cluster time histograms
302  TH2F* fHTpi0[4];
303  TH2F* fhClusterTime ;
304  TH2F* fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules] ;
306  TH2F* fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules];
307  TH2F* fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2];
308  TH2F* fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2];
309 
312 
315 
319 
320 };
321 
322 #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)
TH2F * fHmggSM_Zone3[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 3.
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.
Bool_t IsInZone4(Int_t iSupMod, Int_t ieta, Int_t iphi)
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.
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)
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.
Float_t fInvMassCutMin
Minimum mass cut for clusters to fill time or other histograms.
Bool_t IsInZone2(Int_t iSupMod, Int_t ieta, Int_t iphi)
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 * 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.
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.
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...
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.
Bool_t IsInZone1(Int_t iSupMod, Int_t ieta, Int_t iphi)
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 * fHmggSM_Zone1[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 1.
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.