aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-07update chi2tlatorre
This commit updates the chi2 analysis with two big changes: - I now apply the energy bias correction in the likelihood per particle and not per fit. So there is no longer an energy bias parameter for electron + muon fits, instead we just apply the energy bias correction for electrons to the electron and the energy bias correction for muons to the muon and then add the two kinetic energies. - I now apply the energy bias correction terms to the data instead of the Monte Carlo. This does introduce an issue with discontinuities in the likelihood but it makes everything easier to interpret. The discontinuities *should* be correctly taken into account by the MCMC.
2020-09-07update plot-muons script so it works outside the utils/ directorytlatorre
2020-09-07update python scripts to not call plt.show() when run with --savetlatorre
2020-09-07update Makefiletlatorre
2020-09-06update chi2 to correct for energy biastlatorre
This commit updates the chi2 script to correct for the energy bias of the reconstruction relative to Monte Carlo.
2020-09-06fix best fit line by changing axhline -> hlinestlatorre
2020-09-06update plot-muons to fit energy scale and resolution differencetlatorre
2020-08-31add a command line argument to print the nll valuestlatorre
2020-08-31don't call plt.show() when running with --savetlatorre
2020-08-31add GENIE weights to chi2 analysistlatorre
2020-08-31add estimate_errors to chi2 analysistlatorre
This commit updates the estimate_errors() function so that it works without a list of constraints and uses arrays of low and high bounds passed in instead of hardcoded constraints. I can now call this function from the chi2 analysis to get the stepsizes before running the MCMC.
2020-08-31add a script to convert genie reweight file from ROOT -> HDF5tlatorre
2020-08-30don't sample more instrumentals than there are in the datatlatorre
2020-08-30update dc scriptstlatorre
- delete instrumental tags in both scripts since we already tag them in get_events() - apply the same cuts to the MC as to the data - add a comment about the fitted fraction - quit if we don't have at least 1 type of each instrumental
2020-08-30increase energy resolution uncertainty when running with --coveragetlatorre
2020-08-30treat muons like Monte Carlotlatorre
2020-08-30update energy resolution -> max(EPSILON,resolution)tlatorre
This commit updates the chi2 script to make sure that the energy resolution is nonzero otherwise we get nans.
2020-08-30update bins when adding energy resolutiontlatorre
This commit updates the first bins that we use before applying the energy resolution in the chi2 script. The reason we do this is because when adding the energy resolution, events outside of the original bins may migrate into the first and last bin.
2020-08-30small updates to chi2 scripttlatorre
2020-08-25fix a stupid bug in the last committlatorre
2020-08-25speed up get_multinomial_prob()tlatorre
2020-08-25fix stupid bug in last committlatorre
2020-08-25speed up nll function in chi2tlatorre
2020-08-25update chi2 script to plot p-value coveragetlatorre
2020-08-20add external muons to the chi2 fittlatorre
2020-08-19update chi2 analysis to include bias and resolution termstlatorre
2020-08-17add a new script to plot the michel energy distributiontlatorre
2020-08-17update stoppig muon criteriatlatorre
This commit updates the criteria for selecting stopping muons from: - calibrated nhit < 4000 - udotr < -0.5 to - reconstructed kinetic energy < 10 GeV The previous criteria were intended to remove through going atmospheric events but produced a strong bias in the comparison due to the nhit cut and an energy bias in the data relative to the Monte Carlo. The new cut does a good job of cutting through going muons but doesn't produce the same bias.
2020-08-17simplify likelihood calculation in chi2tlatorre
2020-08-17simplify nllr() functiontlatorre
2020-08-17update function to tag atmosphericstlatorre
Previously the function to tag atmospherics was looking at the *first* event to come after a prompt event and checking to see if it was a neutron. However, this has a huge issue in that for large energy events, there is often secondary events caused by afterpulsing. I've now updated the algorithm to look for any events in which there is *any* follower event that passes the neutron criteria.
2020-08-17fix bug in get_events()tlatorre
ev.r -> ev_single_particle.r
2020-07-28only plot Michels from stopping muonstlatorre
2020-07-28catch Exception when zdab-cat fails and continuetlatorre
2020-07-27update plot-muonstlatorre
2020-07-27update plot-muonstlatorre
- added a cos(theta) cut - plot the energy and angular distribution of stopping muons - fix bug in calculating Michel normalization constant - plot legend for energy resolution plot
2020-07-27identify muons in the MC by looking for 'cosmic' in the filenametlatorre
2020-07-27update how the negative log likelihood ratio is calculatedtlatorre
I found a really simple form for the log likelihood ratio of a Poisson and multinomial likelihood.
2020-07-27update how we calculte the p-value in chi2tlatorre
2020-07-27add 20 MeV cut to dc, dc-closure-test, and plot-dctlatorre
2020-07-27loop over runs in dc, dc-closure-test, and plot-dc to prevent using too much ↵tlatorre
memory
2020-07-27only merge fit info for events with at least 10 fitstlatorre
This commit updates get_events() to only merge fit info for events with at least 10 events. The reason for this is that when analyzing recent data where not all the fits have completed we don't want to plot the data for events which haven't completely finished being fit.
2020-07-27update how the p-value is calculated in get_multinomial_prob()tlatorre
2020-07-07add zdab-reprocess-orphans and plot-muons to Makefiletlatorre
2020-07-07add a script to reprocess just junk eventstlatorre
2020-07-06add function to print particle probabilities in plot-muonstlatorre
2020-07-06update plot-muons to plot energy distributions for each particle ID for ↵tlatorre
stopping muons
2020-07-06small updates to plot-muons and plot_energy.pytlatorre
- use pd.Series.where() instead of DataFrame.loc() to speed things up in tag_michels - don't set y limits when plotting bias and resolution for stopping muons
2020-07-06update plot-muonstlatorre
- add get_multinomial_prob() function to stats.py - add plot_hist2_data_mc() function to do the normal particle id plot but also print p values - other small bug fixes
2020-07-06add sddm/stats.pytlatorre
This commit adds the new file sddm/stats.py to and adds a function to correctly sample a Monte Carlo histogram when computing p-values. In particular, I now take into account the uncertainty on the total number of expected events by drawing from a gamma distribution, which is the posterior of the Poisson likelihood function with a prior of 1/lambda.