11#include <analysis/utility/DecayNode.h>
32 explicit DecayTree(
const std::string& decaystring,
bool removeRadiativeGammaFlag =
false);
52 std::vector<DecayNode>
build_tree(
const std::string& decaystring,
bool removeRadiativeGammaFlag);
105 std::vector<DecayNode*>
DecayNode describes the decay of a particle identified by its pdg code, into list of daughters.
DecayTree & operator=(const DecayTree &tree)
Assign operator Required because we need to rebuild the node cache.
unsigned int m_token_count
Count current tokens.
bool isValid() const
Returns if the decay tree is valid (constructed from a decay string which has a match)
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 ...
DecayNode m_root_node
root DecayNode
bool m_valid
True if the tree is valid (invalid can happen if is constructed from a node with "No match")
size_t getNumberOfDecayNodes() const
Return number of nodes in this tree.
const DecayNode & getDecayNode(unsigned int n) const
Returns n-th node as const.
std::vector< DecayNode > build_tree(const std::string &decaystring, bool removeRadiativeGammaFlag)
Recursively build a new tree.
int getMatchSymbolPosition() const
Returns position of match symbol.
std::string to_string() const
Output string representation of DecayTree.
int m_match_symbol_position
Position of the token with the match symbol ^.
bool find_decay(const DecayTree &tree) const
Check if the decay tree contains the given decay tree.
size_t m_i
Current position in the building of the DecayTree.
void build_cache(DecayNode &node)
Build nodes_cache in order of appearance in the decay string for fast access.
DecayTree()
Default constructor.
Abstract base class for different kinds of events.