]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/JetTasks/AliPWG4HighPtTrackQA.h
Fix (Alessandro)
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / 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);
64 Int_t CalculateCentrality(AliAODEvent *aod);
669e2312 65 Int_t GetCentralityClass(Float_t cent=-1.);
d756027f 66 void DoAnalysisESD();
67 void DoAnalysisAOD();
68 void FillHistograms();
69
aa3ba8d2 70 void FillSystematicCutHist(AliESDtrack *track);
d756027f 71
72 //Setters
73 void SetDataType(DataType d) {fDataType = d;}
74 void SetIsPbPb(Bool_t cs) {fIsPbPb = cs;}
75 void SetCentralityClass(int cent) {fCentClass=cent;}
76 void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
44684f3b 77 void SetCutsITSLoose(AliESDtrackCuts* trackCuts) {fTrackCutsITSLoose = trackCuts;}
78 void SetCutsTPConly(AliESDtrackCuts* trackCuts) {fTrackCutsTPConly = trackCuts;}
d756027f 79 void SetTrackType(Int_t trackType) {fTrackType = trackType;}
80 void SetFilterMask(UInt_t filterMask) {fFilterMask = filterMask;}
81
2b553e6f 82 void SetSigmaConstrainedMax(Double_t sigma) {fSigmaConstrainedMax=sigma;}
d756027f 83 void SetPtMax(Float_t ptmax) {fPtMax = ptmax;}
aa3ba8d2 84 void SetPtBinEdges(Int_t region, Double_t ptmax, Double_t ptBinWidth);
d756027f 85 void SetNVariables(Int_t nv) {fNVariables = nv;}
86
87 Float_t GetPtMax() {return fPtMax;}
88 Float_t GetTPCClusterInfo(AliAODTrack *tr,Int_t nNeighbours=3, Int_t type=0, Int_t row0=0, Int_t row1=159) const;
89
90 static AliGenPythiaEventHeader* GetPythiaEventHeader(AliMCEvent *mcEvent);
91 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
92
93 protected:
94
95 private:
96 AliPWG4HighPtTrackQA(const AliPWG4HighPtTrackQA&);
97 AliPWG4HighPtTrackQA& operator=(const AliPWG4HighPtTrackQA&);
98
99 DataType fDataType; //! kESD or kAOD
100
aa3ba8d2 101 AliVEvent *fEvent; //! AliVEvent object
102 AliESDEvent *fESD; //! ESD object
d756027f 103 const AliESDVertex *fVtx; //! vertex object
104
44684f3b 105 AliESDtrackCuts *fTrackCuts; // TrackCuts
106 AliESDtrackCuts *fTrackCutsITSLoose; //Loose ITS track cuts
107 AliESDtrackCuts *fTrackCutsTPConly; //TPC track cuts
108 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
109 UInt_t fFilterMask; //! Select tracks from specific track cuts belonging to certain filter mask for AOD analysis
d756027f 110
2b553e6f 111 Double_t fSigmaConstrainedMax; // max sigma on constrained fit
d756027f 112 Float_t fPtMax; // Maximum pT for histograms
aa3ba8d2 113 Float_t fPtBinEdges[3][2]; // 3 regions total with different binning for pT axis of histos
d756027f 114
669e2312 115 Bool_t fIsPbPb; // kTRUE if PbPb
d756027f 116 Int_t fCentClass; // Select only events from predefined centrality class
117
118 /*
119 0: pt
120 1: phi
121 2: eta
122 3: dca2D
123 4: dcaZ
124 5: nClustersTPC
125 6: nPointITS
126 7: chi2C
127 8: nSigmaToVertex
128 9: relUncertainty1Pt
129 10: chi2PerClusterTPC
130 11: #crossed rows
131 12: (#crossed rows)/(#findable clusters)
132 */
133 Int_t fNVariables; // Number of variables
134 TArrayF *fVariables; // QA variables
135
136 Float_t fAvgTrials; // Average number of trials
137
138 TH1F *fNEventAll; //! Event counter
139 TH1F *fNEventSel; //! Event counter
140 TH1F *fNEventReject; //! Book keeping of reason of rejecting events
141
142 TH1F *fh1Centrality; //! Centrality
143
144 TProfile* fh1Xsec; //! pythia cross section and trials
145 TH1F* fh1Trials; //! trials which are added
146 TH1F* fh1PtHard; //! pt hard of the event
147 TH1F* fh1PtHardTrials; //! pt hard of the event
148
149 TH1F *fh1NTracksAll; //! All tracks
150 TH1F *fh1NTracksReject; //! Reason why track was rejected
151 TH1F *fh1NTracksSel; //! Number of accepted tracks
152
153 TH1F *fPtAll; //! Pt spectrum all charged particles
154 TH1F *fPtSel; //! Pt spectrum all selected charged particles by fTrackCuts
155 TH2F *fPtPhi; //! Pt vs Phi
156 TH2F *fPtEta; //! Pt vs Eta
157 TH2F *fPtDCA2D; //! Pt vs DCA2D
158 TH2F *fPtDCAZ; //! Pt vs DCAZ
159 TH2F *fPtNClustersTPC; //! Pt vs nClustersTPC
160 TH2F *fPtNPointITS; //! Pt vs nPointITS
161 TH2F *fPtChi2C; //! Pt vs Chi2C
162 TH2F *fPtNSigmaToVertex; //! Pt vs nSigmaToVertex
163 TH2F *fPtRelUncertainty1Pt; //! Pt vs relUncertainty1Pt
aa3ba8d2 164 TH2F *fPtUncertainty1Pt; //! Pt vs Uncertainty1Pt
d756027f 165 TH2F *fPtChi2PerClusterTPC; //! Pt vs Chi2PerClusterTPC
166 TH2F *fPtNCrossedRows; //! Pt vs NCrossedRows
167 TH2F *fPtNCrossedRowsNClusF; //! Pt vs NCrossedRows/NClusF
168 TH3F *fPtNCrRNCrRNClusF; //! Pt vs NCrossedRows vs NCrossedRows/NClusF
169
2b553e6f 170 //histos for covariance matrix elements
aa3ba8d2 171 TH2F *fPtSigmaY2; //! 1/Pt vs sigma(y) extCov[0]
172 TH2F *fPtSigmaZ2; //! 1/Pt vs sigma(z) extCov[2]
173 TH2F *fPtSigmaSnp2; //! 1/Pt vs sigma(Snp) extCov[5]
174 TH2F *fPtSigmaTgl2; //! 1/Pt vs sigma(Tgl) extCov[9]
175 TH2F *fPtSigma1Pt2; //! 1/Pt vs sigma(1/pT) extCov[14]
176
177 //profiles for covariance matrix elements
178 TProfile *fProfPtSigmaY2; //! 1/Pt vs sigma(y) extCov[0]
179 TProfile *fProfPtSigmaZ2; //! 1/Pt vs sigma(z) extCov[2]
180 TProfile *fProfPtSigmaSnp2; //! 1/Pt vs sigma(Snp) extCov[5]
181 TProfile *fProfPtSigmaTgl2; //! 1/Pt vs sigma(Tgl) extCov[9]
182 TProfile *fProfPtSigma1Pt2; //! 1/Pt vs sigma(1/pT) extCov[14]
183
184 TProfile *fProfPtSigma1Pt; //! pT vs sigma(1/Pt)
185 TProfile *fProfPtPtSigma1Pt; //! pT vs pT*sigma(1/Pt)
186
187 TH1F *fSystTrackCuts; //! Bookkeeping for track cuts
d756027f 188
189 TList *fHistList; //! List of Histograms
190
191
192 ClassDef(AliPWG4HighPtTrackQA,1)
193
194};
195#endif