Belle II Software  release-08-01-10
CDCWireHitCluster.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 #pragma once
9 
10 #include <vector>
11 
12 namespace Belle2 {
17  namespace TrackFindingCDC {
18  class CDCWireHit;
19 
21  class CDCWireHitCluster : public std::vector<CDCWireHit*> {
22 
24  using Super = std::vector<CDCWireHit*>;
25 
26  public:
28  CDCWireHitCluster() = default;
29 
31  CDCWireHitCluster(const CDCWireHitCluster& wireHitCluster) = default;
32 
34  // cppcheck-suppress passedByValue
35  explicit CDCWireHitCluster(std::vector<CDCWireHit*> wireHits)
36  : Super(std::move(wireHits))
37  {
38  }
39 
41  int getISuperCluster() const
42  {
43  return m_iSuperCluster;
44  }
45 
47  void setISuperCluster(int iSuperCluster)
48  {
49  m_iSuperCluster = iSuperCluster;
50  }
51 
53  bool getBackgroundFlag() const
54  {
55  return m_backgroundFlag;
56  }
57 
59  void setBackgroundFlag(bool backgroundFlag = true)
60  {
61  m_backgroundFlag = backgroundFlag;
62  }
63 
64  private:
66  int m_iSuperCluster = -1;
67 
69  bool m_backgroundFlag = false;
70  };
71  }
73 }
void setBackgroundFlag(bool backgroundFlag=true)
Set whether this cluster is consider as made of background.
int m_iSuperCluster
Memory for the super cluster id.
void setISuperCluster(int iSuperCluster)
Set the super cluster id of this cluster.
CDCWireHitCluster(std::vector< CDCWireHit * > wireHits)
Constructor from a bunch of wire hits.
CDCWireHitCluster(const CDCWireHitCluster &wireHitCluster)=default
Default copy constructor.
std::vector< CDCWireHit * > Super
Type of the base class.
bool getBackgroundFlag() const
Return if this was set as background.
bool m_backgroundFlag
Memory for the flag marking this cluster as background.
int getISuperCluster() const
Get the super cluster id of this cluster.
CDCWireHitCluster()=default
Default constructor.
Abstract base class for different kinds of events.