Belle II Software  release-05-02-19
DecayNode.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Thomas Keck *
7  * *
8  * This software is provided "as is" without any warranty. *
9  * *
10  **************************************************************************/
11 
12 #pragma once
13 
14 #include <vector>
15 #include <string>
16 
17 namespace Belle2 {
26  class DecayNode {
27 
28  public:
34  DecayNode(int _pdg = 0, const std::vector<DecayNode>& _daughters = {}) : pdg(_pdg), daughters(_daughters) { }
35 
40  bool find_decay(const DecayNode& to_find) const;
41 
47  std::string print_node(unsigned int indent = 0) const;
48 
49 
50  int pdg;
51  std::vector<DecayNode> daughters;
52  };
53 
65  bool operator==(const DecayNode& node1, const DecayNode& node2);
66 
70  bool operator!=(const DecayNode& node1, const DecayNode& node2);
72 }
Belle2::DecayNode::print_node
std::string print_node(unsigned int indent=0) const
Output a single node.
Definition: DecayNode.cc:32
Belle2::DecayNode::DecayNode
DecayNode(int _pdg=0, const std::vector< DecayNode > &_daughters={})
Create new Decay node.
Definition: DecayNode.h:43
Belle2::operator==
bool operator==(const DecayNode &node1, const DecayNode &node2)
Compare two Decay Nodes: They are equal if All daughter decay nodes are equal or one of the daughter ...
Definition: DecayNode.cc:50
Belle2::operator!=
bool operator!=(const DecayNode &node1, const DecayNode &node2)
Not equal: See operator==.
Definition: DecayNode.cc:67
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::DecayNode::find_decay
bool find_decay(const DecayNode &to_find) const
Check if the decay node contains the given decay tree.
Definition: DecayNode.cc:21
Belle2::DecayNode
DecayNode describes the decay of a particle identified by its pdg code, into list of daughters.
Definition: DecayNode.h:35
Belle2::DecayNode::daughters
std::vector< DecayNode > daughters
daughter decay nodes
Definition: DecayNode.h:60
Belle2::DecayNode::pdg
int pdg
pdg code of the particle
Definition: DecayNode.h:59