Belle II Software development
TrueHitInfo Struct Reference

helper struct that holds information that is needed for the registration of the relation between SpacePoint and TrueHit More...

#include <SpacePoint2TrueHitConnectorModule.h>

Public Member Functions

 TrueHitInfo ()
 default ctor, initializing Id to -1, weights to 0, and bools to false
 
 TrueHitInfo (int Id)
 ctor using Id-only
 
bool operator< (const TrueHitInfo &b) const
 comparison operator ensuring strict weak ordering sorts by the number of Clusters first, and then by the sum of the weights to this Cluster CAUTION: actually sorts in descending order!!! (so is rather an operator> than the other way round!)
 
short getNClusters () const
 get the number of Clusters that point to this TrueHit
 
void setUWeight (double weight)
 set the weight for the U-Cluster
 
void setVWeight (double weight)
 set the weight for the V-Cluster
 
double getWeightSum () const
 get sum of relation weights
 

Public Attributes

int m_Id
 TrueHit ID (StoreArray Index)
 
double m_wU
 weight of relation between U-Cluster and TrueHit
 
double m_wV
 weight of relation between V-Cluster and TrueHit
 
bool m_U
 if true, U-Cluster is used by SpacePoint
 
bool m_V
 if true, V-Cluster is used by SpacePoint
 

Detailed Description

helper struct that holds information that is needed for the registration of the relation between SpacePoint and TrueHit

Definition at line 41 of file SpacePoint2TrueHitConnectorModule.h.

Constructor & Destructor Documentation

◆ TrueHitInfo() [1/2]

TrueHitInfo ( )
inline

default ctor, initializing Id to -1, weights to 0, and bools to false

Definition at line 50 of file SpacePoint2TrueHitConnectorModule.h.

50: m_Id(-1), m_wU(0.), m_wV(0.), m_U(false), m_V(false) { }
double m_wU
weight of relation between U-Cluster and TrueHit
bool m_U
if true, U-Cluster is used by SpacePoint
double m_wV
weight of relation between V-Cluster and TrueHit
bool m_V
if true, V-Cluster is used by SpacePoint
int m_Id
TrueHit ID (StoreArray Index)

◆ TrueHitInfo() [2/2]

TrueHitInfo ( int  Id)
inlineexplicit

ctor using Id-only

Definition at line 53 of file SpacePoint2TrueHitConnectorModule.h.

53: m_Id(Id), m_wU(0.), m_wV(0.), m_U(false), m_V(false) { }

Member Function Documentation

◆ getNClusters()

short getNClusters ( ) const
inline

get the number of Clusters that point to this TrueHit

Definition at line 75 of file SpacePoint2TrueHitConnectorModule.h.

75{ return m_U + m_V; }

◆ getWeightSum()

double getWeightSum ( ) const
inline

get sum of relation weights

Definition at line 84 of file SpacePoint2TrueHitConnectorModule.h.

84{ return m_wU + m_wV; }

◆ operator<()

bool operator< ( const TrueHitInfo b) const
inline

comparison operator ensuring strict weak ordering sorts by the number of Clusters first, and then by the sum of the weights to this Cluster CAUTION: actually sorts in descending order!!! (so is rather an operator> than the other way round!)

Definition at line 69 of file SpacePoint2TrueHitConnectorModule.h.

70 {
71 return (std::tuple<int, double>(b.m_U + b.m_V, b.m_wU + b.m_wV) < std::tuple<int, double>(m_U + m_V, m_wU + m_wV));
72 }

◆ setUWeight()

void setUWeight ( double  weight)
inline

set the weight for the U-Cluster

Definition at line 78 of file SpacePoint2TrueHitConnectorModule.h.

78{ m_wU = weight; m_U = true; }

◆ setVWeight()

void setVWeight ( double  weight)
inline

set the weight for the V-Cluster

Definition at line 81 of file SpacePoint2TrueHitConnectorModule.h.

81{ m_wV = weight; m_V = true; }

Member Data Documentation

◆ m_Id

int m_Id

TrueHit ID (StoreArray Index)

Definition at line 43 of file SpacePoint2TrueHitConnectorModule.h.

◆ m_U

bool m_U

if true, U-Cluster is used by SpacePoint

Definition at line 46 of file SpacePoint2TrueHitConnectorModule.h.

◆ m_V

bool m_V

if true, V-Cluster is used by SpacePoint

Definition at line 47 of file SpacePoint2TrueHitConnectorModule.h.

◆ m_wU

double m_wU

weight of relation between U-Cluster and TrueHit

Definition at line 44 of file SpacePoint2TrueHitConnectorModule.h.

◆ m_wV

double m_wV

weight of relation between V-Cluster and TrueHit

Definition at line 45 of file SpacePoint2TrueHitConnectorModule.h.


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