4 #ifndef ALIHLTPHOSFOURIER_H
5 #define ALIHLTPHOSFOURIER_H
7 /**************************************************************************
8 * This file is property of and copyright by the Experimental Nuclear *
9 * Physics Group, Dep. of Physics *
10 * University of Oslo, Norway, 2007 *
12 * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
13 * Contributors are mentioned in the code where appropriate. *
14 * Please report bugs to perthi@fys.uio.no *
16 * Permission to use, copy, modify and distribute this software and its *
17 * documentation strictly for non-commercial purposes is hereby granted *
18 * without fee, provided that the above copyright notice appears in all *
19 * copies and that both the copyright notice and this permission notice *
20 * appear in the supporting documentation. The authors make no claims *
21 * about the suitability of this software for any purpose. It is *
22 * provided "as is" without express or implied warranty. *
23 **************************************************************************/
26 #include "TVirtualFFT.h"
28 #include "AliHLTPHOSConstant.h"
31 #include "AliHLTPHOSRcuFFTDataStruct.h"
33 using namespace PhosHLTConst;
36 #define SAMPLING_FREQUENCY 10
38 class AliHLTPHOSFourier
42 virtual ~AliHLTPHOSFourier();
43 AliHLTPHOSRcuFFTDataStruct GetPSD();
44 void ProcessFourier(const Int_t *data, const int length, const int z, const int x, const int gain, const int event =-1);
46 int GetDataSize() {return fFixedDataSize;};
49 void Int2Double(const Int_t *inputarray, double *outputarray, const int size);
50 bool CheckSignal(const Int_t *data, const int length);
52 double EvaluateMagnitude(const double re, const double im);
54 // double *fAccumulateFFTsAll[N_GAINS];
55 // int fNFFTsAll[N_GAINS];
56 // double *fAccumulateFFTs [N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
57 // int fNFFTs[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
59 void ResetEventPSD(const int gain);
60 TVirtualFFT *fFFT_own;
62 double *fFFTInputArray;
63 double *fFFTOutputArray;
67 // AliHLTPHOSRcuFFTDataStruct fFFTOupuStruct[N_GAINS];
68 AliHLTPHOSRcuFFTDataStruct fFFTOupuStruct;
73 T Max(T *array, int N) const
77 for(int i = 0; i < N; i++)
90 T Min(T *array, int N) const
93 T tmpMin = Max(array , N);
97 for(int i = 0; i < N; i++)
109 AliHLTPHOSFourier(const AliHLTPHOSFourier&);
110 AliHLTPHOSFourier & operator=(const AliHLTPHOSFourier&){return *this;};
116 // AliHLTPHOSRcuAltroPatternTestComponent(const AliHLTPHOSRcuAltroPatternTestComponent &);
117 // AliHLTPHOSRcuAltroPatternTestComponent & operator = (const AliHLTPHOSRcuAltroPatternTestComponent &);