Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Fit::ParameterSettings Class Reference

Class, describing value, limits and step size of the parameters Provides functionality also to set/retrieve values, step sizes, limits and fix the parameters.

To be done: add constraints (equality and inequality) as functions of the parameters

Definition at line 33 of file ParameterSettings.h.

Public Member Functions

 ParameterSettings ()
 Default constructor.
 
 ParameterSettings (const std::string &name, double val)
 constructor for fixed Parameter
 
 ParameterSettings (const std::string &name, double val, double err)
 constructor for unlimited named Parameter
 
 ParameterSettings (const std::string &name, double val, double err, double min, double max)
 constructor for double limited Parameter. The given value should be within the given limits [min,max]
 
void Fix ()
 fix the parameter
 
bool HasLowerLimit () const
 check if parameter has lower limit
 
bool HasUpperLimit () const
 check if parameter has upper limit
 
bool IsBound () const
 check if is bound
 
bool IsDoubleBound () const
 check if is double bound (upper AND lower limit)
 
bool IsFixed () const
 check if is fixed
 
double LowerLimit () const
 return lower limit value
 
const std::string & Name () const
 return name
 
void Release ()
 release the parameter
 
void RemoveLimits ()
 remove all limit
 
void Set (const std::string &name, double value)
 set a fixed parameter
 
void Set (const std::string &name, double value, double step)
 set value and name (unlimited parameter)
 
void Set (const std::string &name, double value, double step, double lower, double upper)
 set a limited parameter. The given value should be within the given limits [min,max]
 
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 current parameter value should be within the given limits [low,up].
 
void SetLowerLimit (double low)
 set a single lower limit
 
void SetName (const std::string &name)
 interaction
 
void SetStepSize (double err)
 set the step size
 
void SetUpperLimit (double up)
 set a single upper limit
 
void SetValue (double val)
 set the value
 
double StepSize () const
 return step size
 
double UpperLimit () const
 return upper limit value
 
double Value () const
 return parameter value
 

Private Attributes

bool fFix = false
 flag to control if parameter is fixed
 
bool fHasLowerLimit = false
 flag to control lower parameter limit
 
bool fHasUpperLimit = false
 flag to control upper parameter limit
 
double fLowerLimit = 0.0
 lower parameter limit
 
std::string fName
 parameter name
 
double fStepSize = 0.1
 parameter step size (used by minimizer)
 
double fUpperLimit = 0.0
 upper parameter limit
 
double fValue = 0.0
 parameter value
 

#include <Fit/ParameterSettings.h>

Constructor & Destructor Documentation

◆ ParameterSettings() [1/4]

ROOT::Fit::ParameterSettings::ParameterSettings ( )
inline

Default constructor.

Definition at line 40 of file ParameterSettings.h.

◆ ParameterSettings() [2/4]

ROOT::Fit::ParameterSettings::ParameterSettings ( const std::string &  name,
double  val,
double  err 
)
inline

constructor for unlimited named Parameter

Definition at line 44 of file ParameterSettings.h.

◆ ParameterSettings() [3/4]

ROOT::Fit::ParameterSettings::ParameterSettings ( const std::string &  name,
double  val,
double  err,
double  min,
double  max 
)
inline

constructor for double limited Parameter. The given value should be within the given limits [min,max]

Definition at line 50 of file ParameterSettings.h.

◆ ParameterSettings() [4/4]

ROOT::Fit::ParameterSettings::ParameterSettings ( const std::string &  name,
double  val 
)
inline

constructor for fixed Parameter

Definition at line 59 of file ParameterSettings.h.

Member Function Documentation

◆ Fix()

void ROOT::Fit::ParameterSettings::Fix ( )
inline

fix the parameter

Definition at line 116 of file ParameterSettings.h.

◆ HasLowerLimit()

bool ROOT::Fit::ParameterSettings::HasLowerLimit ( ) const
inline

check if parameter has lower limit

Definition at line 100 of file ParameterSettings.h.

◆ HasUpperLimit()

bool ROOT::Fit::ParameterSettings::HasUpperLimit ( ) const
inline

check if parameter has upper limit

Definition at line 102 of file ParameterSettings.h.

◆ IsBound()

bool ROOT::Fit::ParameterSettings::IsBound ( ) const
inline

check if is bound

Definition at line 104 of file ParameterSettings.h.

◆ IsDoubleBound()

bool ROOT::Fit::ParameterSettings::IsDoubleBound ( ) const
inline

check if is double bound (upper AND lower limit)

Definition at line 106 of file ParameterSettings.h.

◆ IsFixed()

bool ROOT::Fit::ParameterSettings::IsFixed ( ) const
inline

check if is fixed

