Plotting using Efficiency and RooGenCategory

Hi,

I am using RooGenCategory with my own mapping function to fit for some selection efficiencies. The fit works and the results look sensible, but I would like to plot the efficiency and the fitted function. If I was only using RooCategory then I could do this (as in the rf701_ example):

data->plotOn(frame, Efficiency(category) );

However, this when “category” is a RooGenCategory, the above line gives me an error since Efficiency() only accepts a RooCategory object. Does anyone know if there is a way of doing what I want to do?

Best regards,
Greig