icecube.simprod.segments.GenerateCosmicRayMuons module

Tray segments for MuonGun simulations

icecube.simprod.segments.GenerateCosmicRayMuons.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.GenerateCosmicRayMuons.GenerateNaturalRateMuons(tray, name, mctree_name='I3MCTree_preMuonProp', flux_model='GaisserH4a_atmod12_SIBYLL', Surface=None, GCDFile=None, GeometryMargin=60.0, NumEvents=100)

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:
  • mctree_name (str) – Output name for I3MCTree

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

  • 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

icecube.simprod.segments.GenerateCosmicRayMuons.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