2 // $Id: AliHLTPHOSFourier.h 34951 2009-09-23 14:35:38Z phille $
4 #ifndef ALIHLTCALOFOURIER_H
5 #define ALIHLTCALOFOURIER_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"
29 // #include "AliHLTCaloConstant.h"
31 #include "AliHLTCaloConstants.h"
35 #include "AliHLTCaloRcuFFTDataStruct.h"
37 //using namespace PhosHLTConst;
38 //using namespace CaloHLTConst;
42 #define SAMPLING_FREQUENCY 10
44 class AliHLTCaloFourier
48 virtual ~AliHLTCaloFourier();
49 AliHLTCaloRcuFFTDataStruct GetPSD();
50 void ProcessFourier(const Int_t *data, const int length, const int z, const int x, const int gain, const int event =-1);
52 int GetDataSize() {return fFixedDataSize;};
55 void Int2Double(const Int_t *inputarray, double *outputarray, const int size);
56 bool CheckSignal(const Int_t *data, const int length);
58 double EvaluateMagnitude(const double re, const double im);
60 // double *fAccumulateFFTsAll[N_GAINS];
61 // int fNFFTsAll[N_GAINS];
62 // double *fAccumulateFFTs [N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
63 // int fNFFTs[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
65 void ResetEventPSD(const int gain);
66 TVirtualFFT *fFFT_own;
68 double *fFFTInputArray;
69 double *fFFTOutputArray;
73 // AliHLTCaloRcuFFTDataStruct fFFTOupuStruct[N_GAINS];
74 AliHLTCaloRcuFFTDataStruct fFFTOupuStruct;
79 T Max(T *array, int N) const
83 for(int i = 0; i < N; i++)
96 T Min(T *array, int N) const
99 T tmpMin = Max(array , N);
103 for(int i = 0; i < N; i++)
105 if(array[i] < tmpMin)
115 AliHLTCaloFourier(const AliHLTCaloFourier&);
116 AliHLTCaloFourier & operator=(const AliHLTCaloFourier&){return *this;};
120 ClassDef(AliHLTCaloFourier, 1);
125 // AliHLTCaloRcuAltroPatternTestComponent(const AliHLTCaloRcuAltroPatternTestComponent &);
126 // AliHLTCaloRcuAltroPatternTestComponent & operator = (const AliHLTCaloRcuAltroPatternTestComponent &);