adding cosmics selection (Marta)
[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
67ebd013 25#ifndef ALIPWG4HIGHPTQATPCONLY_CXX
26#define ALIPWG4HIGHPTQATPCONLY_CXX
df943115 27
fdceab34 28#include "AliPWG4HighPtQATPConly.h"
29
b5cc0c6d 30#include "TVector3.h"
31#include <iostream>
fdceab34 32#include "TH1.h"
33#include "TH2.h"
34#include "TH3.h"
35#include "TList.h"
36#include "TChain.h"
37#include "TH3F.h"
f4d11ac8 38#include <Bytes.h>
39#include <TTree.h>
b5cc0c6d 40
fdceab34 41#include "AliAnalysisManager.h"
42#include "AliESDInputHandler.h"
43#include "AliESDtrack.h"
f4d11ac8 44#include "AliESDfriend.h"
45#include "AliESDfriendTrack.h"
fdceab34 46#include "AliESDtrackCuts.h"
47#include "AliExternalTrackParam.h"
df943115 48#include "AliLog.h"
67ebd013 49//#include "AliAnalysisHelperJetTasks.h"
fdceab34 50
f4d11ac8 51#include "AliStack.h"
52#include "TParticle.h"
53#include "TH1I.h"
54#include "AliMCEvent.h"
55#include "AliMCEventHandler.h"
56
fdceab34 57using namespace std; //required for resolving the 'cout' symbol
58
59ClassImp(AliPWG4HighPtQATPConly)
60
61AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(): AliAnalysisTask("AliPWG4HighPtQATPConly", ""),
62 fESD(0),
f4d11ac8 63 fESDfriend(0),
64 fMC(0),
00c1235a 65 fCutType(1),
fdceab34 66 fTrackCuts(0),
67 fTrackCutsITS(0),
a994dd35 68 fMaxCosmicAngle(0.002),
b5cc0c6d 69 fNEventAll(0),
70 fNEventSel(0),
df943115 71 fPtAll(0),
72 fPtSel(0),
fdceab34 73 fPtAllminPtTPCvsPtAll(0),
9f54dd56 74 fPtAllminPtTPCvsPtAllEtaPos(0),
75 fPtAllminPtTPCvsPtAllEtaNeg(0),
fdceab34 76 fPtAllminPtTPCvsPtAllNPointTPC(0),
77 fPtAllminPtTPCvsPtAllDCAR(0),
78 fPtAllminPtTPCvsPtAllDCAZ(0),
79 fPtAllminPtTPCvsPtAllPhi(0),
80 fPtAllminPtTPCvsPtAllNPointITS(0),
81 fPtAllminPtTPCvsPtAllNSigmaToVertex(0),
82 fPtAllminPtTPCvsPtAllChi2C(0),
83 fPtAllminPtTPCvsPtAllRel1PtUncertainty(0),
f4d11ac8 84 fPtAllminPtTPCvsPtAllChi2PerNClusTPC(0),
85 fPtAllminPtTPCvsPtAllChi2PerNClusITS(0),
9c8dfcb5 86 fPtAllminPtTPCvsNPointTPCPhi(0),
87 fPtAllminPtTPCvsNPointITSPhi(0),
88 fPtAllminPtTPCvsRel1PtUncertaintyPhi(0),
f4d11ac8 89 fEtaPhiOutliers(0),
90 fPtSelITSouter(0),
91 fPtITSouterminPtTPCvsPtAll(0),
9f54dd56 92 fPtITSouterminPtTPCvsPtAllEtaPos(0),
93 fPtITSouterminPtTPCvsPtAllEtaNeg(0),
f4d11ac8 94 fPtITSouterminPtTPCvsPtAllNPointTPC(0),
95 fPtITSouterminPtTPCvsPtAllDCAR(0),
96 fPtITSouterminPtTPCvsPtAllDCAZ(0),
97 fPtITSouterminPtTPCvsPtAllPhi(0),
98 fPtITSouterminPtTPCvsPtAllNPointITS(0),
99 fPtITSouterminPtTPCvsPtAllNSigmaToVertex(0),
100 fPtITSouterminPtTPCvsPtAllChi2C(0),
101 fPtITSouterminPtTPCvsPtAllRel1PtUncertainty(0),
102 fPtITSouterminPtTPCvsPtAllChi2PerNClusTPC(0),
103 fPtITSouterminPtTPCvsPtAllChi2PerNClusITS(0),
3adc85ec 104 fPtITSouterminPtTPCvsPtAllITSLayer0(0),
105 fPtITSouterminPtTPCvsPtAllITSLayer1(0),
106 fPtITSouterminPtTPCvsPtAllITSLayer2(0),
107 fPtITSouterminPtTPCvsPtAllITSLayer3(0),
108 fPtITSouterminPtTPCvsPtAllITSLayer4(0),
109 fPtITSouterminPtTPCvsPtAllITSLayer5(0),
110 fPtITSouterminPtTPCvsPtAllNoSPD(0),
111 fPtITSouterminPtTPCvsPtAllNoSDD(0),
112 fPtITSouterminPtTPCvsPtAllNoSSD(0),
113 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer0(0),
114 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer1(0),
115 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer2(0),
116 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer3(0),
117 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer4(0),
118 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer5(0),
119 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSPD(0),
120 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSDD(0),
121 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSSD(0),
fdceab34 122 fHistList(0),
123 fPtAllTPC(0),
124 fPtSelTPC(0),
125 fPtSelTPCITS(0),
126 fHistListTPC(0),
127 fPtSelITS(0),
128 fPtITSminPtTPCvsPtITS(0),
9f54dd56 129 fPtITSminPtTPCvsPtITSEtaPos(0),
130 fPtITSminPtTPCvsPtITSEtaNeg(0),
fdceab34 131 fPtITSminPtTPCvsPtITSNPointTPC(0),
132 fPtITSminPtTPCvsPtITSDCAR(0),
133 fPtITSminPtTPCvsPtITSDCAZ(0),
134 fPtITSminPtTPCvsPtITSPhi(0),
135 fPtITSminPtTPCvsPtITSNPointITS(0),
136 fPtITSminPtTPCvsPtITSNSigmaToVertex(0),
137 fPtITSminPtTPCvsPtITSChi2C(0),
138 fPtITSminPtTPCvsPtITSRel1PtUncertainty(0),
f4d11ac8 139 fPtITSminPtTPCvsPtITSChi2PerNClusTPC(0),
140 fPtITSminPtTPCvsPtITSChi2PerNClusITS(0),
9c8dfcb5 141 fPtITSminPtTPCvsNPointTPCPhi(0),
142 fPtITSminPtTPCvsNPointITSPhi(0),
143 fPtITSminPtTPCvsRel1PtUncertaintyPhi(0),
f4d11ac8 144 fPtRel1PtUncertaintyChi2PerClusTPC(0),
65e8ecdd 145 fHistListITS(0),
cc89bb69 146 fPtSignedCosmicCandidates(0),
65e8ecdd 147 fDeltaPtCosmicCandidates(0),
cc89bb69 148 fDeltaPhiSumEta(0),
149 fDCAZCosmicCandidates(0),
150 fDCARCosmicCandidates(0),
add06ceb 151 fTheta(0),
152 fThetaZoom(0),
e5abcde9 153 fThetaPt1Pt2(0),
154 fDeltaPhiSumEtaPt1(0),
155 fDeltaPhiSumEtaPt2(0),
156 fThetaDCAZ1DCAZ2(0),
65e8ecdd 157 fHistListCosmics(0)
cc89bb69 158
fdceab34 159{
df943115 160
fdceab34 161}
162//________________________________________________________________________
163AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(const char *name):
164 AliAnalysisTask(name, ""),
165 fESD(0),
f4d11ac8 166 fESDfriend(0),
167 fMC(0),
00c1235a 168 fCutType(1),
fdceab34 169 fTrackCuts(),
170 fTrackCutsITS(),
a994dd35 171 fMaxCosmicAngle(0.002),
b5cc0c6d 172 fNEventAll(0),
173 fNEventSel(0),
df943115 174 fPtAll(0),
175 fPtSel(0),
fdceab34 176 fPtAllminPtTPCvsPtAll(0),
9f54dd56 177 fPtAllminPtTPCvsPtAllEtaPos(0),
178 fPtAllminPtTPCvsPtAllEtaNeg(0),
fdceab34 179 fPtAllminPtTPCvsPtAllNPointTPC(0),
180 fPtAllminPtTPCvsPtAllDCAR(0),
181 fPtAllminPtTPCvsPtAllDCAZ(0),
182 fPtAllminPtTPCvsPtAllPhi(0),
183 fPtAllminPtTPCvsPtAllNPointITS(0),
184 fPtAllminPtTPCvsPtAllNSigmaToVertex(0),
185 fPtAllminPtTPCvsPtAllChi2C(0),
186 fPtAllminPtTPCvsPtAllRel1PtUncertainty(0),
f4d11ac8 187 fPtAllminPtTPCvsPtAllChi2PerNClusTPC(0),
188 fPtAllminPtTPCvsPtAllChi2PerNClusITS(0),
b35040a5 189 fPtAllminPtTPCvsNPointTPCPhi(0),
190 fPtAllminPtTPCvsNPointITSPhi(0),
191 fPtAllminPtTPCvsRel1PtUncertaintyPhi(0),
f4d11ac8 192 fEtaPhiOutliers(0),
193 fPtSelITSouter(0),
194 fPtITSouterminPtTPCvsPtAll(0),
9f54dd56 195 fPtITSouterminPtTPCvsPtAllEtaPos(0),
196 fPtITSouterminPtTPCvsPtAllEtaNeg(0),
f4d11ac8 197 fPtITSouterminPtTPCvsPtAllNPointTPC(0),
198 fPtITSouterminPtTPCvsPtAllDCAR(0),
199 fPtITSouterminPtTPCvsPtAllDCAZ(0),
200 fPtITSouterminPtTPCvsPtAllPhi(0),
201 fPtITSouterminPtTPCvsPtAllNPointITS(0),
202 fPtITSouterminPtTPCvsPtAllNSigmaToVertex(0),
203 fPtITSouterminPtTPCvsPtAllChi2C(0),
204 fPtITSouterminPtTPCvsPtAllRel1PtUncertainty(0),
205 fPtITSouterminPtTPCvsPtAllChi2PerNClusTPC(0),
206 fPtITSouterminPtTPCvsPtAllChi2PerNClusITS(0),
3adc85ec 207 fPtITSouterminPtTPCvsPtAllITSLayer0(0),
208 fPtITSouterminPtTPCvsPtAllITSLayer1(0),
209 fPtITSouterminPtTPCvsPtAllITSLayer2(0),
210 fPtITSouterminPtTPCvsPtAllITSLayer3(0),
211 fPtITSouterminPtTPCvsPtAllITSLayer4(0),
212 fPtITSouterminPtTPCvsPtAllITSLayer5(0),
213 fPtITSouterminPtTPCvsPtAllNoSPD(0),
214 fPtITSouterminPtTPCvsPtAllNoSDD(0),
215 fPtITSouterminPtTPCvsPtAllNoSSD(0),
216 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer0(0),
217 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer1(0),
218 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer2(0),
219 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer3(0),
220 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer4(0),
221 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer5(0),
222 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSPD(0),
223 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSDD(0),
224 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSSD(0),
fdceab34 225 fHistList(0),
226 fPtAllTPC(0),
227 fPtSelTPC(0),
228 fPtSelTPCITS(0),
229 fHistListTPC(0),
230 fPtSelITS(0),
231 fPtITSminPtTPCvsPtITS(0),
9f54dd56 232 fPtITSminPtTPCvsPtITSEtaPos(0),
233 fPtITSminPtTPCvsPtITSEtaNeg(0),
fdceab34 234 fPtITSminPtTPCvsPtITSNPointTPC(0),
235 fPtITSminPtTPCvsPtITSDCAR(0),
236 fPtITSminPtTPCvsPtITSDCAZ(0),
237 fPtITSminPtTPCvsPtITSPhi(0),
238 fPtITSminPtTPCvsPtITSNPointITS(0),
239 fPtITSminPtTPCvsPtITSNSigmaToVertex(0),
240 fPtITSminPtTPCvsPtITSChi2C(0),
241 fPtITSminPtTPCvsPtITSRel1PtUncertainty(0),
f4d11ac8 242 fPtITSminPtTPCvsPtITSChi2PerNClusTPC(0),
243 fPtITSminPtTPCvsPtITSChi2PerNClusITS(0),
b35040a5 244 fPtITSminPtTPCvsNPointTPCPhi(0),
245 fPtITSminPtTPCvsNPointITSPhi(0),
246 fPtITSminPtTPCvsRel1PtUncertaintyPhi(0),
f4d11ac8 247 fPtRel1PtUncertaintyChi2PerClusTPC(0),
65e8ecdd 248 fHistListITS(0),
cc89bb69 249 fPtSignedCosmicCandidates(0),
65e8ecdd 250 fDeltaPtCosmicCandidates(0),
cc89bb69 251 fDeltaPhiSumEta(0),
252 fDCAZCosmicCandidates(0),
253 fDCARCosmicCandidates(0),
add06ceb 254 fTheta(0),
255 fThetaZoom(0),
e5abcde9 256 fThetaPt1Pt2(0),
257 fDeltaPhiSumEtaPt1(0),
258 fDeltaPhiSumEtaPt2(0),
259 fThetaDCAZ1DCAZ2(0),
65e8ecdd 260 fHistListCosmics(0)
fdceab34 261{
262 //
263 // Constructor. Initialization of Inputs and Outputs
264 //
265 Info("AliPWG4HighPtQATPConly","Calling Constructor");
266 // Input slot #0 works with a TChain ESD
267 DefineInput(0, TChain::Class());
cc89bb69 268 // Output slot #0, #1, #2 and #3 writes into a TList
fdceab34 269 DefineOutput(0, TList::Class());
fdceab34 270 DefineOutput(1, TList::Class());
fdceab34 271 DefineOutput(2, TList::Class());
65e8ecdd 272 DefineOutput(3, TList::Class());
cc89bb69 273
274 // Output slot #4 and #5 writes into a AliESDtrackCuts
275 DefineOutput(4, AliESDtrackCuts::Class());
276 DefineOutput(5, AliESDtrackCuts::Class());
277
278}
279
280//________________________________________________________________________
281void AliPWG4HighPtQATPConly::LocalInit()
282{
e5abcde9 283 //
284 // Only called once at beginning
285 //
cc89bb69 286 PostData(4,fTrackCuts);
287 PostData(5,fTrackCutsITS);
df943115 288}
fdceab34 289
290//________________________________________________________________________
291void AliPWG4HighPtQATPConly::ConnectInputData(Option_t *)
292{
293 // Connect ESD here
294 // Called once
df943115 295 AliDebug(2,Form(">> AliPWG4HighPtSpectra::ConnectInputData \n"));
fdceab34 296 TTree* tree = dynamic_cast<TTree*> (GetInputData(0));
297 if (!tree) {
f4d11ac8 298 AliDebug(2,Form( "ERROR: Could not read chain from input slot 0 \n"));
299 return;
300 }
301
302 AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
303
304 if (!esdH) {
305 AliDebug(2,Form("ERROR: Could not get ESDInputHandler"));
306 return;
307 } else
308 fESD = esdH->GetEvent();
309
310 AliMCEventHandler *eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
311 // AliMCEventHandler* mcH = dynamic_cast<AliMCEventHandler*>
312 // (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
313 if (!eventHandler) {
314 AliDebug(2,Form( "ERROR: Could not retrieve MC event handler \n"));
fdceab34 315 }
f4d11ac8 316 else
317 fMC = eventHandler->MCEvent();
318
319 //attach the ESD friend
320 // tree->SetBranchStatus("*", kTRUE);
321// tree->SetBranchStatus("Tracks*", kTRUE);
322// tree->SetBranchStatus("ESDfriend*", kTRUE);
323 // fESD->ReadFromTree(tree);
324
35ba8832 325 //old
326// fESDfriend = (AliESDfriend*)fESD->FindListObject("AliESDfriend");
327// if (!fESDfriend)
328// {
329// // works for both, we just want to avoid setting the branch adress twice
330// // in case of the new ESD
331// tree->SetBranchAddress("ESDfriend.",&fESDfriend);
332// }
f4d11ac8 333
35ba8832 334 fESDfriend = esdH->GetESDfriend();
335
fdceab34 336}
337
338//________________________________________________________________________
fdceab34 339void AliPWG4HighPtQATPConly::CreateOutputObjects() {
340 //Create output objects
df943115 341 AliDebug(2,Form(">> AliPWG4HighPtQATPConly::CreateOutputObjects \n"));
342
343 Bool_t oldStatus = TH1::AddDirectoryStatus();
344 TH1::AddDirectory(kFALSE);
345
fdceab34 346 OpenFile(0);
347 fHistList = new TList();
348 OpenFile(1);
349 fHistListTPC = new TList();
350 OpenFile(2);
351 fHistListITS = new TList();
65e8ecdd 352 OpenFile(3);
353 fHistListCosmics = new TList();
354
cc89bb69 355 Int_t fgkNPhiBins=18;
fdceab34 356 Float_t kMinPhi = 0.;
357 Float_t kMaxPhi = 2.*TMath::Pi();
cc89bb69 358 Double_t *binsPhi=new Double_t[fgkNPhiBins+1];
359 for(Int_t i=0; i<=fgkNPhiBins; i++) binsPhi[i]=(Double_t)kMinPhi + (kMaxPhi-kMinPhi)/fgkNPhiBins*(Double_t)i ;
fdceab34 360
f4d11ac8 361 Float_t fgkPtMin=0.;
fdceab34 362 Float_t fgkPtMax=100.;
cc89bb69 363
364 const Float_t ptmin1 = fgkPtMin;
365 const Float_t ptmax1 = 10.0 ;
366 const Float_t ptmin2 = ptmax1 ;
367 const Float_t ptmax2 = 20.0 ;
368 const Float_t ptmin3 = ptmax2 ;
369 const Float_t ptmax3 = fgkPtMax;
370 const Int_t nbin11 = (int)(ptmax1-ptmin1);
371 const Int_t nbin12 = (int)((ptmax2-ptmin2)/2.)+nbin11;
372 const Int_t nbin13 = (int)((ptmax3-ptmin3)/5.)+nbin12;
373 Int_t fgkNPtBins=nbin13;
374 //Create array with low edges of each bin
375 Double_t *binsPt=new Double_t[fgkNPtBins+1];
376 for(Int_t i=0; i<=fgkNPtBins; i++) {
377 if(i<=nbin11) binsPt[i]=(Double_t)ptmin1 + (ptmax1-ptmin1)/nbin11*(Double_t)i ;
378 if(i<=nbin12 && i>nbin11) binsPt[i]=(Double_t)ptmin2 + (ptmax2-ptmin2)/(nbin12-nbin11)*((Double_t)i-(Double_t)nbin11) ;
379 if(i<=nbin13 && i>nbin12) binsPt[i]=(Double_t)ptmin3 + (ptmax3-ptmin3)/(nbin13-nbin12)*((Double_t)i-(Double_t)nbin12) ;
380 }
381
f4d11ac8 382 Float_t fgkChi2PerClusMin = 0.;
b35040a5 383 Float_t fgkChi2PerClusMax = 4.;
cc89bb69 384 Int_t fgkNChi2PerClusBins = (int)(fgkChi2PerClusMax*10.);
385 Double_t *binsChi2PerClus=new Double_t[fgkNChi2PerClusBins+1];
386 for(Int_t i=0; i<=fgkNChi2PerClusBins; i++) binsChi2PerClus[i]=(Double_t)fgkChi2PerClusMin + (fgkChi2PerClusMax-fgkChi2PerClusMin)/fgkNChi2PerClusBins*(Double_t)i ;
387
388 Int_t fgkNResPtBins=80;
389 Float_t fgkResPtMin = -1.;
390 Float_t fgkResPtMax = 1.;
391 Double_t *binsResPt=new Double_t[fgkNResPtBins+1];
392 for(Int_t i=0; i<=fgkNResPtBins; i++) binsResPt[i]=(Double_t)fgkResPtMin + (fgkResPtMax-fgkResPtMin)/fgkNResPtBins*(Double_t)i ;
393
394 Int_t fgkNEtaBins=20;
395 Float_t fgkEtaMin = -1.;
396 Float_t fgkEtaMax = 1.;
397 Double_t *binsEta=new Double_t[fgkNEtaBins+1];
398 for(Int_t i=0; i<=fgkNEtaBins; i++) binsEta[i]=(Double_t)fgkEtaMin + (fgkEtaMax-fgkEtaMin)/fgkNEtaBins*(Double_t)i ;
399
400 Int_t fgkNNPointTPCBins=80;
401 Float_t fgkNPointTPCMin = 0.5;
402 Float_t fgkNPointTPCMax = 160.5;
403 Double_t *binsNPointTPC=new Double_t[fgkNNPointTPCBins+1];
404 for(Int_t i=0; i<=fgkNNPointTPCBins; i++) binsNPointTPC[i]=(Double_t)fgkNPointTPCMin + (fgkNPointTPCMax-fgkNPointTPCMin)/fgkNNPointTPCBins*(Double_t)i ;
405
cc89bb69 406 Int_t fgkNDCARBins=80;
407 Float_t fgkDCARMin = -0.2;
408 Float_t fgkDCARMax = 0.2;
409 Double_t *binsDCAR=new Double_t[fgkNDCARBins+1];
410 for(Int_t i=0; i<=fgkNDCARBins; i++) binsDCAR[i]=(Double_t)fgkDCARMin + (fgkDCARMax-fgkDCARMin)/fgkNDCARBins*(Double_t)i ;
411
412 Int_t fgkNDCAZBins=80;
413 Float_t fgkDCAZMin = -2.;
414 Float_t fgkDCAZMax = 2.;
415 Double_t *binsDCAZ=new Double_t[fgkNDCAZBins+1];
416 for(Int_t i=0; i<=fgkNDCAZBins; i++) binsDCAZ[i]=(Double_t)fgkDCAZMin + (fgkDCAZMax-fgkDCAZMin)/fgkNDCAZBins*(Double_t)i ;
417
418 Int_t fgkNNPointITSBins=9;
419 Float_t fgkNPointITSMin = -0.5;
420 Float_t fgkNPointITSMax = 8.5;
421 Double_t *binsNPointITS=new Double_t[fgkNNPointITSBins+1];
422 for(Int_t i=0; i<=fgkNNPointITSBins; i++) binsNPointITS[i]=(Double_t)fgkNPointITSMin + (fgkNPointITSMax-fgkNPointITSMin)/fgkNNPointITSBins*(Double_t)i ;
423
424 Int_t fgkNNSigmaToVertexBins=40;
425 Float_t fgkNSigmaToVertexMin = 0.;
426 Float_t fgkNSigmaToVertexMax = 8.;
427 Double_t *binsNSigmaToVertex=new Double_t[fgkNNSigmaToVertexBins+1];
428 for(Int_t i=0; i<=fgkNNSigmaToVertexBins; i++) binsNSigmaToVertex[i]=(Double_t)fgkNSigmaToVertexMin + (fgkNSigmaToVertexMax-fgkNSigmaToVertexMin)/fgkNNSigmaToVertexBins*(Double_t)i ;
429
430 Int_t fgkNChi2CBins=20;
431 Float_t fgkChi2CMin = 0.;
432 Float_t fgkChi2CMax = 10.;
433 Double_t *binsChi2C=new Double_t[fgkNChi2CBins+1];
434 for(Int_t i=0; i<=fgkNChi2CBins; i++) binsChi2C[i]=(Double_t)fgkChi2CMin + (fgkChi2CMax-fgkChi2CMin)/fgkNChi2CBins*(Double_t)i ;
435
436 Int_t fgkNRel1PtUncertaintyBins=30;
437 Float_t fgkRel1PtUncertaintyMin = 0.;
438 Float_t fgkRel1PtUncertaintyMax = 0.3;
439 Double_t *binsRel1PtUncertainty=new Double_t[fgkNRel1PtUncertaintyBins+1];
440 for(Int_t i=0; i<=fgkNRel1PtUncertaintyBins; i++) binsRel1PtUncertainty[i]=(Double_t)fgkRel1PtUncertaintyMin + (fgkRel1PtUncertaintyMax-fgkRel1PtUncertaintyMin)/fgkNRel1PtUncertaintyBins*(Double_t)i ;
fdceab34 441
b5cc0c6d 442 fNEventAll = new TH1F("fNEventAll","NEventAll",1,-0.5,0.5);
443 fHistList->Add(fNEventAll);
444 fNEventSel = new TH1F("fNEventSel","NEvent Selected for analysis",1,-0.5,0.5);
445 fHistList->Add(fNEventSel);
cc89bb69 446 fPtAll = new TH1F("fPtAll","PtAll",fgkNPtBins, binsPt);//fgkPtMin, fgkPtMax);
fdceab34 447 fHistList->Add(fPtAll);
cc89bb69 448 fPtSel = new TH1F("fPtSel","PtSel",fgkNPtBins, binsPt);//fgkPtMin, fgkPtMax);
fdceab34 449 fHistList->Add(fPtSel);
65e8ecdd 450
cc89bb69 451 fPtAllminPtTPCvsPtAll = new TH2F("fPtAllminPtTPCvsPtAll","PtAllminPtTPCvsPtAll",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
f4d11ac8 452 fPtAllminPtTPCvsPtAll->SetXTitle("p_{t}^{Global}");
453 fPtAllminPtTPCvsPtAll->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 454 fHistList->Add(fPtAllminPtTPCvsPtAll);
455
cc89bb69 456 fPtAllminPtTPCvsPtAllEtaPos = new TH3F("fPtAllminPtTPCvsPtAllEtaPos","PtAllminPtTPCvsPtAllEtaPos",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNEtaBins,binsEta);
9f54dd56 457 fPtAllminPtTPCvsPtAllEtaPos->SetXTitle("p_{t}^{Global}");
458 fPtAllminPtTPCvsPtAllEtaPos->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
cc89bb69 459 fPtAllminPtTPCvsPtAllEtaPos->SetZTitle("#eta");
9f54dd56 460 fHistList->Add(fPtAllminPtTPCvsPtAllEtaPos);
461
cc89bb69 462 fPtAllminPtTPCvsPtAllEtaNeg = new TH3F("fPtAllminPtTPCvsPtAllEtaNeg","PtAllminPtTPCvsPtAllEtaNeg",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNEtaBins,binsEta);
9f54dd56 463 fPtAllminPtTPCvsPtAllEtaNeg->SetXTitle("p_{t}^{Global}");
464 fPtAllminPtTPCvsPtAllEtaNeg->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
cc89bb69 465 fPtAllminPtTPCvsPtAllEtaNeg->SetZTitle("#eta");
9f54dd56 466 fHistList->Add(fPtAllminPtTPCvsPtAllEtaNeg);
467
cc89bb69 468 fPtAllminPtTPCvsPtAllNPointTPC = new TH3F("fPtAllminPtTPCvsPtAllNPointTPC","PtAllminPtTPCvsPtAllNPointTPC",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNNPointTPCBins,binsNPointTPC);
f4d11ac8 469 fPtAllminPtTPCvsPtAllNPointTPC->SetXTitle("p_{t}^{Global}");
470 fPtAllminPtTPCvsPtAllNPointTPC->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 471 fPtAllminPtTPCvsPtAllNPointTPC->SetZTitle("N_{point,TPC}");
472 fHistList->Add(fPtAllminPtTPCvsPtAllNPointTPC);
473
cc89bb69 474 fPtAllminPtTPCvsPtAllDCAR = new TH3F("fPtAllminPtTPCvsPtAllDCAR","PtAllminPtTPCvsPtAllDCAR",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNDCARBins,binsDCAR);
f4d11ac8 475 fPtAllminPtTPCvsPtAllDCAR->SetXTitle("p_{t}^{Global}");
476 fPtAllminPtTPCvsPtAllDCAR->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 477 fPtAllminPtTPCvsPtAllDCAR->SetZTitle("DCA_{R}");
478 fHistList->Add(fPtAllminPtTPCvsPtAllDCAR);
479
cc89bb69 480 fPtAllminPtTPCvsPtAllDCAZ = new TH3F("fPtAllminPtTPCvsPtAllDCAZ","PtAllminPtTPCvsPtAllDCAZ",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNDCAZBins,binsDCAZ);
f4d11ac8 481 fPtAllminPtTPCvsPtAllDCAZ->SetXTitle("p_{t}^{Global}");
482 fPtAllminPtTPCvsPtAllDCAZ->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 483 fPtAllminPtTPCvsPtAllDCAZ->SetZTitle("DCA_{Z}");
484 fHistList->Add(fPtAllminPtTPCvsPtAllDCAZ);
485
cc89bb69 486 fPtAllminPtTPCvsPtAllPhi = new TH3F("fPtAllminPtTPCvsPtAllPhi","PtAllminPtTPCvsPtAllPhi",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNPhiBins,binsPhi);
f4d11ac8 487 fPtAllminPtTPCvsPtAllPhi->SetXTitle("p_{t}^{Global}");
488 fPtAllminPtTPCvsPtAllPhi->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 489 fPtAllminPtTPCvsPtAllPhi->SetZTitle("#phi");
490 fHistList->Add(fPtAllminPtTPCvsPtAllPhi);
491
cc89bb69 492 fPtAllminPtTPCvsPtAllNPointITS = new TH3F("fPtAllminPtTPCvsPtAllNPointITS","PtAllminPtTPCvsPtAllNPointITS",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNNPointITSBins,binsNPointITS);
f4d11ac8 493 fPtAllminPtTPCvsPtAllNPointITS->SetXTitle("p_{t}^{Global}");
494 fPtAllminPtTPCvsPtAllNPointITS->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
495 fPtAllminPtTPCvsPtAllNPointITS->SetZTitle("N_{point,ITS}");
fdceab34 496 fHistList->Add(fPtAllminPtTPCvsPtAllNPointITS);
497
cc89bb69 498 fPtAllminPtTPCvsPtAllNSigmaToVertex = new TH3F("fPtAllminPtTPCvsPtAllNSigmaToVertex","PtAllminPtTPCvsPtAllNSigmaToVertex",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNNSigmaToVertexBins,binsNSigmaToVertex);
f4d11ac8 499 fPtAllminPtTPCvsPtAllNSigmaToVertex->SetXTitle("p_{t}^{Global}");
500 fPtAllminPtTPCvsPtAllNSigmaToVertex->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 501 fPtAllminPtTPCvsPtAllNSigmaToVertex->SetZTitle("N#sigma to vertex");
502 fHistList->Add(fPtAllminPtTPCvsPtAllNSigmaToVertex);
503
cc89bb69 504 fPtAllminPtTPCvsPtAllChi2C = new TH3F("fPtAllminPtTPCvsPtAllChi2C","PtAllminPtTPCvsPtAllChi2C",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2CBins,binsChi2C);
f4d11ac8 505 fPtAllminPtTPCvsPtAllChi2C->SetXTitle("p_{t}^{Global}");
506 fPtAllminPtTPCvsPtAllChi2C->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 507 fPtAllminPtTPCvsPtAllChi2C->SetZTitle("Constrained #chi^{2}");
508 fHistList->Add(fPtAllminPtTPCvsPtAllChi2C);
509
cc89bb69 510 fPtAllminPtTPCvsPtAllRel1PtUncertainty = new TH3F("fPtAllminPtTPCvsPtAllRel1PtUncertainty","PtAllminPtTPCvsPtAllRel1PtUncertainty",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNRel1PtUncertaintyBins,binsRel1PtUncertainty);
f4d11ac8 511 fPtAllminPtTPCvsPtAllRel1PtUncertainty->SetXTitle("p_{t}^{Global}");
512 fPtAllminPtTPCvsPtAllRel1PtUncertainty->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 513 fPtAllminPtTPCvsPtAllRel1PtUncertainty->SetZTitle("Rel1PtUncertainty");
514 fHistList->Add(fPtAllminPtTPCvsPtAllRel1PtUncertainty);
515
cc89bb69 516 fPtAllminPtTPCvsPtAllChi2PerNClusTPC = new TH3F("fPtAllminPtTPCvsPtAllChi2PerNClusTPC","PtAllminPtTPCvsPtAllChi2PerNClusTPC",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
f4d11ac8 517 fPtAllminPtTPCvsPtAllChi2PerNClusTPC->SetXTitle("p_{t}^{Global}");
518 fPtAllminPtTPCvsPtAllChi2PerNClusTPC->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
65e8ecdd 519 fPtAllminPtTPCvsPtAllChi2PerNClusTPC->SetZTitle("#chi^{2}/(2*NClusTPC-5)");
f4d11ac8 520 fHistList->Add(fPtAllminPtTPCvsPtAllChi2PerNClusTPC);
521
cc89bb69 522 fPtAllminPtTPCvsPtAllChi2PerNClusITS = new TH3F("fPtAllminPtTPCvsPtAllChi2PerNClusITS","PtAllminPtTPCvsPtAllChi2PerNClusITS",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
f4d11ac8 523 fPtAllminPtTPCvsPtAllChi2PerNClusITS->SetXTitle("p_{t}^{Global}");
524 fPtAllminPtTPCvsPtAllChi2PerNClusITS->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
65e8ecdd 525 fPtAllminPtTPCvsPtAllChi2PerNClusITS->SetZTitle("#chi^{2}/(2*NClusITS-5)");
f4d11ac8 526 fHistList->Add(fPtAllminPtTPCvsPtAllChi2PerNClusITS);
527
cc89bb69 528 fPtAllminPtTPCvsNPointTPCPhi = new TH3F("fPtAllminPtTPCvsNPointTPCPhi","PtAllminPtTPCvsNPointTPCPhi",fgkNResPtBins,binsResPt,fgkNNPointTPCBins,binsNPointTPC,fgkNPhiBins,binsPhi);
9c8dfcb5 529 fPtAllminPtTPCvsNPointTPCPhi->SetXTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
530 fPtAllminPtTPCvsNPointTPCPhi->SetYTitle("N_{point,TPC}");
531 fPtAllminPtTPCvsNPointTPCPhi->SetZTitle("#phi");
532 fHistList->Add(fPtAllminPtTPCvsNPointTPCPhi);
533
cc89bb69 534 fPtAllminPtTPCvsNPointITSPhi = new TH3F("fPtAllminPtTPCvsNPointITSPhi","PtAllminPtTPCvsNPointITSPhi",fgkNResPtBins,binsResPt,fgkNNPointITSBins,binsNPointITS,fgkNPhiBins,binsPhi);
9c8dfcb5 535 fPtAllminPtTPCvsNPointITSPhi->SetXTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
536 fPtAllminPtTPCvsNPointITSPhi->SetYTitle("N_{point,ITS}");
537 fPtAllminPtTPCvsNPointITSPhi->SetZTitle("#phi");
538 fHistList->Add(fPtAllminPtTPCvsNPointITSPhi);
539
cc89bb69 540 fPtAllminPtTPCvsRel1PtUncertaintyPhi = new TH3F("fPtAllminPtTPCvsRel1PtUncertaintyPhi","PtAllminPtTPCvsRel1PtUncertaintyPhi",fgkNResPtBins,binsResPt,fgkNRel1PtUncertaintyBins,binsRel1PtUncertainty,fgkNPhiBins,binsPhi);
9c8dfcb5 541 fPtAllminPtTPCvsRel1PtUncertaintyPhi->SetXTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
542 fPtAllminPtTPCvsRel1PtUncertaintyPhi->SetYTitle("Rel1PtUncertainty");
543 fPtAllminPtTPCvsRel1PtUncertaintyPhi->SetZTitle("#phi");
544 fHistList->Add(fPtAllminPtTPCvsRel1PtUncertaintyPhi);
545
cc89bb69 546 fEtaPhiOutliers = new TH2F("fEtaPhiOutliers","PtAllminPtTPCvsPtAll",20, -1.,1.,fgkNPhiBins,binsPhi);
f4d11ac8 547 fEtaPhiOutliers->SetXTitle("#eta");
548 fEtaPhiOutliers->SetYTitle("#phi");
549 fHistList->Add(fEtaPhiOutliers);
550
551 //Global vs ITSouter-TPCinner
cc89bb69 552 fPtSelITSouter = new TH1F("fPtSelITSouter","PtSelITSouter",fgkNPtBins,binsPt);
f4d11ac8 553 fHistList->Add(fPtSelITSouter);
554
cc89bb69 555 fPtITSouterminPtTPCvsPtAll = new TH2F("fPtITSouterminPtTPCvsPtAll","PtITSouterminPtTPCvsPtAll",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
f4d11ac8 556 fPtITSouterminPtTPCvsPtAll->SetXTitle("p_{t}^{Global}");
557 fPtITSouterminPtTPCvsPtAll->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
558 fHistList->Add(fPtITSouterminPtTPCvsPtAll);
559
cc89bb69 560 fPtITSouterminPtTPCvsPtAllEtaPos = new TH3F("fPtITSouterminPtTPCvsPtAllEtaPos","PtITSouterminPtTPCvsPtAllEtaPos",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNEtaBins,binsEta);
9f54dd56 561 fPtITSouterminPtTPCvsPtAllEtaPos->SetXTitle("p_{t}^{Global}");
562 fPtITSouterminPtTPCvsPtAllEtaPos->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
563 fHistList->Add(fPtITSouterminPtTPCvsPtAllEtaPos);
564
cc89bb69 565 fPtITSouterminPtTPCvsPtAllEtaNeg = new TH3F("fPtITSouterminPtTPCvsPtAllEtaNeg","PtITSouterminPtTPCvsPtAllEtaNeg",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNEtaBins,binsEta);
9f54dd56 566 fPtITSouterminPtTPCvsPtAllEtaNeg->SetXTitle("p_{t}^{Global}");
567 fPtITSouterminPtTPCvsPtAllEtaNeg->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
568 fHistList->Add(fPtITSouterminPtTPCvsPtAllEtaNeg);
569
cc89bb69 570 fPtITSouterminPtTPCvsPtAllNPointTPC = new TH3F("fPtITSouterminPtTPCvsPtAllNPointTPC","PtITSouterminPtTPCvsPtAllNPointTPC",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNNPointTPCBins,binsNPointTPC);
f4d11ac8 571 fPtITSouterminPtTPCvsPtAllNPointTPC->SetXTitle("p_{t}^{Global}");
572 fPtITSouterminPtTPCvsPtAllNPointTPC->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
573 fPtITSouterminPtTPCvsPtAllNPointTPC->SetZTitle("N_{point,TPC}");
574 fHistList->Add(fPtITSouterminPtTPCvsPtAllNPointTPC);
575
cc89bb69 576 fPtITSouterminPtTPCvsPtAllDCAR = new TH3F("fPtITSouterminPtTPCvsPtAllDCAR","PtITSouterminPtTPCvsPtAllDCAR",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNDCARBins,binsDCAR);
f4d11ac8 577 fPtITSouterminPtTPCvsPtAllDCAR->SetXTitle("p_{t}^{Global}");
578 fPtITSouterminPtTPCvsPtAllDCAR->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
579 fPtITSouterminPtTPCvsPtAllDCAR->SetZTitle("DCA_{R}");
580 fHistList->Add(fPtITSouterminPtTPCvsPtAllDCAR);
581
cc89bb69 582 fPtITSouterminPtTPCvsPtAllDCAZ = new TH3F("fPtITSouterminPtTPCvsPtAllDCAZ","PtITSouterminPtTPCvsPtAllDCAZ",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNDCAZBins,binsDCAZ);
f4d11ac8 583 fPtITSouterminPtTPCvsPtAllDCAZ->SetXTitle("p_{t}^{Global}");
584 fPtITSouterminPtTPCvsPtAllDCAZ->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
585 fPtITSouterminPtTPCvsPtAllDCAZ->SetZTitle("DCA_{Z}");
586 fHistList->Add(fPtITSouterminPtTPCvsPtAllDCAZ);
587
cc89bb69 588 fPtITSouterminPtTPCvsPtAllPhi = new TH3F("fPtITSouterminPtTPCvsPtAllPhi","PtITSouterminPtTPCvsPtAllPhi",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNPhiBins,binsPhi);
f4d11ac8 589 fPtITSouterminPtTPCvsPtAllPhi->SetXTitle("p_{t}^{Global}");
590 fPtITSouterminPtTPCvsPtAllPhi->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
591 fPtITSouterminPtTPCvsPtAllPhi->SetZTitle("#phi");
592 fHistList->Add(fPtITSouterminPtTPCvsPtAllPhi);
593
cc89bb69 594 fPtITSouterminPtTPCvsPtAllNPointITS = new TH3F("fPtITSouterminPtTPCvsPtAllNPointITS","PtITSouterminPtTPCvsPtAllNPointITS",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNNPointITSBins,binsNPointITS);
f4d11ac8 595 fPtITSouterminPtTPCvsPtAllNPointITS->SetXTitle("p_{t}^{Global}");
596 fPtITSouterminPtTPCvsPtAllNPointITS->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
597 fPtITSouterminPtTPCvsPtAllNPointITS->SetZTitle("N_{point,ITS}");
598 fHistList->Add(fPtITSouterminPtTPCvsPtAllNPointITS);
599
cc89bb69 600 fPtITSouterminPtTPCvsPtAllNSigmaToVertex = new TH3F("fPtITSouterminPtTPCvsPtAllNSigmaToVertex","PtITSouterminPtTPCvsPtAllNSigmaToVertex",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNNSigmaToVertexBins,binsNSigmaToVertex);
f4d11ac8 601 fPtITSouterminPtTPCvsPtAllNSigmaToVertex->SetXTitle("p_{t}^{Global}");
602 fPtITSouterminPtTPCvsPtAllNSigmaToVertex->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
603 fPtITSouterminPtTPCvsPtAllNSigmaToVertex->SetZTitle("N#sigma to vertex");
604 fHistList->Add(fPtITSouterminPtTPCvsPtAllNSigmaToVertex);
605
cc89bb69 606 fPtITSouterminPtTPCvsPtAllChi2C = new TH3F("fPtITSouterminPtTPCvsPtAllChi2C","PtITSouterminPtTPCvsPtAllChi2C",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2CBins,binsChi2C);
f4d11ac8 607 fPtITSouterminPtTPCvsPtAllChi2C->SetXTitle("p_{t}^{Global}");
608 fPtITSouterminPtTPCvsPtAllChi2C->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
609 fPtITSouterminPtTPCvsPtAllChi2C->SetZTitle("Constrained #chi^{2}");
610 fHistList->Add(fPtITSouterminPtTPCvsPtAllChi2C);
611
cc89bb69 612 fPtITSouterminPtTPCvsPtAllRel1PtUncertainty = new TH3F("fPtITSouterminPtTPCvsPtAllRel1PtUncertainty","PtITSouterminPtTPCvsPtAllRel1PtUncertainty",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNRel1PtUncertaintyBins,binsRel1PtUncertainty);
f4d11ac8 613 fPtITSouterminPtTPCvsPtAllRel1PtUncertainty->SetXTitle("p_{t}^{Global}");
614 fPtITSouterminPtTPCvsPtAllRel1PtUncertainty->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
615 fPtITSouterminPtTPCvsPtAllRel1PtUncertainty->SetZTitle("Rel1PtUncertainty");
616 fHistList->Add(fPtITSouterminPtTPCvsPtAllRel1PtUncertainty);
617
cc89bb69 618 fPtITSouterminPtTPCvsPtAllChi2PerNClusTPC = new TH3F("fPtITSouterminPtTPCvsPtAllChi2PerNClusTPC","PtITSouterminPtTPCvsPtAllChi2PerNClusTPC",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
f4d11ac8 619 fPtITSouterminPtTPCvsPtAllChi2PerNClusTPC->SetXTitle("p_{t}^{Global}");
620 fPtITSouterminPtTPCvsPtAllChi2PerNClusTPC->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
65e8ecdd 621 fPtITSouterminPtTPCvsPtAllChi2PerNClusTPC->SetZTitle("#chi^{2}/(2*NClusTPC-5)");
f4d11ac8 622 fHistList->Add(fPtITSouterminPtTPCvsPtAllChi2PerNClusTPC);
623
cc89bb69 624 fPtITSouterminPtTPCvsPtAllChi2PerNClusITS = new TH3F("fPtITSouterminPtTPCvsPtAllChi2PerNClusITS","PtITSouterminPtTPCvsPtAllChi2PerNClusITS",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
f4d11ac8 625 fPtITSouterminPtTPCvsPtAllChi2PerNClusITS->SetXTitle("p_{t}^{Global}");
626 fPtITSouterminPtTPCvsPtAllChi2PerNClusITS->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
65e8ecdd 627 fPtITSouterminPtTPCvsPtAllChi2PerNClusITS->SetZTitle("#chi^{2}/(2*NClusITS-5)");
f4d11ac8 628 fHistList->Add(fPtITSouterminPtTPCvsPtAllChi2PerNClusITS);
629
630 //As function of ITS layers
cc89bb69 631 fPtITSouterminPtTPCvsPtAllITSLayer0 = new TH2F("fPtITSouterminPtTPCvsPtAllITSLayer0","PtITSouterminPtTPCvsPtAllITSLayer0",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
3adc85ec 632 fPtITSouterminPtTPCvsPtAllITSLayer0->SetXTitle("p_{t}^{Global}");
633 fPtITSouterminPtTPCvsPtAllITSLayer0->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
634 fHistList->Add(fPtITSouterminPtTPCvsPtAllITSLayer0);
635
cc89bb69 636 fPtITSouterminPtTPCvsPtAllITSLayer1 = new TH2F("fPtITSouterminPtTPCvsPtAllITSLayer1","PtITSouterminPtTPCvsPtAllITSLayer1",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
3adc85ec 637 fPtITSouterminPtTPCvsPtAllITSLayer1->SetXTitle("p_{t}^{Global}");
638 fPtITSouterminPtTPCvsPtAllITSLayer1->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
639 fHistList->Add(fPtITSouterminPtTPCvsPtAllITSLayer1);
640
cc89bb69 641 fPtITSouterminPtTPCvsPtAllITSLayer2 = new TH2F("fPtITSouterminPtTPCvsPtAllITSLayer2","PtITSouterminPtTPCvsPtAllITSLayer2",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
3adc85ec 642 fPtITSouterminPtTPCvsPtAllITSLayer2->SetXTitle("p_{t}^{Global}");
643 fPtITSouterminPtTPCvsPtAllITSLayer2->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
644 fHistList->Add(fPtITSouterminPtTPCvsPtAllITSLayer2);
645
cc89bb69 646 fPtITSouterminPtTPCvsPtAllITSLayer3 = new TH2F("fPtITSouterminPtTPCvsPtAllITSLayer3","PtITSouterminPtTPCvsPtAllITSLayer3",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
3adc85ec 647 fPtITSouterminPtTPCvsPtAllITSLayer3->SetXTitle("p_{t}^{Global}");
648 fPtITSouterminPtTPCvsPtAllITSLayer3->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
649 fHistList->Add(fPtITSouterminPtTPCvsPtAllITSLayer3);
650
cc89bb69 651 fPtITSouterminPtTPCvsPtAllITSLayer4 = new TH2F("fPtITSouterminPtTPCvsPtAllITSLayer4","PtITSouterminPtTPCvsPtAllITSLayer4",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
3adc85ec 652 fPtITSouterminPtTPCvsPtAllITSLayer4->SetXTitle("p_{t}^{Global}");
653 fPtITSouterminPtTPCvsPtAllITSLayer4->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
654 fHistList->Add(fPtITSouterminPtTPCvsPtAllITSLayer4);
655
cc89bb69 656 fPtITSouterminPtTPCvsPtAllITSLayer5 = new TH2F("fPtITSouterminPtTPCvsPtAllITSLayer5","PtITSouterminPtTPCvsPtAllITSLayer5",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
3adc85ec 657 fPtITSouterminPtTPCvsPtAllITSLayer5->SetXTitle("p_{t}^{Global}");
658 fPtITSouterminPtTPCvsPtAllITSLayer5->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
659 fHistList->Add(fPtITSouterminPtTPCvsPtAllITSLayer5);
660
cc89bb69 661 fPtITSouterminPtTPCvsPtAllNoSPD = new TH2F("fPtITSouterminPtTPCvsPtAllNoSPD","PtITSouterminPtTPCvsPtAllNoSPD",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
3adc85ec 662 fPtITSouterminPtTPCvsPtAllNoSPD->SetXTitle("p_{t}^{Global}");
663 fPtITSouterminPtTPCvsPtAllNoSPD->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
664 fHistList->Add(fPtITSouterminPtTPCvsPtAllNoSPD);
665
cc89bb69 666 fPtITSouterminPtTPCvsPtAllNoSDD = new TH2F("fPtITSouterminPtTPCvsPtAllNoSDD","PtITSouterminPtTPCvsPtAllNoSDD",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
3adc85ec 667 fPtITSouterminPtTPCvsPtAllNoSDD->SetXTitle("p_{t}^{Global}");
668 fPtITSouterminPtTPCvsPtAllNoSDD->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
669 fHistList->Add(fPtITSouterminPtTPCvsPtAllNoSDD);
670
cc89bb69 671 fPtITSouterminPtTPCvsPtAllNoSSD = new TH2F("fPtITSouterminPtTPCvsPtAllNoSSD","PtITSouterminPtTPCvsPtAllNoSSD",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
3adc85ec 672 fPtITSouterminPtTPCvsPtAllNoSSD->SetXTitle("p_{t}^{Global}");
673 fPtITSouterminPtTPCvsPtAllNoSSD->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
674 fHistList->Add(fPtITSouterminPtTPCvsPtAllNoSSD);
f4d11ac8 675
676 //
cc89bb69 677 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer0 = new TH3F("fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer0","PtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer0",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
3adc85ec 678 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer0->SetXTitle("p_{t}^{Global}");
679 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer0->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
680 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer0->SetZTitle("#chi^{2}/NPointITS");
681 fHistList->Add(fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer0);
682
cc89bb69 683 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer1 = new TH3F("fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer1","PtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer1",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
3adc85ec 684 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer1->SetXTitle("p_{t}^{Global}");
685 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer1->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
686 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer1->SetZTitle("#chi^{2}/NPointITS");
687 fHistList->Add(fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer1);
688
cc89bb69 689 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer2 = new TH3F("fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer2","PtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer2",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
3adc85ec 690 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer2->SetXTitle("p_{t}^{Global}");
691 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer2->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
692 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer2->SetZTitle("#chi^{2}/NPointITS");
693 fHistList->Add(fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer2);
694
cc89bb69 695 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer3 = new TH3F("fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer3","PtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer3",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
3adc85ec 696 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer3->SetXTitle("p_{t}^{Global}");
697 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer3->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
698 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer3->SetZTitle("#chi^{2}/NPointITS");
699 fHistList->Add(fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer3);
700
cc89bb69 701 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer4 = new TH3F("fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer4","PtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer4",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
3adc85ec 702 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer4->SetXTitle("p_{t}^{Global}");
703 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer4->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
704 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer4->SetZTitle("#chi^{2}/NPointITS");
705 fHistList->Add(fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer4);
706
cc89bb69 707 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer5 = new TH3F("fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer5","PtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer5",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
3adc85ec 708 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer5->SetXTitle("p_{t}^{Global}");
709 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer5->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
710 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer5->SetZTitle("#chi^{2}/NPointITS");
711 fHistList->Add(fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer5);
712
cc89bb69 713 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSPD = new TH3F("fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSPD","PtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSPD",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
3adc85ec 714 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSPD->SetXTitle("p_{t}^{Global}");
715 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSPD->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
716 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSPD->SetZTitle("#chi^{2}/(2*NPointITS-5)");
717 fHistList->Add(fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSPD);
718
cc89bb69 719 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSDD = new TH3F("fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSDD","PtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSDD",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
3adc85ec 720 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSDD->SetXTitle("p_{t}^{Global}");
721 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSDD->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
722 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSDD->SetZTitle("#chi^{2}/(2*NPointITS-5)");
723 fHistList->Add(fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSDD);
724
cc89bb69 725 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSSD = new TH3F("fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSSD","PtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSSD",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
3adc85ec 726 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSSD->SetXTitle("p_{t}^{Global}");
727 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSSD->SetYTitle("(1/p_{t}^{ITSouter}-1/p_{t}^{TPCinner})/(1/p_{t}^{ITSouter})");
728 fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSSD->SetZTitle("#chi^{2}/(2*NPointITS-5)");
729 fHistList->Add(fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSSD);
f4d11ac8 730
731
fdceab34 732 //ITSrefit
add06ceb 733 fPtSelITS = new TH1F("fPtSelITSrefit","PtSel",fgkNPtBins, binsPt);
fdceab34 734 fHistListITS->Add(fPtSelITS);
735
cc89bb69 736 fPtITSminPtTPCvsPtITS = new TH2F("fPtITSminPtTPCvsPtITS","PtITSminPtTPCvsPtITS",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt);
65e8ecdd 737 fPtITSminPtTPCvsPtITS->SetXTitle("p_{t}^{Global}");
738 fPtITSminPtTPCvsPtITS->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 739 fHistListITS->Add(fPtITSminPtTPCvsPtITS);
9f54dd56 740
cc89bb69 741 fPtITSminPtTPCvsPtITSEtaPos = new TH3F("fPtITSminPtTPCvsPtITSEtaPos","PtITSminPtTPCvsPtITSEtaPos",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNEtaBins,binsEta);
9f54dd56 742 fPtITSminPtTPCvsPtITSEtaPos->SetXTitle("p_{t}^{Global}");
743 fPtITSminPtTPCvsPtITSEtaPos->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
744 fHistListITS->Add(fPtITSminPtTPCvsPtITSEtaPos);
745
cc89bb69 746 fPtITSminPtTPCvsPtITSEtaNeg = new TH3F("fPtITSminPtTPCvsPtITSEtaNeg","PtITSminPtTPCvsPtITSEtaNeg",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNEtaBins,binsEta);
9f54dd56 747 fPtITSminPtTPCvsPtITSEtaNeg->SetXTitle("p_{t}^{Global}");
748 fPtITSminPtTPCvsPtITSEtaNeg->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
749 fHistListITS->Add(fPtITSminPtTPCvsPtITSEtaNeg);
fdceab34 750
cc89bb69 751 fPtITSminPtTPCvsPtITSNPointTPC = new TH3F("fPtITSminPtTPCvsPtITSNPointTPC","PtITSminPtTPCvsPtITSNPointTPC",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNNPointTPCBins,binsNPointTPC);
65e8ecdd 752 fPtITSminPtTPCvsPtITSNPointTPC->SetXTitle("p_{t}^{Global}");
753 fPtITSminPtTPCvsPtITSNPointTPC->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 754 fPtITSminPtTPCvsPtITSNPointTPC->SetZTitle("N_{point,TPC}");
755 fHistListITS->Add(fPtITSminPtTPCvsPtITSNPointTPC);
65e8ecdd 756
cc89bb69 757 fPtITSminPtTPCvsPtITSDCAR = new TH3F("fPtITSminPtTPCvsPtITSDCAR","PtITSminPtTPCvsPtITSDCAR",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNDCARBins,binsDCAR);
65e8ecdd 758 fPtITSminPtTPCvsPtITSDCAR->SetXTitle("p_{t}^{Global}");
759 fPtITSminPtTPCvsPtITSDCAR->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 760 fPtITSminPtTPCvsPtITSDCAR->SetZTitle("DCA_{R}");
761 fHistListITS->Add(fPtITSminPtTPCvsPtITSDCAR);
762
cc89bb69 763 fPtITSminPtTPCvsPtITSDCAZ = new TH3F("fPtITSminPtTPCvsPtITSDCAZ","PtITSminPtTPCvsPtITSDCAZ",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNDCAZBins,binsDCAZ);
65e8ecdd 764 fPtITSminPtTPCvsPtITSDCAZ->SetXTitle("p_{t}^{Global}");
765 fPtITSminPtTPCvsPtITSDCAZ->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 766 fPtITSminPtTPCvsPtITSDCAZ->SetZTitle("DCA_{Z}");
767 fHistListITS->Add(fPtITSminPtTPCvsPtITSDCAZ);
768
cc89bb69 769 fPtITSminPtTPCvsPtITSPhi = new TH3F("fPtITSminPtTPCvsPtITSPhi","PtITSminPtTPCvsPtITSPhi",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNPhiBins,binsPhi);
65e8ecdd 770 fPtITSminPtTPCvsPtITSPhi->SetXTitle("p_{t}^{Global}");
771 fPtITSminPtTPCvsPtITSPhi->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 772 fPtITSminPtTPCvsPtITSPhi->SetZTitle("#phi");
773 fHistListITS->Add(fPtITSminPtTPCvsPtITSPhi);
774
cc89bb69 775 fPtITSminPtTPCvsPtITSNPointITS = new TH3F("fPtITSminPtTPCvsPtITSNPointITS","PtITSminPtTPCvsPtITSNPointITS",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNNPointITSBins,binsNPointITS);
65e8ecdd 776 fPtITSminPtTPCvsPtITSNPointITS->SetXTitle("p_{t}^{Global}");
777 fPtITSminPtTPCvsPtITSNPointITS->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
f4d11ac8 778 fPtITSminPtTPCvsPtITSNPointITS->SetZTitle("N_{point,ITS}");
fdceab34 779 fHistListITS->Add(fPtITSminPtTPCvsPtITSNPointITS);
780
cc89bb69 781 fPtITSminPtTPCvsPtITSNSigmaToVertex = new TH3F("fPtITSminPtTPCvsPtITSNSigmaToVertex","PtITSminPtTPCvsPtITSNSigmaToVertex",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNNSigmaToVertexBins,binsNSigmaToVertex);
65e8ecdd 782 fPtITSminPtTPCvsPtITSNSigmaToVertex->SetXTitle("p_{t}^{Global}");
783 fPtITSminPtTPCvsPtITSNSigmaToVertex->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 784 fPtITSminPtTPCvsPtITSNSigmaToVertex->SetZTitle("N#sigma to vertex");
785 fHistListITS->Add(fPtITSminPtTPCvsPtITSNSigmaToVertex);
786
cc89bb69 787 fPtITSminPtTPCvsPtITSChi2C = new TH3F("fPtITSminPtTPCvsPtITSChi2C","PtITSminPtTPCvsPtITSChi2C",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2CBins,binsChi2C);
65e8ecdd 788 fPtITSminPtTPCvsPtITSChi2C->SetXTitle("p_{t}^{Global}");
789 fPtITSminPtTPCvsPtITSChi2C->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 790 fPtITSminPtTPCvsPtITSChi2C->SetZTitle("Constrained #chi^{2}");
791 fHistListITS->Add(fPtITSminPtTPCvsPtITSChi2C);
792
cc89bb69 793 fPtITSminPtTPCvsPtITSRel1PtUncertainty = new TH3F("fPtITSminPtTPCvsPtITSRel1PtUncertainty","PtITSminPtTPCvsPtITSRel1PtUncertainty",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNRel1PtUncertaintyBins,binsRel1PtUncertainty);
65e8ecdd 794 fPtITSminPtTPCvsPtITSRel1PtUncertainty->SetXTitle("p_{t}^{Global}");
795 fPtITSminPtTPCvsPtITSRel1PtUncertainty->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
fdceab34 796 fPtITSminPtTPCvsPtITSRel1PtUncertainty->SetZTitle("Rel1PtUncertainty");
797 fHistListITS->Add(fPtITSminPtTPCvsPtITSRel1PtUncertainty);
798
cc89bb69 799 fPtITSminPtTPCvsPtITSChi2PerNClusTPC = new TH3F("fPtITSminPtTPCvsPtITSChi2PerNClusTPC","PtITSminPtTPCvsPtITSChi2PerNClusTPC",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
65e8ecdd 800 fPtITSminPtTPCvsPtITSChi2PerNClusTPC->SetXTitle("p_{t}^{Global}");
801 fPtITSminPtTPCvsPtITSChi2PerNClusTPC->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
802 fPtITSminPtTPCvsPtITSChi2PerNClusTPC->SetZTitle("#chi^{2}/(2*NClusTPC-5)");
f4d11ac8 803 fHistListITS->Add(fPtITSminPtTPCvsPtITSChi2PerNClusTPC);
804
cc89bb69 805 fPtITSminPtTPCvsPtITSChi2PerNClusITS = new TH3F("fPtITSminPtTPCvsPtITSChi2PerNClusITS","PtITSminPtTPCvsPtITSChi2PerNClusITS",fgkNPtBins, binsPt,fgkNResPtBins,binsResPt,fgkNChi2PerClusBins,binsChi2PerClus);
65e8ecdd 806 fPtITSminPtTPCvsPtITSChi2PerNClusITS->SetXTitle("p_{t}^{Global}");
807 fPtITSminPtTPCvsPtITSChi2PerNClusITS->SetYTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
808 fPtITSminPtTPCvsPtITSChi2PerNClusITS->SetZTitle("#chi^{2}/(2*NClusITS-5)");
f4d11ac8 809 fHistListITS->Add(fPtITSminPtTPCvsPtITSChi2PerNClusITS);
810
cc89bb69 811 fPtITSminPtTPCvsNPointTPCPhi = new TH3F("fPtITSminPtTPCvsNPointTPCPhi","PtITSminPtTPCvsNPointTPCPhi",fgkNResPtBins,binsResPt,fgkNNPointTPCBins,binsNPointTPC,fgkNPhiBins,binsPhi);
9c8dfcb5 812 fPtITSminPtTPCvsNPointTPCPhi->SetXTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
813 fPtITSminPtTPCvsNPointTPCPhi->SetYTitle("N_{point,TPC}");
814 fPtITSminPtTPCvsNPointTPCPhi->SetZTitle("#phi");
815 fHistListITS->Add(fPtITSminPtTPCvsNPointTPCPhi);
816
cc89bb69 817 fPtITSminPtTPCvsNPointITSPhi = new TH3F("fPtITSminPtTPCvsNPointITSPhi","PtITSminPtTPCvsNPointITSPhi",fgkNResPtBins,binsResPt,fgkNNPointITSBins,binsNPointITS,fgkNPhiBins,binsPhi);
9c8dfcb5 818 fPtITSminPtTPCvsNPointITSPhi->SetXTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
819 fPtITSminPtTPCvsNPointITSPhi->SetYTitle("N_{point,ITS}");
820 fPtITSminPtTPCvsNPointITSPhi->SetZTitle("#phi");
821 fHistListITS->Add(fPtITSminPtTPCvsNPointITSPhi);
822
cc89bb69 823 fPtITSminPtTPCvsRel1PtUncertaintyPhi = new TH3F("fPtITSminPtTPCvsRel1PtUncertaintyPhi","PtITSminPtTPCvsRel1PtUncertaintyPhi",fgkNResPtBins,binsResPt,fgkNRel1PtUncertaintyBins,binsRel1PtUncertainty,fgkNPhiBins,binsPhi);
9c8dfcb5 824 fPtITSminPtTPCvsRel1PtUncertaintyPhi->SetXTitle("(1/p_{t}^{Global}-1/p_{t}^{TPC})/(1/p_{t}^{Global})");
825 fPtITSminPtTPCvsRel1PtUncertaintyPhi->SetYTitle("Rel1PtUncertainty");
826 fPtITSminPtTPCvsRel1PtUncertaintyPhi->SetZTitle("#phi");
827 fHistListITS->Add(fPtITSminPtTPCvsRel1PtUncertaintyPhi);
828
cc89bb69 829 fPtRel1PtUncertaintyChi2PerClusTPC = new TH3F("fPtRel1PtUncertaintyChi2PerClusTPC","PtITSminPtTPCvsPtITSRel1PtUncertainty",fgkNPtBins, binsPt,fgkNRel1PtUncertaintyBins,binsRel1PtUncertainty,fgkNChi2PerClusBins,binsChi2PerClus);
f4d11ac8 830 fPtRel1PtUncertaintyChi2PerClusTPC->SetXTitle("p_{t}^{global}");
831 fPtRel1PtUncertaintyChi2PerClusTPC->SetYTitle("Rel1PtUncertainty");
65e8ecdd 832 fPtRel1PtUncertaintyChi2PerClusTPC->SetZTitle("#chi^{2}/(2*N_{clusters}^{TPC}-5)");
f4d11ac8 833 fHistListITS->Add(fPtRel1PtUncertaintyChi2PerClusTPC);
834
add06ceb 835 fPtAllTPC = new TH1F("fPtAllTPC","PtAll",fgkNPtBins,binsPt);
fdceab34 836 fHistListTPC->Add(fPtAllTPC);
add06ceb 837 fPtSelTPC = new TH1F("fPtSelTPC","PtSel",fgkNPtBins,binsPt);
fdceab34 838 fHistListTPC->Add(fPtSelTPC);
add06ceb 839 fPtSelTPCITS = new TH1F("fPtSelTPCITS","PtSel",fgkNPtBins,binsPt);
fdceab34 840 fHistListTPC->Add(fPtSelTPCITS);
df943115 841
65e8ecdd 842 //****************************************************************************************************************//
843 // Cosmic Candidates //
844 //****************************************************************************************************************//
1f329128 845 Int_t fgkNThetaBins=fgkNPhiBins*8;
846 Float_t kMinTheta = -0.5*TMath::Pi();
847 Float_t kMaxTheta = 3./2.*TMath::Pi();
848
cc89bb69 849 fPtSignedCosmicCandidates = new TH1F("fPtSignedCosmicCandidates","fPtSignedCosmicCandidates",2*(int)(fgkPtMax-fgkPtMin), -1.*fgkPtMax, fgkPtMax);
850 fHistListCosmics->Add(fPtSignedCosmicCandidates);
65e8ecdd 851 fDeltaPtCosmicCandidates = new TH1F("fDeltaPtCosmicCandidates","fDeltaPtCosmicCandidates",fgkNPtBins, -50., 50.);
852 fHistListCosmics->Add(fDeltaPtCosmicCandidates);
1f329128 853 fDeltaPhiSumEta = new TH2F("fDeltaPhiSumEta","fDeltaPhiSumEta",fgkNThetaBins,kMinTheta,kMaxTheta,80, -2.,2.);
cc89bb69 854 fHistListCosmics->Add(fDeltaPhiSumEta);
855 fDCAZCosmicCandidates = new TH2F("fDCAZCosmicCandidates","fDCAZCosmicCandidates",fgkNDCAZBins,binsDCAZ,fgkNDCAZBins,binsDCAZ);
856 fHistListCosmics->Add(fDCAZCosmicCandidates);
857 fDCARCosmicCandidates = new TH2F("fDCARCosmicCandidates","fDCARCosmicCandidates",fgkNDCARBins,binsDCAR,fgkNDCARBins,binsDCAR);
858 fHistListCosmics->Add(fDCARCosmicCandidates);
1f329128 859 fTheta = new TH1F("fTheta","fTheta",fgkNThetaBins,kMinTheta,kMaxTheta);
add06ceb 860 fHistListCosmics->Add(fTheta);
861 fThetaZoom = new TH1F("fThetaZoom","fThetaZoom",100,TMath::Pi()-1.,TMath::Pi()+1.);
862 fHistListCosmics->Add(fThetaZoom);
1f329128 863 fThetaPt1Pt2 = new TH3F("fThetaPt1Pt2","fThetaPt1Pt2",fgkNThetaBins,kMinTheta,kMaxTheta,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax);
e5abcde9 864 fHistListCosmics->Add(fThetaPt1Pt2);
1f329128 865 fDeltaPhiSumEtaPt1 = new TH3F("fDeltaPhiSumEtaPt1","fDeltaPhiSumEtaPt1",fgkNThetaBins,kMinTheta,kMaxTheta,80, -2.,2.,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax);
e5abcde9 866 fHistListCosmics->Add(fDeltaPhiSumEtaPt1);
1f329128 867 fDeltaPhiSumEtaPt2 = new TH3F("fDeltaPhiSumEtaPt2","fDeltaPhiSumEtaPt2",fgkNThetaBins,kMinTheta,kMaxTheta,80, -2.,2.,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax);
e5abcde9 868 fHistListCosmics->Add(fDeltaPhiSumEtaPt2);
1f329128 869 fThetaDCAZ1DCAZ2 = new TH3F("fThetaDCAZ1DCAZ2","fThetaDCAZ1DCAZ2",fgkNThetaBins,kMinTheta,kMaxTheta,fgkNDCAZBins,-2.,2.,fgkNDCAZBins,-2.,2.);
e5abcde9 870 fHistListCosmics->Add(fThetaDCAZ1DCAZ2);
65e8ecdd 871
df943115 872 TH1::AddDirectory(oldStatus);
873
e7b49043 874 if(binsPhi) delete [] binsPhi;
875 if(binsChi2PerClus) delete [] binsChi2PerClus;
876 if(binsPt) delete [] binsPt;
877 if(binsResPt) delete [] binsResPt;
878 if(binsNPointTPC) delete [] binsNPointTPC;
e7b49043 879 if(binsDCAR) delete [] binsDCAR;
880 if(binsDCAZ) delete [] binsDCAZ;
881 if(binsNPointITS) delete [] binsNPointITS;
882 if(binsNSigmaToVertex) delete [] binsNSigmaToVertex;
883 if(binsChi2C) delete [] binsChi2C;
884 if(binsEta) delete [] binsEta;
885 if(binsRel1PtUncertainty) delete [] binsRel1PtUncertainty;
886
887
fdceab34 888}
889//________________________________________________________________________
890void AliPWG4HighPtQATPConly::Exec(Option_t *) {
891 // Main loop
892 // Called for each event
df943115 893 AliDebug(2,Form(">> AliPWG4HighPtQATPConly::Exec \n"));
894
b5cc0c6d 895 // All events without selection
b5cc0c6d 896 fNEventAll->Fill(0.);
897
df943115 898 if (!fESD) {
899 AliDebug(2,Form("ERROR: fESD not available"));
67ebd013 900 // Post output data
901 PostData(0, fHistList);
902 PostData(1, fHistListTPC);
903 PostData(2, fHistListITS);
65e8ecdd 904 PostData(3, fHistListCosmics);
fdceab34 905 return;
906 }
907
35ba8832 908// fESD->SetESDfriend(fESDfriend); //Attach the friend to the ESD
909// if (!fESDfriend) {
910// AliDebug(2,Form("ERROR: fESDfriend not available"));
911// // Post output data
912// PostData(0, fHistList);
913// PostData(1, fHistListTPC);
914// PostData(2, fHistListITS);
915// PostData(3, fHistListCosmics);
916// return;
917// }
f4d11ac8 918
67ebd013 919 Bool_t isSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
920 if(!isSelected) { //Select collison candidates
b5cc0c6d 921 AliDebug(2,Form(" Trigger Selection: event REJECTED ... "));
cd9a6fa2 922 // Post output data
67ebd013 923 PostData(0, fHistList);
924 PostData(1, fHistListTPC);
925 PostData(2, fHistListITS);
65e8ecdd 926 PostData(3, fHistListCosmics);
b5cc0c6d 927 return;
67ebd013 928 }
fdceab34 929
f4d11ac8 930 // AliMCEventHandler *eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
931// // AliMCEventHandler* eventHandler = (AliMCEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
932
933 AliStack* stack = 0x0;
934 AliMCEvent* mcEvent = 0x0;
935
936 if(fMC) {
937 mcEvent = fMC;
938 if (!mcEvent) {
939 AliDebug(2,Form("ERROR: Could not retrieve MC event"));
940 PostData(0, fHistList);
941 PostData(1, fHistListTPC);
942 PostData(2, fHistListITS);
65e8ecdd 943 PostData(3, fHistListCosmics);
f4d11ac8 944 return;
945 }
946
947 AliDebug(2,Form("MC particles: %d", mcEvent->GetNumberOfTracks()));
948
949 stack = mcEvent->Stack(); //Particles Stack
950
951 AliDebug(2,Form("MC particles stack: %d", stack->GetNtrack()));
952 }
953
954
b5cc0c6d 955 const AliESDVertex *vtx = fESD->GetPrimaryVertexTracks();
fdceab34 956 // Need vertex cut
67ebd013 957 if (vtx->GetNContributors() < 2) {
add06ceb 958 // SPD vertex
959 vtx = fESD->GetPrimaryVertexSPD();
960 if(vtx->GetNContributors()<2) {
1f329128 961 vtx = 0x0;
add06ceb 962 // Post output data
963 PostData(0, fHistList);
964 PostData(1, fHistListTPC);
965 PostData(2, fHistListITS);
966 PostData(3, fHistListCosmics);
967 return;
968 }
67ebd013 969 }
fdceab34 970
df943115 971 AliDebug(2,Form("Vertex title %s, status %d, nCont %d\n",vtx->GetTitle(), vtx->GetStatus(), vtx->GetNContributors()));
b5cc0c6d 972 double primVtx[3];
973 vtx->GetXYZ(primVtx);
974 // printf("primVtx: %g %g %g \n",primVtx[0],primVtx[1],primVtx[2]);
67ebd013 975 if(TMath::Sqrt(primVtx[0]*primVtx[0] + primVtx[1]*primVtx[1])>1. || TMath::Abs(primVtx[2]>10.)){
cd9a6fa2 976 // Post output data
977 PostData(0, fHistList);
978 PostData(1, fHistListTPC);
979 PostData(2, fHistListITS);
65e8ecdd 980 PostData(3, fHistListCosmics);
cd9a6fa2 981 return;
982 }
983 if(!fESD->GetNumberOfTracks() || fESD->GetNumberOfTracks()<2){
984 // Post output data
985 PostData(0, fHistList);
986 PostData(1, fHistListTPC);
987 PostData(2, fHistListITS);
65e8ecdd 988 PostData(3, fHistListCosmics);
cd9a6fa2 989 return;
990 }
fdceab34 991 Int_t nTracks = fESD->GetNumberOfTracks();
b5cc0c6d 992 AliDebug(2,Form("nTracks %d\n", nTracks));
993
cc89bb69 994 if(!fTrackCuts) {
995 // Post output data
996 PostData(0, fHistList);
997 PostData(1, fHistListTPC);
998 PostData(2, fHistListITS);
999 PostData(3, fHistListCosmics);
1000 return;
1001 }
b5cc0c6d 1002
1003 // Selected events for analysis
1004 fNEventSel->Fill(0.);
df943115 1005
fdceab34 1006 for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) {
cc89bb69 1007
fdceab34 1008 AliESDtrack *track = fESD->GetTrack(iTrack);
1009 AliExternalTrackParam *trackTPC = (AliExternalTrackParam *)track->GetTPCInnerParam();
67ebd013 1010 if(!track || !trackTPC) continue;
cc89bb69 1011
f4d11ac8 1012 const AliESDfriendTrack* constfriendtrack = track->GetFriendTrack();
cc89bb69 1013 //if (!constfriendtrack) { continue;}
1014 // AliESDfriendTrack friendtrack(*constfriendtrack);
f4d11ac8 1015
fdceab34 1016 Float_t pt = track->Pt();
1017 Float_t ptTPC = trackTPC->Pt();
1018 Float_t phi = track->Phi();
1019 Float_t dca2D, dcaZ;
1020 track->GetImpactParameters(dca2D,dcaZ);
1021 // Float_t dca2DTPC, dcaZTPC;
1022 //track->GetImpactParametersTPC(dca2DTPC,dcaZTPC);
1023 UChar_t itsMap = track->GetITSClusterMap();
1024 Int_t nPointITS = 0;
1025 for (Int_t i=0; i < 6; i++) {
1026 if (itsMap & (1 << i))
1027 nPointITS ++;
1028 }
b5cc0c6d 1029 double mom[3];
1030 track->GetPxPyPz(mom);
f4d11ac8 1031 double momTPC[3];
1032 trackTPC->GetPxPyPz(momTPC);
fdceab34 1033 Float_t nSigmaToVertex = fTrackCuts->GetSigmaToVertex(track);// Calculates the number of sigma to the vertex for a track.
1034 Float_t chi2C = track->GetConstrainedChi2();
b5cc0c6d 1035 Float_t relUncertainty1Pt = TMath::Sqrt(TMath::Abs(track->GetSigma1Pt2()))*pt;
f4d11ac8 1036 Float_t chi2PerClusterTPC = -1.;
1037 Float_t nClustersTPC = track->GetTPCNcls();
38ecb6a5 1038 if(nClustersTPC>0.) chi2PerClusterTPC = track->GetTPCchi2()/(2.*nClustersTPC-5.);
1039 Float_t chi2PerNPointITS = -1.;
1040 if(nPointITS>3) chi2PerNPointITS = track->GetITSchi2()/(2.*(float)nPointITS-5.);
fdceab34 1041
1042 fPtAll->Fill(pt);
1043 fPtAllTPC->Fill(ptTPC);
65e8ecdd 1044
cc89bb69 1045 Bool_t cosmic = kFALSE;
add06ceb 1046 if(GetCutType()==2) { if(pt>6.) { cosmic = IsCosmic(track,iTrack,4.); } }
65e8ecdd 1047
fdceab34 1048 if (fTrackCuts->AcceptTrack(track)) {
cc89bb69 1049 if(GetCutType()==1) { if(pt>6.) { cosmic = IsCosmic(track,iTrack,4.); } }
65e8ecdd 1050 // if(cosmic) continue;
1051
fdceab34 1052 fPtSel->Fill(pt);
fdceab34 1053 fPtSelTPC->Fill(ptTPC);
f4d11ac8 1054 if(ptTPC==0. || pt==0.) continue;
fdceab34 1055 fPtAllminPtTPCvsPtAll->Fill(pt,(1./pt-1./ptTPC)/(1./pt) );
9f54dd56 1056
1057 if(track->GetSign()>0.) fPtAllminPtTPCvsPtAllEtaPos->Fill(pt,(1./pt-1./ptTPC)/(1./pt),track->Eta());
1058 if(track->GetSign()<0.) fPtAllminPtTPCvsPtAllEtaNeg->Fill(pt,(1./pt-1./ptTPC)/(1./pt),track->Eta());
1059
65e8ecdd 1060 fPtAllminPtTPCvsPtAllNPointTPC->Fill(pt,(1./pt-1./ptTPC)/(1./pt),nClustersTPC);
fdceab34 1061 fPtAllminPtTPCvsPtAllDCAR->Fill(pt,(1./pt-1./ptTPC)/(1./pt),dca2D);
1062 fPtAllminPtTPCvsPtAllDCAZ->Fill(pt,(1./pt-1./ptTPC)/(1./pt),dcaZ);
1063 fPtAllminPtTPCvsPtAllPhi->Fill(pt,(1./pt-1./ptTPC)/(1./pt),phi);
1064 fPtAllminPtTPCvsPtAllNPointITS->Fill(pt,(1./pt-1./ptTPC)/(1./pt),nPointITS);
1065 fPtAllminPtTPCvsPtAllNSigmaToVertex->Fill(pt,(1./pt-1./ptTPC)/(1./pt),nSigmaToVertex);
1066 fPtAllminPtTPCvsPtAllChi2C->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2C);
1067 fPtAllminPtTPCvsPtAllRel1PtUncertainty->Fill(pt,(1./pt-1./ptTPC)/(1./pt),relUncertainty1Pt);
f4d11ac8 1068 fPtAllminPtTPCvsPtAllChi2PerNClusTPC->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2PerClusterTPC);
38ecb6a5 1069 if(nPointITS>3) fPtAllminPtTPCvsPtAllChi2PerNClusITS->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2PerNPointITS);
9c8dfcb5 1070 fPtAllminPtTPCvsNPointTPCPhi->Fill((1./pt-1./ptTPC)/(1./pt),nClustersTPC,phi);
1071 fPtAllminPtTPCvsNPointITSPhi->Fill((1./pt-1./ptTPC)/(1./pt),nPointITS,phi);
1072 fPtAllminPtTPCvsRel1PtUncertaintyPhi->Fill((1./pt-1./ptTPC)/(1./pt),relUncertainty1Pt,phi);
1073
f4d11ac8 1074 if(TMath::Abs((1./pt-1./ptTPC)/(1./pt))>0.8) fEtaPhiOutliers->Fill(track->Eta(),phi);
cc89bb69 1075
1076 if (constfriendtrack) {
1077 AliESDfriendTrack friendtrack(*constfriendtrack);
1078 if (friendtrack.GetITSOut()) {
1079 AliExternalTrackParam trackITSouter(*(friendtrack.GetITSOut()));
1080 Float_t ptITSouter = trackITSouter.Pt();
1081 if(ptITSouter==0.) continue;
1082 fPtSelITSouter->Fill(ptITSouter);
1083 fPtITSouterminPtTPCvsPtAll->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter) );
1084
1085 if(trackITSouter.GetSign()>0.) fPtITSouterminPtTPCvsPtAllEtaPos->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),trackITSouter.Eta());
1086 if(trackITSouter.GetSign()<0.) fPtITSouterminPtTPCvsPtAllEtaNeg->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),trackITSouter.Eta());
1087
1088 fPtITSouterminPtTPCvsPtAllNPointTPC->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),nClustersTPC);
cc89bb69 1089 fPtITSouterminPtTPCvsPtAllDCAR->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),dca2D);
1090 fPtITSouterminPtTPCvsPtAllDCAZ->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),dcaZ);
1091 fPtITSouterminPtTPCvsPtAllPhi->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),phi);
1092 fPtITSouterminPtTPCvsPtAllNPointITS->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),nPointITS);
1093 fPtITSouterminPtTPCvsPtAllNSigmaToVertex->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),nSigmaToVertex);
1094 fPtITSouterminPtTPCvsPtAllChi2C->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2C);
1095 fPtITSouterminPtTPCvsPtAllRel1PtUncertainty->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),relUncertainty1Pt);
1096 fPtITSouterminPtTPCvsPtAllChi2PerNClusTPC->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerClusterTPC);
1097 if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
1098 if(track->HasPointOnITSLayer(0)) {
1099 fPtITSouterminPtTPCvsPtAllITSLayer0->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
1100 if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer0->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
1101 }
1102 if(!track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)) {
1103 fPtITSouterminPtTPCvsPtAllITSLayer1->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
1104 if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer1->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
1105 }
1106 if(!track->HasPointOnITSLayer(0) && !track->HasPointOnITSLayer(1) && track->HasPointOnITSLayer(2)) {
1107 fPtITSouterminPtTPCvsPtAllITSLayer2->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
1108 if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer2->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
1109 }
1110 if(!track->HasPointOnITSLayer(0) && !track->HasPointOnITSLayer(1) && !track->HasPointOnITSLayer(2) && track->HasPointOnITSLayer(3)) {
1111 fPtITSouterminPtTPCvsPtAllITSLayer3->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
1112 if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer3->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
1113 }
1114 if(!track->HasPointOnITSLayer(0) && !track->HasPointOnITSLayer(1) && !track->HasPointOnITSLayer(2) && !track->HasPointOnITSLayer(3) && track->HasPointOnITSLayer(4)) {
1115 fPtITSouterminPtTPCvsPtAllITSLayer4->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
1116 if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer4->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
1117 }
1118 if(!track->HasPointOnITSLayer(0) && !track->HasPointOnITSLayer(1) && !track->HasPointOnITSLayer(2) && !track->HasPointOnITSLayer(3) && !track->HasPointOnITSLayer(4) && track->HasPointOnITSLayer(5)) {
1119 fPtITSouterminPtTPCvsPtAllITSLayer5->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
1120 if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITSLayer5->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
1121 }
1122
1123 if(!track->HasPointOnITSLayer(0) && !track->HasPointOnITSLayer(1)) {
1124 fPtITSouterminPtTPCvsPtAllNoSPD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
1125 if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSPD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
1126 }
1127 if(!track->HasPointOnITSLayer(2) && !track->HasPointOnITSLayer(3)) {
1128 fPtITSouterminPtTPCvsPtAllNoSDD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
1129 if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSDD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
1130 }
1131 if(!track->HasPointOnITSLayer(4) && !track->HasPointOnITSLayer(5)) {
1132 fPtITSouterminPtTPCvsPtAllNoSSD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
1133 if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITSNoSSD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
1134 }
f4d11ac8 1135 }
1136 }
fdceab34 1137 }//fTrackCuts selection
1138
1139
1140 //ITSrefit selection
1141 if (fTrackCutsITS->AcceptTrack(track)) {
1142
1143 fPtSelITS->Fill(pt);
1144 fPtSelTPCITS->Fill(ptTPC);
1145 fPtITSminPtTPCvsPtITS->Fill(pt,(1./pt-1./ptTPC)/(1./pt) );
9f54dd56 1146 if(track->GetSign()>0.) fPtITSminPtTPCvsPtITSEtaPos->Fill(pt,(1./pt-1./ptTPC)/(1./pt),track->Eta());
1147 if(track->GetSign()<0.) fPtITSminPtTPCvsPtITSEtaNeg->Fill(pt,(1./pt-1./ptTPC)/(1./pt),track->Eta());
65e8ecdd 1148 fPtITSminPtTPCvsPtITSNPointTPC->Fill(pt,(1./pt-1./ptTPC)/(1./pt),nClustersTPC);
fdceab34 1149 fPtITSminPtTPCvsPtITSDCAR->Fill(pt,(1./pt-1./ptTPC)/(1./pt),dca2D);
1150 fPtITSminPtTPCvsPtITSDCAZ->Fill(pt,(1./pt-1./ptTPC)/(1./pt),dcaZ);
10295ac3 1151 fPtITSminPtTPCvsPtITSPhi->Fill(pt,(1./pt-1./ptTPC)/(1./pt),phi);
1152 fPtITSminPtTPCvsPtITSNPointITS->Fill(pt,(1./pt-1./ptTPC)/(1./pt),nPointITS);
fdceab34 1153 fPtITSminPtTPCvsPtITSNSigmaToVertex->Fill(pt,(1./pt-1./ptTPC)/(1./pt),nSigmaToVertex);
1154 fPtITSminPtTPCvsPtITSChi2C->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2C);
1155 fPtITSminPtTPCvsPtITSRel1PtUncertainty->Fill(pt,(1./pt-1./ptTPC)/(1./pt),relUncertainty1Pt);
f4d11ac8 1156 fPtITSminPtTPCvsPtITSChi2PerNClusTPC->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2PerClusterTPC);
38ecb6a5 1157 if(nPointITS>3) fPtITSminPtTPCvsPtITSChi2PerNClusITS->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2PerNPointITS);
9c8dfcb5 1158 fPtITSminPtTPCvsNPointTPCPhi->Fill((1./pt-1./ptTPC)/(1./pt),nClustersTPC,phi);
1159 fPtITSminPtTPCvsNPointITSPhi->Fill((1./pt-1./ptTPC)/(1./pt),nPointITS,phi);
1160 fPtITSminPtTPCvsRel1PtUncertaintyPhi->Fill((1./pt-1./ptTPC)/(1./pt),relUncertainty1Pt,phi);
65e8ecdd 1161
1162 fPtRel1PtUncertaintyChi2PerClusTPC->Fill(pt,relUncertainty1Pt,chi2PerClusterTPC);
fdceab34 1163 }//fTrackCutsITS loop
1164
f4d11ac8 1165 }//ESD track loop
fdceab34 1166
1167 // Post output data
1168 PostData(0, fHistList);
1169 PostData(1, fHistListTPC);
1170 PostData(2, fHistListITS);
65e8ecdd 1171 PostData(3, fHistListCosmics);
1172
1173}
1174//________________________________________________________________________
1175Bool_t AliPWG4HighPtQATPConly::IsCosmic(const AliESDtrack *track1 , Int_t trackNumber, Double_t ptMin)
1176{
9c8dfcb5 1177 Bool_t candidate1 = kFALSE;
65e8ecdd 1178 Bool_t candidate2 = kFALSE;
9c8dfcb5 1179 if(!track1) return candidate1;
65e8ecdd 1180
1181 Int_t nTracks = fESD->GetNumberOfTracks();
cc89bb69 1182
1183 Float_t dcaR[2] = {0.,0.};
1184 Float_t dcaZ[2] = {0.,0.};
65e8ecdd 1185
add06ceb 1186 for (Int_t iTrack2 = trackNumber+1; iTrack2 < nTracks; iTrack2++) {
65e8ecdd 1187 candidate2 = kFALSE;
add06ceb 1188 AliESDtrack *track2 = fESD->GetTrack(iTrack2);
65e8ecdd 1189 if(!track2) continue;
add06ceb 1190 if(GetCutType()==1 && !(fTrackCuts->AcceptTrack(track2))) { continue; }
65e8ecdd 1191 if(track2->Pt()<ptMin) continue;
1192
9c8dfcb5 1193 //Check if same charge. If not same charge, pair is cosmic candidate
9f54dd56 1194 //Removed condition for time being. Not so clear how well we can measure curvature at high momenta
9c8dfcb5 1195 // if( (track1->GetSign()*track2->GetSign()) > 0. ) continue;
65e8ecdd 1196
1197 //Check if back-to-back
1198 Double_t mom1[3],mom2[3];
1199 track1->GetPxPyPz(mom1);
1200 track2->GetPxPyPz(mom2);
1f329128 1201 TVector3 momv1(mom1[0],mom1[1],mom1[2]);
1202 TVector3 momv2(mom2[0],mom2[1],mom2[2]);
1203 Double_t theta = momv1.Phi()-momv2.Phi();
1204 if(theta<-0.5*TMath::Pi()) theta+=2.*TMath::Pi();
1205
1206 //if(TMath::Abs(TMath::Pi()-theta)<fMaxCosmicAngle) { candidate1 = kTRUE; candidate2 = kTRUE;}
add06ceb 1207
1f329128 1208 // Double_t cosMaxCosmicAngle[2] = {TMath::Cos(TMath::Pi()-fMaxCosmicAngle),TMath::Cos(TMath::Pi()+fMaxCosmicAngle)};
1209 // if(cosTheta >= cosMaxCosmicAngle[0] && cosTheta <= cosMaxCosmicAngle[1]) {
add06ceb 1210 candidate1 = kTRUE; candidate2 = kTRUE;//}
65e8ecdd 1211 if(candidate2) {
1212 fDeltaPtCosmicCandidates->Fill(track1->Pt()-track2->Pt());
add06ceb 1213 Float_t deltaPhi = track1->Phi()-track2->Phi();
1f329128 1214 if(deltaPhi<-0.5*TMath::Pi()) deltaPhi+=2.*TMath::Pi();
add06ceb 1215 fDeltaPhiSumEta->Fill(deltaPhi,track1->Eta()+track2->Eta());
cc89bb69 1216
1217 track1->GetImpactParameters(dcaR[0],dcaZ[0]);
1218 track2->GetImpactParameters(dcaR[1],dcaZ[1]);
1219 fDCAZCosmicCandidates->Fill(dcaZ[0],dcaZ[1]);
1220 fDCARCosmicCandidates->Fill(dcaR[0],dcaR[1]);
add06ceb 1221 fTheta->Fill(theta);
1222 fThetaZoom->Fill(theta);
e5abcde9 1223 fThetaPt1Pt2->Fill(theta,track1->Pt(),track2->Pt());
1224 fDeltaPhiSumEtaPt1->Fill(deltaPhi,track1->Eta()+track2->Eta(),track1->Pt());
1225 fDeltaPhiSumEtaPt2->Fill(deltaPhi,track1->Eta()+track2->Eta(),track2->Pt());
1226 fThetaDCAZ1DCAZ2->Fill(theta,dcaZ[0],dcaZ[1]);
65e8ecdd 1227 }
fdceab34 1228
65e8ecdd 1229 }
1230
9c8dfcb5 1231 if(candidate1) {
cc89bb69 1232 fPtSignedCosmicCandidates->Fill(track1->GetSign()*track1->Pt());
65e8ecdd 1233 }
1234
9c8dfcb5 1235 return candidate1;
fdceab34 1236}
65e8ecdd 1237
fdceab34 1238//________________________________________________________________________
1239void AliPWG4HighPtQATPConly::Terminate(Option_t *)
1240{
fdceab34 1241
fdceab34 1242}
df943115 1243
1244#endif