How to get ROC curve for TMVA::Reader?

Hi all,

I have trained the BDT and now have the weights. Then, I apply this to a mixed of signal and background events (data)

Create TMVA::Reader and add BDT method from weight file
Read in data from tree

For event in tree
apply method
store the BDT response and the corresponding variables to the output
End for

and now I want find out the ROC curve as a check of its performance on the data events. My signal and background efficiency definition is basically eff = N(BDT)/N(S/B) as N(BDT) corresponds to the # of signal and background events passing BDT and N(S/B) all signal(S) and background(B) events. Basically, what is missing here is my S and B class in the tree. How can I store them?

Many thanks.

Hi,

Running the reader on all events for signal and background data you can get the vector of mva values for the two data sets. From those vectors you can create a ROCCurve class and get the graphics curve, see
https://root.cern.ch/doc/master/classTMVA_1_1ROCCurve.html

Lorenzo