aboutsummaryrefslogtreecommitdiff
path: root/src/zdab_utils.c
AgeCommit message (Collapse)Author
2019-09-09update get_event() to use the PMT types from the snoman.ratdb filetlatorre
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.
2019-09-09reset the PMT_FLAG_CHARGE bit in get_event()tlatorre
2019-09-09uncalibrate MC times and charges in get_event()tlatorre
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.
2019-07-29use standard PCA time for MCtlatorre
2019-07-29flag PMT charges below qlotlatorre
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.
2019-07-29switch to using the multiphoton PCA timetlatorre
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.
2019-07-16update neck tube cut to include time difference changes due to cable changestlatorre
2019-07-16use QLX if QHS is railedtlatorre
2019-07-12don't flag PMT hits based on the uncalibrated QHS for MCtlatorre
2019-07-11switch from YAML output to HDF5 to speed things uptlatorre
2019-06-20update zdab-cat to output 50 MHz clock time and trigger typetlatorre
2019-06-19add FTP, RSP, and FTK results to the output filetlatorre
2019-06-16fix type of nph in ev banktlatorre
2019-06-16check the KPF_NO_CAL and KPF_BAD_CAL bits in get_event()tlatorre
2019-06-14fix parsing of global trigger time from EV bank (it's stored as a double)tlatorre
2019-06-14add comment about why we assume that SNOMAN gets the PMT types righttlatorre
2019-06-14update flasher cut to use pt1 instead of epttlatorre
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.
2019-06-14flag hits with bad or railed chargetlatorre
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.
2019-06-13add a data cleaning cut to tag incoming muonstlatorre
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
2019-06-10add a bunch of SNO data quality cutstlatorre
This commit adds the following data quality cuts used in SNOMAN: - neck - qvnhit - crate isotropy - junk Still need to test these.
2019-06-10update get_event() to include all PMT typestlatorre
This commit updates get_event() to include OWL, LG, FECD, BUTT, and NECK tubes.
2019-05-23add zdab-cattlatorre
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.
2019-03-16add GPLv3 licensetlatorre
2019-03-08fix some int -> floats in the PMT banktlatorre
2019-01-15update zebra library to be able to use linkstlatorre
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.
2018-09-19change output file format to YAMLtlatorre
2018-09-17add MC Track bank to zdab_utilstlatorre
2018-08-14move everything to src directorytlatorre