1 #ifndef ALIHLTPHOSRAWANALYZER_H
2 #define ALIHLTPHOSRAWANALYZER_H
3 /* Copyright(c) 1998-2004, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
10 #include "AliHLTPHOSBase.h"
11 class AliHLTPHOSUtilities;
13 class AliHLTPHOSRawAnalyzer: public AliHLTPHOSBase
14 //class AliHLTPHOSRawAnalyzer
17 AliHLTPHOSRawAnalyzer();
18 virtual ~AliHLTPHOSRawAnalyzer();
19 AliHLTPHOSRawAnalyzer(double *dataPtr, double fs);
21 void SetCorrectBaselineUsingFirstFiveSamples();
22 void CorrectBaselineUsingFirstFiveSamples(UInt_t *data, const int length);
23 // void CorrectBaselineUsingFirstFiveSamples(int *data, int length);
24 //void CorrectBaselineUsingFirstFiveSamples(double *data, int length);
27 // void BaselineCorrection(double *dataPtr, int N);
28 void BaselineCorrection(double *dataPtr, double baselineValue);
30 int FindStartIndex(double treshold);
31 float GetTiming() const;
32 float GetEnergy() const;
34 // void SetData(const double *data);
35 void SetData(const UInt_t *data, const int length);
36 // void SetData(UInt_t *data, const int length);
38 // void SetData(double *data, const int length);
39 // void SetData(int *data, const int length);
42 void SetSampleFreq(double freq);
43 void SetStartIndex(int startIndex);
44 void MakeInitialGuess();
45 void MakeInitialGuess(int treshold);
47 virtual void SetTVector(Double_t *tVector, Int_t size);
48 virtual void SetAVector(Double_t *aVector, Int_t size);
50 virtual void Evaluate(Int_t start = 0, Int_t lenght = 100) = 0;
54 bool fDoCorrectBaselineUsingFirstFiveSamples;
56 // mutable Double_t *fFloatDataPtr; /**<Float representation of data that should be fitted */
57 // mutable UInt_t *fIntDataPtr; /**<data that should be fitted */
59 /* mutable const Double_t *fFloatDataPtr; /\**<Float representation of data that should be fitted *\/ */
60 /* mutable const unsigned int *fIntDataPtr; /\**<data that should be fitted *\/ */
63 //double *fFloatDataPtr; /**<Float representation of data that should be fitted */
65 double *fDoubleDataPtr; /**<Float representation of data that should be fitted */
66 UInt_t *fIntDataPtr; /**<data that should be fitted */
67 // int *fIntDataPtr; /**<data that should be fitted */
70 // mutable const UInt_t *fIntDataPtr; /**<data that should be fitted */
72 double fSampleFrequency; /**<The ADC sample frequency in MHz used under data taking */
73 double fDTofGuess; /**<Initial guess for t0*/
74 double fDAmplGuess; /**<Initial guess for amplitude*/
75 double fTau; /**<The risetime in micro seconds*/
76 double fDTof; /**<Time of flight in entities of sample intervals */
77 double fDAmpl; /**<Amplitude in entities of ADC levels*/
78 int fStartIndex; /**<Starindex of the time dependent altro signal*/
80 // double unsigned fTest;
83 AliHLTPHOSUtilities *fUtilitiesPtr;
86 AliHLTPHOSRawAnalyzer(const AliHLTPHOSRawAnalyzer & );
87 AliHLTPHOSRawAnalyzer & operator = (const AliHLTPHOSRawAnalyzer &);