Logo ROOT  
Reference Guide
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
14 namespace Minuit2 {
15
16
17MnUserParameters::MnUserParameters(const std::vector<double>& par, const std::vector<double>& err) : fTransformation(par, err) {}
18
19// all implemented forwarding to MnUserTransformation class
20
21const std::vector<MinuitParameter>& MnUserParameters::Parameters() const {
22 // return vector of MinuitParameter objects
24}
25
26std::vector<double> MnUserParameters::Params() const {
27 // return std::vector of double with parameter values
28 return fTransformation.Params();
29}
30
31std::vector<double> MnUserParameters::Errors() const {
32 // return std::vector of double with parameter errors
33 return fTransformation.Errors();
34}
35
36const MinuitParameter& MnUserParameters::Parameter(unsigned int n) const {
37 // return the MinuitParameter object for index n (external)
39}
40
41bool MnUserParameters::Add(const std::string & name, double val, double err) {
42 // add a new unlimited parameter giving name, value and err (step size)
43 // return false if parameter already exists
44 return fTransformation.Add(name, val, err);
45}
46
47bool MnUserParameters::Add(const std::string & name, double val, double err, double low, double up) {
48 // add a new limited parameter giving name, value, err (step size) and lower/upper limits
49 // return false if parameter already exists
50 return fTransformation.Add(name, val, err, low, up);
51}
52
53bool MnUserParameters::Add(const std::string & name, double val) {
54 // add a new unlimited parameter giving name and value
55 // return false if parameter already exists
56 return fTransformation.Add(name, val);
57}
58
59void MnUserParameters::Fix(unsigned int n) {
60 // fix parameter n
62}
63
64void MnUserParameters::Release(unsigned int n) {
65 // release parameter n
67}
68
70 // remove limits for parameter n
72}
73
74void MnUserParameters::SetValue(unsigned int n, double val) {
75 // set value for parameter n
77}
78
79void MnUserParameters::SetError(unsigned int n, double err) {
80 // set error for parameter n
82}
83
84void MnUserParameters::SetLimits(unsigned int n, double low, double up) {
85 // set limits (lower/upper) for parameter n
86 fTransformation.SetLimits(n, low, up);
87}
88
89void MnUserParameters::SetUpperLimit(unsigned int n, double up) {
90 // set upper limit for parameter n
92}
93
94void MnUserParameters::SetLowerLimit(unsigned int n, double low) {
95 // set lower limit for parameter n
97}
98
99void MnUserParameters::SetName(unsigned int n, const std::string & name) {
100 // set name for parameter n
102}
103
104
105double MnUserParameters::Value(unsigned int n) const {
106 // get value for parameter n
107 return fTransformation.Value(n);
108}
109
110double MnUserParameters::Error(unsigned int n) const {
111 // get error for parameter n
112 return fTransformation.Error(n);
113}
114
115// interface using parameter name
116
117void MnUserParameters::Fix(const std::string & name) {
118 // fix parameter
119 Fix(Index(name));
120}
121
122void MnUserParameters::Release(const std::string & name) {
123 // release parameter
125}
126
127void MnUserParameters::SetValue(const std::string & name, double val) {
128 // set value for parameter
129 SetValue(Index(name), val);
130}
131
132void MnUserParameters::SetError(const std::string & name, double err) {
133 // set error
134 SetError(Index(name), err);
135}
136
137void MnUserParameters::SetLimits(const std::string & name, double low, double up) {
138 // set lower/upper limits
139 SetLimits(Index(name), low, up);
140}
141
142void MnUserParameters::SetUpperLimit(const std::string & name, double up) {
143 // set upper limit
145}
146
147void MnUserParameters::SetLowerLimit(const std::string & name, double low) {
148 // set lower limit
150}
151
152void MnUserParameters::RemoveLimits(const std::string & name) {
153 // remove limits
155}
156
157double MnUserParameters::Value(const std::string & name) const {
158 // get parameter value
159 return Value(Index(name));
160}
161
162double MnUserParameters::Error(const std::string & name) const {
163 // get parameter error
164 return Error(Index(name));
165}
166
167unsigned int MnUserParameters::Index(const std::string & name) const {
168 // get index (external) corresponding to name
169 return fTransformation.Index(name);
170}
171
172const std::string & MnUserParameters::GetName(unsigned int n) const {
173 // get name corresponding to index (external)
174 return fTransformation.GetName(n);
175}
176const char* MnUserParameters::Name(unsigned int n) const {
177 // get name corresponding to index (external)
178 return fTransformation.Name(n);
179}
180
182 // get global paramter precision
183 return fTransformation.Precision();
184}
185
186 } // namespace Minuit2
187
188} // namespace ROOT
char name[80]
Definition: TGX11.cxx:109
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)
void SetUpperLimit(unsigned int, double)
bool Add(const std::string &, double, double)
void SetLowerLimit(unsigned int, double)
void SetName(unsigned int, const std::string &)
const std::vector< MinuitParameter > & Parameters() const
std::vector< double > Errors() 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...
Definition: StringConv.hxx:21