laura is hosted by Hepforge, IPPP Durham
Laura++  v3r4
A maximum likelihood fitting package for performing Dalitz-plot analysis.

Class to store the input fit variables. More...

#include <LauFitDataTree.hh>

Public Member Functions

 LauFitDataTree (const TString &rootFileName, const TString &rootTreeName)
 Constructor. More...
 
virtual ~LauFitDataTree ()
 Destructor. More...
 
const TString & fileName () const
 Retrieve the file name. More...
 
const TString & treeName () const
 Retrieve the tree name. More...
 
Bool_t findBranches ()
 Find all of the branches in the tree. More...
 
void readAllData ()
 Read all events from the tree. More...
 
void readExperimentData (UInt_t iExpt)
 Read events only for the given experiment. More...
 
void appendFakePoints (const std::vector< Double_t > &xCoords, const std::vector< Double_t > &yCoords)
 Add fake events to the data. More...
 
UInt_t nBranches () const
 Obtain the number of branches in the tree. More...
 
UInt_t nTreeEvents () const
 Retrieve the number of events in the tree. More...
 
UInt_t nEvents () const
 Retrieve the number of events. More...
 
UInt_t nFakeEvents () const
 Retrieve the number of fake events. More...
 
UInt_t nTotalEvents () const
 Retrieve the total number of events. More...
 
Bool_t haveBranch (const TString &name) const
 Check if the named branch is stored. More...
 
const LauFitDatagetData (UInt_t iEvt) const
 Retrieve the data for a given event. More...
 
void disableAllBranches () const
 Disable all branches. More...
 
void enableAllBranches () const
 Enable all branches. More...
 
void enableBranch (const TString &name) const
 Enable the named branch. More...
 
void disableBranch (const TString &name) const
 Disable the named branch. More...
 

Protected Member Functions

void openFileAndTree ()
 Open the file and tree. More...
 
void loadData ()
 Load events from the tree. More...
 

Private Types

typedef std::map< TString, UInt_t > LauNameIndexMap
 The type used to map the leaf names to the vector indices. More...
 
typedef std::vector< Double_t > LauEventData
 The type used to contain the data for each event. More...
 
typedef std::vector< TLeaf * > LauLeafList
 The type used to hold the leaves. More...
 

Private Member Functions

 LauFitDataTree (const LauFitDataTree &rhs)
 Copy constructor (not implemented) More...
 
LauFitDataTreeoperator= (const LauFitDataTree &rhs)
 Copy assignment operator (not implemented) More...
 

Private Attributes

TString rootFileName_
 The name of the file containing the data. More...
 
TString rootTreeName_
 The name of the tree ocntaining the data. More...
 
TFile * rootFile_
 The file containing the data. More...
 
TTree * rootTree_
 The tree containing the data. More...
 
TEventList * eventList_
 A list of the events in the current experiment. More...
 
LauNameIndexMap leafNames_
 Stores the mapping from the leaf names to the vector indices. More...
 
LauEventData eventData_
 Stores the current event. More...
 
LauFitData eventDataOut_
 Stores the current event (for external use) More...
 
LauLeafList leaves_
 The leaf objects. More...
 
std::vector< LauEventDatatreeEvents_
 The events read from the tree. More...
 
std::vector< LauEventDatafakeEvents_
 The fake events, which are not from the tree. More...
 

Detailed Description

Class to store the input fit variables.

Events are loaded from a tree and fake events may be added manually.

Definition at line 51 of file LauFitDataTree.hh.

Member Typedef Documentation

typedef std::vector<Double_t> LauFitDataTree::LauEventData
private

The type used to contain the data for each event.

Definition at line 183 of file LauFitDataTree.hh.

typedef std::vector<TLeaf*> LauFitDataTree::LauLeafList
private

The type used to hold the leaves.

Definition at line 186 of file LauFitDataTree.hh.

typedef std::map<TString,UInt_t> LauFitDataTree::LauNameIndexMap
private

The type used to map the leaf names to the vector indices.

Definition at line 180 of file LauFitDataTree.hh.

Constructor & Destructor Documentation

LauFitDataTree::LauFitDataTree ( const TString &  rootFileName,
const TString &  rootTreeName 
)

Constructor.

Parameters
[in]rootFileNamethe name of the file containing the data
[in]rootTreeNamethe name of the tree containing the data

Definition at line 43 of file LauFitDataTree.cc.

LauFitDataTree::~LauFitDataTree ( )
virtual

Destructor.

Definition at line 55 of file LauFitDataTree.cc.

LauFitDataTree::LauFitDataTree ( const LauFitDataTree rhs)
private

Copy constructor (not implemented)

Member Function Documentation

void LauFitDataTree::appendFakePoints ( const std::vector< Double_t > &  xCoords,
const std::vector< Double_t > &  yCoords 
)

Add fake events to the data.

Used, for example, for storing the information on the histogram bin centres for calculating the DP smearing of mis-reconstructed events, see, for example, LauSimpleFitModel::splitSignalComponent and LauScfMap

Parameters
[in]xCoordsthe values of m13 squared for the fake events
[in]yCoordsthe values of m23 squared for the fake events

Definition at line 218 of file LauFitDataTree.cc.

