8 #include <Minuit2/FunctionMinimum.h> 9 #include <Minuit2/MnMigrad.h> 10 #include <Minuit2/MnPrint.h> 11 #include <Minuit2/MnUserParameters.h> 18 int main(
int argc,
char **argv) {
23 Minuit2::MnPrint::SetLevel(3);
26 Observable xvar{
"xvar", 0, log(1 + RAND_MAX / 2)};
32 for(
int i = 0; i < 100000; ++i) {
34 xvar.setValue(xvar.getUpperLimit() - log(1 + rand() / 2));
41 Variable alpha{
"alpha", -2, 0.1, -10, 10};
43 ExpPdf exppdf{
"exppdf", xvar, alpha};
49 Minuit2::MnMigrad migrad{fcn, upar};
51 Minuit2::FunctionMinimum min = migrad();
52 std::cout <<
"min= " << min << std::endl;
Special class for observables. Used in DataSets.
__host__ void setData(DataSet *data)
#define GOOFIT_PARSE(app,...)
int main(int argc, char **argv)