Fork me on GitHub

source: svn/trunk/paper/sourceCode/performances_speed.C@ 338

Last change on this file since 338 was 207, checked in by Xavier Rouby, 16 years ago

performance plots

File size: 3.9 KB
RevLine 
[207]1{
2//=========Macro generated from canvas: c1/c1
3//========= (Mon Jan 26 21:40:59 2009) by ROOT version5.18/00
4 TCanvas *c1 = new TCanvas("c1", "c1",4,27,600,600);
5 gStyle->SetOptStat(0);
6 c1->Range(-5.097561,-80.25091,55.26829,668.5915);
7 c1->SetFillColor(0);
8 c1->SetBorderMode(0);
9 c1->SetBorderSize(2);
10 c1->SetTickx();
11 c1->SetTicky();
12 c1->SetLeftMargin(0.13);
13 c1->SetRightMargin(0.05);
14 c1->SetTopMargin(0.05);
15 c1->SetBottomMargin(0.13);
16 c1->SetFrameFillStyle(0);
17 c1->SetFrameBorderMode(0);
18 c1->SetFrameFillStyle(0);
19 c1->SetFrameBorderMode(0);
20
21 TMultiGraph *multigraph = new TMultiGraph();
22 multigraph->SetName("");
23 multigraph->SetTitle("");
24
25 TGraph *graph = new TGraph(6);
26 graph->SetName("Graph");
27 graph->SetTitle("Graph");
28 graph->SetFillColor(1);
29 graph->SetMarkerStyle(20);
30 graph->SetPoint(0,5,60.44);
31 graph->SetPoint(1,10,124.74);
32 graph->SetPoint(2,20,239.38);
33 graph->SetPoint(3,30,376.08);
34 graph->SetPoint(4,40,499.34);
35 graph->SetPoint(5,50,603.238);
36
37 TF1 *fit = new TF1("fit","[0]+[1]*x",5,50);
38 fit->SetFillColor(19);
39 fit->SetFillStyle(0);
40 fit->SetMarkerStyle(20);
41 fit->SetLineWidth(1);
42 fit->SetLineStyle(2);
43 fit->SetChisquare(279.4312);
44 fit->GetXaxis()->SetLabelFont(42);
45 fit->GetXaxis()->SetLabelOffset(0.007);
46 fit->GetXaxis()->SetTitleSize(0.05);
47 fit->GetXaxis()->SetTitleOffset(0.9);
48 fit->GetXaxis()->SetTitleFont(42);
49 fit->GetYaxis()->SetLabelFont(42);
50 fit->GetYaxis()->SetLabelOffset(0.007);
51 fit->GetYaxis()->SetTitleSize(0.05);
52 fit->GetYaxis()->SetTitleOffset(1.05);
53 fit->GetYaxis()->SetTitleFont(42);
54 fit->SetParameter(0,1.450848);
55 fit->SetParError(0,7.509767);
56 fit->SetParLimits(0,0,0);
57 fit->SetParameter(1,12.22266);
58 fit->SetParError(1,0.2474776);
59 fit->SetParLimits(1,0,0);
60 graph->GetListOfFunctions()->Add(fit);
61 multigraph->Add(graph,"P");
62
63 graph = new TGraph(6);
64 graph->SetName("Graph");
65 graph->SetTitle("Graph");
66 graph->SetFillColor(1);
67 graph->SetMarkerStyle(24);
68 graph->SetPoint(0,5,45.01);
69 graph->SetPoint(1,10,93.25);
70 graph->SetPoint(2,20,177.34);
71 graph->SetPoint(3,30,280.6);
72 graph->SetPoint(4,40,369.97);
73 graph->SetPoint(5,50,444.52);
74 multigraph->Add(graph,"P");
75 multigraph->Draw("A");
76 multigraph->GetXaxis()->SetTitle("N (kevts)");
77 multigraph->GetXaxis()->SetLabelFont(42);
78 multigraph->GetXaxis()->SetLabelOffset(0.007);
79 multigraph->GetXaxis()->SetTitleSize(0.05);
80 multigraph->GetXaxis()->SetTitleOffset(0.9);
81 multigraph->GetXaxis()->SetTitleFont(42);
82 multigraph->GetYaxis()->SetTitle("CPU time(s)");
83 multigraph->GetYaxis()->SetLabelFont(42);
84 multigraph->GetYaxis()->SetLabelOffset(0.007);
85 multigraph->GetYaxis()->SetTitleSize(0.05);
86 multigraph->GetYaxis()->SetTitleOffset(1.21);
87 multigraph->GetYaxis()->SetTitleFont(42);
88
89 TPaveText *pt = new TPaveText(5,472,35,600,"r");
90 pt->SetBorderSize(0);
91 pt->SetFillColor(19);
92 pt->SetFillStyle(0);
93 pt->SetTextAlign(12);
94 pt->SetTextFont(42);
95 TText *text = pt->AddText("Delphes performances");
96 text = pt->AddText("1 kevts in 12.22 s");
97 text = pt->AddText("pp #rightarrow t #bar{t} X");
98 pt->Draw();
99
100 TLegend *leg = new TLegend(0.6,0.2,0.9,0.4,NULL,"brNDC");
101 leg->SetBorderSize(0);
102 leg->SetLineColor(1);
103 leg->SetLineStyle(1);
104 leg->SetLineWidth(1);
105 leg->SetFillColor(19);
106 leg->SetFillStyle(0);
107 TLegendEntry *entry=leg->AddEntry("Graph","General","p");
108 entry->SetLineColor(1);
109 entry->SetLineStyle(1);
110 entry->SetLineWidth(1);
111 entry->SetMarkerColor(1);
112 entry->SetMarkerStyle(20);
113 entry->SetMarkerSize(1);
114 entry=leg->AddEntry("Graph","Event loop only","p");
115 entry->SetLineColor(1);
116 entry->SetLineStyle(1);
117 entry->SetLineWidth(1);
118 entry->SetMarkerColor(1);
119 entry->SetMarkerStyle(24);
120 entry->SetMarkerSize(1);
121 leg->Draw();
122 c1->Modified();
123 c1->cd();
124 c1->SetSelected(c1);
125}
Note: See TracBrowser for help on using the repository browser.