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

Utility class to allow the merging of data files on a expt-by-expt basis. More...

#include <LauResultsExtractor.hh>

Public Member Functions

 LauResultsExtractor (const TString &inputFileName, const TString &outputFileName, const TString &treeName)
 Constructor. More...
 
virtual ~LauResultsExtractor ()
 Destructor. More...
 
void process (const Int_t numExpts)
 Run the calculations. More...
 

Protected Member Functions

void setupInputTree ()
 Create storage for leaves and call SetBranchAddress for each. More...
 
void setupOutputTree (TTree *tree)
 Create branches in the output tree. More...
 
void setInputTreeBranchStatus (const Bool_t status)
 Toggle branch status of input tree branches (except iExpt, fitStatus and NLL) More...
 
void clearMaps ()
 Clear all information. More...
 
void writeFile ()
 Write the output file. More...
 

Private Attributes

TString inputFileName_
 Name of text file containing list of input files. More...
 
TString outputFileName_
 Name of output ROOT file. More...
 
TString treeName_
 Name of tree in input ROOT files. More...
 
TChain * inputTree_
 Chain of inputs. More...
 
TFile * outputFile_
 Output file. More...
 
TTree * outputTree_
 Output tree. More...
 
Int_t nEntries_
 Number of entries in the input chain. More...
 
Int_t iExpt_
 Storage for experiment ID variable. More...
 
Int_t fitStatus_
 Storage for fit status variable. More...
 
Double_t NLL_
 Storage for NLL variable. More...
 
Double_t EDM_
 Storage for EDM variable. More...
 
std::map< TString, Double_t > otherVars_
 Storage for other input variables. More...
 
std::map< Int_t, std::pair
< Double_t, Int_t > > 
bestNLL_
 Best NLL and corresponding tree entries for each experiment. More...
 
std::map< Int_t, std::pair
< Double_t, Int_t > > 
worstNLL_
 Worst NLL and corresponding tree entries for each experiment. More...
 
std::map< Int_t, std::vector
< Double_t > > 
allNLLs_
 All NLL values for each experiment. More...
 
std::map< Int_t, TH1 * > nllHistos_
 Histograms of the NLL values for each experiment. More...
 

Detailed Description

Utility class to allow the merging of data files on a expt-by-expt basis.

Utility class to allow the extraction of the best fit from a series of fits to a given data sample.

The files are merged such that events for expt 0 from tree 1 will be followed by events for expt 0 from tree 2, then expt 1 from tree1, expt 1 from tree 2, etc.

A utility class to allow the extraction of the best fit from a series of fits to a given data sample.

When fitting amplitude models, the likelihood parameter space is highly complex. Hence the fitter can often wander into local minima. To mitigate this effect a data sample can be fitted many times with randomised starting values of the isobar parameters. It is then necessary to determine which of these fits gives the best solution, i.e. the minimum NLL. This class performs this task, reading in a series of fits for each data sample and writing out a single file that contains the results of the best fit for each data sample.

Definition at line 51 of file LauResultsExtractor.hh.

Constructor & Destructor Documentation

LauResultsExtractor::LauResultsExtractor ( const TString &  inputFileName,
const TString &  outputFileName,
const TString &  treeName 
)

Constructor.

Parameters
[in]inputFileNamename of text file containing the input ROOT files
[in]outputFileNamename of the file to which the best fit info should be written
[in]treeNamename of the tree to read from the input files

Definition at line 43 of file LauResultsExtractor.cc.

LauResultsExtractor::~LauResultsExtractor ( )
virtual

Destructor.

Definition at line 54 of file LauResultsExtractor.cc.

Member Function Documentation

void LauResultsExtractor::clearMaps ( )
protected

Clear all information.

Definition at line 130 of file LauResultsExtractor.cc.

void LauResultsExtractor::process ( const Int_t  numExpts)

Run the calculations.

Parameters
[in]numExptsthe number of experiments to process

Definition at line 141 of file LauResultsExtractor.cc.

void LauResultsExtractor::setInputTreeBranchStatus ( const Bool_t  status)
protected

Toggle branch status of input tree branches (except iExpt, fitStatus and NLL)

Definition at line 117 of file LauResultsExtractor.cc.

void LauResultsExtractor::setupInputTree ( )
protected

Create storage for leaves and call SetBranchAddress for each.

Definition at line 64 of file LauResultsExtractor.cc.

void LauResultsExtractor::setupOutputTree ( TTree *  tree)
protected

Create branches in the output tree.

Definition at line 97 of file LauResultsExtractor.cc.

void LauResultsExtractor::writeFile ( )
protected

Write the output file.

Definition at line 278 of file LauResultsExtractor.cc.

Member Data Documentation

std::map< Int_t, std::vector<Double_t> > LauResultsExtractor::allNLLs_
private

All NLL values for each experiment.

Definition at line 119 of file LauResultsExtractor.hh.

std::map< Int_t, std::pair<Double_t,Int_t> > LauResultsExtractor::bestNLL_
private

Best NLL and corresponding tree entries for each experiment.

Definition at line 115 of file LauResultsExtractor.hh.

Double_t LauResultsExtractor::EDM_
private

Storage for EDM variable.

Definition at line 110 of file LauResultsExtractor.hh.

Int_t LauResultsExtractor::fitStatus_
private

Storage for fit status variable.

Definition at line 106 of file LauResultsExtractor.hh.

Int_t LauResultsExtractor::iExpt_
private

Storage for experiment ID variable.

Definition at line 104 of file LauResultsExtractor.hh.

TString LauResultsExtractor::inputFileName_
private

Name of text file containing list of input files.

Definition at line 85 of file LauResultsExtractor.hh.

TChain* LauResultsExtractor::inputTree_
private

Chain of inputs.

Definition at line 92 of file LauResultsExtractor.hh.

Int_t LauResultsExtractor::nEntries_
private

Number of entries in the input chain.

Definition at line 100 of file LauResultsExtractor.hh.

Double_t LauResultsExtractor::NLL_
private

Storage for NLL variable.

Definition at line 108 of file LauResultsExtractor.hh.

std::map< Int_t, TH1* > LauResultsExtractor::nllHistos_
private

Histograms of the NLL values for each experiment.

Definition at line 122 of file LauResultsExtractor.hh.

std::map<TString,Double_t> LauResultsExtractor::otherVars_
private

Storage for other input variables.

Definition at line 112 of file LauResultsExtractor.hh.

TFile* LauResultsExtractor::outputFile_
private

Output file.

Definition at line 95 of file LauResultsExtractor.hh.

TString LauResultsExtractor::outputFileName_
private

Name of output ROOT file.

Definition at line 87 of file LauResultsExtractor.hh.

TTree* LauResultsExtractor::outputTree_
private

Output tree.

Definition at line 97 of file LauResultsExtractor.hh.

TString LauResultsExtractor::treeName_
private

Name of tree in input ROOT files.

Definition at line 89 of file LauResultsExtractor.hh.

std::map< Int_t, std::pair<Double_t,Int_t> > LauResultsExtractor::worstNLL_
private

Worst NLL and corresponding tree entries for each experiment.

Definition at line 117 of file LauResultsExtractor.hh.


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