Printing Decay Trees
This example shows how to print the decay tree of a candidate.
from PyConf.application import configure, configure_input
from PyConf.application import make_odin
from PyConf.control_flow import CompositeNode, NodeLogic
from PyConf.Algorithms import PrintDecayTree, PrintHeader
from DaVinci import Options
from DaVinci.common_particles import make_std_loose_jpsi2mumu
def print_decay_tree(options: Options):
config = configure_input(options)
jpsis = make_std_loose_jpsi2mumu()
pdt = PrintDecayTree(name="PrintJpsis", Input=jpsis)
node = CompositeNode(
"PrintJpsiNode", children=[jpsis, pdt], combine_logic=NodeLogic.NONLAZY_AND
)
config.update(configure(options, node))
return config
def print_header(options: Options):
config = configure_input(options)
ph = PrintHeader(name="PrintHeader", ODINLocation=make_odin())
node = CompositeNode("PHNode", children=[ph])
config.update(configure(options, node))
return config
To run the example:
lbexec DaVinciExamples.debugging:print_decay_tree "$DAVINCIEXAMPLESROOT/example_data/Upgrade_Bd2KstarMuMu_ldst.yaml"
For reference, these are the options of this example