diff options
author | tlatorre <tlatorre@uchicago.edu> | 2018-11-14 15:24:25 -0600 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2018-11-14 15:24:25 -0600 |
commit | 8b16bcb386c4e9dd4f7601159858d40b96b4449e (patch) | |
tree | 708d2066a03d91c81fdeb0a1e8e6962579fee03a | |
parent | fc8db35aeda8d2bc02a023b9ebcd8b8cddadcbed (diff) | |
download | sddm-8b16bcb386c4e9dd4f7601159858d40b96b4449e.tar.gz sddm-8b16bcb386c4e9dd4f7601159858d40b96b4449e.tar.bz2 sddm-8b16bcb386c4e9dd4f7601159858d40b96b4449e.zip |
update TODO and small updates to likelihood calculation
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | src/likelihood.c | 12 |
2 files changed, 5 insertions, 8 deletions
@@ -29,3 +29,4 @@ other rings - add rayleigh scattering to likelihood function - add muon shower PDF? delta rays? +- calculate path length through acrylic? diff --git a/src/likelihood.c b/src/likelihood.c index ca73902..707ff38 100644 --- a/src/likelihood.c +++ b/src/likelihood.c @@ -224,11 +224,7 @@ static double get_expected_charge(double x, double beta, double theta0, double * R = NORM(pos); - if (R <= AV_RADIUS) { - n = n_d2o; - } else { - n = n_h2o; - } + n = (R <= AV_RADIUS) ? n_d2o : n_h2o; *reflected = 0.0; if (beta < 1/n) return 0.0; @@ -646,10 +642,10 @@ double nll_muon(event *ev, int id, double T0, double *pos, double *dir, double t path *path; static double mu_direct[MAX_PMTS]; - static double mu_shower[MAX_PMTS] = {0}; + static double mu_shower[MAX_PMTS]; static double ts[MAX_PMTS]; - static double ts_shower[MAX_PMTS] = {0}; - static double ts_sigma[MAX_PMTS] = {0}; + static double ts_shower[MAX_PMTS]; + static double ts_sigma[MAX_PMTS]; static double mu[MAX_PMTS]; double mu_noise, mu_indirect; |