The fitting the data by integral function

Hi,

I read root.cern.ch/phpBB2/viewtopic.php?t=6288 and had written the macro (see an attachment). But there are several problems, that I can’t solve.

I have following errors:

root [0] .x obshaya1.C
FUNCTION MUST BE MINIMIZED BEFORE CALLING MINOs
Error: Cint::G__CallFunc::SetArgArray() must be initialized with ‘Cint::G__CallF
unc::SetFunc(G__ClassInfo* cls,char* fname,char* args,long* poffset)’ first
Error: Symbol ) is not defined in current scope C:\root\obshaya1.C(148)
*** Interpreter error recovered ***
Error: Cint::G__CallFunc::SetArgArray() must be initialized with ‘Cint::G__CallF
unc::SetFunc(G__ClassInfo* cls,char* fname,char* args,long* poffset)’ first

What’s this means?

In addition, would you explain why std::copy(p,p+3,param) doesn’t work?

Thank you!
obshaya1.c (5.73 KB)

Hi,

you should compile your macro using ACLIC, the execution will be much faster too, since you are performing some complex computations.
I attached a new version where some C++ errors have been fixed, but the fit looks wrong to me. You will have to check your fitting function

Best Regards

Lorenzo
obshaya1.c (5.76 KB)