/////////////////////////////////////////// // // // MWavelet // // // // Calculates factorial wavelet moments. // // // /////////////////////////////////////////// #ifndef ROOT_MWavelet #define ROOT_MWavelet #include "TH1.h" #include "TCanvas.h" #include "TPad.h" #include "TObject.h" #include "TProfile.h" #include "TNtuple.h" #include "TFile.h" class MWavelet:public TObject { private: Double_t matrix_1dim[10][512]; Double_t ma_1dim[2]; Double_t psi_1dim[2]; Double_t rho_1dim[9][256]; Double_t matrix_2dim[7][64][64]; Double_t ma_2dim[2][2]; Double_t psi_2dim[3][2][2]; Double_t rho_2dim[6][32][32]; Double_t matrix_3dim[7][64][64][64]; Double_t ma_3dim[2][2][2]; Double_t psi_3dim[7][2][2][2]; Double_t rho_3dim[6][32][32][32]; Double_t mo[5][10]; Double_t wertges; Double_t max_coeff[10]; Double_t max_coeff_scaled[10]; Int_t jmax; public: MWavelet(Char_t *na); ~MWavelet(); void CalcHaar(TH1 *input_histo, Int_t jm = 0, Int_t ord = 0, Int_t option = 1); void Draw(TH1 *input_histo, Int_t option = 0); void Reverse(TH1 *input_histo); void Ord2_1dim(Double_t ma_1dim[2], Double_t psi_1dim[2]); void Ord3_1dim(Double_t ma_1dim[2], Double_t psi_1dim[2]); void Ord4_1dim(Double_t ma_1dim[2], Double_t psi_1dim[2]); void Mitteln_1dim(Double_t matrix_1dim[10][512], Int_t j); void Ord2_2dim(Double_t ma_2dim[2][2], Double_t psi_2dim[3][2][2]); void Ord3_2dim(Double_t ma_2dim[2][2], Double_t psi_2dim[3][2][2]); void Ord4_2dim(Double_t ma_2dim[2][2], Double_t psi_2dim[3][2][2]); void Mitteln_2dim(Double_t matrix_2dim[7][64][64], Int_t j); // void Ord2_3dim(Double_t ma_3dim[2][2][2], Double_t psi_3dim[7][2][2][2]); // void Ord3_3dim(Double_t ma_3dim[2][2][2], Double_t psi_3dim[7][2][2][2]); // void Ord4_3dim(Double_t ma_3dim[2][2][2], Double_t psi_3dim[7][2][2][2]); // void Mitteln_3dim(Double_t matrix_3dim[7][64][64][64], Int_t j); void FillProf(); Double_t GetWavMom(Int_t i, Int_t ord); Double_t GetMaxCoeff(Int_t ord); Double_t GetMaxCoeffSc(Int_t ord); void SaveProf(Text_t *name, TObject *obj1 = NULL, TObject *obj2 = NULL, TObject *obj3 = NULL, TObject *obj4 = NULL, TObject *obj5 = NULL); void SaveMom(TH1 *input_histo, Text_t *name, TObject *obj1 = NULL, TObject *obj2 = NULL, TObject *obj3 = NULL, TObject *obj4 = NULL, TObject *obj5 = NULL); TProfile* GetProf_Ord2(void); TProfile* GetProf_Ord3(void); TProfile* GetProf_Ord4(void); TNtuple* GetOrd2(void); TNtuple* GetOrd3(void); TNtuple* GetOrd4(void); TH1D *wav_mom_ord2; // Histogram of factorial wavelet moments of 2nd order. TH1D *wav_mom_ord3; // Histogram of factorial wavelet moments of 3rd order. TH1D *wav_mom_ord4; // Histogram of factorial wavelet moments of 4th order. TH1D *coeff; // Wavelet coefficients of one histogram. TH1D *coeff_scaled; // Scaled wavelet coefficients of one histogram. TH1D *revert; // Histogram obtained from a histogram of wavelet coefficients. TCanvas *canvas; // Canvas. TPad *original; // Pad of the input histogram. TPad *wav2; // Pad of factorial wavelet moments of 2nd order. TPad *wav3; // Pad of factorial wavelet moments of 3rd order. TPad *wav4; // Pad of factorial wavelet moments of 4th order. TProfile *prof_ord2; // Profile histogram of factorial wavelet moments of 2nd order. TProfile *prof_ord3; // Profile histogram of factorial wavelet moments of 3rd order. TProfile *prof_ord4; // Profile histogram of factorial wavelet moments of 4th order. TNtuple *ord2; // Ntuple of factorial wavelet moments of 2nd order. TNtuple *ord3; // Ntuple of factorial wavelet moments of 3rd order. TNtuple *ord4; // Ntuple of factorial wavelet moments of 4th order. Char_t *name; //! Name of the input histogram. // This data member will not be considered for automatic I/O (this is the reason for !) // --> otherwise it leads to a warning during compilation: // *** Datamember MWavelet::name: pointer to fundamental type (need manual intervention) Char_t histo[512]; // String to do some nameing of histograms. ClassDef(MWavelet, 4) // Calculates factorial wavelet moments }; #endif