File indexing completed on 2025-01-18 10:10:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef ROOT_Minuit2_MnUserParameters
0011 #define ROOT_Minuit2_MnUserParameters
0012
0013 #include "Minuit2/MnUserTransformation.h"
0014
0015 #include <vector>
0016 #include <string>
0017
0018 namespace ROOT {
0019
0020 namespace Minuit2 {
0021
0022 class MnMachinePrecision;
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 class MnUserParameters {
0037
0038 public:
0039 MnUserParameters() : fTransformation(MnUserTransformation()) {}
0040
0041 MnUserParameters(const std::vector<double> &, const std::vector<double> &);
0042
0043 ~MnUserParameters() {}
0044
0045 MnUserParameters(const MnUserParameters &par) : fTransformation(par.fTransformation) {}
0046
0047 MnUserParameters &operator=(const MnUserParameters &par)
0048 {
0049 fTransformation = par.fTransformation;
0050 return *this;
0051 }
0052
0053 const MnUserTransformation &Trafo() const { return fTransformation; }
0054
0055 unsigned int VariableParameters() const { return fTransformation.VariableParameters(); }
0056
0057
0058 const std::vector<ROOT::Minuit2::MinuitParameter> &Parameters() const;
0059
0060
0061 std::vector<double> Params() const;
0062 std::vector<double> Errors() const;
0063
0064
0065 const MinuitParameter &Parameter(unsigned int) const;
0066
0067
0068 bool Add(const std::string &, double, double);
0069
0070 bool Add(const std::string &, double, double, double, double);
0071
0072 bool Add(const std::string &, double);
0073
0074
0075 void Fix(unsigned int);
0076 void Release(unsigned int);
0077 void RemoveLimits(unsigned int);
0078 void SetValue(unsigned int, double);
0079 void SetError(unsigned int, double);
0080 void SetLimits(unsigned int, double, double);
0081 void SetUpperLimit(unsigned int, double);
0082 void SetLowerLimit(unsigned int, double);
0083 void SetName(unsigned int, const std::string &);
0084
0085 double Value(unsigned int) const;
0086 double Error(unsigned int) const;
0087
0088
0089 void Fix(const std::string &);
0090 void Release(const std::string &);
0091 void SetValue(const std::string &, double);
0092 void SetError(const std::string &, double);
0093 void SetLimits(const std::string &, double, double);
0094 void SetUpperLimit(const std::string &, double);
0095 void SetLowerLimit(const std::string &, double);
0096 void RemoveLimits(const std::string &);
0097
0098 double Value(const std::string &) const;
0099 double Error(const std::string &) const;
0100
0101
0102 unsigned int Index(const std::string &) const;
0103
0104 const std::string &GetName(unsigned int) const;
0105
0106 const char *Name(unsigned int) const;
0107
0108 const MnMachinePrecision &Precision() const;
0109 void SetPrecision(double eps) { fTransformation.SetPrecision(eps); }
0110
0111 private:
0112 MnUserTransformation fTransformation;
0113 };
0114
0115 }
0116
0117 }
0118
0119 #endif