Skip to content

Add setDescriptorTemplate() helper for DecayTreeTuple.

Olli Lupton requested to merge olupton-descriptor-templates into master

Adds a helper function (pure python) to DecayTreeTuple that uses python's string templates to generate a decay descriptor and branch definitions from a single string:

from Configurables import DecayTreeTuple
from DecayTreeTuple.Configuration import *
dtt = DecayTreeTuple(...)
dtt.setDescriptorTemplate("${D0}[D0 -> ${kaon}K- ${pion}pi+]CC")

both sets dtt.Decay (to "[D0 -> ^K- ^pi+]CC") and defines the branches "D0", "kaon", and "pion".

Merge request reports