Combine two TEfficiency graphs to a ROC curve


I have recently discovered the TEfficiency class and would like to include it in my analysis. I was able to create two efficiency graphs (in my case one for high scatter jets and the other for pileup jets), where the efficiency is plotted over the different cut values (RpT here). Great.

Now I would like to combine the two to a ROC curve, where I plot PU efficiency over HS efficiency.
Is there a natural way to do this when using TEfficiency objects? And maybe even get some kind of error band then?

Thanks a lot for your answers!

1 Like

You mean draw them on the same plot ?

yes, but efficiency over efficiency.
I probably didn’t describe the problem well… I have a range of cutvalues, and I want the efficiency for each of the cutvalues, and split up into the two parts that make up my jet collection, high scatter and pile up.
This part I have.

eff_hs = new TEfficiency(“eff_hs”,";RpT cut;HS efficiency", 500, 0., 1.);
eff_pu = new TEfficiency(“eff_pu”,";RpT cut;PU efficiency", 500, 0., 1.);

… Loop over entries in ttree …

bool passed_cut;
for (auto curr_cut : eff_rpt_cut) { //eff_rpt_cut is vector of double, that stores the cutvalues that I want to look at
if (*m_jet_smallest_deltaR_to_truthcone < 0.3 and *m_jet_pt >10e3) {
passed_cut = *m_jet_Rpt >= curr_cut;
hist_eff_hs->Fill(passed_cut, curr_cut);
} else if (*m_jet_smallest_deltaR_to_truthcone > 0.6 and *m_jet_pt > 4e3) {
passed_cut = *m_jet_Rpt >= curr_cut;
hist_eff_pu->Fill(passed_cut, curr_cut);

what I do now is to take the y values of both TGraphAsymmErrors from the TEfficiency objects for each cutvalue, and plot them one over the other. This works, but I was wondering if there is a more natural way to do this (since we already have this nice class)


What you do seems to me me looks fine already… I am not sure I understand what you would like to gain. One think could be to group them in a TMultiGraph to have them plot in one go …

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.