laura is hosted by Hepforge, IPPP Durham
Laura++  v1r0
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 
43  Lau1DHistPdf(const TString& theVarName, const TH1* hist, Double_t minAbscissa, Double_t maxAbscissa,
44  Bool_t useInterpolation = kTRUE, Bool_t fluctuateBins = kFALSE);
45 
47  virtual ~Lau1DHistPdf();
48 
50  Lau1DHistPdf(const Lau1DHistPdf& other);
51 
53 
56  virtual void calcLikelihoodInfo(const LauAbscissas& abscissas);
57 
59 
61 
65  virtual void checkPositiveness() {};
66 
68  virtual void calcNorm();
69 
71 
74  virtual void calcPDFHeight( const LauKinematics* kinematics );
75 
76  protected:
78  void doBinFluctuation();
79 
81  void checkNormalisation();
82 
84 
88  Double_t getBinHistValue(Int_t bin) const;
89 
91 
95  Double_t interpolate(Double_t x) const;
96 
98 
102  Double_t interpolateNorm(Double_t x) const;
103 
104  private:
106  TH1* hist_;
107 
112 
114  Int_t nBins_;
116  Double_t axisMin_;
118  Double_t axisMax_;
120  Double_t axisRange_;
121 
122  ClassDef(Lau1DHistPdf,0) // 1D histogram pdf class
123 };
124 
125 #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:40
Class for calculating 3-body kinematic quantities.
virtual void checkPositiveness()
Check that PDF is positive.
Definition: Lau1DHistPdf.hh:65
std::vector< Double_t > LauAbscissas
The type used for containing multiple abscissa values.
Definition: LauAbsPdf.hh:44