aboutsummaryrefslogtreecommitdiff
path: root/src/dc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dc.c')
-rw-r--r--src/dc.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/dc.c b/src/dc.c
index bc8c017..230e373 100644
--- a/src/dc.c
+++ b/src/dc.c
@@ -26,6 +26,27 @@
#include "zebra.h"
#include <gsl/gsl_statistics_double.h>
+/* Returns the data cleaning bitmask for the event `ev`. */
+uint32_t get_dc_word(event *ev, zebraFile *f, zebraBank *bmast, zebraBank *bev)
+{
+ uint32_t status = 0x0;
+
+ if (is_muon(ev))
+ status |= DC_MUON;
+ if (junk_cut(f, bmast, bev))
+ status |= DC_JUNK;
+ if (crate_isotropy(ev))
+ status |= DC_CRATE_ISOTROPY;
+ if (qvnhit(ev))
+ status |= DC_QVNHIT;
+ if (is_neck_event(ev))
+ status |= DC_NECK;
+ if (is_flasher(ev))
+ status |= DC_FLASHER;
+
+ return status;
+}
+
/* Returns 1 if the event is tagged as an incoming muon. The goal of this cut
* is to tag external muons *without* tagging muons which start within the PSUP
* and then exit. In order to achieve that we use the ECA time of the OWL