updated plotting macros for ppr
[u/mrichter/AliRoot.git] / PWG4 / macros / electrons / plotHRF.C
1 {
2   //=========Macro generated from canvas: c3/cr
3   //=========  (Sat Oct 24 14:06:41 2009) by ROOT version5.23/01
4   TCanvas *c3 = new TCanvas("c3", "cr",0,0,1000,600);
5   gStyle->SetOptStat(0);
6   c3->Range(0,0,1,1);
7   c3->SetFillColor(0);
8   c3->SetBorderMode(0);
9   c3->SetBorderSize(2);
10   c3->SetFrameBorderMode(0);
11
12   TGraphBentErrors *grbe = new TGraphBentErrors(4);
13   grbe->SetName("Graph");
14   grbe->SetTitle("Graph");
15   grbe->SetFillColor(1);
16   grbe->SetMarkerColor(2);
17   grbe->SetMarkerStyle(21);
18   grbe->SetPoint(0,10,1163);
19   grbe->SetPointError(0,0,0,319.8685,242.6435,0,0,0,0);
20   grbe->SetPoint(1,20,1473);
21   grbe->SetPointError(1,0,0,355.2512,271.8543,0,0,0,0);
22   grbe->SetPoint(2,40,2172);
23   grbe->SetPointError(2,0,0,490.1327,376.0158,0,0,0,0);
24   grbe->SetPoint(3,80,3329);
25   grbe->SetPointError(3,0,0,800.9482,426.2069,0,0,0,0);
26
27   TH1 *Graph1 = new TH1F("Graph1","",100,3,87);
28   Graph1->SetMinimum(10);
29   Graph1->SetMaximum(5000);
30   Graph1->SetDirectory(0);
31   Graph1->SetStats(0);
32   Graph1->GetXaxis()->SetTitle("p_{T}^{track} (GeV/c)");
33   //  Graph1->GetXaxis()->SetTitleOffset(1.5);
34   Graph1->GetYaxis()->SetTitle("Rejection Power");
35   //Graph1->GetYaxis()->SetTitleOffset(1.5);
36   grbe->SetHistogram(Graph1);
37
38   grbe->Draw("apl");
39
40   grbe = new TGraphBentErrors(4);
41   grbe->SetName("Grapha");
42   grbe->SetTitle("Grapha");
43   grbe->SetFillColor(1);
44   grbe->SetMarkerColor(4);
45   grbe->SetMarkerStyle(21);
46   grbe->SetPoint(0,10,214);
47   grbe->SetPointError(0,0,0,23.04028,20.36199,0,0,0,0);
48   grbe->SetPoint(1,20,600);
49   grbe->SetPointError(1,0,0,86.54205,72.02112,0,0,0,0);
50   grbe->SetPoint(2,40,651);
51   grbe->SetPointError(2,0,0,77.49317,70.38893,0,0,0,0);
52   grbe->SetPoint(3,80,1705);
53   grbe->SetPointError(3,0,0,249.8343,221.2924,0,0,0,0);
54
55   TH1 *Graph2 = new TH1F("Graph2","Rejection Power",100,3,87);
56   Graph2->SetMinimum(17.42646);
57   Graph2->SetMaximum(2099.826);
58   Graph2->SetDirectory(0);
59   Graph2->SetStats(0);
60   Graph2->GetXaxis()->SetTitle("p_{T}^{track} (GeV/c)");
61   Graph2->GetYaxis()->SetTitle("Rejection Power");
62   grbe->SetHistogram(Graph2);
63
64   grbe->Draw("pl");
65
66   grbe = new TGraphBentErrors(2);
67   grbe->SetName("Graphb");
68   grbe->SetTitle("Graphb");
69   grbe->SetFillColor(1);
70   grbe->SetMarkerColor(6);
71   grbe->SetMarkerStyle(29);
72   grbe->SetMarkerSize(2);
73   grbe->SetPoint(0,40,686);
74   grbe->SetPointError(0,0,0,0,0,0,0,0,0);
75   grbe->SetPoint(1,80,1210);
76   grbe->SetPointError(1,0,0,0,0,0,0,0,0);
77
78   TH1 *Graph3 = new TH1F("Graph3","Rejection Power",100,36,84);
79   Graph3->SetMinimum(633.6);
80   Graph3->SetMaximum(1262.4);
81   Graph3->SetDirectory(0);
82   Graph3->SetStats(0);
83   Graph3->GetXaxis()->SetTitle("p_{T}^{track} (GeV/c)");
84   Graph3->GetYaxis()->SetTitle("Rejection Power");
85   grbe->SetHistogram(Graph3);
86
87   grbe->Draw("pl");
88
89   TLegend *leg = new TLegend(0.15,0.7,0.7,0.9,NULL,"brNDC");
90   leg->SetBorderSize(1);
91   leg->SetTextFont(62);
92   leg->SetTextSize(0.03);
93   leg->SetLineColor(1);
94   leg->SetLineStyle(1);
95   leg->SetLineWidth(1);
96   leg->SetFillColor(0);
97   leg->SetFillStyle(1001);
98   TLegendEntry *entry=leg->AddEntry("Graph","80% e^{-} Efficiency - Simulation","p");
99   entry->SetLineColor(1);
100   entry->SetLineStyle(1);
101   entry->SetLineWidth(1);
102   entry->SetMarkerColor(1);
103   entry->SetMarkerStyle(21);
104   entry->SetMarkerSize(1);
105   entry=leg->AddEntry("Grapha","90% e^{-} Efficiency - Simulation","p");
106   entry->SetLineColor(1);
107   entry->SetLineStyle(1);
108   entry->SetLineWidth(1);
109   entry->SetMarkerColor(1);
110   entry->SetMarkerStyle(21);
111   entry->SetMarkerSize(1);
112   entry=leg->AddEntry("Graphb","90% e^{-} Efficiency - Test Beam","p");
113   entry->SetLineColor(1);
114   entry->SetLineStyle(1);
115   entry->SetLineWidth(1);
116   entry->SetMarkerColor(1);
117   entry->SetMarkerStyle(21);
118   entry->SetMarkerSize(1);
119   leg->Draw();
120   //  c3->Modified();
121   //c3->cd();
122   //c3->SetSelected(c3);
123 }