diff options
Diffstat (limited to 'src/likelihood.c')
-rw-r--r-- | src/likelihood.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/likelihood.c b/src/likelihood.c index 6881e8f..fca14cc 100644 --- a/src/likelihood.c +++ b/src/likelihood.c @@ -153,7 +153,7 @@ double get_total_charge_approx(double T0, double *pos, double *dir, muon_energy * * `smax` is currently calculated as the point where the particle velocity * drops to 0.8 times the speed of light. */ - double pmt_dir[3], tmp[3], R, cos_theta, theta, x, z, s, a, b, beta, E, p, T, omega, theta_cerenkov, n, sin_theta, E0, p0, beta0, f, cos_theta_pmt, absorption_length, wavelength0; + double pmt_dir[3], tmp[3], R, cos_theta, theta, x, z, s, a, b, beta, E, p, T, omega, theta_cerenkov, n, sin_theta, E0, p0, beta0, f, cos_theta_pmt, absorption_length_h2o, absorption_length_d2o, l_h2o, l_d2o, wavelength0; /* Calculate beta at the start of the track. */ E0 = T0 + MUON_MASS; @@ -253,9 +253,12 @@ double get_total_charge_approx(double T0, double *pos, double *dir, muon_energy f = get_weighted_pmt_response(acos(-cos_theta_pmt)); - absorption_length = get_absorption_length_snoman_d2o(wavelength0); + absorption_length_d2o = get_absorption_length_snoman_d2o(wavelength0); + absorption_length_h2o = get_absorption_length_snoman_h2o(wavelength0); - return f*exp(-a/absorption_length)*n*x*beta0*prob*(1/sin_theta)*omega*(erf((a+b*(smax-s)+n*(smax-z)*beta0)/frac) + erf((-a+b*s+n*z*beta0)/frac))/(b+n*beta0)/(4*M_PI); + get_path_length(tmp,pmts[i].pos,AV_RADIUS,&l_d2o,&l_h2o); + + return f*exp(-l_d2o/absorption_length_d2o)*exp(-l_h2o/absorption_length_h2o)*n*x*beta0*prob*(1/sin_theta)*omega*(erf((a+b*(smax-s)+n*(smax-z)*beta0)/frac) + erf((-a+b*s+n*z*beta0)/frac))/(b+n*beta0)/(4*M_PI); } typedef struct betaRootParams { |