]>
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 | ||
9f050726 | 9 | #include "Rtypes.h" |
68d9caee | 10 | |
04751caa | 11 | |
9f050726 | 12 | //#include "AliHLTPHOSBase.h" |
2589c3a3 | 13 | class AliHLTPHOSUtilities; |
43dd7c5e | 14 | |
9f050726 | 15 | //class AliHLTPHOSRawAnalyzer: public AliHLTPHOSBase |
16 | class AliHLTPHOSRawAnalyzer | |
9c9d15d6 | 17 | //class AliHLTPHOSRawAnalyzer |
cbab66dd | 18 | { |
19 | public: | |
2f475e8c | 20 | AliHLTPHOSRawAnalyzer(); |
21 | virtual ~AliHLTPHOSRawAnalyzer(); | |
22 | AliHLTPHOSRawAnalyzer(double *dataPtr, double fs); | |
cbab66dd | 23 | |
04751caa | 24 | void SetCorrectBaselineUsingFirstFiveSamples(); |
25 | void CorrectBaselineUsingFirstFiveSamples(UInt_t *data, const int length); | |
26 | // void CorrectBaselineUsingFirstFiveSamples(int *data, int length); | |
27 | //void CorrectBaselineUsingFirstFiveSamples(double *data, int length); | |
28 | ||
29 | ||
30 | // void BaselineCorrection(double *dataPtr, int N); | |
be2953a1 | 31 | void BaselineCorrection(double *dataPtr, double baselineValue); |
04751caa | 32 | |
cbab66dd | 33 | int FindStartIndex(double treshold); |
d504c864 | 34 | float GetTiming() const; |
35 | float GetEnergy() const; | |
b2f40e59 | 36 | |
04751caa | 37 | // void SetData(const double *data); |
38 | void SetData(const UInt_t *data, const int length); | |
87434909 | 39 | void SetData(const UShort_t *data, const int length); |
04751caa | 40 | // void SetData(UInt_t *data, const int length); |
b2f40e59 | 41 | |
04751caa | 42 | // void SetData(double *data, const int length); |
43 | // void SetData(int *data, const int length); | |
44 | ||
45 | ||
cbab66dd | 46 | void SetSampleFreq(double freq); |
68d9caee | 47 | void SetStartIndex(int startIndex); |
cbab66dd | 48 | void MakeInitialGuess(); |
49 | void MakeInitialGuess(int treshold); | |
dbd79fad | 50 | |
68d9caee | 51 | virtual void SetTVector(Double_t *tVector, Int_t size); |
52 | virtual void SetAVector(Double_t *aVector, Int_t size); | |
04751caa | 53 | |
d504c864 | 54 | virtual void Evaluate(Int_t start = 0, Int_t lenght = 100) = 0; |
cbab66dd | 55 | |
04751caa | 56 | |
cbab66dd | 57 | protected: |
04751caa | 58 | bool fDoCorrectBaselineUsingFirstFiveSamples; |
59 | ||
939c67e7 | 60 | // mutable Double_t *fFloatDataPtr; /**<Float representation of data that should be fitted */ |
61 | // mutable UInt_t *fIntDataPtr; /**<data that should be fitted */ | |
04751caa | 62 | |
63 | /* mutable const Double_t *fFloatDataPtr; /\**<Float representation of data that should be fitted *\/ */ | |
64 | /* mutable const unsigned int *fIntDataPtr; /\**<data that should be fitted *\/ */ | |
65 | ||
66 | ||
67 | //double *fFloatDataPtr; /**<Float representation of data that should be fitted */ | |
68 | ||
69 | double *fDoubleDataPtr; /**<Float representation of data that should be fitted */ | |
70 | UInt_t *fIntDataPtr; /**<data that should be fitted */ | |
87434909 | 71 | UShort_t *fShortDataPtr; /**<data that should be fitted */ |
04751caa | 72 | // int *fIntDataPtr; /**<data that should be fitted */ |
73 | ||
74 | ||
939c67e7 | 75 | // mutable const UInt_t *fIntDataPtr; /**<data that should be fitted */ |
76 | ||
cbab66dd | 77 | double fSampleFrequency; /**<The ADC sample frequency in MHz used under data taking */ |
78 | double fDTofGuess; /**<Initial guess for t0*/ | |
79 | double fDAmplGuess; /**<Initial guess for amplitude*/ | |
80 | double fTau; /**<The risetime in micro seconds*/ | |
81 | double fDTof; /**<Time of flight in entities of sample intervals */ | |
82 | double fDAmpl; /**<Amplitude in entities of ADC levels*/ | |
9c9d15d6 | 83 | int fStartIndex; /**<Starindex of the time dependent altro signal*/ |
84 | ||
04751caa | 85 | // double unsigned fTest; |
86 | ||
87434909 | 87 | bool fUseShortValues; |
88 | ||
2589c3a3 | 89 | protected: |
90 | AliHLTPHOSUtilities *fUtilitiesPtr; | |
91 | ||
9c9d15d6 | 92 | private: |
93 | AliHLTPHOSRawAnalyzer(const AliHLTPHOSRawAnalyzer & ); | |
94 | AliHLTPHOSRawAnalyzer & operator = (const AliHLTPHOSRawAnalyzer &); | |
cbab66dd | 95 | }; |
96 | ||
97 | ||
98 | #endif |