Belle II Software development
SimpleCluster Class Reference

Type for found clusters. More...

#include <Clusterizend.h>

Public Member Functions

 SimpleCluster (cell_index entry)
 
void initClCellsNew ()
 
void setParams (unsigned short dim)
 
std::vector< cell_index > getEntries ()
 Get member cells in the cluster.
 
void append (cell_index nextEntry)
 Add a track-space cell to the cluster.
 
void addHit (unsigned short hit, unsigned short weight, unsigned short orient)
 Relate a hit to the cluster.
 
unsigned long getNAxial ()
 Get number related axial hits.
 
unsigned long getNStereo ()
 Get number related stereo hits.
 
std::vector< unsigned short > getHits ()
 Get ids of related hits (indices of the TS StoreArray)
 
std::vector< unsigned short > getWeights ()
 Get weight contribution of each related hit to the cluster.
 

Private Attributes

std::vector< cell_index > m_C
 SimpleCluster.
 
unsigned short m_dim
 Dimension of the track space (3 for omega, phi, theta)
 
std::vector< unsigned short > m_hits
 Cluster related hits ids.
 
std::vector< unsigned short > m_hitWeights
 Cluster related hits weights.
 
unsigned short m_orientSum
 Sum of related hit orientations (== number of related axials)
 

Detailed Description

Type for found clusters.

Definition at line 45 of file Clusterizend.h.

Constructor & Destructor Documentation

◆ SimpleCluster() [1/2]

SimpleCluster ( )
inline

Definition at line 47 of file Clusterizend.h.

48 {
49 setParams(3);
50 initClCellsNew();
51 }

◆ SimpleCluster() [2/2]

SimpleCluster ( cell_index  entry)
inlineexplicit

Definition at line 52 of file Clusterizend.h.

53 {
54 setParams(3);
55 initClCellsNew();
56 append(entry);
57 }
void append(cell_index nextEntry)
Add a track-space cell to the cluster.
Definition: Clusterizend.h:78

◆ ~SimpleCluster()

virtual ~SimpleCluster ( )
inlinevirtual

Definition at line 58 of file Clusterizend.h.

58{}

Member Function Documentation

◆ addHit()

void addHit ( unsigned short  hit,
unsigned short  weight,
unsigned short  orient 
)
inline

Relate a hit to the cluster.

orient == 1: axial, orient == 0: stereo

Definition at line 83 of file Clusterizend.h.

84 {
85 m_hits.push_back(hit);
86 m_hitWeights.push_back(weight);
87 m_orientSum += orient;
88 }
std::vector< unsigned short > m_hitWeights
Cluster related hits weights.
Definition: Clusterizend.h:118
unsigned short m_orientSum
Sum of related hit orientations (== number of related axials)
Definition: Clusterizend.h:120
std::vector< unsigned short > m_hits
Cluster related hits ids.
Definition: Clusterizend.h:116

◆ append()

void append ( cell_index  nextEntry)
inline

Add a track-space cell to the cluster.

Definition at line 78 of file Clusterizend.h.

79 {
80 m_C.push_back(nextEntry);
81 }
std::vector< cell_index > m_C
SimpleCluster.
Definition: Clusterizend.h:112

◆ getEntries()

std::vector< cell_index > getEntries ( )
inline

Get member cells in the cluster.

Definition at line 73 of file Clusterizend.h.

74 {
75 return m_C;
76 }

◆ getHits()

std::vector< unsigned short > getHits ( )
inline

Get ids of related hits (indices of the TS StoreArray)

Definition at line 100 of file Clusterizend.h.

101 {
102 return m_hits;
103 }

◆ getNAxial()

unsigned long getNAxial ( )
inline

Get number related axial hits.

Definition at line 90 of file Clusterizend.h.

91 {
92 return m_orientSum;
93 }

◆ getNStereo()

unsigned long getNStereo ( )
inline

Get number related stereo hits.

Definition at line 95 of file Clusterizend.h.

96 {
97 return m_hits.size() - m_orientSum;
98 }

◆ getWeights()

std::vector< unsigned short > getWeights ( )
inline

Get weight contribution of each related hit to the cluster.

Definition at line 105 of file Clusterizend.h.

106 {
107 return m_hitWeights;
108 }

◆ initClCellsNew()

void initClCellsNew ( )
inline

Definition at line 59 of file Clusterizend.h.

60 {
61 unsigned short init_ClSize = 0;
62 unsigned short defaultValue = 0;
63 cell_index cell(m_dim, defaultValue);
64 std::vector<cell_index> C(init_ClSize, cell);
65 m_C = C;
66 }
unsigned short m_dim
Dimension of the track space (3 for omega, phi, theta)
Definition: Clusterizend.h:114

◆ setParams()

void setParams ( unsigned short  dim)
inline

Definition at line 67 of file Clusterizend.h.

68 {
69 m_dim = dim;
70 m_orientSum = 0;
71 }

Member Data Documentation

◆ m_C

std::vector<cell_index> m_C
private

SimpleCluster.

Cluster member cells

Definition at line 112 of file Clusterizend.h.

◆ m_dim

unsigned short m_dim
private

Dimension of the track space (3 for omega, phi, theta)

Definition at line 114 of file Clusterizend.h.

◆ m_hits

std::vector<unsigned short> m_hits
private

Cluster related hits ids.

Definition at line 116 of file Clusterizend.h.

◆ m_hitWeights

std::vector<unsigned short> m_hitWeights
private

Cluster related hits weights.

Definition at line 118 of file Clusterizend.h.

◆ m_orientSum

unsigned short m_orientSum
private

Sum of related hit orientations (== number of related axials)

Definition at line 120 of file Clusterizend.h.


The documentation for this class was generated from the following file: