Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ParameterSettings.cxx
Go to the documentation of this file.
1// @(#)root/mathcore:$Id$
2// Author: L. Moneta Thu Sep 21 16:21:48 2006
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
7 * *
8 * *
9 **********************************************************************/
10
11// Implementation file for class ParameterSettings
12
14
15#include <Math/Error.h>
16
17namespace ROOT {
18
19namespace Fit {
20
21/// set a double side limit,
22/// if low == up the parameter is fixed if low > up the limits are removed
23/// The current parameter value should be within the given limits [low,up].
24/// If the value is outside the limits, then a new parameter value is set to = (up+low)/2
25void ParameterSettings::SetLimits(double low, double up)
26{
27
28 if (low > up) {
30 return;
31 }
32 if (low == up && low == fValue) {
33 Fix();
34 return;
35 }
36 if (low > fValue || up < fValue) {
37 MATH_INFO_MSG("ParameterSettings",
38 "lower/upper bounds outside current parameter value. The value will be set to (low+up)/2 ");
39 fValue = 0.5 * (up + low);
40 }
41 fLowerLimit = low;
42 fUpperLimit = up;
43 fHasLowerLimit = true;
44 fHasUpperLimit = true;
45}
46
47} // end namespace Fit
48
49} // end namespace ROOT
#define MATH_INFO_MSG(loc, str)
Pre-processor macro to report messages which can be configured to use ROOT error or simply an std::io...
Definition Error.h:77
void RemoveLimits()
remove all limit
double fLowerLimit
lower parameter limit
double fUpperLimit
upper parameter limit
bool fHasUpperLimit
flag to control upper parameter limit
bool fHasLowerLimit
flag to control lower parameter limit
void SetLimits(double low, double up)
set a double side limit, if low == up the parameter is fixed if low > up the limits are removed The c...
void Fix()
fix the parameter
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
Definition HFitImpl.cxx:133
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...