ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FGolf/tcmet/scripts/getLeg1.C
Revision: 1.1
Committed: Fri Jan 22 09:58:14 2010 UTC (15 years, 3 months ago) by benhoob
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Error occurred while calculating annotation data.
Log Message:
*** empty log message ***

File Contents

# Content
1 gStyle->SetOptStat(0);
2 gPad->SetLogy(1);
3
4 h1->SetFillColor(0);
5 h2->SetFillColor(0);
6 h3->SetFillColor(0);
7 h4->SetFillColor(0);
8 h1->SetLineWidth(2);
9 h2->SetLineWidth(2);
10 h3->SetLineWidth(2);
11 h4->SetLineWidth(2);
12 h1->SetLineColor(1);
13 h2->SetLineColor(2);
14 h3->SetLineColor(4);
15 h4->SetLineColor(6);
16 h2->SetMarkerColor(2);
17 h3->SetMarkerColor(4);
18 h4->SetMarkerColor(6);
19 h1->SetTitle(title);
20 h1->GetXaxis()->SetTitle(xtitle);
21
22 h1->Draw();
23 h2->Draw("same");
24 h3->Draw("same");
25 h4->Draw("same");
26
27 float max=h1->GetMaximum();
28 if(h2->GetMaximum()>max) max=h2->GetMaximum();
29 if(h3->GetMaximum()>max) max=h3->GetMaximum();
30 if(h4->GetMaximum()>max) max=h4->GetMaximum();
31
32 h1->SetMaximum(1.1*max);
33 h1->SetMinimum(min);
34
35 if(drawLeg){
36 TLegend *leg=new TLegend(0.6,0.6,0.85,0.85);
37 leg->AddEntry(h1,"caloMET");
38 leg->AddEntry(h2,"muCorrMET");
39 leg->AddEntry(h3,"tcMET");
40 leg->AddEntry(h4,"tcMETNew");
41 leg->SetFillColor(0);
42 leg->SetBorderSize(1);
43 leg->Draw();
44 }