TEfficiency using histograms from a separate root file

Dear Experts,

I would like to calculate efficiency in bins of momenta. For this, I have two histograms in this root file: for_tefficiency.root (5.8 KB), namely Num_p (Numerator) and Den_p (Denominator). I am trying to use TEfficiency to calculate the efficiencies and compute the errors using this macro:efficiency.C (1.0 KB).
But I am not able to get it and it shows segmentation error.

Can any one please explain me what is the mistake that I am making?


Please read tips for efficient and successful posting and posting code

ROOT Version: 5.34
Platform: Ubuntu 16.04
Compiler: Not Provided

At least:
TFile *f = TFile::Open("for_tefficiency.root", "read");

Thank you @Wile_E_Coyote . And Sorry. I should have been more careful.