Problem in adjusting the parameters

Hi @Wile_E_Coyote @couet
A plot is made by me and i am fitting this plot by a user defined function.
Below are the files that I’m working on:
eu_gu_1.txt (44.1 KB)
rough.C (1.1 KB)


I want this red line to pass from the middle of the dark black part.
please help me in adjusting the parameters.

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


I guess @moneta can help.

@Wile_E_Coyote @couet @moneta
The problem seems to arise as soon as i change the parameters even so slightly.
nan is shown in the parameter error.
The parameters that i got are the best that i could get so far.
Please see how and why this nan appears in parameters error even after changing the parameters slightly.
Help me!!!

@Wile_E_Coyote
Is there any possible way of reducing the Chi sqaure or Chi square/ndf value.

Your fit function tries to describe the “background” only.
But all “data points” contribute to the chi^2.
If you “remove” peaks, you will get lower chi^2.

Thanks @Wile_E_Coyote.
Can we do anything about fixing parameters?
because each parameter is showing large error as you can see above.
Also, if i am changing the values slightly error becomes nan.

@Wile_E_Coyote suggested you to try to remove the peaks.

@couet @Wile_E_Coyote
I see a decrease in the value of chi square and there comes the next question which is how can this nan be removed? because when i slightly change the parameter it shows nan.

You have changed something in you macro ? If yes, can you post the last version ?

ok. @couet
I have only remove the peak points.
The only file that gets changed is rough.txt (40.7 KB)
rest of the files are same as before.

I tried a very stupid thing which seems actually working:

   RT->SetParameter(0,1.);
   RT->SetParameter(1,1.);
   RT->SetParameter(2,1.);
   RT->FixParameter(3,1.);
   RT->SetParameter(4,1.);
   RT->SetParameter(5,1.);
   RT->SetParameter(6,1.);

And I get:

There are still many peaks which need to be “removed” before trying to fit the “background”.