Belle II Software  release-05-01-25
DATCONSVDSimpleClusterCandidate.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Christian Wessel *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <vxd/dataobjects/VxdID.h>
14 #include <vector>
15 
16 namespace Belle2 {
25  class DATCONSVDSimpleClusterCandidate {
26 
27  public:
28 
31 
33  DATCONSVDSimpleClusterCandidate(VxdID vxdID, bool isUside);
34 
36  DATCONSVDSimpleClusterCandidate(VxdID vxdID, bool isUside, unsigned short maxClusterSize);
37 
48  bool add(VxdID vxdID, bool isUside, unsigned short index, unsigned short charge, unsigned short cellID);
49 
53  void finalizeCluster();
54 
58  void finalizeSimpleCluster();
59 
63  bool isGoodCluster();
64 
68  VxdID getSensorID() {return m_vxdID;}
69 
73  bool isUSide() {return m_isUside;}
74 
79  unsigned short getCharge() const { return m_charge; }
80 
85  unsigned short getSeedCharge() const { return m_seedCharge; }
86 
90  float getPosition() const { return m_position; }
91 
93  unsigned short getSeedStripIndex() const { return m_seedStripIndex; }
94 
98  unsigned short size() const { return m_size; }
99 
101  std::vector<unsigned short> getStripVector() const { return m_strips; }
102 
104  std::vector<unsigned short> getChargeVector() const { return m_charges; }
105 
107  std::vector<unsigned short> getIndexVector() const { return m_digitIndices; }
108 
109  protected:
110 
113 
115  bool m_isUside;
116 
118  unsigned short m_maxClusterSize;
119 
121  unsigned short m_charge = 0;
122 
124  unsigned short m_seedCharge = 0;
125 
127  float m_position = 0;
128 
130  unsigned short m_seedStrip = 0;
131 
133  unsigned short m_size = 0;
134 
136  unsigned short m_seedStripIndex = 0;
137 
139  std::vector<unsigned short> m_strips;
140 
142  std::vector<unsigned short> m_charges;
143 
145  std::vector<unsigned short> m_digitIndices;
146 
147  }; // end class definition
148 
150 } // end namespace Belle2
Belle2::DATCONSVDSimpleClusterCandidate::getSeedStripIndex
unsigned short getSeedStripIndex() const
Getter for the index (0...5) of the seed strip inside this cluster candidate.
Definition: DATCONSVDSimpleClusterCandidate.h:101
Belle2::DATCONSVDSimpleClusterCandidate::m_seedStripIndex
unsigned short m_seedStripIndex
Index of the seed strip of the cluster (0...m_Size)
Definition: DATCONSVDSimpleClusterCandidate.h:144
Belle2::DATCONSVDSimpleClusterCandidate::m_charge
unsigned short m_charge
Charge of the cluster.
Definition: DATCONSVDSimpleClusterCandidate.h:129
Belle2::DATCONSVDSimpleClusterCandidate::getChargeVector
std::vector< unsigned short > getChargeVector() const
Get vector of the charges of the stips of this cluster candidate.
Definition: DATCONSVDSimpleClusterCandidate.h:112
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::DATCONSVDSimpleClusterCandidate::finalizeCluster
void finalizeCluster()
compute the position of the cluster
Definition: DATCONSVDSimpleClusterCandidate.cc:70
Belle2::DATCONSVDSimpleClusterCandidate::m_strips
std::vector< unsigned short > m_strips
Vector containing strips (DATCONSVDDigits) that are added.
Definition: DATCONSVDSimpleClusterCandidate.h:147
Belle2::DATCONSVDSimpleClusterCandidate::m_position
float m_position
Position of the cluster.
Definition: DATCONSVDSimpleClusterCandidate.h:135
Belle2::DATCONSVDSimpleClusterCandidate::m_size
unsigned short m_size
Size of the cluster.
Definition: DATCONSVDSimpleClusterCandidate.h:141
Belle2::DATCONSVDSimpleClusterCandidate::getStripVector
std::vector< unsigned short > getStripVector() const
Get vector of strips of this cluster candidate.
Definition: DATCONSVDSimpleClusterCandidate.h:109
Belle2::DATCONSVDSimpleClusterCandidate::DATCONSVDSimpleClusterCandidate
DATCONSVDSimpleClusterCandidate()
Constructor to create an empty Cluster.
Belle2::DATCONSVDSimpleClusterCandidate::isGoodCluster
bool isGoodCluster()
return true if the cluster candidate can be promoted to cluster
Definition: DATCONSVDSimpleClusterCandidate.cc:103
Belle2::DATCONSVDSimpleClusterCandidate::getSeedCharge
unsigned short getSeedCharge() const
Return the seed charge of the cluster.
Definition: DATCONSVDSimpleClusterCandidate.h:93
Belle2::DATCONSVDSimpleClusterCandidate::getSensorID
VxdID getSensorID()
return the VxdID of the cluster sensor
Definition: DATCONSVDSimpleClusterCandidate.h:76
Belle2::DATCONSVDSimpleClusterCandidate::m_digitIndices
std::vector< unsigned short > m_digitIndices
Vector of the indices in the DATCONSVDDigit StoreArray of the added strips.
Definition: DATCONSVDSimpleClusterCandidate.h:153
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::DATCONSVDSimpleClusterCandidate::m_seedCharge
unsigned short m_seedCharge
Seed Charge of the cluster.
Definition: DATCONSVDSimpleClusterCandidate.h:132
Belle2::DATCONSVDSimpleClusterCandidate::size
unsigned short size() const
Return the cluster size (number of strips of the cluster).
Definition: DATCONSVDSimpleClusterCandidate.h:106
Belle2::DATCONSVDSimpleClusterCandidate::m_isUside
bool m_isUside
side of the cluster
Definition: DATCONSVDSimpleClusterCandidate.h:123
Belle2::DATCONSVDSimpleClusterCandidate::getIndexVector
std::vector< unsigned short > getIndexVector() const
Get vector of indices of the DATCONSVDDigits in the DATCONSVDDigit StoreArray.
Definition: DATCONSVDSimpleClusterCandidate.h:115
Belle2::DATCONSVDSimpleClusterCandidate::isUSide
bool isUSide()
return true if the cluster is on the U/P side
Definition: DATCONSVDSimpleClusterCandidate.h:81
Belle2::DATCONSVDSimpleClusterCandidate::m_vxdID
VxdID m_vxdID
VxdID of the cluster.
Definition: DATCONSVDSimpleClusterCandidate.h:120
Belle2::DATCONSVDSimpleClusterCandidate::finalizeSimpleCluster
void finalizeSimpleCluster()
compute the simple cluster position as in phase 2 FPGA implementation
Definition: DATCONSVDSimpleClusterCandidate.cc:79
Belle2::DATCONSVDSimpleClusterCandidate::m_charges
std::vector< unsigned short > m_charges
Vector containing the charges of the corresponding strips that are added.
Definition: DATCONSVDSimpleClusterCandidate.h:150
Belle2::DATCONSVDSimpleClusterCandidate::m_maxClusterSize
unsigned short m_maxClusterSize
Maximum cluster size (mainly for the simple clusterizer)
Definition: DATCONSVDSimpleClusterCandidate.h:126
Belle2::DATCONSVDSimpleClusterCandidate::getCharge
unsigned short getCharge() const
Return the charge of the cluster.
Definition: DATCONSVDSimpleClusterCandidate.h:87
Belle2::DATCONSVDSimpleClusterCandidate::getPosition
float getPosition() const
return the position of the cluster
Definition: DATCONSVDSimpleClusterCandidate.h:98
Belle2::DATCONSVDSimpleClusterCandidate::m_seedStrip
unsigned short m_seedStrip
SVD strip (i.e.
Definition: DATCONSVDSimpleClusterCandidate.h:138
Belle2::DATCONSVDSimpleClusterCandidate::add
bool add(VxdID vxdID, bool isUside, unsigned short index, unsigned short charge, unsigned short cellID)
Add a Strip to the current cluster.
Definition: DATCONSVDSimpleClusterCandidate.cc:32