aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-09-09add math header file to zdab_utils.c for fmin() and fmax()tlatorre
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-09use EHS instead of QHS in is_muon()tlatorre
This commit updates is_muon() to use the EHS charge for the OWL tubes since based on looking at the charges for the OWL tubes it looks like the QHS values are completely random.
2019-09-09lower QLX threshold from 4000 -> 1000 in is_flashertlatorre
2019-09-09reset the PMT_FLAG_CHARGE bit in get_event()tlatorre
2019-09-09update fit and zdab-cat to skip ZDAB recordstlatorre
2019-09-09add the --gtid command line option to zdab-cattlatorre
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-09-09switch to using ept instead of pt1 in is_flasher() and is_slot_early()tlatorre
2019-09-09only loop over normal PMTs in is_slot_early()tlatorre
2019-09-09fix a typo in is_slot_early()tlatorre
2019-08-29update TODOtlatorre
2019-08-29add itc cut to plot-energytlatorre
2019-08-28update README to add zlib dependencytlatorre
2019-08-28fix some error handling in zebra.ctlatorre
This commit updates the zebra code to properly handle all the errors from get_bytes(). I also updated fit and cat-zdab to not display the errors about the FTX banks by default unless you run them with the -v command line option.
2019-08-28update cat-grid-jobstlatorre
This commit updates cat-grid-jobs to only warn once about a mismatch between the SHA1 of the current zdab-cat program and the grid results, and also cleans up some of the output.
2019-08-28update submit-grid-jobs to use my version of splitexttlatorre
This commit updates the submit-grid-jobs script to use my version of splitext() which removes the full extension from the filename. This fixes an issue where the output HDF5 files had xzdab in the name whenever the input file had the file extension .xzdab.gz.
2019-08-28unwrap the 50 MHz clock in plot-energytlatorre
2019-08-27fix the fts cuttlatorre
This commit fixes the FTS cut so that it returns 1 when the event is flagged as failing the cut. Previously, the function returned the following: not enough PMT pairs: 0 (fail) median time > 6.8 ns: 0 (fail) otherwise: 1 (pass) This had two issues: the return value wasn't consistent with the rest of the data cleaning cuts and it should pass if there aren't enough PMT pairs. Now, I fixed the not enough PMT pairs case and made the return value consistent with the rest of the data cleaning cuts: not enough PMT pairs: 0 (pass) median time > 6.8 ns: 1 (fail) otherwise: 0 (pass)
2019-08-27add the in time channel data cleaning cut from SNOtlatorre
2019-08-27update neck cuttlatorre
This commit updates the second requirement of the neck event tag to flag events in which either 50% of the normal PMT hits are at the bottom of the detector *or* 50% of the ECA calibrated charge is at the bottom of the detector. This update was added after testing the cut out on run 10058 which is not in the golden run list and noticing that there were 4 events which were very clearly neck events but which didn't get tagged.
2019-08-27add a script to reprocess SNO zdabstlatorre
2019-08-26update TODOtlatorre
2019-08-26fix a bug in get_{shower,delta_ray}_weights() causing crashtlatorre
This commit fixes a bug in get_shower_weights() and get_delta_ray_weights() which was causing an inf value to propagate and cause the fitter to crash. The problem came because due to floating point roundoff the cdf value at the end of the loop was slightly greater than the last cdf value we wanted which was causing it to get mapped to cos(theta) = -1 (I think?) and then subsequently get interpolated to an infinite value for xcdf. The fix is just to make sure that the x coordinate is always between x1 and x2.
2019-08-26sort particle combo arraytlatorre
2019-08-05update sno_charge to prevent nan when charge is negativetlatorre
This commit updates the charge spectrum initialization to convolve the charge distribution over a wider range to make sure that we have a nonzero probability of observing charges all the way down to qlo. The reason for this is that previously for some negative charges the probability of observing that charge was zero, which was causing the likelihood to return nan.
2019-08-05add ability to specify a particle combo on the command linetlatorre
This commit updates the fit program to accept a particle combo from the command line so you can fit for a single particle combination hypothesis. For example running: $ ./fit ~/zdabs/mu_minus_700_1000.hdf5 -p 2020 would just fit for the 2 electron hypothesis. The reason for adding this ability is that my grid jobs were getting evicted when fitting muons in run 10,000 since it takes 10s of hours to fit for all the particle hypothesis. With this change, and a small update to the submit-grid-jobs script we now submit a single grid job per particle combination hypothesis which should make each grid job run approximately 4 times faster.
2019-07-29use standard PCA time for MCtlatorre
2019-07-29update mc_run_10000_macro.cmd to enable MPCAtlatorre
2019-07-29update run-fit to write output files with suffix hdf5tlatorre
2019-07-29write out the hdf5 file after every fittlatorre
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-29don't need N_ACOS anymoretlatorre
2019-07-29add a faster version of fast_acos()tlatorre
This commit updates fast_acos() to use an algorithm I found here: https://web.archive.org/web/20161223122122/http://http.developer.nvidia.com:80/Cg/acos.html which is faster than using a lookup table.
2019-07-29avoid a division in get_expected_charge()tlatorre
2019-07-29fast_sqrt -> sqrttlatorre
After some testing, I realized that the fast_sqrt() function wasn't really faster than the native sqrt function.
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-29fix a bug in theta0 min calculationtlatorre
Previously I was accidentally passing the absolute position of the particle instead of the distance to the PMT to get_theta0_min().
2019-07-29ev.gtid -> bev.gtr_idtlatorre
2019-07-16fix bug introduced in ebe2799tlatorre
This commit fixes a bug introduced in a previous commit when I moved all the code to add the run, gtid, etc. to the event object to get_event(). We actually need the run number before then to load the DQXX file for the right run.
2019-07-16don't double count PMT pairs in fts cuttlatorre
2019-07-16update neck tube cut to include time difference changes due to cable changestlatorre
2019-07-16delete some unused #defines and add a comment to the PSUP radiustlatorre
2019-07-16use QLX if QHS is railedtlatorre
2019-07-16multiply rayleigh scattering by 2 to account for the 50% PMT coveragetlatorre
2019-07-16install plot-energytlatorre
2019-07-16install cat-grid-jobs and chmod +x fit-wrappertlatorre
2019-07-15add *.hdf5 to .gitignoretlatorre
2019-07-12don't load DQXX file for run 10000 by defaulttlatorre
2019-07-12don't flag PMT hits based on the uncalibrated QHS for MCtlatorre