Belle II Software  release-08-01-10
DecayForest.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 #include <analysis/utility/DecayTree.h>
12 
13 #include <vector>
14 #include <string>
15 
16 namespace Belle2 {
24  class DecayForest {
25  public:
33  explicit DecayForest(const std::string& full_decaystring, bool save_memory = true, bool removeRadiativeGammaFlag = false);
34 
38  const DecayTree& getTree(unsigned int n) const { return forest.at(n); }
39 
43  const DecayTree& getReconstructedTree() const { return forest.at(0); }
44 
48  const DecayTree& getOriginalTree() const { return forest.at(m_first_valid_original); }
49 
53  static int decayHashFloatToInt(float decayHash, float decayHashExtended);
54 
58  unsigned int getNumberOfTrees() const { return forest.size(); }
59 
63  unsigned int getOriginalTreeNumber() const { return m_first_valid_original; }
64 
65  private:
66  std::vector<DecayTree> forest;
68  };
70 }
Contains several DecayTree objects, which belong all to the same candidate.
Definition: DecayForest.h:24
std::vector< DecayTree > forest
vector of DecayTrees
Definition: DecayForest.h:66
size_t m_first_valid_original
The first valid DecayTree.
Definition: DecayForest.h:67
unsigned int getOriginalTreeNumber() const
Return first valid original tree number.
Definition: DecayForest.h:63
unsigned int getNumberOfTrees() const
Return number of trees.
Definition: DecayForest.h:58
const DecayTree & getOriginalTree() const
Get first valid original tree.
Definition: DecayForest.h:48
static int decayHashFloatToInt(float decayHash, float decayHashExtended)
Convert DecayHashes outputted by ParticleMCDecayString module to an integer.
Definition: DecayForest.cc:44
const DecayTree & getTree(unsigned int n) const
Return nth tree (0 is the reconstructed tree)
Definition: DecayForest.h:38
DecayForest(const std::string &full_decaystring, bool save_memory=true, bool removeRadiativeGammaFlag=false)
Create a DecayForest from a full decaystring outputted by ParticleMCDecayString.
Definition: DecayForest.cc:17
const DecayTree & getReconstructedTree() const
Get reconstructed tree.
Definition: DecayForest.h:43
This is a helper class for the MCDecayFinderModule.
Definition: DecayTree.h:20
Abstract base class for different kinds of events.