aboutsummaryrefslogtreecommitdiff
path: root/src/test-find-peaks.c
AgeCommit message (Collapse)Author
2019-06-15update test-find-peaks to work with SNOCR filestlatorre
2019-06-06add --gtid command line argument to test-find-peakstlatorre
2019-06-02update find_peaks() to only return unique peakstlatorre
This commit updates find_peaks() to only return peaks which are at least a certain number of degrees apart from each other. This is because I found that for many events the first few peaks would all be essentially the same direction and so the fit was taking a lot of time fitting essentially the same seed points. Since I now have to only try 3 peaks in order to get my grid jobs to run for less than a few hours it's necessary to make sure we aren't just fitting the same three directions for the "quick" minimization. I also updated the fit to only use a maximum of 3 seed directions.
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-31update test-find-peaks to plot cerenkov ringstlatorre
This commit updates the test-find-peaks script to plot Cerenkov rings for each of the peaks. It also updates the script to use quad to find the position instead of using the MC information. Finally, I added a -n argument to the script to specify how many peaks to draw.
2019-03-16add GPLv3 licensetlatorre
2019-03-07update code to allow you to run the fit outside of the src directorytlatorre
To enable the fitter to run outside of the src directory, I created a new function open_file() which works exactly like fopen() except that it searches for the file in both the current working directory and the path specified by an environment variable.
2019-01-17update test-find-peaks to test the first eventtlatorre
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.
2019-01-10update find_peaks algorithmtlatorre
Previously, the algorithm used to find peaks was to search for all peaks in the Hough transform above some constant fraction of the highest peak. This algorithm could have issues finding smaller peaks away from the highest peak. The new algorithm instead finds the highest peak in the Hough transform and then recomputes the Hough transform ignoring all PMT hits within the Cerenkov cone of the first peak. The next peak is found from this transform and the process is iteratively repeated until a certain number of peaks are found. One disadvantage of this new system is that it will *always* find the same number of peaks and this will usually be greater than the actual number of rings in the event. This is not a problem though since when fitting the event we loop over all possible peaks and do a quick fit to determine the starting point and so false positives are OK because the real peaks will fit better during this quick fit. Another potential issue with this new method is that by rejecting all PMT hits within the Cerenkov cone of the first peak we could miss a second peak very close to the first peak. This is partially mitigated by the fact that when we loop over all possible combinations of the particle ids and directions we allow each peak to be used more than once. For example, when fitting for the hypothesis that an event is caused by two electrons and one muon and given two possible directions 1 and 2, we will fit for the following possible direction combinations: 1 1 1 1 1 2 1 2 1 1 2 2 2 2 1 2 2 2 Therefore if there is a second ring close to the first it is possible to fit it correctly since we will seed the quick fit with two particles pointing in the same direction. This commit also adds a few tests for new functions and changes the energy step size during the quick fit to 10% of the starting energy value.
2018-12-11add a function to find peaks using a Hough transformtlatorre