Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
Searching...
No Matches
MnUserParameters.h
Go to the documentation of this file.
1// @(#)root/minuit2:$Id$
2// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7 * *
8 **********************************************************************/
9
10#ifndef ROOT_Minuit2_MnUserParameters
11#define ROOT_Minuit2_MnUserParameters
12
14
15#include <vector>
16#include <string>
17
18namespace ROOT {
19
20namespace Minuit2 {
21
22class MnMachinePrecision;
23
24/** API class for the user interaction with the parameters;
25 serves as input to the minimizer as well as output from it;
26 users can interact: Fix/release parameters, set values and errors, etc.;
27 parameters can be accessed via their Parameter number (determined
28 internally by Minuit and followed the order how the parameters are created)
29 or via their user-specified Name (10 character string).
30 Minuit has also an internal parameter number which is used during the minimization
31 (the fix parameter are skipped). The parameter number used in this class is the external
32 one. The class ROOT::Minuit2::MnUserTransformation is used to keep the
33 internal <-> external transformation
34 */
35
37
38public:
40
41 MnUserParameters(std::span<const double>, std::span<const double>);
42
44
46 {
48 return *this;
49 }
50
51 const MnUserTransformation &Trafo() const { return fTransformation; }
52
53 unsigned int VariableParameters() const { return fTransformation.VariableParameters(); }
54
55 /// access to parameters (row-wise)
56 const std::vector<ROOT::Minuit2::MinuitParameter> &Parameters() const;
57
58 /// access to parameters and errors in column-wise representation
59 std::vector<double> Params() const;
60 std::vector<double> Errors() const;
61
62 /// access to single Parameter
63 const MinuitParameter &Parameter(unsigned int) const;
64
65 /// Add free Parameter Name, Value, Error
66 bool Add(const std::string &, double, double);
67 /// Add limited Parameter Name, Value, Lower bound, Upper bound
68 bool Add(const std::string &, double, double, double, double);
69 /// Add const Parameter Name, vale
70 bool Add(const std::string &, double);
71
72 /// interaction via external number of Parameter
73 void Fix(unsigned int);
74 void Release(unsigned int);
75 void RemoveLimits(unsigned int);
76 void SetValue(unsigned int, double);
77 void SetError(unsigned int, double);
78 void SetLimits(unsigned int, double, double);
79 void SetUpperLimit(unsigned int, double);
80 void SetLowerLimit(unsigned int, double);
81 void SetName(unsigned int, const std::string &);
82
83 double Value(unsigned int) const;
84 double Error(unsigned int) const;
85
86 /// interaction via Name of Parameter
87 void Fix(const std::string &);
88 void Release(const std::string &);
89 void SetValue(const std::string &, double);
90 void SetError(const std::string &, double);
91 void SetLimits(const std::string &, double, double);
92 void SetUpperLimit(const std::string &, double);
93 void SetLowerLimit(const std::string &, double);
94 void RemoveLimits(const std::string &);
95
96 double Value(const std::string &) const;
97 double Error(const std::string &) const;
98
99 // convert Name into external number of Parameter
100 unsigned int Index(const std::string &) const;
101 // convert external number into Name of Parameter
102 const std::string &GetName(unsigned int) const;
103 // maintain interface with const char * for backward compatibility
104 const char *Name(unsigned int) const;
105
106 const MnMachinePrecision &Precision() const;
107 void SetPrecision(double eps) { fTransformation.SetPrecision(eps); }
108
109private:
111};
112
113} // namespace Minuit2
114
115} // namespace ROOT
116
117#endif // ROOT_Minuit2_MnUserParameters
class for the individual Minuit Parameter with Name and number; contains the input numbers for the mi...
Sets the relative floating point (double) arithmetic precision.
API class for the user interaction with the parameters; serves as input to the minimizer as well as o...
double Error(unsigned int) const
std::vector< double > Params() const
access to parameters and errors in column-wise representation
const char * Name(unsigned int) const
MnUserTransformation fTransformation
unsigned int Index(const std::string &) const
double Value(unsigned int) const
const MnMachinePrecision & Precision() const
void Fix(unsigned int)
interaction via external number of Parameter
void SetName(unsigned int, const std::string &)
void SetLowerLimit(unsigned int, double)
void SetError(unsigned int, double)
void SetValue(unsigned int, double)
const std::vector< ROOT::Minuit2::MinuitParameter > & Parameters() const
access to parameters (row-wise)
const MnUserTransformation & Trafo() const
std::vector< double > Errors() const
const std::string & GetName(unsigned int) const
MnUserParameters & operator=(const MnUserParameters &par)
void SetUpperLimit(unsigned int, double)
bool Add(const std::string &, double, double)
Add free Parameter Name, Value, Error.
MnUserParameters(const MnUserParameters &par)
unsigned int VariableParameters() const
void SetLimits(unsigned int, double, double)
class dealing with the transformation between user specified parameters (external) and internal param...
CPyCppyy::Parameter Parameter
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...