FairRoot/PandaRoot
run_beautiful_ana_result_histograms.C
Go to the documentation of this file.
1 void ctauhistogramm(TH1F* histo, TString savefile)
2 {
3  histo->SetLineColor(kBlack);
4  histo->Draw("");
5  TF1 *fExpo = new TF1("fExpo","expo",0,100);
6  fExpo->SetLineColor(kRed);
7  fExpo->SetLineWidth(2);
8  histo->Fit("fExpo","RQ");
9  //printf("Slope %f", fExpo->GetParameter("Slope"));
10  fExpo->GetParameter("Slope");
11 
12 
13 
14  std::cout << std::setw(15) << ::std::setprecision( 4 )<< 1/fExpo->GetParameter("Slope") ;
15  std::cout << std::setw(15)<< ::std::setprecision( 4 ) << fExpo->GetParError(fExpo->GetParNumber("Slope"));
16  std::cout << std::setw(15)<< ::std::setprecision( 4 ) << fExpo->GetChisquare();
17  std::cout << std::setw(5)<< fExpo->GetNDF() ;
18  std::cout << std::setw(15)<< "="<<fExpo->GetChisquare()/fExpo->GetNDF() ;
19  std::cout << std::setw(15)<< ::std::setprecision( 4 ) << histo->GetNbinsX() << std::endl;
20 
21  TPaveText *pt = new TPaveText(44.5781,59.32019,104.1472,206.744,"");
22  pt->UseCurrentStyle();
23  pt->SetFillColor(kWhite);
24  pt->SetBorderSize(1);
25  TString myString;
26 
27  std::stringstream virtualString;
28  virtualString<< "c#tau = ";
29  virtualString<< TMath::Abs(1/fExpo->GetParameter("Slope"));
30  virtualString<< "#pm";
31 
32  virtualString<<TMath::Abs(1/fExpo->GetParameter("Slope"))*TMath::Abs(1/fExpo->GetParameter("Slope"))*fExpo->GetParError(fExpo->GetParNumber("Slope"));
33  virtualString<< " cm";
34  TString bTagisGreaterThanSTRING = virtualString.str();
35 
36  pt->AddText(bTagisGreaterThanSTRING.Data() );
37 
38  pt->Draw();
39 
40  gPad->SetLogy();
41  //gPad->Print(savefile,"pdf"); // nicht fuer powerpoint geeignet
42  // gPad->Print(savefile,"eps");
43  // gPad->Print("result_pictures/fMeanLife.gif","gif"); // ganz gut, aber keine Vektorgrafik
44  // gPad->Print("result_pictures/fMeanLife.png","png"); // ganz gut, aber keine Vektorgrafik
45  // gPad->Print("result_pictures/fMeanLife.jpg","jpg"); // schlechte qualitaet
46 }
47 
48 void DrawMVD()
49 {
50  Int_t linewidth=3;
51 
52  TLine *Disk1 = new TLine(2,0,2,3.656);
53  Disk1->SetLineWidth(linewidth);
54  Disk1->Draw();
55 
56  TLine *Disk2 = new TLine(4,0,4,3.656);
57  Disk2->SetLineWidth(linewidth);
58  Disk2->Draw();
59 
60  TLine *Disk3 = new TLine(7,0,7,7.393);
61  Disk3->SetLineWidth(linewidth);
62  Disk3->Draw();
63 
64  TLine *Disk4 = new TLine(10,0,10,7.393);
65  Disk4->SetLineWidth(linewidth);
66  Disk4->Draw();
67 
68  TLine *Disk5 = new TLine(16,0,16,13.115);
69  Disk5->SetLineWidth(linewidth);
70  Disk5->Draw();
71 
72  TLine *Disk6 = new TLine(23,0,23,13.115);
73  Disk6->SetLineWidth(linewidth);
74  Disk6->Draw();
75 
76  TLine *Barrel1 = new TLine(0,2.5,0.98,2.5);
77  Barrel1->SetLineWidth(linewidth);
78  Barrel1->Draw();
79 
80  TLine *Barrel2 = new TLine(0,5,5.78,5);
81  Barrel2->SetLineWidth(linewidth);
82  Barrel2->Draw();
83 
84  TLine *Barrel3 = new TLine(0,9.5,13.9,9.5);
85  Barrel3->SetLineWidth(linewidth);
86  Barrel3->Draw();
87 
88  TLine *Barrel4 = new TLine(0,13.5,13.9,13.5);
89  Barrel4->SetLineWidth(linewidth);
90  Barrel4->Draw();
91 }
92 
94 {
95  Int_t linewidth=3;
96 
97  TLine *LambdaDisk1 = new TLine(40,0,40,13.115);
98  LambdaDisk1->SetLineWidth(linewidth);
99  LambdaDisk1->Draw();
100 
101  TLine *LambdaDisk2 = new TLine(60,0,60,13.115);
102  LambdaDisk2->SetLineWidth(linewidth);
103  LambdaDisk2->Draw();
104 
105 }
106 
108 {
109  Int_t linewidth=3;
110 
111  TLine *LambdaDisk1 = new TLine(37,0,37,13.115);
112  LambdaDisk1->SetLineWidth(linewidth);
113  LambdaDisk1->Draw();
114 
115  TLine *LambdaDisk2 = new TLine(43,0,43,13.115);
116  LambdaDisk2->SetLineWidth(linewidth);
117  LambdaDisk2->Draw();
118 
119 }
120 
122 {
123  Int_t linewidth=3;
124 
125  TLine *LambdaDisk1 = new TLine(57,0,57,13.115);
126  LambdaDisk1->SetLineWidth(linewidth);
127  LambdaDisk1->Draw();
128 
129  TLine *LambdaDisk2 = new TLine(63,0,63,13.115);
130  LambdaDisk2->SetLineWidth(linewidth);
131  LambdaDisk2->Draw();
132 
133 }
134 
136 {
137  Int_t linewidth=3;
138 
139  TLine *LambdaDisk1 = new TLine(77,0,77,13.115);
140  LambdaDisk1->SetLineWidth(linewidth);
141  LambdaDisk1->Draw();
142 
143  TLine *LambdaDisk2 = new TLine(83,0,83,13.115);
144  LambdaDisk2->SetLineWidth(linewidth);
145  LambdaDisk2->Draw();
146 
147 }
148 
150  // Input file (MC events)
151 
152  gROOT->Reset();
153 
154 
155  // ---- Load libraries -------------------------------------------------
156  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
157  rootlogon();
158  gROOT->LoadMacro("$VMCWORKDIR/macro/mvd/Tools.C");
159  gROOT->SetStyle("Plain");
160  gStyle->SetOptStat("e");
161  gStyle->SetOptFit(1111);
162  gStyle->SetPalette(1);
163 
164  // ----- Timer --------------------------------------------------------
165  TStopwatch timer;
166  timer.Start();
167  // ------------------------------------------------------------------------
168 
170 
171  std::cout << "creator.GetCustomFileName('ana')" << creator.GetCustomFileName("ana") << std::endl;
172  std::string inFile = creator.GetCustomFileName("ana");
173 
174  TFile* f = new TFile(inFile.c_str());
175 
176  //===========
177 
178  TCanvas* canvas = new TCanvas("canvas", "Results");
179 
180  //===========
181 
182  // canvas->cd(1);
183 // TH1I* fTracksPerEventVer1 =(TH1I*)f->Get("fTracksPerEventVer1");
184 // fTracksPerEventVer1->SetMaximum(6500);
185 // fTracksPerEventVer1->Draw("");
186 // gPad->Print("result_pictures/fTracksPerEventVer1.pdf","pdf");
187 // gPad->Print("result_pictures/fTracksPerEventVer1.png","png");
188 //
189 // TH1I* fTracksPerEventVer2 =(TH1I*)f->Get("fTracksPerEventVer2");
190 // fTracksPerEventVer2->Draw("");
191 // fTracksPerEventVer2->SetMaximum(6500);
192 // fTracksPerEventVer2->Draw("");
193 // gPad->Print("result_pictures/fTracksPerEventVer2.pdf","pdf");
194 // gPad->Print("result_pictures/fTracksPerEventVer2.png","png");
195 //
196 // TH1I* fTracksPerEventWithLambdaVer1 =(TH1I*)f->Get("fTracksPerEventWithLambdaVer1");
197 // fTracksPerEventWithLambdaVer1->SetMaximum(6500);
198 // fTracksPerEventWithLambdaVer1->Draw("");
199 // gPad->Print("result_pictures/fTracksPerEventWithLambdaVer1.pdf","pdf");
200 // gPad->Print("result_pictures/fTracksPerEventWithLambdaVer1.png","png");
201 //
202 // TH1I* fTracksPerEventWithLambdaVer2 =(TH1I*)f->Get("fTracksPerEventWithLambdaVer2");
203 // fTracksPerEventWithLambdaVer2->Draw("");
204 // fTracksPerEventWithLambdaVer2->SetMaximum(6500);
205 // fTracksPerEventWithLambdaVer2->Draw("");
206 // gPad->Print("result_pictures/fTracksPerEventWithLambdaVer2.pdf","pdf");
207 // gPad->Print("result_pictures/fTracksPerEventWithLambdaVer2.png","png");
208 
209  //===========
210 
211 // THStack* fSHAntiproton =(THStack*)f->Get("fSHAntiproton");
212 // fSHAntiproton->Draw("");
213 // gPad->BuildLegend();
214 // gPad->Print("result_pictures/fSHAntiproton.pdf","pdf");
215 
216  //===========
217 
218 // THStack* fSHPionplus =(THStack*)f->Get("fSHPionplus");
219 // fSHPionplus->Draw("");
220 // gPad->BuildLegend();
221 // gPad->Print("result_pictures/fSHPionplus.pdf","pdf");
222 
223  //===========
224 
225 // THStack* fSHPionminus =(THStack*)f->Get("fSHPionminus");
226 // fSHPionminus->Draw("");
227 // gPad->BuildLegend();
228 // gPad->Print("result_pictures/fSHPionminus.pdf","pdf");
229 
230  //===========
231 
232 // THStack* fSHProton =(THStack*)f->Get("fSHProton");
233 // fSHProton->Draw("");
234 // gPad->BuildLegend();
235 // gPad->Print("result_pictures/fSHProton.pdf","pdf");
236 
237  TH2F* fPositionDecayVertexLambdaLambdaBar2D = (TH2F*)f->Get("fPositionDecayVertexLambdaLambdaBar2D");
238 
239 // TH1I* fMVDPointsPerTrackProton = (TH1I*)f->Get("fMVDPointsPerTrackProton");
240 // TH1I* fMVDPointsPerTrackProtonWithLambda = (TH1I*)f->Get("fMVDPointsPerTrackProtonWithLambda");
241 //
242 // TH1I* fMVDPointsPerTrackAntiproton = (TH1I*)f->Get("fMVDPointsPerTrackAntiproton");
243 // TH1I* fMVDPointsPerTrackAntiprotonWithLambda = (TH1I*)f->Get("fMVDPointsPerTrackAntiprotonWithLambda");
244 //
245 // TH1I* fMVDPointsPerTrackPionplus = (TH1I*)f->Get("fMVDPointsPerTrackPionplus");
246 // TH1I* fMVDPointsPerTrackPionplusWithLambda = (TH1I*)f->Get("fMVDPointsPerTrackPionplusWithLambda");
247 //
248 // TH1I* fMVDPointsPerTrackPionminus = (TH1I*)f->Get("fMVDPointsPerTrackPionminus");
249 // TH1I* fMVDPointsPerTrackPionminusWithLambda = (TH1I*)f->Get("fMVDPointsPerTrackPionminusWithLambda");
250 //
251  TH1I* fMVDPointsPerTrackTotal = (TH1I*)f->Get("fMVDPointsPerTrackTotal");
252  TH1I* fMVDPointsPerTrackTotalWithLambda = (TH1I*)f->Get("fMVDPointsPerTrackTotalWithLambda");
253 //
254 // TH1I* fTotalPointsPerTrackAllWithLambda = (TH1I*)f->Get("fTotalPointsPerTrackAllWithLambda");
255 // TH1I* fTotalPointsPerTrackAll = (TH1I*)f->Get("fTotalPointsPerTrackAll");
256 //
257 // fMVDPointsPerTrackProton->SetMaximum(3000);
258 // fMVDPointsPerTrackProton->Draw();
259 // gPad->Print("result_pictures/fMVDPointsPerTrackProton.pdf","pdf");
260 // gPad->Print("result_pictures/fMVDPointsPerTrackProton.png","png");
261 //
262 // fMVDPointsPerTrackProtonWithLambda->SetMaximum(3000);
263 // fMVDPointsPerTrackProtonWithLambda->Draw();
264 // gPad->Print("result_pictures/fMVDPointsPerTrackProtonWithLambda.pdf","pdf");
265 // gPad->Print("result_pictures/fMVDPointsPerTrackProtonWithLambda.png","png");
266 //
267 // fMVDPointsPerTrackAntiproton->SetMaximum(3000);
268 // fMVDPointsPerTrackAntiproton->Draw();
269 // gPad->Print("result_pictures/fMVDPointsPerTrackAntiproton.pdf","pdf");
270 // gPad->Print("result_pictures/fMVDPointsPerTrackAntiproton.png","png");
271 //
272 // fMVDPointsPerTrackAntiprotonWithLambda->SetMaximum(3000);
273 // fMVDPointsPerTrackAntiprotonWithLambda->Draw();
274 // gPad->Print("result_pictures/fMVDPointsPerTrackAntiprotonWithLambda.pdf","pdf");
275 // gPad->Print("result_pictures/fMVDPointsPerTrackAntiprotonWithLambda.png","png");
276 //
277 // fMVDPointsPerTrackPionplus->SetMaximum(3000);
278 // fMVDPointsPerTrackPionplus->Draw();
279 // gPad->Print("result_pictures/fMVDPointsPerTrackPionplus.pdf","pdf");
280 // gPad->Print("result_pictures/fMVDPointsPerTrackPionplus.png","png");
281 //
282 // fMVDPointsPerTrackPionplusWithLambda->SetMaximum(3000);
283 // fMVDPointsPerTrackPionplusWithLambda->Draw();
284 // gPad->Print("result_pictures/fMVDPointsPerTrackPionplusWithLambda.pdf","pdf");
285 // gPad->Print("result_pictures/fMVDPointsPerTrackPionplusWithLambda.png","png");
286 //
287 // fMVDPointsPerTrackPionminus->SetMaximum(3000);
288 // fMVDPointsPerTrackPionminus->Draw();
289 // gPad->Print("result_pictures/fMVDPointsPerTrackPionminus.pdf","pdf");
290 // gPad->Print("result_pictures/fMVDPointsPerTrackPionminus.png","png");
291 //
292 // fMVDPointsPerTrackPionminusWithLambda->SetMaximum(3000);
293 // fMVDPointsPerTrackPionminusWithLambda->Draw();
294 // gPad->Print("result_pictures/fMVDPointsPerTrackPionminusWithLambda.pdf","pdf");
295 // gPad->Print("result_pictures/fMVDPointsPerTrackPionminusWithLambda.png","png");
296 //
297  // fMVDPointsPerTrackTotal->SetMaximum(12000);
298 
299 
300  TH1F* fDecayLength= (TH1F*)f->Get("fMeanLifeLambdaCMS");
301  TH1F* blubb = fDecayLength->Rebin(2,"blubb");
302  TH1F* blubb1 = fDecayLength->Rebin(2,"blubb1");
303  TH1F* blubb2 = blubb1->Rebin(2,"blubb2");
304  TH1F* blubb3 = blubb2->Rebin(2,"blubb3");
305  TH1F* blubb4 = blubb3->Rebin(2,"blubb4");
306  TH1F* blubb5 = blubb4->Rebin(2,"blubb5");
307  TH1F* blubb6 = blubb5->Rebin(2,"blubb6");
308  TH1F* blubb7 = blubb6->Rebin(2,"blubb7");
309  TH1F* blubb8 = blubb7->Rebin(2,"blubb8");
310 
311  std::cout << std::setw(15);
312  std::cout << "Slope ";
313  std::cout << std::setw(15);
314  std::cout << "Error ";
315  std::cout << std::setw(15);
316  std::cout<< "Chi quadrat/NDG ";
317  std::cout << std::setw(15);
318  std::cout<< "Chi quadrat/NDG ";
319  std::cout << std::setw(15);
320  std::cout << "NBins " << std::endl;
321 
322  ctauhistogramm(fDecayLength, "result_pictures/LambdaCMS.eps");
323 
324  ctauhistogramm(blubb, "result_pictures/LambdaCMSblubb.eps");
325 
326  ctauhistogramm(blubb1, "result_pictures/LambdaCMSblubb1.eps");
327 
328  ctauhistogramm(blubb2, "result_pictures/LambdaCMSblubb2.eps");
329 
330  ctauhistogramm(blubb3, "result_pictures/LambdaCMSblubb3.eps");
331 
332  ctauhistogramm(blubb4, "result_pictures/LambdaCMSblubb4.eps");
333 
334  ctauhistogramm(blubb5, "result_pictures/LambdaCMSblubb5.eps");
335 
336  ctauhistogramm(blubb6, "result_pictures/LambdaCMSblubb6.eps");
337 
338  ctauhistogramm(blubb7, "result_pictures/LambdaCMSblubb7.eps");
339 
340  ctauhistogramm(blubb8, "result_pictures/LambdaCMSblubb8.eps");
341 
342  // fDecayLength= (TH1F*)f->Get("fMeanLifeLambdaBarCMS");
343  //ctauhistogramm(fDecayLength, "result_pictures/LambdaBarCMS.eps");
344 
345  //fDecayLength= (TH1F*)f->Get("fMeanLifeLambdaLAB");
346  //ctauhistogramm(fDecayLength, "result_pictures/LambdaLAB.eps");
347 
348  //fDecayLength= (TH1F*)f->Get("fMeanLifeLambdaBarLAB");
349  //ctauhistogramm(fDecayLength, "result_pictures/LambdaBarLAB.eps");
350 
351  gPad->SetLogy(0);
352  gPad->SetGrid();
353  gStyle->SetOptStat(110);
354  fMVDPointsPerTrackTotal->Draw();
355 
356  gPad->Print("result_pictures/fMVDPointsPerTrackTotal.pdf","pdf");
357  gPad->Print("result_pictures/fMVDPointsPerTrackTotal.eps","eps");
358 
359  gPad->SetLogy(0);
360  gPad->SetGrid();
361  gStyle->SetOptStat(110);
362  fMVDPointsPerTrackTotalWithLambda->Draw();
363  gPad->Print("result_pictures/fMVDPointsPerTrackTotalWithLambda.pdf","pdf");
364  gPad->Print("result_pictures/fMVDPointsPerTrackTotalWidthLambda.eps","eps");
365 
366  gStyle->SetOptStat(10);
367  fMVDPointsPerTrackTotal->GetXaxis()->SetRange(0,12);
368  fMVDPointsPerTrackTotal->SetLineColor(2);
369  fMVDPointsPerTrackTotal->SetLineWidth(2);
370  fMVDPointsPerTrackTotal->Draw();
371 
372  fMVDPointsPerTrackTotalWithLambda->Draw("SAME");
373  fMVDPointsPerTrackTotalWithLambda->SetLineWidth(2);
374 
375  gPad->SetGrid();
376 
377  TLegend* legend = gPad->BuildLegend(0.5204598,0.5529661,0.9897701,0.7627119);
378  legend->SetFillColor(0);
379 
380  fMVDPointsPerTrackTotal->SetTitle("#Hits/Track with and without #Lambda-Disks");
381 
382  gPad->Print("result_pictures/fMVDPointsPerTrackTotalcomparison.pdf","pdf");
383  gPad->Print("result_pictures/fMVDPointsPerTrackTotalcomparison.eps","eps");
384 
385  TCanvas* canvas3 = new TCanvas("canvas3", "Results", 900,400);
386 
387  gPad->SetLogy(0);
388  fPositionDecayVertexLambdaLambdaBar2D->Draw("colz");
389  DrawMVD();
391 
392  gPad->Print("result_pictures/PositionDecayVertexLambdaLambdabarPosition0.eps","eps");
393 
394  gPad->Clear();
395  fPositionDecayVertexLambdaLambdaBar2D->Draw("colz");
396  DrawMVD();
398  gPad->Print("result_pictures/PositionDecayVertexLambdaLambdabarPosition1.eps","eps");
399 
400  gPad->Clear();
401  fPositionDecayVertexLambdaLambdaBar2D->Draw("colz");
402  DrawMVD();
404  gPad->Print("result_pictures/PositionDecayVertexLambdaLambdabarPosition2.eps","eps");
405 
406  gPad->Clear();
407  fPositionDecayVertexLambdaLambdaBar2D->Draw("colz");
408  DrawMVD();
410  gPad->Print("result_pictures/PositionDecayVertexLambdaLambdabarPosition3.eps","eps");
411 
412 
413 
414 
415 
416 
417 
418 // fMVDPointsPerTrackTotalWithLambda->SetMaximum(12000);
419 // fMVDPointsPerTrackTotalWithLambda->Draw();
420 // gPad->Print("result_pictures/fMVDPointsPerTrackTotalWithLambda.pdf","pdf");
421 // gPad->Print("result_pictures/fMVDPointsPerTrackTotalWithLambda.png","png");
422 //
423 // fTotalPointsPerTrackAll->SetMaximum(3000);
424 // fTotalPointsPerTrackAll->Draw();
425 // gPad->Print("result_pictures/fTotalPointsPerTrackAll.pdf","pdf");
426 // gPad->Print("result_pictures/fTotalPointsPerTrackAll.png","png");
427 //
428 // fTotalPointsPerTrackAllWithLambda->SetMaximum(3000);
429 // fTotalPointsPerTrackAllWithLambda->Draw();
430 // gPad->Print("result_pictures/fTotalPointsPerTrackAllWithLambda.pdf","pdf");
431 // gPad->Print("result_pictures/fTotalPointsPerTrackAllWithLambda.png","png");
432 //
433 // //===========
434 // gStyle->SetOptStat("");
435 // //===========
436 //
437 //
438 // fMVDPointsPerTrackTotal->SetBarOffset(0.1);
439 // fMVDPointsPerTrackTotal->SetBarWidth(0.4);
440 // fMVDPointsPerTrackTotal->SetStats(0);
441 // fMVDPointsPerTrackTotal->Draw("bar");
442 //
443 // fMVDPointsPerTrackTotalWithLambda ->SetBarOffset(0.5);
444 // fMVDPointsPerTrackTotalWithLambda->SetBarWidth(0.4);
445 // fMVDPointsPerTrackTotal->SetStats(0);
446 // fMVDPointsPerTrackTotalWithLambda->Draw("same, bar");
447 //
448 // TLegend *LegendTotal = new TLegend(0.5043103,0.6779661,0.8850575,0.8771186,NULL,"brNDC");
449 // LegendTotal->AddEntry(fMVDPointsPerTrackTotal,"without #Lambda discs","f");
450 // LegendTotal->AddEntry(fMVDPointsPerTrackTotalWithLambda,"with #Lambda discs","f");
451 // LegendTotal->SetFillColor(kWhite);
452 // LegendTotal->Draw();
453 // fMVDPointsPerTrackTotal->SetTitle("# MVD hits per Track for all Particles");
454 // // TPaveStats *st = (TPaveStats*)fMVDPointsPerTrackAntiproton->FindObject("stats");
455 // // st->SetOptStats("");
456 //
457 //
458 // gPad->Print("result_pictures/fMVDPointsPerTrackTotalBoth.pdf","pdf");
459 // gPad->Print("result_pictures/fMVDPointsPerTrackTotalBoth.png","png");
460 //
461 // //===========
462 //
463 // fMVDPointsPerTrackProton->SetBarOffset(0.1);
464 // fMVDPointsPerTrackProton->SetBarWidth(0.4);
465 // fMVDPointsPerTrackProton->SetStats(0);
466 // fMVDPointsPerTrackProton->Draw("bar");
467 // // fMVDPointsPerTrackProton->SetStats(0);
468 //
469 // fMVDPointsPerTrackProtonWithLambda ->SetBarOffset(0.5);
470 // fMVDPointsPerTrackProtonWithLambda->SetBarWidth(0.4);
471 // fMVDPointsPerTrackProtonWithLambda->SetStats(0);
472 // fMVDPointsPerTrackProtonWithLambda->Draw("same, bar");
473 // // fMVDPointsPerTrackProtonWithLambda->SetStats(0);
474 //
475 // TLegend *LegendProton = new TLegend(0.5043103,0.6779661,0.8850575,0.8771186,NULL,"brNDC");
476 // LegendProton->AddEntry(fMVDPointsPerTrackProton,"without #Lambda discs","f");
477 // LegendProton->AddEntry(fMVDPointsPerTrackProtonWithLambda,"with #Lambda discs","f");
478 // LegendProton->SetFillColor(kWhite);
479 // LegendProton->Draw();
480 // fMVDPointsPerTrackProton->SetTitle("# MVD hits per Track for p");
481 // // TPaveStats *st = (TPaveStats*)fMVDPointsPerTrackProton->FindObject("stats");
482 // // st->SetOptStats("");
483 //
484 // gPad->Print("result_pictures/fMVDPointsPerTrackProtonBoth.pdf","pdf");
485 // gPad->Print("result_pictures/fMVDPointsPerTrackProtonBoth.png","png");
486 //
487 // //===========
488 //
489 // fMVDPointsPerTrackAntiproton->SetBarOffset(0.1);
490 // fMVDPointsPerTrackAntiproton->SetBarWidth(0.4);
491 // fMVDPointsPerTrackAntiproton->SetStats(0);
492 // fMVDPointsPerTrackAntiproton->Draw("bar");
493 //
494 // fMVDPointsPerTrackAntiprotonWithLambda ->SetBarOffset(0.5);
495 // fMVDPointsPerTrackAntiprotonWithLambda->SetBarWidth(0.4);
496 // fMVDPointsPerTrackAntiproton->SetStats(0);
497 // fMVDPointsPerTrackAntiprotonWithLambda->Draw("same, bar");
498 //
499 // TLegend *blubb = new TLegend(0.5043103,0.6779661,0.8850575,0.8771186,NULL,"brNDC");
500 // blubb->AddEntry(fMVDPointsPerTrackAntiproton,"without #Lambda discs","f");
501 // blubb->AddEntry(fMVDPointsPerTrackAntiprotonWithLambda,"with #Lambda discs","f");
502 // blubb->SetFillColor(kWhite);
503 // blubb->Draw();
504 // fMVDPointsPerTrackAntiproton->SetTitle("# MVD hits per Track for #bar{p}");
505 // // TPaveStats *st = (TPaveStats*)fMVDPointsPerTrackAntiproton->FindObject("stats");
506 // // st->SetOptStats("");
507 //
508 //
509 // gPad->Print("result_pictures/fMVDPointsPerTrackAntiprotonBoth.pdf","pdf");
510 // gPad->Print("result_pictures/fMVDPointsPerTrackAntiprotonBoth.png","png");
511 //
512 // //===========
513 //
514 // fMVDPointsPerTrackPionplus->SetBarOffset(0.1);
515 // fMVDPointsPerTrackPionplus->SetBarWidth(0.4);
516 // fMVDPointsPerTrackPionplus->SetStats(0);
517 // fMVDPointsPerTrackPionplus->Draw("bar");
518 //
519 // fMVDPointsPerTrackPionplusWithLambda->SetBarOffset(0.5);
520 // fMVDPointsPerTrackPionplusWithLambda->SetBarWidth(0.4);
521 // fMVDPointsPerTrackPionplus->SetStats(0);
522 // fMVDPointsPerTrackPionplusWithLambda->Draw("same, bar");
523 //
524 // TLegend *LegendPionplus = new TLegend(0.5043103,0.6779661,0.8850575,0.8771186,NULL,"brNDC");
525 // LegendPionplus->AddEntry(fMVDPointsPerTrackPionplus,"without #Lambda discs","f");
526 // LegendPionplus->AddEntry(fMVDPointsPerTrackPionplusWithLambda,"with #Lambda discs","f");
527 // LegendPionplus->SetFillColor(kWhite);
528 // LegendPionplus->Draw();
529 // fMVDPointsPerTrackPionplus->SetTitle("# MVD hits per Track for #pi^{+}");
530 //
531 // gPad->Print("result_pictures/fMVDPointsPerTrackPionplusBoth.pdf","pdf");
532 // gPad->Print("result_pictures/fMVDPointsPerTrackPionplusBoth.png","png");
533 //
534 // //===========
535 //
536 // fMVDPointsPerTrackPionminus->SetBarOffset(0.1);
537 // fMVDPointsPerTrackPionminus->SetBarWidth(0.4);
538 // fMVDPointsPerTrackPionminus->SetStats(0);
539 // fMVDPointsPerTrackPionminus->Draw("bar");
540 //
541 // fMVDPointsPerTrackPionminusWithLambda->SetBarOffset(0.5);
542 // fMVDPointsPerTrackPionminusWithLambda->SetBarWidth(0.4);
543 // fMVDPointsPerTrackPionminus->SetStats(0);
544 // fMVDPointsPerTrackPionminusWithLambda->Draw("same, bar");
545 //
546 // TLegend *LegendPionminus = new TLegend(0.5043103,0.6779661,0.8850575,0.8771186,NULL,"brNDC");
547 // LegendPionminus->AddEntry(fMVDPointsPerTrackAntiproton,"without #Lambda discs","f");
548 // LegendPionminus->AddEntry(fMVDPointsPerTrackAntiprotonWithLambda,"with #Lambda discs","f");
549 // LegendPionminus->SetFillColor(kWhite);
550 // LegendPionminus->Draw();
551 // fMVDPointsPerTrackPionminus->SetTitle("# MVD hits per Track for #pi^{-}");
552 //
553 // gPad->Print("result_pictures/fMVDPointsPerTrackPionminusBoth.pdf","pdf");
554 // gPad->Print("result_pictures/fMVDPointsPerTrackPionminusBoth.png","png");
555 
556  //===========
557 
558  // TCanvas* canvas2 = new TCanvas("canvas2", "Results", 1200,600);
559  // canvas2->Divide(4,2);
560 
561 // canvas2->cd(1);
562 // fMVDPointsPerTrackProton->Draw();
563 //
564 // canvas2->cd(5);
565 // fMVDPointsPerTrackProtonWithLambda->Draw();
566 //
567 // canvas2->cd(2);
568 // fMVDPointsPerTrackAntiproton->Draw();
569 //
570 // canvas2->cd(6);
571 // fMVDPointsPerTrackAntiprotonWithLambda->Draw();
572 //
573 // canvas2->cd(3);
574 // fMVDPointsPerTrackPionplus->Draw();
575 //
576 // canvas2->cd(7);
577 // fMVDPointsPerTrackPionplusWithLambda->Draw();
578 //
579 // canvas2->cd(4);
580 // fMVDPointsPerTrackPionminus->Draw();
581 //
582 // canvas2->cd(8);
583 // fMVDPointsPerTrackPionminusWithLambda->Draw();
584 
585  // ----- Finish -------------------------------------------------------
586 
587  timer.Stop();
588  Double_t rtime = timer.RealTime();
589  Double_t ctime = timer.CpuTime();
590  cout << endl << endl;
591  cout << "Macro finished succesfully." << endl;
592  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
593  cout << endl;
594  // ------------------------------------------------------------------------
595 
596 //exit();
597  return 0;
598 }
TString FileName
TString inFile
Definition: hit_dirc.C:8
TString pt(TString pts, TString exts="px py pz")
Definition: invexp.C:133
static T Abs(const T &x)
Definition: PndCAMath.h:39
void ctauhistogramm(TH1F *histo, TString savefile)
A simple class which adds the corresponding file extensions to a given base class.
Double_t
TStopwatch timer
Definition: hit_dirc.C:51
TFile * f
Definition: bump_analys.C:12
Double_t ctime
Definition: hit_dirc.C:114
PndMvdCreateDefaultApvMap * creator
void DrawLambdaDiskPosition0()
Double_t rtime
Definition: hit_dirc.C:113
int run_beautiful_ana_result_histograms(TString FileName="test")