Belle II Software development
DATCONSVDClusterCandidate Struct Reference

struct containing a cluster candidate for easier handling More...

#include <DATCONSVDClusterCandidate.h>

Public Member Functions

bool add (VxdID nextID, int nextCharge, unsigned short nextCellID, float nextStripSNR, unsigned short maxClusterSize)
 add a new strip to the current cluster candidate if possible
 
void finalizeCluster (const double pitch, const int stripsInSensor)
 calculate cluster properties once a cluster is ready to be stored
 

Public Attributes

VxdID vxdID = 0
 VxdID of the cluster.
 
std::vector< unsigned short > strips
 Vector containing strips (DATCONSVDDigits) that are added.
 
std::vector< unsigned short > charges
 Vector containing the charges of the corresponding strips that are added.
 
float maxSNRinClusterCandidate = 0
 Maximum SNR of all the strips in the cluster candidate.
 
int charge = 0
 Charge of the cluster.
 
int seedStripIndex = 0
 Index of the seed strip of the cluster (0...m_Size)
 
int seedStrip = 0
 SVD strip (i.e.
 
int seedCharge = 0
 Seed Charge of the cluster.
 
float clusterPosition = 0
 Position of the cluster.
 

Detailed Description

struct containing a cluster candidate for easier handling

Definition at line 22 of file DATCONSVDClusterCandidate.h.

Member Function Documentation

◆ add()

bool add ( VxdID  nextID,
int  nextCharge,
unsigned short  nextCellID,
float  nextStripSNR,
unsigned short  maxClusterSize 
)
inline

add a new strip to the current cluster candidate if possible

Parameters
nextIDVxdID of the digit to be added
nextChargecharge (in ADU) of the digit to be added
nextCellIDstrip number of the digit to be added
nextStripSNRSNR of the digit to be added
maxClusterSizemaximum cluster size, if exceeded, start new cluster
Returns
true if digit was successfully added to current cluster candidate, else return false

Definition at line 41 of file DATCONSVDClusterCandidate.h.

42 {
43 bool added = false;
44
45 // do not add if you are on the wrong sensor or side
46 if (vxdID != nextID) return false;
47
48 // add if it's the first strip
49 if (strips.size() == 0) added = true;
50
51 // add if it adjacent to the last strip added (we assume that SVDRecoDigits are ordered)
52 // and if cluster size would still be <= 4 strips
53 if (strips.size() > 0 and nextCellID == strips.back() + 1 and strips.size() < maxClusterSize) {
54 added = true;
55 }
56
57 //add it to the vector od strips, update the seed nextCharge and index:
58 if (added) {
59 strips.push_back(nextCellID);
60 charges.push_back(nextCharge);
61
62 if (nextCharge > seedCharge) seedCharge = nextCharge;
63
64 if (nextStripSNR > maxSNRinClusterCandidate) {
65 maxSNRinClusterCandidate = nextStripSNR;
66 }
67 }
68 return added;
69
70 };
float maxSNRinClusterCandidate
Maximum SNR of all the strips in the cluster candidate.
std::vector< unsigned short > charges
Vector containing the charges of the corresponding strips that are added.
std::vector< unsigned short > strips
Vector containing strips (DATCONSVDDigits) that are added.
int seedCharge
Seed Charge of the cluster.

◆ finalizeCluster()

void finalizeCluster ( const double  pitch,
const int  stripsInSensor 
)
inline

calculate cluster properties once a cluster is ready to be stored

Parameters
pitchstrip pitch of the sensor and sensor side on which the cluster was found
stripsInSensornumber of strips of the sensor and sensor side on which the cluster was found

Definition at line 75 of file DATCONSVDClusterCandidate.h.

76 {
77 charge = std::accumulate(charges.begin(), charges.end(), 0);
78 seedStripIndex = strips.size() / 2 + 1;
79 seedStrip = (strips.at(0) + seedStripIndex - 1);
81 clusterPosition = pitch * (seedStrip - stripsInSensor / 2);
82 };
float clusterPosition
Position of the cluster.
int seedStripIndex
Index of the seed strip of the cluster (0...m_Size)

Member Data Documentation

◆ charge

int charge = 0

Charge of the cluster.

Definition at line 28 of file DATCONSVDClusterCandidate.h.

◆ charges

std::vector<unsigned short> charges

Vector containing the charges of the corresponding strips that are added.

Definition at line 25 of file DATCONSVDClusterCandidate.h.

◆ clusterPosition

float clusterPosition = 0

Position of the cluster.

Definition at line 32 of file DATCONSVDClusterCandidate.h.

◆ maxSNRinClusterCandidate

float maxSNRinClusterCandidate = 0

Maximum SNR of all the strips in the cluster candidate.

Definition at line 26 of file DATCONSVDClusterCandidate.h.

◆ seedCharge

int seedCharge = 0

Seed Charge of the cluster.

Definition at line 31 of file DATCONSVDClusterCandidate.h.

◆ seedStrip

int seedStrip = 0

SVD strip (i.e.

0...511 or 0...767) that is considered the seed strip of the cluster

Definition at line 30 of file DATCONSVDClusterCandidate.h.

◆ seedStripIndex

int seedStripIndex = 0

Index of the seed strip of the cluster (0...m_Size)

Definition at line 29 of file DATCONSVDClusterCandidate.h.

◆ strips

std::vector<unsigned short> strips

Vector containing strips (DATCONSVDDigits) that are added.

Definition at line 24 of file DATCONSVDClusterCandidate.h.

◆ vxdID

VxdID vxdID = 0

VxdID of the cluster.

Definition at line 23 of file DATCONSVDClusterCandidate.h.


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