diff options
author | tlatorre <tlatorre@uchicago.edu> | 2020-08-30 09:25:18 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2020-08-30 09:25:18 -0500 |
commit | a01fded9219273c0112c371619427512f8e5b6e8 (patch) | |
tree | 9d0a8156064a98072c96441e3523996e9885471c | |
parent | a7cfee22569ef2afb8d2b89b47ec6ee74c5f8037 (diff) | |
download | sddm-a01fded9219273c0112c371619427512f8e5b6e8.tar.gz sddm-a01fded9219273c0112c371619427512f8e5b6e8.tar.bz2 sddm-a01fded9219273c0112c371619427512f8e5b6e8.zip |
treat muons like Monte Carlo
-rwxr-xr-x | utils/chi2 | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -168,12 +168,15 @@ FIT_PARS = [ def make_nll(data, muons, mc, bins): data_hists = get_data_hists(data,bins) - muon_hists = get_data_hists(muons,bins) ke_dict = {} for id in (20,22,2020,2022,2222): ke_dict[id] = mc[mc.id == id].ke.values + ke_dict_muon = {} + for id in (20,22,2020,2022,2222): + ke_dict_muon[id] = muons[muons.id == id].ke.values + def nll(x, grad=None): if any(x[i] < 0 for i in range(len(x))): return np.inf @@ -211,6 +214,7 @@ def make_nll(data, muons, mc, bins): # Also, it's critical that I first adjust the data energy by whatever # amount I find with the stopping muons and Michel distributions. mc_hists = get_mc_hists_fast(ke_dict,x,bins,apply_norm=True) + muon_hists = get_mc_hists_fast(ke_dict_muon,x,bins,apply_norm=False) # Calculate the negative log of the likelihood of observing the data # given the fit parameters |