{ gROOT->Reset(); gROOT->LoadMacro("utils.h"); gROOT->ProcessLine(".x atlasStyle.C"); gROOT->LoadMacro("powerGauss.C"); TCanvas* c = new TCanvas("c", "c",10,10,500,500); bool logY = false; if ( logY ) { c->SetLogy(1); } else { c->SetLogy(0); } bool logX = false; if ( logX ) { c->SetLogx(1); } else { c->SetLogx(0); } c->SetBottomMargin(0.15); c->SetLeftMargin(0.18); double muMin = 0.; double muMax = 4.; double alpha = 0.05; double sigma = 1.; double muPrime = 0.; TF1* f = new TF1("f", powerGauss, muMin, muMax, 2); f->SetParameter(0, alpha); f->SetParameter(1, sigma); f->SetLineColor(kBlack); f->SetLineStyle(1); f->SetLineWidth(1); double ymin = 0.; double ymax = 1.; f->SetMinimum(ymin); f->SetMaximum(ymax); f->Draw(); TH1* h = f->GetHistogram(); TAxis* xa = h->GetXaxis(); TAxis* ya = h->GetYaxis(); xa->SetTitleOffset(1.3); // factor multiplies default offset ya->SetTitleOffset(1.3); xa->SetLabelOffset(0.015); ya->SetLabelOffset(0.005); xa->SetNdivisions(4); ya->SetNdivisions(10); h->SetTitle(""); // turn off title h->SetXTitle("#mu"); h->SetYTitle("M_{0}(#mu)"); TLatex* tl = new TLatex(); tl->SetTextAlign(11); tl->SetTextSize(0.04); tl->SetTextFont(42); tl->SetNDC(); tl->DrawLatex(.25, .85, "#sigma = 1, #alpha = 0.05"); /* TLegend* leg = new TLegend(0.2, 0.75, 0.5, 0.9); // x1, y1, x2, y2 leg->SetTextSize(0.04); leg->SetBorderSize(0); leg->SetFillColor(0); leg->AddEntry(g, "3 term q_{#mu}", "l"); leg->AddEntry(f, "2 term q_{#mu}", "l"); leg->Draw(); */ c->Print("powerGaussPlot.eps"); }