]>
Commit | Line | Data |
---|---|---|
1 | // -*- mode: c++ -*- | |
2 | #ifndef ALICALORAWANALYZERPEAKFINDER_H | |
3 | #define ALICALORAWANALYZERPEAKFINDER_H | |
4 | /************************************************************************** | |
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> * | |
9 | * * | |
10 | * Contributors are mentioned in the code where appropriate. * | |
11 | * Please report bugs to perthomas.hille@yale.edu * | |
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 | ||
27 | #include "AliCaloRawAnalyzer.h" | |
28 | #include "AliCaloConstants.h" | |
29 | ||
30 | class AliCaloBunchInfo; | |
31 | class AliCaloPeakFinderVectors; | |
32 | ||
33 | class AliCaloRawAnalyzerPeakFinder : public AliCaloRawAnalyzer | |
34 | { | |
35 | friend class AliCaloRawAnalyzerFactory; // shutting up the rule checker | |
36 | public: | |
37 | virtual ~AliCaloRawAnalyzerPeakFinder(); | |
38 | virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector, | |
39 | const UInt_t altrocfg1, const UInt_t altrocfg2 ); | |
40 | ||
41 | private: | |
42 | AliCaloRawAnalyzerPeakFinder(); | |
43 | AliCaloRawAnalyzerPeakFinder( const AliCaloRawAnalyzerPeakFinder & ); | |
44 | AliCaloRawAnalyzerPeakFinder & operator = ( const AliCaloRawAnalyzerPeakFinder & ); | |
45 | void LoadVectorsOCDB(); | |
46 | void CopyVectors(const AliCaloPeakFinderVectors *const pfvectors ); | |
47 | void ResetVectors(); | |
48 | void WriteRootFile() const; | |
49 | void PrintVectors(); | |
50 | Double_t ScanCoarse(const Double_t *const array, const int length ) const ; // Find a rough estimate of peak position and t0 | |
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 | |
55 | AliCaloPeakFinderVectors *fPeakFinderVectors; // Collection of Peak-Fincer vectors | |
56 | bool fRunOnAlien; // Wether or not we are running on the GRID | |
57 | bool fIsInitialized; // init flag | |
58 | ClassDef( AliCaloRawAnalyzerPeakFinder, 1 ) | |
59 | }; | |
60 | ||
61 | ||
62 | #endif |