ROOT::Fit: Constraint change of two parameters

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); };


Is this correct?

Thank you for your time.

Best regards,

ROOT Version: 6.10
Platform: CC7
Compiler: gcc 4.8


I am not sure what you are doing is fully correct. Adding a Poisson contraints has a meaning of saying that there is an auxilliary measurement. It is equivalent like adding a Gamma constraint to the parameter/
Here instead you want to constraint the parameters in a specific range, this is different. Maybe a penalty term, which adds very large value to the likelihood outside the range could be used


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.