laura is hosted by Hepforge, IPPP Durham
Laura++  v2r1p1
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauEmbeddedData.hh
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2007 - 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_EMBEDDED_DATA
22 #define LAU_EMBEDDED_DATA
23 
24 #include <set>
25 #include <vector>
26 
27 #include "LauFitDataTree.hh"
28 
29 class LauKinematics;
30 class LauAbsDPDynamics;
31 
32 
34 
35  public:
37 
42  LauEmbeddedData(const TString& fileName, const TString& treeName, Bool_t allowReuseOfEvents);
43 
45  virtual ~LauEmbeddedData();
46 
48 
51  Bool_t findBranches();
52 
54 
57  UInt_t nBranches() const {return theDataTree_ ? theDataTree_->nBranches() : 0;}
58 
60 
63  UInt_t nEvents() const {return theDataTree_ ? theDataTree_->nEvents() : 0;}
64 
66 
69  UInt_t nUsedEvents() const {return usedEvents_.size();}
70 
72 
75  Bool_t haveBranch(const TString& name) const {return theDataTree_ ? theDataTree_->haveBranch(name) : kFALSE;}
76 
78 
81  void getEmbeddedEvent(LauKinematics* kinematics);
82 
84 
87  Bool_t getReweightedEvent(LauAbsDPDynamics* dynamics);
88 
90 
94  Double_t getValue(const TString& name) const;
95 
97 
101  LauFitData getValues(const std::vector<TString>& names) const;
102 
104  void clearUsedList() {usedEvents_.clear();}
105 
106  protected:
108 
111  Bool_t reuseEvents() const {return reuseEvents_;}
112 
113  private:
119  Bool_t reuseEvents_;
121  std::set<UInt_t> usedEvents_;
122 
123  ClassDef(LauEmbeddedData, 0) // a non-persistent bare-bones complex class
124 };
125 
126 #endif
Class for defining the abstract interface for signal Dalitz plot dynamics.
File containing declaration of LauFitDataTree class.
UInt_t nEvents() const
Retrieve the number of events.
Bool_t reuseEvents() const
Boolean determining whether events should be reused.
void clearUsedList()
Clear the list of used events.
LauFitDataTree * theDataTree_
The structure containing the data.
std::map< TString, Double_t > LauFitData
Type for holding event data.
std::set< UInt_t > usedEvents_
Used events.
UInt_t nBranches() const
Obtain the number of branches in the tree.
Double_t getValue(const TString &name) const
Get the value of a specified branch.
Bool_t haveBranch(const TString &name) const
Boolean to determine whether branch exists.
LauEmbeddedData(const TString &fileName, const TString &treeName, Bool_t allowReuseOfEvents)
Constructor.
Bool_t reuseEvents_
Flag whether events can be reused.
LauFitData getValues(const std::vector< TString > &names) const
Get values of specified branches.
Class to store the data for embedding in toy experiments.
void getEmbeddedEvent(LauKinematics *kinematics)
Retrieve an event from the data sample.
UInt_t nUsedEvents() const
Retrieve the number of events that have already been sampled.
virtual ~LauEmbeddedData()
Destructor.
Bool_t getReweightedEvent(LauAbsDPDynamics *dynamics)
Retrieve an event from the data sample, applying an accept/reject based on the given DP model...
Bool_t haveBranch(const TString &name) const
Check if the named branch is stored.
LauFitData theData_
The data for the currently retrieved event.
Class for calculating 3-body kinematic quantities.
UInt_t nEvents() const
Retrieve the number of events.
UInt_t nBranches() const
Retrieve the number of branches.
Bool_t findBranches()
Find and read the branches in data tree.
Class to store the input fit variables.