Diana Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MPeakDetector Class Reference

Module to detect peaks in window alternative to MBCountPulses. More...

Inheritance diagram for MPeakDetector:

Public Member Functions

void Init (Diana::QEvent &ev)
 Init method. More...
 
void Do (Diana::QEvent &ev)
 Do method. Declare and implement only one of the two versions. More...
 
void Done ()
 Done method. More...
 

Private Member Functions

std::vector< int > GetPeaks (const Diana::QVector &samples, int minSamples, const size_t red)
 

Private Attributes

Diana::QEventLabel fPulseLabel
 
double fThreshold
 
double fSubSampling
 
QFirfFir
 

Detailed Description

Module to detect peaks in window alternative to MBCountPulses.

Author
Marco Vignati

This module search for peaks in a waveform. It searchs for all positive derivative maxima above a given threshold, excactly as MBCountPulses does. The difference with MBCountPulses is that it alse searches for maxima in the waveform subsampled by a given factor. This is useful to detect peaks that are slower than the noise fluctuation.

Definition at line 43 of file MPeakDetector.hh.

Member Function Documentation

◆ Do()

void MPeakDetector::Do ( Diana::QEvent &  ev)

Do method. Declare and implement only one of the two versions.

Definition at line 47 of file MPeakDetector.cc.

References abs(), QEvent::Get(), QEvent::GetByLabel(), QPulseInfo::GetMasterSample(), and QSampleInfo::GetSampleIndex().

◆ Done()

void MPeakDetector::Done ( )

Done method.

Definition at line 86 of file MPeakDetector.cc.

◆ GetPeaks()

vector< int > MPeakDetector::GetPeaks ( const Diana::QVector &  samples,
int  minSamples,
const size_t  red 
)
private

Definition at line 90 of file MPeakDetector.cc.

◆ Init()

void MPeakDetector::Init ( Diana::QEvent &  ev)

Member Data Documentation

◆ fFir

QFir* MPeakDetector::fFir
private

Definition at line 61 of file MPeakDetector.hh.

◆ fPulseLabel

Diana::QEventLabel MPeakDetector::fPulseLabel
private

Definition at line 58 of file MPeakDetector.hh.

◆ fSubSampling

double MPeakDetector::fSubSampling
private

Definition at line 60 of file MPeakDetector.hh.

◆ fThreshold

double MPeakDetector::fThreshold
private

Definition at line 59 of file MPeakDetector.hh.


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