Diana Software
MNoiseAvgPowerSpectrum.hh
Go to the documentation of this file.
1 
38 #ifndef _M_NOISEAVGPOWERSPECTRUM_H_
39 #define _M_NOISEAVGPOWERSPECTRUM_H_
40 
41 #include <map>
42 #include "QModule.hh"
43 #include "QDiana.hh"
44 #include "QVector.hh"
45 #include "QAverageVector.hh"
46 #include "QFFT.hh"
47 
48 class TH1D;
49 
50 class MNoiseAvgPowerSpectrum : public Diana::QModule {
51 
52  public:
53  // Init method is called before event loop
54  virtual void Init(Diana::QEvent& ev);
55 
56  // Do method is called for each event, getting the event as argument
57  virtual void Do( Diana::QEvent& ev);
58 
59  // Done method is called after event loop
60  virtual void Done();
61 
62  private:
64  std::string fValidityKind;
65 
68 
71 
72 
75  int fNumFreq;
76 
79 
81  std::map<int, int> fCount;
82 
84  std::map<int,QAverageVector> fNoiseAvgPowerSpectrum;
85 
87  time_t fEndValidity;
88 
90  std::string fOutput;
91 
93  std::string fWindow;
94 
95  Diana::QFFT::WindowType fWindowType;
96 
99 
100  std::string fPulseLabel;
102 
104  std::vector<int> fSRuns;
105 
106 };
107 
108 #endif
Module to compute average power spectrum of noise.
int fValidityStart
Validity start first run (or dataset) of validity.
std::string fWindow
window type used for windowing (default is rectangular)
Diana::QFFT::WindowType fWindowType
virtual void Do(Diana::QEvent &ev)
std::map< int, int > fCount
number of noise samples found on each channel
int fValidityEnd
Validity end last run (or dataset) of validity.
int fNumFreq
number of frequencies to compute – set automatically depending on number of points in acquired window
std::vector< int > fSRuns
vector of runs used for nps calculation
std::string fValidityKind
Validity kind defines the kind of validity range for the average pulse (run or dataset)
virtual void Init(Diana::QEvent &ev)
std::string fOutput
output for average pulse
std::map< int, QAverageVector > fNoiseAvgPowerSpectrum
average of noise power spectrum for each channel
bool fProcessedFirstEvent
flag indicating whether the first event has been processed
int fCoherentGain
int defines window normalization