From 16b7c8b7e2eae464fe1aa5828aa38b0b96e933f8 Mon Sep 17 00:00:00 2001 From: Julian Saffer <31139467+jsaffer@users.noreply.github.com> Date: Wed, 21 May 2025 17:25:28 +0200 Subject: [PATCH 1/4] Correct the 4-component parameterization of GST The original GST paper (http://doi.org/10.1007/s11467-013-0319-7) gives a parameterization of the CR flux in several populations based on p, He, C, O and Fe mass groups (Table 3). I see that this doesn't match the 5-component model that is used in some working groups (that's why I didn't touch the 5-component model) but for the 4-component version it would be appropriate to use the correct Z values and combine C and O. --- src/simweights/_fluxes.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/simweights/_fluxes.py b/src/simweights/_fluxes.py index 437b5df..2956e38 100644 --- a/src/simweights/_fluxes.py +++ b/src/simweights/_fluxes.py @@ -313,17 +313,17 @@ class GlobalFitGST(CosmicRayFlux): class GlobalFitGST_IT(CosmicRayFlux): # pylint: disable=invalid-name r"""GlobalFitGST for four components [p, He, O, Fe]. - The Oxygen group is the sum of Nitrogen and Aluminum groups of GlobalFitGST. + The Oxygen group is the sum of Carbon and Oxygen groups. """ pdgids = PDGID_4COMP _funcs = ( lambda E: 0.7 * E**-2.66 * exp(-E / 1.2e5) + 0.015 * E**-2.4 * exp(-E / 4e6) + 0.0014 * E**-2.4 * exp(-E / 1.3e9), lambda E: 0.32 * E**-2.58 * exp(-E / 1.2e5 / 2) + 0.0065 * E**-2.3 * exp(-E / 4e6 / 2), - lambda E: 0.01 * E**-2.40 * exp(-E / 1.2e5 / 7) - + 0.0006 * E**-2.3 * exp(-E / 4e6 / 7) - + 0.013 * E**-2.40 * exp(-E / 1.2e5 / 13) - + 0.0007 * E**-2.3 * exp(-E / 4e6 / 13), + lambda E: 0.01 * E**-2.40 * exp(-E / 1.2e5 / 6) + + 0.0006 * E**-2.3 * exp(-E / 4e6 / 6) + + 0.013 * E**-2.40 * exp(-E / 1.2e5 / 8) + + 0.0007 * E**-2.3 * exp(-E / 4e6 / 8), lambda E: 0.006 * E**-2.30 * exp(-E / 1.2e5 / 26) + 0.00023 * E**-2.2 * exp(-E / 4e6 / 26) + 0.0000025 * E**-2.2 * exp(-E / 1.3e9 / 26), From d3c8cb1e17e07bbc10e1bd6107f922c10ea1a8a6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 15:31:52 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/icetop_book.py | 2 +- examples/nugen_book.py | 2 +- examples/triggered_corsika_book.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/icetop_book.py b/examples/icetop_book.py index fcda543..613836d 100755 --- a/examples/icetop_book.py +++ b/examples/icetop_book.py @@ -6,7 +6,7 @@ from pathlib import Path -from icecube import icetray, hdfwriter, simclasses +from icecube import hdfwriter, icetray, simclasses # The following is an example of some "Level3" files for which S-frames were retrofitted # after production. But the input can be any IceTop simulation files containing S-frames. diff --git a/examples/nugen_book.py b/examples/nugen_book.py index 4953596..97f2ed0 100755 --- a/examples/nugen_book.py +++ b/examples/nugen_book.py @@ -6,7 +6,7 @@ from pathlib import Path -from icecube import icetray, hdfwriter, simclasses +from icecube import hdfwriter, icetray, simclasses FILE_DIR = Path("/data/sim/IceCube/2016/filtered/level2/neutrino-generator/21217/0000000-0000999/") files = sorted(str(f) for f in FILE_DIR.glob("Level2_IC86.2016_NuMu.021217.0000*.i3.zst")) diff --git a/examples/triggered_corsika_book.py b/examples/triggered_corsika_book.py index f89f12d..9f27f68 100755 --- a/examples/triggered_corsika_book.py +++ b/examples/triggered_corsika_book.py @@ -6,7 +6,7 @@ from pathlib import Path -from icecube import icetray, hdfwriter, simclasses +from icecube import hdfwriter, icetray, simclasses FILE_DIR = Path("/data/sim/IceCube/2016/filtered/level2/CORSIKA-in-ice/21889/0000000-0000999") files = sorted(str(f) for f in FILE_DIR.glob("Level2_IC86.2016_corsika.021889.00000*.i3.zst")) From fd0d6ca869bfc94d9b54ac8da71913421ab2cb9c Mon Sep 17 00:00:00 2001 From: Julian Saffer <31139467+jsaffer@users.noreply.github.com> Date: Thu, 22 May 2025 23:16:52 +0200 Subject: [PATCH 3/4] Update GST_IT Updating the 4-component GST model to the 4-population version, having C and O combined with the correct Z and Fe combined with the super heavy component --- src/simweights/_fluxes.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/simweights/_fluxes.py b/src/simweights/_fluxes.py index 2956e38..e32cb61 100644 --- a/src/simweights/_fluxes.py +++ b/src/simweights/_fluxes.py @@ -311,23 +311,22 @@ class GlobalFitGST(CosmicRayFlux): class GlobalFitGST_IT(CosmicRayFlux): # pylint: disable=invalid-name - r"""GlobalFitGST for four components [p, He, O, Fe]. + r"""GlobalFitGST (4 populations) for four components [p, He, O, Fe]. The Oxygen group is the sum of Carbon and Oxygen groups. + The Iron group is the sum of Iron, Tellurium and Mercury groups. """ pdgids = PDGID_4COMP _funcs = ( - lambda E: 0.7 * E**-2.66 * exp(-E / 1.2e5) + 0.015 * E**-2.4 * exp(-E / 4e6) + 0.0014 * E**-2.4 * exp(-E / 1.3e9), - lambda E: 0.32 * E**-2.58 * exp(-E / 1.2e5 / 2) + 0.0065 * E**-2.3 * exp(-E / 4e6 / 2), - lambda E: 0.01 * E**-2.40 * exp(-E / 1.2e5 / 6) - + 0.0006 * E**-2.3 * exp(-E / 4e6 / 6) - + 0.013 * E**-2.40 * exp(-E / 1.2e5 / 8) - + 0.0007 * E**-2.3 * exp(-E / 4e6 / 8), - lambda E: 0.006 * E**-2.30 * exp(-E / 1.2e5 / 26) - + 0.00023 * E**-2.2 * exp(-E / 4e6 / 26) - + 0.0000025 * E**-2.2 * exp(-E / 1.3e9 / 26), - ) + lambda E: 0.7000 * E**-2.66 * exp(-E / 1.2e5) + 0.0150 * E**-2.4 * exp(-E / 4e6) + 0.0012 * E**-2.4 * exp(-E / 1.5e9) + 0.00012 * E**-2.4 * exp(-E / 40e9), + lambda E: 0.3200 * E**-2.58 * exp(-E / 1.2e5 / 2) + 0.0065 * E**-2.3 * exp(-E / 4e6 / 2), + lambda E: 0.0100 * E**-2.40 * exp(-E / 1.2e5 / 6) + 0.0006 * E**-2.3 * exp(-E / 4e6 / 6) + + 0.0130 * E**-2.40 * exp(-E / 1.2e5 / 8) + 0.0007 * E**-2.3 * exp(-E / 4e6 / 8), + lambda E: 0.0060 * E**-2.30 * exp(-E / 1.2e5 / 26) + 0.00021 * E**-2.2 * exp(-E / 4e6 / 26) + 0.0000011 * E**-2.2 * exp(-E / 1.5e9 / 26) + + 0.00001 * E**-2.2 * exp(-E / 4e6 / 52) + + 0.000053 * E**-2.2 * exp(-E / 4e6 / 80), + ) class GlobalSplineFitBase(CosmicRayFlux): From fbbb34764cc415b9ff63ecee86043c828ecb9eb7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 20:24:49 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/simweights/_fluxes.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/simweights/_fluxes.py b/src/simweights/_fluxes.py index e32cb61..0a7d333 100644 --- a/src/simweights/_fluxes.py +++ b/src/simweights/_fluxes.py @@ -319,14 +319,21 @@ class GlobalFitGST_IT(CosmicRayFlux): # pylint: disable=invalid-name pdgids = PDGID_4COMP _funcs = ( - lambda E: 0.7000 * E**-2.66 * exp(-E / 1.2e5) + 0.0150 * E**-2.4 * exp(-E / 4e6) + 0.0012 * E**-2.4 * exp(-E / 1.5e9) + 0.00012 * E**-2.4 * exp(-E / 40e9), - lambda E: 0.3200 * E**-2.58 * exp(-E / 1.2e5 / 2) + 0.0065 * E**-2.3 * exp(-E / 4e6 / 2), - lambda E: 0.0100 * E**-2.40 * exp(-E / 1.2e5 / 6) + 0.0006 * E**-2.3 * exp(-E / 4e6 / 6) - + 0.0130 * E**-2.40 * exp(-E / 1.2e5 / 8) + 0.0007 * E**-2.3 * exp(-E / 4e6 / 8), - lambda E: 0.0060 * E**-2.30 * exp(-E / 1.2e5 / 26) + 0.00021 * E**-2.2 * exp(-E / 4e6 / 26) + 0.0000011 * E**-2.2 * exp(-E / 1.5e9 / 26) - + 0.00001 * E**-2.2 * exp(-E / 4e6 / 52) - + 0.000053 * E**-2.2 * exp(-E / 4e6 / 80), - ) + lambda E: 0.7000 * E**-2.66 * exp(-E / 1.2e5) + + 0.0150 * E**-2.4 * exp(-E / 4e6) + + 0.0012 * E**-2.4 * exp(-E / 1.5e9) + + 0.00012 * E**-2.4 * exp(-E / 40e9), + lambda E: 0.3200 * E**-2.58 * exp(-E / 1.2e5 / 2) + 0.0065 * E**-2.3 * exp(-E / 4e6 / 2), + lambda E: 0.0100 * E**-2.40 * exp(-E / 1.2e5 / 6) + + 0.0006 * E**-2.3 * exp(-E / 4e6 / 6) + + 0.0130 * E**-2.40 * exp(-E / 1.2e5 / 8) + + 0.0007 * E**-2.3 * exp(-E / 4e6 / 8), + lambda E: 0.0060 * E**-2.30 * exp(-E / 1.2e5 / 26) + + 0.00021 * E**-2.2 * exp(-E / 4e6 / 26) + + 0.0000011 * E**-2.2 * exp(-E / 1.5e9 / 26) + + 0.00001 * E**-2.2 * exp(-E / 4e6 / 52) + + 0.000053 * E**-2.2 * exp(-E / 4e6 / 80), + ) class GlobalSplineFitBase(CosmicRayFlux):