Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
This commit updates get_event() to clear any PMT flags except for PMT_FLAG_DQXX
from all PMT hits before loading the event. Although I *was* previously
clearing the other flags for hit PMTs, I was not clearing flags for PMTs which
were *not* hit. This was causing non deterministic behaviour, i.e. I was
getting different results depending on if I ran the fitter over a whole file or
just a single event.
|
|
This commit updates the likelihood function to use the PMT hit time without the
time walk correction applied (when the charge is greater than 1.5 PE) instead
of the multiphoton PCA time. The reason is that after talking with Chris Kyba I
realized that the multiphoton PCA time was calibrated to give the mean PMT hit
time when mulitiple photons hit at the same time instead of the time when the
first photon hits which is what I assume in my likelihood function.
Therefore I now use the regular PMT hit time without time walk correction
applied which should be closer to the first order statistic.
|
|
|
|
This commit adds the sub_run variable to the ev array in the HDF5 output file
and updates plot-energy to order the events using the run and sub_run
variables. This fixes a potential issue where I was sorting by GTID before, but
the GTID can wrap around and so isn't guaranteed to put the events in the right
order.
|
|
This commit updates the ev.nhit variable to represent the total number of
normal PMTs hit in the event, regardless of if the calibration failed. I added
a new variable ev.nhit_cal which now stores the total number of normal PMTs hit
without any flags.
|
|
This commit adds a field to the pmt_hit struct called best_uncal_q which
represents the best ECA calibrated charge (in units of QHS counts above
pedestals). This is then used in the muon data cleaning cut.
|
|
|
|
|
|
This commit updates get_event() to assume the PMT type is correct in the
pmt.txt file instead of assuming the SNOMAN bank is correct. The reason for
this is that according to the email from Stan 3/15/9 should be a neck PMT (at
least in the NCD phase) and that is what the pmt.txt file says it should be. In
addition, the changes that Stan said were needed in ccc_type.for never got
made.
|
|
|
|
This commit updates get_event() to fill in the uncalibrated charge and time
info from the calibrated charge and time. The ECA calibrated time and ECA + PCA
without walk correction times (ept and pt1) are just set to the calibrated
time. The uncalibrated charges are set by multiplying the calibrated charge by
the mean high-half point and adding a constant offset, and the ECA calibrated
charges are set by taking the uncalibrated charges and subtracting the offset.
The reason for filling these in is so that we can test the data cleaning cuts
on MC. Although it would be better if these were filled in by the MC, this is
better than nothing.
|
|
|
|
This commit updates get_event() to flag PMT charges below qlo, which is the
minimum charge value that we compute the charge PDFs for. This is to prevent
the likelihood from returning nan.
|
|
This commit updates the likelihood to use the multiphoton PCA time instead of
the usual pt time. When looking at the reconstruction of muons in run 10,000 I
noticed that the PMT hit times for the PMTs which had really high charge was
all over the place. There were PMTs that were very close to each other with hit
times differing by ~ 20 ns. I'm still not entirely sure what causes this (is
it some hardware issue with the discriminator or is it a problem with the
charge walk correction which always assumes a single PE?), but the multiphoton
PCA times looked a lot more reasonable.
Eventually I need to look into the ptms variable which is the multiphoton PCA
transit time RMS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Small update to the flasher cut to use the non-walk corrected time instead of
just the ECA calibrated time.
Also added some comments to the variables in the event structure.
|
|
This commit updates the get_event() function to flag any hits which have a
non-zero best charge status word. This essentially gets set when *both* QHS and
QLX are either bad or railed.
I also set this bit if *just* QHS is railed or below 300 since the current
charge model was only set up for QHS. In the future, it would be nice to
instead use the best charge (either QHS or QLX) in the likelihood function. To
do that I need to double check how QLX is normalized and if the current charge
model would work for QLX too.
|
|
This commit adds a data cleaning cut to tag incoming muons by looking for early
OWL hits. It also significantly updates the flasher cut to catch more flashers.
In particular, the flasher cut now does the following:
- loops over *all* paddle cards with at least 4 hits instead of just the paddle
cards with the most hits
- uses QLX to look for charge outliers in the paddle card
- fixes a few bugs (for example, uninitialized values in the charge array)
- adds a check to to see if the given slot is early with respect to all PMTs
within 4 meters to catch the case where the flashing channel is missing from
the event
|
|
This commit adds the following data quality cuts used in SNOMAN:
- neck
- qvnhit
- crate isotropy
- junk
Still need to test these.
|
|
This commit updates get_event() to include OWL, LG, FECD, BUTT, and NECK tubes.
|
|
This commit adds a new program called zdab-cat which is kind of like fit, but
just produces the YAML output without actually fitting anything.
|
|
|
|
|
|
This commit updates the zebra library files zebra.{c,h} so that it's now
possible to traverse the data structure using links! This was originally
motivated by wanting to figure out which MC particles were generated from the
MCGN bank (from which it's only possible to access the tracks and vertices
using structural links).
I've also added a new test to test-zebra which checks the consistency of all of
the next/up/orig, structural, and reference links in a zebra file.
|
|
|
|
|
|
|