]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/CaloTrackCorrelations/AliAnaPhoton.h
add method to study identified pile-up events in events with good EMCAL trigger clust...
[u/mrichter/AliRoot.git] / PWGGA / CaloTrackCorrelations / AliAnaPhoton.h
CommitLineData
1c5acb87 1#ifndef ALIANAPHOTON_H
2#define ALIANAPHOTON_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
1c5acb87 5
6//_________________________________________________________________________
7//
8// Class for the photon identification.
9// Clusters from calorimeters are identified as photons
10// and kept in the AOD. Few histograms produced.
6175da48 11// Produces input for other analysis classes like AliAnaPi0,
12// AliAnaParticleHadronCorrelation ...
1c5acb87 13//
14
15//-- Author: Gustavo Conesa (INFN-LNF)
16
17// --- ROOT system ---
18class TH2F ;
123fc3bd 19class TH1F;
1c5acb87 20class TString ;
0c1383b5 21class TObjString;
5812a064 22class TList ;
1c5acb87 23
24// --- ANALYSIS system ---
745913ae 25#include "AliAnaCaloTrackCorrBaseClass.h"
1c5acb87 26
745913ae 27class AliAnaPhoton : public AliAnaCaloTrackCorrBaseClass {
1c5acb87 28
78219bac 29 public:
5812a064 30 AliAnaPhoton() ; // default ctor
31 virtual ~AliAnaPhoton() { ; } // virtual dtor
0c1383b5 32
6175da48 33 //---------------------------------------
34 // General analysis frame methods
35 //---------------------------------------
c4a7d28a 36
0c1383b5 37 TObjString * GetAnalysisCuts();
6175da48 38
0c1383b5 39 TList * GetCreateOutputObjects();
c4a7d28a 40
6175da48 41 void Init();
6639984f 42
6175da48 43 void InitParameters();
44
45 void MakeAnalysisFillAOD() ;
46
47 void MakeAnalysisFillHistograms() ;
1c5acb87 48
6175da48 49 void Print(const Option_t * opt)const;
521636d2 50
3d5d5078 51
52 // Analysis methods
53
521636d2 54 Bool_t ClusterSelected(AliVCluster* cl, TLorentzVector mom) ;
1c5acb87 55
3d5d5078 56 void FillAcceptanceHistograms();
57
3d5d5078 58 void FillShowerShapeHistograms( AliVCluster* cluster, const Int_t mcTag) ;
59
60 void SwitchOnFillShowerShapeHistograms() { fFillSSHistograms = kTRUE ; }
61 void SwitchOffFillShowerShapeHistograms() { fFillSSHistograms = kFALSE ; }
62
764ab1f4 63 void SwitchOnOnlySimpleSSHistoFill() { fFillOnlySimpleSSHisto = kTRUE ; }
64 void SwitchOffOnlySimpleHistoFill() { fFillOnlySimpleSSHisto = kFALSE ; }
65
4bfeae64 66 void FillTrackMatchingResidualHistograms(AliVCluster* calo, const Int_t cut);
67
68 void SwitchOnTMHistoFill() { fFillTMHisto = kTRUE ; }
69 void SwitchOffTMHistoFill() { fFillTMHisto = kFALSE ; }
70
acd56ca4 71 void FillPileUpHistograms(const Float_t energy, const Float_t time) ;
72 void FillPileUpHistogramsPerEvent(TObjArray * clusters) ;
73
2ad19c3d 74 void SwitchOnFillPileUpHistograms() { fFillPileUpHistograms = kTRUE ; }
75 void SwitchOffFillPileUpHistograms() { fFillPileUpHistograms = kFALSE ; }
3d5d5078 76
6175da48 77 // Analysis parameters setters getters
c4a7d28a 78
521636d2 79 TString GetCalorimeter() const { return fCalorimeter ; }
80 void SetCalorimeter(TString & det) { fCalorimeter = det ; }
81
6175da48 82 // ** Cluster selection methods **
83
c4a7d28a 84 void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3) {
521636d2 85 fMinDist = m1; fMinDist2 = m2; fMinDist3 = m3; }
6175da48 86
c4a7d28a 87 void SetTimeCut(Double_t min, Double_t max) { fTimeCutMin = min;
521636d2 88 fTimeCutMax = max ; }
89 Double_t GetTimeCutMin() const { return fTimeCutMin ; }
90 Double_t GetTimeCutMax() const { return fTimeCutMax ; }
1e86c71e 91
521636d2 92 void SetNCellCut(Int_t n) { fNCellsCut = n ; }
93 Double_t GetNCellCut() const { return fNCellsCut ; }
c4a7d28a 94
95 Bool_t IsTrackMatchRejectionOn() const { return fRejectTrackMatch ; }
96 void SwitchOnTrackMatchRejection() { fRejectTrackMatch = kTRUE ; }
97 void SwitchOffTrackMatchRejection() { fRejectTrackMatch = kFALSE ; }
09273901 98
f66d95af 99 void FillNOriginHistograms(Int_t n) { fNOriginHistograms = n ;
100 if(n > 14) fNOriginHistograms = 14; }
101 void FillNPrimaryHistograms(Int_t n) { fNPrimaryHistograms= n ;
102 if(n > 7) fNPrimaryHistograms = 7; }
103
3d5d5078 104 // For histograms in arrays, index in the array, corresponding to a particle
c5693f62 105 enum mcTypes { kmcPhoton = 0, kmcPi0Decay = 1, kmcOtherDecay = 2,
106 kmcPi0 = 3, kmcEta = 4, kmcElectron = 5,
107 kmcConversion = 6, kmcOther = 7, kmcAntiNeutron = 8,
108 kmcAntiProton = 9, kmcPrompt = 10, kmcFragmentation = 11,
109 kmcISR = 12, kmcString = 13 };
41121cfe 110
c5693f62 111 enum mcPTypes { kmcPPhoton = 0, kmcPPi0Decay = 1, kmcPOtherDecay = 2, kmcPOther = 3,
112 kmcPPrompt = 4, kmcPFragmentation = 5, kmcPISR = 6 };
f66d95af 113
c5693f62 114 enum mcssTypes { kmcssPhoton = 0, kmcssOther = 1, kmcssPi0 = 2,
115 kmcssEta = 3, kmcssConversion = 4, kmcssElectron = 5 };
3d5d5078 116
1c5acb87 117 private:
118
6175da48 119 TString fCalorimeter ; // Calorimeter where the gamma is searched;
120 Float_t fMinDist ; // Minimal distance to bad channel to accept cluster
121 Float_t fMinDist2; // Cuts on Minimal distance to study acceptance evaluation
122 Float_t fMinDist3; // One more cut on distance used for acceptance-efficiency study
123 Bool_t fRejectTrackMatch ; // If PID on, reject clusters which have an associated TPC track
09273901 124 Bool_t fFillTMHisto; // Fill track matching plots
6175da48 125 Double_t fTimeCutMin ; // Remove clusters/cells with time smaller than this value, in ns
126 Double_t fTimeCutMax ; // Remove clusters/cells with time larger than this value, in ns
127 Int_t fNCellsCut ; // Accept for the analysis clusters with more than fNCellsCut cells
c4a7d28a 128 Bool_t fFillSSHistograms ; // Fill shower shape histograms
764ab1f4 129 Bool_t fFillOnlySimpleSSHisto; // Fill selected cluster histograms, selected SS histograms
f66d95af 130 Int_t fNOriginHistograms; // Fill only NOriginHistograms of the 14 defined types
131 Int_t fNPrimaryHistograms; // Fill only NPrimaryHistograms of the 7 defined types
2ad19c3d 132 Bool_t fFillPileUpHistograms; // Fill pile-up related histograms
133
2244659d 134 //Histograms
fc195fd0 135 TH1F * fhClusterCuts[9]; //! control histogram on the different photon selection cuts
c4a7d28a 136 TH2F * fhNCellsE; //! number of cells in cluster vs E
5c46c992 137 TH2F * fhCellsE; //! energy of cells in cluster vs E of cluster
f66d95af 138 TH2F * fhMaxCellDiffClusterE; //! Fraction of energy carried by cell with maximum energy
f15c25da 139 TH2F * fhTimeE; //! time of cluster vs E
140
20218aea 141 TH1F * fhEPhoton ; //! Number of identified photon vs energy
6175da48 142 TH1F * fhPtPhoton ; //! Number of identified photon vs transerse momentum
143 TH2F * fhPhiPhoton ; //! Azimuthal angle of identified photon vs transerse momentum
144 TH2F * fhEtaPhoton ; //! Pseudorapidity of identified photon vs transerse momentum
145 TH2F * fhEtaPhiPhoton ; //! Pseudorapidity vs Phi of identified photon for transerse momentum > 0.5
146 TH2F * fhEtaPhi05Photon ; //! Pseudorapidity vs Phi of identified photon for transerse momentum < 0.5
123fc3bd 147
521636d2 148 //Shower shape
f66d95af 149
521636d2 150 TH2F * fhDispE; //! cluster dispersion vs E
151 TH2F * fhLam0E; //! cluster lambda0 vs E
152 TH2F * fhLam1E; //! cluster lambda1 vs E
7c65ad18 153
521636d2 154 TH2F * fhDispETRD; //! cluster dispersion vs E, SM covered by TRD
155 TH2F * fhLam0ETRD; //! cluster lambda0 vs E, SM covered by TRD
156 TH2F * fhLam1ETRD; //! cluster lambda1 vs E, SM covered by TRD
7c65ad18 157
b5dbb99b 158 TH2F * fhDispETM; //! cluster dispersion vs E, cut on Track Matching residual
159 TH2F * fhLam0ETM; //! cluster lambda0 vs E, cut on Track Matching residual
160 TH2F * fhLam1ETM; //! cluster lambda1 vs E, cut on Track Matching residual
161
162 TH2F * fhDispETMTRD; //! cluster dispersion vs E, SM covered by TRD, cut on Track Matching residual
163 TH2F * fhLam0ETMTRD; //! cluster lambda0 vs E, SM covered by TRD, cut on Track Matching residual
164 TH2F * fhLam1ETMTRD; //! cluster lambda1 vs E, SM covered by TRD, cut on Track Matching residual
165
521636d2 166 TH2F * fhNCellsLam0LowE; //! number of cells in cluster vs lambda0
167 TH2F * fhNCellsLam1LowE; //! number of cells in cluster vs lambda1
168 TH2F * fhNCellsDispLowE; //! number of cells in cluster vs dispersion
169 TH2F * fhNCellsLam0HighE; //! number of cells in cluster vs lambda0, E>2
170 TH2F * fhNCellsLam1HighE; //! number of cells in cluster vs lambda1, E>2
171 TH2F * fhNCellsDispHighE; //! number of cells in cluster vs dispersion, E>2
172
521636d2 173 TH2F * fhEtaLam0LowE; //! cluster eta vs lambda0, E<2
174 TH2F * fhPhiLam0LowE; //! cluster phi vs lambda0, E<2
175 TH2F * fhEtaLam0HighE; //! cluster eta vs lambda0, E>2
176 TH2F * fhPhiLam0HighE; //! cluster phi vs lambda0, E>2
177 TH2F * fhLam0DispLowE; //! cluster lambda0 vs dispersion, E<2
178 TH2F * fhLam0DispHighE; //! cluster lambda0 vs dispersion, E>2
179 TH2F * fhLam1Lam0LowE; //! cluster lambda1 vs lambda0, E<2
180 TH2F * fhLam1Lam0HighE; //! cluster lambda1 vs lambda0, E>2
181 TH2F * fhDispLam1LowE; //! cluster disp vs lambda1, E<2
182 TH2F * fhDispLam1HighE; //! cluster disp vs lambda1, E>2
7c65ad18 183
34c16486 184 TH2F * fhDispEtaE ; //! shower dispersion in eta direction
185 TH2F * fhDispPhiE ; //! shower dispersion in phi direction
186 TH2F * fhSumEtaE ; //! shower dispersion in eta direction
187 TH2F * fhSumPhiE ; //! shower dispersion in phi direction
188 TH2F * fhSumEtaPhiE ; //! shower dispersion in eta and phi direction
189 TH2F * fhDispEtaPhiDiffE ; //! shower dispersion eta - phi
190 TH2F * fhSphericityE ; //! shower sphericity in eta vs phi
191 TH2F * fhDispSumEtaDiffE ; //! difference of 2 eta dispersions
192 TH2F * fhDispSumPhiDiffE ; //! difference of 2 phi dispersions
d2655d46 193 TH2F * fhDispEtaDispPhi[7] ; //! shower dispersion in eta direction vs phi direction for 5 E bins [0-2],[2-4],[4-6],[6-10],[> 10]
194 TH2F * fhLambda0DispEta[7] ; //! shower shape correlation l0 vs disp eta
195 TH2F * fhLambda0DispPhi[7] ; //! shower shape correlation l0 vs disp phi
bfdcf7fb 196
4c8f7c2e 197 //Fill MC dependent histograms, Origin of this cluster is ...
198
5812a064 199 TH2F * fhMCDeltaE[14] ; //! MC-Reco E distribution coming from MC particle
200 TH2F * fhMCDeltaPt[14] ; //! MC-Reco pT distribution coming from MC particle
201 TH2F * fhMC2E[14] ; //! E distribution, Reco vs MC coming from MC particle
202 TH2F * fhMC2Pt[14] ; //! pT distribution, Reco vs MC coming from MC particle
4c8f7c2e 203
5812a064 204 TH1F * fhMCE[14]; //! Number of identified photon vs cluster energy coming from MC particle
205 TH1F * fhMCPt[14]; //! Number of identified photon vs cluster pT coming from MC particle
206 TH2F * fhMCPhi[14]; //! Phi of identified photon coming from MC particle
207 TH2F * fhMCEta[14]; //! eta of identified photon coming from MC particle
3d5d5078 208
5812a064 209 TH1F * fhEPrimMC[7]; //! Number of generated photon vs energy
210 TH1F * fhPtPrimMC[7]; //! Number of generated photon vs pT
211 TH2F * fhPhiPrimMC[7]; //! Phi of generted photon
212 TH2F * fhYPrimMC[7]; //! Rapidity of generated photon
3d5d5078 213
5812a064 214 TH1F * fhEPrimMCAcc[7]; //! Number of generated photon vs energy, in calorimeter acceptance
215 TH1F * fhPtPrimMCAcc[7]; //! Number of generated photon vs pT, in calorimeter acceptance
216 TH2F * fhPhiPrimMCAcc[7]; //! Phi of generted photon, in calorimeter acceptance
217 TH2F * fhYPrimMCAcc[7]; //! Rapidity of generated photon, in calorimeter acceptance
f66d95af 218
521636d2 219 // Shower Shape MC
220
5812a064 221 TH2F * fhMCELambda0[6] ; //! E vs Lambda0 from MC particle
222 TH2F * fhMCELambda1[6] ; //! E vs Lambda1 from MC particle
223 TH2F * fhMCEDispersion[6] ; //! E vs Dispersion from MC particle
f66d95af 224
5812a064 225 TH2F * fhMCPhotonELambda0NoOverlap ; //! E vs Lambda0 from MC photons, no overlap
226 TH2F * fhMCPhotonELambda0TwoOverlap ; //! E vs Lambda0 from MC photons, 2 particles overlap
227 TH2F * fhMCPhotonELambda0NOverlap ; //! E vs Lambda0 from MC photons, N particles overlap
f66d95af 228
229 TH2F * fhMCLambda0vsClusterMaxCellDiffE0[6]; //! Lambda0 vs fraction of energy of max cell for E < 2 GeV
230 TH2F * fhMCLambda0vsClusterMaxCellDiffE2[6]; //! Lambda0 vs fraction of energy of max cell for 2< E < 6 GeV
231 TH2F * fhMCLambda0vsClusterMaxCellDiffE6[6]; //! Lambda0 vs fraction of energy of max cell for E > 6 GeV
232 TH2F * fhMCNCellsvsClusterMaxCellDiffE0[6]; //! NCells vs fraction of energy of max cell for E < 2
233 TH2F * fhMCNCellsvsClusterMaxCellDiffE2[6]; //! NCells vs fraction of energy of max cell for 2 < E < 6 GeV
234 TH2F * fhMCNCellsvsClusterMaxCellDiffE6[6]; //! NCells vs fraction of energy of max cell for E > 6
235 TH2F * fhMCNCellsE[6]; //! NCells per cluster vs energy
236 TH2F * fhMCMaxCellDiffClusterE[6]; //! Fraction of energy carried by cell with maximum energy
237
34c16486 238 TH2F * fhMCEDispEta[6] ; //! shower dispersion in eta direction
239 TH2F * fhMCEDispPhi[6] ; //! shower dispersion in phi direction
240 TH2F * fhMCESumEtaPhi[6] ; //! shower dispersion in eta vs phi direction
241 TH2F * fhMCEDispEtaPhiDiff[6] ; //! shower dispersion in eta -phi direction
242 TH2F * fhMCESphericity[6] ; //! shower sphericity, eta vs phi
d2655d46 243 TH2F * fhMCDispEtaDispPhi[7][6] ; //! shower dispersion in eta direction vs phi direction for 5 E bins [0-2],[2-4],[4-6],[6-10],[> 10]
244 TH2F * fhMCLambda0DispEta[7][6] ; //! shower shape correlation l0 vs disp eta
245 TH2F * fhMCLambda0DispPhi[7][6] ; //! shower shape correlation l0 vs disp phi
34c16486 246
3d5d5078 247 //Embedding
5812a064 248 TH2F * fhEmbeddedSignalFractionEnergy ; //! Fraction of photon energy of embedded signal vs cluster energy
3d5d5078 249
5812a064 250 TH2F * fhEmbedPhotonELambda0FullSignal ; //! Lambda0 vs E for embedded photons with more than 90% of the cluster energy
251 TH2F * fhEmbedPhotonELambda0MostlySignal ; //! Lambda0 vs E for embedded photons with 90%<fraction<50%
252 TH2F * fhEmbedPhotonELambda0MostlyBkg ; //! Lambda0 vs E for embedded photons with 50%<fraction<10%
253 TH2F * fhEmbedPhotonELambda0FullBkg ; //! Lambda0 vs E for embedded photons with less than 10% of the cluster energy
3d5d5078 254
5812a064 255 TH2F * fhEmbedPi0ELambda0FullSignal ; //! Lambda0 vs E for embedded photons with more than 90% of the cluster energy
256 TH2F * fhEmbedPi0ELambda0MostlySignal ; //! Lambda0 vs E for embedded photons with 90%<fraction<50%
257 TH2F * fhEmbedPi0ELambda0MostlyBkg ; //! Lambda0 vs E for embedded photons with 50%<fraction<10%
258 TH2F * fhEmbedPi0ELambda0FullBkg ; //! Lambda0 vs E for embedded photons with less than 10% of the cluster energy
3d5d5078 259
09273901 260 // Track Matching
4bfeae64 261 TH2F * fhTrackMatchedDEta[2] ; //! Eta distance between track and cluster vs cluster E, after and before photon cuts
262 TH2F * fhTrackMatchedDPhi[2] ; //! Phi distance between track and cluster vs cluster E, after and before photon cuts
263 TH2F * fhTrackMatchedDEtaDPhi[2] ; //! Eta vs Phi distance between track and cluster, E cluster > 0.5 GeV, after and before photon cuts
264
265 TH2F * fhTrackMatchedDEtaTRD[2] ; //! Eta distance between track and cluster vs cluster E, after and before photon cuts, behind TRD
266 TH2F * fhTrackMatchedDPhiTRD[2] ; //! Phi distance between track and cluster vs cluster E, after and before photon cuts, behind TRD
267
268 TH2F * fhTrackMatchedDEtaMCOverlap[2] ; //! Eta distance between track and cluster vs cluster E, several particle overlap, after and before photon cuts
269 TH2F * fhTrackMatchedDPhiMCOverlap[2] ; //! Phi distance between track and cluster vs cluster E, several particle overlap, after and before photon cuts
270 TH2F * fhTrackMatchedDEtaMCNoOverlap[2]; //! Eta distance between track and cluster vs cluster E, not other particle overlap, after and before photon cuts
271 TH2F * fhTrackMatchedDPhiMCNoOverlap[2]; //! Phi distance between track and cluster vs cluster E, not other particle overlap, after and before photon cuts
272 TH2F * fhTrackMatchedDEtaMCConversion[2]; //! Eta distance between track and cluster vs cluster E, originated in conversion, after and before photon cuts
273 TH2F * fhTrackMatchedDPhiMCConversion[2]; //! Phi distance between track and cluster vs cluster E, originated in conversion, after and before photon cuts
274
275 TH2F * fhTrackMatchedMCParticle[2]; //! Trace origin of matched particle
276 TH2F * fhdEdx[2]; //! matched track dEdx vs cluster E, after and before photon cuts
277 TH2F * fhEOverP[2]; //! matched track E cluster over P track vs cluster E, after dEdx cut, after and before photon cuts
278 TH2F * fhEOverPTRD[2]; //! matched track E cluster over P track vs cluster E, after dEdx cut, after and before photon cuts, behind TRD
31ae6d59 279
2ad19c3d 280 // Pile-up
281 TH2F * fhTimeENoCut; //! time of cluster vs E, no cut
282 TH2F * fhTimeESPD; //! time of cluster vs E, IsSPDPileUp
283 TH2F * fhTimeESPDMulti; //! time of cluster vs E, IsSPDPileUpMulti
284 TH2F * fhTimeNPileUpVertSPD; //! time of cluster vs n pile-up vertices from SPD
285 TH2F * fhTimeNPileUpVertTrack; //! time of cluster vs n pile-up vertices from Tracks
286 TH2F * fhTimeNPileUpVertContributors; //! time of cluster vs n pile-up vertex from SPD contributors
287 TH2F * fhTimePileUpMainVertexZDistance; //! time of cluster vs difference of z main vertex and pile-up vertex
288 TH2F * fhTimePileUpMainVertexZDiamond; //! time of cluster vs difference of z diamond and pile-up vertex
acd56ca4 289 TH2F * fhClusterMultSPDPileUp[4]; //! E max cluster vs event cluster multiplicity, for tmax-tdiff cuts, pile up event
290 TH2F * fhClusterMultNoPileUp[4]; //! E max cluster vs event cluster multiplicity, for tmax-tdiff cuts, not pile up event
2ad19c3d 291
09273901 292 AliAnaPhoton( const AliAnaPhoton & g) ; // cpy ctor
c5693f62 293 AliAnaPhoton & operator = (const AliAnaPhoton & g) ; // cpy assignment
294
2ad19c3d 295 ClassDef(AliAnaPhoton,27)
6639984f 296
1c5acb87 297} ;
298
1c5acb87 299#endif//ALIANAPHOTON_H
300
301
302