aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-06-14 12:26:10 -0500
committertlatorre <tlatorre@uchicago.edu>2019-06-14 12:26:10 -0500
commit89b3fd9989c8e19fe1ffd4d18e0c2e17cdee790a (patch)
tree8dd9c7bc5602e6bea49a4da3be14c5ab189ca135 /src
parent1637b9fc877c6abb931143d5e00af231ede552c0 (diff)
downloadsddm-89b3fd9989c8e19fe1ffd4d18e0c2e17cdee790a.tar.gz
sddm-89b3fd9989c8e19fe1ffd4d18e0c2e17cdee790a.tar.bz2
sddm-89b3fd9989c8e19fe1ffd4d18e0c2e17cdee790a.zip
set the starting energy to MAX_ENERGY if it's greater
Also increase the maximum kinetic energy to 10^4 GeV which is approximately the maximum expected energy for cosmic muons at SNO.
Diffstat (limited to 'src')
-rw-r--r--src/fit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fit.c b/src/fit.c
index e4e054f..cb8409b 100644
--- a/src/fit.c
+++ b/src/fit.c
@@ -49,8 +49,11 @@
#define MAX_PARS 100
/* Maximum number of peaks to search for in Hough transform. */
#define MAX_NPEAKS 10
-/* Maximum kinetic energy for any particle. */
-#define MAX_ENERGY 10000
+/* Maximum kinetic energy for any particle. Currently set to 10^4 GeV which is
+ * approximately the energy of the most energetic muons in SNO (see the paper
+ * "Measurement of the Cosmic Ray and Neutrino-Induced Muon Flux at the Sudbury
+ * Neutrino Observatory".*/
+#define MAX_ENERGY 1e7
char *GitSHA1(void);
char *GitDirty(void);
@@ -5388,6 +5391,7 @@ int fit_event2(event *ev, double *xopt, double *fmin, int *id, size_t n, double
* threshold. */
double Tmin2 = sqrt(mass*mass/(1-pow(0.9,2)))-mass;
if (T0 < Tmin2) T0 = Tmin2;
+ if (T0 > MAX_ENERGY) T0 = MAX_ENERGY;
x[4+3*j] = T0;
ss[4+3*j] = x[4+3*j]*0.1;