]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSRawAnalyzer.h
4b47657503995b8cfcc05699ccd5e26d5e4770e7
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSRawAnalyzer.h
1 //-*- Mode: C++ -*-
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                               */
6
7 /* $Id$ */
8
9
10
11 #include "AliHLTPHOSBase.h"
12 class AliHLTPHOSUtilities;
13
14 class AliHLTPHOSRawAnalyzer: public AliHLTPHOSBase
15 //class AliHLTPHOSRawAnalyzer
16 {
17  public:
18   AliHLTPHOSRawAnalyzer();
19   virtual ~AliHLTPHOSRawAnalyzer();
20   AliHLTPHOSRawAnalyzer(double *dataPtr, double fs);
21
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);
26
27
28   //  void BaselineCorrection(double *dataPtr, int N);
29   void BaselineCorrection(double *dataPtr, double baselineValue);  
30
31   int FindStartIndex(double treshold);
32   float GetTiming() const;
33   float GetEnergy() const;
34
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);
38
39   // void SetData(double *data, const int length);
40   //  void SetData(int *data, const int length);
41
42  
43   void SetSampleFreq(double freq);
44   void SetStartIndex(int startIndex);
45   void MakeInitialGuess();
46   void MakeInitialGuess(int treshold);
47   
48   virtual void SetTVector(Double_t *tVector, Int_t size);
49   virtual void SetAVector(Double_t *aVector, Int_t size);
50
51   virtual void Evaluate(Int_t start = 0, Int_t lenght = 100) = 0;
52
53
54  protected:
55   bool fDoCorrectBaselineUsingFirstFiveSamples;
56
57   //  mutable  Double_t   *fFloatDataPtr;   /**<Float representation of data that should be fitted */
58   //  mutable  UInt_t     *fIntDataPtr;     /**<data that should be fitted */
59
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 *\/ */
62
63
64   //double   *fFloatDataPtr;   /**<Float representation of data that should be fitted */
65
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 */
69
70
71   //  mutable const UInt_t     *fIntDataPtr;     /**<data that should be fitted */
72   
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*/
80
81   //  double unsigned fTest;
82
83  protected:
84   AliHLTPHOSUtilities *fUtilitiesPtr;
85
86  private:
87   AliHLTPHOSRawAnalyzer(const AliHLTPHOSRawAnalyzer & );
88   AliHLTPHOSRawAnalyzer & operator = (const AliHLTPHOSRawAnalyzer &);
89 };
90
91
92 #endif