diff options
author | tlatorre <tlatorre@uchicago.edu> | 2018-09-17 11:45:21 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2018-09-17 11:45:21 -0500 |
commit | b35460c7d2e634aeb7b7db16928d61ff0cc5f0d1 (patch) | |
tree | 48d9d18d4283d5dec3b1dcc7602c7d46e5960b60 /src/path.h | |
parent | 49e982b4bc495ad9947685a2844ccd03b0a7bc2f (diff) | |
download | sddm-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/path.h')
-rw-r--r-- | src/path.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -14,7 +14,7 @@ * FIXME: Should do some tests to figure out what is the best value. */ #define MIN_THETA0 0.01 -typedef double getKineticEnergyFunc(double x, double T0); +typedef double getKineticEnergyFunc(double x, void *params); typedef struct path { double pos[3]; @@ -35,7 +35,7 @@ typedef struct path { } path; double path_get_coefficient(unsigned int k, double *s, double *x, double theta0, size_t n); -path *path_init(double *pos, double *dir, double T0, double range, double theta0, getKineticEnergyFunc *fun, double *z1, double *z2, size_t n, double m); +path *path_init(double *pos, double *dir, double T0, double range, double theta0, getKineticEnergyFunc *fun, void *params, double *z1, double *z2, size_t n, double m); void path_eval(path *p, double s, double *pos, double *dir, double *T, double *t, double *theta0); void path_free(path *p); |