Error on FitResult::Scan

Hi,
I am trying to perform a Chi2 scan using the fitter.Result().Scan function but I get a segmentation error when implementing it. I have attached the testing example. Can anyone help me to construct the function correctly?

Many thanks!

ParamScan.C (1.7 KB)

May be @moneta can help.

In this simplified example code reproducing the problem, I am able to perform the fit and do the Scan with the TFitResult.Scan() but I get an empty graph. Is there any reason why this would not work? Thank you so much.
FitParScan.C (1.7 KB)

Hi,
There is a problem in calling Scan after the Fitter class is deleted and the FitResult is copied. I will open an issue for this.
For the time being, I attach you a working script performing the Scan which is done whithin the same C++ scope of the Fitter class.

FitParScan.C (1.8 KB)

Cheers

Lorenzo

1 Like

Dear Lorenzo,

Thank you so much for clarifying this. The working script uploaded was not the modified one but I changed the Scan to the scope of the Fitter class as you mentioned and it worked. Thanks a lot!

Best,

Lily

I have corrected the post and uploaded the correct file. Sorry for this !

1 Like