17 basf2datadir = os.path.join(os.environ.get(
'BELLE2_LOCAL_DIR',
None),
'data')
20 particlegun = b2.register_module(
'ParticleGun')
23 particlegun.param(
'randomSeed', 346)
25 particlegun.param(
'pdgCodes', [11])
26 particlegun.param(
'nTracks', 1)
27 particlegun.param(
'momentumGeneration',
'uniformPt')
29 particlegun.param(
'momentumParams', [1.0, 1.0])
30 particlegun.param(
'thetaGeneration',
'uniform')
32 particlegun.param(
'thetaParams', [45, 45])
33 particlegun.param(
'phiGeneration',
'uniform')
34 particlegun.param(
'phiParams', [0, 360])
35 particlegun.param(
'vertexGeneration',
'fixed')
36 particlegun.param(
'vertexGeneration',
'normal')
37 particlegun.param(
'xVertexParams', [0, 0.0])
38 particlegun.param(
'yVertexParams', [0, 0.0])
39 particlegun.param(
'zVertexParams', [0, 0.0])
42 eventinfosetter = b2.register_module(
'EventInfoSetter')
43 eventinfoprinter = b2.register_module(
'Progress')
45 paramloader = b2.register_module(
'Gearbox')
46 geobuilder = b2.register_module(
'Geometry')
48 g4sim = b2.register_module(
'FullSim')
49 cdcdigitizer = b2.register_module(
'CDCDigitizer')
50 out = b2.register_module(
'SimpleOutput')
51 cdctrg = b2.register_module(
"TRGCDC")
52 tsstream = b2.register_module(
"TRGCDCTSStream")
56 eventinfosetter.param({
'EvtNumList': [10],
'RunList': [1]})
59 cdctrg.param(
'ConfigFile',
60 os.path.join(basf2datadir,
61 "trg/TRGCDCConfig_0_20101111_1051.dat"))
62 cdctrg.param(
'DebugLevel', 0)
63 cdctrg.param(
'CurlBackStop', 1)
64 cdctrg.param(
'HoughFinderPerfect', 1)
67 tsstream.param(
'DebugLevel', 2)
68 tsstream.param(
'Mode', 0)
69 tsstream.param(
'OutputStreamFile',
"TRGCDCTSStream.dat")
73 mcparticleprinter = b2.register_module(
'PrintMCParticles')
74 mcparticleprinter.param(
'maxLevel', -1)
77 geobuilder.param(
'Components', [
'MagneticField',
'CDC'
81 param_cdcdigi = {
'Fraction': 1,
'Resolution1': 0.00,
'Resolution2': 0.0}
82 cdcdigitizer.param(param_cdcdigi)
85 main = b2.create_path()
88 main.add_module(eventinfosetter)
89 main.add_module(eventinfoprinter)
90 main.add_module(paramloader)
91 main.add_module(geobuilder)
92 main.add_module(particlegun)
93 main.add_module(mcparticleprinter)
94 main.add_module(g4sim)
95 main.add_module(cdcdigitizer)
96 main.add_module(cdctrg)
97 main.add_module(tsstream)