MuonGunGenerator

The IceProd module MuonGunGenerator generates single atmospheric muons with MuonGun and propagates them through the ice with PROPOSAL by calling the GenerateCosmicRayMuons and PropagateMuons tray segments in its execution method, respectively. Finally, the module writes an I3File containing only Q-frames; each Q-frame contains the following frame objects:

  • I3MCTree

  • MMCTrackList

  • RNGState

  • muongun_weights

Example

A basic example script; the module’s parameters can be changed via the command line:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import logging

import icecube.simprod.modules

logging.basicConfig(level=logging.INFO)


if __name__ == "__main__":
    mu_gun = icecube.simprod.modules.MuonGunGenerator()

    # Change some default values.
    parser = mu_gun._opt_parser
    parser.defaults["nevents"] = 100
    parser.defaults["outputfile"] = "muongun_fullchain.i3.gz"
    parser.defaults["summaryfile"] = "muongun_fullchain.xml"

    stats = {}
    mu_gun.ExecuteOpts(stats)

    for key, val in stats.iteritems():
        print "%s: %s" % (key, val)

API

class icecube.simprod.modules.MuonGunGenerator

Bases: ParsingModule

IceProd module for MuonGun simulations

It defines parameters for and executes icecube.simprod.segments.GenerateCosmicRayMuons() and icecube.simprod.segments.PropagateMuons().

Module parameters:

pronum

Process number

seed

RNG seed

gcdfile

GeoCalibDetStatus filename

nevents

Number of generated events

model

Primary cosmic-ray flux parametrization

gamma

Power law spectral index

offset

Power law offset in GeV

emin

Mininum generated energy in GeV

emax

Maximum generated energy in GeV

length

Cylinder length in m

radius

Cylinder radius in m

x

Cylinder x-position in m

y

Cylinder y-position in m

z

Cylinder z-position in m

length_dc

Inner cylinder length in m

radius_dc

Inner cylinder radius in m

x_dc

Inner cylinder x-position in m

y_dc

Inner cylinder y-position in m

z_dc

Inner cylinder z-position in m

deepcore

Use inner cylinder

outputfile

Output filename

summaryfile

Summary filename