12from basf2
import conditions
as b2conditions
13from simulation
import add_simulation
16svdOnlySimulation =
False
19 b2conditions.prepend_globaltag(
"svd_onlySVDinGeoConfiguration")
21main = b2.create_path()
25eventinfosetter = b2.register_module(
'EventInfoSetter')
26eventinfosetter.param(
'expList', [0])
27eventinfosetter.param(
'runList', [1])
28eventinfosetter.param(
'evtNumList', [numEvents])
29main.add_module(eventinfosetter)
30main.add_module(
'EventInfoPrinter')
31main.add_module(
'EvtGenInput')
33if not svdOnlySimulation:
35 add_simulation(main, simulateT0jitter=
True, usePXDDataReduction=
False, forceSetPXDDataReduction=
True)
37 for m
in main.modules():
38 if m.name() ==
"SVDEventInfoSetter":
39 m.param(
"useDB",
True)
41 m.param(
"relativeShift", 9)
42 m.set_log_level(b2.LogLevel.DEBUG)
44 if m.name() ==
"SVDDigitizer":
45 m.set_log_level(b2.LogLevel.INFO)
51 main.add_module(
'Gearbox')
54 geometry = b2.register_module(
'Geometry')
55 main.add_module(geometry)
58 eventt0 = b2.register_module(
'EventT0Generator')
59 eventt0.param(
'coreGaussWidth', 10.0)
61 eventt0.param(
'tailGaussFraction', 0.0)
62 eventt0.param(
'tailGaussWidth', 20.0)
66 main.add_module(
'FullSim')
75 svdevtinfoset = b2.register_module(
"SVDEventInfoSetter")
77 svdevtinfoset.param(
"daqMode", 3)
78 svdevtinfoset.param(
"relativeShift", 9)
79 svdevtinfoset.set_log_level(b2.LogLevel.DEBUG)
80 svdevtinfoset.set_debug_level(25)
82 main.add_module(svdevtinfoset)
84 digitizer = b2.register_module(
'SVDDigitizer')
85 digitizer.param(
'statisticsFilename',
"digitizer_test2021_1_hwclock.root")
86 digitizer.param(
'storeWaveforms',
True)
87 digitizer.param(
'signalsList',
"digitizer_test2021_1_hwclock.txt")
88 digitizer.set_log_level(b2.LogLevel.DEBUG)
89 digitizer.set_debug_level(30)
90 main.add_module(digitizer)
92main.add_module(
'RootOutput')
93main.add_module(
'Progress')