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