Add protection when kinematics can not be loaded.
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliPWG4HighPtQATPConly.cxx
CommitLineData
fdceab34 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//-----------------------------------------------------------------------
17// This class compares the global reconstruction with the TPConly
18// reconstruction
19// Momentum resolution is stored as function of track cuts and pt.
20// Output: Histograms for different set of cuts
21//-----------------------------------------------------------------------
22// Author : Marta Verweij - UU
23//-----------------------------------------------------------------------
24
df943115 25#ifndef ALIPWG4HighPtQATPCONLY_CXX
26#define ALIPWG4HighPtQATPCONLY_CXX
27
fdceab34 28#include "AliPWG4HighPtQATPConly.h"
29
30#include "TH1.h"
31#include "TH2.h"
32#include "TH3.h"
33#include "TList.h"
34#include "TChain.h"
35#include "TH3F.h"
36#include "AliAnalysisManager.h"
37#include "AliESDInputHandler.h"
38#include "AliESDtrack.h"
39#include "AliESDtrackCuts.h"
40#include "AliExternalTrackParam.h"
df943115 41#include "AliLog.h"
fdceab34 42
43using namespace std; //required for resolving the 'cout' symbol
44
45ClassImp(AliPWG4HighPtQATPConly)
46
47AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(): AliAnalysisTask("AliPWG4HighPtQATPConly", ""),
48 fESD(0),
49 fTrackCuts(0),
50 fTrackCutsITS(0),
df943115 51 fNEvent(0),
52 fPtAll(0),
53 fPtSel(0),
fdceab34 54 fPtAllminPtTPCvsPtAll(0),
55 fPtAllminPtTPCvsPtAllNPointTPC(0),
56 fPtAllminPtTPCvsPtAllDCAR(0),
57 fPtAllminPtTPCvsPtAllDCAZ(0),
58 fPtAllminPtTPCvsPtAllPhi(0),
59 fPtAllminPtTPCvsPtAllNPointITS(0),
60 fPtAllminPtTPCvsPtAllNSigmaToVertex(0),
61 fPtAllminPtTPCvsPtAllChi2C(0),
62 fPtAllminPtTPCvsPtAllRel1PtUncertainty(0),
63 fHistList(0),
64 fPtAllTPC(0),
65 fPtSelTPC(0),
66 fPtSelTPCITS(0),
67 fHistListTPC(0),
68 fPtSelITS(0),
69 fPtITSminPtTPCvsPtITS(0),
70 fPtITSminPtTPCvsPtITSNPointTPC(0),
71 fPtITSminPtTPCvsPtITSDCAR(0),
72 fPtITSminPtTPCvsPtITSDCAZ(0),
73 fPtITSminPtTPCvsPtITSPhi(0),
74 fPtITSminPtTPCvsPtITSNPointITS(0),
75 fPtITSminPtTPCvsPtITSNSigmaToVertex(0),
76 fPtITSminPtTPCvsPtITSChi2C(0),
77 fPtITSminPtTPCvsPtITSRel1PtUncertainty(0),
78 fHistListITS(0)
79{
df943115 80
fdceab34 81}
82//________________________________________________________________________
83AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(const char *name):
84 AliAnalysisTask(name, ""),
85 fESD(0),
86 fTrackCuts(),
87 fTrackCutsITS(),
df943115 88 fNEvent(0),
89 fPtAll(0),
90 fPtSel(0),
fdceab34 91 fPtAllminPtTPCvsPtAll(0),
92 fPtAllminPtTPCvsPtAllNPointTPC(0),
93 fPtAllminPtTPCvsPtAllDCAR(0),
94 fPtAllminPtTPCvsPtAllDCAZ(0),
95 fPtAllminPtTPCvsPtAllPhi(0),
96 fPtAllminPtTPCvsPtAllNPointITS(0),
97 fPtAllminPtTPCvsPtAllNSigmaToVertex(0),
98 fPtAllminPtTPCvsPtAllChi2C(0),
99 fPtAllminPtTPCvsPtAllRel1PtUncertainty(0),
100 fHistList(0),
101 fPtAllTPC(0),
102 fPtSelTPC(0),
103 fPtSelTPCITS(0),
104 fHistListTPC(0),
105 fPtSelITS(0),
106 fPtITSminPtTPCvsPtITS(0),
107 fPtITSminPtTPCvsPtITSNPointTPC(0),
108 fPtITSminPtTPCvsPtITSDCAR(0),
109 fPtITSminPtTPCvsPtITSDCAZ(0),
110 fPtITSminPtTPCvsPtITSPhi(0),
111 fPtITSminPtTPCvsPtITSNPointITS(0),
112 fPtITSminPtTPCvsPtITSNSigmaToVertex(0),
113 fPtITSminPtTPCvsPtITSChi2C(0),
114 fPtITSminPtTPCvsPtITSRel1PtUncertainty(0),
115 fHistListITS(0)
116{
117 //
118 // Constructor. Initialization of Inputs and Outputs
119 //
120 Info("AliPWG4HighPtQATPConly","Calling Constructor");
121 // Input slot #0 works with a TChain ESD
122 DefineInput(0, TChain::Class());
123 // Output slot #0 writes into a TList
124 DefineOutput(0, TList::Class());
125 // Output slot #1 writes into a TList
126 DefineOutput(1, TList::Class());
127 // Output slot #2 writes into a TList
128 DefineOutput(2, TList::Class());
df943115 129}
fdceab34 130
131//________________________________________________________________________
132void AliPWG4HighPtQATPConly::ConnectInputData(Option_t *)
133{
134 // Connect ESD here
135 // Called once
df943115 136 AliDebug(2,Form(">> AliPWG4HighPtSpectra::ConnectInputData \n"));
fdceab34 137 TTree* tree = dynamic_cast<TTree*> (GetInputData(0));
138 if (!tree) {
139 Printf("ERROR: Could not read chain from input slot 0");
140 } else {
141
142 AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
143
144 if (!esdH) {
df943115 145 AliDebug(2,Form("ERROR: Could not get ESDInputHandler"));
fdceab34 146 } else
147 fESD = esdH->GetEvent();
148 }
149}
150
151//________________________________________________________________________
fdceab34 152void AliPWG4HighPtQATPConly::CreateOutputObjects() {
153 //Create output objects
df943115 154 AliDebug(2,Form(">> AliPWG4HighPtQATPConly::CreateOutputObjects \n"));
155
156 Bool_t oldStatus = TH1::AddDirectoryStatus();
157 TH1::AddDirectory(kFALSE);
158
fdceab34 159 OpenFile(0);
160 fHistList = new TList();
161 OpenFile(1);
162 fHistListTPC = new TList();
163 OpenFile(2);
164 fHistListITS = new TList();
165
166 Int_t fgkNPhiBins=18;
167 Float_t kMinPhi = 0.;
168 Float_t kMaxPhi = 2.*TMath::Pi();
169
170 Int_t fgkNPtBins=98;
171 Float_t fgkPtMin=2.;
172 Float_t fgkPtMax=100.;
173 Int_t fgkResPtBins=40;
174
175 fNEvent = new TH1F("fNEvent","NEvent",1,-0.5,0.5);
176 fHistList->Add(fNEvent);
177 fPtAll = new TH1F("fPtAll","PtAll",fgkNPtBins, fgkPtMin, fgkPtMax);
178 fHistList->Add(fPtAll);
179 fPtSel = new TH1F("fPtSel","PtSel",fgkNPtBins, fgkPtMin, fgkPtMax);
180 fHistList->Add(fPtSel);
181
182 fPtAllminPtTPCvsPtAll = new TH2F("fPtAllminPtTPCvsPtAll","PtAllminPtTPCvsPtAll",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.);
183 fPtAllminPtTPCvsPtAll->SetXTitle("p_{t}^{All}");
184 fPtAllminPtTPCvsPtAll->SetYTitle("(1/p_{t}^{All}-1/p_{t}^{TPC})/(1/p_{t}^{All})");
185 fHistList->Add(fPtAllminPtTPCvsPtAll);
186
187 fPtAllminPtTPCvsPtAllNPointTPC = new TH3F("fPtAllminPtTPCvsPtAllNPointTPC","PtAllminPtTPCvsPtAllNPointTPC",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,160,0.5,160.5);
188 fPtAllminPtTPCvsPtAllNPointTPC->SetXTitle("p_{t}^{All}");
189 fPtAllminPtTPCvsPtAllNPointTPC->SetYTitle("(1/p_{t}^{All}-1/p_{t}^{TPC})/(1/p_{t}^{All})");
190 fPtAllminPtTPCvsPtAllNPointTPC->SetZTitle("N_{point,TPC}");
191 fHistList->Add(fPtAllminPtTPCvsPtAllNPointTPC);
192
193 fPtAllminPtTPCvsPtAllDCAR = new TH3F("fPtAllminPtTPCvsPtAllDCAR","PtAllminPtTPCvsPtAllDCAR",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,20,-1.,1.);
194 fPtAllminPtTPCvsPtAllDCAR->SetXTitle("p_{t}^{All}");
195 fPtAllminPtTPCvsPtAllDCAR->SetYTitle("(1/p_{t}^{All}-1/p_{t}^{TPC})/(1/p_{t}^{All})");
196 fPtAllminPtTPCvsPtAllDCAR->SetZTitle("DCA_{R}");
197 fHistList->Add(fPtAllminPtTPCvsPtAllDCAR);
198
199 fPtAllminPtTPCvsPtAllDCAZ = new TH3F("fPtAllminPtTPCvsPtAllDCAZ","PtAllminPtTPCvsPtAllDCAZ",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,40,-2.,2.);
200 fPtAllminPtTPCvsPtAllDCAZ->SetXTitle("p_{t}^{All}");
201 fPtAllminPtTPCvsPtAllDCAZ->SetYTitle("(1/p_{t}^{All}-1/p_{t}^{TPC})/(1/p_{t}^{All})");
202 fPtAllminPtTPCvsPtAllDCAZ->SetZTitle("DCA_{Z}");
203 fHistList->Add(fPtAllminPtTPCvsPtAllDCAZ);
204
205 fPtAllminPtTPCvsPtAllPhi = new TH3F("fPtAllminPtTPCvsPtAllPhi","PtAllminPtTPCvsPtAllPhi",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,fgkNPhiBins,kMinPhi,kMaxPhi);
206 fPtAllminPtTPCvsPtAllPhi->SetXTitle("p_{t}^{All}");
207 fPtAllminPtTPCvsPtAllPhi->SetYTitle("(1/p_{t}^{All}-1/p_{t}^{TPC})/(1/p_{t}^{All})");
208 fPtAllminPtTPCvsPtAllPhi->SetZTitle("#phi");
209 fHistList->Add(fPtAllminPtTPCvsPtAllPhi);
210
211 fPtAllminPtTPCvsPtAllNPointITS = new TH3F("fPtAllminPtTPCvsPtAllNPointITS","PtAllminPtTPCvsPtAllNPointITS",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,9,-0.5,8.5);
212 fPtAllminPtTPCvsPtAllNPointITS->SetXTitle("p_{t}^{All}");
213 fPtAllminPtTPCvsPtAllNPointITS->SetYTitle("(1/p_{t}^{All}-1/p_{t}^{TPC})/(1/p_{t}^{All})");
214 fPtAllminPtTPCvsPtAllNPointITS->SetZTitle("N_{point,ITS}}");
215 fHistList->Add(fPtAllminPtTPCvsPtAllNPointITS);
216
217 fPtAllminPtTPCvsPtAllNSigmaToVertex = new TH3F("fPtAllminPtTPCvsPtAllNSigmaToVertex","PtAllminPtTPCvsPtAllNSigmaToVertex",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,40,0.,8.);
218 fPtAllminPtTPCvsPtAllNSigmaToVertex->SetXTitle("p_{t}^{All}");
219 fPtAllminPtTPCvsPtAllNSigmaToVertex->SetYTitle("(1/p_{t}^{All}-1/p_{t}^{TPC})/(1/p_{t}^{All})");
220 fPtAllminPtTPCvsPtAllNSigmaToVertex->SetZTitle("N#sigma to vertex");
221 fHistList->Add(fPtAllminPtTPCvsPtAllNSigmaToVertex);
222
223 fPtAllminPtTPCvsPtAllChi2C = new TH3F("fPtAllminPtTPCvsPtAllChi2C","PtAllminPtTPCvsPtAllChi2C",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,20,0.,10.);
224 fPtAllminPtTPCvsPtAllChi2C->SetXTitle("p_{t}^{All}");
225 fPtAllminPtTPCvsPtAllChi2C->SetYTitle("(1/p_{t}^{All}-1/p_{t}^{TPC})/(1/p_{t}^{All})");
226 fPtAllminPtTPCvsPtAllChi2C->SetZTitle("Constrained #chi^{2}");
227 fHistList->Add(fPtAllminPtTPCvsPtAllChi2C);
228
229 fPtAllminPtTPCvsPtAllRel1PtUncertainty = new TH3F("fPtAllminPtTPCvsPtAllRel1PtUncertainty","PtAllminPtTPCvsPtAllRel1PtUncertainty",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,30,0.,0.3);
230 fPtAllminPtTPCvsPtAllRel1PtUncertainty->SetXTitle("p_{t}^{All}");
231 fPtAllminPtTPCvsPtAllRel1PtUncertainty->SetYTitle("(1/p_{t}^{All}-1/p_{t}^{TPC})/(1/p_{t}^{All})");
232 fPtAllminPtTPCvsPtAllRel1PtUncertainty->SetZTitle("Rel1PtUncertainty");
233 fHistList->Add(fPtAllminPtTPCvsPtAllRel1PtUncertainty);
234
235 //ITSrefit
236 fPtSelITS = new TH1F("fPtSelITSrefit","PtSel",fgkNPtBins, fgkPtMin, fgkPtMax);
237 fHistListITS->Add(fPtSelITS);
238
239 fPtITSminPtTPCvsPtITS = new TH2F("fPtITSminPtTPCvsPtITS","PtITSminPtTPCvsPtITS",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.);
240 fPtITSminPtTPCvsPtITS->SetXTitle("p_{t}^{ITS}");
241 fPtITSminPtTPCvsPtITS->SetYTitle("(1/p_{t}^{ITS}-1/p_{t}^{TPC})/(1/p_{t}^{ITS})");
242 fHistListITS->Add(fPtITSminPtTPCvsPtITS);
243
244 fPtITSminPtTPCvsPtITSNPointTPC = new TH3F("fPtITSminPtTPCvsPtITSNPointTPC","PtITSminPtTPCvsPtITSNPointTPC",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,160,0.5,160.5);
245 fPtITSminPtTPCvsPtITSNPointTPC->SetXTitle("p_{t}^{ITSrefit}");
246 fPtITSminPtTPCvsPtITSNPointTPC->SetYTitle("(1/p_{t}^{ITSrefit}-1/p_{t}^{TPC})/(1/p_{t}^{ITSrefit})");
247 fPtITSminPtTPCvsPtITSNPointTPC->SetZTitle("N_{point,TPC}");
248 fHistListITS->Add(fPtITSminPtTPCvsPtITSNPointTPC);
249
250 fPtITSminPtTPCvsPtITSDCAR = new TH3F("fPtITSminPtTPCvsPtITSDCAR","PtITSminPtTPCvsPtITSDCAR",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,20,-1.,1.);
251 fPtITSminPtTPCvsPtITSDCAR->SetXTitle("p_{t}^{ITSrefit}");
252 fPtITSminPtTPCvsPtITSDCAR->SetYTitle("(1/p_{t}^{ITSrefit}-1/p_{t}^{TPC})/(1/p_{t}^{ITSrefit})");
253 fPtITSminPtTPCvsPtITSDCAR->SetZTitle("DCA_{R}");
254 fHistListITS->Add(fPtITSminPtTPCvsPtITSDCAR);
255
256 fPtITSminPtTPCvsPtITSDCAZ = new TH3F("fPtITSminPtTPCvsPtITSDCAZ","PtITSminPtTPCvsPtITSDCAZ",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,40,-2.,2.);
257 fPtITSminPtTPCvsPtITSDCAZ->SetXTitle("p_{t}^{ITSrefit}");
258 fPtITSminPtTPCvsPtITSDCAZ->SetYTitle("(1/p_{t}^{ITSrefit}-1/p_{t}^{TPC})/(1/p_{t}^{ITSrefit})");
259 fPtITSminPtTPCvsPtITSDCAZ->SetZTitle("DCA_{Z}");
260 fHistListITS->Add(fPtITSminPtTPCvsPtITSDCAZ);
261
262 fPtITSminPtTPCvsPtITSPhi = new TH3F("fPtITSminPtTPCvsPtITSPhi","PtITSminPtTPCvsPtITSPhi",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,fgkNPhiBins,kMinPhi,kMaxPhi);
263 fPtITSminPtTPCvsPtITSPhi->SetXTitle("p_{t}^{ITSrefit}");
264 fPtITSminPtTPCvsPtITSPhi->SetYTitle("(1/p_{t}^{ITSrefit}-1/p_{t}^{TPC})/(1/p_{t}^{ITSrefit})");
265 fPtITSminPtTPCvsPtITSPhi->SetZTitle("#phi");
266 fHistListITS->Add(fPtITSminPtTPCvsPtITSPhi);
267
268 fPtITSminPtTPCvsPtITSNPointITS = new TH3F("fPtITSminPtTPCvsPtITSNPointITS","PtITSminPtTPCvsPtITSNPointITS",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,9,-0.5,8.5);
269 fPtITSminPtTPCvsPtITSNPointITS->SetXTitle("p_{t}^{ITSrefit}");
270 fPtITSminPtTPCvsPtITSNPointITS->SetYTitle("(1/p_{t}^{ITSrefit}-1/p_{t}^{TPC})/(1/p_{t}^{ITSrefit})");
271 fPtITSminPtTPCvsPtITSNPointITS->SetZTitle("N_{point,ITS}}");
272 fHistListITS->Add(fPtITSminPtTPCvsPtITSNPointITS);
273
274 fPtITSminPtTPCvsPtITSNSigmaToVertex = new TH3F("fPtITSminPtTPCvsPtITSNSigmaToVertex","PtITSminPtTPCvsPtITSNSigmaToVertex",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,40,0.,8.);
275 fPtITSminPtTPCvsPtITSNSigmaToVertex->SetXTitle("p_{t}^{ITS}");
276 fPtITSminPtTPCvsPtITSNSigmaToVertex->SetYTitle("(1/p_{t}^{ITS}-1/p_{t}^{TPC})/(1/p_{t}^{ITS})");
277 fPtITSminPtTPCvsPtITSNSigmaToVertex->SetZTitle("N#sigma to vertex");
278 fHistListITS->Add(fPtITSminPtTPCvsPtITSNSigmaToVertex);
279
280 fPtITSminPtTPCvsPtITSChi2C = new TH3F("fPtITSminPtTPCvsPtITSChi2C","PtITSminPtTPCvsPtITSChi2C",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,20,0.,10.);
281 fPtITSminPtTPCvsPtITSChi2C->SetXTitle("p_{t}^{ITS}");
282 fPtITSminPtTPCvsPtITSChi2C->SetYTitle("(1/p_{t}^{ITS}-1/p_{t}^{TPC})/(1/p_{t}^{ITS})");
283 fPtITSminPtTPCvsPtITSChi2C->SetZTitle("Constrained #chi^{2}");
284 fHistListITS->Add(fPtITSminPtTPCvsPtITSChi2C);
285
286 fPtITSminPtTPCvsPtITSRel1PtUncertainty = new TH3F("fPtITSminPtTPCvsPtITSRel1PtUncertainty","PtITSminPtTPCvsPtITSRel1PtUncertainty",fgkNPtBins, fgkPtMin,fgkPtMax,fgkResPtBins,-1.,1.,30,0.,0.3);
287 fPtITSminPtTPCvsPtITSRel1PtUncertainty->SetXTitle("p_{t}^{ITS}");
288 fPtITSminPtTPCvsPtITSRel1PtUncertainty->SetYTitle("(1/p_{t}^{ITS}-1/p_{t}^{TPC})/(1/p_{t}^{ITS})");
289 fPtITSminPtTPCvsPtITSRel1PtUncertainty->SetZTitle("Rel1PtUncertainty");
290 fHistListITS->Add(fPtITSminPtTPCvsPtITSRel1PtUncertainty);
291
292 fPtAllTPC = new TH1F("fPtAllTPC","PtAll",fgkNPtBins, fgkPtMin, fgkPtMax);
293 fHistListTPC->Add(fPtAllTPC);
294 fPtSelTPC = new TH1F("fPtSelTPC","PtSel",fgkNPtBins, fgkPtMin, fgkPtMax);
295 fHistListTPC->Add(fPtSelTPC);
296 fPtSelTPCITS = new TH1F("fPtSelTPCITS","PtSel",fgkNPtBins, fgkPtMin, fgkPtMax);
297 fHistListTPC->Add(fPtSelTPCITS);
df943115 298
299 TH1::AddDirectory(oldStatus);
300
fdceab34 301}
302//________________________________________________________________________
303void AliPWG4HighPtQATPConly::Exec(Option_t *) {
304 // Main loop
305 // Called for each event
df943115 306 AliDebug(2,Form(">> AliPWG4HighPtQATPConly::Exec \n"));
307
308 if (!fESD) {
309 AliDebug(2,Form("ERROR: fESD not available"));
fdceab34 310 return;
311 }
312
313 const AliESDVertex *vtx = fESD->GetPrimaryVertex();
314
315 // Need vertex cut
316 if (vtx->GetNContributors() < 2)
317 return;
318
df943115 319 AliDebug(2,Form("Vertex title %s, status %d, nCont %d\n",vtx->GetTitle(), vtx->GetStatus(), vtx->GetNContributors()));
320
fdceab34 321 // Need to keep track of evts without vertex
322 fNEvent->Fill(0.);
323
324 if(!fESD->GetNumberOfTracks() || fESD->GetNumberOfTracks()<2) return;
325 Int_t nTracks = fESD->GetNumberOfTracks();
df943115 326 AliDebug(2,Form("nTracks %d", nTracks));
327
fdceab34 328 for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) {
329
330 AliESDtrack *track = fESD->GetTrack(iTrack);
331 AliExternalTrackParam *trackTPC = (AliExternalTrackParam *)track->GetTPCInnerParam();
332 AliESDtrack *trackTPConly = fTrackCuts->GetTPCOnlyTrack(fESD,iTrack);
333 if(!track || !trackTPC || !trackTPConly) continue;
334
335 Float_t pt = track->Pt();
336 Float_t ptTPC = trackTPC->Pt();
337 Float_t phi = track->Phi();
338 Float_t dca2D, dcaZ;
339 track->GetImpactParameters(dca2D,dcaZ);
340 // Float_t dca2DTPC, dcaZTPC;
341 //track->GetImpactParametersTPC(dca2DTPC,dcaZTPC);
342 UChar_t itsMap = track->GetITSClusterMap();
343 Int_t nPointITS = 0;
344 for (Int_t i=0; i < 6; i++) {
345 if (itsMap & (1 << i))
346 nPointITS ++;
347 }
348 Float_t nSigmaToVertex = fTrackCuts->GetSigmaToVertex(track);// Calculates the number of sigma to the vertex for a track.
349 Float_t chi2C = track->GetConstrainedChi2();
350 // Float_t relUncertainty1Pt = TMath::Sqrt(extCov[14])*pt;
351 Float_t relUncertainty1Pt = TMath::Sqrt(track->GetSigma1Pt2())*pt;
352
353 fPtAll->Fill(pt);
354 fPtAllTPC->Fill(ptTPC);
355
356 if (fTrackCuts->AcceptTrack(track)) {
357
358 fPtSel->Fill(pt);
359
360 fPtSelTPC->Fill(ptTPC);
361 fPtAllminPtTPCvsPtAll->Fill(pt,(1./pt-1./ptTPC)/(1./pt) );
362 fPtAllminPtTPCvsPtAllNPointTPC->Fill(pt,(1./pt-1./ptTPC)/(1./pt),track->GetTPCNcls());
363 fPtAllminPtTPCvsPtAllDCAR->Fill(pt,(1./pt-1./ptTPC)/(1./pt),dca2D);
364 fPtAllminPtTPCvsPtAllDCAZ->Fill(pt,(1./pt-1./ptTPC)/(1./pt),dcaZ);
365 fPtAllminPtTPCvsPtAllPhi->Fill(pt,(1./pt-1./ptTPC)/(1./pt),phi);
366 fPtAllminPtTPCvsPtAllNPointITS->Fill(pt,(1./pt-1./ptTPC)/(1./pt),nPointITS);
367 fPtAllminPtTPCvsPtAllNSigmaToVertex->Fill(pt,(1./pt-1./ptTPC)/(1./pt),nSigmaToVertex);
368 fPtAllminPtTPCvsPtAllChi2C->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2C);
369 fPtAllminPtTPCvsPtAllRel1PtUncertainty->Fill(pt,(1./pt-1./ptTPC)/(1./pt),relUncertainty1Pt);
370 }//fTrackCuts selection
371
372
373 //ITSrefit selection
374 if (fTrackCutsITS->AcceptTrack(track)) {
375
376 fPtSelITS->Fill(pt);
377 fPtSelTPCITS->Fill(ptTPC);
378 fPtITSminPtTPCvsPtITS->Fill(pt,(1./pt-1./ptTPC)/(1./pt) );
379 fPtITSminPtTPCvsPtITSNPointTPC->Fill(pt,(1./pt-1./ptTPC)/(1./pt),track->GetTPCNcls());
380 fPtITSminPtTPCvsPtITSDCAR->Fill(pt,(1./pt-1./ptTPC)/(1./pt),dca2D);
381 fPtITSminPtTPCvsPtITSDCAZ->Fill(pt,(1./pt-1./ptTPC)/(1./pt),dcaZ);
382 fPtITSminPtTPCvsPtITSPhi->Fill(pt,(pt-ptTPC)/(pt),phi);
383 fPtITSminPtTPCvsPtITSNPointITS->Fill(pt,(pt-ptTPC)/(pt),nPointITS);
384 fPtITSminPtTPCvsPtITSNSigmaToVertex->Fill(pt,(1./pt-1./ptTPC)/(1./pt),nSigmaToVertex);
385 fPtITSminPtTPCvsPtITSChi2C->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2C);
386 fPtITSminPtTPCvsPtITSRel1PtUncertainty->Fill(pt,(1./pt-1./ptTPC)/(1./pt),relUncertainty1Pt);
387 }//fTrackCutsITS loop
388
389 }//ESD track loop
390
391 // Post output data
392 PostData(0, fHistList);
393 PostData(1, fHistListTPC);
394 PostData(2, fHistListITS);
395
396}
397//________________________________________________________________________
398void AliPWG4HighPtQATPConly::Terminate(Option_t *)
399{
fdceab34 400
fdceab34 401}
df943115 402
403#endif