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

Utility class to allow the calculation of the chisq of the fit to the Dalitz plot. More...

#include <LauCalcChiSq.hh>

Public Member Functions

 LauCalcChiSq (const TString &inputFileName="chiSqInput.txt")
 Constructor. More...
 
virtual ~LauCalcChiSq ()
 Destructor. More...
 
void setVerbose (const Bool_t flag)
 Toggle verbose printout. More...
 
void run ()
 Run the calculations. More...
 

Private Member Functions

void initialiseHistos ()
 Read the config file, read the data and create histograms. More...
 
void pickBinning (const Double_t *xs, const Double_t *ys, const Int_t nEntries, std::vector< Int_t > &divisions)
 Choose the binning scheme. More...
 
void getHisto (const Double_t xMin, const Double_t xMax, const Double_t yMin, const Double_t yMax, const Double_t *xs, const Double_t *ys, const Int_t nEntries, const std::vector< Int_t > &divisions, const UInt_t iter=0)
 Create the template histogram based on the binning scheme. More...
 
void calculateChiSq ()
 Calculate the chisq from the data histograms. More...
 
void makePlots ()
 Create plots. More...
 

Private Attributes

TString inputFileName_
 Name of the config file. More...
 
TString fileName1_
 Name of the low stats data file. More...
 
TString fileName2_
 Name of the high stats data file. More...
 
TString treeName1_
 Name of the low stats data tree. More...
 
TString treeName2_
 Name of the high stats data tree. More...
 
TString xName1_
 Name of the x-coordinate branch in tree 1. More...
 
TString xName2_
 Name of the x-coordinate branch in tree 2. More...
 
TString yName1_
 Name of the y-coordinate branch in tree 1. More...
 
TString yName2_
 Name of the y-coordinate branch in tree 2. More...
 
Float_t minContent_
 The minimum bin content. More...
 
TH2Poly * theHisto_
 Template histogram constructed from the binning scheme. More...
 
TH2Poly * histo1_
 Histogram (constructed from template) filled from tree 1. More...
 
TH2Poly * histo2_
 Histogram (constructed from template) filled from tree 2. More...
 
TH2Poly * pullHisto_
 Histogram (constructed from template) filled with pulls of tree1 vs tree2. More...
 
TH2Poly * chiSqHisto_
 Histogram (constructed from template) filled with chisq of tree1 vs tree2. More...
 
TH2Poly * chiSqSignedHisto_
 Histogram (constructed from template) filled with signed chisq of tree1 vs tree2. More...
 
Float_t xMin_
 Minimum x coordinate of histograms. More...
 
Float_t xMax_
 Maximum x coordinate of histograms. More...
 
Float_t yMin_
 Minimum y coordinate of histograms. More...
 
Float_t yMax_
 Maximum y coordinate of histograms. More...
 
Int_t nParams_
 Number of free parameters in fit (used for calculating the ndof) More...
 
Float_t scaleFactor_
 Scalefactor between low and high stats data samples. More...
 
Bool_t verbose_
 Verbose flag. More...
 

Detailed Description

Utility class to allow the calculation of the chisq of the fit to the Dalitz plot.

A utility class to allow the calculation of the chisq of the fit to the Dalitz plot.

A text config file is provided that gives the datasets for the data and toy MC generated from the fit results. These can be in the traditional DP or the square DP.

A sample config file is provided. The fields are:

<name of file containing data histogram> <name of data tree> <name of the x axis variable in data> <name of the y axis variable in data>
<name of file containing toy MC histogram> <name of toy MC tree> <name of the x axis variable in toy MC> <name of the y axis variable in toy MC>
<the minimum content for any bin> <the number of free parameter in the fit> <the scalefactor by which the toy MC bin content should be multiplied> <minimum x value> <maximum x value> <minimum y value> <maximum y value>

Definition at line 50 of file LauCalcChiSq.hh.

Constructor & Destructor Documentation

LauCalcChiSq::LauCalcChiSq ( const TString &  inputFileName = "chiSqInput.txt")

Constructor.

Parameters
[in]inputFileNamename of the config file

Definition at line 71 of file LauCalcChiSq.cc.

LauCalcChiSq::~LauCalcChiSq ( )
virtual

Destructor.

Definition at line 96 of file LauCalcChiSq.cc.

Member Function Documentation

void LauCalcChiSq::calculateChiSq ( )
private

Calculate the chisq from the data histograms.

Definition at line 128 of file LauCalcChiSq.cc.

void LauCalcChiSq::getHisto ( const Double_t  xMin,
const Double_t  xMax,
const Double_t  yMin,
const Double_t  yMax,
const Double_t *  xs,
const Double_t *  ys,
const Int_t  nEntries,
const std::vector< Int_t > &  divisions,
const UInt_t  iter = 0 
)
private

Create the template histogram based on the binning scheme.

This function is called recursively to perform subdivisions

