]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliCaloRawAnalyzerPeakFinder.h
add L1 plots hS1 and hS2 to logbook image also
[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{
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 LoadVectorsASCII();
46 void LoadVectorsOCDB();
47 void CopyVectors(const AliCaloPeakFinderVectors *const pfvectors );
48 void ResetVectors();
49 void InitOCDB(bool alien) const;
50 void WriteRootFile() const;
168c7b3c 51 void PrintVectors();
bab48e74 52 Double_t ScanCoarse(const Double_t *const array, const int length ) const ; // Find a rough estimate of peak position and t0
168c7b3c 53 Double_t fPFAmpVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for Amplitude extraction, first iteration
54 Double_t fPFTofVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for TOF extraction, first iteration
55 Double_t fPFAmpVectors[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for Amplitude extraction, second iteration
56 Double_t fPFTofVectors[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for TOF extraction, second iteration
bab48e74 57 AliCaloPeakFinderVectors *fPeakFinderVectors; // Collection of Peak-Fincer vectors
bab48e74 58 bool fRunOnAlien; // Wether or not we are running on the GRID
168c7b3c 59 bool fIsInitialized;
e37e3c84 60 ClassDef( AliCaloRawAnalyzerPeakFinder, 1 )
d655d7dd 61};
62
bab48e74 63
d655d7dd 64#endif