laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauBkgndDPModel.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 
35 #ifndef LAU_BKGND_DP_MODEL
36 #define LAU_BKGND_DP_MODEL
37 
38 #include "LauAbsBkgndDPModel.hh"
39 
40 #include <vector>
41 
42 class TH2;
43 class Lau2DAbsDPPdf;
44 class LauDaughters;
45 class LauFitDataTree;
46 class LauVetoes;
47 
49 
50  public:
52 
56  LauBkgndDPModel( LauDaughters* daughters, LauVetoes* vetoes );
57 
59  virtual ~LauBkgndDPModel();
60 
62 
71  void setBkgndHisto( const TH2* histo,
72  Bool_t useInterpolation,
73  Bool_t fluctuateBins,
74  Bool_t useUpperHalfOnly,
75  Bool_t squareDP = kFALSE );
76 
78 
86  void setBkgndSpline( const TH2* histo,
87  Bool_t fluctuateBins,
88  Bool_t useUpperHalfOnly,
89  Bool_t squareDP );
90 
92  virtual void initialise();
93 
95 
98  virtual Bool_t generate();
99 
101 
106  virtual Double_t getLikelihood( const Double_t m13Sq, const Double_t m23Sq );
107 
109 
114  virtual Double_t getUnNormValue( const Double_t m13Sq, const Double_t m23Sq );
115 
117 
121  virtual Double_t getLikelihood( UInt_t iEvt );
122 
124 
128  virtual Double_t getUnNormValue( UInt_t iEvt );
129 
131 
134  virtual Double_t getPdfNorm() const { return pdfNorm_; }
135 
137 
140  virtual void fillDataTree( const LauFitDataTree& fitDataTree );
141 
142  protected:
144 
149  Double_t calcHistValue( Double_t xVal, Double_t yVal );
150 
152 
155  virtual void setDataEventNo( UInt_t iEvt );
156 
157  private:
160 
163 
166 
168  Bool_t squareDP_;
169 
172 
174  std::vector<Double_t> bgData_;
175 
177  Double_t curEvtHistVal_;
178 
180  Double_t maxPdfHeight_;
181 
183  Double_t pdfNorm_;
184 
187 
189  mutable Bool_t lowBinWarningIssued_;
190 
191  ClassDef( LauBkgndDPModel, 0 ) // DP background model
192 };
193 
194 #endif
Double_t pdfNorm_
Normalisation of PDF.
Bool_t squareDP_
Flags whether or not to work in square DP coordinates.
virtual Double_t getUnNormValue(const Double_t m13Sq, const Double_t m23Sq)
Get unnormalised likelihood for a given DP position.
virtual ~LauBkgndDPModel()
Destructor.
The abstract interface for a background Dalitz plot model.
void setBkgndSpline(const TH2 *histo, Bool_t fluctuateBins, Bool_t useUpperHalfOnly, Bool_t squareDP)
Set the background histogram and generate a spline.
Double_t calcHistValue(Double_t xVal, Double_t yVal)
Calulate histogram value at a given point.
LauBkgndDPModel(LauDaughters *daughters, LauVetoes *vetoes)
Constructor.
LauBkgndDPModel & operator=(const LauBkgndDPModel &rhs)
Copy assignment operator (not implemented)
void setBkgndHisto(const TH2 *histo, Bool_t useInterpolation, Bool_t fluctuateBins, Bool_t useUpperHalfOnly, Bool_t squareDP=kFALSE)
Set background histogram.
Class to store the input fit variables.
Bool_t lowBinWarningIssued_
Flag to track whether a warning has been issued for bin values less than zero.
Lau2DAbsDPPdf * bgHistDPPdf_
PDF of Dalitz plot background, from a 2D histogram.
Pure abstract base class for defining a variation across a 2D DP.
Bool_t doneGenWarning_
Boolean to indicate if the warning that there is no histogram has already been issued.
virtual void fillDataTree(const LauFitDataTree &fitDataTree)
Cache the input data and (if appropriate) the per-event likelihood values.
virtual Double_t getLikelihood(const Double_t m13Sq, const Double_t m23Sq)
Get likelihood for a given DP position.
LauBkgndDPModel(const LauBkgndDPModel &rhs)
Copy constructor (not implemented)
virtual Double_t getPdfNorm() const
Get PDF normalisation constant.
File containing declaration of LauAbsBkgndDPModel class.
virtual void setDataEventNo(UInt_t iEvt)
Set data event number.
virtual Bool_t generate()
Generate a toy MC event from the model.
Class for defining vetoes within the Dalitz plot.
Definition: LauVetoes.hh:49
Double_t maxPdfHeight_
Maximum height of PDF.
std::vector< Double_t > bgData_
Cached histogram values for each event.
Double_t curEvtHistVal_
Histogram value for the current event.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:47
Class for defining a histogram-based background Dalitz plot model.
virtual void initialise()
Initialise the model.
Bool_t symmetricalDP_
Flags whether the DP is symmetrical or not.