Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
MnUserParameters.cxx
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
11
12namespace ROOT {
13
14namespace Minuit2 {
15
16MnUserParameters::MnUserParameters(std::span<const double> par, std::span<const double> err)
17 : fTransformation(par, err)
18{
19}
20
21// all implemented forwarding to MnUserTransformation class
22
23const std::vector<MinuitParameter> &MnUserParameters::Parameters() const
24{
25 // return vector of MinuitParameter objects
27}
28
29std::vector<double> MnUserParameters::Params() const
30{
31 // return std::vector of double with parameter values
32 return fTransformation.Params();
33}
34
35std::vector<double> MnUserParameters::Errors() const
36{
37 // return std::vector of double with parameter errors
38 return fTransformation.Errors();
39}
40
42{
43 // return the MinuitParameter object for index n (external)
45}
46
47bool MnUserParameters::Add(const std::string &name, double val, double err)
48{
49 // add a new unlimited parameter giving name, value and err (step size)
50 // return false if parameter already exists
51 return fTransformation.Add(name, val, err);
52}
53
54bool MnUserParameters::Add(const std::string &name, double val, double err, double low, double up)
55{
56 // add a new limited parameter giving name, value, err (step size) and lower/upper limits
57 // return false if parameter already exists
58 return fTransformation.Add(name, val, err, low, up);
59}
60
61bool MnUserParameters::Add(const std::string &name, double val)
62{
63 // add a new unlimited parameter giving name and value
64 // return false if parameter already exists
65 return fTransformation.Add(name, val);
66}
67
68void MnUserParameters::Fix(unsigned int n)
69{
70 // fix parameter n
72}
73
74void MnUserParameters::Release(unsigned int n)
75{
76 // release parameter n
78}
79
81{
82 // remove limits for parameter n
84}
85
86void MnUserParameters::SetValue(unsigned int n, double val)
87{
88 // set value for parameter n
90}
91
92void MnUserParameters::SetError(unsigned int n, double err)
93{
94 // set error for parameter n
96}
97
98void MnUserParameters::SetLimits(unsigned int n, double low, double up)
99{
100 // set limits (lower/upper) for parameter n
101 fTransformation.SetLimits(n, low, up);
102}
103
104void MnUserParameters::SetUpperLimit(unsigned int n, double up)
105{
106 // set upper limit for parameter n
108}
109
110void MnUserParameters::SetLowerLimit(unsigned int n, double low)
111{
112 // set lower limit for parameter n
114}
115
116void MnUserParameters::SetName(unsigned int n, const std::string &name)
117{
118 // set name for parameter n
120}
121
122double MnUserParameters::Value(unsigned int n) const
123{
124 // get value for parameter n
125 return fTransformation.Value(n);
126}
127
128double MnUserParameters::Error(unsigned int n) const
129{
130 // get error for parameter n
131 return fTransformation.Error(n);
132}
133
134// interface using parameter name
135
136void MnUserParameters::Fix(const std::string &name)
137{
138 // fix parameter
139 Fix(Index(name));
140}
141
142void MnUserParameters::Release(const std::string &name)
143{
144 // release parameter
146}
147
148void MnUserParameters::SetValue(const std::string &name, double val)
149{
150 // set value for parameter
151 SetValue(Index(name), val);
152}
153
154void MnUserParameters::SetError(const std::string &name, double err)
155{
156 // set error
157 SetError(Index(name), err);
158}
159
160void MnUserParameters::SetLimits(const std::string &name, double low, double up)
161{
162 // set lower/upper limits
163 SetLimits(Index(name), low, up);
164}
165
166void MnUserParameters::SetUpperLimit(const std::string &name, double up)
167{
168 // set upper limit
170}
171
172void MnUserParameters::SetLowerLimit(const std::string &name, double low)
173{
174 // set lower limit
176}
177
178void MnUserParameters::RemoveLimits(const std::string &name)
179{
180 // remove limits
182}
183
184double MnUserParameters::Value(const std::string &name) const
185{
186 // get parameter value
187 return Value(Index(name));
188}
189
190double MnUserParameters::Error(const std::string &name) const
191{
192 // get parameter error
193 return Error(Index(name));
194}
195
196unsigned int MnUserParameters::Index(const std::string &name) const
197{
198 // get index (external) corresponding to name
199 return fTransformation.Index(name);
200}
201
202const std::string &MnUserParameters::GetName(unsigned int n) const
203{
204 // get name corresponding to index (external)
205 return fTransformation.GetName(n);
206}
207const char *MnUserParameters::Name(unsigned int n) const
208{
209 // get name corresponding to index (external)
210 return fTransformation.Name(n);
211}
212
214{
215 // get global parameter precision
216 return fTransformation.Precision();
217}
218
219} // namespace Minuit2
220
221} // namespace ROOT
char name[80]
Definition TGX11.cxx:110
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.
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
const MinuitParameter & Parameter(unsigned int) const
access to single Parameter
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)
std::vector< double > Errors() const
const std::string & GetName(unsigned int) const
void SetUpperLimit(unsigned int, double)
bool Add(const std::string &, double, double)
Add free Parameter Name, Value, Error.
void SetLimits(unsigned int, double, double)
bool Add(const std::string &, double, double)
void SetName(unsigned int, const std::string &)
const std::vector< MinuitParameter > & Parameters() const
const char * Name(unsigned int) const
std::vector< double > Params() const
access to parameters and errors in column-wise representation
unsigned int Index(const std::string &) const
const std::string & GetName(unsigned int) const
void SetLimits(unsigned int, double, double)
const MnMachinePrecision & Precision() const
forwarded interface
const MinuitParameter & Parameter(unsigned int) const
const Int_t n
Definition legend1.C:16
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...