TCanvas *c1 = new TCanvas("c1","c1",10,10,600,500); TGraphErrors *nw = DrawTGraphErrors("noweight_nosaturation_nobin_10ns_50ns.data"); nw->SetMarkerStyle(8); nw->SetMarkerColor(kBlack); nw->GetXaxis()->SetTitle("Input NPE / 10ns"); nw->GetYaxis()->SetTitle("Output NPE in 50ns (from charge)"); nw->Draw("AP"); TGraphErrors *nww = DrawTGraphErrors("noweight_wsaturation_nobin_10ns_50ns.data"); nww->SetMarkerStyle(8); nww->SetMarkerColor(kRed); nww->Draw("Psame"); TGraphErrors *w10 = DrawTGraphErrors("weight_wsaturation_10ns_50ns.data"); w10->SetMarkerStyle(8); w10->SetMarkerColor(kViolet); w10->Draw("Psame"); TGraphErrors *q10 = DrawTGraphErrors("weight_qsaturation_10ns_50ns.data"); q10->SetMarkerStyle(23); q10->SetMarkerColor(kBlue); q10->Draw("Psame"); TLegend *leg = new TLegend(0.15,0.65,0.6,0.9); leg->SetMargin(0.2); leg->SetHeader("10ns bin, 50ns beam"); leg->AddEntry(nw, "no weight, no saturation","P"); leg->AddEntry(nww, "no weight, waveform saturation","P"); leg->AddEntry(w10, "weighted, waveform saturation","P"); leg->AddEntry(q10, "weighted, semi-current saturation","P"); leg->Draw();