]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliCaloRawAnalyzerPeakFinder.h
Update on the trigger, new OCDB DCS trigger information, use ESDVZERO (Rachid)
[u/mrichter/AliRoot.git] / EMCAL / AliCaloRawAnalyzerPeakFinder.h
1 #ifndef ALICALORAWANALYZERPEAKFINDER_H
2 #define ALICALORAWANALYZERPEAKFINDER_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 perthomas.hille@yale.edu                         *
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
28 #include "AliCaloRawAnalyzer.h"
29 #include "AliCaloPeakFinderConstants.h"
30
31 using namespace PeakFinderConstants;
32
33 class AliCaloBunchInfo;
34 class AliCaloPeakFinderVectors;
35
36
37 class  AliCaloRawAnalyzerPeakFinder : public AliCaloRawAnalyzer
38 {
39  public:
40   AliCaloRawAnalyzerPeakFinder();
41   virtual ~AliCaloRawAnalyzerPeakFinder();
42   virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector, 
43                                       const UInt_t altrocfg1,  const UInt_t altrocfg2 );
44
45  private:
46   AliCaloRawAnalyzerPeakFinder( const AliCaloRawAnalyzerPeakFinder   & );
47   AliCaloRawAnalyzerPeakFinder   & operator = ( const  AliCaloRawAnalyzerPeakFinder  & );
48   void     LoadVectorsASCII();
49   void     LoadVectorsOCDB();
50   void     CopyVectors(const AliCaloPeakFinderVectors *const pfvectors );
51   void     ResetVectors();
52   void     InitOCDB(bool alien) const;
53   void     WriteRootFile() const;
54   Double_t ScanCoarse(const Double_t *const array, const int length ) const ; // Find a rough estimate of peak position and t0
55
56   Double_t fPFAmpVectorsCoarse[MAXSTART][SAMPLERANGE][100];  // Vectors for Amplitude extraction, first iteration
57   Double_t fPFTofVectorsCoarse[MAXSTART][SAMPLERANGE][100];  // Vectors for TOF extraction, first iteration
58   Double_t fPFAmpVectors[MAXSTART][SAMPLERANGE][100];        // Vectors for Amplitude extraction, second iteration
59   Double_t fPFTofVectors[MAXSTART][SAMPLERANGE][100];        // Vectors for TOF extraction, second iteration
60   Double_t fAmp; // The amplitude in entities of ADC counts
61   AliCaloPeakFinderVectors  *fPeakFinderVectors; // Collection of Peak-Fincer vectors
62   
63   bool fRunOnAlien; // Wether or not we are running on the GRID
64
65   ClassDef( AliCaloRawAnalyzerPeakFinder, 1 )
66 };
67
68
69 #endif