laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
Lau2DHistDPPdf.hh
Go to the documentation of this file.
1 
2 /*
3 Copyright 2004 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_2DHIST_DP_PDF
39 #define LAU_2DHIST_DP_PDF
40 
41 #include "Lau2DAbsHistDPPdf.hh"
42 
43 class TH2;
44 class LauKinematics;
45 class LauVetoes;
46 
48 
49  public:
51 
62  Lau2DHistDPPdf( const TH2* hist,
63  LauKinematics* kinematics,
64  const LauVetoes* vetoes,
65  Bool_t useInterpolation = kTRUE,
66  Bool_t fluctuateBins = kFALSE,
67  Bool_t useUpperHalfOnly = kFALSE,
68  Bool_t squareDP = kFALSE );
69 
71  virtual ~Lau2DHistDPPdf();
72 
74 
77  Double_t getHistNorm() const { return norm_; }
78 
80 
85  Double_t interpolateXY( Double_t x, Double_t y ) const;
86 
88 
93  Double_t interpolateXYNorm( Double_t x, Double_t y ) const;
94 
95  protected:
97 
102  Double_t getBinHistValue( Int_t xBinNo, Int_t yBinNo ) const;
103 
105  void calcHistNorm();
106 
108  void checkNormalisation();
109 
110  private:
113 
116 
118  TH2* hist_;
119 
121  Double_t minX_;
123  Double_t maxX_;
125  Double_t minY_;
127  Double_t maxY_;
129  Double_t rangeX_;
131  Double_t rangeY_;
132 
134  Double_t binXWidth_;
136  Double_t binYWidth_;
138  Double_t invBinXWidth_;
140  Double_t invBinYWidth_;
141 
143  Double_t maxHeight_;
144 
146  Int_t nBinsX_;
148  Int_t nBinsY_;
149 
151  Double_t norm_;
152 
155 
156  ClassDef( Lau2DHistDPPdf, 0 ) // 2D Histogram utility class for DP analyses
157 };
158 
159 #endif
Lau2DHistDPPdf(const TH2 *hist, LauKinematics *kinematics, const LauVetoes *vetoes, Bool_t useInterpolation=kTRUE, Bool_t fluctuateBins=kFALSE, Bool_t useUpperHalfOnly=kFALSE, Bool_t squareDP=kFALSE)
Constructor.
Int_t nBinsX_
The number of bins on the x-axis of the histogram.
Abstract base class for defining a variation across a 2D DP based on a histogram.
Double_t interpolateXYNorm(Double_t x, Double_t y) const
Perform the interpolation and divide by the normalisation.
Lau2DHistDPPdf(const Lau2DHistDPPdf &rhs)
Copy constructor - not implemented.
Double_t rangeY_
The histogram y-axis range.
Int_t nBinsY_
The number of bins on the y-axis of the histogram.
Double_t maxHeight_
The maximum height of 2D histogram.
void checkNormalisation()
Check the normalisation calculation.
Lau2DHistDPPdf & operator=(const Lau2DHistDPPdf &rhs)
Copy assignment operator - not implemented.
void calcHistNorm()
Calculate the PDF normalisation.
Double_t maxY_
The histogram y-axis maximum.
TH2 * hist_
The underlying histogram.
Double_t interpolateXY(Double_t x, Double_t y) const
Perform the interpolation (unnormalised)
Double_t maxX_
The histogram x-axis maximum.
Double_t binXWidth_
The histogram x-axis bin width.
virtual ~Lau2DHistDPPdf()
Destructor.
Double_t rangeX_
The histogram x-axis range.
Double_t binYWidth_
The histogram y-axis bin width.
Double_t minX_
The histogram x-axis minimum.
Double_t norm_
The histogram normalisation.
Double_t getBinHistValue(Int_t xBinNo, Int_t yBinNo) const
Get the bin content from the histogram.
Class for defining vetoes within the Dalitz plot.
Definition: LauVetoes.hh:49
Class for calculating 3-body kinematic quantities.
Class for defining a 2D DP histogram PDF.
Double_t invBinXWidth_
The histogram x-axis inverse bin width.
Double_t invBinYWidth_
The histogram y-axis inverse bin width.
Bool_t useInterpolation_
Control boolean for using the linear interpolation.
Double_t minY_
The histogram y-axis minimum.
Double_t getHistNorm() const
Retrieve PDF normalisation.
File containing declaration of Lau2DAbsHistDPPdf class.