correct minor coverity reports
[u/mrichter/AliRoot.git] / PWG4 / PartCorrDep / AliAnaElectron.h
CommitLineData
8a587055 1#ifndef ALIANAELECTRON_H\r
2#define ALIANAELECTRON_H\r
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
4 * See cxx source for full Copyright notice */\r
5/* $Id: $ */\r
6\r
7//_________________________________________________________________________\r
8//\r
9// Class for the electron identification.\r
10// Clusters from EMCAL matched to tracks are selected \r
11// and kept in the AOD. Few histograms produced.\r
12//\r
13\r
14//-- Author: J.L. Klay (Cal Poly)\r
15\r
16// --- ROOT system ---\r
17class TH2F ;\r
18class TString ;\r
19class TNtuple ;\r
20class TH3F;\r
0c1383b5 21class TObjString;\r
8a587055 22\r
23// --- ANALYSIS system ---\r
24#include "AliAnaPartCorrBaseClass.h"\r
25\r
0f560f84 26class AliAODMCParticle;\r
8a587055 27class AliCaloTrackReader;\r
28class AliAODTrack;\r
29class TList ;\r
30\r
31class AliAnaElectron : public AliAnaPartCorrBaseClass {\r
32\r
78219bac 33 public: \r
8a587055 34 AliAnaElectron() ; // default ctor\r
78219bac 35 virtual ~AliAnaElectron() ; //virtual dtor\r
36 private:\r
8a587055 37 AliAnaElectron(const AliAnaElectron & g) ; // cpy ctor\r
38 AliAnaElectron & operator = (const AliAnaElectron & g) ;//cpy assignment\r
78219bac 39 \r
40 public:\r
0c1383b5 41 \r
42 TObjString * GetAnalysisCuts();\r
43 TList * GetCreateOutputObjects();\r
8a587055 44\r
45 void Init();\r
46\r
47 void MakeAnalysisFillAOD() ;\r
48 \r
49 void MakeAnalysisFillHistograms() ; \r
50 \r
51 //B-tagging\r
78afcbc6 52 Int_t GetDVMBtag(AliAODTrack * tr); //returns # tracks from secvtx\r
53\r
54 //Temporary local method to get DCA because AliAODTrack is stupid\r
55 Bool_t GetDCA(const AliAODTrack* tr,Double_t imp[2], Double_t cov[3]);\r
8a587055 56\r
4f1b0aa5 57 Bool_t PhotonicPrim(const AliAODPWG4Particle* part); //check with track list\r
58 Bool_t PhotonicV0(Int_t trackId); //check with V0 list\r
78afcbc6 59\r
60 //check if track has been flagged as a non-photonic or DVM electron\r
61 //used with the jet tracks to tag bjets\r
62 Bool_t CheckTrack(const AliAODTrack* track,const char* type); \r
def8a7a3 63 Bool_t IsMcBJet(Double_t x, Double_t y);\r
64 Bool_t IsMcDJet(Double_t x, Double_t y);\r
8a587055 65\r
66 void Print(const Option_t * opt)const;\r
67 \r
68 TString GetCalorimeter() const {return fCalorimeter ; }\r
69 Double_t GetpOverEmin() const {return fpOverEmin ; }\r
70 Double_t GetpOverEmax() const {return fpOverEmax ; }\r
71 Bool_t GetWriteNtuple() const {return fWriteNtuple ; }\r
72\r
73 Double_t GetDrCut() const { return fDrCut; }\r
74 Double_t GetPairDcaCut() const { return fPairDcaCut; }\r
75 Double_t GetDecayLenCut() const { return fDecayLenCut; }\r
76 Double_t GetImpactCut() const { return fImpactCut; }\r
77 Double_t GetAssocPtCut() const { return fAssocPtCut; }\r
78 Double_t GetMassCut() const { return fMassCut; }\r
79 Double_t GetSdcaCut() const { return fSdcaCut; }\r
78afcbc6 80 Int_t GetITSCut() const { return fITSCut; }\r
81 Int_t GetNTagTrackCut() const { return fNTagTrkCut; }\r
82 Double_t GetIPSigCut() const { return fIPSigCut; }\r
c02542e8 83 Double_t GetMinClusEne() const { return fMinClusEne; }\r
8a587055 84\r
85 void SetCalorimeter(TString det) {fCalorimeter = det ; }\r
86 void SetpOverEmin(Double_t min) {fpOverEmin = min ; }\r
87 void SetpOverEmax(Double_t max) {fpOverEmax = max ; }\r
88 void SetResidualCut(Double_t cut) {fResidualCut = cut ; }\r
89 void SetWriteNtuple(Bool_t val) {fWriteNtuple = val ; }\r
90\r
91 void SetDrCut(Double_t dr) { fDrCut = dr; }\r
92 void SetPairDcaCut(Double_t pdca) { fPairDcaCut = pdca; }\r
93 void SetDecayLenCut(Double_t dlen) { fDecayLenCut = dlen; }\r
94 void SetImpactCut(Double_t imp) { fImpactCut = imp; }\r
95 void SetAssocPtCut(Double_t pt) { fAssocPtCut = pt; }\r
96 void SetMassCut(Double_t mass) { fMassCut = mass; }\r
97 void SetSdcaCut(Double_t sdca) { fSdcaCut = sdca; }\r
98 void SetITSCut(Int_t its) { fITSCut = its; }\r
78afcbc6 99 void SetNTagTrackCut(Int_t ntr) { fNTagTrkCut = ntr; }\r
100 void SetIPSigCut(Double_t ips) { fIPSigCut = ips; }\r
c02542e8 101 void SetMinClusEne(Double_t ene) { fMinClusEne = ene; }\r
8a587055 102\r
103 void InitParameters();\r
104\r
105 void Terminate(TList * outputList);\r
106 void ReadHistograms(TList * outputList); //Fill histograms with\r
107 //histograms in ouput list,\r
108 //needed in Terminate. \r
78afcbc6 109 private:\r
110 //For DVM B-tag method\r
111 Double_t ComputeSignDca(AliAODTrack *track, AliAODTrack *track2 , float cut1);\r
112 //the 2 following functions are internal methods of the b-tagging\r
113 //based on transverse impact parameter\r
114 Double_t GetIPSignificance(AliAODTrack *tr, Double_t jetPhi);\r
115 void GetImpactParamVect(Double_t Pxy[2], Double_t t[2], Double_t Vxy[2], Double_t ip[2]);\r
4f1b0aa5 116 //For determining origin of electron\r
117 Int_t GetMCSource(Int_t mctag);\r
8a587055 118\r
0f560f84 119 //Need a clean way to get the MC info. An AliAODMCParticle object\r
120 //is returned from whichever source we are operating on\r
121 AliAODMCParticle* GetMCParticle(Int_t part);\r
def8a7a3 122 //Get MC B Parent pt\r
123 Double_t GetBParentPt(Int_t label);\r
124 //Get Number of particles in AliAODMCParticle array, if it exists\r
125 Int_t GetNumAODMCParticles();\r
0f560f84 126\r
8a587055 127 private:\r
128 TString fCalorimeter; //! Which detector? EMCAL or PHOS\r
129 Double_t fpOverEmin; //! Minimum p/E value for Electrons\r
130 Double_t fpOverEmax; //! Maximum p/E value for Electrons\r
131 Double_t fResidualCut; //! Track-cluster matching distance\r
c02542e8 132 Double_t fMinClusEne; //! Min clus energy for matching\r
8a587055 133\r
78afcbc6 134 //DVM B-tagging\r
8a587055 135 Double_t fDrCut; //max dR\r
136 Double_t fPairDcaCut; //max pair-DCA\r
137 Double_t fDecayLenCut; //max 3d-decaylength\r
138 Double_t fImpactCut; //max track impact param\r
139 Double_t fAssocPtCut; //min associated pt\r
140 Double_t fMassCut; //min Minv cut\r
141 Double_t fSdcaCut; //min signDca\r
142 Int_t fITSCut; //min ITS hits (both)\r
78afcbc6 143 //IP Sig B-tagging\r
144 Int_t fNTagTrkCut; //min number of tracks required for IP sig tag\r
145 Double_t fIPSigCut; //min IP significance cut\r
8a587055 146\r
4f1b0aa5 147 Double_t fJetEtaCut; //max eta for jets\r
148 Double_t fJetPhiMin; //min phi for jets\r
149 Double_t fJetPhiMax; //max phi for jets\r
150\r
8a587055 151 Bool_t fWriteNtuple; //flag for filling ntuple or not\r
152\r
4f1b0aa5 153 ///////////////////////////////////////\r
154 //Output histograms and Ntuples\r
155\r
156 ///////////////////////////////////////\r
157 //RC = RECO only - these histos will be filled using only reco\r
158 //information\r
159\r
160 //event QA\r
161 TH1F * fhImpactXY; //! XY impact parameter of all tracks to primary vertex\r
162 TH1F * fhRefMult; //! refmult (tracks with |eta| < 0.5)\r
163 TH1F * fhRefMult2; //! refmult2 (tracks with |eta| < 0.5 & impXY,impZ < 1.0)\r
8a587055 164\r
165 //matching checks \r
329c7660 166 TH3F *fh3pOverE; //! p/E for track-cluster matches vs pt vs mult\r
167 TH3F *fh3EOverp; //! E/p for track-cluster matches vs pt vs mult\r
168 TH3F *fh3pOverE2; //! p/E for track-cluster matches vs pt vs mult\r
169 TH3F *fh3EOverp2; //! E/p for track-cluster matches vs pt vs mult\r
170 TH3F *fh3pOverE3; //! p/E for track-cluster matches vs pt vs mult\r
171 TH3F *fh3EOverp3; //! E/p for track-cluster matches vs pt vs mult\r
172\r
f77eca9f 173 //JLK\r
174 TH2F *fh2pOverE; //! p/E for track-cluster matches vs pt vs mult \r
175 TH2F *fh2EOverp; //! E/p for track-cluster matches vs pt vs mult \r
176 TH2F *fh2pOverE2; //! p/E for track-cluster matches vs pt vs mult \r
177 TH2F *fh2EOverp2; //! E/p for track-cluster matches vs pt vs mult \r
178 //JLK\r
179\r
8a587055 180 TH1F *fh1dR; //! distance between projected track and cluster\r
181 TH2F *fh2EledEdx; //! dE/dx vs. momentum for electron candidates\r
182 TH2F *fh2MatchdEdx; //! dE/dx vs. momentum for all matches\r
4f1b0aa5 183 TH2F *fh2dEtadPhi; //! DeltaEta vs. DeltaPhi of all track/cluster pairs\r
184 TH2F *fh2dEtadPhiMatched; //! DeltaEta vs. DeltaPhi of matched track/cluster pairs\r
8a587055 185 TH2F *fh2dEtadPhiUnmatched; //! DeltaEta vs. DeltaPhi of unmatched track/cluster pairs\r
186\r
187 TH2F* fh2TrackPVsClusterE; //!track momentum vs. cluster energy\r
188 TH2F* fh2TrackPtVsClusterE; //!track pt vs. cluster energy\r
189 TH2F* fh2TrackPhiVsClusterPhi; //!track phi vs. cluster phi\r
190 TH2F* fh2TrackEtaVsClusterEta; //!track eta vs. cluster eta\r
191\r
192 //Photonic Electron checks\r
193 TH1F* fh1OpeningAngle; //!opening angle between pairs of photon candidates\r
194 TH1F* fh1MinvPhoton; //!invariant mass distribution of electron pairs\r
195\r
4f1b0aa5 196 //Reconstructed electrons\r
8a587055 197 TH1F * fhPtElectron; //! Number of identified electron vs transverse momentum \r
198 TH2F * fhPhiElectron; //! Azimuthal angle of identified electron vs transverse momentum \r
199 TH2F * fhEtaElectron; //! Pseudorapidity of identified electron vs tranvserse momentum \r
200\r
201 TH1F * fhPtNPE; //! Number of non-photonic electron vs transverse momentum \r
202 TH2F * fhPhiNPE; //! Azimuthal angle of non-photonic electron vs transverse momentum \r
203 TH2F * fhEtaNPE; //! Pseudorapidity of non-photonic electron vs tranvserse momentum \r
204\r
205 TH1F * fhPtPE; //! Number of photonic electron vs transverse momentum \r
206 TH2F * fhPhiPE; //! Azimuthal angle of photonic electron vs transverse momentum \r
207 TH2F * fhEtaPE; //! Pseudorapidity of photonic electron vs tranvserse momentum \r
208\r
f919d0ff 209 //These next set do use some MC info. The first bin of the second\r
210 //dimension is filled for both REAL and MC data, other bins filled\r
211 //only if MC\r
212 //Histograms for comparison to tracking detectors\r
213 TH2F* fhPtHadron; //!Pt distribution of reco charged hadrons\r
214 //!(pi,k,p) in EMCAL acceptance\r
215 TH2F* fhPtNPEleTPC; //!Pt distribution of non-photonic reco electrons using\r
216 //!just TPC dEdx info in EMCAL acceptance\r
217 TH2F* fhPtNPEleTPCTRD; //!Pt distribution of non-photonic reco electrons using\r
218 //!pid info from tracking detectors only in EMCAL acceptance\r
219 TH2F* fhPtNPEleTTE; //!Pt distribution of non-photonic reco\r
220 //!electrons using pid info from TPC+TRD+EMCAL\r
221 //!in EMCAL acceptance\r
222 TH2F* fhPtNPEleEMCAL; //!Pt distribution of non-photonic reco\r
223 //!electrons using EMCAL only\r
224 //!in EMCAL acceptance\r
225\r
78afcbc6 226 //DVM B-tagging\r
227 TH2F * fhDVMBtagCut1; //! DVM B-tagging result for cut1 (minv>1.0)\r
228 TH2F * fhDVMBtagCut2; //! DVM B-tagging result for cut2 (minv>1.5)\r
229 TH2F * fhDVMBtagCut3; //! DVM B-tagging result for cut3 (minv>1.8)\r
230 TH2F * fhDVMBtagQA1; //! DVM B-tagging : QA of pairDca vs decaylength\r
231 TH2F * fhDVMBtagQA2; //! DVM B-tagging : QA of signDca vs mass\r
4f1b0aa5 232 TH1F * fhDVMBtagQA3; //! DVM B-tagging : QA number of ITS clusters\r
233 TH1F * fhDVMBtagQA4; //! DVM B-tagging : QA prim vtx impXY\r
234 TH1F * fhDVMBtagQA5; //! DVM B-tagging : QA prim vtx impZ\r
78afcbc6 235 //IPSig B-tagging\r
236 TH1F * fhIPSigBtagQA1; //! IPSig B-tagging : QA of # tag tracks\r
237 TH1F * fhIPSigBtagQA2; //! IPSig B-tagging : QA of IP sig\r
4f1b0aa5 238 TH1F * fhTagJetPt1x4; //! IPSig B-tagging : result for (1 track, ipSignif>4)\r
239 TH1F * fhTagJetPt2x3; //! IPSig B-tagging : result for (2 track, ipSignif>3)\r
240 TH1F * fhTagJetPt3x2; //! IPSig B-tagging : result for (3 track, ipSignif>2)\r
0f560f84 241 TH1F * fhePlusTagJetPt1x4; //! IPSig B-tagging : eJet + result for (1 track, ipSignif>4)\r
242 TH1F * fhePlusTagJetPt2x3; //! IPSig B-tagging : eJet + result for (2 track, ipSignif>3)\r
243 TH1F * fhePlusTagJetPt3x2; //! IPSig B-tagging : eJet + result for (3 track, ipSignif>2)\r
8a587055 244\r
245 //B-Jet histograms\r
78afcbc6 246 TH2F* fhJetType; //! How many of each tag were found vs jet pt\r
f77eca9f 247 TH2F* fhLeadJetType; //! How many leading of each tag were found vs jet pt\r
8a587055 248 TH2F* fhBJetXsiFF; //! B-tagged jet FF with xsi = log(pt_Jet/pt_Track)\r
249 TH2F* fhBJetPtFF; //! B-tagged jet FF with pt_Track\r
250 TH2F* fhBJetEtaPhi; //! B-tagged jet eta-phi distribution\r
251 TH2F* fhNonBJetXsiFF; //! Non b-tagged jet FF with xsi = log(pt_Jet/pt_Track)\r
252 TH2F* fhNonBJetPtFF; //! Non b-tagged jet FF with pt_Track\r
253 TH2F* fhNonBJetEtaPhi; //! Non b-tagged jet eta-phi distribution\r
254\r
4f1b0aa5 255 ///////////////////////////////////////////////////////////////////\r
256 //MC = From here down, the histograms use MC information, so they will\r
257 //only be filled in simulations\r
258 TNtuple* fEleNtuple; //! testing ntuple\r
259\r
260 TH2F * fhPhiConversion; //! Azimuthal angle of conversion electron vs transverse momentum \r
261 TH2F * fhEtaConversion; //! Pseudorapidity of conversion electron vs tranvserse momentum \r
262\r
263 //Histograms for comparison to tracking detectors\r
f77eca9f 264 TH2F* fhPtTrack; //!Pt distribution of reco tracks with MC-ID\r
4f1b0aa5 265\r
329c7660 266 TH2F* fhPtNPEBHadron; //!correlate our best reconstructed\r
267 //b-electrons with the b-hadron momentum\r
268\r
4f1b0aa5 269 //For computing efficiency of IPSIG tag\r
270 //these require that an MC b-Ancestor is present in the jet\r
271 TH1F * fhBJetPt1x4; //! IPSig B-tagging : result for (1 track, ipSignif>4)\r
272 TH1F * fhBJetPt2x3; //! IPSig B-tagging : result for (2 track, ipSignif>3)\r
273 TH1F * fhBJetPt3x2; //! IPSig B-tagging : result for (3 track, ipSignif>2)\r
274\r
0f560f84 275 TH1F * fhFakeJetPt1x4; //! IPSig B-tagging : fake result for (1 track, ipSignif>4)\r
276 TH1F * fhFakeJetPt2x3; //! IPSig B-tagging : fake result for (2 track, ipSignif>3)\r
277 TH1F * fhFakeJetPt3x2; //! IPSig B-tagging : fake result for (3 track, ipSignif>2)\r
278\r
7a8f2aef 279 TH2F* fhDVMJet; //! DVM jet algo check\r
280\r
4f1b0aa5 281 ////////////////////////////\r
282 //MC Only Rate histograms\r
283\r
0f560f84 284 TNtuple *fMCEleNtuple; //! Ntuple of MC electrons\r
4f1b0aa5 285\r
0f560f84 286 TH2F* fhMCBJetElePt; //! Pt of B-Jet vs pt of electron\r
287 TH2F* fhMCBHadronElePt; //! Pt of B-hadrons vs pt of electron\r
288 TH1F* fhPtMCHadron; //! Pt distribution of MC charged hadrons (pi,k,p) in EMCAL acceptance\r
289 TH2F* fhPtMCElectron; //! Pt distribution of MC electrons from various sources in EMCAL\r
c02542e8 290 TH2F* fhMCXYConversion; //! XY distribution of conversion electrons\r
291 TH2F* fhMCRadPtConversion; //! Radius vs. pT distribution of conversion electrons\r
4f1b0aa5 292\r
f77eca9f 293 ClassDef(AliAnaElectron,12)\r
8a587055 294\r
295} ;\r
296 \r
297\r
298#endif//ALIANAELECTRON_H\r
299\r
300\r
301\r