28 std::vector<double> pos = gdg.
Positions();
30 std::vector<double> var = gdg.
Variances();
38 double dx = pos[1]-pos[0];
40 for(
unsigned int i = 0; i < meas.size(); i++) {
42 x += (meas[i]*pos[i]);
43 x2 += (meas[i]*pos[i]*pos[i]);
47 double rms2 = x2/norm - mean*mean;
48 double rms = rms2 > 0. ?
sqrt(rms2) : 1.;
53 upar.
Add(
"mean", mean, 0.1);
54 upar.
Add(
"sigma", rms, 0.1);
55 upar.
Add(
"area", area, 0.1);
65 std::cout <<
"Minimize using FUMILI : \n" << std::endl;
73 std::cout<<
"minimum: "<<min<<std::endl;
78 std::cout <<
"Minimize using MIGRAD : \n" << std::endl;
85 std::cout<<
"minimum: "<<min<<std::endl;
API class for minimization using Variable Metric technology ("MIGRAD"); allows for user interaction: ...
bool Add(const std::string &, double, double)
Add free Parameter Name, Value, Error.
static const double x2[5]
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
Sample implementation of a parametric function.
Class implementing the standard chi square function, which is the sum of the squares of the figures-o...
std::vector< double > Variances() const
std::vector< double > Measurements() const
API class for the user interaction with the parameters; serves as input to the minimizer as well as o...
std::vector< double > Positions() const
double norm(double *x, double *p)
API class for minimization using Fumili technology; allows for user interaction: set/change parameter...