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 *
8 * Primary Author: Per Thomas Hille <perthomas.hille@yale.edu> *
10 * Contributors are mentioned in the code where appropriate. *
11 * Please report bugs to perthomas.hille@yale.edu *
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 **************************************************************************/
22 // The Peak-Finder algorithm
23 // The amplitude is extracted as a
24 // weighted sum of the samples using the
25 // best possible weights.
27 #include "AliCaloRawAnalyzer.h"
28 #include "AliCaloConstants.h"
30 class AliCaloBunchInfo;
31 class AliCaloPeakFinderVectors;
33 class AliCaloRawAnalyzerPeakFinder : public AliCaloRawAnalyzer
35 friend class AliCaloRawAnalyzerFactory;
37 // AliCaloRawAnalyzerPeakFinder( );
38 virtual ~AliCaloRawAnalyzerPeakFinder();
39 virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector,
40 const UInt_t altrocfg1, const UInt_t altrocfg2 );
43 AliCaloRawAnalyzerPeakFinder();
44 AliCaloRawAnalyzerPeakFinder( const AliCaloRawAnalyzerPeakFinder & );
45 AliCaloRawAnalyzerPeakFinder & operator = ( const AliCaloRawAnalyzerPeakFinder & );
46 void LoadVectorsASCII();
47 void LoadVectorsOCDB();
48 void CopyVectors(const AliCaloPeakFinderVectors *const pfvectors );
50 void InitOCDB(bool alien) const;
51 void WriteRootFile() const;
53 Double_t ScanCoarse(const Double_t *const array, const int length ) const ; // Find a rough estimate of peak position and t0
54 Double_t fPFAmpVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for Amplitude extraction, first iteration
55 Double_t fPFTofVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for TOF extraction, first iteration
56 Double_t fPFAmpVectors[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for Amplitude extraction, second iteration
57 Double_t fPFTofVectors[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for TOF extraction, second iteration
59 //Double_t fAmp; // The amplitude in entities of ADC counts
61 AliCaloPeakFinderVectors *fPeakFinderVectors; // Collection of Peak-Fincer vectors
62 bool fRunOnAlien; // Wether or not we are running on the GRID
64 ClassDef( AliCaloRawAnalyzerPeakFinder, 1 )