Diana Software
MTutorialAmplitudeFilter.hh

Example filter which selects events with amplitude in given range, header file.

Author
Marco Vignati

This filter is used in diana_tutorial_averagepulse.cfg to select events with pulse amplitude in a the range 50-1000 mV. The selected events are then averaged by MTutorialAveragePulse. See also the implementation in MTutorialAmplitudeFilter.cc.

#ifndef _M_TUTORIAL_AMPLITUDE_FILTER_HH_
#define _M_TUTORIAL_AMPLITUDE_FILTER_HH_
#include "QFilter.hh"
class MTutorialAmplitudeFilter : public Diana::QFilter {
public:
void GetCuts(const Diana::QEvent& ev);
bool Filter(const Diana::QEvent& ev);
//bool Filter(const Diana::QEvent& ev, const Diana::QEventList& neighbours);
private:
std::string fAmplitudeLabel;
};
#endif
double fAmplitudeMinimum
minimum amplitude from config file
bool Filter(const Diana::QEvent &ev)
return true if ev passes the cuts
std::string fAmplitudeLabel
amplitude variable from config file
void GetCuts(const Diana::QEvent &ev)
Get cuts from config file.
double fAmplitudeMaximum
maximum amplitude from config file