12 import modularAnalysis
as ma
14 main = basf2.create_path()
15 ma.inputMdst(basf2.find_file(
"analysis/tests/mdst.root"), path=main)
18 ma.fillParticleList(
'pi+:example',
'', path=main)
19 ma.variablesToExtraInfo(
"pi+:example", {
"random":
"someOtherExtraInfoName"}, path=main)
22 particleWisePrinter = basf2.register_module(
"ExtraInfoPrinter")
23 particleWisePrinter.set_name(
"ExtraInfoPrinter_Particles")
24 particleWisePrinter.param(
"particleList",
'pi+:example')
25 main.add_module(particleWisePrinter)
29 ma.cutAndCopyList(
"pi+:filtered",
"pi+:example",
"eventRandom > 0.5", path=main)
32 eventWisePrinter = basf2.register_module(
"ExtraInfoPrinter")
33 eventWisePrinter.set_name(
"ExtraInfoPrinter_Event")
34 eventWisePrinter.param(
'particleList',
'')
35 main.add_module(eventWisePrinter)
38 print(basf2.statistics)