diff options
author | tlatorre <tlatorre@uchicago.edu> | 2019-11-20 10:28:00 -0600 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2019-11-20 10:28:00 -0600 |
commit | d6555d2dc164e9b2dcf246d86161b1485a408f8a (patch) | |
tree | 2931f03c4044d192f27414263bda260f25f36e48 /src/zdab_utils.c | |
parent | a705b482f1a97b17dca71b64f2e571c6db29f337 (diff) | |
download | sddm-d6555d2dc164e9b2dcf246d86161b1485a408f8a.tar.gz sddm-d6555d2dc164e9b2dcf246d86161b1485a408f8a.tar.bz2 sddm-d6555d2dc164e9b2dcf246d86161b1485a408f8a.zip |
update PMT types for PMTs which disagree between snoman.ratdb and the PMT bank
This commit updates how we handle PMTs whose type is different in the
snoman.ratdb file and the SNOMAN bank again. In particular, we now trust the
snoman.ratdb type *only* for the NCD runs and mark the PMT as invalid for the
D2O and salt phases.
This was spurred by noticing that with the current code GTID 9228 in run 10,000
was being marked as a neck event even though it was clearly a muon and XSNOED
only showed one neck hit. It was marked as a neck event because there were 2
neck PMT hits in the event: 3/15/9 and 13/15/0. After reading Stan's email more
carefully I realized that 3/15/9 was only installed as a neck PMT in the NCD
phase. I don't really know what type of PMT it was in the D2O and salt phases
(maybe an OWL), but in any case since I don't know the PMT position I don't
think we can use this PMT for these phases.
Diffstat (limited to 'src/zdab_utils.c')
-rw-r--r-- | src/zdab_utils.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/zdab_utils.c b/src/zdab_utils.c index 12514ef..4fc267c 100644 --- a/src/zdab_utils.c +++ b/src/zdab_utils.c @@ -349,6 +349,21 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev) if (pmts[id].pmt_type != pmt_types[i] && !warned[id]) { get_pmt_type_string(pmts[id].pmt_type,pmt_type_string); fprintf(stderr, "%i/%i/%i has PMT type %s but expected %s based on bank\n", crate, card, channel, pmt_type_string, pmt_names[i]); + + if (ev->run < 39999) { + /* We are in the D2O or salt phase. Since the PMT positions + * file is only from the NCD phase, we don't know where the + * PMT is supposed to be so we just ignore this PMT hit. */ + pmts[id].pmt_type = PMT_INVALID; + } else if (ev->run < 67900) { + /* We are in the NCD phase and so the PMT types specified + * in the snoman.ratdb file are probably correct. */ + } else { + /* We are in the H2O phase. No idea what should happen here. */ + fprintf(stderr, "Don't know what to do with PMT type since this is the H2O phase.\n" + "You should update the code to have different PMT mappings for the different phases!\n"); + } + warned[id] = 1; } |