diff options
Diffstat (limited to 'utils/plot')
-rwxr-xr-x | utils/plot | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -72,10 +72,14 @@ if __name__ == '__main__': likelihood_ratio = [] t_electron = [] t_muon = [] + psi = [] for event in data['data']: # get the particle ID id = event['mctk'][-1]['id'] + if 'ev' not in event: + continue + if id not in event['ev'][0]['fit']: continue @@ -115,6 +119,11 @@ if __name__ == '__main__': t_electron.append(event['ev'][0]['fit'][IDP_E_MINUS]['time']) if IDP_MU_MINUS in event['ev'][0]['fit']: t_muon.append(event['ev'][0]['fit'][IDP_MU_MINUS]['time']) + nhit = event['ev'][0]['nhit'] + psi.append(event['ev'][0]['fit'][id]['psi']/nhit) + + if len(t_electron) < 2 or len(t_muon) < 2: + continue mean, mean_error, std, std_error = get_stats(dT) print("dT = %.2g +/- %.2g" % (mean, mean_error)) @@ -155,6 +164,9 @@ if __name__ == '__main__': plt.figure(8) plot_hist(np.array(t_muon)/1e3/60.0, label=filename) plt.xlabel(r"Muon Fit time (minutes)") + plt.figure(9) + plot_hist(psi, label=filename) + plt.xlabel(r"$\Psi$/Nhit") plot_legend(1) plot_legend(2) @@ -164,4 +176,5 @@ if __name__ == '__main__': plot_legend(6) plot_legend(7) plot_legend(8) + plot_legend(9) plt.show() |