From b35460c7d2e634aeb7b7db16928d61ff0cc5f0d1 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 17 Sep 2018 11:45:21 -0500 Subject: 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. --- src/test-path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test-path.c') diff --git a/src/test-path.c b/src/test-path.c index 7b0a9cd..bca82a4 100644 --- a/src/test-path.c +++ b/src/test-path.c @@ -13,7 +13,7 @@ typedef struct sim { path *p; } sim; -static double getKineticEnergy(double x, double T0) +static double getKineticEnergy(double x, void *params) { return 1.0; } @@ -85,7 +85,7 @@ sim *simulate_path(double *pos0, double *dir0, double range, double theta0, size z2[i] = path_get_coefficient(i+1,s,theta2,theta0,N); } - simvalue->p = path_init(pos0,dir0,1.0,range,theta0,getKineticEnergy,z1,z2,n,1.0); + simvalue->p = path_init(pos0,dir0,1.0,range,theta0,getKineticEnergy,NULL,z1,z2,n,1.0); free(s); free(theta1); -- cgit