]>
Commit | Line | Data |
---|---|---|
1b41ab20 | 1 | //-*- Mode: C++ -*- |
ee7849e6 | 2 | #ifndef ALIHLTPHOSRAWANALYZER_H |
3 | #define ALIHLTPHOSRAWANALYZER_H | |
cbab66dd | 4 | /* Copyright(c) 1998-2004, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
8 | ||
68d9caee | 9 | |
04751caa | 10 | |
43dd7c5e | 11 | #include "AliHLTPHOSBase.h" |
2589c3a3 | 12 | class AliHLTPHOSUtilities; |
43dd7c5e | 13 | |
14 | class AliHLTPHOSRawAnalyzer: public AliHLTPHOSBase | |
9c9d15d6 | 15 | //class AliHLTPHOSRawAnalyzer |
cbab66dd | 16 | { |
17 | public: | |
2f475e8c | 18 | AliHLTPHOSRawAnalyzer(); |
19 | virtual ~AliHLTPHOSRawAnalyzer(); | |
20 | AliHLTPHOSRawAnalyzer(double *dataPtr, double fs); | |
cbab66dd | 21 | |
04751caa | 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); | |
cbab66dd | 29 | void BaselineCorrection(double *dataPtr, double baselineValue); |
04751caa | 30 | |
cbab66dd | 31 | int FindStartIndex(double treshold); |
d504c864 | 32 | float GetTiming() const; |
33 | float GetEnergy() const; | |
b2f40e59 | 34 | |
04751caa | 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); | |
b2f40e59 | 38 | |
04751caa | 39 | // void SetData(double *data, const int length); |
40 | // void SetData(int *data, const int length); | |
41 | ||
42 | ||
cbab66dd | 43 | void SetSampleFreq(double freq); |
68d9caee | 44 | void SetStartIndex(int startIndex); |
cbab66dd | 45 | void MakeInitialGuess(); |
46 | void MakeInitialGuess(int treshold); | |
dbd79fad | 47 | |
68d9caee | 48 | virtual void SetTVector(Double_t *tVector, Int_t size); |
49 | virtual void SetAVector(Double_t *aVector, Int_t size); | |
04751caa | 50 | |
d504c864 | 51 | virtual void Evaluate(Int_t start = 0, Int_t lenght = 100) = 0; |
cbab66dd | 52 | |
04751caa | 53 | |
cbab66dd | 54 | protected: |
04751caa | 55 | bool fDoCorrectBaselineUsingFirstFiveSamples; |
56 | ||
939c67e7 | 57 | // mutable Double_t *fFloatDataPtr; /**<Float representation of data that should be fitted */ |
58 | // mutable UInt_t *fIntDataPtr; /**<data that should be fitted */ | |
04751caa | 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 | ||
939c67e7 | 71 | // mutable const UInt_t *fIntDataPtr; /**<data that should be fitted */ |
72 | ||
cbab66dd | 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*/ | |
9c9d15d6 | 79 | int fStartIndex; /**<Starindex of the time dependent altro signal*/ |
80 | ||
04751caa | 81 | // double unsigned fTest; |
82 | ||
2589c3a3 | 83 | protected: |
84 | AliHLTPHOSUtilities *fUtilitiesPtr; | |
85 | ||
9c9d15d6 | 86 | private: |
87 | AliHLTPHOSRawAnalyzer(const AliHLTPHOSRawAnalyzer & ); | |
88 | AliHLTPHOSRawAnalyzer & operator = (const AliHLTPHOSRawAnalyzer &); | |
cbab66dd | 89 | }; |
90 | ||
91 | ||
92 | #endif |