aboutsummaryrefslogtreecommitdiff
path: root/utils/plot-michels
AgeCommit message (Collapse)Author
2021-01-04get rid of nhit_threshtlatorre
2021-01-03cache results from get_events()tlatorre
2020-11-16don't apply retrigger cut to MCtlatorre
2020-11-16loop over MC filenamestlatorre
2020-11-01don't apply nhit trigger cut to MCtlatorre
2020-10-05major updates to the chi2 analysistlatorre
This commit fixes the chi2 analysis so that it is no longer biased. Previously, the chi2 analysis pull plots showed a consistent bias. At first, I thought this was due to the fact that the posterior wasn't gaussian, but even after switching to percentile plots based on the algorithm outlined in "Validating Bayesian Inference Algorithms with Simulation-Based Calibration", I was still seeing a bias. I finally tracked it down to the fact that I was applying the energy scale parameters to the data instead of the Monte Carlo. Therefore, in this commit I update the posterior to now apply the energy scale parameters to the Monte Carlo instead of the data. This has the slight disadvantage that the final histograms will be binned in the biased energy, but that's not really a big deal. In addition, this commit contains several other updates: - switch to plotting percentile plots based on the algorithm in "Validating Bayesian Inference Algorithms with Simulation-Based Calibration" instead of pull plots - apply both the energy scale and resolution at the individual particle level, i.e. there is no longer an energy resolution term for electron + muon fits - separate pull plots and coverage plots. Previously I was making both the p-value coverage plots and the pull plots at the same time. However, the pull plots shouldn't have anything to do with the GENIE weights whereas the p-value coverage plots should draw samples weighted by the GENIE weights. In addition, for the pull plots we draw new truth parameters on every iteration whereas for the p-value coverage plots we only draw them once. - switch to using KDEMove() for the MCMC since I think it samples multimodal distributions a lot better than the default emcee move. - I now correct for the reconstruction energy bias in plot-michel and plot-muons
2020-10-05update how the energy bias is applied in chi2 and plot-michelstlatorre
This commit updates how the energy bias is applied when we correct for the energy bias in correct_energy_bias(). The correct way to apply this correction is to compute: T_corrected = T_reco/(1+bias) whereas previously we were multiplying by (1-bias).
2020-09-09argmin -> argmaxtlatorre
2020-09-09update michel script to fit for bias and resolutiontlatorre
2020-09-07update python scripts to not call plt.show() when run with --savetlatorre
2020-08-17add a new script to plot the michel energy distributiontlatorre