MUON + CheckCompiler
[u/mrichter/AliRoot.git] / EMCAL / AliCaloRawAnalyzerPeakFinder.h
CommitLineData
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 30class AliCaloBunchInfo;
bab48e74 31class AliCaloPeakFinderVectors;
d655d7dd 32
57839add 33class AliCaloRawAnalyzerPeakFinder : public AliCaloRawAnalyzer
d655d7dd 34{
6656f267 35 friend class AliCaloRawAnalyzerFactory; // rule checker request
36
d655d7dd 37 public:
6656f267 38
39 virtual ~AliCaloRawAnalyzerPeakFinder() { ; }
40
bab48e74 41 virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector,
6656f267 42 UInt_t altrocfg1, UInt_t altrocfg2 );
d655d7dd 43
44 private:
6656f267 45
92d9f317 46 AliCaloRawAnalyzerPeakFinder();
6656f267 47 AliCaloRawAnalyzerPeakFinder( const AliCaloRawAnalyzerPeakFinder & );
48 AliCaloRawAnalyzerPeakFinder & operator = ( const AliCaloRawAnalyzerPeakFinder & );
49
fc7cd737 50 void LoadVectorsOCDB();
6656f267 51 void CopyVectors(const AliCaloPeakFinderVectors * pfvectors );
fc7cd737 52 void ResetVectors();
fc7cd737 53 void WriteRootFile() const;
6656f267 54 void PrintVectors();
55 Double_t ScanCoarse( const Double_t *array, Int_t length ) const ; // Find a rough estimate of peak position and t0
56
57 Double_t fPFAmpVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for Amplitude extraction, first iteration
58 Double_t fPFTofVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for TOF extraction, first iteration
59 Double_t fPFAmpVectors [PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for Amplitude extraction, second iteration
60 Double_t fPFTofVectors [PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for TOF extraction, second iteration
61
62 AliCaloPeakFinderVectors * fPeakFinderVectors; // Collection of Peak-Fincer vectors
63
64 bool fRunOnAlien; // Wether or not we are running on the GRID
afae9650 65 bool fIsInitialized; // init flag
6656f267 66
e37e3c84 67 ClassDef( AliCaloRawAnalyzerPeakFinder, 1 )
6656f267 68
d655d7dd 69};
70
bab48e74 71
d655d7dd 72#endif