]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliCaloRawAnalyzerKStandard.h
coverity 2
[u/mrichter/AliRoot.git] / EMCAL / AliCaloRawAnalyzerKStandard.h
CommitLineData
92d9f317 1#ifndef ALICALORAWANALYZERSTANDARD_H
2#define ALICALORAWANALYZERSTANDARD_H
3/**************************************************************************
4 * This file is property of and copyright by *
5 * the Relativistic Heavy Ion Group (RHIG), Yale University, US, 2009 *
6 * *
7 * Primary Author: Per Thomas Hille <p.t.hille@fys.uio.no> *
8 * *
9 * Contributors are mentioned in the code where appropriate. *
10 * Please report bugs to p.t.hille@fys.uio.no *
11 * *
12 * Permission to use, copy, modify and distribute this software and its *
13 * documentation strictly for non-commercial purposes is hereby granted *
14 * without fee, provided that the above copyright notice appears in all *
15 * copies and that both the copyright notice and this permission notice *
16 * appear in the supporting documentation. The authors make no claims *
17 * about the suitability of this software for any purpose. It is *
18 * provided "as is" without express or implied warranty. *
19 **************************************************************************/
20
21
22// Extraction of amplitude and peak position
23// FRom CALO raw data using
24// Chi square fit
25
26#include "AliCaloRawAnalyzer.h"
27#include "AliCaloConstants.h"
28
29using namespace ALTRO;
30using namespace EMCAL;
31
32class TF1;
33class TGraph;
34
35class AliCaloRawAnalyzerKStandard : public AliCaloRawAnalyzer
36{
37 friend class AliCaloRawAnalyzerFactory;
38
39 public:
40 //AliCaloRawAnalyzerKStandard();
41 virtual ~AliCaloRawAnalyzerKStandard();
42 virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector, const UInt_t altrocfg1, const UInt_t altrocfg2 );
43 void PrintFitResult(const TF1 *f) const;
44 static Double_t RawResponseFunction(Double_t *x, Double_t *par);
45 void FitRaw(const Int_t firstTimeBin, const Int_t lastTimeBin, Float_t & amp, Float_t & time,
46 Float_t & chi2, Bool_t & fitDone) const ;
47
48 void FitParabola(const TGraph *gSig, Float_t & amp) const ;
49
50 // shaper tau value, in time-bins, and flag for keeping tau fixed
51 Float_t GetTau() const { return fTau;};
52 void SetTau(Float_t f) { fTau = f; };
53 Bool_t GetFixTau() const { return fFixTau; };
54 void SetFixTau(Bool_t b) { fFixTau = b; };
55
56 // extra interfaces
57 TF1 * GetFit() const { return fTf1; };
58
59 private:
60 AliCaloRawAnalyzerKStandard();
61 AliCaloRawAnalyzerKStandard(const AliCaloRawAnalyzerKStandard & );
62 AliCaloRawAnalyzerKStandard & operator = (const AliCaloRawAnalyzerKStandard &);
63
64 double fXaxis[ALTROMAXSAMPLES]; //Axis if time bins, ( used by TGraph )
65 const double fkEulerSquared; //e^2 = 7.389056098930650227
66 TF1 *fTf1; // Analytical formula of the Semi Gaussian to be fitted
67
68 Float_t fTau; // shaper tau, in time bins
69 Bool_t fFixTau; // flag if tau should be fix
70
71 ClassDef(AliCaloRawAnalyzerKStandard, 2)
72
73};
74
75#endif