aboutsummaryrefslogtreecommitdiff
path: root/src/optics.h
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-03-25 14:37:54 -0500
committertlatorre <tlatorre@uchicago.edu>2019-03-25 14:37:54 -0500
commitfb7b16c521e08d20ac1d10729c333b7496b68210 (patch)
tree2d6dbbd1fb06989966a2570b341ad38952adba04 /src/optics.h
parent555429b348c834d795221ce4c1cc90dd856bcaf8 (diff)
downloadsddm-fb7b16c521e08d20ac1d10729c333b7496b68210.tar.gz
sddm-fb7b16c521e08d20ac1d10729c333b7496b68210.tar.bz2
sddm-fb7b16c521e08d20ac1d10729c333b7496b68210.zip
speed up likelihood function by not calling trapz()
This commit speeds up the likelihood function by integrating the charge along the track inline instead of creating an array and then calling trapz(). It also introduces two global variables avg_index_d2o and avg_index_h2o which are the average indices of refraction for D2O and H2O weighted by the PMT quantum efficiency and the Cerenkov spectrum.
Diffstat (limited to 'src/optics.h')
-rw-r--r--src/optics.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/optics.h b/src/optics.h
index 70ff53b..4b41c6b 100644
--- a/src/optics.h
+++ b/src/optics.h
@@ -22,6 +22,8 @@
/* Global error string when optics_init() returns -1. */
extern char optics_err[256];
+extern double avg_index_h2o, avg_index_d2o;
+
/* Initialize the optics data by reading in the RSPR bank and precomputing the
* average absorption and scattering tables. */
int optics_init(dict *db);