source: trunk/MagicSoft/Mars/mtools/MFFT.h@ 3022

Last change on this file since 3022 was 2854, checked in by gaug, 21 years ago
*** empty log message ***
File size: 1.4 KB
Line 
1#ifndef MARS_MFFT
2#define MARS_MFFT
3
4#ifndef MARS_MAGIC
5#include "MAGIC.h"
6#endif
7
8#ifndef ROOT_TArrayF
9#include "TArrayF.h"
10#endif
11
12#ifndef ROOT_TArrayD
13#include "TArrayD.h"
14#endif
15
16#ifndef ROOT_TH1F
17#include "TH1F.h"
18#endif
19
20#ifndef ROOT_TH1D
21#include "TH1D.h"
22#endif
23
24class MFFT : public TObject
25{
26private:
27
28 void Swap(Float_t &a, Float_t &b) { Float_t c = a; a = b; b = c; }
29 void Swap(Double_t &a, Double_t &b) { Double_t c = a; a = b; b = c; }
30
31 void TransformF(const Int_t isign);
32 void TransformD(const Int_t isign);
33 void RealFTF(const Int_t isign);
34 void RealFTD(const Int_t isign);
35
36 void CheckDim(Int_t a);
37 TH1 *CheckHist(const TH1 *hist, const Int_t flag);
38
39 Int_t fDim;
40 TArrayF fDataF;
41 TArrayD fDataD;
42
43public:
44
45 MFFT();
46 ~MFFT();
47
48 TArrayF* RealFunctionFFT( const TArrayF *data);
49 TArrayF* RealFunctionIFFT(const TArrayF *data);
50
51 TArrayD* RealFunctionFFT( const TArrayD *data);
52 TArrayD* RealFunctionIFFT(const TArrayD *data);
53
54 Float_t* RealFunctionFFT( const Int_t n, const Float_t *data);
55 Float_t* RealFunctionIFFT(const Int_t n, const Float_t *data);
56
57 Double_t* RealFunctionFFT( const Int_t n, const Double_t *data);
58 Double_t* RealFunctionIFFT(const Int_t n, const Double_t *data);
59
60 TH1F* PowerSpectrumDensity(const TH1F *hist);
61 TH1D* PowerSpectrumDensity(const TH1D *hist);
62
63 ClassDef(MFFT,0) // Class to perform a Fast Fourier Transform
64};
65
66#endif
Note: See TracBrowser for help on using the repository browser.