Belle II Software development
ECLShowerId.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
11namespace Belle2 {
16 namespace ECL {
21
22 public:
23
28
32 int getCRID(const int showerid) const
33 {
34 return showerid / m_CRMultiplier;
35 }
36
40 int getHypothesis(const int showerid) const
41 {
42 return (showerid % m_CRMultiplier) / m_HypothesisMultiplier;
43 }
44
48 int getSeed(const int showerid) const
49 {
51 }
52
56 int getShowerId(const int crid, const int hypothesis, const int seed) const
57 {
58 return m_CRMultiplier * crid + m_HypothesisMultiplier * hypothesis + m_SeedMultiplier * seed;
59 }
60
61
62 private:
64 const int m_CRMultiplier = 100000;
65
67 const int m_HypothesisMultiplier = 1000;
68
70 const int m_SeedMultiplier = 1;
71 };
72 }
74} // Belle2 namespace
Class to convert the shower id into CR, CS and Seed and vice versa.
Definition: ECLShowerId.h:20
const int m_HypothesisMultiplier
Hypothesis Multiplier
Definition: ECLShowerId.h:67
int getCRID(const int showerid) const
Returns connected region for a given shower ID.
Definition: ECLShowerId.h:32
const int m_SeedMultiplier
Seed Multiplier
Definition: ECLShowerId.h:70
int getSeed(const int showerid) const
Returns seed for a given shower ID.
Definition: ECLShowerId.h:48
int getHypothesis(const int showerid) const
Returns hypothesis for a given shower ID.
Definition: ECLShowerId.h:40
int getShowerId(const int crid, const int hypothesis, const int seed) const
Returns shower identifier for given CRID, hypothesis and seed.
Definition: ECLShowerId.h:56
ECLShowerId()
Constructor.
Definition: ECLShowerId.cc:14
const int m_CRMultiplier
Connected Region Multiplier.
Definition: ECLShowerId.h:64
Abstract base class for different kinds of events.