From cb3758f2cde4cf49a38d6caa6c15e7c88db381c5 Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Fri, 18 Nov 2011 14:35:37 -0500 Subject: Argh! Someone used spherical polar coordinates in the pi0 generator with the mathematics convention for the angle names. Flipping theta and phi back to their correct meaning. --- chroma/pi0.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chroma/pi0.py b/chroma/pi0.py index 91e8097..df8cecd 100644 --- a/chroma/pi0.py +++ b/chroma/pi0.py @@ -59,7 +59,7 @@ def pi0_decay(energy, direction, theta, phi): pi0_v = pi0_p/pi0_e photon_e0 = _pi0_mass/2.0 - photon_p0 = photon_e0*np.array([np.cos(theta)*np.sin(phi), np.sin(theta)*np.sin(phi), np.cos(phi)]) + photon_p0 = photon_e0*np.array([np.cos(phi)*np.sin(theta), np.sin(phi)*np.sin(theta), np.cos(theta)]) e1, p1 = rocket_to_lab(photon_e0, photon_p0, pi0_v) v1 = p1/np.linalg.norm(p1) -- cgit