File indexing completed on 2025-09-16 09:08:16
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(std::span<const double>, std::span<const double>);
0042
0043 MnUserParameters(const MnUserParameters &par) : fTransformation(par.fTransformation) {}
0044
0045 MnUserParameters &operator=(const MnUserParameters &par)
0046 {
0047 fTransformation = par.fTransformation;
0048 return *this;
0049 }
0050
0051 const MnUserTransformation &Trafo() const { return fTransformation; }
0052
0053 unsigned int VariableParameters() const { return fTransformation.VariableParameters(); }
0054
0055
0056 const std::vector<ROOT::Minuit2::MinuitParameter> &Parameters() const;
0057
0058
0059 std::vector<double> Params() const;
0060 std::vector<double> Errors() const;
0061
0062
0063 const MinuitParameter &Parameter(unsigned int) const;
0064
0065
0066 bool Add(const std::string &, double, double);
0067
0068 bool Add(const std::string &, double, double, double, double);
0069
0070 bool Add(const std::string &, double);
0071
0072
0073 void Fix(unsigned int);
0074 void Release(unsigned int);
0075 void RemoveLimits(unsigned int);
0076 void SetValue(unsigned int, double);
0077 void SetError(unsigned int, double);
0078 void SetLimits(unsigned int, double, double);
0079 void SetUpperLimit(unsigned int, double);
0080 void SetLowerLimit(unsigned int, double);
0081 void SetName(unsigned int, const std::string &);
0082
0083 double Value(unsigned int) const;
0084 double Error(unsigned int) const;
0085
0086
0087 void Fix(const std::string &);
0088 void Release(const std::string &);
0089 void SetValue(const std::string &, double);
0090 void SetError(const std::string &, double);
0091 void SetLimits(const std::string &, double, double);
0092 void SetUpperLimit(const std::string &, double);
0093 void SetLowerLimit(const std::string &, double);
0094 void RemoveLimits(const std::string &);
0095
0096 double Value(const std::string &) const;
0097 double Error(const std::string &) const;
0098
0099
0100 unsigned int Index(const std::string &) const;
0101
0102 const std::string &GetName(unsigned int) const;
0103
0104 const char *Name(unsigned int) const;
0105
0106 const MnMachinePrecision &Precision() const;
0107 void SetPrecision(double eps) { fTransformation.SetPrecision(eps); }
0108
0109 private:
0110 MnUserTransformation fTransformation;
0111 };
0112
0113 }
0114
0115 }
0116
0117 #endif