aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2018-08-31 13:33:24 -0500
committertlatorre <tlatorre@uchicago.edu>2018-08-31 13:33:24 -0500
commit7478c6eab0b618817213893794b9ada1d836ac1c (patch)
tree7f4ccf2ca8ec2b13f4d9bc502d71ab9a113265b7
parent8c9e0671ed475a8a73d755c9e0ba17fad9d518ad (diff)
downloadsddm-7478c6eab0b618817213893794b9ada1d836ac1c.tar.gz
sddm-7478c6eab0b618817213893794b9ada1d836ac1c.tar.bz2
sddm-7478c6eab0b618817213893794b9ada1d836ac1c.zip
update the lower bound for the energy in the fit
-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;