laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
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, Bool_t useUpperHalfOnly = kFALSE, Bool_t squareDP = kFALSE);
58 
60  //Lau2DAbsHistDP( const Lau2DAbsHistDP& rhs );
61 
63  virtual ~Lau2DAbsHistDP();
64 
66 
71  virtual Double_t interpolateXY(Double_t x, Double_t y) const=0;
72 
74  /*
75  \return kTRUE if the square DP is being used, kFALSE otherwise
76  */
77  virtual Bool_t usingSquareDP() const { return squareDP_; };
78 
79  protected:
81 
84  void doBinFluctuation(TH2* hist);
85 
87 
92  void doBinFluctuation(TH2* hist, const TH2* errorHi, const TH2* errorLo);
93 
95 
102  void raiseOrLowerBins(TH2* hist, const Double_t avEff, const Double_t avEffError);
103 
105 
110  Double_t computeAverageContents(const TH2* hist) const;
111 
113 
118  Bool_t withinDPBoundaries(Double_t x, Double_t y) const;
119 
121 
125  void getUpperHalf(Double_t& x, Double_t& y) const;
126 
127  private:
129  Lau2DAbsHistDP( const Lau2DAbsHistDP& rhs );
130 
133 
136 
138  Bool_t upperHalf_;
139 
141  Bool_t squareDP_;
142 
143  ClassDef(Lau2DAbsHistDP,0) // Abstract base class for 2D DP variations based on a histogram
144 };
145 
146 #endif
Pure abstract base class for defining a variation across a 2D DP.
Definition: Lau2DAbsDP.hh:41
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...
void doBinFluctuation(TH2 *hist)
Fluctuate the contents of each histogram bin independently, in accordance with their errors...
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:47
virtual Double_t interpolateXY(Double_t x, Double_t y) const =0
Perform the interpolation.
Lau2DAbsHistDP(const LauDaughters *daughters, Bool_t useUpperHalfOnly=kFALSE, Bool_t squareDP=kFALSE)
Constructor.
Abstract base class for defining a variation across a 2D DP based on a histogram. ...
Bool_t withinDPBoundaries(Double_t x, Double_t y) const
Check whether the given co-ordinates are within the kinematic boundary.
virtual ~Lau2DAbsHistDP()
Copy constructor.
virtual Bool_t usingSquareDP() const
Determine whether the histogram is defined in the square DP.
Bool_t squareDP_
Boolean for using square DP variables.
const LauKinematics * kinematics_
Kinematics used to check events are within DP boundary.
Lau2DAbsHistDP & operator=(const Lau2DAbsHistDP &rhs)
Copy assignment operator - not implemented.
Bool_t upperHalf_
Boolean for using the upper half of DP.
File containing declaration of Lau2DAbsDP class.
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...
Class for calculating 3-body kinematic quantities.
Double_t computeAverageContents(const TH2 *hist) const
Compute the average bin content for bins within the kinematic boundary.