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