{ //=========Macro generated from canvas: resCnv/Fit slices results //========= (Thu Sep 01 13:57:14 2011) by ROOT version5.29/02 TCanvas *resCnv = new TCanvas("resCnv", "Fit slices results",237,41,800,750); gStyle->SetOptTitle(0); gROOT->SetEditHistograms(); resCnv->ToggleEventStatus(); resCnv->Range(-0.9610777,0.07410714,6.188623,0.3252232); resCnv->SetFillColor(0); resCnv->SetBorderMode(0); resCnv->SetBorderSize(2); resCnv->SetLeftMargin(0.1344221); resCnv->SetRightMargin(0.02638191); resCnv->SetFrameBorderMode(0); resCnv->SetFrameBorderMode(0); TH1D *resX_tagE_cr_statErr = new TH1D("resX_tagE_cr_statErr","Crystal",60,0,6); resX_tagE_cr_statErr->SetBinContent(12,0.2531266); resX_tagE_cr_statErr->SetBinContent(13,0.2428635); resX_tagE_cr_statErr->SetBinContent(14,0.2364983); resX_tagE_cr_statErr->SetBinContent(15,0.2308261); resX_tagE_cr_statErr->SetBinContent(16,0.2252669); resX_tagE_cr_statErr->SetBinContent(17,0.2179781); resX_tagE_cr_statErr->SetBinContent(23,0.1842869); resX_tagE_cr_statErr->SetBinContent(24,0.1817965); resX_tagE_cr_statErr->SetBinContent(25,0.1793151); resX_tagE_cr_statErr->SetBinContent(26,0.1748235); resX_tagE_cr_statErr->SetBinContent(27,0.168823); resX_tagE_cr_statErr->SetBinContent(28,0.168823); resX_tagE_cr_statErr->SetBinContent(29,0.1628698); resX_tagE_cr_statErr->SetBinContent(30,0.1615553); resX_tagE_cr_statErr->SetBinContent(31,0.1593301); resX_tagE_cr_statErr->SetBinContent(32,0.1553987); resX_tagE_cr_statErr->SetBinContent(39,0.1418433); resX_tagE_cr_statErr->SetBinContent(40,0.1401144); resX_tagE_cr_statErr->SetBinContent(41,0.136624); resX_tagE_cr_statErr->SetBinContent(42,0.1356267); resX_tagE_cr_statErr->SetBinContent(43,0.1360729); resX_tagE_cr_statErr->SetBinContent(44,0.1343712); resX_tagE_cr_statErr->SetBinContent(45,0.1293945); resX_tagE_cr_statErr->SetBinContent(46,0.1286459); resX_tagE_cr_statErr->SetBinContent(47,0.1258203); resX_tagE_cr_statErr->SetBinContent(48,0.1238388); resX_tagE_cr_statErr->SetBinContent(49,0.1228317); resX_tagE_cr_statErr->SetBinContent(50,0.12211); resX_tagE_cr_statErr->SetBinContent(51,0.1186418); resX_tagE_cr_statErr->SetBinContent(52,0.1181747); resX_tagE_cr_statErr->SetBinContent(53,0.1193524); resX_tagE_cr_statErr->SetBinContent(54,0.115183); resX_tagE_cr_statErr->SetBinContent(55,0.1156816); resX_tagE_cr_statErr->SetBinError(12,0.001678672); resX_tagE_cr_statErr->SetBinError(13,0.001620913); resX_tagE_cr_statErr->SetBinError(14,0.001741514); resX_tagE_cr_statErr->SetBinError(15,0.001974159); resX_tagE_cr_statErr->SetBinError(16,0.001837861); resX_tagE_cr_statErr->SetBinError(17,0.001756734); resX_tagE_cr_statErr->SetBinError(23,0.001718285); resX_tagE_cr_statErr->SetBinError(24,0.001739027); resX_tagE_cr_statErr->SetBinError(25,0.002237371); resX_tagE_cr_statErr->SetBinError(26,0.001937669); resX_tagE_cr_statErr->SetBinError(27,0.001836336); resX_tagE_cr_statErr->SetBinError(28,0.002406733); resX_tagE_cr_statErr->SetBinError(29,0.001586622); resX_tagE_cr_statErr->SetBinError(30,0.003501476); resX_tagE_cr_statErr->SetBinError(31,0.001718886); resX_tagE_cr_statErr->SetBinError(32,0.002279387); resX_tagE_cr_statErr->SetBinError(39,0.004); resX_tagE_cr_statErr->SetBinError(40,0.001742892); resX_tagE_cr_statErr->SetBinError(41,0.001734338); resX_tagE_cr_statErr->SetBinError(42,0.001787886); resX_tagE_cr_statErr->SetBinError(43,0.00179238); resX_tagE_cr_statErr->SetBinError(44,0.001836814); resX_tagE_cr_statErr->SetBinError(45,0.00182956); resX_tagE_cr_statErr->SetBinError(46,0.001775157); resX_tagE_cr_statErr->SetBinError(47,0.001823701); resX_tagE_cr_statErr->SetBinError(48,0.001919889); resX_tagE_cr_statErr->SetBinError(49,0.00185492); resX_tagE_cr_statErr->SetBinError(50,0.001864068); resX_tagE_cr_statErr->SetBinError(51,0.001953663); resX_tagE_cr_statErr->SetBinError(52,0.001940587); resX_tagE_cr_statErr->SetBinError(53,0.001920431); resX_tagE_cr_statErr->SetBinError(54,0.001885788); resX_tagE_cr_statErr->SetBinError(55,0.001882099); resX_tagE_cr_statErr->SetMinimum(0.09921875); resX_tagE_cr_statErr->SetMaximum(0.3001116); resX_tagE_cr_statErr->SetEntries(80); resX_tagE_cr_statErr->SetStats(0); TF1 *fitFunc = new TF1("fitFunc","[0]/sqrt(x)",1.1,5.5); fitFunc->SetFillColor(19); fitFunc->SetFillStyle(0); fitFunc->SetLineColor(4); fitFunc->SetLineWidth(1); fitFunc->SetLineStyle(2); fitFunc->SetChisquare(52.65585); fitFunc->SetNDF(32); fitFunc->GetXaxis()->SetLabelFont(42); fitFunc->GetXaxis()->SetLabelSize(0.035); fitFunc->GetXaxis()->SetTitleSize(0.035); fitFunc->GetXaxis()->SetTitleFont(42); fitFunc->GetYaxis()->SetLabelFont(42); fitFunc->GetYaxis()->SetLabelSize(0.035); fitFunc->GetYaxis()->SetTitleSize(0.035); fitFunc->GetYaxis()->SetTitleFont(42); fitFunc->SetParameter(0,0.2754139); fitFunc->SetParError(0,0.0002579775); fitFunc->SetParLimits(0,0,0); resX_tagE_cr_statErr->GetListOfFunctions()->Add(fitFunc); resX_tagE_cr_statErr->SetFillColor(4); Int_t ci; // for color index setting ci = TColor::GetColor("#000099"); resX_tagE_cr_statErr->SetLineColor(ci); resX_tagE_cr_statErr->SetMarkerStyle(20); resX_tagE_cr_statErr->SetMarkerSize(0.6); resX_tagE_cr_statErr->GetXaxis()->SetTitle("E (GeV)"); resX_tagE_cr_statErr->GetXaxis()->SetLabelFont(42); resX_tagE_cr_statErr->GetXaxis()->SetLabelSize(0.035); resX_tagE_cr_statErr->GetXaxis()->SetTitleSize(0.035); resX_tagE_cr_statErr->GetXaxis()->SetTitleFont(42); resX_tagE_cr_statErr->GetYaxis()->SetTitle("Position resolution #sigma(cm)"); resX_tagE_cr_statErr->GetYaxis()->CenterTitle(true); resX_tagE_cr_statErr->GetYaxis()->SetLabelFont(42); resX_tagE_cr_statErr->GetYaxis()->SetLabelSize(0.035); resX_tagE_cr_statErr->GetYaxis()->SetTitleSize(0.035); resX_tagE_cr_statErr->GetYaxis()->SetTitleOffset(1.4); resX_tagE_cr_statErr->GetYaxis()->SetTitleFont(42); resX_tagE_cr_statErr->GetZaxis()->SetLabelFont(42); resX_tagE_cr_statErr->GetZaxis()->SetLabelSize(0.035); resX_tagE_cr_statErr->GetZaxis()->SetTitleSize(0.035); resX_tagE_cr_statErr->GetZaxis()->SetTitleFont(42); resX_tagE_cr_statErr->Draw("E"); TLatex * tex = new TLatex(3.29,0.215,"f(E) = p_{0} + #frac{a}{#sqrt{E}}"); tex->SetTextSize(0.037); tex->SetLineWidth(2); tex->Draw(); tex = new TLatex(3.29,0.195,"a = 0.28 #pm 0.004 #pm 0.01 syst."); tex->SetTextSize(0.037); tex->SetLineWidth(2); tex->Draw(); tex = new TLatex(3.287425,0.175,"p_{0} < 10^{-6}"); tex->SetTextSize(0.037); tex->SetLineWidth(2); tex->Draw(); resCnv->Modified(); resCnv->cd(); resCnv->SetSelected(resCnv); resCnv->ToggleToolBar(); }