Improving error message
[u/mrichter/AliRoot.git] / PWG1 / AliComparisonDraw.cxx
CommitLineData
06f2c0e2 1// The class definition in esdClus.h has been generated automatically
2// by the ROOT utility TTree::MakeSelector(). This class is derived
3// from the ROOT class TSelector. For more information on the TSelector
4// framework see $ROOTSYS/README/README.SELECTOR or the ROOT User Manual.
5
6// The following methods are defined in this file:
7// Begin(): called everytime a loop on the tree starts,
8// a convenient place to create your histograms.
9// SlaveBegin(): called after Begin(), when on PROOF called only on the
10// slave servers.
11// Process(): called for each event, in this function you decide what
12// to read and fill your histograms.
13// SlaveTerminate: called at the end of the loop on the tree, when on PROOF
14// called only on the slave servers.
15// Terminate(): called at the end of the loop on the tree,
16// a convenient place to draw/fit your histograms.
17//
18
19//
20// Comaprison draw
21// Comapre the MC information with the reconstructed
22//
23
2f396646 24/*
25 after running analysis, read the file, and get component
26 gSystem->Load("libPWG1.so");
27 TFile f("Output.root");
28 AliComparisonDraw * comp = (AliComparisonDraw*)f.Get("AliComparisonDraw");
29 TF1 fl("fl","((min(250./(abs(x+0.000001)),250)-90))",0,2); // length function
30 TF1 fl2("fl2","[0]/((min(250./(abs(x+0.000001)),250)-90))^[1]",0,2);
31 fl2.SetParameter(1,1);
32 fl2.SetParameter(0,1);
33
34
35
36
37
38
39*/
40
41
06f2c0e2 42
43
44#include "TSystem.h"
21486ec3 45#include "TFile.h"
06f2c0e2 46#include <TPDGCode.h>
47#include <TStyle.h>
48#include "TCint.h"
49#include "TH1I.h"
50#include "TTimeStamp.h"
51#include "TProof.h"
52#include "TTree.h"
2f396646 53#include "TH3F.h"
06f2c0e2 54#include "TH2F.h"
2f396646 55#include "TF1.h"
56#include "TProfile.h"
57#include "TProfile2D.h"
58#include "TGraph2D.h"
59#include "TPad.h"
60#include "TCanvas.h"
61#include "TGraph.h"
06f2c0e2 62//
63#include "AliTracker.h"
64#include "AliMagF.h"
65//
66#include "AliESDEvent.h" // new container
67#include "AliESD.h"
68#include "AliESDtrack.h"
69#include "AliESDfriend.h"
70#include "AliESDfriendTrack.h"
71#include "AliTPCseed.h"
72#include "AliTPCclusterMI.h"
73//
2f396646 74#include "AliMathBase.h"
75#include "AliTreeDraw.h"
21486ec3 76
77#include "AliMCInfo.h"
78#include "AliESDRecInfo.h"
06f2c0e2 79#include "AliComparisonDraw.h"
80
81
82ClassImp(AliComparisonDraw)
83
21486ec3 84Bool_t AliComparisonDraw::fgBDraw=kFALSE; //option draw temporary results
06f2c0e2 85
86AliComparisonDraw::AliComparisonDraw():
87 TObject(),
88 fPtResolLPT(0),
89 fPtResolHPT(0)
90{
91 InitHisto();
92}
93
94void AliComparisonDraw::InitHisto(){
95 //
96 //
2f396646 97 // EFFICIENCY
98 //
99 // Efficiency as function of pt
100 fEffTPCPt = new TProfile("Eff_pt","Eff_Pt",50,0.1,3); // physical
101 fEffTPCPtMC = new TProfile("MC_Eff_pt","MC_Eff_Pt",50,0.1,3); // MC - particles make more than 50 rowdigits
102 fEffTPCPtF = new TProfile("F_Eff_pt","F_Eff_Pt",50,0.1,3); // tracking - under condition more than 50 rdigits
103
104 // Efficiency as function of pt
105 fEffTPCTan = new TProfile("Eff_tan","Eff_tan",50,-2.5,2.5); // physical
106 fEffTPCTanMC = new TProfile("MC_Eff_tan","MC_Eff_tan",50,-2.5,2.5); // MC - particles make more than 50 rowdigits
107 fEffTPCTanF = new TProfile("F_Eff_tan","F_Eff_tan",50,-2.5,2.5); // tracking - under condition more than 50 rdigits
108
109 fEffTPCPtTan = new TProfile2D("Eff_pt","Eff_Pt",10,0.1,3,20,-2.,2.);
110 fEffTPCPtTanMC = new TProfile2D("MC_Eff_pt","MC Eff Pt",10,0.1,3,20, -2.,2.);
111 fEffTPCPtTanF = new TProfile2D("MC_Eff_pt","MC Eff Pt",10,0.1,3,20, -2.,2.);
112
113 //
114 // TPC dEdx
115 //
116 fTPCSignalNormTan = new TH2F("CdEdxTan","CdEdxTan",50, -2,2, 40,30,70); // tpc signal normalized to the MC
117 fTPCSignalNormSPhi = new TH2F("CdEdxSPhi","CdEdxSPhi",10,0.0,1,40,30,70); // tpc signal normalized to the MC
118 fTPCSignalNormTPhi = new TH2F("CdEdxTPhi","CdEdxTPhi",10,0.0,2,40,30,70); // tpc signal normalized to the MC
119
120 fTPCSignalNormTanSPhi= new TH3F("CdEdxTanSPhi","CdEdxTanSPhi",20, -2,2, 10,0.0 ,1, 40,30,70); // tpc signal normalized to the mean signal - MC
121 fTPCSignalNormTanTPhi= new TH3F("CdEdxTanTPhi","CdEdxTanTPhi",20, -2,2, 10,0.0 ,1, 40,30,70); // tpc signal normalized to the mean signal - MC
122 fTPCSignalNormTanSPt= new TH3F("CdEdxTanSPt","CdEdxTanSPt",20, -2,2, 10,0.3 ,3, 40,30,70); // tpc signal normalized to the mean signal - MC
123
124
125
126 //
127 // RESOLUTION
128 //
129 fCPtResolTan = new TH2F("C Pt resol","C pt resol",50, -2,2,200,-0.2,0.2);
130 fCPtPullTan = new TH2F("C Pt pull","C pt pull",50, -2,2,200,-5,5);
131 //
132 fCPhiResolTan = new TH2F("CPhiResolTan","CPhiResolTan",50, -2,2,200,-0.025,0.025);
133 // angular resolution - constrained
134 fCTanResolTan = new TH2F("CTanResolTan","CTanResolTan",50, -2,2,200,-0.025,0.025);
135 // angular resolution - constrained
136 fCPtResolTan=new TH2F("CPtResol","CPtResol",50, -2,2,200,-0.2,0.2);;
137 // pt resolution - constrained
138 fCPhiPullTan = new TH2F("CPhiPullTan","CPhiPullTan",50, -2,2,200,-5,5);
139 // angular resolution - constrained
140 fCTanPullTan = new TH2F("CTanPullTan","CTanPullTan",50, -2,2,200,-5,5);
141 // angular resolution - constrained
142 fCPtPullTan=new TH2F("CPtPull","CPtPull",50, -2,2,200,-5,5);
143 // pt resolution - constrained
06f2c0e2 144 //
145 fPtResolLPT = new TH2F("Pt resol","pt resol",10, 0.1,3,200,-0.2,0.2);
146 fPtResolHPT = new TH2F("Pt resol","pt resol",10, 2,100,200,-0.3,0.3);
2f396646 147 fPtPullLPT = new TH2F("Pt pool","pt pool",10, 0.1,3,200,-6,6);
148 fPtPullHPT = new TH2F("Pt pool","pt pool",10, 2,100,200,-6,6);
06f2c0e2 149 //
2f396646 150 fD0TanSPtB1 = new TH3F("DCAyTanSPt","DCAyTanSPt",20,1,2, 10,0.3,2, 100,-4,4);
151 fD1TanSPtB1 = new TH3F("DCAzTanSPt","DCAzTanSPt",20,1,2, 10,0.3,2, 100,-4,4);
152 fD0TanSPtL1 = new TH3F("DCAyTanSPt","DCAyTanSPt",20,0,1, 10,0.3,2, 100,-0.1,0.1);
153 fD1TanSPtL1 = new TH3F("DCAzTanSPt","DCAzTanSPt",20,0,1, 10,0.3,2, 100, -0.1,0.1);
154
155
156
06f2c0e2 157}
158
2f396646 159void AliComparisonDraw::ProcessEff(AliMCInfo* infoMC, AliESDRecInfo *infoRC){
06f2c0e2 160 //
2f396646 161 // make efficiencies histograms
162 //
163 Float_t kptcut = 0.15;
164 Float_t ktancut=1.;
165 Int_t kmincl =50;
166 Float_t mcpt = infoMC->GetParticle().Pt();
167 Float_t tantheta = TMath::Tan(infoMC->GetParticle().Theta()-TMath::Pi()*0.5);
168 Bool_t isPrim = infoMC->GetParticle().R()<0.1 && TMath::Abs(infoMC->GetParticle().Vz())<10;
169 //z diamond and
170
171 if (!isPrim) return;
172
173 //pt
174 if (TMath::Abs(tantheta)<ktancut){
175 fEffTPCPt->Fill(mcpt, infoRC->GetStatus(1)==3);
176 fEffTPCPtMC->Fill(mcpt, infoMC->GetRowsWithDigits()>kmincl);
177 if (infoMC->GetRowsWithDigits()>kmincl){
178 fEffTPCPtF->Fill(mcpt, infoRC->GetStatus(1)==3);
179 }
180 }
181
182 //theta
183 if (TMath::Abs(mcpt)>kptcut){
184 fEffTPCTan->Fill(tantheta, infoRC->GetStatus(1)==3);
185 fEffTPCTanMC->Fill(tantheta, infoMC->GetRowsWithDigits()>kmincl);
186 if (infoMC->GetRowsWithDigits()>kmincl){
187 fEffTPCTanF->Fill(tantheta, infoRC->GetStatus(1)==3);
188 }
189 }
06f2c0e2 190 //
2f396646 191 // pt-theta
192 //
193 fEffTPCPtTan->Fill(mcpt,tantheta,infoRC->GetStatus(1)==3);
194 fEffTPCPtTanMC->Fill(mcpt,tantheta,infoMC->GetRowsWithDigits()>50);
195 if (infoMC->GetRowsWithDigits()>kmincl){
196 fEffTPCPtTanF->Fill(mcpt,tantheta,infoRC->GetStatus(1)==3);
197 }
198}
199
200
201void AliComparisonDraw::ProcessResolConstrained(AliMCInfo* infoMC, AliESDRecInfo *infoRC){
202 //
203 //
06f2c0e2 204 //
205 Float_t mcpt = infoMC->GetParticle().Pt();
2f396646 206 Float_t tantheta = TMath::Tan(infoMC->GetParticle().Theta()-TMath::Pi()*0.5);
207 Bool_t isPrim = infoMC->GetParticle().R()<0.1 && TMath::Abs(infoMC->GetParticle().Vz())<10;
208 //z diamond and
209
210 if (!isPrim) return;
211 if (infoRC->GetStatus(1)!=3) return;
212 if (!infoRC->GetESDtrack()) return;
213 if (infoRC->GetESDtrack()->GetTPCNcls()<10) return;
214 if (!infoRC->GetESDtrack()->GetConstrainedParam()) return;
215
216 //
217 // constrained parameters resolution
218 //
219 const AliExternalTrackParam * cparam = infoRC->GetESDtrack()->GetConstrainedParam();
220 Float_t deltaCPt= (mcpt-cparam->Pt())/mcpt;
221 Float_t pullCPt= (1/mcpt-cparam->OneOverPt())/
222 TMath::Sqrt(cparam->GetSigma1Pt2());
223 Float_t deltaPhi = TMath::ATan2(cparam->Py(),cparam->Px())-
224 TMath::ATan2(infoMC->GetParticle().Py(),infoMC->GetParticle().Px());
225 Float_t pullPhi = deltaPhi/TMath::Sqrt(cparam->GetSigmaSnp2());
226
227 Float_t deltaTan = TMath::ATan2(cparam->Pz(),cparam->Pt())-
228 TMath::ATan2(infoMC->GetParticle().Pz(),infoMC->GetParticle().Pt());
229 Float_t pullTan = deltaPhi/TMath::Sqrt(cparam->GetSigmaSnp2());
06f2c0e2 230
2f396646 231 fCPtResolTan->Fill(tantheta,deltaCPt);
232 fCPtPullTan->Fill(tantheta,pullCPt);
233 fCPhiResolTan->Fill(tantheta,deltaPhi);
234 fCPhiPullTan->Fill(tantheta,pullPhi);
235 fCTanResolTan->Fill(tantheta,deltaTan);
236 fCTanPullTan->Fill(tantheta,pullTan);
237
238}
239
240
241
242void AliComparisonDraw::ProcessTPCdedx(AliMCInfo* infoMC, AliESDRecInfo *infoRC){
06f2c0e2 243 //
244 //
2f396646 245 //
246 Float_t mcpt = infoMC->GetParticle().Pt();
247 Float_t tantheta = TMath::Tan(infoMC->GetParticle().Theta()-TMath::Pi()*0.5);
248 Bool_t isPrim = infoMC->GetParticle().R()<0.1 && TMath::Abs(infoMC->GetParticle().Vz())<10;
249 //z diamond and
250
251 if (!isPrim) return;
252 if (infoRC->GetStatus(1)!=3) return;
253 if (!infoRC->GetESDtrack()) return;
254 if (infoRC->GetESDtrack()->GetTPCNcls()<10) return;
255 if (!infoRC->GetESDtrack()->GetConstrainedParam()) return;
256 Float_t mprim = infoMC->GetPrim();
257 if (mprim>1.4) return;
258 if (mprim<0.5) return;
259 if (infoRC->GetESDtrack()->GetTPCsignalN()<50) return;
260 //
261 Float_t ratio = infoRC->GetESDtrack()->GetTPCsignal()/infoMC->GetPrim();
262 Float_t sphi = infoRC->GetESDtrack()->GetInnerParam()->GetSnp();
263 Float_t tphi = sphi/TMath::Sqrt(1-sphi*sphi);
06f2c0e2 264
265
2f396646 266 if (TMath::Abs(infoMC->GetParticle().GetPdgCode())!=211) return;
267 if (mcpt>0.5){
268 fTPCSignalNormTan->Fill(tantheta,ratio); //only subset
269 }
270 if (TMath::Abs(tantheta)<0.5){
271 fTPCSignalNormSPhi->Fill(sphi,ratio); // only subset
272 fTPCSignalNormTPhi->Fill(tphi,ratio); // only subset
273 }
274 fTPCSignalNormTanSPhi->Fill(tantheta,sphi,ratio);
275 fTPCSignalNormTanTPhi->Fill(tantheta,tphi,ratio);
276 fTPCSignalNormTanSPt->Fill(tantheta,TMath::Sqrt(mcpt),ratio);
277}
278
279void AliComparisonDraw::ProcessDCA(AliMCInfo* infoMC, AliESDRecInfo *infoRC){
280 //
281 //
282 //
283 Float_t mcpt = infoMC->GetParticle().Pt();
284 Float_t tantheta = TMath::Tan(infoMC->GetParticle().Theta()-TMath::Pi()*0.5);
285 Bool_t isPrim = infoMC->GetParticle().R()<0.1 && TMath::Abs(infoMC->GetParticle().Vz())<10;
286 //z diamond and
287 if (!isPrim) return;
288 if (infoRC->GetStatus(1)!=3) return;
289 if (!infoRC->GetESDtrack()) return;
06f2c0e2 290 if (infoRC->GetESDtrack()->GetTPCNcls()<10) return;
2f396646 291 if (!infoRC->GetESDtrack()->GetConstrainedParam()) return;
292 Float_t spt = TMath::Sqrt(mcpt);
293 Float_t dca[2],cov[3];
294 infoRC->GetESDtrack()->GetImpactParameters(dca,cov);
295 Int_t clusterITS[100];
296 if (infoRC->GetESDtrack()->GetITSclusters(clusterITS)==0){
297 fD0TanSPtB1->Fill(tantheta,spt,dca[0]);
298 fD1TanSPtB1->Fill(tantheta,spt,dca[1]);
299 }
300 fD0TanSPtL1->Fill(tantheta,spt,dca[0]);
301 fD1TanSPtL1->Fill(tantheta,spt,dca[1]);
302}
303
304
305
306
307void AliComparisonDraw::Process(AliMCInfo* infoMC, AliESDRecInfo *infoRC){
308 //
309 //
310 //
311 ProcessEff(infoMC,infoRC);
312 ProcessResolConstrained(infoMC,infoRC);
313 ProcessTPCdedx(infoMC, infoRC);
314 ProcessDCA(infoMC, infoRC);
06f2c0e2 315
2f396646 316 Float_t mcpt = infoMC->GetParticle().Pt();
317 Bool_t isPrim = infoMC->GetParticle().R()<0.1 && TMath::Abs(infoMC->GetParticle().Vz())<10;
318 //z diamond and
319
320 if (!isPrim) return;
321 //
322 //
323 if (infoRC->GetStatus(1)==0) return;
324 if (!infoRC->GetESDtrack()) return;
325 if (infoRC->GetESDtrack()->GetTPCNcls()<10) return;
06f2c0e2 326 // printf("Pt\t%f\t%f\n",mcpt, infoRC->GetESDtrack()->Pt());
327
328 Float_t deltaPt= (mcpt-infoRC->GetESDtrack()->Pt())/mcpt;
329 Float_t poolPt= (1/mcpt-infoRC->GetESDtrack()->OneOverPt())/
330 TMath::Sqrt(infoRC->GetESDtrack()->GetSigma1Pt2());
2f396646 331
06f2c0e2 332 fPtResolLPT->Fill(mcpt,deltaPt);
333 fPtResolHPT->Fill(mcpt,deltaPt);
2f396646 334 fPtPullLPT->Fill(mcpt,poolPt);
335 fPtPullHPT->Fill(mcpt,poolPt);
336}
337
338
339
340TH1F* AliComparisonDraw::MakeResol(TH2F * his, Int_t integ, Bool_t type){
341 TH1F *hisr, *hism;
342 if (!gPad) new TCanvas;
343 hisr = AliTreeDraw::CreateResHistoI(his,&hism,integ);
344 if (type) return hism;
345 else
346 return hisr;
347}
348
349
350TGraph2D * AliComparisonDraw::MakeStat2D(TH3 * his, Int_t delta0, Int_t delta1, Int_t type){
351 //
352 //
353 //
354 // delta - number of bins to integrate
355 // type - 0 - mean value
356
357 TAxis * xaxis = his->GetXaxis();
358 TAxis * yaxis = his->GetYaxis();
359 // TAxis * zaxis = his->GetZaxis();
360 Int_t nbinx = xaxis->GetNbins();
361 Int_t nbiny = yaxis->GetNbins();
362 char name[1000];
363 Int_t icount=0;
364 TGraph2D *graph = new TGraph2D(nbinx*nbiny);
365 TF1 f1("f1","gaus");
366 for (Int_t ix=0; ix<nbinx;ix++)
367 for (Int_t iy=0; iy<nbiny;iy++){
368 Float_t xcenter = xaxis->GetBinCenter(ix);
369 Float_t ycenter = yaxis->GetBinCenter(iy);
370 sprintf(name,"%s_%d_%d",his->GetName(), ix,iy);
371 TH1 *projection = his->ProjectionZ(name,ix-delta0,ix+delta0,iy-delta1,iy+delta1);
372 Float_t stat= 0;
373 if (type==0) stat = projection->GetMean();
374 if (type==1) stat = projection->GetRMS();
375 if (type==2 || type==3){
376 TVectorD vec(3);
377 AliMathBase::LTM((TH1F*)projection,&vec,0.7);
378 if (type==2) stat= vec[1];
379 if (type==3) stat= vec[0];
380 }
381 if (type==4|| type==5){
382 projection->Fit(&f1);
383 if (type==4) stat= f1.GetParameter(1);
384 if (type==5) stat= f1.GetParameter(2);
385 }
386 //printf("%d\t%f\t%f\t%f\n", icount,xcenter, ycenter, stat);
387 graph->SetPoint(icount,xcenter, ycenter, stat);
388 icount++;
389 }
390 return graph;
391}
392
393TGraph * AliComparisonDraw::MakeStat1D(TH3 * his, Int_t delta1, Int_t type){
394 //
395 //
396 //
397 // delta - number of bins to integrate
398 // type - 0 - mean value
399
400 TAxis * xaxis = his->GetXaxis();
401 TAxis * yaxis = his->GetYaxis();
402 // TAxis * zaxis = his->GetZaxis();
403 Int_t nbinx = xaxis->GetNbins();
404 Int_t nbiny = yaxis->GetNbins();
405 char name[1000];
406 Int_t icount=0;
407 TGraph *graph = new TGraph(nbinx);
408 TF1 f1("f1","gaus");
409 for (Int_t ix=0; ix<nbinx;ix++){
410 Float_t xcenter = xaxis->GetBinCenter(ix);
411 // Float_t ycenter = yaxis->GetBinCenter(iy);
412 sprintf(name,"%s_%d",his->GetName(), ix);
413 TH1 *projection = his->ProjectionZ(name,ix-delta1,ix+delta1,0,nbiny);
414 Float_t stat= 0;
415 if (type==0) stat = projection->GetMean();
416 if (type==1) stat = projection->GetRMS();
417 if (type==2 || type==3){
418 TVectorD vec(3);
419 AliMathBase::LTM((TH1F*)projection,&vec,0.7);
420 if (type==2) stat= vec[1];
421 if (type==3) stat= vec[0];
422 }
423 if (type==4|| type==5){
424 projection->Fit(&f1);
425 if (type==4) stat= f1.GetParameter(1);
426 if (type==5) stat= f1.GetParameter(2);
427 }
428 //printf("%d\t%f\t%f\t%f\n", icount,xcenter, ycenter, stat);
429 graph->SetPoint(icount,xcenter, stat);
430 icount++;
431 }
432 return graph;
433}
434
435//
436// Make derived plots
437//
438
439void AliComparisonDraw::MakePlots(){
440 //
441 //
442 //
443 AliComparisonDraw * comp=this;
444
445 TFile *fp = new TFile("picutures.root","recreate");
446 TH1F *hiss=0, *hism=0;
447 TGraph2D * gr=0, gr2=0;
448 TGraph * gr0 = 0;
449 TCanvas * c = new TCanvas("Phi resol Tan","Phi resol Tan");
450 //
451 //
452 //
453 hiss = comp->MakeResol(comp->fCPtResolTan,1,0);
454 hiss->SetXTitle("Tan(#theta)");
455 hiss->SetYTitle("#sigmap_{t}/p_{t}");
456 hiss->Draw();
457 hiss->Write("CptResolTan");
458 //
459 //
460 hiss = comp->MakeResol(comp->fCPhiResolTan,1,0);
461 c->cd();
462 hiss->SetXTitle("Tan(#theta)");
463 hiss->SetYTitle("#sigma#phi (rad)");
464 hiss->Draw();
465 fp->cd();
466 hiss->Write("PhiResolTan");
467 //
468 hiss = comp->MakeResol(comp->fCTanResolTan,1,0);
469 c->cd();
470 hiss->SetXTitle("Tan(#theta)");
471 hiss->SetYTitle("#sigma#theta (rad)");
472 hiss->Draw();
473 fp->cd();
474 hiss->Write("ThetaResolTan");
475 //
476 //
477 hiss = comp->MakeResol(comp->fCTanResolTan,1,0);
478 c->cd();
479 hiss->SetXTitle("Tan(#theta)");
480 hiss->SetYTitle("#sigmap_{t}/p_{t} ");
481 hiss->Draw();
482 fp->cd();
483 //
484 //
485 //
486 hiss = comp->MakeResol(comp->fTPCSignalNormTan,4,0);
487 hiss->SetXTitle("Tan(#theta)");
488 hiss->SetYTitle("#sigma_{dEdx}");
489 hiss->Draw();
490 fp->cd();
491 hiss->Write("TPCdEdxResolTan");
492 //
493 //
494 //
495 hiss = comp->MakeResol(comp->fTPCSignalNormTan,4,1);
496 hiss->SetXTitle("Tan(#theta)");
497 hiss->SetYTitle("<dEdx>");
498 hiss->Draw();
499 hiss->Write("TPCdEdxMeanTan");
500 //
501 //
502 gr = comp->MakeStat2D(comp->fTPCSignalNormTanSPt,3,1,4);
503 gr->GetXaxis()->SetTitle("Tan(#theta)");
504 gr->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV)}");
505 gr->GetZaxis()->SetTitle("<dEdx>");
506 gr->Draw("colz");
507 gr->GetHistogram()->Write("TPCdEdxMeanTanPt");
508 //
509 //
510 gr = comp->MakeStat2D(comp->fTPCSignalNormTanSPt,3,1,5);
511 gr->GetXaxis()->SetTitle("Tan(#theta)");
512 gr->GetYaxis()->SetTitle("#sqrt{p_{t}(GeV)}");
513 gr->GetZaxis()->SetTitle("#sigma_{dEdx}");
514 gr->Draw("colz");
515 gr->GetHistogram()->Write("TPCdEdxMeanTanPt");
516 //
517 //
518 //
519 comp->fEffTPCTanF->SetXTitle("Tan(#theta)");
520 comp->fEffTPCTanF->SetYTitle("eff_{findable}");
521 comp->fEffTPCTanF->Draw();
522 comp->fEffTPCTanF->Write("EffTanFindable");
523 //
524 //
525 comp->fEffTPCTan->SetXTitle("Tan(#theta)");
526 comp->fEffTPCTan->SetYTitle("eff_{all}");
527 comp->fEffTPCTan->Draw();
528 comp->fEffTPCTan->Write("EffTanAll");
529 //
530 //DCA resolution
531 //
532 gr0 = comp->MakeStat1D(comp->fD0TanSPtB1,2,5);
533 gr0->GetXaxis()->SetTitle("Tan(#theta)");
534 gr0->GetYaxis()->SetTitle("#sigmaDCA (cm)");
535 gPad->Clear();
536 gr0->Draw("al*");
537 gr->GetHistogram()->Write("DCAResolTan");
538 //
539 //
540 //
541 gr = comp->MakeStat2D(comp->fD0TanSPtB1,4,2,5);
542 gr0->GetXaxis()->SetTitle("Tan(#theta)");
543 gr0->GetYaxis()->SetTitle("#sigmaDCA (cm)");
544 gPad->Clear();
545 gr0->Draw("al*");
546 gr->GetHistogram()->Write("DCAResolSPTTan");
547
548 fp->Close();
549
550
06f2c0e2 551}
552
2f396646 553
554