laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
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.
 
void setVerbose (const Bool_t flag)
 Toggle verbose printout. More...
 
void run ()
 Run the calculations.
 

Private Member Functions

void initialiseHistos ()
 Read the config file, read the data and create histograms.
 
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.
 
void makePlots ()
 Create plots.
 

Private Attributes

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

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::LauCalcChiSq ( const TString &  inputFileName = "chiSqInput.txt")

Constructor.

Parameters
[in]inputFileNamename of the config file

Definition at line 66 of file LauCalcChiSq.cc.

Member Function Documentation

◆ getHisto()

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 490 of file LauCalcChiSq.cc.

◆ pickBinning()

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 410 of file LauCalcChiSq.cc.

◆ setVerbose()

void LauCalcChiSq::setVerbose ( const Bool_t  flag)
inline

Toggle verbose printout.

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

Definition at line 66 of file LauCalcChiSq.hh.


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