Belle II Software  release-05-01-25
DecayForest.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * *
4  * Copyright(C) 2016 - Belle II Collaboration *
5  * *
6  * Author: The Belle II Collaboration *
7  * Contributors: Thomas Keck *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #pragma once
13 
14 #include <analysis/utility/DecayTree.h>
15 
16 #include <vector>
17 #include <string>
18 
19 namespace Belle2 {
27  class DecayForest {
28  public:
36  explicit DecayForest(const std::string& full_decaystring, bool save_memory = true, bool removeRadiativeGammaFlag = false);
37 
41  DecayTree& getTree(unsigned int n) { return forest[n]; }
42 
46  DecayTree& getReconstructedTree() { return forest[0]; }
47 
51  DecayTree& getOriginalTree() { return forest[m_first_valid_original]; }
52 
56  static int decayHashFloatToInt(float decayHash, float decayHashExtended);
57 
61  unsigned int getNumberOfTrees() const { return forest.size(); }
62 
66  unsigned int getOriginalTreeNumber() const { return m_first_valid_original; }
67 
68  private:
69  std::vector<DecayTree> forest;
71  };
73 }
Belle2::DecayTree
This is a helper class for the MCDecayFinderModule.
Definition: DecayTree.h:30
Belle2::DecayForest::DecayForest
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:18
Belle2::DecayForest::forest
std::vector< DecayTree > forest
vector of DecayTrees
Definition: DecayForest.h:78
Belle2::DecayForest::getReconstructedTree
DecayTree & getReconstructedTree()
Get reconstructed tree.
Definition: DecayForest.h:55
Belle2::DecayForest::decayHashFloatToInt
static int decayHashFloatToInt(float decayHash, float decayHashExtended)
Convert DecayHashes outputted by ParticleMCDecayString module to an integer.
Definition: DecayForest.cc:45
Belle2::DecayForest::getNumberOfTrees
unsigned int getNumberOfTrees() const
Return number of trees.
Definition: DecayForest.h:70
Belle2::DecayForest::m_first_valid_original
size_t m_first_valid_original
The first valid DecayTree.
Definition: DecayForest.h:79
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::DecayForest::getTree
DecayTree & getTree(unsigned int n)
Return nth tree (0 is the reconstructed tree)
Definition: DecayForest.h:50
Belle2::DecayForest::getOriginalTreeNumber
unsigned int getOriginalTreeNumber() const
Return first valid original tree number.
Definition: DecayForest.h:75
Belle2::DecayForest::getOriginalTree
DecayTree & getOriginalTree()
Get first valid original tree.
Definition: DecayForest.h:60