I am trying to minimize my FCN using the TMinuit with parameters x1, x2, and x3. The x1, x2, and x3 themselves have no constraints, but x1 + x2 + x3 > 0.
My question is: How to impose this constraint during the minimization? Should I manually set the FCN to infinity when x1 + x2 + x3 < 0 is satisfied?
I have an idea for discussion. We can multiply an exponential term (e^{-(x1+x2+x3)}) or a fractional term (1/(x1+x2+x3)) on FCN, so that when x1+x2+x3 tend to zero, FCN becomes infinite. But I am concerned about uncertainty estimates in this case.
Thank you for your prompt response! I have to say that the situation is more complex than initially described, as I need to consider various constraints, including nonlinear combinations of parameters. However, the set of parameters should be retained due to their physical meaning.
I will begin by exploring the previous post. If there are more questions, I will continue to seek your guidance.
I tried the same approach as previous post but still couldn’t solve the problem. Let me show you the situation I encountered.
I attempted to enforce the condition that r20 must be greater than 0 in any case. The formula for r20 is defined as r20 = (-3 - cos(2 * theta_1) - 2 * pow(Pt, 2) * cos(2 * phi_1) * pow(sin(theta_1), 2) + 4 * (-1 + pow(Pt, 2) * cos(2 * phi_1)) * pow(sin(theta_1), 2) * (pow(x1, 2) - pow(x3, 2))), where x1 and x3 are fit parameters, and phi_1 are angles for each event, with Pt being a constant.
I tried multiplying exp(r20) to the amplitude (Amp) to construct the FCN, which is defined as Amp*exp(r20)(for PHSP MC sample)-ln(Amp)*exp(r20)(for data sample).
If this constraint is effective, the amplitude should not be negative. However, despite trying different initial values for x1 and x3, negative amplitudes were still observed in the PHSP MC or data sample during minimization.
I also attempted using 1/(r20), but this approach also proved unsuccessful.
Multiplying your function with exp(-r20) would prevent negative r20 values but favor large positive r20 values. This is just not the way to implement constrains. You will have to find a transformation of variables.