]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSRawAnalyzer.h
a3916194f9903dff988b2f297e5223cccaeb7ae3
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSRawAnalyzer.h
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                               */
5
6 /* $Id$ */
7
8 #include "Rtypes.h"
9
10 class AliHLTPHOSRawAnalyzer
11 {
12  public:
13   AliHLTPHOSRawAnalyzer();
14   virtual ~AliHLTPHOSRawAnalyzer();
15   AliHLTPHOSRawAnalyzer(double *dataPtr, double fs);
16   AliHLTPHOSRawAnalyzer(const AliHLTPHOSRawAnalyzer & );
17   AliHLTPHOSRawAnalyzer & operator = (const AliHLTPHOSRawAnalyzer &)
18     {
19       return *this;
20     }
21
22   void BaselineCorrection(double *dataPtr, int N);
23   void BaselineCorrection(double *dataPtr, double baselineValue);  
24   int FindStartIndex(double treshold);
25   float GetTiming() const;
26   float GetEnergy() const;
27   void SetData(double *data);
28   void SetSampleFreq(double freq);
29   void SetStartIndex(int startIndex);
30   void MakeInitialGuess();
31   void MakeInitialGuess(int treshold);
32   virtual void SetTVector(Double_t *tVector, Int_t size);
33   virtual void SetAVector(Double_t *aVector, Int_t size);
34
35   /**
36    *Abstratct class documentation
37    */
38   virtual void Evaluate(Int_t start = 0, Int_t lenght = 100) = 0;
39   Double_t GetMaxValue(Double_t *dta, Int_t size) const;
40
41  protected:
42   Double_t   *fFloatDataPtr;   /**<Float representation of data that should be fitted */
43   double     fSampleFrequency; /**<The ADC sample frequency in MHz used under data taking */
44   double     fDTofGuess;       /**<Initial guess for t0*/
45   double     fDAmplGuess;      /**<Initial guess for amplitude*/
46   double     fTau;             /**<The risetime in micro seconds*/               
47   double     fDTof;            /**<Time of flight in entities of sample intervals */
48   double     fDAmpl;           /**<Amplitude in entities of ADC levels*/
49   int        fStartIndex;
50 };
51
52
53 #endif