Age | Commit message (Collapse) | Author |
|
This commit updates the chi2 script to correct for the energy bias of
the reconstruction relative to Monte Carlo.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
- 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
|
|
|
|
|
|
This commit updates the chi2 script to make sure that the energy
resolution is nonzero otherwise we get nans.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
ev.r -> ev_single_particle.r
|
|
|
|
|
|
|
|
- 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
|
|
|
|
I found a really simple form for the log likelihood ratio of a Poisson
and multinomial likelihood.
|
|
|
|
|
|
memory
|
|
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.
|
|
|
|
|
|
|
|
|
|
stopping muons
|
|
- 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
|
|
- 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
|
|
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.
|
|
|
|
- only look at muons with nhit < 4000 and udotr < -0.5
- switch from energy1 -> ke
|
|
This commit adds a first draft of a script to plot the michel energy
distribution and particle id histograms for data and Monte Carlo and to
plot the energy bias and resolution for stopping muons.
|
|
|