00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef ROOT_Minuit2_MnUserParameters
00011 #define ROOT_Minuit2_MnUserParameters
00012
00013 #include "Minuit2/MnUserTransformation.h"
00014
00015
00016 #include <vector>
00017
00018 namespace ROOT {
00019
00020 namespace Minuit2 {
00021
00022
00023 class MnMachinePrecision;
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 class MnUserParameters {
00038
00039 public:
00040
00041 MnUserParameters() : fTransformation(MnUserTransformation()) {}
00042
00043 MnUserParameters(const std::vector<double>&, const std::vector<double>&);
00044
00045 ~MnUserParameters() {}
00046
00047 MnUserParameters(const MnUserParameters& par) :
00048 fTransformation(par.fTransformation) {}
00049
00050 MnUserParameters& operator=(const MnUserParameters& par) {
00051 fTransformation = par.fTransformation;
00052 return *this;
00053 }
00054
00055 const MnUserTransformation& Trafo() const {return fTransformation;}
00056
00057 unsigned int VariableParameters() const {
00058 return fTransformation.VariableParameters();
00059 }
00060
00061
00062 const std::vector<ROOT::Minuit2::MinuitParameter>& Parameters() const;
00063
00064
00065 std::vector<double> Params() const;
00066 std::vector<double> Errors() const;
00067
00068
00069 const MinuitParameter& Parameter(unsigned int) const;
00070
00071
00072 bool Add(const std::string &, double, double);
00073
00074 bool Add(const std::string &, double, double, double, double);
00075
00076 bool Add(const std::string &, double);
00077
00078
00079 void Fix(unsigned int);
00080 void Release(unsigned int);
00081 void SetValue(unsigned int, double);
00082 void SetError(unsigned int, double);
00083 void SetLimits(unsigned int, double, double);
00084 void SetUpperLimit(unsigned int, double);
00085 void SetLowerLimit(unsigned int, double);
00086 void RemoveLimits(unsigned int);
00087
00088 double Value(unsigned int) const;
00089 double Error(unsigned int) const;
00090
00091
00092 void Fix(const std::string &);
00093 void Release(const std::string &);
00094 void SetValue(const std::string &, double);
00095 void SetError(const std::string &, double);
00096 void SetLimits(const std::string &, double, double);
00097 void SetUpperLimit(const std::string &, double);
00098 void SetLowerLimit(const std::string &, double);
00099 void RemoveLimits(const std::string &);
00100
00101 double Value(const std::string &) const;
00102 double Error(const std::string &) const;
00103
00104
00105 unsigned int Index(const std::string &) const;
00106
00107 const std::string & GetName(unsigned int) const;
00108
00109 const char* Name(unsigned int) const;
00110
00111 const MnMachinePrecision& Precision() const;
00112 void SetPrecision(double eps) {fTransformation.SetPrecision(eps);}
00113
00114 private:
00115
00116 MnUserTransformation fTransformation;
00117 };
00118
00119 }
00120
00121 }
00122
00123 #endif // ROOT_Minuit2_MnUserParameters