]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliCaloRawAnalyzerPeakFinderV2.h
fix for bug #66858] (PWG1 train problem for LHC10c data)
[u/mrichter/AliRoot.git] / EMCAL / AliCaloRawAnalyzerPeakFinderV2.h
CommitLineData
48a2e3eb 1#ifndef ALICALORAWANALYZERPEAKFINDERV2_H
2#define ALICALORAWANALYZERPEAKFINDERV2_H
3
4
5/**************************************************************************
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> *
10 * *
11 * Contributors are mentioned in the code where appropriate. *
12 * Please report bugs to p.t.hille@fys.uio.no *
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
24// The Peak-Finder algorithm
25// The amplitude is extracted as a
26// weighted sum of the samples using the
27// best possible weights.
28
29
30#include "AliCaloRawAnalyzer.h"
31
32#define MAXSTART 3
33#define SAMPLERANGE 15
34#define SHIF 0.5
35
36class AliCaloBunchInfo;
37
38
39class AliCaloRawAnalyzerPeakFinderV2 : public AliCaloRawAnalyzer
40{
41 public:
42 AliCaloRawAnalyzerPeakFinderV2();
43 virtual ~AliCaloRawAnalyzerPeakFinderV2();
44 virtual AliCaloFitResults Evaluate( const vector<AliCaloBunchInfo> &bunchvector, const UInt_t altrocfg1, const UInt_t altrocfg2 );
45
46 private:
47 AliCaloRawAnalyzerPeakFinderV2( const AliCaloRawAnalyzerPeakFinderV2 & );
48 AliCaloRawAnalyzerPeakFinderV2 & operator = ( const AliCaloRawAnalyzerPeakFinderV2 & );
49
50 void LoadVectors();
51 Double_t ScanCoarse(const Double_t *const array, const int length ) const ; // Find a rough estimate of peak position and t0
52
53
54 Double_t PolTof(const Double_t x) const;
55 Double_t PolValue(const Double_t x) const;
56 Double_t PolDerivative(const Double_t x) const;
57
58
59
60 double *fPFAmpVectorsCoarse[MAXSTART][SAMPLERANGE]; // Vectors for Amplitude extraction, first iteration
61 double *fPFTofVectorsCoarse[MAXSTART][SAMPLERANGE]; // Vectors for TOF extraction, first iteration
62
63 double *fPFAmpVectors[MAXSTART][SAMPLERANGE]; // Vectors for Amplitude extraction, second iteration
64 double *fPFTofVectors[MAXSTART][SAMPLERANGE]; // Vectors for TOF extraction, second iteration
65
66 // double fTof;
67 // double fAmp;
68
69 double fAmpA[3]; // The amplitude of the signal (eveluate 3 times using 3 differtnt phase shifts of the input samples )
70 // double fAmp2;
71 // double fAmp3;
72
73 ClassDef( AliCaloRawAnalyzerPeakFinderV2, 1 )
74
75};
76
77#endif