QOTTrigger.hh
Go to the documentation of this file.00001 #ifndef _QOTTRIGGER_HH_
00002 #define _QOTTRIGGER_HH_
00003
00010 #include "QError.hh"
00011 #include "QVector.hh"
00012 #include "QOTPulseShapeChiSquare.hh"
00013 #include <vector>
00014 #include "cmath"
00015
00016 using namespace std;
00017 using namespace Cuore;
00018
00019 class TF1;
00020
00021 class QOTTrigger {
00022 public:
00023 QOTTrigger();
00024 QError Init(const QVector& filteredAVG, const double threshold, const int FWHM, const double reso, const int psawindow, const double psarms,const bool debugmode);
00025 QError Trigger(const QVector& input, QVector& triggers, QVector& amplitudes, QVector& chisquares, std::vector<QVector>& peaks, std::vector<QVector>& fitfunctions, QVector& psadelays, QVector& psaampls, bool debugmode);
00026 bool WindowHasVeto() const { return fVetoWindow; }
00027 const QVector& GetVetoedSamples() const { return fVetoedSamples; }
00028 double GetVetoRejection() const {return fTotCounter > 0 ? double(fVetoCounter)/fTotCounter : 0;}
00029
00030 private:
00031 void Veto(const QVector& output_longed, bool debugmode = false);
00032 double fConv;
00033
00034 double fThreshold;
00035 double fReso;
00036 int fFWHM;
00037 double fPSARMS;
00038 int fPSAWindow;
00039
00040 bool fVetoMode;
00041 double fVetoThresRatio;
00042 int fVetoStart;
00043 int fVetoEnd;
00044
00045 bool fVetoWindow;
00046 int fVetoCounter;
00047 int fTotCounter;
00048
00049 Cuore::QVector fVetoedSamples;
00050
00051 QOTPulseShapeChiSquare fPSA;
00052 };
00053
00054 #endif