{ //=========Macro generated from canvas: c4/c4 Photon Rates //========= (Wed Oct 22 12:12:21 2014) by ROOT version5.34/09 TCanvas *c4 = new TCanvas("c4", "c4 Photon Rates",200,32,700,700); gStyle->SetOptFit(1); c4->Range(-1.508571,-0.1,8.108571,0.5666667); c4->SetFillColor(0); c4->SetBorderMode(0); c4->SetBorderSize(2); c4->SetLeftMargin(0.15); c4->SetRightMargin(0.15); c4->SetBottomMargin(0.15); c4->SetFrameBorderMode(0); c4->SetFrameBorderMode(0); TGraphErrors *gre = new TGraphErrors(4); gre->SetName("Graph"); gre->SetTitle(""); gre->SetFillColor(1); gre->SetMarkerStyle(20); gre->SetMarkerSize(1.2); gre->SetPoint(0,0,0.262854); gre->SetPointError(0,0,0.001080551); gre->SetPoint(1,2,0.2032382); gre->SetPointError(1,0,0.000950147); gre->SetPoint(2,4,0.09716824); gre->SetPointError(2,0,0.0006569772); gre->SetPoint(3,6,0.04321155); gre->SetPointError(3,0,0.0004381149); TH1F *Graph_Graph1 = new TH1F("Graph_Graph1","",100,0,6.6); Graph_Graph1->SetMinimum(0); Graph_Graph1->SetMaximum(0.5); Graph_Graph1->SetDirectory(0); Graph_Graph1->SetStats(0); Int_t ci; // for color index setting ci = TColor::GetColor("#000099"); Graph_Graph1->SetLineColor(ci); Graph_Graph1->GetXaxis()->SetTitle("Offset (mm)"); Graph_Graph1->GetXaxis()->SetRange(0,101); Graph_Graph1->GetXaxis()->SetNdivisions(505); Graph_Graph1->GetXaxis()->SetLabelFont(42); Graph_Graph1->GetXaxis()->SetLabelSize(0.035); Graph_Graph1->GetXaxis()->SetTitleSize(0.035); Graph_Graph1->GetXaxis()->SetTitleFont(42); Graph_Graph1->GetYaxis()->SetTitle("Fraction past aperture"); Graph_Graph1->GetYaxis()->SetLabelFont(42); Graph_Graph1->GetYaxis()->SetLabelSize(0.05); Graph_Graph1->GetYaxis()->SetTitleSize(0.05); Graph_Graph1->GetYaxis()->SetTitleOffset(1.5); Graph_Graph1->GetYaxis()->SetTitleFont(42); Graph_Graph1->GetZaxis()->SetLabelFont(42); Graph_Graph1->GetZaxis()->SetLabelSize(0.035); Graph_Graph1->GetZaxis()->SetTitleSize(0.035); Graph_Graph1->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph1); gre->Draw("ap"); gre = new TGraphErrors(4); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); gre->SetMarkerColor(2); gre->SetMarkerStyle(20); gre->SetMarkerSize(1.2); gre->SetPoint(0,0,0.2399378); gre->SetPointError(0,0,0.001032375); gre->SetPoint(1,2,0.1889439); gre->SetPointError(1,0,0.0009161247); gre->SetPoint(2,4,0.09845641); gre->SetPointError(2,0,0.0006613177); gre->SetPoint(3,6,0.04458856); gre->SetPointError(3,0,0.0004450408); TH1F *Graph_Graph2 = new TH1F("Graph_Graph2","Graph",100,0,6.6); Graph_Graph2->SetMinimum(0.02446085); Graph_Graph2->SetMaximum(0.2606529); Graph_Graph2->SetDirectory(0); Graph_Graph2->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph2->SetLineColor(ci); Graph_Graph2->GetXaxis()->SetLabelFont(42); Graph_Graph2->GetXaxis()->SetLabelSize(0.035); Graph_Graph2->GetXaxis()->SetTitleSize(0.035); Graph_Graph2->GetXaxis()->SetTitleFont(42); Graph_Graph2->GetYaxis()->SetLabelFont(42); Graph_Graph2->GetYaxis()->SetLabelSize(0.035); Graph_Graph2->GetYaxis()->SetTitleSize(0.035); Graph_Graph2->GetYaxis()->SetTitleFont(42); Graph_Graph2->GetZaxis()->SetLabelFont(42); Graph_Graph2->GetZaxis()->SetLabelSize(0.035); Graph_Graph2->GetZaxis()->SetTitleSize(0.035); Graph_Graph2->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph2); gre->Draw("p"); gre = new TGraphErrors(4); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); gre->SetMarkerColor(4); gre->SetMarkerStyle(20); gre->SetMarkerSize(1.2); gre->SetPoint(0,0,0.1782165); gre->SetPointError(0,0,0.000889738); gre->SetPoint(1,2,0.1507962); gre->SetPointError(1,0,0.0008184334); gre->SetPoint(2,4,0.09673737); gre->SetPointError(2,0,0.000655519); gre->SetPoint(3,6,0.05022987); gre->SetPointError(3,0,0.0004723557); TH1F *Graph_Graph3 = new TH1F("Graph_Graph3","Graph",100,0,6.6); Graph_Graph3->SetMinimum(0.03682264); Graph_Graph3->SetMaximum(0.1920412); Graph_Graph3->SetDirectory(0); Graph_Graph3->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph3->SetLineColor(ci); Graph_Graph3->GetXaxis()->SetLabelFont(42); Graph_Graph3->GetXaxis()->SetLabelSize(0.035); Graph_Graph3->GetXaxis()->SetTitleSize(0.035); Graph_Graph3->GetXaxis()->SetTitleFont(42); Graph_Graph3->GetYaxis()->SetLabelFont(42); Graph_Graph3->GetYaxis()->SetLabelSize(0.035); Graph_Graph3->GetYaxis()->SetTitleSize(0.035); Graph_Graph3->GetYaxis()->SetTitleFont(42); Graph_Graph3->GetZaxis()->SetLabelFont(42); Graph_Graph3->GetZaxis()->SetLabelSize(0.035); Graph_Graph3->GetZaxis()->SetTitleSize(0.035); Graph_Graph3->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph3); gre->Draw("p"); TLegend *leg = new TLegend(0.5,0.75,0.85,0.9,NULL,"brNDC"); leg->SetBorderSize(1); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(19); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("Graph","#sigma=0.5 mm","p"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(20); entry->SetMarkerSize(1.2); entry=leg->AddEntry("Graph","#sigma=1.0 mm","p"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(2); entry->SetMarkerStyle(20); entry->SetMarkerSize(1.2); entry=leg->AddEntry("Graph","#sigma=2.0 mm","p"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(4); entry->SetMarkerStyle(20); entry->SetMarkerSize(1.2); leg->Draw(); c4->Modified(); c4->cd(); c4->SetSelected(c4); }