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