aboutsummaryrefslogtreecommitdiff
path: root/utils/plot.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/plot.py')
-rwxr-xr-xutils/plot.py7
1 files changed, 4 insertions, 3 deletions
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))