From 22090220988bd7d5631481c5b4cbfa2f95c11131 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Tue, 27 Nov 2018 16:15:47 -0600 Subject: add separate CHARGE_FRACTION variables for electrons and muons --- src/likelihood.c | 5 ++++- src/likelihood.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/likelihood.c b/src/likelihood.c index eb2eb94..40261f9 100644 --- a/src/likelihood.c +++ b/src/likelihood.c @@ -901,7 +901,10 @@ double nll_muon(event *ev, int id, double T0, double *pos, double *dir, double t particle_free(p); mu_noise = DARK_RATE*GTVALID*1e-9; - mu_indirect *= CHARGE_FRACTION/10000.0; + if (id == IDP_E_MINUS || id == IDP_E_PLUS) + mu_indirect *= CHARGE_FRACTION_ELECTRON/10000.0; + else + mu_indirect *= CHARGE_FRACTION_MUON/10000.0; /* Compute the expected number of photons reaching each PMT by adding up * the contributions from the noise hits and the direct, indirect, and diff --git a/src/likelihood.h b/src/likelihood.h index f06695c..be003d3 100644 --- a/src/likelihood.h +++ b/src/likelihood.h @@ -30,7 +30,8 @@ #define MIN_RATIO_FAST -2 /* The fraction of reflected light which is detected. */ -#define CHARGE_FRACTION 0.5 +#define CHARGE_FRACTION_ELECTRON 0.4 +#define CHARGE_FRACTION_MUON 0.5 /* Dark rate of the PMTs (Hz). * -- cgit