From 488e0caec255a9180d38cd16d40432c0d0b3c966 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Wed, 14 Nov 2018 13:37:59 -0600 Subject: update plot.py --- utils/plot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/plot.py b/utils/plot.py index 1f2019b..b74e14a 100755 --- a/utils/plot.py +++ b/utils/plot.py @@ -93,9 +93,10 @@ if __name__ == '__main__': dir = [np.sin(theta)*np.cos(phi),np.sin(theta)*np.sin(phi),np.cos(theta)] dir = np.array(dir)/np.linalg.norm(dir) thetas.append(np.degrees(np.arccos(np.dot(true_dir,dir)))) - fmin_electron = event['ev'][0]['fit'][IDP_E_MINUS]['fmin'] - fmin_muon = event['ev'][0]['fit'][IDP_MU_MINUS]['fmin'] - likelihood_ratio.append(fmin_muon-fmin_electron) + if IDP_E_MINUS in event['ev'][0]['fit'] and IDP_MU_MINUS in event['ev'][0]['fit']: + fmin_electron = event['ev'][0]['fit'][IDP_E_MINUS]['fmin'] + fmin_muon = event['ev'][0]['fit'][IDP_MU_MINUS]['fmin'] + likelihood_ratio.append(fmin_muon-fmin_electron) mean, mean_error, std, std_error = get_stats(dT) print("dT = %.2g +/- %.2g" % (mean, mean_error)) -- cgit