laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
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 <vector>
39 #include "LauAbsBkgndDPModel.hh"
40 
41 class TH2;
42 class Lau2DAbsDPPdf;
43 class LauDaughters;
44 class LauFitDataTree;
45 class LauVetoes;
46 
47 
49 
50  public:
52 
56  LauBkgndDPModel(LauDaughters* daughters, LauVetoes* vetoes);
57 
59  virtual ~LauBkgndDPModel();
60 
62 
70  void setBkgndHisto(const TH2* histo, Bool_t useInterpolation,
71  Bool_t fluctuateBins, Bool_t useUpperHalfOnly,
72  Bool_t squareDP = kFALSE);
73 
75 
82  void setBkgndSpline(const TH2* histo, Bool_t fluctuateBins,
83  Bool_t useUpperHalfOnly, Bool_t squareDP);
84 
86  virtual void initialise();
87 
89 
92  virtual Bool_t generate();
93 
95 
99  virtual Double_t getUnNormValue(UInt_t iEvt);
100 
102 
105  virtual Double_t getPdfNorm() const {return pdfNorm_;}
106 
108 
112  virtual Double_t getLikelihood(UInt_t iEvt);
113 
115 
118  virtual void fillDataTree(const LauFitDataTree& fitDataTree);
119 
120  protected:
122 
127  Double_t calcHistValue(Double_t xVal, Double_t yVal);
128 
130 
133  virtual void setDataEventNo(UInt_t iEvt);
134 
135  private:
137  LauBkgndDPModel(const LauBkgndDPModel& rhs);
138 
141 
144 
146  Bool_t squareDP_;
147 
150 
152  std::vector<Double_t> bgData_;
153 
155  Double_t curEvtHistVal_;
156 
158  Double_t maxPdfHeight_;
159 
161  Double_t pdfNorm_;
162 
165 
167  mutable Bool_t lowBinWarningIssued_;
168 
169  ClassDef(LauBkgndDPModel,0) // DP background model
170 };
171 
172 #endif
LauBkgndDPModel(LauDaughters *daughters, LauVetoes *vetoes)
Constructor.
The abstract interface for a background Dalitz plot model.
virtual void initialise()
Initialise the model.
Bool_t lowBinWarningIssued_
Flag to track whether a warning has been issued for bin values less than zero.
Double_t maxPdfHeight_
Maximum height of PDF.
Lau2DAbsDPPdf * bgHistDPPdf_
PDF of Dalitz plot background, from a 2D histogram.
LauBkgndDPModel & operator=(const LauBkgndDPModel &rhs)
Copy assignment operator (not implemented)
void setBkgndSpline(const TH2 *histo, Bool_t fluctuateBins, Bool_t useUpperHalfOnly, Bool_t squareDP)
Set the background histogram and generate a spline.
std::vector< Double_t > bgData_
Cached histogram values for each event.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:47
Pure abstract base class for defining a variation across a 2D DP.
virtual Bool_t generate()
Generate a toy MC event from the model.
Bool_t symmetricalDP_
Flags whether the DP is symmetrical or not.
Bool_t doneGenWarning_
Boolean to indicate if the warning that there is no histogram has already been issued.
void setBkgndHisto(const TH2 *histo, Bool_t useInterpolation, Bool_t fluctuateBins, Bool_t useUpperHalfOnly, Bool_t squareDP=kFALSE)
Set background histogram.
virtual Double_t getLikelihood(UInt_t iEvt)
Get likelihood for a given event.
Double_t calcHistValue(Double_t xVal, Double_t yVal)
Calulate histogram value at a given point.
Double_t curEvtHistVal_
Histogram value for the current event.
Bool_t squareDP_
Flags whether or not to work in square DP coordinates.
Class for defining a histogram-based background Dalitz plot model.
virtual Double_t getUnNormValue(UInt_t iEvt)
Get unnormalised likelihood for a given event.
virtual ~LauBkgndDPModel()
Destructor.
virtual void fillDataTree(const LauFitDataTree &fitDataTree)
Cache the input data and (if appropriate) the per-event likelihood values.
virtual void setDataEventNo(UInt_t iEvt)
Set data event number.
Double_t pdfNorm_
Normalisation of PDF.
File containing declaration of LauAbsBkgndDPModel class.
Class for defining vetoes within the Dalitz plot.
Definition: LauVetoes.hh:50
Class to store the input fit variables.
virtual Double_t getPdfNorm() const
Get PDF normalisation constant.