22 fxExpression(), fxPosIndex(), fxWidthIndex(), fxFormula(0) {
26 TGo4FitModel(iName,
"based on TFormula line shape",AddAmplitude),
27 fxExpression(iExpressionStr), fxPosIndex(), fxWidthIndex(), fxFormula(0) {
29 for (Int_t n=0;n<iNPars;n++)
52 if ((num<0) || (oldnum==num))
return kFALSE;
54 for(Int_t n=oldnum-1;n>=num;n--)
57 for(Int_t n=oldnum;n<num;n++)
84 if ((naxis<0) || (naxis>=
fxPosIndex.GetSize()))
return -1;
89 if ((naxis<0) || (naxis>=
fxWidthIndex.GetSize()))
return -1;
118 case 2:
return fxFormula->Eval(v[0],v[1]);
119 case 3:
return fxFormula->Eval(v[0],v[1],v[2]);
120 default:
return fxFormula->EvalPar(v, 0);
135 std::cout <<
" Expression = " << *
fxExpression << std::endl;
136 for (Int_t naxis=0;naxis<
fxPosIndex.GetSize();naxis++) {
139 std::cout <<
" Position on " << naxis <<
" axis is " << par->GetName() << std::endl;
141 for (Int_t naxis=0;naxis<
fxWidthIndex.GetSize();naxis++) {
144 std::cout <<
" Width on " << naxis <<
" axis is " << par->GetName() << std::endl;
153 for (Int_t n=0;n<
NumPars();n++) {
159 fxFormula =
new TFormula(
"Expression", Expr);
163 std::cerr <<
"Error in formula: " <<
fxExpression.Data() <<
" code " << err << std::endl;
TGo4FitParameter * GetPar(Int_t n)
Int_t GetAmplIndex() const
TGo4FitParameter * NewParameter(const char *Name, const char *Title, Double_t iValue=0., Bool_t Fixed=kFALSE, Int_t AtIndx=-1)
Bool_t RemovePar(const char *name)
virtual void Print(Option_t *option) const
virtual Bool_t Initialize(Int_t UseBuffers=-1)
Int_t GetParIndex(const TGo4FitParameter *par)
const char * GetParName(Int_t n)
TGo4FitParameter * GetAmplPar()