laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
Lau2DAbsHistDP.hh
Go to the documentation of this file.
1 
2 /*
3 Copyright 2013 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 
39 #ifndef LAU_2DABSHIST_DP
40 #define LAU_2DABSHIST_DP
41 
42 #include "Lau2DAbsDP.hh"
43 
44 class TH2;
45 class LauDaughters;
46 class LauKinematics;
47 
48 class Lau2DAbsHistDP : public Lau2DAbsDP {
49 
50  public:
52 
57  Lau2DAbsHistDP( const LauDaughters* daughters,
58  Bool_t useUpperHalfOnly = kFALSE,
59  Bool_t squareDP = kFALSE );
60 
62  //Lau2DAbsHistDP( const Lau2DAbsHistDP& rhs );
63 
65  virtual ~Lau2DAbsHistDP();
66 
68 
73  virtual Double_t interpolateXY( Double_t x, Double_t y ) const = 0;
74 
76  /*
77  \return kTRUE if the square DP is being used, kFALSE otherwise
78  */
79  virtual Bool_t usingSquareDP() const { return squareDP_; };
80 
81  protected:
83 
86  void doBinFluctuation( TH2* hist );
87 
89 
94  void doBinFluctuation( TH2* hist, const TH2* errorHi, const TH2* errorLo );
95 
97 
105  void raiseOrLowerBins( TH2* hist, const Double_t avEff, const Double_t avEffError );
106 
108 
114  Double_t computeAverageContents( const TH2* hist ) const;
115 
117 
122  Bool_t withinDPBoundaries( Double_t x, Double_t y ) const;
123 
125 
129  void getUpperHalf( Double_t& x, Double_t& y ) const;
130 
131  private:
134 
137 
140 
142  Bool_t upperHalf_;
143 
145  Bool_t squareDP_;
146 
147  ClassDef( Lau2DAbsHistDP, 0 ) // Abstract base class for 2D DP variations based on a histogram
148 };
149 
150 #endif
Bool_t squareDP_
Boolean for using square DP variables.
Abstract base class for defining a variation across a 2D DP based on a histogram.
void doBinFluctuation(TH2 *hist)
Fluctuate the contents of each histogram bin independently, in accordance with their errors.
Bool_t withinDPBoundaries(Double_t x, Double_t y) const
Check whether the given co-ordinates are within the kinematic boundary.
Pure abstract base class for defining a variation across a 2D DP.
Definition: Lau2DAbsDP.hh:40
Double_t computeAverageContents(const TH2 *hist) const
Compute the average bin content for bins within the kinematic boundary.
virtual ~Lau2DAbsHistDP()
Copy constructor.
Lau2DAbsHistDP & operator=(const Lau2DAbsHistDP &rhs)
Copy assignment operator - not implemented.
void raiseOrLowerBins(TH2 *hist, const Double_t avEff, const Double_t avEffError)
Rescale the histogram bin contents based on the desired average efficiency and its uncertainty.
virtual Bool_t usingSquareDP() const
Determine whether the histogram is defined in the square DP.
Bool_t upperHalf_
Boolean for using the upper half of DP.
Lau2DAbsHistDP(const LauDaughters *daughters, Bool_t useUpperHalfOnly=kFALSE, Bool_t squareDP=kFALSE)
Constructor.
virtual Double_t interpolateXY(Double_t x, Double_t y) const =0
Perform the interpolation.
const LauKinematics * kinematics_
Kinematics used to check events are within DP boundary.
void getUpperHalf(Double_t &x, Double_t &y) const
If only using the upper half of the (symmetric) DP then transform into the correct half.
Lau2DAbsHistDP(const Lau2DAbsHistDP &rhs)
Copy constructor - not implemented.
Class for calculating 3-body kinematic quantities.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:47
File containing declaration of Lau2DAbsDP class.