Belle II Software development
WaveGenerator Class Reference

Waveform generator This is a functor to calculate APV samples from waveform. More...

#include <SVDSimulationTools.h>

Public Member Functions

 WaveGenerator (WaveformShape waveform=w_betaprime)
 Constructor takes waveform function.
 
void setWaveform (WaveformShape waveform)
 Set waveform.
 
const apvSamplesoperator() (double t0, double tau)
 Operator () returns 6 APV samples.
 

Private Attributes

apvSamples m_samples
 for storage of computed data
 
WaveformShape m_waveform
 the wave function
 

Detailed Description

Waveform generator This is a functor to calculate APV samples from waveform.

Constructs from a waveform function.

Definition at line 152 of file SVDSimulationTools.h.

Constructor & Destructor Documentation

◆ WaveGenerator()

WaveGenerator ( WaveformShape  waveform = w_betaprime)
inline

Constructor takes waveform function.

Definition at line 155 of file SVDSimulationTools.h.

155 :
156 m_samples({{0, 0, 0, 0, 0, 0}}), m_waveform(waveform)
157 {}
WaveformShape m_waveform
the wave function
apvSamples m_samples
for storage of computed data

Member Function Documentation

◆ operator()()

const apvSamples & operator() ( double  t0,
double  tau 
)
inline

Operator () returns 6 APV samples.

Definition at line 161 of file SVDSimulationTools.h.

162 {
163 std::transform(
164 apvTimeBase.begin(), apvTimeBase.end(),
165 m_samples.begin(),
166 [this, t0, tau](double t)->double { return m_waveform((t - t0) / tau); }
167 );
168 return m_samples;
169 }
const apvSamples apvTimeBase
APV time base - times for the 6 signals.

◆ setWaveform()

void setWaveform ( WaveformShape  waveform)
inline

Set waveform.

Definition at line 159 of file SVDSimulationTools.h.

159{ m_waveform = waveform; }

Member Data Documentation

◆ m_samples

apvSamples m_samples
private

for storage of computed data

Definition at line 171 of file SVDSimulationTools.h.

◆ m_waveform

WaveformShape m_waveform
private

the wave function

Definition at line 172 of file SVDSimulationTools.h.


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