Belle II Software development
KLMStripEfficiency Class Reference

DBObject used to store the efficiencies of KLM strips. More...

#include <KLMStripEfficiency.h>

Inheritance diagram for KLMStripEfficiency:

Public Member Functions

 KLMStripEfficiency ()
 Default constructor.
 
 ~KLMStripEfficiency ()
 Default destructor.
 
void setEfficiency (KLMChannelNumber stripId, float efficiency, float efficiencyError=0.)
 Set efficiency and relative error for a single KLM strip using directly the stripId.
 
void setBarrelEfficiency (int section, int sector, int layer, int plane, int strip, float efficiency, float efficiencyError=0.)
 Set efficiency and relative error for a single BKLM strip using the geometrical infos.
 
void setEndcapEfficiency (int section, int sector, int layer, int plane, int strip, float efficiency, float efficiencyError=0.)
 Set efficiency and relative error for a single EKLM strip using the geometrical infos.
 
float getEfficiency (KLMChannelNumber stripId) const
 Returns efficiency of a given KLM strip using directly the stripId.
 
float getBarrelEfficiency (int section, int sector, int layer, int plane, int strip) const
 Returns efficiency of a given BKLM strip using the geometrical infos.
 
float getEndcapEfficiency (int section, int sector, int layer, int plane, int strip) const
 Returns efficiency of a given EKLM strip using the geometrical infos.
 
float getEfficiencyError (KLMChannelNumber stripId) const
 Returns error on efficiency of a given KLM strip using directly the stripId.
 
float getBarrelEfficiencyError (int section, int sector, int layer, int plane, int strip) const
 Returns error on efficiency of a given BKLM strip using the geometrical infos.
 
float getEndcapEfficiencyError (int section, int sector, int layer, int plane, int strip) const
 Returns error on efficiency of a given EKLM strip using the geometrical infos.
 

Private Member Functions

 ClassDef (KLMStripEfficiency, 1)
 Class version.
 

Private Attributes

std::map< KLMChannelNumber, float > m_efficiency
 KLM strip efficiency.
 
std::map< KLMChannelNumber, float > m_efficiencyError
 KLM strip efficiency error.
 

Detailed Description

DBObject used to store the efficiencies of KLM strips.

Needed for the Muid calculation.

Definition at line 31 of file KLMStripEfficiency.h.

Constructor & Destructor Documentation

◆ KLMStripEfficiency()

KLMStripEfficiency ( )
inline

Default constructor.

Definition at line 37 of file KLMStripEfficiency.h.

38 {
39 }

◆ ~KLMStripEfficiency()

~KLMStripEfficiency ( )
inline

Default destructor.

Definition at line 44 of file KLMStripEfficiency.h.

45 {
46 }

Member Function Documentation

◆ getBarrelEfficiency()

float getBarrelEfficiency ( int  section,
int  sector,
int  layer,
int  plane,
int  strip 
) const
inline

Returns efficiency of a given BKLM strip using the geometrical infos.

Parameters
section1 for BF sectors, 0 for BB sectors
sectorsector number
layerlayer number
planeplane number
stripstrip number

Definition at line 114 of file KLMStripEfficiency.h.

115 {
116 const KLMElementNumbers* elementNumbers = &(KLMElementNumbers::Instance());
117 KLMChannelNumber stripId = elementNumbers->channelNumberBKLM(section, sector, layer, plane, strip);
118 return getEfficiency(stripId);
119 }
static const KLMElementNumbers & Instance()
Instantiation.
float getEfficiency(KLMChannelNumber stripId) const
Returns efficiency of a given KLM strip using directly the stripId.
uint16_t KLMChannelNumber
Channel number.

◆ getBarrelEfficiencyError()

float getBarrelEfficiencyError ( int  section,
int  sector,
int  layer,
int  plane,
int  strip 
) const
inline

Returns error on efficiency of a given BKLM strip using the geometrical infos.

Parameters
section1 for BF sectors, 0 for BB sectors
sectorsector number
layerlayer number
planeplane number
stripstrip number

Definition at line 156 of file KLMStripEfficiency.h.

157 {
158 const KLMElementNumbers* elementNumbers = &(KLMElementNumbers::Instance());
159 KLMChannelNumber stripId = elementNumbers->channelNumberBKLM(section, sector, layer, plane, strip);
160 return getEfficiencyError(stripId);
161 }
float getEfficiencyError(KLMChannelNumber stripId) const
Returns error on efficiency of a given KLM strip using directly the stripId.

◆ getEfficiency()

float getEfficiency ( KLMChannelNumber  stripId) const
inline

Returns efficiency of a given KLM strip using directly the stripId.

Parameters
stripIdKLM strip identifier

Definition at line 98 of file KLMStripEfficiency.h.

99 {
100 auto search = m_efficiency.find(stripId);
101 if (search == m_efficiency.end())
102 return std::numeric_limits<float>::quiet_NaN();
103 return search->second;
104 }
std::map< KLMChannelNumber, float > m_efficiency
KLM strip efficiency.

