AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CosmicPerformance.C
Go to the documentation of this file.
1 
35 #include "TTree.h"
36 #include "TChain.h"
37 #include "TPad.h"
38 #include "TCanvas.h"
39 #include "TCut.h"
40 #include "TH1.h"
41 #include "TH2F.h"
42 #include "AliTPCcalibV0.h"
43 #include "AliExternalTrackParam.h"
44 
45 TChain * chainCosmic=0;
46 Int_t kmicolors[10]={1,2,3,4,6,7,8,9,10,11};
47 Int_t kmimarkers[10]={21,22,23,24,25,26,27,28,29,30};
48 
49 AliTPCcalibV0 v0;
50 Bool_t bUseCorrection =kFALSE;
51 //
52 // Global cuts
53 //
54 TCut cutDiff[6]; // parameter diff cuts - 5 all
55 TCut cutPull[6]; // pull diff cuts - 5 all
56 TCut cutGeomTPC; // TPC geometrical cuts
57 TCut cutN("cutN","min(Orig0.fTPCncls,Orig1.fTPCncls)>80");
58 TCut cutN120("cutN120","min(Orig0.fTPCncls,Orig1.fTPCncls)+abs(Tr1.fP[4]*10)>120");
59 TCut cutN130("cutN120","min(Orig0.fTPCncls,Orig1.fTPCncls)+abs(Tr1.fP[4]*20)>130");
60 TCut cutS("cutS","!crossI&&!crossO");
61 TCut cutRun("run<620600");
62 TCut cutAll;
64 TCut cut1Pt = "Tr0.fP[1]>0"; // Use only A side for Pt study
65 //
66 // Aliases
67 //
68 TString dP[5]; // delta of parameters
69 TString sP[5]; // sigma of parameters
70 TString pP[5]; // pull of parameters
71 TString axisYDP[5]; // axis title
72 TString axisYPP[5]; // axis title
73 TString axisYDPm[5]; // axis title
74 TString axisYPPm[5]; // axis title
75 //
76 //
77 Float_t range[5] = {5,3,10,3,0.05}; // ranges for diff histogram
78 
79 Float_t scale[5] = {10,10,1000,1000,1}; // scaling factor
80 //
81 // Z depend
82 TH2F * histoDPZ[5]={0,0,0,0,0};
83 TH2F * histoSPZ[5]={0,0,0,0,0};
84 TH2F * histoPPZ[5]={0,0,0,0,0};
85 TH1F * hmDPZ[5];
86 TH1F * hmSPZ[5];
87 TH1F * hmPPZ[5];
88 TH1F * hsDPZ[5];
89 TH1F * hsSPZ[5];
90 TH1F * hsPPZ[5];
91 //
92 // Pt depend
93 TH2F * histoDP1Pt[5]={0,0,0,0,0};
94 TH2F * histoSP1Pt[5]={0,0,0,0,0};
95 TH2F * histoPP1Pt[5]={0,0,0,0,0};
96 TH1F * hmDP1Pt[5];
97 TH1F * hmSP1Pt[5];
98 TH1F * hmPP1Pt[5];
99 TH1F * hsDP1Pt[5];
100 TH1F * hsSP1Pt[5];
101 TH1F * hsPP1Pt[5];
102 
105 
106  cutDiff[0]="abs(Tr0.fP[0]+Tr1.fP[0])<3";
107  cutDiff[1]="abs(Tr0.fP[1]-Tr1.fP[1])<15";
108  cutDiff[2]="abs(Tr1.fAlpha-Tr0.fAlpha+pi)<0.1";
109  cutDiff[3]="abs(Tr0.fP[3]+Tr1.fP[3])<0.1";
110  cutDiff[4]="abs(Tr0.fP[4]+Tr1.fP[4])<0.5";
111  for (Int_t i=0;i<5;i++) cutDiff[5]+=cutDiff[i];
112  //
113  cutPull[0]="abs(Tr0.fP[0]+Tr1.fP[0])/sqrt(Tr0.fC[0]+Tr1.fC[0])<10";
114  cutPull[1]="1";
115  cutPull[2]="((Tr1.fAlpha-Tr0.fAlpha+pi))/sqrt(Tr0.fC[5]+Tr1.fC[5])<10";
116  cutPull[3]="1";
117  cutPull[4]="abs(Tr0.fP[4]+Tr1.fP[4])/sqrt(Tr0.fC[14]+Tr1.fC[14])<10";
118  for (Int_t i=0;i<5;i++) cutPull[5]+=cutPull[i];
119 }
120 
123 
124  TCut cutOx("Op1.fX>240&&Op0.fX>240");
125  TCut cutOz("abs(Op1.fP[1])<240&&abs(Op0.fP[1])<240");
126  TCut cutIz("abs(Ip1.fP[1])<240&&abs(Ip0.fP[1])<240");
127  TCut cutX00("abs(x00)<70");
128  TCut cutX10("abs(x10)<70");
129  TCut cutT1P2("abs(Ip1.fP[2])<0.8");
130  TCut cutT0P2("abs(Ip0.fP[2])<0.8");
131  cutGeomTPC = cutOx+cutOz+cutIz+cutX00+cutX10+cutT1P2+cutT0P2;
132 }
133 
134 void MakeCuts(){
136 
137  MakeGeomCuts();
138  MakeCutsParam();
140 }
141 
142 void MakeAlias(){
143  AliExternalTrackParam p;
144  dP[0]="(Tr0.fP[0]+Tr1.fP[0])";
145  dP[1]="(Tr0.fP[1]-Tr1.fP[1])";
146  dP[2]="(Tr1.fAlpha-Tr0.fAlpha+pi)";
147  dP[3]="(Tr0.fP[3]+Tr1.fP[3])";
148  dP[4]="(Tr0.fP[4]+Tr1.fP[4])";
149  for (Int_t i=0;i<5;i++){
150  sP[i]=Form("%f*sqrt(Tr0.fC[%d]+Tr1.fC[%d])",scale[i],p.GetIndex(i,i),p.GetIndex(i,i));
151  pP[i]=Form("%s/sqrt(Tr0.fC[%d]+Tr1.fC[%d])",dP[i].Data(),scale[i],p.GetIndex(i,i),p.GetIndex(i,i));
152  dP[i]+=Form("*%f",scale[i]);
153  }
154 
155  axisYDP[0]="#sigma_{r#phi} (mm)";
156  axisYDP[1]="#sigma_{z} (mm)";
157  axisYDP[2]="#sigma_{#phi} (mrad)";
158  axisYDP[3]="#sigma_{#theta} (mrad)";
159  axisYDP[4]="#sigma_{1/pt} (1/GeV))";
160  //
161  axisYPP[0]="#sigma_{r#phi} (Unit)";
162  axisYPP[1]="#sigma_{z} (Unit)";
163  axisYPP[2]="#sigma_{#phi} (Unit)";
164  axisYPP[3]="#sigma_{#theta} (Unit)";
165  axisYPP[4]="#sigma_{1/pt} (Unit))";
166  //
167  axisYDPm[0]="#Delta_{r#phi} (mm)";
168  axisYDPm[1]="#Delta_{z} (mm)";
169  axisYDPm[2]="#Delta_{#phi} (mrad)";
170  axisYDPm[3]="#Delta_{#theta} (mrad)";
171  axisYDPm[4]="#Delta_{1/pt} (1/GeV))";
172  //
173  axisYPPm[0]="#Delta_{r#phi} (Unit)";
174  axisYPPm[1]="#Delta_{z} (Unit)";
175  axisYPPm[2]="#Delta_{#phi} (Unit)";
176  axisYPPm[3]="#Delta_{#theta} (Unit)";
177  axisYPPm[4]="#Delta_{1/pt} (Unit))";
178 }
179 
180 void MakeZPlot(){
181 
182  for (Int_t i=0;i<5;i++){
183  char hname[100];
184  sprintf(hname,"dP%ivZ",i);
185  //
186  if ( histoDPZ[i]==0){
187  histoDPZ[i]= new TH2F(hname, hname,10,-240,240,100,-range[i],range[i]);
188  sprintf(hname,"sP%ivZ",i);
189  histoSPZ[i]= new TH2F(hname, hname,10,-240,240,100,0,range[i]/3);
190  sprintf(hname,"pP%ivZ",i);
191  histoPPZ[i]= new TH2F(hname, hname,10,-240,240,100,-6,6);
192  }
193  //
194  histoDPZ[i]->SetXTitle("z (cm)");
195  histoSPZ[i]->SetXTitle("z (cm)");
196  histoPPZ[i]->SetXTitle("z (cm)");
197  histoDPZ[i]->SetYTitle(axisYDP[i]);
198  histoSPZ[i]->SetYTitle(axisYDP[i]);
199  histoPPZ[i]->SetYTitle(axisYPP[i]);
200  chainCosmic->Draw((dP[i]+"/sqrt(2.):Tr0.fP[1]>>"+histoDPZ[i]->GetName()),cutAll+cutCustom+cutS);
201  chainCosmic->Draw((sP[i]+"/sqrt(2.):Tr0.fP[1]>>"+histoSPZ[i]->GetName()),cutAll+cutCustom+cutS);
202  chainCosmic->Draw((pP[i]+":Tr0.fP[1]>>"+histoPPZ[i]->GetName()),cutAll+cutCustom+cutS);
203  }
204 
205  TObjArray array(3);
206  {
207  for (Int_t i=0;i<5;i++){
208  histoDPZ[i]->FitSlicesY(0,0,-1,0,"QNR",&array);
209  hmDPZ[i] = (TH1F*)((array.At(1))->Clone());
210  hsDPZ[i] = (TH1F*)((array.At(2))->Clone());
211  histoSPZ[i]->FitSlicesY(0,0,-1,0,"QNR",&array);
212  hmSPZ[i] = (TH1F*)((array.At(1))->Clone());
213  hsSPZ[i] = (TH1F*)((array.At(2))->Clone());
214  histoPPZ[i]->FitSlicesY(0,0,-1,0,"QNR",&array);
215  hmPPZ[i] = (TH1F*)((array.At(1))->Clone());
216  hsPPZ[i] = (TH1F*)((array.At(2))->Clone());
217  //
218  hmDPZ[i]->SetYTitle(axisYDPm[i]);
219  hmSPZ[i]->SetYTitle(axisYDPm[i]);
220  hmPPZ[i]->SetYTitle(axisYPPm[i]);
221  hsDPZ[i]->SetMinimum(0);
222  hsDPZ[i]->SetYTitle(axisYDP[i]);
223  hsSPZ[i]->SetYTitle(axisYDP[i]);
224  hsPPZ[i]->SetYTitle(axisYPP[i]);
225  //
226  hmDPZ[i]->SetMarkerColor(kmicolors[1]);
227  hmDPZ[i]->SetMarkerStyle(kmimarkers[1]);
228  hsDPZ[i]->SetMarkerColor(kmicolors[2]);
229  hsDPZ[i]->SetMarkerStyle(kmimarkers[2]);
230  hmPPZ[i]->SetMarkerColor(kmicolors[1]);
231  hmPPZ[i]->SetMarkerStyle(kmimarkers[1]);
232  hsPPZ[i]->SetMarkerColor(kmicolors[2]);
233  hsPPZ[i]->SetMarkerStyle(kmimarkers[2]);
234  }
235  }
236 }
237 
238 void Make1PtPlot(){
239 
240  for (Int_t i=0;i<5;i++){
241  char hname[100];
242  sprintf(hname,"dP%iv1Pt",i);
243  //
244  if ( histoDP1Pt[i]==0){
245  histoDP1Pt[i]= new TH2F(hname, hname,6,0.02,0.75,100,-range[i],range[i]);
246  sprintf(hname,"sP%ivZ",i);
247  histoSP1Pt[i]= new TH2F(hname, hname,6,0.02,0.75,100,0,range[i]/3);
248  sprintf(hname,"pP%ivZ",i);
249  histoPP1Pt[i]= new TH2F(hname, hname,6,0.02,0.75,100,-6,6);
250  }
251  //
252  histoDP1Pt[i]->SetXTitle("#sqrt{1/p_{t} (GeV)}");
253  histoSP1Pt[i]->SetXTitle("#sqrt{1/p_{t} (GeV)}");
254  histoPP1Pt[i]->SetXTitle("#sqrt{1/p_{t} (GeV)}");
255  histoDP1Pt[i]->SetYTitle(axisYDP[i]);
256  histoSP1Pt[i]->SetYTitle(axisYDP[i]);
257  histoPP1Pt[i]->SetYTitle(axisYPP[i]);
258  chainCosmic->Draw((dP[i]+"/sqrt(2.):sqrt(0.5*abs(Tr0.fP[4]-Tr1.fP[4]))>>"+histoDP1Pt[i]->GetName()),cutAll+cutCustom+cutS+cut1Pt);
259  chainCosmic->Draw((sP[i]+"/sqrt(2.):sqrt(0.5*abs(Tr0.fP[4]-Tr1.fP[4]))>>"+histoSP1Pt[i]->GetName()),cutAll+cutCustom+cutS+cut1Pt);
260  chainCosmic->Draw((pP[i]+":sqrt(0.5*abs(Tr0.fP[4]-Tr1.fP[4]))>>"+histoPP1Pt[i]->GetName()),cutAll+cutCustom+cutS+cut1Pt);
261  }
262 
263  TObjArray array(3);
264  {
265  for (Int_t i=0;i<5;i++){
266  histoDP1Pt[i]->FitSlicesY(0,0,-1,0,"QNR",&array);
267  hmDP1Pt[i] = (TH1F*)((array.At(1))->Clone());
268  hsDP1Pt[i] = (TH1F*)((array.At(2))->Clone());
269  histoSP1Pt[i]->FitSlicesY(0,0,-1,0,"QNR",&array);
270  hmSP1Pt[i] = (TH1F*)((array.At(1))->Clone());
271  hsSP1Pt[i] = (TH1F*)((array.At(2))->Clone());
272  histoPP1Pt[i]->FitSlicesY(0,0,-1,0,"QNR",&array);
273  hmPP1Pt[i] = (TH1F*)((array.At(1))->Clone());
274  hsPP1Pt[i] = (TH1F*)((array.At(2))->Clone());
275  hmDP1Pt[i]->SetYTitle(axisYDPm[i]);
276  hmSP1Pt[i]->SetYTitle(axisYDPm[i]);
277  hmPP1Pt[i]->SetYTitle(axisYPPm[i]);
278  hsDP1Pt[i]->SetMinimum(0);
279  hsDP1Pt[i]->SetYTitle(axisYDP[i]);
280  hsSP1Pt[i]->SetYTitle(axisYDP[i]);
281  hsPP1Pt[i]->SetYTitle(axisYPP[i]);
282  //
283  hmDP1Pt[i]->SetMarkerColor(kmicolors[1]);
284  hmDP1Pt[i]->SetMarkerStyle(kmimarkers[1]);
285  hsDP1Pt[i]->SetMarkerColor(kmicolors[2]);
286  hsDP1Pt[i]->SetMarkerStyle(kmimarkers[2]);
287  hmPP1Pt[i]->SetMarkerColor(kmicolors[1]);
288  hmPP1Pt[i]->SetMarkerStyle(kmimarkers[1]);
289  hsPP1Pt[i]->SetMarkerColor(kmicolors[2]);
290  hsPP1Pt[i]->SetMarkerStyle(kmimarkers[2]);
291 
292 
293  }
294  }
295 }
296 
297 void DrawZ(){
298  TCanvas *czd = new TCanvas("Z depend (abs)","Z depend (abs)",700,900);
299  czd->Divide(2,5);
300  for (Int_t i=0;i<5;i++){
301  czd->cd(2*i+1);
302  hmDPZ[i]->Draw("");
303  czd->cd(2*i+2);
304  hsDPZ[i]->Draw("");
305  }
306  czd->SaveAs("picResol/deltaPxZ.eps");
307  czd->SaveAs("picResol/deltaPxZ.gif");
308  czd->SaveAs("picResol/deltaPxZ.root");
309 }
310 
311 void DrawZPull(){
312  TCanvas *czp = new TCanvas("Z depend (Pull)","Z depend (Pull)",700,900);
313  czp->Divide(2,5);
314  for (Int_t i=0;i<5;i++){
315  czp->cd(2*i+1);
316  hmPPZ[i]->Draw("");
317  czp->cd(2*i+2);
318  hsPPZ[i]->Draw("");
319  }
320  czp->SaveAs("picResol/pullPxZ.eps");
321  czp->SaveAs("picResol/pullPxZ.gif");
322  czp->SaveAs("picResol/pullPxZ.root");
323 
324 }
325 
326 
327 void Draw1Pt(){
328  TCanvas *cpd = new TCanvas("1/Pt depend","1/Pt depend",700,900);
329  cpd->Divide(2,5);
330  for (Int_t i=0;i<5;i++){
331  cpd->cd(2*i+1);
332  hmDP1Pt[i]->Draw("");
333  cpd->cd(2*i+2);
334  hsDP1Pt[i]->Draw("");
335  }
336  cpd->SaveAs("picResol/deltaPx1Pt.eps");
337  cpd->SaveAs("picResol/deltaPx1Pt.gif");
338  cpd->SaveAs("picResol/deltaPx1Pt.root");
339 }
340 void Draw1PtPull(){
341  TCanvas *cpp = new TCanvas("Pull 1/Pt","Pull 1/Pt",700,900);
342  cpp->Divide(2,5);
343  for (Int_t i=0;i<5;i++){
344  cpp->cd(2*i+1);
345  hmPP1Pt[i]->Draw("");
346  cpp->cd(2*i+2);
347  hsPP1Pt[i]->Draw("");
348  }
349  cpp->SaveAs("picResol/pullPx1Pt.eps");
350  cpp->SaveAs("picResol/pullPx1Pt.gif");
351  cpp->SaveAs("picResol/pullPx1Pt.root");
352 }
353 
354 
355 /*
356 //
357 //
358 //
359 
360 
361 void DrawPtSpectra(){
362  TH1F * hisPt0 = new TH1F("hisPt0","hisPt0",50,0,100);
363  TH1F * hisPtC = new TH1F("hisPtC","hisPtC",50,0,100);
364  chainCosmic->Draw("Tr0.Pt()>>hisPt0",cutAll+cutCustom);
365  chainCosmic->Draw("Tr0.Pt()>>hisPtC","abs(Tr0.fP[4])>3*sqrt(Tr0.fC[14])"+cutAll+cutCustom);
366  //
367  hisPt0->SetXTitle("p_{t} (GeV)");
368  hisPt0->SetLineColor(kmicolors[1]);
369  hisPtC->SetLineColor(kmicolors[2]);
370  //
371  hisPtC->Fit("exp");
372  hisPt0->Draw("");
373  hisPtC->Draw("same");
374  TLegend * legend = new TLegend(.4,.7, .99, .99,"Cosmic p_{t} spectra");
375  legend->AddEntry(hisPt0,"Raw spectra");
376  legend->AddEntry(hisPtC,"Selection abs(p_{t})<3#sigma_{p_{t}}");
377  legend->Draw();
378  gPad->SaveAs("picSpectra/ptSpectra.eps");
379  gPad->SaveAs("picSpectra/ptSpectra.gif");
380  gPad->SaveAs("picSpectra/ptSpectra.root");
381 }
382 
383 
384 
385 void InitCuts(){
386  //
387  // Init cuts
388  //
389  chainCosmic->Draw(">>listELP",cutAll,"entryList");
390  TEntryList *elist = (TEntryList*)gDirectory->Get("listELP");
391  chainCosmic->SetEntryList(elist);
392  //
393  chainCosmic->Draw(">>listELFit",cutAll+cuthpt+cutS+cutRun,"entryList");
394  TEntryList *elistFit = (TEntryList*)gDirectory->Get("listELFit");
395  chainCosmic->SetEntryList(elistFit);
396 }
397 
398 void SetAlias(){
399  //
400  // Set aliases
401  //
402  chainCosmic->SetAlias("dP0","(Tr0.fP[0]+Tr1.fP[0])");
403  chainCosmic->SetAlias("dP1","(Tr0.fP[1]-Tr1.fP[1])");
404  chainCosmic->SetAlias("dP2","(Tr1.fAlpha-Tr0.fAlpha+pi)");
405  chainCosmic->SetAlias("dP3","(Tr0.fP[3]+Tr1.fP[3])");
406  chainCosmic->SetAlias("dP4","(Tr0.fP[4]+Tr1.fP[4])");
407  //
408  chainCosmic->SetAlias("sP0","sqrt(Tr0.fC[0]+Tr1.fC[0])");
409  chainCosmic->SetAlias("sP1","sqrt(Tr0.fC[2]+Tr1.fC[2])");
410  chainCosmic->SetAlias("sP2","sqrt(Tr0.fC[5]+Tr0.fC[5])");
411  chainCosmic->SetAlias("sP3","sqrt(Tr0.fC[9]+Tr1.fC[9])");
412  chainCosmic->SetAlias("sP4","sqrt(Tr0.fC[14]+Tr1.fC[14])");
413  //
414  chainCosmic->SetAlias("corrP0","0");
415  chainCosmic->SetAlias("corrP1","0");
416  chainCosmic->SetAlias("corrP2","0");
417  chainCosmic->SetAlias("corrP3","0");
418  chainCosmic->SetAlias("corrP4","0");
419  //
420  chainCosmic->SetAlias("dR","(1-abs(Tr0.fP[1]/250))");
421  chainCosmic->SetAlias("side","(-1+(Tr0.fP[1]>0)*2)");
422  chainCosmic->SetAlias("meanPt","((Tr0.Pt()+Tr1.Pt())/2.)");
423 
424 }
425 
426 void Correction(){
427  //
428  // Fit corrections
429  //
430  TStatToolkit toolkit;
431  Double_t chi2=0;
432  Int_t npoints=0;
433  TVectorD fitParam;
434  TMatrixD covMatrix;
435  //
436  TString fstring="";
437  fstring+="side++";
438  //
439  fstring+="dR++";
440  fstring+="dR*dR++";
441  fstring+="Tr0.fP[3]++";
442  //
443  fstring+="dR*side++";
444  fstring+="dR*dR*side++";
445  fstring+="Tr0.fP[3]*side++";
446  //
447  TString * strP0 = TStatToolkit::FitPlane(chainCosmic,"dP0", fstring.Data(),"1", chi2,npoints,fitParam,covMatrix);
448  chainCosmic->SetAlias("corrP0",strP0->Data());
449 
450  TString * strP1 = TStatToolkit::FitPlane(chainCosmic,"dP1", fstring.Data(),"!crossI&&!crossO", chi2,npoints,fitParam,covMatrix);
451  chainCosmic->SetAlias("corrP1",strP1->Data());
452 
453  TString * strP2 = TStatToolkit::FitPlane(chainCosmic,"dP2", fstring.Data(),"1", chi2,npoints,fitParam,covMatrix);
454  chainCosmic->SetAlias("corrP2",strP2->Data());
455 
456  TString * strP3 = TStatToolkit::FitPlane(chainCosmic,"dP3", fstring.Data(),"!crossI&&!crossO", chi2,npoints,fitParam,covMatrix);
457  chainCosmic->SetAlias("corrP3",strP3->Data());
458 
459  TString * strP4 = TStatToolkit::FitPlane(chainCosmic,"dP4", fstring.Data(),"1", chi2,npoints,fitParam,covMatrix);
460  chainCosmic->SetAlias("corrP4",strP4->Data());
461  bUseCorrection = kTRUE;
462 }
463 
464 
465 
466 void DrawNClusterGeom(){
467  //
468  //
469  //
470  TH2F * hNd("hNd","hNd",50,0,190,100,10,160);
471  chainCosmic->Draw("Orig0.fTPCncls:sqrt(x00^2+x01^2)>>hNd",cutOx+cutOz+cutIx+cutIz);
472  hNd->FitSlicesY();
473  hNd_1->SetXTitle("DCA_{r} (cm)");
474  hNd_1->SetYTitle("Mean number of clusters");
475  gPad->SaveAs("pic/NCl_Radius.eps");
476  gPad->SaveAs("pic/NCl_Radius.gif");
477  gPad->SaveAs("pic/NCl_Radius.root");
478 
479 
480 }
481 
482 
483 void PtResolPt(){
484 
485  TH2F * hdPtPt = new TH2F("hdPtPt","hdPtPt",20,0.5,30,100,-60,60);
486  TH2F * hsPtPt = new TH2F("hsPtPt","hsPtPt",20,0.5,30,200,-0,30);
487  TH2F * hdPtPtNoCor = new TH2F("hdPtPtNoCor","hdPtPtNoCor",20,0.5,30,100,-60,60);
488  TH2F * hdPtPtCor = new TH2F("hdPtPtCor","hdPtPtCor",20,0.5,30,200,-60,60);
489  //
490  v0.BinLogX(hdPtPt);
491  v0.BinLogX(hsPtPt);
492  v0.BinLogX(hdPtPtNoCor);
493  v0.BinLogX(hdPtPtCor);
494 
495  chainCosmic->Draw("100*((Tr0.Pt()-Tr1.Pt())/meanPt)/sqrt(2.):meanPt>>hdPtPt","side>0"+cutAll+cutRun+cutS+cutN120,"");
496  chainCosmic->Draw("100*(sP4*meanPt)/sqrt(2.):meanPt>>hsPtPt","side>0"+cutAll+cutRun+cutS+cutN120,"");
497  if (bUseCorrection) chainCosmic->Draw("100*((dP4-corrP4)*meanPt)/sqrt(2.):meanPt>>hdPtPtCorr","side>0"+cutAll+cutRun+cutS+cutN120,"");
498  if (bUseCorrection) chainCosmic->Draw("100*(dP4*meanPt)/sqrt(2.):meanPt>>hdPtPtNoCorr","side>0"+cutAll+cutRun+cutS+cutN120,"");
499  hdPtPt->FitSlicesY();
500  hsPtPt->FitSlicesY();
501  hdPtPt_2->Fit("pol1");
502  {if (bUseCorrection){
503  hdPtPtNoCor->FitSlicesY();
504  hdPtPtCor->FitSlicesY();
505  }}
506 
507  hdPtPt_2->SetXTitle("p_{t} (GeV)");
508  hdPtPt_2->SetYTitle("#sigma_{p_{t}}/p_{t} (%)");
509  hdPtPt_2->SetMinimum(0.5);
510  hsPtPt_1->SetMinimum(0.5);
511  hdPtPt_2->SetLineColor(kmicolors[1]);
512  hdPtPt_2->SetMarkerStyle(kmimarkers[1]);
513 
514  hdPtPt_2->Draw();
515  {if (bUseCorrection){
516  hdPtPtNoCor_2->Draw("same");
517  hdPtPtCor_2->Draw("same");
518  }}
519  gPad->SaveAs("picPerformance/SigmaPt_pt.gif");
520  gPad->SaveAs("picPerformance/SigmaPt_pt.eps");
521  gPad->SaveAs("picPerformance/SigmaPt_pt.root");
522  hsPtPt_1->SetLineColor(kmicolors[2]);
523  hsPtPt_1->SetMarkerStyle(kmimarkers[2]);
524  hsPtPt_1->Draw("same");
525  gPad->SaveAs("picPerformance/SigmaPt_ptLimit.gif");
526  gPad->SaveAs("picPerformance/SigmaPt_ptLimit.eps");
527  gPad->SaveAs("picPerformance/SigmaPt_ptLimit.root");
528 
529 }
530 
531 
532 
533 
534 
535 void PtResolN(){
536  //
537  //
538  //
539  TH2F * hdP4Ncl= new TH2F("hdp4Ncl","hdp4Ncl",5,80,160,100,-0.1,0.1);
540  chainCosmic->Draw("(dP4-corrP4)/sqrt(2.):min(Orig0.fTPCncls,Orig1.fTPCncls)>>hdp4Ncl","side>0"+cuthpt+cutRun+cutS,"");
541  hdp4Ncl->FitSlicesY();
542  hdp4Ncl_2->SetXTitle("Number of clusters");
543  hdp4Ncl_2->SetYTitle("#sigma 1/p_{t} (1/GeV)");
544  hdp4Ncl_2->Draw();
545  gPad->SaveAs("pic/SigmaP4_N.gif");
546  gPad->SaveAs("pic/SigmaP4_N.eps");
547  gPad->SaveAs("pic/SigmaP4_N.root");
548 
549  //
550  //
551  TH2F * hdP4PullNcl = new TH2F("hdP4PullNcl","hdP4PullNcl",5,80,160,100,-6.1,6.1);
552  chainCosmic->Draw("(Tr1.fP[4]+Tr0.fP[4])/sqrt(Tr1.fC[14]+Tr0.fC[14]):min(Orig0.fTPCncls,Orig1.fTPCncls)>>hdP4PullNcl","side>0"+cuthpt+cutRun+cutS,"");
553  hdP4PullNcl->FitSlicesY();
554  hdP4PullNcl_2->SetXTitle("Number of clusters");
555  hdP4PullNcl_2->SetYTitle("#sigma 1/p_{t} (Unit)");
556  hdP4PullNcl_2->Draw();
557  gPad->SaveAs("pic/PullP4_N.gif");
558  gPad->SaveAs("pic/PullP4_N.eps");
559  gPad->SaveAs("pic/PullP4_N.root");
560 
561 }
562 
563 
564 
565 void dEdxRatio(){
566  TH2F hratioPt("hratioPt","hratioPt",10,0,10,100,0.6,1.4);
567  chainCosmic->Draw("Seed0.CookdEdxNorm(0.01,0.65,1,0,159,0,kFALSE)/(0.3091*Seed0.CookdEdxNorm(0.01,0.65,0,0,159,0,kFALSE)):sqrt(Tr0.P())>>hratioPt","min(Orig0.fTPCncls,Orig1.fTPCncls)>60&&abs(mag)>0.1&&abs(Tr0.fP[3])>0.03","",10000000);
568  //
569  //
570  //
571  hratioPt->FitSlicesY();
572  TH2F hratioP3("hratioP3","hratioP3",10,0.0,0.6,100,0.6,1.4);
573  chainCosmic->Draw("Seed0.CookdEdxNorm(0.01,0.65,1,0,159,0,kFALSE)/(0.3091*Seed0.CookdEdxNorm(0.01,0.65,0,0,159,0,kFALSE)):abs(Tr0.fP[3])>>hratioP3","min(Orig0.fTPCncls,Orig1.fTPCncls)>60&&abs(mag)>0.1&&abs(Tr0.fP[3])>0.03","",10000000);
574 }
575 
576 
577 
578 
580 //
581 //
582 //
583 // RESOLUTION as function of 1/pt
584 //
585 //
586 //
588 
589 void P0resol1Pt(){
590  //
591  // P0 - Y -DCA resolution as function of the 1/pt
592  //
593  TH2F * hdP01Pt = new TH2F("hdP01Pt","hdP01Pt",6,0,1.0,100,-1.05,1.05);
594  TH2F * hdP01PtNoCor = new TH2F("hdP01PtNoCor","hdP01PtNoCor",6,0,1.0,100,-1.05,1.05);
595  chainCosmic->Draw("(dP0-corrP0)/sqrt(2.):sqrt(1/meanPt)>>hdP01Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
596  chainCosmic->Draw("(dP0-0)/sqrt(2.):sqrt(1/meanPt)>>hdP01PtNoCor","side>0"+cutAll+cutRun+cutS+cutN120,"");
597  hdP01Pt->FitSlicesY();
598  hdP01PtNoCor->FitSlicesY();
599  TH2F * hsP01Pt = new TH2F("hsP01Pt","hsP01Pt",6,0,1.0,100,-0.05,0.5);
600  chainCosmic->Draw("(sP0)/sqrt(2.):sqrt(1/meanPt)>>hsP01Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
601  TH1 *hsP01Pt_2 = hsP01Pt->ProfileX();
602 
603  hdP01Pt_2->SetMinimum(0);
604  hdP01Pt_2->SetXTitle("#sqrt{1/p_{t} (1/GeV)}");
605  hdP01Pt_2->SetYTitle("#sigma_{y} (cm)");
606  hdP01Pt_2->SetMarkerStyle(kmimarkers[0]);
607  hsP01Pt_2->SetMarkerStyle(kmimarkers[2]);
608  hdP01PtNoCor_2->SetMarkerStyle(kmimarkers[1]);
609  hdP01Pt_2->Draw();
610  hsP01Pt_2->Draw("same");
611  hdP01PtNoCor_2->Draw("same");
612 
613  gPad->SaveAs("picPerformance/SigmaP0_1pt.gif");
614  gPad->SaveAs("picPerformance/SigmaP0_1pt.eps");
615  gPad->SaveAs("picPerformance/SigmaP0_1pt.root");
616  //
617  TH2F * hPullP01Pt = new TH2F("hhPullP01Pt","hhPullP01Pt",6,0,1,50,-5.05,5.05);
618  TH2F * hncPullP01Pt = new TH2F("hhncPullP01Pt","hhncPullP01Pt",6,0,1,50,-5.05,5.05);
619  chainCosmic->Draw("(dP0-corrP0)/sP0:sqrt(1/meanPt)>>hhPullP01Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
620  chainCosmic->Draw("(dP0-0)/sP0:sqrt(1/meanPt)>>hhncPullP01Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
621  hPullP01Pt->FitSlicesY();
622  hncPullP01Pt->FitSlicesY();
623  hhPullP01Pt_2->SetMarkerStyle(kmimarkers[0]);
624  hhncPullP01Pt_2->SetMarkerStyle(kmimarkers[1]);
625  hhPullP01Pt_2->SetMinimum(0);
626  hhPullP01Pt_2->SetXTitle("#sqrt{1/p_{t} (1/GeV)}");
627  hhPullP01Pt_2->SetYTitle("#sigma_{y}(Unit) ");
628  hhPullP01Pt_2->Draw();
629  //hhncPullP01Pt_2->Draw("same");
630  gPad->SaveAs("picPerformance/PullP0_1pt.gif");
631  gPad->SaveAs("picPerformance/PullP0_1pt.eps");
632  gPad->SaveAs("picPerformance/PullP0_1pt.root");
633 }
634 
635 
636 
637 void P1resol1Pt(){
638  //
639  // P1 - Z -DCA resolution as function of the 1/pt
640  //
641  TH2F * hdP11Pt = new TH2F("hdP11Pt","hdP11Pt",6,0,1.0,100,-1.05,1.05);
642  TH2F * hdP11PtNoCor = new TH2F("hdP11PtNoCor","hdP11PtNoCor",6,0,1.0,100,-1.05,1.05);
643  chainCosmic->Draw("(dP1-corrP1)/sqrt(2.):sqrt(1/meanPt)>>hdP11Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
644  chainCosmic->Draw("(dP1-0)/sqrt(2.):sqrt(1/meanPt)>>hdP11PtNoCor","side>0"+cutAll+cutRun+cutS+cutN120,"");
645  hdP11Pt->FitSlicesY();
646  hdP11PtNoCor->FitSlicesY();
647  hdP11Pt_2->SetMinimum(0);
648  hdP11Pt_2->SetXTitle("#sqrt{1/p_{t} (1/GeV)}");
649  hdP11Pt_2->SetYTitle("#sigma_{z} (cm)");
650  hdP11Pt_2->SetMarkerStyle(kmimarkers[0]);
651  hdP11PtNoCor_2->SetMarkerStyle(kmimarkers[1]);
652  hdP11Pt_2NoCor->Draw();
653  // hdP11PtNoCor_2->Draw("same");
654  gPad->SaveAs("picPerformance/SigmaP1_1pt.gif");
655  gPad->SaveAs("picPerformance/SigmaP1_1pt.eps");
656  gPad->SaveAs("picPerformance/SigmaP1_1pt.root");
657 
658  //
659  TH2F * hPullP11Pt = new TH2F("hhPullP11Pt","hhPullP11Pt",6,0,1,50,-5.05,5.05);
660  TH2F * hncPullP11Pt = new TH2F("hhncPullP11Pt","hhncPullP11Pt",6,0,1,50,-5.05,5.05);
661  chainCosmic->Draw("(dP1-corrP1)/sP1:sqrt(1/meanPt)>>hhPullP11Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
662  chainCosmic->Draw("(dP1-0)/sP1:sqrt(1/meanPt)>>hhncPullP11Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
663  hPullP11Pt->FitSlicesY();
664  hncPullP11Pt->FitSlicesY();
665  hhPullP11Pt_2->SetMarkerStyle(kmimarkers[0]);
666  hhncPullP11Pt_2->SetMarkerStyle(kmimarkers[1]);
667  hhPullP11Pt_2->SetMinimum(0);
668  hhPullP11Pt_2->SetXTitle("#sqrt{1/p_{t} (1/GeV)}");
669  hhPullP11Pt_2->SetYTitle("#sigma_{z}(Unit) ");
670  hhPullP11Pt_2NoCor->Draw();
671  //hhncPullP11Pt_2->Draw("same");
672  gPad->SaveAs("picPerformance/PullP1_1pt.gif");
673  gPad->SaveAs("picPerformance/PullP1_1pt.eps");
674  gPad->SaveAs("picPerformance/PullP1_1pt.root");
675 }
676 
677 void P2resol1Pt(){
678  //
679  // P2 - Z -DCA resolution as function of the 1/pt
680  //
681  TH2F * hdP21Pt = new TH2F("hdP21Pt","hdP21Pt",6,0,1.0,100,-20.05,20.05);
682  TH2F * hdP21PtNoCor = new TH2F("hdP21PtNoCor","hdP21PtNoCor",6,0,1.0,100,-20.05,20.05);
683  chainCosmic->Draw("1000*(dP2-corrP2)/sqrt(2.):sqrt(1/meanPt)>>hdP21Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
684  chainCosmic->Draw("1000*(dP2-0)/sqrt(2.):sqrt(1/meanPt)>>hdP21PtNoCor","side>0"+cutAll+cutRun+cutS+cutN120,"");
685  hdP21Pt->FitSlicesY();
686  hdP21PtNoCor->FitSlicesY();
687  hdP21Pt_2->SetMinimum(0);
688  hdP21Pt_2->SetXTitle("#sqrt{1/p_{t} (1/GeV)}");
689  hdP21Pt_2->SetYTitle("#sigma_{#Phi} (mrad)");
690  hdP21Pt_2->SetMarkerStyle(kmimarkers[0]);
691  hdP21PtNoCor_2->SetMarkerStyle(kmimarkers[1]);
692  hdP21Pt_2NoCor->Draw();
693  // hdP21PtNoCor_2->Draw("same");
694  gPad->SaveAs("picPerformance/SigmaP2_1pt.gif");
695  gPad->SaveAs("picPerformance/SigmaP2_1pt.eps");
696  gPad->SaveAs("picPerformance/SigmaP2_1pt.root");
697 
698  //
699  TH2F * hPullP21Pt = new TH2F("hhPullP21Pt","hhPullP21Pt",6,0,1,50,-5.05,5.05);
700  TH2F * hncPullP21Pt = new TH2F("hhncPullP21Pt","hhncPullP21Pt",6,0,1,50,-5.05,5.05);
701  chainCosmic->Draw("(dP2-corrP2)/sP2:sqrt(1/meanPt)>>hhPullP21Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
702  chainCosmic->Draw("(dP2-0)/sP2:sqrt(1/meanPt)>>hhncPullP21Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
703  hPullP21Pt->FitSlicesY();
704  hncPullP21Pt->FitSlicesY();
705  hhPullP21Pt_2->SetMarkerStyle(kmimarkers[0]);
706  hhncPullP21Pt_2->SetMarkerStyle(kmimarkers[1]);
707  hhPullP21Pt_2->SetMinimum(0);
708  hhPullP21Pt_2->SetXTitle("#sqrt{1/p_{t} (1/GeV)}");
709  hhPullP21Pt_2->SetYTitle("#sigma_{#Phi}(Unit) ");
710  hhPullP21Pt_2NoCor->Draw();
711  //hhncPullP21Pt_2->Draw("same");
712  gPad->SaveAs("picPerformance/PullP2_1pt.gif");
713  gPad->SaveAs("picPerformance/PullP2_1pt.eps");
714  gPad->SaveAs("picPerformance/PullP2_1pt.root");
715 }
716 
717 void P3resol1Pt(){
718  //
719  // P3 - Z -DCA resolution as function of the 1/pt
720  //
721  TH2F * hdP31Pt = new TH2F("hdP31Pt","hdP31Pt",6,0,1.0,100,-5.05,5.05);
722  TH2F * hdP31PtNoCor = new TH2F("hdP31PtNoCor","hdP31PtNoCor",6,0,1.0,100,-5.05,5.05);
723  chainCosmic->Draw("1000*(dP3-corrP3)/sqrt(2.):sqrt(1/meanPt)>>hdP31Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
724  chainCosmic->Draw("1000*(dP3-0)/sqrt(2.):sqrt(1/meanPt)>>hdP31PtNoCor","side>0"+cutAll+cutRun+cutS+cutN120,"");
725  hdP31Pt->FitSlicesY();
726  hdP31PtNoCor->FitSlicesY();
727  hdP31Pt_2->SetMinimum(0);
728  hdP31Pt_2->SetXTitle("#sqrt{1/p_{t} (1/GeV)}");
729  hdP31Pt_2->SetYTitle("#sigma_{#Theta} (mrad)");
730  hdP31Pt_2->SetMarkerStyle(kmimarkers[0]);
731  hdP31PtNoCor_2->SetMarkerStyle(kmimarkers[1]);
732  hdP31Pt_2NoCor->Draw();
733  // hdP31PtNoCor_2->Draw("same");
734  gPad->SaveAs("picPerformance/SigmaP3_1pt.gif");
735  gPad->SaveAs("picPerformance/SigmaP3_1pt.eps");
736  gPad->SaveAs("picPerformance/SigmaP3_1pt.root");
737 
738  //
739  TH2F * hPullP31Pt = new TH2F("hhPullP31Pt","hhPullP31Pt",6,0,1,50,-5.05,5.05);
740  TH2F * hncPullP31Pt = new TH2F("hhncPullP31Pt","hhncPullP31Pt",6,0,1,50,-5.05,5.05);
741  chainCosmic->Draw("(dP3-corrP3)/sP3:sqrt(1/meanPt)>>hhPullP31Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
742  chainCosmic->Draw("(dP3-0)/sP3:sqrt(1/meanPt)>>hhncPullP31Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
743  hPullP31Pt->FitSlicesY();
744  hncPullP31Pt->FitSlicesY();
745  hhPullP31Pt_2->SetMarkerStyle(kmimarkers[0]);
746  hhncPullP31Pt_2->SetMarkerStyle(kmimarkers[1]);
747  hhPullP31Pt_2->SetMinimum(0);
748  hhPullP31Pt_2->SetXTitle("#sqrt{1/p_{t} (1/GeV)}");
749  hhPullP31Pt_2->SetYTitle("#sigma_{#Theta}(Unit) ");
750  hhPullP31Pt_2NoCor->Draw();
751  //hhncPullP31Pt_2->Draw("same");
752  gPad->SaveAs("picPerformance/PullP3_1pt.gif");
753  gPad->SaveAs("picPerformance/PullP3_1pt.eps");
754  gPad->SaveAs("picPerformance/PullP3_1pt.root");
755 }
756 
757 
758 
759 
760 
761 
762 void P4resol1Pt(){
763  //
764  // P4 - 1/Pt resolution as function of the 1/pt
765  //
766  TH2F * hdP41Pt = new TH2F("hdP41Pt","hdP41Pt",6,0,1.0,100,-0.05,0.05);
767  TH2F * hdP41PtNoCor = new TH2F("hdP41PtNoCor","hdP41PtNoCor",6,0,1.0,100,-0.05,0.05);
768  chainCosmic->Draw("(dP4-corrP4)/sqrt(2.):sqrt(1/meanPt)>>hdP41Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
769  chainCosmic->Draw("(dP4-0)/sqrt(2.):sqrt(1/meanPt)>>hdP41PtNoCor","side>0"+cutAll+cutRun+cutS+cutN120,"");
770  hdP41Pt->FitSlicesY();
771  hdP41PtNoCor->FitSlicesY();
772  hdP41Pt_2->SetMinimum(0);
773  hdP41Pt_2->SetXTitle("#sqrt{1/p_{t} (1/GeV)}");
774  hdP41Pt_2->SetYTitle("#sigma_{1/pt} (1/GeV)");
775  hdP41Pt_2->SetMarkerStyle(kmimarkers[0]);
776  hdP41PtNoCor_2->SetMarkerStyle(kmimarkers[1]);
777  hdP41Pt_2NoCor->Draw();
778  //hdP41PtNoCor_2->Draw("same");
779  gPad->SaveAs("picPerformance/SigmaP4_1pt.gif");
780  gPad->SaveAs("picPerformance/SigmaP4_1pt.eps");
781  gPad->SaveAs("picPerformance/SigmaP4_1pt.root");
782 
783  //
784  TH2F * hPullP41Pt = new TH2F("hhPullP41Pt","hhPullP41Pt",6,0,1,50,-5.05,5.05);
785  TH2F * hncPullP41Pt = new TH2F("hhncPullP41Pt","hhncPullP41Pt",6,0,1,50,-5.05,5.05);
786  chainCosmic->Draw("(dP4-corrP4)/sP4:sqrt(1/meanPt)>>hhPullP41Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
787  chainCosmic->Draw("(dP4-0)/sP4:sqrt(1/meanPt)>>hhncPullP41Pt","side>0"+cutAll+cutRun+cutS+cutN120,"");
788  hPullP41Pt->FitSlicesY();
789  hncPullP41Pt->FitSlicesY();
790  hhPullP41Pt_2->SetMarkerStyle(kmimarkers[0]);
791  hhncPullP41Pt_2->SetMarkerStyle(kmimarkers[1]);
792  hhPullP41Pt_2->SetMinimum(0);
793  hhPullP41Pt_2->SetXTitle("#sqrt{1/p_{t}} (1/GeV)}");
794  hhPullP41Pt_2->SetYTitle("#sigma_{1/pt} (Unit) ");
795  hhPullP41Pt_2NoCor->Draw();
796  //hhncPullP41Pt_2->Draw("same");
797  gPad->SaveAs("picPerformance/PullP4_1pt.gif");
798  gPad->SaveAs("picPerformance/PullP4_1pt.eps");
799  gPad->SaveAs("picPerformance/PullP4_1pt.root");
800 }
801 
803 //
804 //
805 // RESOLUTION as function of Z
806 //
807 //
809 
810 void P0resolZ(){
811  //
812  //
813  //
814  TH2F * hdP0Z = new TH2F("hdP0Z","hdP0Z",10,-250,250,100,-3.05,3.05);
815  TH2F * hdP0ZNoCor = new TH2F("hdP0ZNoCor","hdP0ZNoCor",10,-250,250,100,-3.05,3.05);
816  chainCosmic->Draw("(dP0-corrP0)/sqrt(2.):x02>>hdP0Z",cutAll+cutRun+cutS+cutN120,"");
817  chainCosmic->Draw("(dP0-0)/sqrt(2.):x02>>hdP0ZNoCor",cutAll+cutRun+cutS+cutN120,"");
818  hdP0Z->FitSlicesY();
819  hdP0ZNoCor->FitSlicesY();
820  //
821  TH2F * hsP0Z = new TH2F("hsP0Z","hsP0Z",10,-250,250,200,0.0,2);
822  chainCosmic->Draw("(sP0)/sqrt(2.):x02>>hsP0Z",cutAll+cutRun+cutS+cutN120,"");
823  TH1 * hsP0Z_2 = hsP0Z->ProfileX();
824 
825  //
826  hdP0Z_2->SetMinimum(0);
827  hdP0Z_2->SetXTitle("Z position (cm)");
828  hdP0Z_2->SetYTitle("#sigma_{y} (cm)");
829  hdP0Z_2->SetMarkerStyle(kmimarkers[0]);
830  hdP0ZNoCor_2->SetMarkerStyle(kmimarkers[1]);
831  hdP0Z_2->Draw();
832  hsP0Z_2->Draw("same");
833  hdP0ZNoCor_2->Draw("same");
834 
835  gPad->SaveAs("picPerformance/SigmaP0_z.gif");
836  gPad->SaveAs("picPerformance/SigmaP0_z.eps");
837  gPad->SaveAs("picPerformance/SigmaP0_z.root");
838  //
839  TH2F * hdPP0Z = new TH2F("hdPP0Z","hdPP0Z",8,-200,200,50,-5.05,5.05);
840  TH2F * hncdPP0Z = new TH2F("hncdPP0Z","hncdPP0Z",8,-200,200,50,-5.05,5.05);
841  chainCosmic->Draw("(dP0-corrP0)/sP0:x02>>hdPP0Z",cutAll+cutRun+cutS+cutN120,"");
842  chainCosmic->Draw("(dP0-0)/sP0:x02>>hncdPP0Z",cutAll+cutRun+cutS+cutN120,"");
843  hdPP0Z->FitSlicesY();
844  hncdPP0Z->FitSlicesY();
845  hdPP0Z_2->SetMarkerStyle(kmimarkers[0]);
846  hncdPP0Z_2->SetMarkerStyle(kmimarkers[1]);
847  hdPP0Z_2->SetMinimum(0);
848  hdPP0Z_2->SetXTitle("Z position (cm)");
849  hdPP0Z_2->SetYTitle("#sigma_{y}(Unit) ");
850  hdPP0Z_2->Draw();
851  hncdPP0Z_2->Draw("same");
852  gPad->SaveAs("picPerformance/PullP0_z.gif");
853  gPad->SaveAs("picPerformance/PullP0_z.eps");
854  gPad->SaveAs("picPerformance/PullP0_z.root");
855 }
856 
857 void P1resolZ(){
858  //
859  //
860  //
861  TH2F *hdP1Z = new TH2F("hdP1Z","hdP1Z",10,-250,250,100,-1.05,1.05);
862  TH2F *hdP1ZNoCor=new TH2F("hdP1ZNoCor","hdP1ZNoCor",10,-250,250,100,-1.05,1.05);
863  chainCosmic->Draw("(dP1-corrP1)/sqrt(2.):x02>>hdP1Z",cutAll+cutRun+cutS+cutN120,"");
864  chainCosmic->Draw("(dP1-0)/sqrt(2.):x02>>hdP1ZNoCor",cutAll+cutRun+cutS+cutN120,"");
865  TH2F * hsP1Z = new TH2F("hsP1Z","hsP1Z",10,-250,250,200,0.0,1);
866  chainCosmic->Draw("(sP1)/sqrt(2.):x02>>hsP1Z",cutAll+cutRun+cutS+cutN120,"");
867  TH1 * hsP1Z_2 = hsP1Z->ProfileX();
868 
869  hdP1Z->FitSlicesY();
870  hdP1ZNoCor->FitSlicesY();
871  hdP1Z_2->SetMinimum(0);
872  hdP1Z_2->SetXTitle("Z position (cm)");
873  hdP1Z_2->SetYTitle("#sigma_{z} (cm)");
874  hdP1Z_2->SetMarkerStyle(kmimarkers[0]);
875  hsP1Z_2->SetMarkerStyle(kmimarkers[2]);
876  hdP1ZNoCor_2->SetMarkerStyle(kmimarkers[1]);
877 
878  hdP1ZNoCor_2->SetMinimum(0);
879  hdP1Z_2->Draw("");
880  hdP1ZNoCor_2->Draw("same");
881  hsP1Z_2->Draw("same");
882 
883  gPad->SaveAs("picPerformance/SigmaP1_z.gif");
884  gPad->SaveAs("picPerformance/SigmaP1_z.eps");
885  gPad->SaveAs("picPerformance/SigmaP1_z.root");
886  //
887  TH2F * hdPP1Z = new TH2F("hdPP1Z","hdPP1Z",8,-200,200,50,-5.05,5.05);
888  TH2F * hncdPP1Z = new TH2F("hncdPP1Z","hncdPP1Z",8,-200,200,50,-5.05,5.05);
889  chainCosmic->Draw("(dP1-corrP1)/sP1:x02>>hdPP1Z",cutAll+cutRun+cutS+cutN120,"");
890  chainCosmic->Draw("(dP1-0)/sP1:x02>>hncdPP1Z",cutAll+cutRun+cutS+cutN120,"");
891  hdPP1Z->FitSlicesY();
892  hncdPP1Z->FitSlicesY();
893  hdPP1Z_2->SetMarkerStyle(kmimarkers[0]);
894  hncdPP1Z_2->SetMarkerStyle(kmimarkers[1]);
895  hdPP1Z_2->SetMinimum(0);
896  hncdPP1Z_2->SetMinimum(0);
897  hncdPP1Z_2->SetXTitle("Z position (cm)");
898  hncdPP1Z_2->SetYTitle("#sigma_{z} (Unit) ");
899  hncdPP1Z_2->Draw("");
900  hdPP1Z_2->Draw();
901  gPad->SaveAs("picPerformance/PullP1_z.gif");
902  gPad->SaveAs("picPerformance/PullP1_z.eps");
903  gPad->SaveAs("picPerformance/PullP1_z.root");
904 }
905 
906 
907 void P2resolZ(){
908  //
909  //
910  //
911  TH2F * hdP2Z = new TH2F("hdP2Z","hdP2Z",10,-250,250,50,-20.0,20.0);
912  chainCosmic->Draw("1000*(dP2-corrP2)/sqrt(2.):x02>>hdP2Z",cutAll+cutRun+cutS+cutN120,"");
913  hdP2Z->FitSlicesY();
914  hdP2Z_2->SetXTitle("Z position (cm)");
915  hdP2Z_2->SetYTitle("#sigma_{#phi} (mrad)");
916  hdP2Z_2->Draw();
917  gPad->SaveAs("picPerformance/SigmaP2_z.gif");
918  gPad->SaveAs("picPerformance/SigmaP2_z.eps");
919  gPad->SaveAs("picPerformance/SigmaP2_z.root");
920 
921  //
922  TH2F * hdPP2Z = new TH2F("hdPP2Z","hdPP2Z",8,-200,200,50,-5.05,5.05);
923  chainCosmic->Draw("(dP2-corrP2)/sP2:x02>>hdPP2Z",cutAll+cutRun+cutS+cutN120,"");
924  hdPP2Z->FitSlicesY();
925  hdPP2Z_2->SetXTitle("Z position (cm)");
926  hdPP2Z_2->SetYTitle("#sigma_{#Phi} (Unit) ");
927  hdPP2Z_2->Draw();
928  gPad->SaveAs("picPerformance/PullP2_z.gif");
929  gPad->SaveAs("picPerformance/PullP2_z.eps");
930  gPad->SaveAs("picPerformance/PullP2_z.root");
931 
932 }
933 
934 void P3resolZ(){
935  //
936  //
937  //
938  TH2F * hdP3Z= new TH2F("hdP3Z","hdP3Z",10,-250,250,50,-5,5);
939  chainCosmic->Draw("1000*(dP3-corrP3)/sqrt(2.):x02>>hdP3Z",cutAll+cutRun+cutS+cutN120,"");
940  hdP3Z->FitSlicesY();
941  hdP3Z_2->SetMinimum(0);
942  hdP3Z_2->SetXTitle("Z position (cm)");
943  hdP3Z_2->SetYTitle("#sigma_{#Theta} (mrad)");
944  hdP3Z_2->Draw();
945  gPad->SaveAs("picPerformance/SigmaP3_z.gif");
946  gPad->SaveAs("picPerformance/SigmaP3_z.eps");
947  gPad->SaveAs("picPerformance/SigmaP3_z.root");
948  //
949  TH2F * hdPP3Z= new TH2F("hdPP3Z","hdPP3Z",8,-200,200,50,-5.05,5.05);
950  chainCosmic->Draw("(dP3-corrP3)/sP3:x02>>hdPP3Z",cutAll+cutRun+cutS+cutN120,"");
951  hdPP3Z->FitSlicesY();
952  hdPP3Z->SetMinimum(0);
953  hdPP3Z_2->SetXTitle("Z position (cm)");
954  hdPP3Z_2->SetYTitle("#sigma_{#Theta} (Unit) ");
955  hdPP3Z_2->Draw();
956  //
957  gPad->SaveAs("picPerformance/PullP3_z.gif");
958  gPad->SaveAs("picPerformance/PullP3_z.eps");
959  gPad->SaveAs("picPerformance/PullP3_z.root");
960 }
961 
962 
963 
964 void P4resolZ(){
965  //
966  //
967  //
968  TH2F *hdP4Z = new TH2F("hdP4Z","hdP4Z",10,-250,250,100,-0.05,0.05);
969  TH2F *hdP4ZNoCor=new TH2F("hdP4ZNoCor","hdP4ZNoCor",10,-250,250,100,-0.05,0.05);
970  chainCosmic->Draw("(dP4-corrP4)/sqrt(2.):x02>>hdP4Z",cutAll+cutRun+cutS+cutN120,"");
971  chainCosmic->Draw("(dP4-0)/sqrt(2.):x02>>hdP4ZNoCor",cutAll+cutRun+cutS+cutN120,"");
972  hdP4Z->FitSlicesY();
973  hdP4ZNoCor->FitSlicesY();
974  hdP4Z_2->SetMinimum(0);
975  hdP4Z_2->SetXTitle("Z position (cm)");
976  hdP4Z_2->SetYTitle("#sigma_{1/pt} (1/GeV)");
977  hdP4Z_2->SetMarkerStyle(kmimarkers[0]);
978  hdP4ZNoCor_2->SetMarkerStyle(kmimarkers[1]);
979  hdP4Z_2->Draw();
980  //hdP4ZNoCor_2->Draw("same");
981  gPad->SaveAs("picPerformance/SigmaP4_z.gif");
982  gPad->SaveAs("picPerformance/SigmaP4_z.eps");
983  gPad->SaveAs("picPerformance/SigmaP4_z.root");
984  //
985  TH2F * hdPP4Z = new TH2F("hdPP4Z","hdPP4Z",8,-200,200,50,-5.05,5.05);
986  TH2F * hncdPP4Z = new TH2F("hncdPP4Z","hncdPP4Z",8,-200,200,50,-5.05,5.05);
987  chainCosmic->Draw("(dP4-corrP4)/sP4:x02>>hdPP4Z",cutAll+cutRun+cutS+cutN120,"");
988  chainCosmic->Draw("(dP4-0)/sP4:x02>>hncdPP4Z",cutAll+cutRun+cutS+cutN120,"");
989  hdPP4Z->FitSlicesY();
990  hncdPP4Z->FitSlicesY();
991  hdPP4Z_2->SetMarkerStyle(kmimarkers[0]);
992  hncdPP4Z_2->SetMarkerStyle(kmimarkers[1]);
993  hdPP4Z_2->SetMinimum(0);
994  hdPP4Z_2->SetXTitle("Z position (cm)");
995  hdPP4Z_2->SetYTitle("#sigma_{1/pt} (Unit) ");
996  hdPP4Z_2->Draw();
997  //hncdPP4Z_2->Draw("same");
998  gPad->SaveAs("picPerformance/PullP4_z.gif");
999  gPad->SaveAs("picPerformance/PullP4_z.eps");
1000  gPad->SaveAs("picPerformance/PullP4_z.root");
1001 
1002 }
1003 
1004 */
TCut cutN130("cutN120","min(Orig0.fTPCncls,Orig1.fTPCncls)+abs(Tr1.fP[4]*20)>130")
void DrawZPull()
TString axisYPPm[5]
Int_t kmimarkers[10]
TString axisYPP[5]
void Draw1PtPull()
TCut cutDiff[6]
#define TObjArray
void MakeGeomCuts()
TH2F * histoPP1Pt[5]
void DrawZ()
TH1F * hmDP1Pt[5]
TCut cutPull[6]
TH1F * hmSP1Pt[5]
Bool_t bUseCorrection
TCut cutN120("cutN120","min(Orig0.fTPCncls,Orig1.fTPCncls)+abs(Tr1.fP[4]*10)>120")
TCut cutN("cutN","min(Orig0.fTPCncls,Orig1.fTPCncls)>80")
TChain * chainCosmic
Float_t scale[5]
TString dP[5]
TH2F * histoSPZ[5]
TH1F * hsSP1Pt[5]
TObjArray * array
Definition: AnalyzeLaser.C:12
TH1F * hsDP1Pt[5]
void MakeCutsParam()
TH1F * hsPPZ[5]
TH2F * histoDP1Pt[5]
TCut cutGeomTPC
void MakeCuts()
TH1F * hmPP1Pt[5]
TCut cutCustom
Float_t range[5]
TH1F * hmPPZ[5]
void Make1PtPlot()
AliTPCcalibV0 v0
TCut cutAll
Int_t kmicolors[10]
void Draw1Pt()
TH1F * hsPP1Pt[5]
TH1F * hmSPZ[5]
TH1F * hsDPZ[5]
TString sP[5]
TH2F * histoDPZ[5]
TString axisYDPm[5]
TH1F * hsSPZ[5]
TH2F * histoPPZ[5]
TCut cutRun("run<620600")
TH1F * hmDPZ[5]
TString axisYDP[5]
TH2F * histoSP1Pt[5]
TCut cut1Pt
TCut cutS("cutS","!crossI&&!crossO")
void MakeZPlot()
void MakeAlias()
TString pP[5]