Belle II Software development
KLMStripEfficiencyAlgorithm::Results Class Reference

Calibration results or supplementary results calculated from the input data. More...

#include <KLMStripEfficiencyAlgorithm.h>

Public Member Functions

 Results ()
 Constructor.
 
 Results (const Results &results)
 Copy constructor.
 
 ~Results ()
 Destructor,.
 
float getAchievedPrecision () const
 Get achieved precision of efficiency measurement (the worst one).
 
int getMatchedDigits () const
 Get number of matched digits.
 
float * getEfficiency () const
 Get efficiency.
 
int getExtHits () const
 Get total number of ExtHits.
 
int * getExtHitsPlane () const
 Get number of ExtHits per plane.
 
int newMeasuredPlanes (const float *efficiency) const
 Get number of new measured planes.
 
int newExtHitsPlanes (const int *extHitsPlane) const
 Get number of new measured planes with ExtHits.
 

Private Attributes

float m_AchievedPrecision = 0
 Achieved precision of efficiency measurement.
 
int m_MatchedDigits = 0
 Number of matched digits.
 
float * m_Efficiency = nullptr
 Efficiency.
 
int m_ExtHits = 0
 Number of ExtHits (overall).
 
int * m_ExtHitsPlane = nullptr
 Number of ExtHits per plane.
 

Friends

class KLMStripEfficiencyAlgorithm
 

Detailed Description

Calibration results or supplementary results calculated from the input data.

Definition at line 49 of file KLMStripEfficiencyAlgorithm.h.

Constructor & Destructor Documentation

◆ Results() [1/2]

Results ( )

Constructor.

Definition at line 21 of file KLMStripEfficiencyAlgorithm.cc.

22{
23}

◆ Results() [2/2]

Results ( const Results results)

Copy constructor.

Definition at line 25 of file KLMStripEfficiencyAlgorithm.cc.

26{
27 m_AchievedPrecision = results.m_AchievedPrecision;
28 m_MatchedDigits = results.m_MatchedDigits;
29 m_ExtHits = results.m_ExtHits;
31 m_Efficiency = new float[nPlanes];
32 m_ExtHitsPlane = new int[nPlanes];
33 std::memcpy(m_Efficiency, results.m_Efficiency, nPlanes * sizeof(float));
34 std::memcpy(m_ExtHitsPlane, results.m_ExtHitsPlane, nPlanes * sizeof(int));
35}
uint16_t getNElements() const
Get number of elements.
static const KLMPlaneArrayIndex & Instance()
Instantiation.
float m_AchievedPrecision
Achieved precision of efficiency measurement.

◆ ~Results()

~Results ( )

Destructor,.

Definition at line 37 of file KLMStripEfficiencyAlgorithm.cc.

38{
39 if (m_Efficiency != nullptr)
40 delete m_Efficiency;
41 if (m_ExtHitsPlane != nullptr)
42 delete m_ExtHitsPlane;
43}

Member Function Documentation

◆ getAchievedPrecision()

float getAchievedPrecision ( ) const
inline

Get achieved precision of efficiency measurement (the worst one).

Definition at line 73 of file KLMStripEfficiencyAlgorithm.h.

74 {
76 }

◆ getEfficiency()

float * getEfficiency ( ) const
inline

Get efficiency.

Definition at line 89 of file KLMStripEfficiencyAlgorithm.h.

90 {
91 return m_Efficiency;
92 }

◆ getExtHits()

int getExtHits ( ) const
inline

Get total number of ExtHits.

Definition at line 97 of file KLMStripEfficiencyAlgorithm.h.

98 {
99 return m_ExtHits;
100 }

◆ getExtHitsPlane()

int * getExtHitsPlane ( ) const
inline

Get number of ExtHits per plane.

Definition at line 105 of file KLMStripEfficiencyAlgorithm.h.

106 {
107 return m_ExtHitsPlane;
108 }

◆ getMatchedDigits()

int getMatchedDigits ( ) const
inline

Get number of matched digits.

Definition at line 81 of file KLMStripEfficiencyAlgorithm.h.

82 {
83 return m_MatchedDigits;
84 }

◆ newExtHitsPlanes()

int newExtHitsPlanes ( const int *  extHitsPlane) const

Get number of new measured planes with ExtHits.

Parameters
[in]extHitsPlaneNumber of ExtHits for other measurement.

Definition at line 173 of file KLMStripEfficiencyAlgorithm.cc.

175{
176 const int nPlanes = KLMPlaneArrayIndex::Instance().getNElements();
177 int newPlanes = 0;
178 for (int i = 0; i < nPlanes; ++i) {
179 if (m_ExtHitsPlane[i] > 0 && extHitsPlane[i] == 0)
180 newPlanes++;
181 }
182 return newPlanes;
183}

◆ newMeasuredPlanes()

int newMeasuredPlanes ( const float *  efficiency) const

Get number of new measured planes.

Parameters
[in]efficiencyEfficiency for other measurement.

Definition at line 161 of file KLMStripEfficiencyAlgorithm.cc.

163{
164 const int nPlanes = KLMPlaneArrayIndex::Instance().getNElements();
165 int newPlanes = 0;
166 for (int i = 0; i < nPlanes; ++i) {
167 if (m_Efficiency[i] > 0 && efficiency[i] == 0)
168 newPlanes++;
169 }
170 return newPlanes;
171}

Friends And Related Function Documentation

◆ KLMStripEfficiencyAlgorithm

friend class KLMStripEfficiencyAlgorithm
friend

Definition at line 51 of file KLMStripEfficiencyAlgorithm.h.

Member Data Documentation

◆ m_AchievedPrecision

float m_AchievedPrecision = 0
private

Achieved precision of efficiency measurement.

Definition at line 125 of file KLMStripEfficiencyAlgorithm.h.

◆ m_Efficiency

float* m_Efficiency = nullptr
private

Efficiency.

Definition at line 131 of file KLMStripEfficiencyAlgorithm.h.

◆ m_ExtHits

int m_ExtHits = 0
private

Number of ExtHits (overall).

Definition at line 134 of file KLMStripEfficiencyAlgorithm.h.

◆ m_ExtHitsPlane

int* m_ExtHitsPlane = nullptr
private

Number of ExtHits per plane.

Definition at line 137 of file KLMStripEfficiencyAlgorithm.h.

◆ m_MatchedDigits

int m_MatchedDigits = 0
private

Number of matched digits.

Definition at line 128 of file KLMStripEfficiencyAlgorithm.h.


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