diff options
-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 |