laura is hosted by Hepforge, IPPP Durham
Laura++  v1r2
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauBkgndDPModel.hh
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2004 - 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
21 #ifndef LAU_BKGND_DP_MODEL
22 #define LAU_BKGND_DP_MODEL
23 
24 #include <vector>
25 #include "LauAbsBkgndDPModel.hh"
26 
27 class TH2;
28 class Lau2DAbsDPPdf;
29 class LauDaughters;
30 class LauFitDataTree;
31 class LauVetoes;
32 
33 
35 
36  public:
38 
42  LauBkgndDPModel(LauDaughters* daughters, LauVetoes* vetoes);
43 
45  virtual ~LauBkgndDPModel();
46 
48 
55  void setBkgndHisto(const TH2* histo, Bool_t useInterpolation,
56  Bool_t fluctuateBins, Bool_t useUpperHalfOnly,
57  Bool_t squareDP = kFALSE);
58 
60 
66  void setBkgndSpline(const TH2* histo, Bool_t fluctuateBins,
67  Bool_t useUpperHalfOnly, Bool_t squareDP);
68 
70  virtual void initialise();
71 
73 
76  virtual Bool_t generate();
77 
79 
83  virtual Double_t getUnNormValue(UInt_t iEvt);
84 
86 
89  virtual Double_t getPdfNorm() const {return pdfNorm_;}
90 
92 
96  virtual Double_t getLikelihood(UInt_t iEvt);
97 
99 
102  virtual void fillDataTree(const LauFitDataTree& fitDataTree);
103 
104  protected:
106 
111  Double_t calcHistValue(Double_t xVal, Double_t yVal);
112 
114 
117  virtual void setDataEventNo(UInt_t iEvt);
118 
119  private:
122 
124  Bool_t squareDP_;
125 
128 
130  std::vector<Double_t> bgData_;
131 
133  Double_t curEvtHistVal_;
134 
136  Double_t maxPdfHeight_;
137 
139  Double_t pdfNorm_;
140 
143 
145  mutable Bool_t lowBinWarningIssued_;
146 
147  ClassDef(LauBkgndDPModel,0) // DP background model
148 };
149 
150 #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.
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:33
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:33
Class to store the input fit variables.
virtual Double_t getPdfNorm() const
Get PDF normalisation constant.