summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2011-11-18 14:35:37 -0500
committertlatorre <tlatorre@uchicago.edu>2021-05-09 08:42:38 -0700
commitcb3758f2cde4cf49a38d6caa6c15e7c88db381c5 (patch)
treef1a9b411199cf4bd49c8dd90abd480c1b466e8d0
parentd7bab7f399b7d0df6b4064ea226417a45aa44145 (diff)
downloadchroma-cb3758f2cde4cf49a38d6caa6c15e7c88db381c5.tar.gz
chroma-cb3758f2cde4cf49a38d6caa6c15e7c88db381c5.tar.bz2
chroma-cb3758f2cde4cf49a38d6caa6c15e7c88db381c5.zip
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.
-rw-r--r--chroma/pi0.py2
1 files changed, 1 insertions, 1 deletions
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)