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 */
11 #include "AliHLTPHOSBase.h"
12 class AliHLTPHOSUtilities;
14 class AliHLTPHOSRawAnalyzer: public AliHLTPHOSBase
15 //class AliHLTPHOSRawAnalyzer
18 AliHLTPHOSRawAnalyzer();
19 virtual ~AliHLTPHOSRawAnalyzer();
20 AliHLTPHOSRawAnalyzer(double *dataPtr, double fs);
22 void SetCorrectBaselineUsingFirstFiveSamples();
23 void CorrectBaselineUsingFirstFiveSamples(UInt_t *data, const int length);
24 // void CorrectBaselineUsingFirstFiveSamples(int *data, int length);
25 //void CorrectBaselineUsingFirstFiveSamples(double *data, int length);
28 // void BaselineCorrection(double *dataPtr, int N);
29 void BaselineCorrection(double *dataPtr, double baselineValue);
31 int FindStartIndex(double treshold);
32 float GetTiming() const;
33 float GetEnergy() const;
35 // void SetData(const double *data);
36 void SetData(const UInt_t *data, const int length);
37 // void SetData(UInt_t *data, const int length);
39 // void SetData(double *data, const int length);
40 // void SetData(int *data, const int length);
43 void SetSampleFreq(double freq);
44 void SetStartIndex(int startIndex);
45 void MakeInitialGuess();
46 void MakeInitialGuess(int treshold);
48 virtual void SetTVector(Double_t *tVector, Int_t size);
49 virtual void SetAVector(Double_t *aVector, Int_t size);
51 virtual void Evaluate(Int_t start = 0, Int_t lenght = 100) = 0;
55 bool fDoCorrectBaselineUsingFirstFiveSamples;
57 // mutable Double_t *fFloatDataPtr; /**<Float representation of data that should be fitted */
58 // mutable UInt_t *fIntDataPtr; /**<data that should be fitted */
60 /* mutable const Double_t *fFloatDataPtr; /\**<Float representation of data that should be fitted *\/ */
61 /* mutable const unsigned int *fIntDataPtr; /\**<data that should be fitted *\/ */
64 //double *fFloatDataPtr; /**<Float representation of data that should be fitted */
66 double *fDoubleDataPtr; /**<Float representation of data that should be fitted */
67 UInt_t *fIntDataPtr; /**<data that should be fitted */
68 // int *fIntDataPtr; /**<data that should be fitted */
71 // mutable const UInt_t *fIntDataPtr; /**<data that should be fitted */
73 double fSampleFrequency; /**<The ADC sample frequency in MHz used under data taking */
74 double fDTofGuess; /**<Initial guess for t0*/
75 double fDAmplGuess; /**<Initial guess for amplitude*/
76 double fTau; /**<The risetime in micro seconds*/
77 double fDTof; /**<Time of flight in entities of sample intervals */
78 double fDAmpl; /**<Amplitude in entities of ADC levels*/
79 int fStartIndex; /**<Starindex of the time dependent altro signal*/
81 // double unsigned fTest;
84 AliHLTPHOSUtilities *fUtilitiesPtr;
87 AliHLTPHOSRawAnalyzer(const AliHLTPHOSRawAnalyzer & );
88 AliHLTPHOSRawAnalyzer & operator = (const AliHLTPHOSRawAnalyzer &);