]>
Commit | Line | Data |
---|---|---|
57839add | 1 | #ifndef ALICALORAWANALYZERPEAKFINDER_H |
2 | #define ALICALORAWANALYZERPEAKFINDER_H | |
d655d7dd | 3 | |
e37e3c84 | 4 | |
d655d7dd | 5 | /************************************************************************** |
e37e3c84 | 6 | * This file is property of and copyright by * |
7 | * the Relativistic Heavy Ion Group (RHIG), Yale University, US, 2009 * | |
8 | * * | |
9 | * Primary Author: Per Thomas Hille <perthomas.hille@yale.edu> * | |
d655d7dd | 10 | * * |
d655d7dd | 11 | * Contributors are mentioned in the code where appropriate. * |
bab48e74 | 12 | * Please report bugs to perthomas.hille@yale.edu * |
d655d7dd | 13 | * * |
14 | * Permission to use, copy, modify and distribute this software and its * | |
15 | * documentation strictly for non-commercial purposes is hereby granted * | |
16 | * without fee, provided that the above copyright notice appears in all * | |
17 | * copies and that both the copyright notice and this permission notice * | |
18 | * appear in the supporting documentation. The authors make no claims * | |
19 | * about the suitability of this software for any purpose. It is * | |
20 | * provided "as is" without express or implied warranty. * | |
21 | **************************************************************************/ | |
22 | ||
23 | // The Peak-Finder algorithm | |
24 | // The amplitude is extracted as a | |
25 | // weighted sum of the samples using the | |
26 | // best possible weights. | |
27 | ||
57839add | 28 | #include "AliCaloRawAnalyzer.h" |
bab48e74 | 29 | #include "AliCaloPeakFinderConstants.h" |
d655d7dd | 30 | |
bab48e74 | 31 | using namespace PeakFinderConstants; |
d655d7dd | 32 | |
57839add | 33 | class AliCaloBunchInfo; |
bab48e74 | 34 | class AliCaloPeakFinderVectors; |
d655d7dd | 35 | |
e37e3c84 | 36 | |
57839add | 37 | class AliCaloRawAnalyzerPeakFinder : public AliCaloRawAnalyzer |
d655d7dd | 38 | { |
39 | public: | |
57839add | 40 | AliCaloRawAnalyzerPeakFinder(); |
41 | virtual ~AliCaloRawAnalyzerPeakFinder(); | |
bab48e74 | 42 | virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector, |
43 | const UInt_t altrocfg1, const UInt_t altrocfg2 ); | |
d655d7dd | 44 | |
45 | private: | |
e37e3c84 | 46 | AliCaloRawAnalyzerPeakFinder( const AliCaloRawAnalyzerPeakFinder & ); |
47 | AliCaloRawAnalyzerPeakFinder & operator = ( const AliCaloRawAnalyzerPeakFinder & ); | |
fc7cd737 | 48 | void LoadVectorsASCII(); |
49 | void LoadVectorsOCDB(); | |
50 | void CopyVectors(const AliCaloPeakFinderVectors *const pfvectors ); | |
51 | void ResetVectors(); | |
52 | void InitOCDB(bool alien) const; | |
53 | void WriteRootFile() const; | |
bab48e74 | 54 | Double_t ScanCoarse(const Double_t *const array, const int length ) const ; // Find a rough estimate of peak position and t0 |
55 | ||
56 | Double_t fPFAmpVectorsCoarse[MAXSTART][SAMPLERANGE][100]; // Vectors for Amplitude extraction, first iteration | |
57 | Double_t fPFTofVectorsCoarse[MAXSTART][SAMPLERANGE][100]; // Vectors for TOF extraction, first iteration | |
58 | Double_t fPFAmpVectors[MAXSTART][SAMPLERANGE][100]; // Vectors for Amplitude extraction, second iteration | |
59 | Double_t fPFTofVectors[MAXSTART][SAMPLERANGE][100]; // Vectors for TOF extraction, second iteration | |
fc7cd737 | 60 | Double_t fAmp; // The amplitude in entities of ADC counts |
bab48e74 | 61 | AliCaloPeakFinderVectors *fPeakFinderVectors; // Collection of Peak-Fincer vectors |
48a2e3eb | 62 | |
bab48e74 | 63 | bool fRunOnAlien; // Wether or not we are running on the GRID |
d655d7dd | 64 | |
e37e3c84 | 65 | ClassDef( AliCaloRawAnalyzerPeakFinder, 1 ) |
d655d7dd | 66 | }; |
67 | ||
bab48e74 | 68 | |
d655d7dd | 69 | #endif |