Belle II Software development
SVDSpacePointSNRFractionSelector Class Reference

class to contain the cut on SVDSpacePoint More...

#include <SVDSpacePointSNRFractionSelector.h>

Inheritance diagram for SVDSpacePointSNRFractionSelector:

Public Member Functions

 SVDSpacePointSNRFractionSelector ()
 constructor
 
bool passSNRFractionSelection (const std::vector< float > &inputU, const std::vector< float > &inputV) const
 Determine if the combination of U and V clusters passes the SNR fraction cuts.
 
void setFraction0Max (float fraction0_max)
 Set max of SNR0 fraction

 
void setFraction1Min (float fraction1_min)
 Set min of SNR1 fraction

 
void setFraction0MaxForFraction1Cut (float fraction0_max_for_fraction1_cut)
 Set max of SNR0 fraction that is used together with SNR1 fraction cut

 
float getFraction0Max () const
 Get max of SNR0 fraction

 
float getFraction1Min () const
 Get min of SNR1 fraction

 
float getFraction0MaxForFraction1Cut () const
 Get max of SNR0 fraction that is used together with SNR1 fraction cut

 

Private Attributes

float m_fraction0_max = 0.45
 Max of SNR0 fraction.
 
float m_fraction1_min = 0.30
 Min of SNR1 fraction.
 
float m_fraction0_max_for_fraction1_cut = 0.10
 Max of SNR0 fraction that is used together with SNR1 fraction cut.
 

Detailed Description

class to contain the cut on SVDSpacePoint

Definition at line 21 of file SVDSpacePointSNRFractionSelector.h.

Constructor & Destructor Documentation

◆ SVDSpacePointSNRFractionSelector()

constructor

Definition at line 26 of file SVDSpacePointSNRFractionSelector.h.

26{};

Member Function Documentation

◆ getFraction0Max()

float getFraction0Max ( ) const
inline

Get max of SNR0 fraction

Definition at line 64 of file SVDSpacePointSNRFractionSelector.h.

◆ getFraction0MaxForFraction1Cut()

float getFraction0MaxForFraction1Cut ( ) const
inline

Get max of SNR0 fraction that is used together with SNR1 fraction cut

Definition at line 68 of file SVDSpacePointSNRFractionSelector.h.

float m_fraction0_max_for_fraction1_cut
Max of SNR0 fraction that is used together with SNR1 fraction cut.

◆ getFraction1Min()

float getFraction1Min ( ) const
inline

Get min of SNR1 fraction

Definition at line 66 of file SVDSpacePointSNRFractionSelector.h.

◆ passSNRFractionSelection()

bool passSNRFractionSelection ( const std::vector< float > &  inputU,
const std::vector< float > &  inputV 
) const
inline

Determine if the combination of U and V clusters passes the SNR fraction cuts.

Definition at line 29 of file SVDSpacePointSNRFractionSelector.h.

31 {
32 if (inputU.size() < 3 || inputV.size() < 3) {
33 B2ERROR("The size of input vectors for SVDSpacePointSNRFractionSelector::passSNRFractionSelection is invalid. " <<
34 "It must be grater than 2, but inputU.size() = " << inputU.size() << ", inputV.size() = " << inputV.size());
35 return false;
36 }
37
38 const float totalSNR_U = inputU[0] + inputU[1] + inputU[2];
39 const float fraction0_U = inputU[0] / totalSNR_U;
40 const float fraction1_U = inputU[1] / totalSNR_U;
41
42 if (fraction0_U > m_fraction0_max) return false;
43 if (fraction1_U < m_fraction1_min && fraction0_U > m_fraction0_max_for_fraction1_cut) return false;
44
45 const float totalSNR_V = inputV[0] + inputV[1] + inputV[2];
46 const float fraction0_V = inputV[0] / totalSNR_V;
47 const float fraction1_V = inputV[1] / totalSNR_V;
48
49 if (fraction0_V > m_fraction0_max) return false;
50 if (fraction1_V < m_fraction1_min && fraction0_V > m_fraction0_max_for_fraction1_cut) return false;
51
52 return true;
53 };

◆ setFraction0Max()

void setFraction0Max ( float  fraction0_max)
inline

Set max of SNR0 fraction

Definition at line 56 of file SVDSpacePointSNRFractionSelector.h.

56{m_fraction0_max = fraction0_max;};

◆ setFraction0MaxForFraction1Cut()

void setFraction0MaxForFraction1Cut ( float  fraction0_max_for_fraction1_cut)
inline

Set max of SNR0 fraction that is used together with SNR1 fraction cut

Definition at line 60 of file SVDSpacePointSNRFractionSelector.h.

61 {m_fraction0_max_for_fraction1_cut = fraction0_max_for_fraction1_cut;};

◆ setFraction1Min()

void setFraction1Min ( float  fraction1_min)
inline

Set min of SNR1 fraction

Definition at line 58 of file SVDSpacePointSNRFractionSelector.h.

58{m_fraction1_min = fraction1_min;};

Member Data Documentation

◆ m_fraction0_max

float m_fraction0_max = 0.45
private

Max of SNR0 fraction.

Definition at line 72 of file SVDSpacePointSNRFractionSelector.h.

◆ m_fraction0_max_for_fraction1_cut

float m_fraction0_max_for_fraction1_cut = 0.10
private

Max of SNR0 fraction that is used together with SNR1 fraction cut.

Definition at line 76 of file SVDSpacePointSNRFractionSelector.h.

◆ m_fraction1_min

float m_fraction1_min = 0.30
private

Min of SNR1 fraction.

Definition at line 73 of file SVDSpacePointSNRFractionSelector.h.


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