12from ROOT
import Belle2
13from monitor_module
import Monitor
23if not input_files.empty()
and input_files.front().endswith(
".sroot"):
24 root_input = b2.register_module(
'SeqRootInput')
26 root_input = b2.register_module(
'RootInput')
28main = b2.create_path()
29main.add_module(root_input)
32 main.add_module(
'Progress')
35 b2.use_database_chain()
37 cdc_unpacker = b2.register_module(
'CDCUnpacker')
38 cdc_unpacker.param(
'enableStoreCDCRawHit',
True)
39 main.add_module(cdc_unpacker)
41 unpacker = b2.register_module(
'CDCTriggerUnpacker')
42 unpacker.logging.log_level = b2.LogLevel.DEBUG
44 unpacker.logging.debug_level = 10
45 unpacker.logging.set_info(b2.LogLevel.DEBUG, b2.LogInfo.LEVEL | b2.LogInfo.MESSAGE)
47 unpacker.param(
'headerSize', 3)
49 unpacker.param(
'unpackTracker2D',
True)
51 unpacker.param(
'decode2DFinderInput',
True)
53 unpacker.param(
'2DNodeId', [
58 unpacker.param(
'2DNodeId_pcie40', [
64 main.add_module(unpacker)
68 empty_path = b2.create_path()
69 unpacker.if_false(empty_path)
71 main.add_module(
'Gearbox')
72 main.add_module(
'Geometry', components=[
'BeamPipe',
74 'MagneticFieldConstant4LimitedRCDC'])
75 cdcdigitizer = b2.register_module(
'CDCDigitizer')
78 param_cdcdigi = {
'Fraction': 1,
82 cdcdigitizer.param(param_cdcdigi)
83 cdcdigitizer.param(
'AddInWirePropagationDelay',
True)
84 cdcdigitizer.param(
'AddTimeOfFlight',
True)
85 cdcdigitizer.param(
'UseSimpleDigitization',
True)
86 main.add_module(cdcdigitizer)
87 main.add_module(
'CDCTriggerTSF',
90 TSHitCollectionName=
'TSimSegmentHits')
98 output_name = input_files.front().split(
'/')[-1]
99 output_name = output_name[:output_name.rfind(
'.')] +
'.unpacked.root'
100 main.add_module(
'RootOutput',
101 outputFileName=output_name,
102 excludeBranchNames=[
'RawCDCs',
static Environment & Instance()
Static method to get a reference to the Environment instance.
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...