laura is hosted by Hepforge, IPPP Durham
Laura++  v1r0
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 Lau2DHistDPPdf;
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  virtual void initialise();
61 
63 
66  virtual Bool_t generate();
67 
69 
73  virtual Double_t getUnNormValue(UInt_t iEvt);
74 
76 
79  virtual Double_t getPdfNorm() const {return pdfNorm_;}
80 
82 
86  virtual Double_t getLikelihood(UInt_t iEvt);
87 
89 
92  virtual void fillDataTree(const LauFitDataTree& fitDataTree);
93 
94  protected:
96 
101  Double_t calcHistValue(Double_t xVal, Double_t yVal);
102 
104 
107  virtual void setDataEventNo(UInt_t iEvt);
108 
109  private:
112 
114  Bool_t squareDP_;
115 
118 
120  std::vector<Double_t> bgData_;
121 
123  Double_t curEvtHistVal_;
124 
126  Double_t maxPdfHeight_;
127 
129  Double_t pdfNorm_;
130 
133 
134  ClassDef(LauBkgndDPModel,0) // DP background model
135 };
136 
137 #endif
LauBkgndDPModel(LauDaughters *daughters, LauVetoes *vetoes)
Constructor.
The abstract interface for a background Dalitz plot model.
virtual void initialise()
Initialise the model.
Double_t maxPdfHeight_
Maximum height of PDF.
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
virtual Bool_t generate()
Generate a toy MC event from the model.
Class for defining a 2D DP histogram PDF.
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.
Lau2DHistDPPdf * bgHistDPPdf_
PDF of Dalitz plot background, from a 2D histogram.
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.