Belle II Software  release-05-01-25
ECLShowerId.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Torben Ferber *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef ECLSHOWERID_H
12 #define ECLSHOWERID_H
13 
14 
15 namespace Belle2 {
20  namespace ECL {
24  class ECLShowerId {
25 
26  public:
27 
31  ECLShowerId();
32 
36  int getCRID(const int showerid) const
37  {
38  return showerid / m_CRMultiplier;
39  }
40 
44  int getHypothesis(const int showerid) const
45  {
46  return (showerid % m_CRMultiplier) / m_HypothesisMultiplier;
47  }
48 
52  int getSeed(const int showerid) const
53  {
54  return ((showerid % m_CRMultiplier) % m_HypothesisMultiplier) / m_SeedMultiplier;
55  }
56 
60  int getShowerId(const int crid, const int hypothesis, const int seed) const
61  {
62  return m_CRMultiplier * crid + m_HypothesisMultiplier * hypothesis + m_SeedMultiplier * seed;
63  }
64 
65 
66  private:
68  const int m_CRMultiplier = 100000;
69 
71  const int m_HypothesisMultiplier = 1000;
72 
74  const int m_SeedMultiplier = 1;
75  };
76  }
78 } // Belle2 namespace
79 
80 #endif
81 
82 
83 
Belle2::ECL::ECLShowerId::ECLShowerId
ECLShowerId()
Constructor.
Definition: ECLShowerId.cc:16
Belle2::ECL::ECLShowerId::m_SeedMultiplier
const int m_SeedMultiplier
Seed Multiplier
Definition: ECLShowerId.h:82
Belle2::ECL::ECLShowerId::getShowerId
int getShowerId(const int crid, const int hypothesis, const int seed) const
Returns shower identifier for given CRID, hypothesis and seed.
Definition: ECLShowerId.h:68
Belle2::ECL::ECLShowerId::getHypothesis
int getHypothesis(const int showerid) const
Returns hypothesis for a given shower ID.
Definition: ECLShowerId.h:52
Belle2::ECL::ECLShowerId::m_HypothesisMultiplier
const int m_HypothesisMultiplier
Hypothesis Multiplier
Definition: ECLShowerId.h:79
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ECL::ECLShowerId::m_CRMultiplier
const int m_CRMultiplier
Connected Region Multiplier.
Definition: ECLShowerId.h:76
Belle2::ECL::ECLShowerId::getSeed
int getSeed(const int showerid) const
Returns seed for a given shower ID.
Definition: ECLShowerId.h:60
Belle2::ECL::ECLShowerId::getCRID
int getCRID(const int showerid) const
Returns connected region for a given shower ID.
Definition: ECLShowerId.h:44