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;
37 #define SAMPLING_FREQUENCY 10
39 class AliHLTPHOSFourier
43 virtual ~AliHLTPHOSFourier();
44 AliHLTPHOSRcuFFTDataStruct GetPSD();
45 void ProcessFourier(const Int_t *data, const int length, const int z, const int x, const int gain, const int event =-1);
47 int GetDataSize() {return fFixedDataSize;};
50 void Int2Double(const Int_t *inputarray, double *outputarray, const int size);
51 bool CheckSignal(const Int_t *data, const int length);
53 double EvaluateMagnitude(const double re, const double im);
55 // double *fAccumulateFFTsAll[N_GAINS];
56 // int fNFFTsAll[N_GAINS];
57 // double *fAccumulateFFTs [N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
58 // int fNFFTs[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
60 void ResetEventPSD(const int gain);
61 TVirtualFFT *fFFT_own;
63 double *fFFTInputArray;
64 double *fFFTOutputArray;
68 // AliHLTPHOSRcuFFTDataStruct fFFTOupuStruct[N_GAINS];
69 AliHLTPHOSRcuFFTDataStruct fFFTOupuStruct;
74 T Max(T *array, int N) const
78 for(int i = 0; i < N; i++)
91 T Min(T *array, int N) const
94 T tmpMin = Max(array , N);
98 for(int i = 0; i < N; i++)
100 if(array[i] < tmpMin)
110 AliHLTPHOSFourier(const AliHLTPHOSFourier&);
111 AliHLTPHOSFourier & operator=(const AliHLTPHOSFourier&){return *this;};
117 // AliHLTPHOSRcuAltroPatternTestComponent(const AliHLTPHOSRcuAltroPatternTestComponent &);
118 // AliHLTPHOSRcuAltroPatternTestComponent & operator = (const AliHLTPHOSRcuAltroPatternTestComponent &);