aboutsummaryrefslogtreecommitdiff
path: root/src/find_peaks.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/find_peaks.c')
-rw-r--r--src/find_peaks.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/find_peaks.c b/src/find_peaks.c
index 135e4e3..7d350d5 100644
--- a/src/find_peaks.c
+++ b/src/find_peaks.c
@@ -151,7 +151,7 @@ double get_qhs_avg(event *ev, double *pos, double *dir)
SUB(pmt_dir,pmts[i].pos,pos);
normalize(pmt_dir);
if (DOT(pmt_dir,dir) > 1/n_d2o) {
- qhs_sum += ev->pmt_hits[i].qhs;
+ qhs_sum += ev->pmt_hits[i].q;
n += 1;
}
}
@@ -190,15 +190,15 @@ void get_hough_transform(event *ev, double *pos, double *x, double *y, size_t n,
}
for (i = 0; i < MAX_PMTS; i++) {
- if (pmts[i].pmt_type != PMT_NORMAL || !ev->pmt_hits[i].hit) continue;
- qhs[i] = ev->pmt_hits[i].qhs;
+ if (ev->pmt_hits[i].flags || pmts[i].pmt_type != PMT_NORMAL || !ev->pmt_hits[i].hit) continue;
+ qhs[i] = ev->pmt_hits[i].q;
}
/* Subtract off previous rings. */
for (i = 0; i < len; i++) {
qhs_avg = get_qhs_avg(ev,pos,last+3*i);
for (j = 0; j < MAX_PMTS; j++) {
- if (pmts[j].pmt_type != PMT_NORMAL || !ev->pmt_hits[j].hit) continue;
+ if (ev->pmt_hits[i].flags || pmts[i].pmt_type != PMT_NORMAL || !ev->pmt_hits[i].hit) continue;
SUB(pmt_dir,pmts[j].pos,pos);
@@ -216,7 +216,7 @@ void get_hough_transform(event *ev, double *pos, double *x, double *y, size_t n,
for (i = 0; i < n*m; i++) result[i] = 0.0;
for (i = 0; i < MAX_PMTS; i++) {
- if (pmts[i].pmt_type != PMT_NORMAL || !ev->pmt_hits[i].hit) continue;
+ if (ev->pmt_hits[i].flags || pmts[i].pmt_type != PMT_NORMAL || !ev->pmt_hits[i].hit) continue;
SUB(pmt_dir,pmts[i].pos,pos);