Parameters
[in]xMinthe minimum x coordinate of the region to be (sub)divided
[in]xMaxthe maximum x coordinate of the region to be (sub)divided
[in]yMinthe minimum y coordinate of the region to be (sub)divided
[in]yMaxthe maximum y coordinate of the region to be (sub)divided
[in]xsx coordinates of low statistics sample
[in]ysy coordinates of low statistics sample
[in]nEntriesnumber of entries in low statistics sample
[in]divisionsthe binning scheme
[in]iterindicates depth of the subdivisions

Definition at line 467 of file LauCalcChiSq.cc.

void LauCalcChiSq::initialiseHistos ( )
private

Read the config file, read the data and create histograms.

Definition at line 258 of file LauCalcChiSq.cc.

void LauCalcChiSq::makePlots ( )
private

Create plots.

Definition at line 168 of file LauCalcChiSq.cc.

void LauCalcChiSq::pickBinning ( const Double_t *  xs,
const Double_t *  ys,
const Int_t  nEntries,
std::vector< Int_t > &  divisions 
)
private

Choose the binning scheme.

Parameters
[in]xsx coordinates of low statistics sample
[in]ysy coordinates of low statistics sample
[in]nEntriesnumber of entries in low statistics sample
[out]divisionsresulting binning scheme

Definition at line 402 of file LauCalcChiSq.cc.

void LauCalcChiSq::run ( )

Run the calculations.

Definition at line 100 of file LauCalcChiSq.cc.

void LauCalcChiSq::setVerbose ( const Bool_t  flag)
inline

Toggle verbose printout.

Parameters
[in]flagtrue to enable verbose printout, false to disable

Definition at line 67 of file LauCalcChiSq.hh.

Member Data Documentation

TH2Poly* LauCalcChiSq::chiSqHisto_
private

Histogram (constructed from template) filled with chisq of tree1 vs tree2.

Definition at line 140 of file LauCalcChiSq.hh.

TH2Poly* LauCalcChiSq::chiSqSignedHisto_
private

Histogram (constructed from template) filled with signed chisq of tree1 vs tree2.

Definition at line 142 of file LauCalcChiSq.hh.

TString LauCalcChiSq::fileName1_
private

Name of the low stats data file.

Definition at line 111 of file LauCalcChiSq.hh.

TString LauCalcChiSq::fileName2_
private

Name of the high stats data file.

Definition at line 113 of file LauCalcChiSq.hh.

TH2Poly* LauCalcChiSq::histo1_
private

Histogram (constructed from template) filled from tree 1.

Definition at line 134 of file LauCalcChiSq.hh.

TH2Poly* LauCalcChiSq::histo2_
private

Histogram (constructed from template) filled from tree 2.

Definition at line 136 of file LauCalcChiSq.hh.

TString LauCalcChiSq::inputFileName_
private

Name of the config file.

Definition at line 108 of file LauCalcChiSq.hh.

Float_t LauCalcChiSq::minContent_
private

The minimum bin content.

Definition at line 129 of file LauCalcChiSq.hh.

Int_t LauCalcChiSq::nParams_
private

Number of free parameters in fit (used for calculating the ndof)

Definition at line 154 of file LauCalcChiSq.hh.

TH2Poly* LauCalcChiSq::pullHisto_
private

Histogram (constructed from template) filled with pulls of tree1 vs tree2.

Definition at line 138 of file LauCalcChiSq.hh.

Float_t LauCalcChiSq::scaleFactor_
private

Scalefactor between low and high stats data samples.

Definition at line 157 of file LauCalcChiSq.hh.

TH2Poly* LauCalcChiSq::theHisto_
private

Template histogram constructed from the binning scheme.

Definition at line 132 of file LauCalcChiSq.hh.

TString LauCalcChiSq::treeName1_
private

Name of the low stats data tree.

Definition at line 115 of file LauCalcChiSq.hh.

TString LauCalcChiSq::treeName2_
private

Name of the high stats data tree.

Definition at line 117 of file LauCalcChiSq.hh.

Bool_t LauCalcChiSq::verbose_
private

Verbose flag.

Definition at line 160 of file LauCalcChiSq.hh.

Float_t LauCalcChiSq::xMax_
private

Maximum x coordinate of histograms.

Definition at line 147 of file LauCalcChiSq.hh.

Float_t LauCalcChiSq::xMin_
private

Minimum x coordinate of histograms.

Definition at line 145 of file LauCalcChiSq.hh.

TString LauCalcChiSq::xName1_
private

Name of the x-coordinate branch in tree 1.

Definition at line 120 of file LauCalcChiSq.hh.

TString LauCalcChiSq::xName2_
private

Name of the x-coordinate branch in tree 2.

Definition at line 122 of file LauCalcChiSq.hh.

Float_t LauCalcChiSq::yMax_
private

Maximum y coordinate of histograms.

Definition at line 151 of file LauCalcChiSq.hh.

Float_t LauCalcChiSq::yMin_
private

Minimum y coordinate of histograms.

Definition at line 149 of file LauCalcChiSq.hh.

TString LauCalcChiSq::yName1_
private

Name of the y-coordinate branch in tree 1.

Definition at line 124 of file LauCalcChiSq.hh.

TString LauCalcChiSq::yName2_
private

Name of the y-coordinate branch in tree 2.

Definition at line 126 of file LauCalcChiSq.hh.


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