{ //=========Macro generated from canvas: c2/JET resol //========= (Sat Jan 3 15:06:31 2009) by ROOT version5.20/00 TCanvas *c2 = new TCanvas("c2", "JET resol",103,123,600,450); gStyle->SetOptFit(1); gStyle->SetOptStat(0); c2->Range(-110.302,-4.83611,865.0212,32.52035); c2->SetFillColor(0); c2->SetBorderMode(0); c2->SetBorderSize(2); c2->SetTickx(1); c2->SetTicky(1); c2->SetLeftMargin(0.13); c2->SetRightMargin(0.05); c2->SetTopMargin(0.05); c2->SetBottomMargin(0.13); c2->SetFrameFillStyle(0); c2->SetFrameBorderMode(0); c2->SetFrameFillStyle(0); c2->SetFrameBorderMode(0); TGraph *graph = new TGraph(15); graph->SetName("Graph"); graph->SetTitle(""); graph->SetFillColor(1); graph->SetMarkerStyle(20); graph->SetPoint(0,5,22.5596); graph->SetPoint(1,15,25.04835); graph->SetPoint(2,25,19.30046); graph->SetPoint(3,35,16.76912); graph->SetPoint(4,45,15.23036); graph->SetPoint(5,55,14.07184); graph->SetPoint(6,65,13.29615); graph->SetPoint(7,75,12.51001); graph->SetPoint(8,90,11.98179); graph->SetPoint(9,110,11.4267); graph->SetPoint(10,130,10.63493); graph->SetPoint(11,160,9.663273); graph->SetPoint(12,200,8.609053); graph->SetPoint(13,260,7.867697); graph->SetPoint(14,750,6.408123); TH1 *Graph1 = new TH1F("Graph1","",100,0,824.5); Graph1->SetMinimum(0.02022917); Graph1->SetMaximum(30.65253); Graph1->SetDirectory(0); Graph1->SetStats(0); Graph1->SetLineStyle(0); Graph1->SetMarkerStyle(20); Graph1->GetXaxis()->SetTitle("E_{T}^{MC} [GeV]"); Graph1->GetXaxis()->SetRange(3,99); Graph1->GetXaxis()->SetLabelFont(42); Graph1->GetXaxis()->SetLabelOffset(0.007); Graph1->GetXaxis()->SetTitleSize(0.05); Graph1->GetXaxis()->SetTitleOffset(0.9); Graph1->GetXaxis()->SetTitleFont(42); Graph1->GetYaxis()->SetTitle("#sigma(E_{T}^{rec}/E_{T}^{MC})_{fit}/_{fit}"); Graph1->GetYaxis()->SetLabelFont(42); Graph1->GetYaxis()->SetLabelOffset(0.007); Graph1->GetYaxis()->SetTitleSize(0.05); Graph1->GetYaxis()->SetTitleOffset(1.05); Graph1->GetYaxis()->SetTitleFont(42); Graph1->GetZaxis()->SetLabelFont(42); Graph1->GetZaxis()->SetLabelOffset(0.007); Graph1->GetZaxis()->SetTitleSize(0.05); Graph1->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph1); TF1 *user = new TF1("user","sqrt(pow([0]/x,2)+pow([1]/sqrt(x),2)+pow([2],2))",10,800); user->SetFillColor(19); user->SetFillStyle(0); user->SetMarkerStyle(20); user->SetLineColor(6); user->SetLineWidth(1); user->SetChisquare(1.661577); user->GetXaxis()->SetLabelFont(42); user->GetXaxis()->SetLabelOffset(0.007); user->GetXaxis()->SetTitleSize(0.05); user->GetXaxis()->SetTitleOffset(0.9); user->GetXaxis()->SetTitleFont(42); user->GetYaxis()->SetLabelFont(42); user->GetYaxis()->SetLabelOffset(0.007); user->GetYaxis()->SetTitleSize(0.05); user->GetYaxis()->SetTitleOffset(1.05); user->GetYaxis()->SetTitleFont(42); user->SetParameter(0,-3.740005e-06); user->SetParError(0,70.25748); user->SetParLimits(0,0,0); user->SetParameter(1,94.31575); user->SetParError(1,1.231109); user->SetParLimits(1,0,0); user->SetParameter(2,5.905654); user->SetParError(2,0.2829689); user->SetParLimits(2,0,0); graph->GetListOfFunctions()->Add(user); TPaveStats *ptstats = new TPaveStats(0.6090604,0.7464455,0.8791946,0.8696682,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetTextAlign(12); ptstats->SetTextFont(42); TText *text = ptstats->AddText("#chi^{2} / ndf = 1.662 / 11"); text = ptstats->AddText("p0 = -3.74e-06 #pm 70.26 "); text = ptstats->AddText("p1 = 94.32 #pm 1.231 "); text = ptstats->AddText("p2 = 5.906 #pm 0.283 "); ptstats->SetOptStat(0); ptstats->SetOptFit(111); ptstats->Draw(); graph->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(graph->GetListOfFunctions()); graph->Draw("ap"); TF1 *userDelphes = new TF1("userDelphes","sqrt(pow(94.3/sqrt(x),2)+pow(5.9,2))",7,1000); userDelphes->SetFillColor(19); userDelphes->SetFillStyle(0); userDelphes->SetMarkerStyle(20); userDelphes->SetLineColor(6); userDelphes->SetLineWidth(1); userDelphes->GetXaxis()->SetLabelFont(42); userDelphes->GetXaxis()->SetLabelOffset(0.007); userDelphes->GetXaxis()->SetTitleSize(0.05); userDelphes->GetXaxis()->SetTitleOffset(0.9); userDelphes->GetXaxis()->SetTitleFont(42); userDelphes->GetYaxis()->SetLabelFont(42); userDelphes->GetYaxis()->SetLabelOffset(0.007); userDelphes->GetYaxis()->SetTitleSize(0.05); userDelphes->GetYaxis()->SetTitleOffset(1.05); userDelphes->GetYaxis()->SetTitleFont(42); userDelphes->Draw("same"); TF1 *userCMS = new TF1("userCMS","sqrt(pow(1.17*100/sqrt(x),2)+pow(0.039*100,2))",10,800); userCMS->SetFillColor(19); userCMS->SetFillStyle(0); userCMS->SetMarkerStyle(20); userCMS->SetLineColor(9); userCMS->SetLineWidth(1); userCMS->GetXaxis()->SetLabelFont(42); userCMS->GetXaxis()->SetLabelOffset(0.007); userCMS->GetXaxis()->SetTitleSize(0.05); userCMS->GetXaxis()->SetTitleOffset(0.9); userCMS->GetXaxis()->SetTitleFont(42); userCMS->GetYaxis()->SetLabelFont(42); userCMS->GetYaxis()->SetLabelOffset(0.007); userCMS->GetYaxis()->SetTitleSize(0.05); userCMS->GetYaxis()->SetTitleOffset(1.05); userCMS->GetYaxis()->SetTitleFont(42); userCMS->Draw("same"); TPaveText *pt = new TPaveText(0.6493289,0.4905213,0.7986577,0.5402844,"brNDC"); pt->SetBorderSize(0); pt->SetFillColor(10); pt->SetTextFont(42); pt->SetTextSize(0.03791469); text = pt->AddText("Events: pp #rightarrow gg "); pt->Draw(); pt = new TPaveText(0.2,0.15,0.35,0.2,"brNDC"); pt->SetBorderSize(0); pt->SetFillColor(10); pt->SetTextFont(42); pt->SetTextSize(0.03791469); text = pt->AddText("MG/ME + Delphes"); pt->Draw(); TLegend *leg = new TLegend(0.1963087,0.6421801,0.8959732,0.8909953,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetTextFont(62); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(10); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("userCMS","CMS resolution","l"); entry->SetLineColor(9); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry=leg->AddEntry("userDelphes","Delphes resolution: #frac{#sigma(E_{T}^{rec}/E_{T}^{MC})}{} = #frac{94.3}{#sqrt{E_{T}^{MC}}} #oplus 5.9","l"); entry->SetLineColor(6); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); leg->Draw(); c2->Modified(); c2->cd(); c2->SetSelected(c2); }