Skip to content
Snippets Groups Projects
Commit b8c4b20d authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Plot cos zenith

parent c4208eda
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ class ZenithDistribution(kp.Module): ...@@ -41,7 +41,7 @@ class ZenithDistribution(kp.Module):
def process(self, blob): def process(self, blob):
track = blob['RecoTrack'] track = blob['RecoTrack']
zenith = np.rad2deg( zenith = np.cos(
kp.math.angle_between([0, 0, -1], [track.dx, track.dy, track.dz])) kp.math.angle_between([0, 0, -1], [track.dx, track.dy, track.dz]))
self.zeniths.append(zenith) self.zeniths.append(zenith)
return blob return blob
...@@ -61,7 +61,7 @@ class ZenithDistribution(kp.Module): ...@@ -61,7 +61,7 @@ class ZenithDistribution(kp.Module):
ax.set_title( ax.set_title(
r"Zenith distribution of JGandalf track reconstructions" r"Zenith distribution of JGandalf track reconstructions"
"\nbased on %d reconstructed tracks out of %d events" % (n_ok, n)) "\nbased on %d reconstructed tracks out of %d events" % (n_ok, n))
ax.set_xlabel(r"zenith angle [deg]", fontsize=fontsize) ax.set_xlabel(r"cos(zenith)", fontsize=fontsize)
ax.set_ylabel("count", fontsize=fontsize) ax.set_ylabel("count", fontsize=fontsize)
ax.tick_params(labelsize=fontsize) ax.tick_params(labelsize=fontsize)
filename = os.path.join(self.plots_path, 'track_reco.png') filename = os.path.join(self.plots_path, 'track_reco.png')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment