From 4f5efbe59a58bd21471ba4021d7640399799d0b6 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 18 Nov 2019 10:23:54 -0600 Subject: initialize mu_indirect to 0 This commit updates the likelihood function to initialize mu_indirect to 0.0 since it's a static array. This can have an impact when the fit position is outside of the PSUP and we skip calculating the charges. --- src/likelihood.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/likelihood.c b/src/likelihood.c index 4a368c6..2c2f34e 100644 --- a/src/likelihood.c +++ b/src/likelihood.c @@ -1262,6 +1262,10 @@ double nll(event *ev, vertex *v, size_t n, double dx, int ns, const int fast, in exit(1); } + for (i = 0; i < LEN(mu_indirect); i++) { + mu_indirect[i] = 0.0; + } + /* Initialize static arrays. */ for (i = 0; i < MAX_PMTS; i++) { mu_sum[i] = 0.0; -- cgit