CbmRoot
Loading...
Searching...
No Matches
cbm::algo::ca::McMatch Struct Reference

#include <CaMcMatch.h>

Public Member Functions

 McMatch ()=default
 Default constructor.
 
 McMatch (const McMatch &)=default
 Copy constructor.
 
 McMatch (McMatch &&)=default
 Move constructor.
 
McMatchoperator= (const McMatch &)=default
 Copy assignment operator.
 
McMatchoperator= (McMatch &&)=default
 Move assignment operator.
 
 ~McMatch ()=default
 Destructor.
 
void AddLink (int linkIndex, float linkWeight)
 
int GetNofLinks () const
 
int GetBestLinkIndex () const
 
int GetLink (int i) const
 
float GetLinkWeight (int i) const
 
bool IsEmpty () const
 
void Clear ()
 
bool operator== (const McMatch &other) const
 
bool operator!= (const McMatch &other) const
 
std::string ToString () const
 

Private Attributes

int fNofLinks = 0
 Number of matched links.
 
std::array< int, 5 > fLinks = {-1, -1, -1, -1, -1}
 Array of matched link indices.
 
std::array< float, 5 > fLinkWeights = {0, 0, 0, 0, 0}
 Array of matched link weights.
 
int fBestLinkIndex = -1
 Index of the best link in fLinks array.
 

Detailed Description

Definition at line 21 of file CaMcMatch.h.

Constructor & Destructor Documentation

◆ McMatch() [1/3]

cbm::algo::ca::McMatch::McMatch ( )
default

Default constructor.

Referenced by McMatch(), McMatch(), operator!=(), operator=(), operator=(), and operator==().

◆ McMatch() [2/3]

cbm::algo::ca::McMatch::McMatch ( const McMatch & )
default

Copy constructor.

References McMatch().

◆ McMatch() [3/3]

cbm::algo::ca::McMatch::McMatch ( McMatch && )
default

Move constructor.

References McMatch().

◆ ~McMatch()

cbm::algo::ca::McMatch::~McMatch ( )
default

Destructor.

Member Function Documentation

◆ AddLink()

void cbm::algo::ca::McMatch::AddLink ( int linkIndex,
float linkWeight )
inline

Add a new link to the set of links

Parameters
linkIndexIndex of the link to be added
linkWeightWeight of the link to be added

Definition at line 45 of file CaMcMatch.h.

References fBestLinkIndex, fLinks, fLinkWeights, and fNofLinks.

Referenced by cbm::algo::ca::McData::GetMcMatchForCaHit().

◆ Clear()

void cbm::algo::ca::McMatch::Clear ( )
inline

Definition at line 89 of file CaMcMatch.h.

References fBestLinkIndex, fLinks, fLinkWeights, and fNofLinks.

◆ GetBestLinkIndex()

int cbm::algo::ca::McMatch::GetBestLinkIndex ( ) const
inline

Get the index of the best link in the set

Returns
Index of the best link in the set

Definition at line 63 of file CaMcMatch.h.

References fBestLinkIndex.

◆ GetLink()

int cbm::algo::ca::McMatch::GetLink ( int i) const
inline

Get the index of the link in the set by its position

Parameters
iPosition of the link in the set (0 <= i < GetNofLinks())
Returns
Index of the link in the set

Definition at line 68 of file CaMcMatch.h.

References fLinks, and fNofLinks.

Referenced by cbm::algo::ca::TripletConstructorSW::CreateTripletsForHit().

◆ GetLinkWeight()

float cbm::algo::ca::McMatch::GetLinkWeight ( int i) const
inline

Get the weight of the link in the set by its position

Parameters
iPosition of the link in the set (0 <= i < GetNofLinks())
Returns
Weight of the link in the set

Definition at line 79 of file CaMcMatch.h.

References fLinkWeights, and fNofLinks.

◆ GetNofLinks()

int cbm::algo::ca::McMatch::GetNofLinks ( ) const
inline

Get the number of links in the set

Returns
Number of links in the set

Definition at line 59 of file CaMcMatch.h.

References fNofLinks.

Referenced by cbm::algo::ca::TripletConstructorSW::CreateTripletsForHit().

◆ IsEmpty()

◆ operator!=()

bool cbm::algo::ca::McMatch::operator!= ( const McMatch & other) const
inline

Definition at line 115 of file CaMcMatch.h.

References McMatch().

◆ operator=() [1/2]

McMatch & cbm::algo::ca::McMatch::operator= ( const McMatch & )
default

Copy assignment operator.

References McMatch().

◆ operator=() [2/2]

McMatch & cbm::algo::ca::McMatch::operator= ( McMatch && )
default

Move assignment operator.

References McMatch().

◆ operator==()

bool cbm::algo::ca::McMatch::operator== ( const McMatch & other) const
inline

Definition at line 97 of file CaMcMatch.h.

References fLinks, fLinkWeights, fNofLinks, and McMatch().

◆ ToString()

std::string cbm::algo::ca::McMatch::ToString ( ) const
inline

Definition at line 117 of file CaMcMatch.h.

References fBestLinkIndex, fLinks, fLinkWeights, and fNofLinks.

Member Data Documentation

◆ fBestLinkIndex

int cbm::algo::ca::McMatch::fBestLinkIndex = -1
private

Index of the best link in fLinks array.

Definition at line 131 of file CaMcMatch.h.

Referenced by AddLink(), Clear(), GetBestLinkIndex(), and ToString().

◆ fLinks

std::array<int, 5> cbm::algo::ca::McMatch::fLinks = {-1, -1, -1, -1, -1}
private

Array of matched link indices.

Definition at line 129 of file CaMcMatch.h.

Referenced by AddLink(), Clear(), GetLink(), operator==(), and ToString().

◆ fLinkWeights

std::array<float, 5> cbm::algo::ca::McMatch::fLinkWeights = {0, 0, 0, 0, 0}
private

Array of matched link weights.

Definition at line 130 of file CaMcMatch.h.

Referenced by AddLink(), Clear(), GetLinkWeight(), operator==(), and ToString().

◆ fNofLinks

int cbm::algo::ca::McMatch::fNofLinks = 0
private

Number of matched links.

Definition at line 128 of file CaMcMatch.h.

Referenced by AddLink(), Clear(), GetLink(), GetLinkWeight(), GetNofLinks(), IsEmpty(), operator==(), and ToString().


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