◆ getEfficiencyError()

float getEfficiencyError ( KLMChannelNumber  stripId) const
inline

Returns error on efficiency of a given KLM strip using directly the stripId.

Parameters
stripIdKLM strip identifier

Definition at line 140 of file KLMStripEfficiency.h.

141 {
142 auto search = m_efficiencyError.find(stripId);
143 if (search == m_efficiencyError.end())
144 return std::numeric_limits<float>::quiet_NaN();
145 return search->second;
146 }
std::map< KLMChannelNumber, float > m_efficiencyError
KLM strip efficiency error.

◆ getEndcapEfficiency()

float getEndcapEfficiency ( int  section,
int  sector,
int  layer,
int  plane,
int  strip 
) const
inline

Returns efficiency of a given EKLM strip using the geometrical infos.

Parameters
section2 for EF sectors, 1 for EB sectors
sectorsector number
layerlayer number
planeplane number
stripstrip number

Definition at line 129 of file KLMStripEfficiency.h.

130 {
131 const KLMElementNumbers* elementNumbers = &(KLMElementNumbers::Instance());
132 KLMChannelNumber stripId = elementNumbers->channelNumberEKLM(section, sector, layer, plane, strip);
133 return getEfficiency(stripId);
134 }

◆ getEndcapEfficiencyError()

float getEndcapEfficiencyError ( int  section,
int  sector,
int  layer,
int  plane,
int  strip 
) const
inline

Returns error on efficiency of a given EKLM strip using the geometrical infos.

Parameters
section2 for EF sectors, 1 for EB sectors
sectorsector number
layerlayer number
planeplane number
stripstrip number

Definition at line 171 of file KLMStripEfficiency.h.

172 {
173 const KLMElementNumbers* elementNumbers = &(KLMElementNumbers::Instance());
174 KLMChannelNumber stripId = elementNumbers->channelNumberEKLM(section, sector, layer, plane, strip);
175 return getEfficiencyError(stripId);
176 }

◆ setBarrelEfficiency()

void setBarrelEfficiency ( int  section,
int  sector,
int  layer,
int  plane,
int  strip,
float  efficiency,
float  efficiencyError = 0. 
)
inline

Set efficiency and relative error for a single BKLM strip using the geometrical infos.

Parameters
section1 for BF sectors, 0 for BB sectors
sectorsector number
layerlayer number
planeplane number
stripstrip number
efficiencyefficiency of the strip
efficiencyErrorerror on the efficiency of the strip

Definition at line 70 of file KLMStripEfficiency.h.

71 {
72 const KLMElementNumbers* elementNumbers = &(KLMElementNumbers::Instance());
73 KLMChannelNumber stripId = elementNumbers->channelNumberBKLM(section, sector, layer, plane, strip);
74 setEfficiency(stripId, efficiency, efficiencyError);
75 }
void setEfficiency(KLMChannelNumber stripId, float efficiency, float efficiencyError=0.)
Set efficiency and relative error for a single KLM strip using directly the stripId.

◆ setEfficiency()

void setEfficiency ( KLMChannelNumber  stripId,
float  efficiency,
float  efficiencyError = 0. 
)
inline

Set efficiency and relative error for a single KLM strip using directly the stripId.

Parameters
stripIdKLM strip identifier
efficiencyefficiency of the strip
efficiencyErrorerror on the efficiency of the strip

Definition at line 54 of file KLMStripEfficiency.h.

55 {
56 m_efficiency.insert(std::pair<KLMChannelNumber, float>(stripId, efficiency));
57 m_efficiencyError.insert(std::pair<KLMChannelNumber, float>(stripId, efficiencyError));
58 }

◆ setEndcapEfficiency()

void setEndcapEfficiency ( int  section,
int  sector,
int  layer,
int  plane,
int  strip,
float  efficiency,
float  efficiencyError = 0. 
)
inline

Set efficiency and relative error for a single EKLM strip using the geometrical infos.

Parameters
section2 for EF sectors, 1 for EB sectors
sectorsector number
layerlayer number
planeplane number
stripstrip number
efficiencyefficiency of the strip
efficiencyErrorerror on the efficiency of the strip

Definition at line 87 of file KLMStripEfficiency.h.

88 {
89 const KLMElementNumbers* elementNumbers = &(KLMElementNumbers::Instance());
90 KLMChannelNumber stripId = elementNumbers->channelNumberEKLM(section, sector, layer, plane, strip);
91 setEfficiency(stripId, efficiency, efficiencyError);
92 }

Member Data Documentation

◆ m_efficiency

std::map<KLMChannelNumber, float> m_efficiency
private

KLM strip efficiency.

Definition at line 181 of file KLMStripEfficiency.h.

◆ m_efficiencyError

std::map<KLMChannelNumber, float> m_efficiencyError
private

KLM strip efficiency error.

Definition at line 184 of file KLMStripEfficiency.h.


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