laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
Lau1DHistPdf.hh
Go to the documentation of this file.
1 
2 /*
3 Copyright 2006 University of Warwick
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 */
17 
18 /*
19 Laura++ package authors:
20 John Back
21 Paul Harrison
22 Thomas Latham
23 */
24 
38 #ifndef LAU_1DHIST_PDF
39 #define LAU_1DHIST_PDF
40 
41 #include "LauAbsPdf.hh"
42 
43 class TH1;
44 
45 class Lau1DHistPdf : public LauAbsPdf {
46 
47  public:
49 
58  Lau1DHistPdf( const TString& theVarName,
59  const TH1* hist,
60  Double_t minAbscissa,
61  Double_t maxAbscissa,
62  Bool_t useInterpolation = kTRUE,
63  Bool_t fluctuateBins = kFALSE );
64 
66  virtual ~Lau1DHistPdf();
67 
69 
72  virtual void calcLikelihoodInfo( const LauAbscissas& abscissas );
73 
75 
77  virtual void calcNorm();
78 
80 
83  virtual void calcPDFHeight( const LauKinematics* kinematics );
84 
85  protected:
87  void doBinFluctuation();
88 
90  void checkNormalisation();
91 
93 
97  Double_t getBinHistValue( Int_t bin ) const;
98 
100 
104  Double_t interpolate( Double_t x ) const;
105 
107 
111  Double_t interpolateNorm( Double_t x ) const;
112 
113  private:
115  Lau1DHistPdf( const Lau1DHistPdf& rhs );
116 
119 
121  TH1* hist_;
122 
127 
129  Int_t nBins_;
131  Double_t axisMin_;
133  Double_t axisMax_;
135  Double_t axisRange_;
136 
137  ClassDef( Lau1DHistPdf, 0 ) // 1D histogram pdf class
138 };
139 
140 #endif
Class for defining a 1D histogram PDF.
Definition: Lau1DHistPdf.hh:45
File containing declaration of LauAbsPdf class.
Double_t interpolateNorm(Double_t x) const
Perform the interpolation and divide by the normalisation.
Double_t interpolate(Double_t x) const
Perform the interpolation (unnormalised)
void doBinFluctuation()
Fluctuate the histogram bin contents in accorance with their errors.
std::vector< Double_t > LauAbscissas
The type used for containing multiple abscissa values.
Definition: LauAbsPdf.hh:58
virtual void calcPDFHeight(const LauKinematics *kinematics)
Calculate the PDF height.
Double_t axisRange_
The histogram axis range.
Bool_t useInterpolation_
Control boolean for using the linear interpolation.
Double_t axisMin_
The histogram axis minimum.
virtual void calcLikelihoodInfo(const LauAbscissas &abscissas)
Calculate the likelihood (and intermediate info) for a given abscissa.
Lau1DHistPdf & operator=(const Lau1DHistPdf &rhs)
Copy assignment operator (not implemented)
virtual ~Lau1DHistPdf()
Destructor.
Definition: Lau1DHistPdf.cc:98
Int_t nBins_
The number of bins in the histogram.
virtual void calcNorm()
Calculate the normalisation.
Bool_t fluctuateBins_
Control boolean for performing the fluctuation of the histogram bin contents.
virtual void calcLikelihoodInfo(const LauAbscissas &abscissas)=0
Calculate the likelihood (and all associated information) given value(s) of the abscissa(s)
Class for defining the abstract interface for PDF classes.
Definition: LauAbsPdf.hh:54
TH1 * hist_
The underlying histogram.
void checkNormalisation()
Check the normalisation calculation.
Double_t axisMax_
The histogram axis maximum.
Lau1DHistPdf(const Lau1DHistPdf &rhs)
Copy constructor (not implemented)
Double_t getBinHistValue(Int_t bin) const
Get the bin content from the histogram.
Class for calculating 3-body kinematic quantities.
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:44