Updates
[u/mrichter/AliRoot.git] / PWGJE / AliPWG4HighPtTrackQA.h
CommitLineData
d756027f 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16//-----------------------------------------------------------------------
2b553e6f 17// This class stores QA variables as function of pT for different type
18// of tracks and track selection criteria
d756027f 19// Author : Marta Verweij - UU
20//-----------------------------------------------------------------------
21
22#ifndef ALIPWG4HIGHPTTRACKQA_H
23#define ALIPWG4HIGHPTTRACKQA_H
24
25#include "AliAnalysisTaskSE.h"
26
27class TH1F;
28class TH2F;
29class TH3F;
30class TProfile;
31class TList;
32class TArrayF;
33
34class AliVEvent;
35class AliESDEvent;
36class AliESDtrackCuts;
37class AliESDVertex;
38class AliAODTrack;
aa3ba8d2 39class AliESDtrack;
d756027f 40
41class AliGenPythiaEventHeader;
42class AliMCEvent;
43//class AliAnalysisHelperJetTasks;
44
45class AliPWG4HighPtTrackQA: public AliAnalysisTaskSE {
46
47 public:
48 AliPWG4HighPtTrackQA();
49 AliPWG4HighPtTrackQA(const char *name);
50 virtual ~AliPWG4HighPtTrackQA() {;}
51
52 // virtual void ConnectInputData(Option_t *);
53 virtual void UserCreateOutputObjects();
54 virtual void UserExec(Option_t *option);
55 virtual void Terminate(Option_t *);
56 virtual Bool_t Notify(); //Copied from AliAnalysisTaskJetSpectrum2
57
58 enum DataType {kESD,kAOD};
59
60 Bool_t IsPbPb() {return fIsPbPb;} //is PbPb data?
61 Bool_t SelectEvent(); //decides if event is used for analysis
62 Int_t CalculateCentrality(AliVEvent *ev);
63 Int_t CalculateCentrality(AliESDEvent *esd);
006b2a30 64 Int_t CalculateCentrality(const AliAODEvent *aod);
65 Int_t GetCentralityClass(Float_t cent=-1.) const;
d756027f 66 void DoAnalysisESD();
67 void DoAnalysisAOD();
68 void FillHistograms();
69
d756027f 70 //Setters
71 void SetDataType(DataType d) {fDataType = d;}
72 void SetIsPbPb(Bool_t cs) {fIsPbPb = cs;}
73 void SetCentralityClass(int cent) {fCentClass=cent;}
74 void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
44684f3b 75 void SetCutsITSLoose(AliESDtrackCuts* trackCuts) {fTrackCutsITSLoose = trackCuts;}
76 void SetCutsTPConly(AliESDtrackCuts* trackCuts) {fTrackCutsTPConly = trackCuts;}
d756027f 77 void SetTrackType(Int_t trackType) {fTrackType = trackType;}
78 void SetFilterMask(UInt_t filterMask) {fFilterMask = filterMask;}
79
2b553e6f 80 void SetSigmaConstrainedMax(Double_t sigma) {fSigmaConstrainedMax=sigma;}
d756027f 81 void SetPtMax(Float_t ptmax) {fPtMax = ptmax;}
aa3ba8d2 82 void SetPtBinEdges(Int_t region, Double_t ptmax, Double_t ptBinWidth);
d756027f 83 void SetNVariables(Int_t nv) {fNVariables = nv;}
84
85 Float_t GetPtMax() {return fPtMax;}
e49861e4 86 Float_t GetTPCClusterInfo(const AliAODTrack *tr,Int_t nNeighbours=3, Int_t type=0, Int_t row0=0, Int_t row1=159, Bool_t useFitMap=kFALSE) const;
006b2a30 87 Float_t GetTPCClusterInfoFitMap(const AliESDtrack *tr,Int_t nNeighbours=3, Int_t type=0, Int_t row0=0, Int_t row1=159) const;
88 Int_t GetTrackLengthTPC(const AliESDtrack *track) const;
89 Int_t GetTrackLengthTPC(const AliAODTrack *track) const;
42881dab 90 Float_t GetGoldenChi2(AliESDtrack *origtrack);
91 Float_t GetGGCChi2(AliESDtrack *origtrack);
d756027f 92
006b2a30 93 static AliGenPythiaEventHeader* GetPythiaEventHeader(const AliMCEvent *mcEvent);
d756027f 94 static Bool_t PythiaInfoFromFile(const char* currFile,Float_t &fXsec,Float_t &fTrials);// get the cross section and the trails either from pyxsec.root or from pysec_hists.root
95
96 protected:
97
98 private:
99 AliPWG4HighPtTrackQA(const AliPWG4HighPtTrackQA&);
100 AliPWG4HighPtTrackQA& operator=(const AliPWG4HighPtTrackQA&);
101
d480da92 102 DataType fDataType; // kESD or kAOD
d756027f 103
aa3ba8d2 104 AliVEvent *fEvent; //! AliVEvent object
105 AliESDEvent *fESD; //! ESD object
d756027f 106 const AliESDVertex *fVtx; //! vertex object
107
44684f3b 108 AliESDtrackCuts *fTrackCuts; // TrackCuts
05cb235d 109 AliESDtrackCuts *fTrackCutsITSLoose; // Loose ITS track cuts
110 AliESDtrackCuts *fTrackCutsTPConly; // TPC track cuts
44684f3b 111 Int_t fTrackType; // 0: global track; 1:TPConly track 2: TPConly constrained track 3: global ITSrefit 4: TPConly constrained track with QA selection based on global track
112 UInt_t fFilterMask; //! Select tracks from specific track cuts belonging to certain filter mask for AOD analysis
d756027f 113
2b553e6f 114 Double_t fSigmaConstrainedMax; // max sigma on constrained fit
d756027f 115 Float_t fPtMax; // Maximum pT for histograms
aa3ba8d2 116 Float_t fPtBinEdges[3][2]; // 3 regions total with different binning for pT axis of histos
d756027f 117
669e2312 118 Bool_t fIsPbPb; // kTRUE if PbPb
d756027f 119 Int_t fCentClass; // Select only events from predefined centrality class
120
121 /*
a5e0d236 122 QA variables stored in TArrayF *fVariables
d756027f 123 0: pt
124 1: phi
125 2: eta
126 3: dca2D
127 4: dcaZ
128 5: nClustersTPC
129 6: nPointITS
130 7: chi2C
131 8: nSigmaToVertex
132 9: relUncertainty1Pt
133 10: chi2PerClusterTPC
134 11: #crossed rows
135 12: (#crossed rows)/(#findable clusters)
a5e0d236 136 13: SigmaY2
137 14: SigmaZ2
138 15: SigmaSnp2
139 16: SigmaTgl2
140 17: Sigma1Pt2
141 18: NClustersTPCIter1
142 19: TPCChi2Iter1
143 20: NClustersTPCShared
144 21: Chi2Gold (TPC constrained vs global)
145 22: Chi2GGC (global constrained vs global)
146 23: NCrossed rows from fit map
147 24: (#crossed rows)/(#findable clusters) from fit map
d756027f 148 */
a5e0d236 149
d756027f 150 Int_t fNVariables; // Number of variables
151 TArrayF *fVariables; // QA variables
152
b8f6bad5 153 UChar_t fITSClusterMap; // map of clusters, one bit per a layer
154
d756027f 155 Float_t fAvgTrials; // Average number of trials
156
157 TH1F *fNEventAll; //! Event counter
158 TH1F *fNEventSel; //! Event counter
159 TH1F *fNEventReject; //! Book keeping of reason of rejecting events
160
161 TH1F *fh1Centrality; //! Centrality
162
163 TProfile* fh1Xsec; //! pythia cross section and trials
164 TH1F* fh1Trials; //! trials which are added
165 TH1F* fh1PtHard; //! pt hard of the event
166 TH1F* fh1PtHardTrials; //! pt hard of the event
167
168 TH1F *fh1NTracksAll; //! All tracks
169 TH1F *fh1NTracksReject; //! Reason why track was rejected
170 TH1F *fh1NTracksSel; //! Number of accepted tracks
171
172 TH1F *fPtAll; //! Pt spectrum all charged particles
173 TH1F *fPtSel; //! Pt spectrum all selected charged particles by fTrackCuts
174 TH2F *fPtPhi; //! Pt vs Phi
175 TH2F *fPtEta; //! Pt vs Eta
176 TH2F *fPtDCA2D; //! Pt vs DCA2D
177 TH2F *fPtDCAZ; //! Pt vs DCAZ
178 TH2F *fPtNClustersTPC; //! Pt vs nClustersTPC
0f76d8ae 179 TH2F *fPtNClustersTPCIter1; //! Pt vs nClustersTPCIter1
a5e0d236 180 TH3F *fPtNClustersTPCIter1Phi; //! Pt vs nClustersTPCIter1 vs Phi
d889ce29 181 TH2F *fPtNClustersTPCShared; //! Pt vs nClustersTPCShared
182 TH2F *fPtNClustersTPCSharedFrac; //! Pt vs nClustersTPCSharedFrac
d756027f 183 TH2F *fPtNPointITS; //! Pt vs nPointITS
184 TH2F *fPtChi2C; //! Pt vs Chi2C
185 TH2F *fPtNSigmaToVertex; //! Pt vs nSigmaToVertex
b8f6bad5 186
d756027f 187 TH2F *fPtRelUncertainty1Pt; //! Pt vs relUncertainty1Pt
05cb235d 188 TH3F *fPtRelUncertainty1PtNClus; //! Pt vs relUncertainty1Pt vs NClustersTPC
0f76d8ae 189 TH3F *fPtRelUncertainty1PtNClusIter1; //! Pt vs relUncertainty1Pt vs NClustersTPCIter1
b8f6bad5 190 TH3F *fPtRelUncertainty1PtNPointITS; //! Pt vs relUncertainty1Pt vs NPointITS
191 TH3F *fPtRelUncertainty1PtITSClusterMap; //! Pt vs relUncertainty1Pt vs byte of ITS clustermap
192
193
05cb235d 194 TH3F *fPtRelUncertainty1PtChi2; //! Pt vs relUncertainty1Pt vs Chi2TPC/NClus
0f76d8ae 195 TH3F *fPtRelUncertainty1PtChi2Iter1; //! Pt vs relUncertainty1Pt vs Chi2TPC/NClusIter1
196 TH3F *fPtRelUncertainty1PtPhi; //! Pt vs relUncertainty1PtPhi
aa3ba8d2 197 TH2F *fPtUncertainty1Pt; //! Pt vs Uncertainty1Pt
d756027f 198 TH2F *fPtChi2PerClusterTPC; //! Pt vs Chi2PerClusterTPC
dae7dd67 199 TH2F *fPtChi2PerClusterTPCIter1; //! Pt vs Chi2PerClusterTPCIter1
d756027f 200 TH2F *fPtNCrossedRows; //! Pt vs NCrossedRows
a337a5a9 201 TH3F *fPtNCrossedRowsPhi; //! Pt vs NCrossedRows vs Phi
b8f6bad5 202 TH3F *fPtNCrossedRowsNClusFPhi; //! Pt vs NCrossedRows/NClusF vs Phi
d756027f 203 TH3F *fPtNCrRNCrRNClusF; //! Pt vs NCrossedRows vs NCrossedRows/NClusF
a5e0d236 204 TH2F *fPtNCrossedRowsFit; //! Pt vs NCrossedRows from NClusterFitMap
a337a5a9 205 TH3F *fPtNCrossedRowsFitPhi; //! Pt vs NCrossedRows from FitMap vs Phi
b8f6bad5 206 TH3F *fPtNCrossedRowsNClusFFitPhi; //! Pt vs NCrossedRows/NClusF from NClusterFitMap
a337a5a9 207 TH2F *fNCrossedRowsNCrossedRowsFit; //! NCrossedRows from ClusterMap vs NCrossedRows from NClusterFitMap
208 TH2F *fNClustersNCrossedRows; //! NClusters vs NCrossedRows
209 TH2F *fNClustersNCrossedRowsFit; //! NClusters vs NCrossedRows from fit map
b8f6bad5 210 TH3F *fPtRelUncertainty1PtNCrossedRows; //! Pt vs relUncertainty1Pt vs NCrossedRows
211 TH3F *fPtRelUncertainty1PtNCrossedRowsFit; //! Pt vs relUncertainty1Pt vs NCrossedRowsFitMap
d756027f 212
dae7dd67 213 TH2F *fPtChi2Gold; //! Pt vs Chi2 between global and TPC constrained track
214 TH2F *fPtChi2GGC; //! Pt vs Chi2 between global and global constrained track
215 TH3F *fPtChi2GoldPhi; //! Pt vs Chi2 between global and TPC constrained track vs phi
216 TH3F *fPtChi2GGCPhi; //! Pt vs Chi2 between global and global constrained track vs phi
217 TH2F *fChi2GoldChi2GGC; //! Correlations between gold chi2 and GGC chi2
218
2b553e6f 219 //histos for covariance matrix elements
aa3ba8d2 220 TH2F *fPtSigmaY2; //! 1/Pt vs sigma(y) extCov[0]
221 TH2F *fPtSigmaZ2; //! 1/Pt vs sigma(z) extCov[2]
222 TH2F *fPtSigmaSnp2; //! 1/Pt vs sigma(Snp) extCov[5]
223 TH2F *fPtSigmaTgl2; //! 1/Pt vs sigma(Tgl) extCov[9]
224 TH2F *fPtSigma1Pt2; //! 1/Pt vs sigma(1/pT) extCov[14]
225
226 //profiles for covariance matrix elements
227 TProfile *fProfPtSigmaY2; //! 1/Pt vs sigma(y) extCov[0]
228 TProfile *fProfPtSigmaZ2; //! 1/Pt vs sigma(z) extCov[2]
229 TProfile *fProfPtSigmaSnp2; //! 1/Pt vs sigma(Snp) extCov[5]
230 TProfile *fProfPtSigmaTgl2; //! 1/Pt vs sigma(Tgl) extCov[9]
231 TProfile *fProfPtSigma1Pt2; //! 1/Pt vs sigma(1/pT) extCov[14]
232
233 TProfile *fProfPtSigma1Pt; //! pT vs sigma(1/Pt)
234 TProfile *fProfPtPtSigma1Pt; //! pT vs pT*sigma(1/Pt)
235
d756027f 236 TList *fHistList; //! List of Histograms
237
238
d480da92 239 ClassDef(AliPWG4HighPtTrackQA,2)
d756027f 240
241};
242#endif