![]() |
Belle II Software
light-2303-iriomote
|
This is a helper class for the MCDecayFinderModule. More...
#include <DecayTree.h>

Public Member Functions | |
| DecayTree () | |
| Default constructor. | |
| ~DecayTree () | |
| Destructor. | |
| std::vector< DecayTree< T > * > | getDaughters () const |
| Return list of decay daughters. More... | |
| T * | getObj () const |
| Return the decaying object itself, e.g. More... | |
| void | setObj (T *obj) |
| Set the decaying object, e.g. More... | |
| void | append (DecayTree< T > *t) |
| Add a daughter, which is a DecayTree itself. More... | |
| DecayTree (const std::string &decaystring, bool removeRadiativeGammaFlag=false) | |
| Create a new Decay tree from a decaystring. | |
| DecayTree (const DecayTree &tree) | |
| Copy constructor Required because we need to rebuild the node cache. | |
| DecayTree & | operator= (const DecayTree &tree) |
| Assign operator Required because we need to rebuild the node cache. | |
| std::vector< DecayNode > | build_tree (const std::string &decaystring, bool removeRadiativeGammaFlag) |
| Recursively build a new tree. More... | |
| bool | find_decay (const DecayTree &tree) const |
| Check if the decay tree contains the given decay tree. More... | |
| std::string | to_string () const |
| Output string representation of DecayTree. | |
| int | getMatchSymbolPosition () const |
| Returns position of match symbol. | |
| bool | isValid () const |
| Returns if the decay tree is valid (constructed from a decay string which has a match) | |
| const DecayNode & | getDecayNode (unsigned int n) const |
| Returns n-th node as const. More... | |
| DecayNode & | getDecayNode (unsigned int n) |
| Returns n-th node. More... | |
| size_t | getNumberOfDecayNodes () const |
| Return number of nodes in this tree. | |
Private Member Functions | |
| void | build_cache (DecayNode &node) |
| Build nodes_cache in order of appearance in the decay string for fast access. More... | |
Private Attributes | |
| T * | m_myObject |
| The decaying object, e.g. More... | |
| std::vector< DecayTree< T > * > | m_daughters |
| Decay daughters of m_myObject. | |
| bool | m_valid |
| True if the tree is valid (invalid can happen if is constructed from a node with "No match") | |
| size_t | m_i |
| Current position in the building of the DecayTree. | |
| unsigned int | m_token_count |
| Count current tokens. | |
| int | m_match_symbol_position |
| Position of the token with the match symbol ^. | |
| DecayNode | m_root_node |
| root DecayNode | |
| std::vector< DecayNode * > | m_nodes_cache |
| Vector of decay nodes of the particles in the order of their appearance in the decay string for fast access. | |
This is a helper class for the MCDecayFinderModule.
Consists of a tree of DecayNodes Can be constructed from the output of the ParticleMCDecayString module.
It is designed to hold MCParticle objects when trying to match a given DecayString.
Definition at line 20 of file DecayTree.h.
|
private |
Build nodes_cache in order of appearance in the decay string for fast access.
| node | current node |
Definition at line 60 of file DecayTree.cc.
| std::vector< DecayNode > build_tree | ( | const std::string & | decaystring, |
| bool | removeRadiativeGammaFlag | ||
| ) |
Recursively build a new tree.
| decaystring | as outputted by the ParticleMCDecayString module (after splitting by | ) |
| removeRadiativeGammaFlag | remove radiative photons from decay string. Handle with care: In the decay B+ --> e+ nu_e gamma, the gamma would be removed although this might be your signal. |
Definition at line 69 of file DecayTree.cc.
| bool find_decay | ( | const DecayTree< T > & | tree | ) | const |
Check if the decay tree contains the given decay tree.
| tree | DecayTree describing the decay |
Definition at line 129 of file DecayTree.cc.
| DecayNode & getDecayNode | ( | unsigned int | n | ) |
| const DecayNode & getDecayNode | ( | unsigned int | n | ) | const |
|
private |