# Use of upar.add

**URL:** <https://root-forum.cern.ch/t/use-of-upar-add/49976>\
**Category:** Newbie\
**Created:** [May 14, 2022, 5:43am UTC](https://root-forum.cern.ch/t/use-of-upar-add/49976 "2022-05-14T05:43:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tappourc](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/47e85d/32.png) [@tappourc](https://root-forum.cern.ch/u/tappourc)\
**Post date:** [May 14, 2022, 5:43am UTC](https://root-forum.cern.ch/t/use-of-upar-add/49976/1 "2022-05-14T05:43:31Z")

</div>

Hi guys,

I have a question on the usage of upar.add.  
My problem is the following, I minimize using Minuit2 with about 150 parameters. All parameters are fine but one for which I know that its value should be different. The output value is too close to the guess, in other words Minuit2 does not explore all the space for this parameter. I use upar.add(“name”,value,0.1).

Is there a way to tell it to be able to have Minuit2 to find an optimal value in a range larger than what I am getting.

Thanking you in advance,

ThierryA

* * *

---

<div class="post-metadata">

**Author:** ![jalopezg](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jalopezg/32/25844_2.png) [@jalopezg](https://root-forum.cern.ch/u/jalopezg)\
**Post date:** [May 15, 2022, 6:40pm UTC](https://root-forum.cern.ch/t/use-of-upar-add/49976/2 "2022-05-15T18:40:48Z")

</div>

Hi @tappourc; I am inviting @moneta to this topic as the relevant expert.

Cheers,  
J.

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [May 16, 2022, 7:40am UTC](https://root-forum.cern.ch/t/use-of-upar-add/49976/3 "2022-05-16T07:40:33Z")

</div>

Hi,

You can try starting from a different initial value or maybe using a larger initial step size. However, if Minuit2 finds that value is because the function has a local minimum in that region

Lorenzo

---

<div class="post-metadata">

**Author:** ![tappourc](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/47e85d/32.png) [@tappourc](https://root-forum.cern.ch/u/tappourc)\
**Post date:** [May 16, 2022, 9:12am UTC](https://root-forum.cern.ch/t/use-of-upar-add/49976/4 "2022-05-16T09:12:42Z")

</div>

Thanks. How do we change the step size?

ThierryA

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [May 16, 2022, 9:14am UTC](https://root-forum.cern.ch/t/use-of-upar-add/49976/5 "2022-05-16T09:14:51Z")

</div>

The step size is the parameter you pass after the value. You are using 0.1, try a larger value when calling:  
`upar.add("name", value, stepsize)`

---

<div class="post-metadata">

**Author:** ![tappourc](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/47e85d/32.png) [@tappourc](https://root-forum.cern.ch/u/tappourc)\
**Post date:** [May 16, 2022, 9:15am UTC](https://root-forum.cern.ch/t/use-of-upar-add/49976/6 "2022-05-16T09:15:33Z")

</div>

OK thanks. That will do !

Cheers,

ThierryA
