aboutsummaryrefslogtreecommitdiff
path: root/src/zdab_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/zdab_utils.h')
-rw-r--r--src/zdab_utils.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/zdab_utils.h b/src/zdab_utils.h
index c5fc2c0..d5b6a7a 100644
--- a/src/zdab_utils.h
+++ b/src/zdab_utils.h
@@ -29,6 +29,33 @@
#define KPF_NO_CAL 0x08000000
#define KPF_BAD_CAL 0x10000000
+typedef struct MCTKBank {
+ /* Particle id code. */
+ uint32_t idp;
+ /* Direction cosine X. */
+ float drx;
+ /* Direction cosine Y. */
+ float dry;
+ /* Direction cosine Z. */
+ float drz;
+ /* Total energy (except for neutrons where it is kinetic). */
+ float ene;
+ /* Region code. */
+ uint32_t rgn;
+ /* Physical media code. */
+ uint32_t idm;
+ /* Polarization X. */
+ float plx;
+ /* Polarization Y. */
+ float ply;
+ /* Polarization Z. */
+ float plz;
+ /* Track step size. */
+ float stp;
+ /* Minimum distance to nearest boundary or 0. */
+ float near;
+} MCTKBank;
+
typedef struct EVBank {
/* Run number. */
uint32_t run;
@@ -189,6 +216,7 @@ typedef struct PMTBank {
uint32_t qrc;
} PMTBank;
+void unpack_mctk(uint32_t *data, MCTKBank *b);
void unpack_ev(uint32_t *data, EVBank *b);
void unpack_pmt(uint32_t *data, PMTBank *b);