Ejemplo n.º 1
0
parser = ArgumentParser()
parser.add_argument("outfile", help="save plot to file")
args = parser.parse_args()

import matplotlib

matplotlib.use('agg')
import pylab, numpy
from icecube import dataclasses, MuonGun

surface = MuonGun.Cylinder(1600, 800)
area = numpy.pi**2 * surface.radius * (surface.radius + surface.length)

# 1 file of E^-2.6 5-component 3e4-1e9 GeV (3:2:1:1:1)
soft = 4e5 * MuonGun.corsika_genprob('CascadeOptimized5Comp')
# 1 file of E^-2 5-component 6e2-1e11 GeV (10:5:3:2:1)
hard = 2.5e6 * MuonGun.corsika_genprob('Standard5Comp')
# In order to compare to "unweighted" CORSIKA, turn the Hoerandel flux
# into a probability (since we happen to know the integral)
areanorm = 0.131475115 * area
# 1 file of natural-spectrum ("unweighted") CORSIKA
unweighted = (2.5e7 / areanorm) * MuonGun.corsika_genprob('Hoerandel5')

model = MuonGun.load_model('GaisserH4a_atmod12_SIBYLL')
model.flux.min_multiplicity = 1
model.flux.max_multiplicity = 1
# spectrum = MuonGun.OffsetPowerLaw(5.0, 5e2, 8e2, 10**4.5)
spectrum = MuonGun.OffsetPowerLaw(5, 8e2, 2e3, 1e5)

# spectrum = MuonGun.OffsetPowerLaw(1.1, 650, 800, 1e8)
Ejemplo n.º 2
0
             radius = steering['CORSIKA::radius'] * I3Units.m
         else:
             radius = 800 * I3Units.m
             warnings.warn(
                 "No target cylinder length for dataset {dataset_id}! Assuming {radius:.0f} m"
                 .format(**locals()))
     if use_muongun:
         from icecube import MuonGun
         nevents = steering['CORSIKA::showers']
         if gamma == [-2.0] * 5 and norm == [10., 5., 3., 2., 1.]:
             model = 'Standard5Comp'
         elif gamma == [-2.6] * 5 and norm == [3., 2., 1., 1., 1.]:
             model = 'CascadeOptimized5Comp'
         else:
             raise ValueError("Unknown CORSIKA configuration!")
         generator = nevents * MuonGun.corsika_genprob(model)
     else:
         generator = FiveComponent(
             steering['CORSIKA::showers'],
             emin=steering['CORSIKA::eprimarymin'] * I3Units.GeV,
             emax=steering['CORSIKA::eprimarymax'] * I3Units.GeV,
             normalization=norm,
             gamma=gamma,
             LowerCutoffType=LowerCutoffType,
             UpperCutoffType=UpperCutoffType,
             height=length,
             radius=radius)
 elif steering['composition'].startswith('polygonato') or steering[
         'composition'].startswith('Hoerandel'):
     if use_muongun:
         from icecube import MuonGun