2 #ifndef ALIHLTPHOSRAWANALYZER_H
3 #define ALIHLTPHOSRAWANALYZER_H
4 /* Copyright(c) 1998-2004, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
12 //#include "AliHLTPHOSBase.h"
13 class AliHLTPHOSUtilities;
15 //class AliHLTPHOSRawAnalyzer: public AliHLTPHOSBase
16 class AliHLTPHOSRawAnalyzer
17 //class AliHLTPHOSRawAnalyzer
20 AliHLTPHOSRawAnalyzer();
21 virtual ~AliHLTPHOSRawAnalyzer();
22 AliHLTPHOSRawAnalyzer(double *dataPtr, double fs);
24 void SetCorrectBaselineUsingFirstFiveSamples();
25 void CorrectBaselineUsingFirstFiveSamples(UInt_t *data, const int length);
26 // void CorrectBaselineUsingFirstFiveSamples(int *data, int length);
27 //void CorrectBaselineUsingFirstFiveSamples(double *data, int length);
30 // void BaselineCorrection(double *dataPtr, int N);
31 void BaselineCorrection(double *dataPtr, double baselineValue);
33 int FindStartIndex(double treshold);
34 float GetTiming() const;
35 float GetEnergy() const;
37 // void SetData(const double *data);
38 void SetData(const UInt_t *data, const int length);
39 void SetData(const UShort_t *data, const int length);
40 // void SetData(UInt_t *data, const int length);
42 // void SetData(double *data, const int length);
43 // void SetData(int *data, const int length);
46 void SetSampleFreq(double freq);
47 void SetStartIndex(int startIndex);
48 void MakeInitialGuess();
49 void MakeInitialGuess(int treshold);
51 virtual void SetTVector(Double_t *tVector, Int_t size);
52 virtual void SetAVector(Double_t *aVector, Int_t size);
54 virtual void Evaluate(Int_t start = 0, Int_t lenght = 100) = 0;
58 bool fDoCorrectBaselineUsingFirstFiveSamples;
60 // mutable Double_t *fFloatDataPtr; /**<Float representation of data that should be fitted */
61 // mutable UInt_t *fIntDataPtr; /**<data that should be fitted */
63 /* mutable const Double_t *fFloatDataPtr; /\**<Float representation of data that should be fitted *\/ */
64 /* mutable const unsigned int *fIntDataPtr; /\**<data that should be fitted *\/ */
67 //double *fFloatDataPtr; /**<Float representation of data that should be fitted */
69 double *fDoubleDataPtr; /**<Float representation of data that should be fitted */
70 UInt_t *fIntDataPtr; /**<data that should be fitted */
71 UShort_t *fShortDataPtr; /**<data that should be fitted */
72 // int *fIntDataPtr; /**<data that should be fitted */
75 // mutable const UInt_t *fIntDataPtr; /**<data that should be fitted */
77 double fSampleFrequency; /**<The ADC sample frequency in MHz used under data taking */
78 double fDTofGuess; /**<Initial guess for t0*/
79 double fDAmplGuess; /**<Initial guess for amplitude*/
80 double fTau; /**<The risetime in micro seconds*/
81 double fDTof; /**<Time of flight in entities of sample intervals */
82 double fDAmpl; /**<Amplitude in entities of ADC levels*/
83 int fStartIndex; /**<Starindex of the time dependent altro signal*/
85 // double unsigned fTest;
90 AliHLTPHOSUtilities *fUtilitiesPtr;
93 AliHLTPHOSRawAnalyzer(const AliHLTPHOSRawAnalyzer & );
94 AliHLTPHOSRawAnalyzer & operator = (const AliHLTPHOSRawAnalyzer &);