aboutsummaryrefslogtreecommitdiff
path: root/src/dc.h
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-06-14 14:27:40 -0500
committertlatorre <tlatorre@uchicago.edu>2019-06-14 14:27:40 -0500
commit0d8b761087c3f8eb094e01a512e6251075fad927 (patch)
treeb671bedc15ffaa0cca63dbb7f5d042b69774e655 /src/dc.h
parent22b4e03dafcbeb29ca1494295bc89aa22fe0aa39 (diff)
downloadsddm-0d8b761087c3f8eb094e01a512e6251075fad927.tar.gz
sddm-0d8b761087c3f8eb094e01a512e6251075fad927.tar.bz2
sddm-0d8b761087c3f8eb094e01a512e6251075fad927.zip
add a function to compute a data cleaning word
Also write out the data cleaning word to the YAML file.
Diffstat (limited to 'src/dc.h')
-rw-r--r--src/dc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dc.h b/src/dc.h
index 89a7670..4635806 100644
--- a/src/dc.h
+++ b/src/dc.h
@@ -19,6 +19,15 @@
#include "event.h"
#include "zebra.h"
+#include <stdint.h>
+
+/* Data cleaning bitmasks. */
+#define DC_MUON 0x1
+#define DC_JUNK 0x2
+#define DC_CRATE_ISOTROPY 0x4
+#define DC_QVNHIT 0x8
+#define DC_NECK 0x10
+#define DC_FLASHER 0x20
/* Minimum number of normal PMTs which must be hit to be tagged as an incoming
* muon. */
@@ -34,6 +43,7 @@
/* QvNHIT ratio threshold. */
#define QRATIO_THRESHOLD 0.25
+uint32_t get_dc_word(event *ev, zebraFile *f, zebraBank *bmast, zebraBank *bev);
int is_muon(event *ev);
int junk_cut(zebraFile *f, zebraBank *bmast, zebraBank *bev);
int crate_isotropy(event *ev);