Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 21st, 2012  |  syntax: None  |  size: 2.59 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. tray = I3Tray()
  2.  
  3. tray.AddService("I3JavaVMFactory","javavm")(
  4.     ("Options",[expandvars("-Djava.class.path=$I3_BUILD/lib/mmc.jar"),"-Xmx2g","-Xms1g"])
  5.     )
  6.  
  7.  
  8. # random seed
  9. tray.AddService("I3SPRNGRandomServiceFactory","random")(
  10.     ("Seed",Seeed),
  11.     ("NStreams",Seeed+1),
  12.     ("StreamNum",1)
  13.     )
  14.  
  15. tray.AddService("I3PhotonicsServiceFactory","PSService")(
  16.     ("TablesDirectory",tablesDir),
  17.     ("DriverFileDirectory",driverFilePath),
  18.     ("PhotonicsLevel1DriverFile",level1Driver),
  19.     ("PhotonicsLevel2DriverFile",level2Driver),
  20.     ("PhotonicsAngularSelectionLow",photonicsAngleLowDeg*I3Units.deg),
  21.     ("PhotonicsAngularSelectionHigh",photonicsAngleHighDeg*I3Units.deg),
  22.     ("UseDummyService",True),
  23.     )
  24.  
  25. tray.AddModule("I3InfiniteSource", "source",
  26.                prefix = expandvars("$I3_PORTS/test-data/sim/GeoCalibDetectorStatus_IC86.55380_corrected.i3.gz")
  27.                )
  28.  
  29. tray.AddModule("I3NeutrinoGenerator","generator")(
  30.     ("WeightDictName",           weightdict_name),
  31.     ("AutomaticMuonFinalVolume", auto_muon_finalvolume),
  32.     ("GammaIndex",               gammaIndex),
  33.     ("NeutrinoFlavor",           flavorString),
  34.     ("EnergyMinLog",             energyMinLog),
  35.     ("EnergyMaxLog",             energyMaxLog),
  36.     ("PointSourceZenith",        Zenith * I3Units.deg),
  37.     ("PointSourceZenithSigma",   Sigma * I3Units.deg),
  38.     ("PointSourceAzimuth",       Azimuth * I3Units.deg),
  39.     ("PointSourceAzimuthSigma",  Sigma * I3Units.deg),
  40.     ("SimulatePointSource",      True),
  41.     ("AzimuthMin",               0 * I3Units.deg),
  42.     ("AzimuthMax",               360 * I3Units.deg),
  43.     ("ZenithMin",                0 * I3Units.deg),
  44.     ("ZenithMax",                180 * I3Units.deg),
  45.     ("InjectionRadius",          injectionRadius),
  46.     ("DistanceEntrance",         distanceEntrance),
  47.     ("DistanceExit",             distanceExit),
  48.     ("DetectorDepth",            detectorDepth),
  49.     #If this is true, neutrino is injected on the
  50.     #surface of in-depth cylinder, not on the Earth
  51.     ("NoInEarthPropagation",     onlyweight),
  52.     ("NEvents",nEvents),
  53.     )
  54.  
  55. tray.AddModule("I3PropagatorMMC","mmc")(
  56.     ('rerr',"/dev/null"),
  57.     ("mode", -1),
  58.     ("opts", "-seed=1 -radius=1000 -length=1700" ),
  59.     ("ShiftParticles", 0)
  60.     )
  61.  
  62. tray.AddModule("I3HitMakerModule","hit-constructor")(
  63.     )
  64.  
  65. tray.AddModule("I3PMTSimulator","pmt")(
  66.     )
  67.  
  68. tray.AddModule("I3DOMsimulator","domsimulator")(
  69.     )
  70.  
  71. tray.AddModule("I3Writer","writer")(
  72.     ("filename", outputBaseName),
  73.     )
  74.  
  75. tray.AddModule("TrashCan", "the can")
  76.  
  77. tray.Execute()
  78. tray.Finish()