AliPhysics  v5-06-21-01 (1eac791)
 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 
54  void InitGeometryMatrices();
55 
57 
59 
60  void UserExec(Option_t * opt);
61 
62  void PrintInfo();
63 
64  void Terminate(Option_t* opt);
65 
66  void GetMaxEnergyCellPosAndClusterPos(AliVCaloCells* cells, AliVCluster* clu, Int_t& iSM, Int_t& ieta, Int_t& iphi);
67 
68  // Analysis parameter setting
69 
70  void SetPairDTimeCut(Float_t t) { fDTimeCut = t ; }
71 
72  void SetClusterMinTime(Float_t tmin) { fTimeMin = tmin ; }
73 
74  void SetClusterMaxTime(Float_t tmax) { fTimeMax = tmax ; }
75 
76  void SetAsymmetryCut(Float_t asy) { fAsyCut = asy ; }
77 
78  void SetClusterMinEnergy(Float_t emin) { fEmin = emin ; }
79 
80  void SetClusterMaxEnergy(Float_t emax) { fEmax = emax ; }
81 
82  void SetClusterLambda0Cuts(Float_t min, Float_t max){ fL0max = max ;
83  fL0min = min ; }
84  void SetClusterMinNCells(Int_t n) { fMinNCells = n ; }
85 
86  void SetNCellsGroup(Int_t n) { fGroupNCells = n ; }
87 
88  void SetLogWeight(Float_t w) { fLogWeight = w ; }
89 
90  void SetPairMinMassCut(Float_t min) { fInvMassCutMin = min ; }
91 
92  void SetPairMaxMassCut(Float_t max) { fInvMassCutMax = max ; }
93 
94  void SwitchOnSameSM() { fSameSM = kTRUE ; }
95 
96  void SwitchOffSameSM() { fSameSM = kFALSE ; }
97 
99 
100  void UseNormalEventAsInput() { fFilteredInput = kFALSE ; }
101 
102  void SetTriggerName(TString name) { fTriggerName = name ; }
103 
104  // Geometry setters
105 
106  void SetGeometryName(TString name) { fEMCALGeoName = name ; }
107 
108  TString GeometryName() const { return fEMCALGeoName ; }
109 
111 
113 
114  void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fMatrix[i] = m ; }
115 
116  void SetOADBFilePath(TString path) { fOADBFilePath = path ; }
117 
118  // Cluster recalculation
119 
121 
123 
124  void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
125 
126  AliEMCALRecoUtils* GetEMCALRecoUtils() const { return fRecoUtils ; }
127 
128  void SetInvariantMassHistoBinRange(Int_t nBins, Float_t minbin, Float_t maxbin){
129  fNbins = nBins ; fMinBin = minbin ; fMaxBin = maxbin ; }
130 
131  void SetTimeHistoBinRange (Int_t nBins, Float_t minbin, Float_t maxbin){
132  fNTimeBins = nBins ; fMinTimeBin = minbin ; fMaxTimeBin = maxbin ; }
133 
134 
135  // Mask clusters
136 
137  void SetNMaskCellColumns(Int_t n) ;
138 
139  void SetMaskCellColumn(Int_t ipos, Int_t icol) ;
140 
141  Bool_t MaskFrameCluster(Int_t iSM, Int_t ieta) const;
142 
143 private:
144 
145  AliEMCALGeometry * fEMCALGeo;
146 
148  TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules];
149 
150  Bool_t fLoadMatrices;
151 
152 
153  TString fEMCALGeoName;
154 
155  TString fTriggerName;
156 
157 
158  AliEMCALRecoUtils * fRecoUtils;
159 
160  TString fOADBFilePath ;
161 
163 
164 
165  TRefArray * fCaloClustersArr;
166 
167  AliVCaloCells * fEMCALCells;
168 
169  TList * fCuts ;
170 
172 
173  Double_t fVertex[3];
174 
175  Bool_t fFilteredInput;
176 
177  // Analysis cuts
178 
179  Float_t fEmin;
180  Float_t fEmax;
181 
182  Float_t fL0min;
183  Float_t fL0max;
184 
185  Float_t fDTimeCut;
186  Float_t fTimeMax;
187  Float_t fTimeMin;
188 
189  Float_t fAsyCut;
190 
191  Int_t fMinNCells;
192  Int_t fGroupNCells;
193 
194  Float_t fLogWeight;
195 
196  Bool_t fSameSM;
197 
199 
201  Int_t* fMaskCellColumns; //[fNMaskCellColumns]
202 
203  Float_t fInvMassCutMin;
204  Float_t fInvMassCutMax;
205 
206  // Output histograms and settings
207 
208  Int_t fNbins;
209  Float_t fMinBin;
210  Float_t fMaxBin;
211 
212  Int_t fNTimeBins;
213  Float_t fMinTimeBin;
214  Float_t fMaxTimeBin;
215 
216  // Temporal TLorentzVectors, avoir recreation per event
217 
218  TLorentzVector fMomentum1 ;
219  TLorentzVector fMomentum2 ;
220  TLorentzVector fMomentum12;
221 
222  // Histograms
223 
225  TH1F* fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];
226 
227  TH2F* fHmgg;
229  TH2F* fHmggSM[AliEMCALGeoParams::fgkEMCALModules];
230  TH2F* fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2];
231  TH2F* fHmggPairSameSideSM [AliEMCALGeoParams::fgkEMCALModules-2];
232 
235  TH2F* fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules];
236  TH2F* fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2];
237  TH2F* fHmggPairSameSideSMMaskFrame [AliEMCALGeoParams::fgkEMCALModules-2];
238 
241  TH2F* fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules];
242  TH2F* fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules];
243 
244  TH2F* fHAsymmetry;
246  TH2F* fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules];
247  TH2F* fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules];
248 
249  TH2F* fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules] ;
250  TH2F* fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules] ;
251  TH2F* fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules] ;
252  TH2F* fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules] ;
253 
254  TH1I* fhNEvents;
255 
256  // Cluster time histograms
257  TH2F* fHTpi0[4];
258  TH2F* fhClusterTime ;
259  TH2F* fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules] ;
261  TH2F* fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules];
262  TH2F* fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2];
263  TH2F* fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2];
264 
267 
270 
274 
275 };
276 
277 #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.
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.
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.
void InitTemperatureCorrections()
Apply run dependent calibration correction.
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.