00001
00002
00004 #ifndef __Oqplane__
00005 #define __Oqplane__
00006
00007 #include "TriggerBuffer.h"
00008 #include "Spectrum.h"
00009 #include "Omap.h"
00010
00011
00012 #define BIASFACT2 1.1140649371721838001292326225666329264640808105469
00013
00014 using namespace std;
00015
00022 class Oqplane: public Omap {
00023
00024 public:
00025 friend class Otile;
00026
00027 private:
00028
00029
00030 Oqplane(const double aQ,
00031 const int aSampleFrequency,
00032 const int aTimeRange,
00033 const double aFrequencyMin,
00034 const double aFrequencyMax,
00035 const double aMismatchStep);
00036 virtual ~Oqplane(void);
00037
00038 void PrintParameters(void);
00039 int ProjectData(fft *aDataFft, const double aPadding=0.0);
00040 void FillMap(const string aContentType="snr");
00041 bool SaveTriggers(TriggerBuffer *aTriggers, const double aT0, Segments* aSeg);
00042
00043
00044 inline double GetQ(void){ return Q; };
00045 inline double GetSNRThr(void){ return SNRThr; };
00046 inline double GetTileSNR2(const int aTimeTileIndex, const int aBandIndex){
00047 return TMath::Max(bandFFT[aBandIndex]->GetNorm2_t(aTimeTileIndex)-2.0,0.0);
00048 };
00049 inline double GetTileAmplitude(const int aTimeTileIndex, const int aBandIndex){
00050 return sqrt(GetTileSNR2(aTimeTileIndex,aBandIndex))*bandNoiseAmplitude[aBandIndex];
00051 };
00052
00053
00054 bool SetPower(Spectrum *aSpec1, Spectrum *aSpec2);
00055 inline void SetSNRThr(const double aSNRThr){ SNRThr=aSNRThr; };
00056
00057
00058
00059 double GetMeanEnergy(const int aBandIndex, const double aPadding);
00060 double GetA1(void);
00061
00062
00063 double Q;
00064 double QPrime;
00065 double PlaneNormalization;
00066
00067
00068 double SNRThr;
00069
00070
00071 int *bandWindowSize;
00072 double **bandWindow;
00073 double *bandNoiseAmplitude;
00074 fft **bandFFT;
00075
00076 ClassDef(Oqplane,0)
00077 };
00078
00079
00080 #endif
00081
00082