From d50b813868ed5e1cb57cb7adae0a00f2e8f42e52 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Tue, 25 Sep 2018 09:40:02 -0500 Subject: increase maxeval to 20 for the "quick" minimization phase When testing out the fitter on 500 MeV muons, there was at least one event which started out at a position very far from the true position. This event had a secondary electron like ring which is what I suspect caused the fit to start out in a position far from the true position. This fix correctly starts the minimization close to the true position. In the future I should look at updating get_direction() so that it finds the largest ring direction instead of just doing a weighted average of all the vectors from the position to the PMTs. --- src/fit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fit.c b/src/fit.c index 8ebaeec..9bcc580 100644 --- a/src/fit.c +++ b/src/fit.c @@ -5189,7 +5189,7 @@ int fit_event(event *ev, double *xopt, double *fmin) fpars.fast = 1; fpars.print = 0; nlopt_set_ftol_abs(opt, 1.0); - nlopt_set_maxeval(opt, 10); + nlopt_set_maxeval(opt, 20); for (i = 0; i < sizeof(startingParameters)/sizeof(startingParameters[0]); i++) { memcpy(x,x0,sizeof(x)); -- cgit