# Fit with constraints in TMinuit

**URL:** <https://root-forum.cern.ch/t/fit-with-constraints-in-tminuit/63824>\
**Category:** ROOT\
**Tags:** root\
**Created:** [June 28, 2025, 8:16am UTC](https://root-forum.cern.ch/t/fit-with-constraints-in-tminuit/63824 "2025-06-28T08:16:26Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![atd](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/atd/32/33835_2.png) [@atd](https://root-forum.cern.ch/u/atd)\
**Post date:** [July 3, 2025, 7:36pm UTC](https://root-forum.cern.ch/t/fit-with-constraints-in-tminuit/63824/3 "2025-07-03T19:36:54Z")

</div>

Hi @OrangeCat

maybe a penalty method is better suited? something like

```bash
-lnL=Sum_{i=0}^{N} ln W(\xi_i; a1,a2) + lambda * pow( Func(a1, a2) , 2 ) 

```

This example shows how to add a Gaussian constraint function

> [@ROOT::FIT, parameter error propagation](https://root-forum.cern.ch/t/root-fit-parameter-error-propagation/23778):
>
> Dear rooters, I’m still new to the ROOT::FIT classes. In some of the fits, several parameters are kept fix; but they have an associated error. In order to propagate these errors (associated with the fix parameters) to the “free” parameters, I have to perform several fits changing the values of the fixed parameters (a Montecarlo way of propagating errors). So, my question is: is there a way using ROOT::FIT to propagate the errors of the fixed parameters? I spent a while looking for it, but I …

Best,  
Alvaro

---

_[View the full topic](https://root-forum.cern.ch/t/fit-with-constraints-in-tminuit/63824)._
