# Error in Parameter settings

**URL:** <https://root-forum.cern.ch/t/error-in-parameter-settings/35328>\
**Category:** Newbie\
**Created:** [July 24, 2019, 11:57pm UTC](https://root-forum.cern.ch/t/error-in-parameter-settings/35328 "2019-07-24T23:57:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shahina](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/shahina/32/19464_2.png) [@shahina](https://root-forum.cern.ch/u/shahina)\
**Post date:** [July 24, 2019, 11:57pm UTC](https://root-forum.cern.ch/t/error-in-parameter-settings/35328/1 "2019-07-24T23:57:25Z")

</div>

When I am trying to run this macro I am getting an error in parameter settings. Can someone help me to fix that? I am attaching the input files and executable.

 ![Screenshot%20(17)](https://root-forum.cern.ch/uploads/default/original/3X/9/0/90e1c276f2b7916c5ebbf53db2451852996eaa51.jpeg)  
Here is the macro  
[mg25yields.cpp](https://root-forum.cern.ch/uploads/short-url/6ftTBBN12boXT0MVpTG2Snd0jx6.cpp) (5.8 KB)  
It includes these header files:  
[FitApeak.hh](https://root-forum.cern.ch/uploads/short-url/2g5TfPgg50bNxc2w7PaAeYDJSY6.hh) (2.6 KB) [Fit2peaks.hh](https://root-forum.cern.ch/uploads/short-url/10gvv4igRmntpgnerFGVKtbUd1T.hh) (3.0 KB)  
[Fit2peaks.cc](https://root-forum.cern.ch/uploads/short-url/x01k4Ubv0y2WcTrC0dSc6k7hHPQ.cc) (7.9 KB) [FitApeak.cc](https://root-forum.cern.ch/uploads/short-url/sy2LPd5pmcItvnwCh0sfZ8CoDt3.cc) (6.3 KB)  
Here is the CreateBgHists.root file :[calibratedBackgroundHists.root](https://root-forum.cern.ch/uploads/short-url/zMkn3UnLg0OGkiCmETr7MTaLf5G.root) (91.7 KB)  
Here are the rootfiles:  
[https://drive.google.com/file/d/1ZWEnOGk-xOU3KfKQMwa-ecoJS6oI4mn2/view?usp=sharing](https://drive.google.com/file/d/1ZWEnOGk-xOU3KfKQMwa-ecoJS6oI4mn2/view?usp=sharing)  
[https://drive.google.com/file/d/1D7aZXXu5d40XRZc\_dPPSujJUQfgJFotb/view?usp=sharing](https://drive.google.com/file/d/1D7aZXXu5d40XRZc_dPPSujJUQfgJFotb/view?usp=sharing)

---

<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:** [July 25, 2019, 3:22pm UTC](https://root-forum.cern.ch/t/error-in-parameter-settings/35328/2 "2019-07-25T15:22:41Z")

</div>

Hi,

The message seems to indicate you are setting parameter limits with bounds outside the parameter value. I see in your code, Fit2peaks.cc at around line 180 that you are setting few times parameter limits outside the given values. This might explain the problem. Be sure also that when you set the parameter values before fitting are within bounds.

I have tried to run the code, but could not so for missing calibration file. Next time maybe package in a way that it is easier to run and all input files can be easily found

Lorenzo
