laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauEmbeddedData.hh
Go to the documentation of this file.
1 
2 /*
3 Copyright 2007 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_EMBEDDED_DATA
36 #define LAU_EMBEDDED_DATA
37 
38 #include <set>
39 #include <vector>
40 
41 #include "LauFitDataTree.hh"
42 
43 class LauKinematics;
44 class LauIsobarDynamics;
45 
46 
48 
49  public:
51 
56  LauEmbeddedData(const TString& fileName, const TString& treeName, Bool_t allowReuseOfEvents);
57 
59  virtual ~LauEmbeddedData();
60 
62 
65  Bool_t findBranches();
66 
68 
71  UInt_t nBranches() const {return theDataTree_ ? theDataTree_->nBranches() : 0;}
72 
74 
77  UInt_t nEvents() const {return theDataTree_ ? theDataTree_->nEvents() : 0;}
78 
80 
83  UInt_t nUsedEvents() const {return usedEvents_.size();}
84 
86 
89  Bool_t haveBranch(const TString& name) const {return theDataTree_ ? theDataTree_->haveBranch(name) : kFALSE;}
90 
92 
95  void getEmbeddedEvent(LauKinematics* kinematics);
96 
98 
101  Bool_t getReweightedEvent(LauIsobarDynamics* dynamics);
102 
104 
108  Double_t getValue(const TString& name) const;
109 
111 
115  LauFitData getValues(const std::vector<TString>& names) const;
116 
118  void clearUsedList() {usedEvents_.clear();}
119 
120  protected:
122 
125  Bool_t reuseEvents() const {return reuseEvents_;}
126 
127  private:
129  LauEmbeddedData(const LauEmbeddedData& rhs);
130 
133 
139  Bool_t reuseEvents_;
141  std::set<UInt_t> usedEvents_;
142 
143  ClassDef(LauEmbeddedData, 0) // a non-persistent bare-bones complex class
144 };
145 
146 #endif
File containing declaration of LauFitDataTree class.
UInt_t nEvents() const
Retrieve the number of events.
Bool_t getReweightedEvent(LauIsobarDynamics *dynamics)
Retrieve an event from the data sample, applying an accept/reject based on the given DP model...
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 & operator=(const LauEmbeddedData &rhs)
Copy assignment operator (not implemented)
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.
Class for defining signal dynamics using the isobar 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.