From 7478c6eab0b618817213893794b9ada1d836ac1c Mon Sep 17 00:00:00 2001 From: tlatorre Date: Fri, 31 Aug 2018 13:33:24 -0500 Subject: update the lower bound for the energy in the fit --- src/fit.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/fit.c b/src/fit.c index 66f9a12..36de76c 100644 --- a/src/fit.c +++ b/src/fit.c @@ -15,6 +15,8 @@ #include /* for PRIu32 macro */ #include /* for memcpy() */ #include /* for errno */ +#include "pdg.h" +#include "optics.h" #define EV_RECORD 0x45562020 // 'EV ' (as written to ZDAB file) @@ -70,7 +72,7 @@ double nll(unsigned int n, const double *x, double *grad, void *params) int fit_event(event *ev, double *xopt, double *fmin) { - double x[9], ss[9], lb[9], ub[9], fval; + double x[9], ss[9], lb[9], ub[9], fval, n; int rv; nlopt_opt opt = nlopt_create(NLOPT_LN_BOBYQA, 9); @@ -97,7 +99,9 @@ int fit_event(event *ev, double *xopt, double *fmin) ss[7] = 0.1; ss[8] = 0.1; - lb[0] = 1.0; + n = get_index_snoman_d2o(400.0); + + lb[0] = MUON_MASS/sqrt(1.0-1.0/(n*n)); lb[1] = -1000.0; lb[2] = -1000.0; lb[3] = -1000.0; @@ -107,7 +111,7 @@ int fit_event(event *ev, double *xopt, double *fmin) lb[7] = -10.0; lb[8] = -10.0; - ub[0] = 100000.0; + ub[0] = 10000.0; ub[1] = 1000.0; ub[2] = 1000.0; ub[3] = 1000.0; -- cgit