aboutsummaryrefslogtreecommitdiff
path: root/src/misc.h
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2018-09-17 14:03:59 -0500
committertlatorre <tlatorre@uchicago.edu>2018-09-17 14:03:59 -0500
commitf60f7aa42a7e2ea2d213c836d2997a39cf45eb29 (patch)
tree0c56332b4988e6c509bf6ec8aa97eba41f98d804 /src/misc.h
parent500f23754ba90d34eea00f76b222458dce353d96 (diff)
downloadsddm-f60f7aa42a7e2ea2d213c836d2997a39cf45eb29.tar.gz
sddm-f60f7aa42a7e2ea2d213c836d2997a39cf45eb29.tar.bz2
sddm-f60f7aa42a7e2ea2d213c836d2997a39cf45eb29.zip
add get_path_length()
This commit adds a function called get_path_length() which computes the path length inside and outside a sphere for a line segment between two points. This will be useful for calculating the photon absorption for paths which cross the AV and for computing the time of flight of photons from a track to a PMT.
Diffstat (limited to 'src/misc.h')
-rw-r--r--src/misc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/misc.h b/src/misc.h
index 6e9095a..f44125a 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -6,6 +6,7 @@
#define LN_MAX 100
#define LNFACT_MAX 100
+void get_path_length(double *pos1, double *pos2, double R, double *l1, double *l2);
double ln(unsigned int n);
double lnfact(unsigned int n);
double kahan_sum(double *x, size_t n);