Logo ROOT  
Reference Guide
TSpectrumTransform.h
Go to the documentation of this file.
1// @(#)root/spectrum:$Id$
2// Author: Miroslav Morhac 25/09/06
3
4/*************************************************************************
5 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11#ifndef ROOT_TSpectrumTransform
12#define ROOT_TSpectrumTransform
13
14#include "TNamed.h"
15
16class TH1;
17
18class TSpectrumTransform : public TNamed {
19
20protected:
21 Int_t fSize; ///< length of transformed data
22 Int_t fTransformType; ///< type of transformation (Haar, Walsh, Cosine, Sine, Fourier, Hartley, Fourier-Walsh, Fourier-Haar, Walsh-Haar, Cosine-Walsh, Cosine-Haar, Sine-Walsh, Sine-Haar)
23 Int_t fDegree; ///< degree of mixed transform, applies only for Fourier-Walsh, Fourier-Haar, Walsh-Haar, Cosine-Walsh, Cosine-Haar, Sine-Walsh, Sine-Haar transforms
24 Int_t fDirection; ///< forward or inverse transform
25 Int_t fXmin; ///< first channel of filtered or enhanced region
26 Int_t fXmax; ///< last channel of filtered or enhanced region
27 Double_t fFilterCoeff; ///< value set in the filtered region
28 Double_t fEnhanceCoeff; ///< multiplication coefficient applied in enhanced region;
29
30public:
31 enum {
47 };
50 ~TSpectrumTransform() override;
51
52protected:
53 void BitReverse(Double_t *working_space,Int_t num);
54 void BitReverseHaar(Double_t *working_space,Int_t shift,Int_t num,Int_t start);
55 void Fourier(Double_t *working_space,Int_t num,Int_t hartley,Int_t direction,Int_t zt_clear);
56 Int_t GeneralExe(Double_t *working_space,Int_t zt_clear,Int_t num,Int_t degree,Int_t type);
57 Int_t GeneralInv(Double_t *working_space,Int_t num,Int_t degree,Int_t type);
58 void Haar(Double_t *working_space,Int_t num,Int_t direction);
59 void Walsh(Double_t *working_space,Int_t num);
60
61public:
62 void Enhance(const Double_t *source, Double_t *destVector);
63 void FilterZonal(const Double_t *source, Double_t *destVector);
64 void SetDirection(Int_t direction);
65 void SetEnhanceCoeff(Double_t enhanceCoeff);
66 void SetFilterCoeff(Double_t filterCoeff);
68 void SetTransformType(Int_t transType, Int_t degree);
69 void Transform(const Double_t *source, Double_t *destVector);
70
71 ClassDefOverride(TSpectrumTransform,1) //Spectrum Transformer, it calculates classic orthogonal 1D transforms
72};
73
74
75#endif
76
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Definition: RtypesCore.h:45
double Double_t
Definition: RtypesCore.h:59
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
float xmin
Definition: THbookFile.cxx:95
float xmax
Definition: THbookFile.cxx:95
TH1 is the base class of all histogram classes in ROOT.
Definition: TH1.h:58
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Advanced 1-dimensional orthogonal transform functions.
void Haar(Double_t *working_space, Int_t num, Int_t direction)
This function calculates Haar transform of a part of data Function parameters:
Int_t fTransformType
type of transformation (Haar, Walsh, Cosine, Sine, Fourier, Hartley, Fourier-Walsh,...
void Transform(const Double_t *source, Double_t *destVector)
This function transforms the source spectrum.
void BitReverseHaar(Double_t *working_space, Int_t shift, Int_t num, Int_t start)
This function carries out bit-reverse reordering for Haar transform Function parameters:
void SetRegion(Int_t xmin, Int_t xmax)
This function sets the filtering or enhancement region:
void SetDirection(Int_t direction)
This function sets the direction of the transform:
~TSpectrumTransform() override
Destructor.
void Fourier(Double_t *working_space, Int_t num, Int_t hartley, Int_t direction, Int_t zt_clear)
This function calculates Fourier based transform of a part of data Function parameters:
void Enhance(const Double_t *source, Double_t *destVector)
This function transforms the source spectrum.
void BitReverse(Double_t *working_space, Int_t num)
This function carries out bit-reverse reordering of data Function parameters:
Int_t fSize
length of transformed data
Double_t fEnhanceCoeff
multiplication coefficient applied in enhanced region;
void SetEnhanceCoeff(Double_t enhanceCoeff)
This function sets the enhancement coefficient:
Int_t GeneralExe(Double_t *working_space, Int_t zt_clear, Int_t num, Int_t degree, Int_t type)
This function calculates generalized (mixed) transforms of different degrees Function parameters:
void Walsh(Double_t *working_space, Int_t num)
This function calculates Walsh transform of a part of data Function parameters:
Int_t GeneralInv(Double_t *working_space, Int_t num, Int_t degree, Int_t type)
This function calculates inverse generalized (mixed) transforms Function parameters:
void SetFilterCoeff(Double_t filterCoeff)
This function sets the filter coefficient:
Int_t fXmin
first channel of filtered or enhanced region
Int_t fXmax
last channel of filtered or enhanced region
Int_t fDirection
forward or inverse transform
void FilterZonal(const Double_t *source, Double_t *destVector)
This function transforms the source spectrum.
Int_t fDegree
degree of mixed transform, applies only for Fourier-Walsh, Fourier-Haar, Walsh-Haar,...
TSpectrumTransform()
default constructor
Double_t fFilterCoeff
value set in the filtered region
void SetTransformType(Int_t transType, Int_t degree)
This function sets the following parameters for transform:
static constexpr double degree