diff --git a/README.md b/README.md index 217def7..5c6ed5e 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ Plot showing the cross section versus energy (with error bars): | 500 MeV | 2.194 $\pm$ 0.0161 | 2.203 $\pm$ 0.0044 | +In the following, the initial photon energy is set to 0.1 GeV (electron is at rest). + ### Photon final state kinematics

diff --git a/notebooks/cross-section.ipynb b/notebooks/cross-section.ipynb index 1136088..d733bf5 100644 --- a/notebooks/cross-section.ipynb +++ b/notebooks/cross-section.ipynb @@ -124,7 +124,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.4" + "version": "3.10.6" } }, "nbformat": 4, diff --git a/src/compscat/save_events.py b/src/compscat/save_events.py index f10995d..ea4e1cd 100644 --- a/src/compscat/save_events.py +++ b/src/compscat/save_events.py @@ -17,6 +17,7 @@ def to_root(self): self.Nevent, self.w_max, self.E ).gen_events() file = uproot.recreate("MC_compton.root") + # factor of 1e6 ensures the result is in KeV file["events"] = { "Photon_Energy": ph_e * 1e6, "Photon_Px": ph_px * 1e6, @@ -33,7 +34,18 @@ def to_csv(self): self.Nevent, self.w_max, self.E ).gen_events() - data = list(zip(ph_e, ph_px, ph_py, ph_pz, el_e, el_px, el_py, el_pz)) + data = list( + zip( + ph_e * 1e6, + ph_px * 1e6, + ph_py * 1e6, + ph_pz * 1e6, + el_e * 1e6, + el_px * 1e6, + el_py * 1e6, + el_pz * 1e6, + ) + ) column_name = [ "Photon_Energy",