Dear rooters,
following the idea presented here,
how to propagate errors adding a penalty to the minimizer
I wonder if this similar procedure is correct: if two parameters are free, but they have no physical meaning unless 0 < par[0] + par[1] < 1
, the constraint to be added will be
//-- Ancillary functions for the constraint
TF1 * f_par = new TF1("f_par", " double( 0 > [0] + [1] || [0] + [1] > 1 )" ) // =1 if params out of range
ROOT::Math::WrappedMultiTF1 wf_par ( * f_par , 1 );
ROOT::Fit::PoissonLLFunction likelihood_F_par(data_h, wf_par );
auto nll = [&](const double *x) { return likelihood_F(x) - likelihood_F_par(x); };
fitter.FitFCN(2,nll,0,data_h.Size(),false);
Is this correct?
Thank you for your time.
Best regards,
Alvaro.
ROOT Version: 6.10
Platform: CC7
Compiler: gcc 4.8