aboutsummaryrefslogtreecommitdiff
path: root/src/test.c
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2018-11-17 12:44:22 -0600
committertlatorre <tlatorre@uchicago.edu>2018-11-17 12:44:22 -0600
commit7cb12a69eb94eafce80e05efe86716772b023bcd (patch)
treeec7a9cd427a1435fd5aa7561a3742af9a03887b9 /src/test.c
parent5a3edcfceecdfa594bd8c5286455bdfa7fe852fb (diff)
downloadsddm-7cb12a69eb94eafce80e05efe86716772b023bcd.tar.gz
sddm-7cb12a69eb94eafce80e05efe86716772b023bcd.tar.bz2
sddm-7cb12a69eb94eafce80e05efe86716772b023bcd.zip
speed up likelihood function and switch to using fixed dx
This commit speeds up the likelihood function by about ~20% by using the precomputed track positions, directions, times, etc. instead of interpolating them on the fly. It also switches to computing the number of points to integrate along the track by dividing the track length by a specified distance, currently set to 1 cm. This should hopefully speed things up for lower energies and result in more stable fits at high energies.
Diffstat (limited to 'src/test.c')
-rw-r--r--src/test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test.c b/src/test.c
index fe5cb66..0828203 100644
--- a/src/test.c
+++ b/src/test.c
@@ -498,7 +498,7 @@ int test_path(char *err)
rand_sphere(dir0);
- path *p = path_init(pos0,dir0,T0,range,0.1,getKineticEnergy,NULL,NULL,NULL,0,m);
+ path *p = path_init(pos0,dir0,T0,range,1000,0.1,getKineticEnergy,NULL,NULL,NULL,0,m);
for (j = 0; j < 100; j++) {
s = range*j/99;