Belle II Software development
TauEncoder Class Reference

Encoder/decoder for neural network tau values. More...

#include <SVDSimulationTools.h>

Public Member Functions

 TauEncoder (double min_amplitude, double max_amplitude, double min_tau, double max_tau)
 Constructor takes amplitude and tau ranges, typically from a network xml file.
 
 TauEncoder ()
 Default constructor Parameterless constructor to default-construct the class.
 
void setBounds (double min_amplitude, double max_amplitude, double min_tau, double max_tau)
 Set encoder baounds (e.g.
 
double encodeTau (double tau) const
 Return encoded value for a waveform width tau value.
 
double decodeTau (double scaledTau) const
 Scale back a previously scaled tau value.
 
void print (std::ostringstream &os) const
 print tool
 

Private Attributes

double m_minAmplitude
 lower bound of amplitude range
 
double m_maxAmplitude
 upper bound of amplitdue range
 
double m_minTau
 lower bound of tau range
 
double m_maxTau
 upper bound of tau range
 
double m_ATRatio
 ratio of amplitude to tau ranges
 

Detailed Description

Encoder/decoder for neural network tau values.

Tau value is an additional input to the network along with the 6 signal samples. Therefore, it is scaled to the range of signals, more precisely, to the amplitude range.

Definition at line 212 of file SVDSimulationTools.h.

Constructor & Destructor Documentation

◆ TauEncoder() [1/2]

TauEncoder ( double  min_amplitude,
double  max_amplitude,
double  min_tau,
double  max_tau 
)
inline

Constructor takes amplitude and tau ranges, typically from a network xml file.

Parameters
min_amplitudeLower bound of the amplitude range
max_amplitudeUpper bound of the amplitude range
min_tauLower bound of the tau range
max_tauUpper bound of the tau range

Definition at line 220 of file SVDSimulationTools.h.

221 :
222 m_minAmplitude(min_amplitude), m_maxAmplitude(max_amplitude),
223 m_minTau(min_tau), m_maxTau(max_tau)
224 {
226 }
double m_minAmplitude
lower bound of amplitude range
double m_maxTau
upper bound of tau range
double m_ATRatio
ratio of amplitude to tau ranges
double m_minTau
lower bound of tau range
double m_maxAmplitude
upper bound of amplitdue range

◆ TauEncoder() [2/2]

TauEncoder ( )
inline

Default constructor Parameterless constructor to default-construct the class.

Definition at line 229 of file SVDSimulationTools.h.

229: TauEncoder(0, 100, 0, 100) {}
TauEncoder()
Default constructor Parameterless constructor to default-construct the class.

Member Function Documentation

◆ decodeTau()

double decodeTau ( double  scaledTau) const
inline

Scale back a previously scaled tau value.

Parameters
scaledTaua previously scaled tau value
Returns
restored tau value

Definition at line 259 of file SVDSimulationTools.h.

260 { return m_minTau + 1.0 / m_ATRatio * (scaledTau - m_minAmplitude); }

◆ encodeTau()

double encodeTau ( double  tau) const
inline

Return encoded value for a waveform width tau value.

Parameters
tauoriginal tau value
Returns
tau value scaled to amplitude range

Definition at line 252 of file SVDSimulationTools.h.

253 { return m_minAmplitude + m_ATRatio * (tau - m_minTau); }

◆ print()

void print ( std::ostringstream &  os) const
inline

print tool

Definition at line 263 of file SVDSimulationTools.h.

264 {
265 os << "TauEncoder object, "
266 << "Amplitude range: " << m_minAmplitude << " to " << m_maxAmplitude
267 << " Tau range: " << m_minTau << " to " << m_maxTau
268 << " ATRatio: " << m_ATRatio << std::endl;
269 }

◆ setBounds()

void setBounds ( double  min_amplitude,
double  max_amplitude,
double  min_tau,
double  max_tau 
)
inline

Set encoder baounds (e.g.

when default constructor was used)

Parameters
min_amplitudeLower bound of the amplitude range
max_amplitudeUpper bound of the amplitude range
min_tauLower bound of the tau range
max_tauUpper bound of the tau range

Definition at line 237 of file SVDSimulationTools.h.

239 {
240 m_minAmplitude = min_amplitude;
241 m_maxAmplitude = max_amplitude;
242 m_minTau = min_tau;
243 m_maxTau = max_tau;
244 // Re-initialize the range ratio setting
246 }

Member Data Documentation

◆ m_ATRatio

double m_ATRatio
private

ratio of amplitude to tau ranges

Definition at line 276 of file SVDSimulationTools.h.

◆ m_maxAmplitude

double m_maxAmplitude
private

upper bound of amplitdue range

Definition at line 273 of file SVDSimulationTools.h.

◆ m_maxTau

double m_maxTau
private

upper bound of tau range

Definition at line 275 of file SVDSimulationTools.h.

◆ m_minAmplitude

double m_minAmplitude
private

lower bound of amplitude range

Definition at line 272 of file SVDSimulationTools.h.

◆ m_minTau

double m_minTau
private

lower bound of tau range

Definition at line 274 of file SVDSimulationTools.h.


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