laura is hosted by Hepforge, IPPP Durham
Laura++  v2r2
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 
56  void setBkgndHisto(const TH2* histo, Bool_t useInterpolation,
57  Bool_t fluctuateBins, Bool_t useUpperHalfOnly,
58  Bool_t squareDP = kFALSE);
59 
61 
68  void setBkgndSpline(const TH2* histo, Bool_t fluctuateBins,
69  Bool_t useUpperHalfOnly, Bool_t squareDP);
70 
72  virtual void initialise();
73 
75 
78  virtual Bool_t generate();
79 
81 
85  virtual Double_t getUnNormValue(UInt_t iEvt);
86 
88 
91  virtual Double_t getPdfNorm() const {return pdfNorm_;}
92 
94 
98  virtual Double_t getLikelihood(UInt_t iEvt);
99 
101 
104  virtual void fillDataTree(const LauFitDataTree& fitDataTree);
105 
106  protected:
108 
113  Double_t calcHistValue(Double_t xVal, Double_t yVal);
114 
116 
119  virtual void setDataEventNo(UInt_t iEvt);
120 
121  private:
124 
126  Bool_t squareDP_;
127 
130 
132  std::vector<Double_t> bgData_;
133 
135  Double_t curEvtHistVal_;
136 
138  Double_t maxPdfHeight_;
139 
141  Double_t pdfNorm_;
142 
145 
147  mutable Bool_t lowBinWarningIssued_;
148 
149  ClassDef(LauBkgndDPModel,0) // DP background model
150 };
151 
152 #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.