28 sys.exit(
"ztsim02.py> # of arg is strange. Exit.")
34 print(
'f_out_root = %s\n' % f_out_root)
42 b2.set_log_level(b2.LogLevel.ERROR)
47 basf2datadir = os.path.join(os.environ.get(
'BELLE2_LOCAL_DIR',
None),
'data')
53 eventinfosetter = b2.register_module(
'EventInfoSetter')
54 eventinfoprinter = b2.register_module(
'EventInfoPrinter')
56 gearbox = b2.register_module(
'Gearbox')
63 geometry = b2.register_module(
'Geometry')
66 g4sim = b2.register_module(
'FullSim')
70 evtmetainfo = b2.register_module(
'Progress')
76 mcparticleprinter = b2.register_module(
'PrintMCParticles')
79 cdcdigitizer = b2.register_module(
'CDCDigitizer')
80 cdctrg = b2.register_module(
"TRGCDC")
86 eventinfosetter.param({
'evtNumList': [100],
'runList': [1]})
88 intseed = random.randint(1, 10000000)
90 pGun = b2.register_module(
'ParticleGun')
94 'momentumGeneration':
'uniform',
95 'momentumParams': [1.0, 2.0],
96 'thetaGeneration':
'uniform',
97 'thetaParams': [50., 130.],
98 'phiGeneration':
'uniform',
100 'phiParams': [-45, 45],
101 'vertexGeneration':
'uniform',
102 'xVertexParams': [0.0, 0.0],
103 'yVertexParams': [0.0, 0.0],
104 'zVertexParams': [0.0, 0.0],
107 pGun.param(param_pGun)
109 mcparticleprinter.param(
'maxLevel', -1)
116 param_cdcdigi = {
'Fraction': 1,
120 cdcdigitizer.param(param_cdcdigi)
121 cdcdigitizer.param(
'AddInWirePropagationDelay',
True)
122 cdcdigitizer.param(
'AddTimeOfFlight',
True)
127 cdctrg.param(
'ConfigFile', os.path.join(basf2datadir,
"trg/cdc/TRGCDCConfig_0_20101111_1051_2013beamtest.dat"))
129 cdctrg.param(
'CurlBackStop', 0)
130 cdctrg.param(
'SimulationMode', 1)
131 cdctrg.param(
'FastSimulationMode', 0)
137 cdctrg.param(
'InnerTSLUTFile', os.path.join(basf2datadir,
"trg/cdc/innerLUT_v2.2.coe"))
138 cdctrg.param(
'OuterTSLUTFile', os.path.join(basf2datadir,
"trg/cdc/outerLUT_v2.2.coe"))
142 cdctrg.param(
'2DFinderPerfect', 0)
143 cdctrg.param(
'HoughFinderMeshX', 160)
144 cdctrg.param(
'HoughFinderMeshY', 26)
146 cdctrg.param(
'Hough3DRootFile', 1)
151 cdctrg.param(
'Fitter3DRootFile', 1)
152 cdctrg.param(
'RootFitter3DFile',
'Fitter3D.root')
153 cdctrg.param(
'Fitter3DLRLUT', 0)
157 trgeclfam = b2.register_module(
"TRGECLFAM")
158 trgecl = b2.register_module(
"TRGECL")
159 trgeclMC = b2.register_module(
"TRGECLMCMatching")
161 trgeclfam.param(
'FAMFitMethod', 1)
163 grltrg = b2.register_module(
'TRGGRL')
164 grltrg.param(
'DebugLevel', 0)
165 grltrg.param(
'ConfigFile',
166 os.path.join(os.environ[
'BELLE2_LOCAL_DIR'],
167 "trg/gdl/data/ftd/0.01/ftd_0.01"))
170 rootoutput = b2.register_module(
'RootOutput')
171 rootoutput.param(
'outputFileName', f_out_root)
180 main = b2.create_path()
184 main.add_module(eventinfosetter)
185 main.add_module(eventinfoprinter)
186 main.add_module(evtmetainfo)
188 main.add_module(gearbox)
189 main.add_module(geometry)
190 main.add_module(pGun)
191 main.add_module(mcparticleprinter)
192 main.add_module(g4sim)
194 main.add_module(cdcdigitizer)
195 main.add_module(cdctrg)
196 main.add_module(trgeclfam)
197 main.add_module(trgecl)
198 main.add_module(grltrg)
201 main.add_module(rootoutput)