]>
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); | |
87434909 | 37 | void SetData(const UShort_t *data, const int length); |
04751caa | 38 | // void SetData(UInt_t *data, const int length); |
b2f40e59 | 39 | |
04751caa | 40 | // void SetData(double *data, const int length); |
41 | // void SetData(int *data, const int length); | |
42 | ||
43 | ||
cbab66dd | 44 | void SetSampleFreq(double freq); |
68d9caee | 45 | void SetStartIndex(int startIndex); |
cbab66dd | 46 | void MakeInitialGuess(); |
47 | void MakeInitialGuess(int treshold); | |
dbd79fad | 48 | |
68d9caee | 49 | virtual void SetTVector(Double_t *tVector, Int_t size); |
50 | virtual void SetAVector(Double_t *aVector, Int_t size); | |
04751caa | 51 | |
d504c864 | 52 | virtual void Evaluate(Int_t start = 0, Int_t lenght = 100) = 0; |
cbab66dd | 53 | |
04751caa | 54 | |
cbab66dd | 55 | protected: |
04751caa | 56 | bool fDoCorrectBaselineUsingFirstFiveSamples; |
57 | ||
939c67e7 | 58 | // mutable Double_t *fFloatDataPtr; /**<Float representation of data that should be fitted */ |
59 | // mutable UInt_t *fIntDataPtr; /**<data that should be fitted */ | |
04751caa | 60 | |
61 | /* mutable const Double_t *fFloatDataPtr; /\**<Float representation of data that should be fitted *\/ */ | |
62 | /* mutable const unsigned int *fIntDataPtr; /\**<data that should be fitted *\/ */ | |
63 | ||
64 | ||
65 | //double *fFloatDataPtr; /**<Float representation of data that should be fitted */ | |
66 | ||
67 | double *fDoubleDataPtr; /**<Float representation of data that should be fitted */ | |
68 | UInt_t *fIntDataPtr; /**<data that should be fitted */ | |
87434909 | 69 | UShort_t *fShortDataPtr; /**<data that should be fitted */ |
04751caa | 70 | // int *fIntDataPtr; /**<data that should be fitted */ |
71 | ||
72 | ||
939c67e7 | 73 | // mutable const UInt_t *fIntDataPtr; /**<data that should be fitted */ |
74 | ||
cbab66dd | 75 | double fSampleFrequency; /**<The ADC sample frequency in MHz used under data taking */ |
76 | double fDTofGuess; /**<Initial guess for t0*/ | |
77 | double fDAmplGuess; /**<Initial guess for amplitude*/ | |
78 | double fTau; /**<The risetime in micro seconds*/ | |
79 | double fDTof; /**<Time of flight in entities of sample intervals */ | |
80 | double fDAmpl; /**<Amplitude in entities of ADC levels*/ | |
9c9d15d6 | 81 | int fStartIndex; /**<Starindex of the time dependent altro signal*/ |
82 | ||
04751caa | 83 | // double unsigned fTest; |
84 | ||
87434909 | 85 | bool fUseShortValues; |
86 | ||
2589c3a3 | 87 | protected: |
88 | AliHLTPHOSUtilities *fUtilitiesPtr; | |
89 | ||
9c9d15d6 | 90 | private: |
91 | AliHLTPHOSRawAnalyzer(const AliHLTPHOSRawAnalyzer & ); | |
92 | AliHLTPHOSRawAnalyzer & operator = (const AliHLTPHOSRawAnalyzer &); | |
cbab66dd | 93 | }; |
94 | ||
95 | ||
96 | #endif |