diff options
author | tlatorre <tlatorre@uchicago.edu> | 2019-03-25 17:22:08 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2019-03-25 17:22:08 -0500 |
commit | f95c7d693466f3a34197f5984ded37f1960773d3 (patch) | |
tree | 7e3877312e2336ee143c7b3a0823dab1a7338807 /src | |
parent | afb161aa87744990ba0806fd6c73fc39e38110e5 (diff) | |
download | sddm-f95c7d693466f3a34197f5984ded37f1960773d3.tar.gz sddm-f95c7d693466f3a34197f5984ded37f1960773d3.tar.bz2 sddm-f95c7d693466f3a34197f5984ded37f1960773d3.zip |
fix uninitialized variable
Thanks clang!
Diffstat (limited to 'src')
-rw-r--r-- | src/likelihood.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/likelihood.c b/src/likelihood.c index 1919a53..b0f6b94 100644 --- a/src/likelihood.c +++ b/src/likelihood.c @@ -727,11 +727,11 @@ static double get_total_charge_approx(double beta0, double *pos, double *dir, pa f = get_weighted_pmt_response(-cos_theta_pmt); f_reflec = get_weighted_pmt_reflectivity(-cos_theta_pmt); + get_path_length(tmp,pmts[i].pos,AV_RADIUS,&l_d2o,&l_h2o); + prob_abs = 1.0 - get_fabs_d2o(l_d2o)*get_fabs_h2o(l_h2o)*get_fabs_acrylic(AV_THICKNESS); prob_sct = 1.0 - get_fsct_d2o(l_d2o)*get_fsct_h2o(l_h2o); - get_path_length(tmp,pmts[i].pos,AV_RADIUS,&l_d2o,&l_h2o); - /* Assume the particle is travelling at the speed of light. */ *t = s/SPEED_OF_LIGHT + l_d2o*avg_index_d2o/SPEED_OF_LIGHT + l_h2o*avg_index_h2o/SPEED_OF_LIGHT; @@ -964,7 +964,7 @@ double nll_best(event *ev) return kahan_sum(nll,nhit); } -double nll(event *ev, vertex *v, size_t n, double dx, double dx_shower, int fast, int charge_only, int hit_only) +double nll(event *ev, vertex *v, size_t n, double dx, double dx_shower, const int fast, int charge_only, int hit_only) { /* Returns the negative log likelihood for event `ev` given a particle with * id `id`, initial kinetic energy `T0`, position `pos`, direction `dir` and |