How to calculate efficiency at a specific energy

I plotted the efficiency vs energy curve using a user defined function.
Now, I am trying to calculate efficiency at specific values e.g. 200kev, 500kev, 700kev.
How should I proceed further??
I also tried tooltip Info but it only shows near values i.e. (198.91…)
efficiency_R.C (1.1 KB) effvsE.txt (219 Bytes)

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Thanks for responding @Wile_E_Coyote
But I don’t know how to use it.
Please help me!! -> Tutorials -> C++ Language -> Classes (I) -> Basic object-oriented programming -> Classes and class members

1 Like

I used this in my code to evaluate y at x = 500.
But it is not giving the correct result.
float a = 500., y;
cout << "y = "<<y<<endl;

And what is your “correct result” because for me it prints “450.046” which looks fine (btw. use “double”, not “float”).

@Wile_E_Coyote Also after using double it prints y = 0.566104 at x = 500.
which I don’t understand but your result is fine.

But you do evaluate it after fitting?

Thanks @Wile_E_Coyote.
I got it correctly when I place it after fitting.