aboutsummaryrefslogtreecommitdiff
path: root/src/muon.h
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2018-09-17 11:45:21 -0500
committertlatorre <tlatorre@uchicago.edu>2018-09-17 11:45:21 -0500
commitb35460c7d2e634aeb7b7db16928d61ff0cc5f0d1 (patch)
tree48d9d18d4283d5dec3b1dcc7602c7d46e5960b60 /src/muon.h
parent49e982b4bc495ad9947685a2844ccd03b0a7bc2f (diff)
downloadsddm-b35460c7d2e634aeb7b7db16928d61ff0cc5f0d1.tar.gz
sddm-b35460c7d2e634aeb7b7db16928d61ff0cc5f0d1.tar.bz2
sddm-b35460c7d2e634aeb7b7db16928d61ff0cc5f0d1.zip
update muon kinetic energy calculation
This commit updates the calculation of the muon kinetic energy as a function of distance along the track. Previously I was using an approximation from the PDG, but it doesn't seem to be very accurate and won't generalize to the case of electrons. The kinetic energy is now calculated using the tabulated values of dE/dx as a function of energy.
Diffstat (limited to 'src/muon.h')
-rw-r--r--src/muon.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/muon.h b/src/muon.h
index e95cb3c..253a9df 100644
--- a/src/muon.h
+++ b/src/muon.h
@@ -1,10 +1,20 @@
#ifndef MUON_H
#define MUON_H
+#include <stddef.h> /* for size_t */
+
#define EULER_CONSTANT 0.57721
+typedef struct muon_energy {
+ double *x;
+ double *T;
+ size_t n;
+} muon_energy;
+
+muon_energy *muon_init_energy(double T0, double rho, size_t n);
+double muon_get_energy(double x, muon_energy *m);
+void muon_free_energy(muon_energy *m);
double get_range(double T, double rho);
-double get_T(double T0, double x, double rho);
double get_dEdx(double T, double rho);
double get_expected_charge(double x, double T, double T0, double *pos, double *dir, double *pmt_pos, double *pmt_normal, double r);