laura is hosted by Hepforge, IPPP Durham
Laura++  v2r1
A maximum likelihood fitting package for performing Dalitz-plot analysis.
Lau1DHistPdf.hh
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2006 - 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
24 #ifndef LAU_1DHIST_PDF
25 #define LAU_1DHIST_PDF
26 
27 #include "LauAbsPdf.hh"
28 
29 class TH1;
30 
31 class Lau1DHistPdf : public LauAbsPdf {
32 
33  public:
35 
44  Lau1DHistPdf(const TString& theVarName, const TH1* hist, Double_t minAbscissa, Double_t maxAbscissa,
45  Bool_t useInterpolation = kTRUE, Bool_t fluctuateBins = kFALSE);
46 
48  virtual ~Lau1DHistPdf();
49 
51  Lau1DHistPdf(const Lau1DHistPdf& other);
52 
54 
57  virtual void calcLikelihoodInfo(const LauAbscissas& abscissas);
58 
60 
62  virtual void calcNorm();
63 
65 
68  virtual void calcPDFHeight( const LauKinematics* kinematics );
69 
70  protected:
72  void doBinFluctuation();
73 
75  void checkNormalisation();
76 
78 
82  Double_t getBinHistValue(Int_t bin) const;
83 
85 
89  Double_t interpolate(Double_t x) const;
90 
92 
96  Double_t interpolateNorm(Double_t x) const;
97 
98  private:
100  TH1* hist_;
101 
106 
108  Int_t nBins_;
110  Double_t axisMin_;
112  Double_t axisMax_;
114  Double_t axisRange_;
115 
116  ClassDef(Lau1DHistPdf,0) // 1D histogram pdf class
117 };
118 
119 #endif
virtual void calcLikelihoodInfo(const LauAbscissas &abscissas)
Calculate the likelihood (and intermediate info) for a given abscissa.
virtual void calcNorm()
Calculate the normalisation.
TH1 * hist_
The underlying histogram.
Bool_t fluctuateBins_
Control boolean for performing the fluctuation of the histogram bin contents.
void checkNormalisation()
Check the normalisation calculation.
Bool_t useInterpolation_
Control boolean for using the linear interpolation.
Double_t axisMax_
The histogram axis maximum.
Class for defining a 1D histogram PDF.
Definition: Lau1DHistPdf.hh:31
void doBinFluctuation()
Fluctuate the histogram bin contents in accorance with their errors.
Double_t getBinHistValue(Int_t bin) const
Get the bin content from the histogram.
virtual ~Lau1DHistPdf()
Destructor.
Definition: Lau1DHistPdf.cc:80
Int_t nBins_
The number of bins in the histogram.
Lau1DHistPdf(const TString &theVarName, const TH1 *hist, Double_t minAbscissa, Double_t maxAbscissa, Bool_t useInterpolation=kTRUE, Bool_t fluctuateBins=kFALSE)
Constructor.
Definition: Lau1DHistPdf.cc:32
Double_t interpolateNorm(Double_t x) const
Perform the interpolation and divide by the normalisation.
File containing declaration of LauAbsPdf class.
Double_t axisMin_
The histogram axis minimum.
virtual void calcLikelihoodInfo(const LauAbscissas &abscissas)=0
Calculate the likelihood (and all associated information) given value(s) of the abscissa(s) ...
Double_t axisRange_
The histogram axis range.
Double_t interpolate(Double_t x) const
Perform the interpolation (unnormalised)
virtual void calcPDFHeight(const LauKinematics *kinematics)
Calculate the PDF height.
Definition: Lau1DHistPdf.cc:95
Class for defining the abstract interface for PDF classes.
Definition: LauAbsPdf.hh:41
Class for calculating 3-body kinematic quantities.
std::vector< Double_t > LauAbscissas
The type used for containing multiple abscissa values.
Definition: LauAbsPdf.hh:45