aboutsummaryrefslogtreecommitdiff
path: root/src/test-path.c
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/test-path.c
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/test-path.c')
-rw-r--r--src/test-path.c4
1 files changed, 2 insertions, 2 deletions
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);