25 b2.set_log_level(b2.LogLevel.ERROR)
28 main = b2.create_path()
31 eventinfosetter = b2.register_module(
'EventInfoSetter')
32 eventinfosetter.param(
'evtNumList', [10000])
33 main.add_module(eventinfosetter)
36 gearbox = b2.register_module(
'Gearbox')
37 main.add_module(gearbox)
40 geometry = b2.register_module(
'Geometry')
41 geometry.param(
'useDB',
False)
42 geometry.param(
'components', [
'TOP'])
43 main.add_module(geometry)
48 calpulse = b2.register_module(
'TOPCalPulseGenerator')
49 calpulse.param(
'asicChannels', [0])
50 calpulse.param(
'moduleIDs', [moduleID])
51 calpulse.param(
'amplitude', 750.0)
52 main.add_module(calpulse)
55 topdigi = b2.register_module(
'TOPDigitizer')
56 topdigi.param(
'useSampleTimeCalibration',
True)
57 main.add_module(topdigi)
60 calpulse = b2.register_module(
'TOPDoublePulseGenerator')
61 calpulse.param(
'asicChannels', [0])
62 calpulse.param(
'moduleIDs', [moduleID])
63 calpulse.param(
'useDatabase',
True)
64 calpulse.param(
'outputFileName',
'usedSampleTimes.root')
65 main.add_module(calpulse)
69 calib = b2.register_module(
'TOPTimeBaseCalibrator')
70 calib.param(
'moduleID', moduleID)
71 calib.param(
'minTimeDiff', 40)
72 calib.param(
'maxTimeDiff', 80)
73 calib.param(
'directoryName',
'tbc')
74 calib.param(
'method', 1)
75 calib.param(
'useFallingEdge',
False)
76 calib.logging.log_level = b2.LogLevel.INFO
77 main.add_module(calib)
80 progress = b2.register_module(
'Progress')
81 main.add_module(progress)
88 print(b2.statistics(b2.statistics.TERM))