void fits(){ gROOT->SetStyle("Plain"); gStyle->SetOptTitle(0); TFile *f = TFile::Open("SctData::FitScanResult.1557.2.20220040200063.root"); TCanvas* c1 = new TCanvas("fits","fits",500,400); c1->SetGridy(); c1->SetGridx(); c1->SetBottomMargin(0.15); c1->SetLeftMargin(0.15); c1->SetTopMargin(0.05); c1->SetRightMargin(0.05); c1->Draw(); TH2D* frame = new TH2D("frame","frame",5,120.,210.,5,0.,1.1); double size=0.05; frame->GetXaxis()->SetLabelSize(size); frame->GetXaxis()->SetTitleSize(size); frame->GetYaxis()->SetLabelSize(size); frame->GetYaxis()->SetTitleSize(size); frame->SetXTitle("Threshold / mV"); frame->SetYTitle("Occupancy"); frame->SetStats(false); frame->DrawCopy(); for (unsigned chan=0; chan<128; ++chan){ string opt; char name[100]; sprintf(name,"channel_%d",chan); TF1* fit = f->Get(name); fit->SetLineColor(chan); fit->Draw("SAME"); } c1->Print("fits.eps"); }