QApolloOptimumTrigger.hh
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef _Q_APOLLO_OPTIMUM_TRIGGER_H_
00016 #define _Q_APOLLO_OPTIMUM_TRIGGER_H_
00017
00018 #include "QApolloTrigger.hh"
00019 #include "QOTFilter.hh"
00020 #include "QOTTrigger.hh"
00021 #include "QVectorR.hh"
00022 #include <TFile.h>
00023 #include <TTree.h>
00024 #include <fstream>
00025 using namespace Cuore;
00026
00027 class QApolloOptimumTrigger : public QApolloTrigger {
00028
00029 public:
00030
00031
00032 QApolloOptimumTrigger(QCrateReceiverBuffer &b,unsigned int);
00033
00034
00035 virtual ~QApolloOptimumTrigger();
00036
00037
00038 virtual int SearchForTrigger(int);
00039
00040
00041 bool SelfAdjust(int);
00042
00043 private:
00044
00045 double fThresholdFactor;
00046 bool fDiff;
00047 std::string fAvgPulseFile;
00048 std::string fAvgNoiseFile;
00049 std::string fKernelWindow;
00050
00051 unsigned int fPreWords;
00052 unsigned int fPreFilled;
00053 bool fReady2Trg;
00054
00055 int fFWHM;
00056 QFFT::WindowType fKernelWindowType;
00057 QOTFilter fOTF;
00058 QOTTrigger fOTT;
00059 Cuore::QVector fInput, fFiltered, fTriggers, fAmplTriggers, fChiSquares, fPSADelays, fPSAAmpls;
00060 std::vector<QVector> fPeaks, fFitFunctions;
00061
00062
00063 TFile *fRootOutputFile;
00064 TTree* fTree;
00065 int fRunNumber;
00066 double fAmpl;
00067 double fChi;
00068 QVectorR* fPeak;
00069 QVectorR* fFitFunction;
00070 double fPSADelay;
00071 double fPSAAmpl;
00072 unsigned int fcounter;
00073
00074 bool fDebugMode;
00075
00076 bool fSaveLogFile;
00077 std::ofstream fLogFile;
00078
00079 };
00080
00081 #endif