void LauFitDataTree::disableAllBranches ( ) const

Disable all branches.

Definition at line 279 of file LauFitDataTree.cc.

void LauFitDataTree::disableBranch ( const TString &  name) const

Disable the named branch.

Parameters
[in]namethe name of the branch

Definition at line 294 of file LauFitDataTree.cc.

void LauFitDataTree::enableAllBranches ( ) const

Enable all branches.

Definition at line 284 of file LauFitDataTree.cc.

void LauFitDataTree::enableBranch ( const TString &  name) const

Enable the named branch.

Parameters
[in]namethe name of the branch

Definition at line 289 of file LauFitDataTree.cc.

const TString& LauFitDataTree::fileName ( ) const
inline

Retrieve the file name.

Returns
the file name

Definition at line 68 of file LauFitDataTree.hh.

Bool_t LauFitDataTree::findBranches ( )

Find all of the branches in the tree.

Returns
true if sucessful, otherwise returns false and prints an error message

Definition at line 92 of file LauFitDataTree.cc.

const LauFitData & LauFitDataTree::getData ( UInt_t  iEvt) const

Retrieve the data for a given event.

Parameters
[in]iEvtthe index of the event
Returns
the event data

Definition at line 348 of file LauFitDataTree.cc.

Bool_t LauFitDataTree::haveBranch ( const TString &  name) const

Check if the named branch is stored.

Parameters
[in]namethe name of the branch
Returns
true if the branch is stored, otherwise return false

Definition at line 273 of file LauFitDataTree.cc.

void LauFitDataTree::loadData ( )
protected

Load events from the tree.

If an event list is present, load only those events, otherwise load all events

Definition at line 299 of file LauFitDataTree.cc.

UInt_t LauFitDataTree::nBranches ( ) const

Obtain the number of branches in the tree.

Returns
the number of branches

Definition at line 206 of file LauFitDataTree.cc.

UInt_t LauFitDataTree::nEvents ( ) const
inline

Retrieve the number of events.

Returns
the number of events in the current experiment if one is selected, otherwise the total number of events in the tree

Definition at line 116 of file LauFitDataTree.hh.

UInt_t LauFitDataTree::nFakeEvents ( ) const
inline

Retrieve the number of fake events.

Returns
the number of fake events

Definition at line 122 of file LauFitDataTree.hh.

UInt_t LauFitDataTree::nTotalEvents ( ) const
inline

Retrieve the total number of events.

Returns
the total number of events

Definition at line 128 of file LauFitDataTree.hh.

UInt_t LauFitDataTree::nTreeEvents ( ) const
inline

Retrieve the number of events in the tree.

Returns
the number of events in the tree

Definition at line 110 of file LauFitDataTree.hh.

void LauFitDataTree::openFileAndTree ( )
protected

Open the file and tree.

Definition at line 64 of file LauFitDataTree.cc.

LauFitDataTree& LauFitDataTree::operator= ( const LauFitDataTree rhs)
private

Copy assignment operator (not implemented)

void LauFitDataTree::readAllData ( )

Read all events from the tree.

Definition at line 342 of file LauFitDataTree.cc.

void LauFitDataTree::readExperimentData ( UInt_t  iExpt)

Read events only for the given experiment.

Parameters
[in]iExptthe experiment to read

Definition at line 158 of file LauFitDataTree.cc.

const TString& LauFitDataTree::treeName ( ) const
inline

Retrieve the tree name.

Returns
the tree name

Definition at line 74 of file LauFitDataTree.hh.

Member Data Documentation

LauEventData LauFitDataTree::eventData_
mutableprivate

Stores the current event.

Definition at line 207 of file LauFitDataTree.hh.

LauFitData LauFitDataTree::eventDataOut_
mutableprivate

Stores the current event (for external use)

Definition at line 210 of file LauFitDataTree.hh.

TEventList* LauFitDataTree::eventList_
private

A list of the events in the current experiment.

Definition at line 201 of file LauFitDataTree.hh.

std::vector<LauEventData> LauFitDataTree::fakeEvents_
private

The fake events, which are not from the tree.

Definition at line 219 of file LauFitDataTree.hh.

LauNameIndexMap LauFitDataTree::leafNames_
private

Stores the mapping from the leaf names to the vector indices.

Definition at line 204 of file LauFitDataTree.hh.

LauLeafList LauFitDataTree::leaves_
private

The leaf objects.

Definition at line 213 of file LauFitDataTree.hh.

TFile* LauFitDataTree::rootFile_
private

The file containing the data.

Definition at line 195 of file LauFitDataTree.hh.

TString LauFitDataTree::rootFileName_
private

The name of the file containing the data.

Definition at line 189 of file LauFitDataTree.hh.

TTree* LauFitDataTree::rootTree_
private

The tree containing the data.

Definition at line 198 of file LauFitDataTree.hh.

TString LauFitDataTree::rootTreeName_
private

The name of the tree ocntaining the data.

Definition at line 192 of file LauFitDataTree.hh.

std::vector<LauEventData> LauFitDataTree::treeEvents_
private

The events read from the tree.

Definition at line 216 of file LauFitDataTree.hh.


The documentation for this class was generated from the following files: