aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dc.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/dc.c b/src/dc.c
index 5ab4431..ac062c6 100644
--- a/src/dc.c
+++ b/src/dc.c
@@ -478,8 +478,8 @@ double get_neck_tube_cut_time_diff(event *ev)
* average ECA time of the PSUP PMTS with z les than 0. After the cable
* changes to the neck tubes this time difference changes to 15ns.
*
- * and the SNOOP definition of a neck event which requires that 50% of the
- * normal PMTs have z <= -425.0.
+ * and the added requirement that 50% of the normal PMTs have z <= -425.0 or
+ * 50% of the ECA calibrated charge for normal PMTs have z <= -425.0.
*
* I added the requirement that 50% of the normal PMTs be near the bottom since
* for the high energy events I'm interested in, it's entirely possible that a
@@ -495,6 +495,7 @@ int is_neck_event(event *ev)
double avg_ept_psup;
int nhit, nhit_bottom;
double time_diff;
+ double ehs, ehs_bottom;
/* First, we compute the average ECA time for all the PSUP PMTs with z <= 0. */
@@ -525,6 +526,8 @@ int is_neck_event(event *ev)
high_charge = 0;
nhit = 0;
nhit_bottom = 0;
+ ehs = 0;
+ ehs_bottom = 0;
for (i = 0; i < MAX_PMTS; i++) {
if (!ev->pmt_hits[i].hit) continue;
@@ -543,13 +546,17 @@ int is_neck_event(event *ev)
(ev->pmt_hits[i].ept < avg_ept_psup - time_diff)) high_charge = 1;
break;
case PMT_NORMAL:
+ if (pmts[i].pos[2] < NECK_BOTTOM_HEIGHT) {
+ nhit_bottom += 1;
+ ehs_bottom += ev->pmt_hits[i].ehs;
+ }
nhit += 1;
- if (pmts[i].pos[2] < NECK_BOTTOM_HEIGHT) nhit_bottom += 1;
+ ehs += ev->pmt_hits[i].ehs;
break;
}
}
- if ((n >= 2 || high_charge) && nhit_bottom >= nhit*NECK_BOTTOM_FRACTION) return 1;
+ if ((n >= 2 || high_charge) && ((nhit_bottom >= nhit*NECK_BOTTOM_FRACTION) || (ehs_bottom >= ehs*NECK_BOTTOM_FRACTION))) return 1;
return 0;
}