27 sys.exit(
"ztsim02.py> # of arg is strange. Exit.")
33print(f
'f_out_root = {f_out_root}\n')
41b2.set_log_level(b2.LogLevel.ERROR)
46basf2datadir = os.path.join(os.environ.get(
'BELLE2_LOCAL_DIR',
None),
'data')
52eventinfosetter = b2.register_module(
'EventInfoSetter')
53eventinfoprinter = b2.register_module(
'EventInfoPrinter')
55gearbox = b2.register_module(
'Gearbox')
62geometry = b2.register_module(
'Geometry')
65g4sim = b2.register_module(
'FullSim')
69evtmetainfo = b2.register_module(
'Progress')
75mcparticleprinter = b2.register_module(
'PrintMCParticles')
78cdcdigitizer = b2.register_module(
'CDCDigitizer')
79cdctrg = b2.register_module(
"TRGCDC")
85eventinfosetter.param({
'evtNumList': [100],
'runList': [1]})
87intseed = random.randint(1, 10000000)
89pGun = b2.register_module(
'ParticleGun')
93 'momentumGeneration':
'uniform',
94 'momentumParams': [1.0, 2.0],
95 'thetaGeneration':
'uniform',
96 'thetaParams': [50., 130.],
97 'phiGeneration':
'uniform',
99 'phiParams': [-45, 45],
100 'vertexGeneration':
'uniform',
101 'xVertexParams': [0.0, 0.0],
102 'yVertexParams': [0.0, 0.0],
103 'zVertexParams': [0.0, 0.0],
106pGun.param(param_pGun)
108mcparticleprinter.param(
'maxLevel', -1)
115param_cdcdigi = {
'Fraction': 1,
119cdcdigitizer.param(param_cdcdigi)
120cdcdigitizer.param(
'AddInWirePropagationDelay',
True)
121cdcdigitizer.param(
'AddTimeOfFlight',
True)
126cdctrg.param(
'ConfigFile', os.path.join(basf2datadir,
"trg/cdc/TRGCDCConfig_0_20101111_1051_2013beamtest.dat"))
128cdctrg.param(
'CurlBackStop', 0)
129cdctrg.param(
'SimulationMode', 1)
130cdctrg.param(
'FastSimulationMode', 0)
136cdctrg.param(
'InnerTSLUTFile', os.path.join(basf2datadir,
"trg/cdc/innerLUT_v2.2.coe"))
137cdctrg.param(
'OuterTSLUTFile', os.path.join(basf2datadir,
"trg/cdc/outerLUT_v2.2.coe"))
141cdctrg.param(
'2DFinderPerfect', 0)
142cdctrg.param(
'HoughFinderMeshX', 160)
143cdctrg.param(
'HoughFinderMeshY', 26)
145cdctrg.param(
'Hough3DRootFile', 1)
150cdctrg.param(
'Fitter3DRootFile', 1)
151cdctrg.param(
'RootFitter3DFile',
'Fitter3D.root')
152cdctrg.param(
'Fitter3DLRLUT', 0)
156trgeclfam = b2.register_module(
"TRGECLFAM")
157trgecl = b2.register_module(
"TRGECL")
158trgeclMC = b2.register_module(
"TRGECLMCMatching")
160trgeclfam.param(
'FAMFitMethod', 1)
162grltrg = b2.register_module(
'TRGGRL')
163grltrg.param(
'DebugLevel', 0)
164grltrg.param(
'ConfigFile',
165 os.path.join(os.environ[
'BELLE2_LOCAL_DIR'],
166 "trg/gdl/data/ftd/0.01/ftd_0.01"))
169rootoutput = b2.register_module(
'RootOutput')
170rootoutput.param(
'outputFileName', f_out_root)
179main = b2.create_path()
183main.add_module(eventinfosetter)
184main.add_module(eventinfoprinter)
185main.add_module(evtmetainfo)
187main.add_module(gearbox)
188main.add_module(geometry)
190main.add_module(mcparticleprinter)
191main.add_module(g4sim)
193main.add_module(cdcdigitizer)
194main.add_module(cdctrg)
195main.add_module(trgeclfam)
196main.add_module(trgecl)
197main.add_module(grltrg)
200main.add_module(rootoutput)