Not getting the Correct value of relative efficiency while calculating it manually

Hi !

I am a newbie in using root. I have plotted a efficiency curve for which the code is given below.

I have fitted the curve with an ease. Everything is perfect.
Now the problem comes here when I try to calculate the values of relative efficiencies at various energy values manually it does not seem to be correct.

148.pdf (14.9 KB)

I forget to attach the code
efficiency_R.C (1.8 KB)

It seems that RT->Eval(344.) = 0.89 or do you get something else?

@Wile_E_Coyote

Thanks for replying.
I am getting a number around1500 when I calculated manually by using calculator and from the program i am getting the correct value of 0.89.

can you please tell me how can i correlate that value with the value that i am getting manually.
Thanks

@Wile_E_Coyote @couet

Please suggest me something if I am doing something wrong.

“calculated manually by using calculator” is undefined.

@Wile_E_Coyote

It’s not undefined. It is giving some finite value which is not equal to the value that we are getting from the code.

Can you give me the exact reason why these values are unequal? or what is the discrepancy if it is there?

a data file is missing::

Processing efficiency_R.C...
Error in <TGraphErrors::TGraphErrors>: Cannot open file: efficiency.dat, TGraphErrors is Zombie
Info in <TCanvas::MakeDefCanvas>:  created default TCanvas with name c1
Warning in <Fit>: Fit data is empty 
Error in <TGraphPainter::PaintGraph>: illegal number of points (0)
y = 0.809395

undefied = unclear, indistinct, unspecified, unexplained, indeterminate, …

Hi @robertfroast ,
the thread is becoming a bit messy, sorry :sweat_smile:

If I understand correctly your program returns the correct value while your own calculation yields a wrong value. I am afraid there is a problem with your manual calculation, but I am not sure we can help with that (at the very least we need many more details).

Cheers,
Enrico