Exemplo n.º 1
0
def test_app():

    print 'Making geometry'
    geo = sample.load_geom("geo.root","geometry")

    print 'Making app'
    app = sample.app()

    # fixme: run prep/gen.py to make an example
    propfile = "prop.root"
    print 'Setting properties file "%s"' % propfile 
    app.SetPropertiesFile(propfile)

    mc = sample.mc()

    print 'Initialize MC, triggers C++ detector construction'
    mc.Init()

    print 'Build MC physics'
    mc.BuildPhysics()

    print 'Running 10'
    mc.ProcessRun(10)

    print 'And, I am out'
    return
Exemplo n.º 2
0
def test_water():
    'Make some water medium'

    print 'Making geometry'
    top = sample.topvol()

    print 'Making app'
    app = sample.app()

    water.register(ROOT.gMC)

    print 'Initialize MC, triggers C++ detector construction'
    ROOT.gMC.Init()

    print 'Build MC physics'
    ROOT.gMC.BuildPhysics()

    print 'Running 10'
    ROOT.gMC.ProcessRun(10)

    print 'And, I am out'
    return