diff --git a/benchmarks/tracking/scripts/tracking_performance.py b/benchmarks/tracking/scripts/tracking_performance.py index 6f582c74a6490ff0ef8617cfec75ab2c115d2bf0..813f4d93b17909ca0c66925565a9c0e567f4c029 100644 --- a/benchmarks/tracking/scripts/tracking_performance.py +++ b/benchmarks/tracking/scripts/tracking_performance.py @@ -136,8 +136,6 @@ if __name__ == '__main__': dfm = thrown_particles_figure(rdf_rec, save=os.path.join(args.outdir, '{}_thrown_particles.png'.format(args.nametag)), mcbranch=args.mc) df = flatten_collection(rdf_rec, args.coll) df.rename(columns={c: c.replace(args.coll + '.', '') for c in df.columns}, inplace=True) - df['theta'] = df['direction.theta'] - df['phi'] = df['direction.phi'] fig, axs = plt.subplots(3, 2, figsize=(16, 18), dpi=120) for ax in axs.flat: @@ -215,7 +213,7 @@ if __name__ == '__main__': # eta distribution ax = axs.flat[4] sim_eta = dfm.groupby('event')['eta'].first().values - rec_eta = -np.log(np.tan(df.groupby('event')['direction.theta'].first().values/2.)) + rec_eta = -np.log(np.tan(df.groupby('event')['theta'].first().values/2.)) hval, hbins, _ = ax.hist(sim_eta, bins=np.linspace(-4, 4, 41), ec='k',alpha=0.3,label="Generated") hval, hbins, _ = ax.hist(rec_eta, bins=np.linspace(-4, 4, 41), ec='k',alpha=0.3, label="Reconstructed") nbins = hbins.shape[0] - 1 @@ -226,7 +224,7 @@ if __name__ == '__main__': # theta distribution ax = axs.flat[5] sim_th_deg = dfm.groupby('event')['theta'].first().values*180/np.pi - rec_th_deg = df.groupby('event')['direction.theta'].first().values*180/np.pi + rec_th_deg = df.groupby('event')['theta'].first().values*180/np.pi hval, hbins, _ = ax.hist(sim_th_deg, bins=np.linspace(-0, 180,61), ec='k',alpha=0.3,label="Generated")