newwave is hosted by Hepforge, IPPP Durham

New Wave - Noise Elimination With Wavelets At Vast Energies  0.1.0
code/include/NewWave/WaveletCoefficient.hh
Go to the documentation of this file.
00001 #ifndef NEWWAVE_WAVELET_COEFFICIENT_HH
00002 #define NEWWAVE_WAVELET_COEFFICIENT_HH
00003 
00004 #include "NewWave/FrequencyBand.fh"
00005 #include "NewWave/WaveletCoefficient.fh"
00006 #include "NewWave/WaveletBaseEvent.hh"
00007 
00008 namespace NewWave {
00009   
00010   using std::size_t;
00011   
00013 
00020   class WaveletCoefficient{
00021     
00022   public:
00023     
00025 
00035     WaveletCoefficient(size_t yLevel, size_t phiLevel,
00036                        size_t key,
00037                        bool smoothing,
00038                        double yMin, double yMax,
00039                        double phiMin, double phiMax,
00040                        double value);
00041     
00043 
00046     double value()const;
00047     
00049 
00057     size_t key()const;
00058     
00060 
00066     size_t yLevel()const;
00067     
00069 
00075     size_t phiLevel()const;
00076     
00078 
00085     bool isSmoothing()const;
00086     
00088 
00093     double phiMin()const;
00094 
00096 
00101     double phiMax()const;
00102     
00104 
00109     double phiCentre()const;
00110     
00112 
00117     double yMin()const;
00118 
00120 
00125     double yMax()const;
00126     
00128 
00133     double yCentre()const;
00134     
00136 
00139     void setValue(double val);
00140     
00142 
00150     int frequencyHash(int nLevels)const;
00151     
00153 
00161     int frequencyHash()const;
00162     
00163     const FrequencyBand &frequencyBand()const;
00164     
00165   private:
00166     
00167     double _value;
00168     size_t _yLevel;
00169     size_t _phiLevel;
00170     size_t _key;
00171     
00172     bool _isSmoothing;
00173     
00174     double _yMin;
00175     double _phiMin;
00176     
00177     double _yMax;
00178     double _phiMax;
00179     
00180     mutable double _yCentre;
00181     mutable double _phiCentre;
00182     
00183     mutable bool _haveYCentre;
00184     mutable bool _havePhiCentre;
00185     
00186     friend class WaveletBaseEvent;
00187     
00188     const WaveletBaseEvent *_event;
00189     
00190   };
00191   
00192 }
00193 
00194 #endif