aboutsummaryrefslogtreecommitdiff
path: root/src/fit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fit.c')
-rw-r--r--src/fit.c10
1 files changed, 7 insertions, 3 deletions
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 <inttypes.h> /* for PRIu32 macro */
#include <string.h> /* for memcpy() */
#include <errno.h> /* 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;