laura is hosted by Hepforge, IPPP Durham
Laura++  v3r0p1
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 
54  virtual void calcLikelihoodInfo(const LauAbscissas& abscissas);
55 
57 
59  virtual void calcNorm();
60 
62 
65  virtual void calcPDFHeight( const LauKinematics* kinematics );
66 
67  protected:
69  void doBinFluctuation();
70 
72  void checkNormalisation();
73 
75 
79  Double_t getBinHistValue(Int_t bin) const;
80 
82 
86  Double_t interpolate(Double_t x) const;
87 
89 
93  Double_t interpolateNorm(Double_t x) const;
94 
95  private:
97  Lau1DHistPdf(const Lau1DHistPdf& rhs);
98 
100  Lau1DHistPdf& operator=(const Lau1DHistPdf& rhs);
101 
103  TH1* hist_;
104 
109 
111  Int_t nBins_;
113  Double_t axisMin_;
115  Double_t axisMax_;
117  Double_t axisRange_;
118 
119  ClassDef(Lau1DHistPdf,0) // 1D histogram pdf class
120 };
121 
122 #endif
virtual void calcLikelihoodInfo(const LauAbscissas &abscissas)
Calculate the likelihood (and intermediate info) for a given abscissa.
virtual void calcNorm()
Calculate the normalisation.
Definition: Lau1DHistPdf.cc:98
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:86
Class for defining the abstract interface for PDF classes.
Definition: LauAbsPdf.hh:41
Class for calculating 3-body kinematic quantities.
Lau1DHistPdf & operator=(const Lau1DHistPdf &rhs)
Copy assignment operator (not implemented)
std::vector< Double_t > LauAbscissas
The type used for containing multiple abscissa values.
Definition: LauAbsPdf.hh:45