]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliCaloRawAnalyzerPeakFinder.h
Update
[u/mrichter/AliRoot.git] / EMCAL / AliCaloRawAnalyzerPeakFinder.h
CommitLineData
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 31using namespace PeakFinderConstants;
d655d7dd 32
57839add 33class AliCaloBunchInfo;
bab48e74 34class AliCaloPeakFinderVectors;
d655d7dd 35
e37e3c84 36
57839add 37class 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 & );
bab48e74 48 void LoadVectorsASCII();
49 void LoadVectorsOCDB();
50 void CopyVectors(const AliCaloPeakFinderVectors *const pfvectors );
51 void ResetVectors();
52 void InitOCDB(bool alien) const;
53 // void PrintVectors() const;
54 void WriteRootFile() const;
55 Double_t ScanCoarse(const Double_t *const array, const int length ) const ; // Find a rough estimate of peak position and t0
56
57 Double_t fPFAmpVectorsCoarse[MAXSTART][SAMPLERANGE][100]; // Vectors for Amplitude extraction, first iteration
58 Double_t fPFTofVectorsCoarse[MAXSTART][SAMPLERANGE][100]; // Vectors for TOF extraction, first iteration
59 Double_t fPFAmpVectors[MAXSTART][SAMPLERANGE][100]; // Vectors for Amplitude extraction, second iteration
60 Double_t fPFTofVectors[MAXSTART][SAMPLERANGE][100]; // Vectors for TOF extraction, second iteration
61 Double_t fAmp;
62 AliCaloPeakFinderVectors *fPeakFinderVectors; // Collection of Peak-Fincer vectors
48a2e3eb 63
bab48e74 64 bool fRunOnAlien; // Wether or not we are running on the GRID
d655d7dd 65
e37e3c84 66 ClassDef( AliCaloRawAnalyzerPeakFinder, 1 )
d655d7dd 67};
68
bab48e74 69
d655d7dd 70#endif