GenerateCosmicRayMuons

Corresponding IceProd module: MuonGunGenerator

MuonGun simulations for IceCube

The GenerateCosmicRayMuons tray segment generates single atmospheric muons (no muon bundles) with MuonGun. Instead of simulating the entire air shower, only single muon events are injected from \(\theta = 0 ... 180^{\circ}\) based on a cylindrical injection surface with radius \(r = 800\;\rm m\) and length \(l = 1600\;\rm m\), aligned to the z-axis, and centered at \((0,0,0)\;\rm m\) in detector coordinates per default. The in-ice muon spectrum is approximated with a power law,

\[dP/dE_{\mu} \approx (E_{\mu} + b)^{-\gamma},\]

with an offset energy \(b = 700\;\rm GeV\) and a spectral index \(\gamma = 2\) per default for standard IceCube simulations. The default muon energy range is set to \(10\;\rm TeV ... 10\;\rm PeV\). For each generated event, a weight is calculated according to the Hoerandel model.

See also

Available flux parameterizations for list of available cosmic-ray flux parametrizations.

MuonGun simulations for DeepCore

Low-energy simulations may set use_inner_cylinder=True in order to switch from a static injection to an energy-dependent one: a second smaller cylinder around DeepCore, \(\vec{p}_{0} = (46.3,-34.9,-300)\;\rm m\), with radius \(r = 150\;\rm m\) and length \(l = 500\;\rm m\) is created, and the injection surface is scaled between the outer and inner cylinder w.r.t. energy.

MuonGun simulations for effective area calculations

The GenerateSingleMuons tray segment generates single muons with MuonGun’s icecube.MuonGun.Floodlight injector, which illuminates its sampling surface isotropically, and calculates the effective area (one divided by fluence) for every generated event.

API

icecube.simprod.segments.GenerateCosmicRayMuons(tray, name, mctree_name='I3MCTree_preMuonProp', num_events=1, flux_model='Hoerandel5_atmod12_SIBYLL', gamma_index=2.0, energy_offset=700.0, energy_min=10000.0, energy_max=10000000.0, cylinder_length=1600.0, cylinder_radius=800.0, cylinder_x=0.0, cylinder_y=0.0, cylinder_z=0.0, inner_cylinder_length=500.0, inner_cylinder_radius=150.0, inner_cylinder_x=46.3, inner_cylinder_y=-34.9, inner_cylinder_z=-300.0, use_inner_cylinder=False)

Generate atmospheric muons with MuonGun

This segment generates atm. muons with MuonGun; it is intended to be used within icecube.simprod.modules.MuonGunGenerator.

Note

Only single muons are generated, no bundles. For a effective generation, the in-ice muon scpectrum is approximated with \(dP/dE_{\mu} \approx (E_{\mu} + b)^{-\gamma}\).

Parameters:
  • mctree_name (str) – Output name for I3MCTree

  • num_events (int) – Number of events to generate

  • flux_model (str) – Name of primary cosmic-ray flux parametrization

  • gamma_index (float) – Spectral index \(\gamma\) of power-law approximation

  • energy_offset (float) – Energy offset \(b\) of power-law approximation

  • energy_min (float) – Minimum generated energy in GeV

  • energy_max (float) – Maximum generated energy in GeV

  • cylinder_length (float) – Length of injection cylinder in m

  • cylinder_radius (float) – Radius of injection cylinder in m

  • cylinder_x (float) – Cartesian coordinates \((x, y, z)\) of injection cylinder’s center in m

  • cylinder_y (float) – Cartesian coordinates \((x, y, z)\) of injection cylinder’s center in m

  • cylinder_z (float) – Cartesian coordinates \((x, y, z)\) of injection cylinder’s center in m

  • inner_cylinder_length (float) – Length of inner injection cylinder in m; relevant for DeepCore simulations.

  • inner_cylinder_radius (float) – Radius of inner injection cylinder in m; relevant for DeepCore simulations.

  • inner_cylinder_x (float) – Cartesian coordinates \((x, y, z)\) of inner injection cylinder’s center in m; relevant for DeepCore simulations.

  • inner_cylinder_y (float) – Cartesian coordinates \((x, y, z)\) of inner injection cylinder’s center in m; relevant for DeepCore simulations.

  • inner_cylinder_z (float) – Cartesian coordinates \((x, y, z)\) of inner injection cylinder’s center in m; relevant for DeepCore simulations.

  • use_inner_cylinder (bool) – Use inner injection cylinder together with constant surface scaling function; relevant for DeepCore simulations.

icecube.simprod.segments.GenerateSingleMuons(tray, name, Surface=None, GCDFile=None, GeometryMargin=60.0, NumEvents=100, FromEnergy=10000.000000000002, ToEnergy=10000000.000000002, BreakEnergy=1000.0000000000001, GammaIndex=2.0, ZenithRange=[0.0, 3.141592653589793])

Generate single muons with MuonGun

This segment injects single muons with MuonGun isotropically. This useful for calculating effective areas.

Note

For a effective generation, the in-ice muon scpectrum is approximated with \(dP/dE_{\mu} \approx (E_{\mu} + b)^{-\gamma}\).

Parameters:
  • Surface (icecube.MuonGun.SamplingSurface) – Injection surface; if not specified and if GCDFile is None, a cylinder with a length of 1600 m and a radius of 800 m is used.

  • GCDFile (str) – Path to geometry file; if specified, the injection surface will be an icecube.MuonGun.ExtrudedPolygon around the in-ice DOMs. Remote file locations are supported via icecube.dataio.I3FileStager.

  • GeometryMargin (float) – If GCDFile is specified, this margin (in meters) is used to expand the convex hull around the in-ice DOMs.

  • NumEvents (int) – Number of events to generate

  • FromEnergy (float) – Minimum generated energy in GeV

  • ToEnergy (float) – Maximum generated energy in GeV

  • GammaIndex (float) – Spectral index \(\gamma\) of power-law approximation

  • BreakEnergy (float) – Energy offset \(b\) of power-law approximation

  • ZenithRange (list) – Zenith angle range in radians for isotropic injection