00001
00002 import os
00003 dayadata = os.getenv("SIMUALGROOT") + "/data"
00004 os.putenv("DAYA_DATA_DIR",dayadata)
00005
00006 import gaudimodule as gm
00007 g = gm.AppMgr()
00008
00009
00010 hist = g.service('THistSvc')
00011 hist.Output = [ "File1 DATAFILE='MCTruthTuple.root' OPT='RECREATE' TYP='ROOT'" ]
00012 hist.OutputLevel = 1
00013 hist.PrintAll = True
00014
00015
00016 g.TopAlg = ['GgDybAlg', 'MCTruthMaker', 'TNtupleWriter']
00017 g.EvtMax = 20
00018 g.EvtSel = "NONE"
00019
00020
00021 which_geometry = "legacy"
00022
00023 g.ExtSvc += ["GiGa"]
00024 giga = g.service('GiGa')
00025 giga.PhysicsList = ""
00026 if which_geometry == "legacy":
00027 giga.GeometrySource = ""
00028 giga.EventAction = ""
00029 giga.RunAction = ""
00030 giga.StackingAction = ""
00031 giga.TrackingAction = ""
00032 giga.SteppingAction = ""
00033
00034
00035 gg = g.algorithm('GgDybAlg')
00036 gg.GeometryType = which_geometry
00037
00038 mctm = g.algorithm('MCTruthMaker')
00039 mctm.MC_Source = 'giga'
00040
00041 msv = g.service('MessageSvc')
00042 msv.OutputLevel = 1
00043
00044
00045 g.initialize()
00046
00047 g.run( g.EvtMax )
00048
00049