Definition at line 98 of file ParameterSettings.h.

◆ LowerLimit()

double ROOT::Fit::ParameterSettings::LowerLimit ( ) const
inline

return lower limit value

Definition at line 94 of file ParameterSettings.h.

◆ Name()

const std::string & ROOT::Fit::ParameterSettings::Name ( ) const
inline

return name

Definition at line 108 of file ParameterSettings.h.

◆ Release()

void ROOT::Fit::ParameterSettings::Release ( )
inline

release the parameter

Definition at line 118 of file ParameterSettings.h.

◆ RemoveLimits()

void ROOT::Fit::ParameterSettings::RemoveLimits ( )
inline

remove all limit

Definition at line 140 of file ParameterSettings.h.

◆ Set() [1/3]

void ROOT::Fit::ParameterSettings::Set ( const std::string &  name,
double  value 
)
inline

set a fixed parameter

Definition at line 83 of file ParameterSettings.h.

◆ Set() [2/3]

void ROOT::Fit::ParameterSettings::Set ( const std::string &  name,
double  value,
double  step 
)
inline

set value and name (unlimited parameter)

Definition at line 68 of file ParameterSettings.h.

◆ Set() [3/3]

void ROOT::Fit::ParameterSettings::Set ( const std::string &  name,
double  value,
double  step,
double  lower,
double  upper 
)
inline

set a limited parameter. The given value should be within the given limits [min,max]

Definition at line 75 of file ParameterSettings.h.

◆ SetLimits()

void ROOT::Fit::ParameterSettings::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 current parameter value should be within the given limits [low,up].

If the value is outside the limits, then a new parameter value is set to = (up+low)/2

Definition at line 25 of file ParameterSettings.cxx.

◆ SetLowerLimit()

void ROOT::Fit::ParameterSettings::SetLowerLimit ( double  low)
inline

set a single lower limit

Definition at line 132 of file ParameterSettings.h.

◆ SetName()

void ROOT::Fit::ParameterSettings::SetName ( const std::string &  name)
inline

interaction

set name

Definition at line 113 of file ParameterSettings.h.

◆ SetStepSize()

void ROOT::Fit::ParameterSettings::SetStepSize ( double  err)
inline

set the step size

Definition at line 122 of file ParameterSettings.h.

◆ SetUpperLimit()

void ROOT::Fit::ParameterSettings::SetUpperLimit ( double  up)
inline

set a single upper limit

Definition at line 125 of file ParameterSettings.h.

◆ SetValue()

void ROOT::Fit::ParameterSettings::SetValue ( double  val)
inline

set the value

Definition at line 120 of file ParameterSettings.h.

◆ StepSize()

double ROOT::Fit::ParameterSettings::StepSize ( ) const
inline

return step size

Definition at line 92 of file ParameterSettings.h.

◆ UpperLimit()

double ROOT::Fit::ParameterSettings::UpperLimit ( ) const
inline

return upper limit value

Definition at line 96 of file ParameterSettings.h.

◆ Value()

double ROOT::Fit::ParameterSettings::Value ( ) const
inline

return parameter value

Definition at line 90 of file ParameterSettings.h.

Member Data Documentation

◆ fFix

bool ROOT::Fit::ParameterSettings::fFix = false
private

flag to control if parameter is fixed

Definition at line 151 of file ParameterSettings.h.

◆ fHasLowerLimit

bool ROOT::Fit::ParameterSettings::fHasLowerLimit = false
private

flag to control lower parameter limit

Definition at line 154 of file ParameterSettings.h.

◆ fHasUpperLimit

bool ROOT::Fit::ParameterSettings::fHasUpperLimit = false
private

flag to control upper parameter limit

Definition at line 155 of file ParameterSettings.h.

◆ fLowerLimit

double ROOT::Fit::ParameterSettings::fLowerLimit = 0.0
private

lower parameter limit

Definition at line 152 of file ParameterSettings.h.

◆ fName

std::string ROOT::Fit::ParameterSettings::fName
private

parameter name

Definition at line 157 of file ParameterSettings.h.

◆ fStepSize

double ROOT::Fit::ParameterSettings::fStepSize = 0.1
private

parameter step size (used by minimizer)

Definition at line 150 of file ParameterSettings.h.

◆ fUpperLimit

double ROOT::Fit::ParameterSettings::fUpperLimit = 0.0
private

upper parameter limit

Definition at line 153 of file ParameterSettings.h.

◆ fValue

double ROOT::Fit::ParameterSettings::fValue = 0.0
private

parameter value

Definition at line 149 of file ParameterSettings.h.

Libraries for ROOT::Fit::ParameterSettings:

The documentation for this class was generated from the following files: