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

Abstract interface to the fitting and toy MC model. More...

#include <LauAbsFitModel.hh>

Inheritance diagram for LauAbsFitModel:
LauSimFitSlave LauFitObject LauCPFitModel LauSimpleFitModel

Public Member Functions

 LauAbsFitModel ()
 Constructor. More...
 
virtual ~LauAbsFitModel ()
 Destructor. More...
 
Bool_t useDP () const
 Is the Dalitz plot term in the likelihood. More...
 
void useDP (Bool_t usingDP)
 Switch on/off the Dalitz plot term in the Likelihood (allows fits to other quantities, e.g. B mass) More...
 
Bool_t doSFit () const
 Return the flag to store the status of using an sFit or not. More...
 
void doSFit (const TString &sWeightBranchName, Double_t scaleFactor=1.0)
 Do an sFit (use sWeights to isolate signal decays rather than using background histograms) More...
 
Bool_t doEMLFit () const
 Determine whether an extended maximum likelihood fit it being performed. More...
 
void doEMLFit (Bool_t emlFit)
 Choice to perform an extended maximum likelihood fit. More...
 
Bool_t doPoissonSmearing () const
 Determine whether Poisson smearing is enabled for the toy MC generation. More...
 
void doPoissonSmearing (Bool_t poissonSmear)
 Turn Poisson smearing (for the toy MC generation) on or off. More...
 
Bool_t enableEmbedding () const
 Determine whether embedding of events is enabled in the generation. More...
 
void enableEmbedding (Bool_t enable)
 Turn on or off embedding of events in the generation. More...
 
Bool_t writeLatexTable () const
 Determine whether writing out of the latex table is enabled. More...
 
void writeLatexTable (Bool_t writeTable)
 Turn on or off the writing out of the latex table. More...
 
Bool_t saveFilePDF () const
 save files containing graphs of the resonance's PDFs More...
 
void saveFilePDF (Bool_t savePDF)
 Turn on or off the save of files containing graphs of the resonance's PDFs. More...
 
void writeSPlotData (const TString &fileName, const TString &treeName, Bool_t storeDPEfficiency, const TString &verbosity="q")
 Set up the sPlot ntuple. More...
 
Bool_t writeSPlotData () const
 Determine whether the sPlot data is to be written out. More...
 
Bool_t storeDPEff () const
 Determine whether the efficiency information should be stored in the sPlot ntuple. More...
 
Bool_t useRandomInitFitPars () const
 Determine whether the initial values of the fit parameters, in particular the isobar coefficient parameters, are to be randomised. More...
 
void useRandomInitFitPars (Bool_t boolean)
 Randomise the initial values of the fit parameters, in particular the isobar coefficient parameters. More...
 
virtual void setBkgndClassNames (const std::vector< TString > &names)
 Setup the background class names. More...
 
UInt_t nBkgndClasses () const
 Returns the number of background classes. More...
 
virtual void setNSigEvents (LauParameter *nSigEvents)=0
 Set the number of signal events. More...
 
virtual void setNBkgndEvents (LauAbsRValue *nBkgndEvents)=0
 Set the number of background events. More...
 
virtual void setAmpCoeffSet (LauAbsCoeffSet *coeffSet)=0
 Set the DP amplitude coefficients. More...
 
void compareFitData (UInt_t toyMCScale=10, const TString &mcFileName="fitToyMC.root", const TString &tableFileName="fitToyMCTable.tex", Bool_t poissonSmearing=kTRUE)
 Specify that a toy MC sample should be created for a successful fit to an experiment. More...
 
void run (const TString &applicationCode, const TString &dataFileName, const TString &dataTreeName, const TString &histFileName, const TString &tableFileName="")
 Start the toy generation / fitting. More...
 
virtual void setParsFromMinuit (Double_t *par, Int_t npar)
 This function sets the parameter values from Minuit. More...
 
virtual Double_t getTotNegLogLikelihood ()
 Calculates the total negative log-likelihood. More...
 
void setParametersFromFile (const TString &fileName, const TString &treeName, const Bool_t fix)
 Set model parameters from a file. More...
 
void setParametersFromMap (const std::map< TString, Double_t > &parameters, const Bool_t fix)
 Set model parameters from a given std::map. More...
 
void setNamedParameters (const TString &fileName, const TString &treeName, const std::set< TString > &parameters, const Bool_t fix)
 Set named model parameters from a file. More...
 
void setParametersFileFallback (const TString &fileName, const TString &treeName, const std::map< TString, Double_t > &parameters, const Bool_t fix)
 Set named model parameters from a given std::map, with fallback to those from a file. More...
 
- Public Member Functions inherited from LauSimFitSlave
 LauSimFitSlave ()
 Constructor. More...
 
virtual ~LauSimFitSlave ()
 Destructor. More...
 
UInt_t nSlaves () const
 Obtain the number of slaves. More...
 
UInt_t slaveId () const
 Obtain the ID number of this slave. More...
 
virtual void runSlave (const TString &dataFileName, const TString &dataTreeName, const TString &histFileName, const TString &tableFileName="", const TString &addressMaster="localhost", const UInt_t portMaster=9090)
 Start the slave process for simultaneous fitting. More...
 
- Public Member Functions inherited from LauFitObject
virtual ~LauFitObject ()
 Destructor. More...
 
void useAsymmFitErrors (Bool_t useAsymmErrors)
 Turn on or off the computation of asymmetric errors (e.g. MINOS routine in Minuit) More...
 
Bool_t useAsymmFitErrors () const
 Report whether or not calculation of asymmetric errors is enabled. More...
 
void twoStageFit (Bool_t doTwoStageFit)
 Turn on or off the two stage fit. More...
 
Bool_t twoStageFit () const
 Report whether the two-stage fit is enabled. More...
 
virtual void withinAsymErrorCalc (const Bool_t inAsymErrCalc)
 Mark that the fit is calculating asymmetric errors. More...
 
Bool_t withinAsymErrorCalc () const
 Query whether the fit is calculating the asymmetric errors. More...
 
void setNExpts (UInt_t nExperiments, UInt_t firstExperiment=0)
 Set the number of experiments and the first experiment. More...
 
UInt_t eventsPerExpt () const
 Obtain the total number of events in the current experiment. More...
 
UInt_t nExpt () const
 Obtain the number of experiments. More...
 
UInt_t firstExpt () const
 Obtain the number of the first experiment. More...
 
UInt_t iExpt () const
 Obtain the number of the current experiment. More...
 
virtual void addConstraint (const TString &formula, const std::vector< TString > &pars, const Double_t mean, const Double_t width)
 Store constraint information for fit parameters. More...
 

Protected Types

typedef std::vector< LauAbsPdf * > LauPdfList
 List of Pdfs. More...
 
typedef std::vector
< LauParameter * > 
LauParameterPList
 List of parameter pointers. More...
 
typedef std::vector
< LauAbsRValue * > 
LauAbsRValuePList
 List of parameter pointers. More...
 
typedef std::set< LauParameter * > LauParameterPSet
 Set of parameter pointers. More...
 
typedef std::vector< LauParameterLauParameterList
 List of parameters. More...
 
typedef std::map< UInt_t, TString > LauBkgndClassMap
 A type to store background classes. More...
 

Protected Member Functions

void clearFitParVectors ()
 Clear the vectors containing fit parameters. More...
 
void clearExtraVarVectors ()
 Clear the vectors containing extra ntuple variables. More...
 
virtual void weightEvents (const TString &dataFileName, const TString &dataTreeName)=0
 Weighting - allows e.g. MC events to be weighted by the DP model. More...
 
virtual void generate (const TString &dataFileName, const TString &dataTreeName, const TString &histFileName, const TString &tableFileNameBase)
 Generate toy MC. More...
 
virtual Bool_t genExpt ()=0
 The method that actually generates the toy MC events for the given experiment. More...
 
void fit (const TString &dataFileName, const TString &dataTreeName, const TString &histFileName, const TString &tableFileNameBase)
 Perform the total fit. More...
 
void fitExpt ()
 Routine to perform the actual fit for a given experiment. More...
 
Bool_t runMinimisation ()
 Routine to perform the minimisation. More...
 
void createFitToyMC (const TString &mcFileName, const TString &tableFileName)
 Create a toy MC sample from the fitted parameters. More...
 
virtual UInt_t readExperimentData ()
 Read in the data for the current experiment. More...
 
virtual Bool_t verifyFitData (const TString &dataFileName, const TString &dataTreeName)
 Open the input file and verify that all required variables are present. More...
 
virtual void cacheInputFitVars ()=0
 Cache the input data values to calculate the likelihood during the fit. More...
 
virtual void cacheInputSWeights ()
 Cache the value of the sWeights to be used in the sFit. More...
 
virtual void initialise ()=0
 Initialise the fit par vectors. More...
 
virtual void recalculateNormalisation ()=0
 Recalculate normalisation the signal DP model(s) More...
 
virtual void initialiseDPModels ()=0
 Initialise the DP models. More...
 
virtual void updateCoeffs ()=0
 
virtual void propagateParUpdates ()=0
 This function (specific to each model) calculates anything that depends on the fit parameter values. More...
 
Double_t getLogLikelihood (UInt_t iStart, UInt_t iEnd)
 Calculate the sum of the log-likelihood over the specified events. More...
 
Double_t getLogLikelihoodPenalty ()
 Calculate the penalty terms to the log likelihood from Gaussian constraints. More...
 
virtual Double_t getTotEvtLikelihood (UInt_t iEvt)=0
 Calculates the likelihood for a given event. More...
 
virtual Double_t getEventSum () const =0
 Returns the sum of the expected events over all hypotheses; used in the EML fit scenario. More...
 
virtual void printEventInfo (UInt_t iEvt) const
 Prints the values of all the fit variables for the specified event - useful for diagnostics. More...
 
virtual void printVarsInfo () const
 Same as printEventInfo, but printing out the values of the variables in the fit. More...
 
virtual void checkInitFitParams ()=0
 Update initial fit parameters if required. More...
 
virtual void setupResultsOutputs (const TString &histFileName, const TString &tableFileName)
 Setup saving of fit results to ntuple/LaTeX table etc. More...
 
virtual void prepareInitialParArray (TObjArray &array)
 Package the initial fit parameters for transmission to the master. More...
 
virtual void finaliseExperiment (const LauAbsFitter::FitStatus &fitStat, const TObjArray *parsFromMaster, const TMatrixD *covMat, TObjArray &parsToMaster)
 Perform all finalisation actions. More...
 
virtual void finaliseFitResults (const TString &tableFileName)=0
 Write the results of the fit into the ntuple. More...
 
virtual void savePDFPlots (const TString &label)=0
 Save the pdf Plots for all the resonances of experiment number fitExp. More...
 
virtual void savePDFPlotsWave (const TString &label, const Int_t &spin)=0
 Save the pdf Plots for the sum of ressonances correspondint to "sin" of experiment number fitExp. More...
 
virtual void writeOutTable (const TString &outputFile)=0
 Write the latex table. More...
 
virtual void storePerEvtLlhds ()=0
 Store the per-event likelihood values. More...
 
virtual void calculateSPlotData ()
 Calculate the sPlot data. More...
 
void setGenValues ()
 Make sure all parameters hold their genValue as the current value. More...
 
virtual void setupBkgndVectors ()=0
 Method to set up the storage for background-related quantities called by setBkgndClassNames. More...
 
Bool_t validBkgndClass (const TString &className) const
 Check if the given background class is in the list. More...
 
UInt_t bkgndClassID (const TString &className) const
 The number assigned to a background class. More...
 
const TString & bkgndClassName (UInt_t classID) const
 Get the name of a background class from the number. More...
 
virtual void setupGenNtupleBranches ()=0
 Setup the generation ntuple branches. More...
 
virtual void addGenNtupleIntegerBranch (const TString &name)
 Add a branch to the gen tree for storing an integer. More...
 
virtual void addGenNtupleDoubleBranch (const TString &name)
 Add a branch to the gen tree for storing a double. More...
 
virtual void setGenNtupleIntegerBranchValue (const TString &name, Int_t value)
 Set the value of an integer branch in the gen tree. More...
 
virtual void setGenNtupleDoubleBranchValue (const TString &name, Double_t value)
 Set the value of a double branch in the gen tree. More...
 
virtual Int_t getGenNtupleIntegerBranchValue (const TString &name) const
 Get the value of an integer branch in the gen tree. More...
 
virtual Double_t getGenNtupleDoubleBranchValue (const TString &name) const
 Get the value of a double branch in the gen tree. More...
 
virtual void fillGenNtupleBranches ()
 Fill the gen tuple branches. More...
 
virtual void setupSPlotNtupleBranches ()=0
 Setup the branches of the sPlot tuple. More...
 
virtual void addSPlotNtupleIntegerBranch (const TString &name)
 Add a branch to the sPlot tree for storing an integer. More...
 
virtual void addSPlotNtupleDoubleBranch (const TString &name)
 Add a branch to the sPlot tree for storing a double. More...
 
virtual void setSPlotNtupleIntegerBranchValue (const TString &name, Int_t value)
 Set the value of an integer branch in the sPlot tree. More...
 
virtual void setSPlotNtupleDoubleBranchValue (const TString &name, Double_t value)
 Set the value of a double branch in the sPlot tree. More...
 
virtual void fillSPlotNtupleBranches ()
 Fill the sPlot tuple. More...
 
virtual LauSPlot::NameSet variableNames () const =0
 Returns the names of all variables in the fit. More...
 
virtual LauSPlot::NumbMap freeSpeciesNames () const =0
 Returns the names and yields of species that are free in the fit. More...
 
virtual LauSPlot::NumbMap fixdSpeciesNames () const =0
 Returns the names and yields of species that are fixed in the fit. More...
 
virtual LauSPlot::TwoDMap twodimPDFs () const =0
 Returns the species and variables for all 2D PDFs in the fit. More...
 
virtual Bool_t splitSignal () const =0
 Check if the signal is split into well-reconstructed and mis-reconstructed types. More...
 
virtual Bool_t scfDPSmear () const =0
 Check if the mis-reconstructed signal is to be smeared in the DP. More...
 
UInt_t addFitParameters (LauPdfList &pdfList)
 Add parameters of the PDFs in the list to the list of all fit parameters. More...
 
void addConParameters ()
 Add parameters to the list of Gaussian constrained parameters. More...
 
void printFitParameters (const LauPdfList &pdfList, std::ostream &fout) const
 Print the fit parameters for all PDFs in the list. More...
 
void updateFitParameters (LauPdfList &pdfList)
 Update the fit parameters for all PDFs in the list. More...
 
void cacheInfo (LauPdfList &pdfList, const LauFitDataTree &theData)
 Have all PDFs in the list cache the data. More...
 
Double_t prodPdfValue (LauPdfList &pdfList, UInt_t iEvt)
 Calculate the product of the per-event likelihoods of the PDFs in the list. More...
 
Bool_t pdfsDependOnDP () const
 Do any of the PDFs have a dependence on the DP? More...
 
void pdfsDependOnDP (Bool_t dependOnDP)
 Do any of the PDFs have a dependence on the DP? More...
 
const LauParameterPListfitPars () const
 Const access the fit variables. More...
 
LauParameterPListfitPars ()
 Access the fit variables. More...
 
const LauParameterPSetresPars () const
 Const access the fit variables which affect the DP normalisation. More...
 
LauParameterPSetresPars ()
 Access the fit variables which affect the DP normalisation. More...
 
const LauParameterListextraPars () const
 Const access the extra variables. More...
 
LauParameterListextraPars ()
 Access the extra variables. More...
 
const LauAbsRValuePListconPars () const
 Const access the Gaussian constrained variables. More...
 
LauAbsRValuePListconPars ()
 Access the Gaussian constrained variables. More...
 
const LauGenNtuplegenNtuple () const
 Const access the gen ntuple. More...
 
LauGenNtuplegenNtuple ()
 Access the gen ntuple. More...
 
const LauGenNtuplesPlotNtuple () const
 Const access the sPlot ntuple. More...
 
LauGenNtuplesPlotNtuple ()
 Access the sPlot ntuple. More...
 
const LauFitDataTreefitData () const
 Const access the data store. More...
 
LauFitDataTreefitData ()
 Access the data store. More...
 
- Protected Member Functions inherited from LauSimFitSlave
const LauFitNtuplefitNtuple () const
 Const access to the fit ntuple. More...
 
LauFitNtuplefitNtuple ()
 Access to the fit ntuple. More...
 
void connectToMaster (const TString &addressMaster, const UInt_t portMaster)
 Establish the connection to the master process. More...
 
void processMasterRequests ()
 Listen for requests from the master and act accordingly. More...
 
virtual void writeOutAllFitResults ()
 Write out any fit results. More...
 
- Protected Member Functions inherited from LauFitObject
 LauFitObject ()
 Constructor. More...
 
const std::vector
< StoreConstraints > & 
constraintsStore () const
 Const access to the constraints store. More...
 
std::vector< StoreConstraints > & constraintsStore ()
 Access to the constraints store. More...
 
void resetFitCounters ()
 Reset the good/bad fit counters. More...
 
void setCurrentExperiment (const UInt_t curExpt)
 Set the ID of the current experiment. More...
 
void startNewFit (const UInt_t nPars, const UInt_t nFreePars)
 Indicate the start of a new fit. More...
 
void eventsPerExpt (UInt_t nEvents)
 Set the number of events in the current experiment. More...
 
Double_t worstLogLike () const
 Access the worst log likelihood found so far. More...
 
void worstLogLike (const Double_t newWorstLogLike)
 Set a new value for the worst log likelihood. More...
 
void storeFitStatus (const LauAbsFitter::FitStatus &status, const TMatrixD &covMatrix)
 Store fit status information. More...
 
UInt_t nTotParams () const
 Access the total number of fit parameters. More...
 
UInt_t nFreeParams () const
 Access the total number of fit parameters. More...
 
const LauAbsFitter::FitStatusfitStatus () const
 Access the fit status information. More...
 
Double_t nll () const
 Access the current NLL value. More...
 
Double_t edm () const
 Access the current EDM value. More...
 
Int_t statusCode () const
 Access the fit status code. More...
 
const TMatrixD & covarianceMatrix () const
 Access the fit covariance matrix. More...
 
UInt_t numberOKFits () const
 Access the number of successful fits. More...
 
UInt_t numberBadFits () const
 Access the number of failed fits. More...
 

Protected Attributes

TString fixParamFileName_
 Imported parameters file name. More...
 
TString fixParamTreeName_
 Imported parameters tree name. More...
 
std::map< TString, Double_t > fixParamMap_
 Map from imported parameter name to value. More...
 
std::set< TString > fixParamNames_
 Imported parameter names. More...
 
Bool_t fixParams_
 Whether to fix the loaded parameters (kTRUE) or leave them floating (kFALSE) More...
 
std::set< LauParameter * > allImportedFreeParams_
 The set of parameters that are imported (either from a file or by value) and not. More...
 

Private Member Functions

 LauAbsFitModel (const LauAbsFitModel &rhs)
 Copy constructor (not implemented) More...
 
LauAbsFitModeloperator= (const LauAbsFitModel &rhs)
 Copy assignment operator (not implemented) More...
 

Private Attributes

Bool_t compareFitData_
 Option to make toy from 1st successful experiment. More...
 
Bool_t savePDF_
 Option to output a .C file of PDF's. More...
 
Bool_t writeLatexTable_
 Option to output a Latex format table. More...
 
Bool_t writeSPlotData_
 Option to write sPlot data. More...
 
Bool_t storeDPEff_
 Option to store DP efficiencies in the sPlot ntuple. More...
 
Bool_t randomFit_
 Option to randomise the initial values of the fit parameters. More...
 
Bool_t emlFit_
 Option to perform an extended ML fit. More...
 
Bool_t poissonSmear_
 Option to perform Poisson smearing. More...
 
Bool_t enableEmbedding_
 Option to enable embedding. More...
 
Bool_t usingDP_
 Option to include the DP as part of the fit. More...
 
Bool_t pdfsDependOnDP_
 Option to state if pdfs depend on DP position. More...
 
LauParameterPList fitVars_
 Internal vector of fit parameters. More...
 
LauParameterPSet resVars_
 Internal set of fit parameters upon which the DP normalisation depends. More...
 
LauParameterList extraVars_
 Extra variables that aren't in the fit but are stored in the ntuple. More...
 
LauAbsRValuePList conVars_
 Internal vectors of Gaussian parameters. More...
 
LauFitDataTreeinputFitData_
 The input data. More...
 
LauGenNtuplegenNtuple_
 The generated ntuple. More...
 
LauGenNtuplesPlotNtuple_
 The sPlot ntuple. More...
 
LauBkgndClassMap bkgndClassNames_
 The background class names. More...
 
const TString nullString_
 An empty string. More...
 
Bool_t doSFit_
 Option to perfom the sFit. More...
 
TString sWeightBranchName_
 The name of the sWeight branch. More...
 
std::vector< Double_t > sWeights_
 The vector of sWeights. More...
 
Double_t sWeightScaleFactor_
 The sWeight scaling factor. More...
 
TStopwatch timer_
 The fit timer. More...
 
TStopwatch cumulTimer_
 The total fit timer. More...
 
TString outputTableName_
 The output table name. More...
 
TString fitToyMCFileName_
 The output file name for Toy MC. More...
 
TString fitToyMCTableName_
 The output table name for Toy MC. More...
 
UInt_t fitToyMCScale_
 The scaling factor (toy vs data statistics) More...
 
Bool_t fitToyMCPoissonSmear_
 Option to perform Poisson smearing. More...
 
TString sPlotFileName_
 The name of the sPlot file. More...
 
TString sPlotTreeName_
 The name of the sPlot tree. More...
 
TString sPlotVerbosity_
 Control the verbosity of the sFit. More...
 

Detailed Description

Member Typedef Documentation

typedef std::vector<LauAbsRValue*> LauAbsFitModel::LauAbsRValuePList
protected

List of parameter pointers.

Definition at line 306 of file LauAbsFitModel.hh.

typedef std::map<UInt_t,TString> LauAbsFitModel::LauBkgndClassMap
protected

A type to store background classes.

Definition at line 312 of file LauAbsFitModel.hh.

typedef std::vector<LauParameter> LauAbsFitModel::LauParameterList
protected

List of parameters.

Definition at line 310 of file LauAbsFitModel.hh.

typedef std::vector<LauParameter*> LauAbsFitModel::LauParameterPList
protected

List of parameter pointers.

Definition at line 304 of file LauAbsFitModel.hh.

typedef std::set<LauParameter*> LauAbsFitModel::LauParameterPSet
protected

Set of parameter pointers.

Definition at line 308 of file LauAbsFitModel.hh.

typedef std::vector<LauAbsPdf*> LauAbsFitModel::LauPdfList
protected

List of Pdfs.

Definition at line 302 of file LauAbsFitModel.hh.

Constructor & Destructor Documentation

LauAbsFitModel::LauAbsFitModel ( )

Constructor.

Definition at line 55 of file LauAbsFitModel.cc.

LauAbsFitModel::~LauAbsFitModel ( )
virtual

Destructor.

Definition at line 87 of file LauAbsFitModel.cc.

LauAbsFitModel::LauAbsFitModel ( const LauAbsFitModel rhs)
private

Copy constructor (not implemented)

Member Function Documentation

void LauAbsFitModel::addConParameters ( )
protected

Add parameters to the list of Gaussian constrained parameters.

Definition at line 878 of file LauAbsFitModel.cc.

UInt_t LauAbsFitModel::addFitParameters ( LauPdfList pdfList)
protected

Add parameters of the PDFs in the list to the list of all fit parameters.

Parameters
[in]pdfLista list of Pdfs
Returns
the number of parameters added

Definition at line 856 of file LauAbsFitModel.cc.

void LauAbsFitModel::addGenNtupleDoubleBranch ( const TString &  name)
protectedvirtual

Add a branch to the gen tree for storing a double.

Parameters
[in]namethe name of the branch

Definition at line 354 of file LauAbsFitModel.cc.

void LauAbsFitModel::addGenNtupleIntegerBranch ( const TString &  name)
protectedvirtual

Add a branch to the gen tree for storing an integer.

Parameters
[in]namethe name of the branch

Definition at line 349 of file LauAbsFitModel.cc.

void LauAbsFitModel::addSPlotNtupleDoubleBranch ( const TString &  name)
protectedvirtual

Add a branch to the sPlot tree for storing a double.

Parameters
[in]namethe name of the branch

Definition at line 389 of file LauAbsFitModel.cc.

void LauAbsFitModel::addSPlotNtupleIntegerBranch ( const TString &  name)
protectedvirtual

Add a branch to the sPlot tree for storing an integer.

Parameters
[in]namethe name of the branch

Definition at line 384 of file LauAbsFitModel.cc.

UInt_t LauAbsFitModel::bkgndClassID ( const TString &  className) const
protected

The number assigned to a background class.

Parameters
[in]classNamethe name of the class to check
Returns
the background class ID number

Definition at line 197 of file LauAbsFitModel.cc.

const TString & LauAbsFitModel::bkgndClassName ( UInt_t  classID) const
protected

Get the name of a background class from the number.

Parameters
[in]classIDthe ID number of the background class
Returns
the class name

Definition at line 215 of file LauAbsFitModel.cc.

void LauAbsFitModel::cacheInfo ( LauPdfList pdfList,
const LauFitDataTree theData 
)
protected

Have all PDFs in the list cache the data.

Parameters
[in]pdfListthe list of pdfs
[in]theDatathe data from the fit

Definition at line 950 of file LauAbsFitModel.cc.

virtual void LauAbsFitModel::cacheInputFitVars ( )
protectedpure virtual

Cache the input data values to calculate the likelihood during the fit.

Implements LauSimFitSlave.

Implemented in LauCPFitModel, and LauSimpleFitModel.

void LauAbsFitModel::cacheInputSWeights ( )
protectedvirtual

Cache the value of the sWeights to be used in the sFit.

Definition at line 537 of file LauAbsFitModel.cc.

void LauAbsFitModel::calculateSPlotData ( )
protectedvirtual

Calculate the sPlot data.

Definition at line 601 of file LauAbsFitModel.cc.

virtual void LauAbsFitModel::checkInitFitParams ( )
protectedpure virtual

Update initial fit parameters if required.

Implemented in LauCPFitModel, and LauSimpleFitModel.

void LauAbsFitModel::clearExtraVarVectors ( )
protected

Clear the vectors containing extra ntuple variables.

Definition at line 242 of file LauAbsFitModel.cc.

void LauAbsFitModel::clearFitParVectors ( )
protected

Clear the vectors containing fit parameters.

Definition at line 227 of file LauAbsFitModel.cc.

void LauAbsFitModel::compareFitData ( UInt_t  toyMCScale = 10,
const TString &  mcFileName = "fitToyMC.root",
const TString &  tableFileName = "fitToyMCTable.tex",
Bool_t  poissonSmearing = kTRUE 
)

Specify that a toy MC sample should be created for a successful fit to an experiment.

Generation uses the fitted parameters so that the user can compare the fit to the data

Parameters
[in]toyMCScalethe scale factor to get the number of events to generate
[in]mcFileNamethe file name where the toy sample will be stored
[in]tableFileNamename of the output tex file
[in]poissonSmearingturn smearing on or off

Definition at line 614 of file LauAbsFitModel.cc.

const LauAbsRValuePList& LauAbsFitModel::conPars ( ) const
inlineprotected

Const access the Gaussian constrained variables.

Definition at line 689 of file LauAbsFitModel.hh.

LauAbsRValuePList& LauAbsFitModel::conPars ( )
inlineprotected

Access the Gaussian constrained variables.

Definition at line 691 of file LauAbsFitModel.hh.

void LauAbsFitModel::createFitToyMC ( const TString &  mcFileName,
const TString &  tableFileName 
)
protected

Create a toy MC sample from the fitted parameters.

Parameters
[in]mcFileNamethe file name where the toy sample will be stored
[in]tableFileNamename of the output tex file

Definition at line 623 of file LauAbsFitModel.cc.

Bool_t LauAbsFitModel::doEMLFit ( ) const
inline

Determine whether an extended maximum likelihood fit it being performed.

Definition at line 116 of file LauAbsFitModel.hh.

void LauAbsFitModel::doEMLFit ( Bool_t  emlFit)
inline

Choice to perform an extended maximum likelihood fit.

Parameters
[in]emlFitboolean specifying whether or not to perform the EML

Definition at line 122 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::doPoissonSmearing ( ) const
inline

Determine whether Poisson smearing is enabled for the toy MC generation.

Definition at line 125 of file LauAbsFitModel.hh.

void LauAbsFitModel::doPoissonSmearing ( Bool_t  poissonSmear)
inline

Turn Poisson smearing (for the toy MC generation) on or off.

Parameters
[in]poissonSmearboolean specifying whether or not to do Poisson smearing

Definition at line 131 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::doSFit ( ) const
inline

Return the flag to store the status of using an sFit or not.

Definition at line 106 of file LauAbsFitModel.hh.

void LauAbsFitModel::doSFit ( const TString &  sWeightBranchName,
Double_t  scaleFactor = 1.0 
)

Do an sFit (use sWeights to isolate signal decays rather than using background histograms)

Parameters
[in]sWeightBranchNamename of the branch of the tree containing the sWeights
[in]scaleFactorscaling factor to get the uncertainties correct

Definition at line 153 of file LauAbsFitModel.cc.

Bool_t LauAbsFitModel::enableEmbedding ( ) const
inline

Determine whether embedding of events is enabled in the generation.

Definition at line 134 of file LauAbsFitModel.hh.

void LauAbsFitModel::enableEmbedding ( Bool_t  enable)
inline

Turn on or off embedding of events in the generation.

Parameters
[in]enableboolean specifying whether to embed events

Definition at line 140 of file LauAbsFitModel.hh.

const LauParameterList& LauAbsFitModel::extraPars ( ) const
inlineprotected

Const access the extra variables.

Definition at line 684 of file LauAbsFitModel.hh.

LauParameterList& LauAbsFitModel::extraPars ( )
inlineprotected

Access the extra variables.

Definition at line 686 of file LauAbsFitModel.hh.

void LauAbsFitModel::fillGenNtupleBranches ( )
protectedvirtual

Fill the gen tuple branches.

Definition at line 379 of file LauAbsFitModel.cc.

void LauAbsFitModel::fillSPlotNtupleBranches ( )
protectedvirtual

Fill the sPlot tuple.

Definition at line 404 of file LauAbsFitModel.cc.

void LauAbsFitModel::finaliseExperiment ( const LauAbsFitter::FitStatus fitStat,
const TObjArray *  parsFromMaster,
const TMatrixD *  covMat,
TObjArray &  parsToMaster 
)
protectedvirtual

Perform all finalisation actions.

  • Receive the results of the fit from the master
  • Perform any finalisation routines
  • Package the finalised fit parameters for transmission back to the master
Parameters
[in]fitStatthe status of the fit, e.g. status code, EDM, NLL
[in]parsFromMasterthe parameters at the fit minimum
[in]covMatthe fit covariance matrix
[out]parsToMasterthe array to be filled with the finalised LauParameter objects

Implements LauSimFitSlave.

Definition at line 1004 of file LauAbsFitModel.cc.

virtual void LauAbsFitModel::finaliseFitResults ( const TString &  tableFileName)
protectedpure virtual

Write the results of the fit into the ntuple.

Parameters
[in]tableFileNamethe structure containing the results of the fit

Implemented in LauCPFitModel, and LauSimpleFitModel.

void LauAbsFitModel::fit ( const TString &  dataFileName,
const TString &  dataTreeName,
const TString &  histFileName,
const TString &  tableFileNameBase 
)
protected

Perform the total fit.

Parameters
[in]dataFileNamethe name of the data file
[in]dataTreeNamethe name of the tree containing the data
[in]histFileNamethe name of the histogram output file
[in]tableFileNameBasethe name the of latex output file

Definition at line 409 of file LauAbsFitModel.cc.

const LauFitDataTree* LauAbsFitModel::fitData ( ) const
inlineprotected

Const access the data store.

Definition at line 704 of file LauAbsFitModel.hh.

LauFitDataTree* LauAbsFitModel::fitData ( )
inlineprotected

Access the data store.

Definition at line 706 of file LauAbsFitModel.hh.

void LauAbsFitModel::fitExpt ( )
protected

Routine to perform the actual fit for a given experiment.

Definition at line 561 of file LauAbsFitModel.cc.

const LauParameterPList& LauAbsFitModel::fitPars ( ) const
inlineprotected

Const access the fit variables.

Definition at line 674 of file LauAbsFitModel.hh.

LauParameterPList& LauAbsFitModel::fitPars ( )
inlineprotected

Access the fit variables.

Definition at line 676 of file LauAbsFitModel.hh.

virtual LauSPlot::NumbMap LauAbsFitModel::fixdSpeciesNames ( ) const
protectedpure virtual

Returns the names and yields of species that are fixed in the fit.

Implemented in LauCPFitModel, and LauSimpleFitModel.

virtual LauSPlot::NumbMap LauAbsFitModel::freeSpeciesNames ( ) const
protectedpure virtual

Returns the names and yields of species that are free in the fit.

Implemented in LauCPFitModel, and LauSimpleFitModel.

void LauAbsFitModel::generate ( const TString &  dataFileName,
const TString &  dataTreeName,
const TString &  histFileName,
const TString &  tableFileNameBase 
)
protectedvirtual

Generate toy MC.

Parameters
[in]dataFileNamethe name of the file where the generated events are stored
[in]dataTreeNamethe name of the tree used to store the variables
[in]histFileNamethe name of the histogram output file (currently not used)
[in]tableFileNameBasethe name the latex output file

Definition at line 274 of file LauAbsFitModel.cc.

virtual Bool_t LauAbsFitModel::genExpt ( )
protectedpure virtual

The method that actually generates the toy MC events for the given experiment.

Returns
the success/failure flag of the generation procedure

Implemented in LauCPFitModel, and LauSimpleFitModel.

const LauGenNtuple* LauAbsFitModel::genNtuple ( ) const
inlineprotected

Const access the gen ntuple.

Definition at line 694 of file LauAbsFitModel.hh.

LauGenNtuple* LauAbsFitModel::genNtuple ( )
inlineprotected

Access the gen ntuple.

Definition at line 696 of file LauAbsFitModel.hh.

virtual Double_t LauAbsFitModel::getEventSum ( ) const
protectedpure virtual

Returns the sum of the expected events over all hypotheses; used in the EML fit scenario.

Implemented in LauCPFitModel, and LauSimpleFitModel.

Double_t LauAbsFitModel::getGenNtupleDoubleBranchValue ( const TString &  name) const
protectedvirtual

Get the value of a double branch in the gen tree.

Parameters
[in]namethe name of the branch
Returns
the value of the parameter

Definition at line 374 of file LauAbsFitModel.cc.

Int_t LauAbsFitModel::getGenNtupleIntegerBranchValue ( const TString &  name) const
protectedvirtual

Get the value of an integer branch in the gen tree.

Parameters
[in]namethe name of the branch
Returns
the value of the parameter

Definition at line 369 of file LauAbsFitModel.cc.

Double_t LauAbsFitModel::getLogLikelihood ( UInt_t  iStart,
UInt_t  iEnd 
)
protected

Calculate the sum of the log-likelihood over the specified events.

Parameters
[in]iStartthe event number of the first event to be considered
[in]iEndthe event number of the final event to be considered

Definition at line 771 of file LauAbsFitModel.cc.

Double_t LauAbsFitModel::getLogLikelihoodPenalty ( )
protected

Calculate the penalty terms to the log likelihood from Gaussian constraints.

Definition at line 755 of file LauAbsFitModel.cc.

virtual Double_t LauAbsFitModel::getTotEvtLikelihood ( UInt_t  iEvt)
protectedpure virtual

Calculates the likelihood for a given event.

Parameters
[in]iEvtthe event number

Implemented in LauCPFitModel, and LauSimpleFitModel.

Double_t LauAbsFitModel::getTotNegLogLikelihood ( )
virtual

Calculates the total negative log-likelihood.

This function has to be public since it is called from the global FCN. It should not be called otherwise!

Implements LauSimFitSlave.

Definition at line 732 of file LauAbsFitModel.cc.

virtual void LauAbsFitModel::initialise ( )
protectedpure virtual

Initialise the fit par vectors.

Each class that inherits from this one must implement this sensibly for all vectors specified in clearFitParVectors, i.e. specify parameter names, initial, min, max and fixed values

Implements LauSimFitSlave.

Implemented in LauCPFitModel, and LauSimpleFitModel.

virtual void LauAbsFitModel::initialiseDPModels ( )
protectedpure virtual

Initialise the DP models.

Implemented in LauCPFitModel, and LauSimpleFitModel.

UInt_t LauAbsFitModel::nBkgndClasses ( ) const
inline

Returns the number of background classes.

Definition at line 188 of file LauAbsFitModel.hh.

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

Copy assignment operator (not implemented)

Bool_t LauAbsFitModel::pdfsDependOnDP ( ) const
inlineprotected

Do any of the PDFs have a dependence on the DP?

Returns
the flag to indicated if there is a DP dependence

Definition at line 665 of file LauAbsFitModel.hh.

void LauAbsFitModel::pdfsDependOnDP ( Bool_t  dependOnDP)
inlineprotected

Do any of the PDFs have a dependence on the DP?

Parameters
[in]dependOnDPthe flag to indicated if there is a DP dependence

Definition at line 671 of file LauAbsFitModel.hh.

void LauAbsFitModel::prepareInitialParArray ( TObjArray &  array)
protectedvirtual

Package the initial fit parameters for transmission to the master.

Parameters
[out]arraythe array to be filled with the LauParameter objects

Implements LauSimFitSlave.

Definition at line 984 of file LauAbsFitModel.cc.

void LauAbsFitModel::printEventInfo ( UInt_t  iEvt) const
protectedvirtual

Prints the values of all the fit variables for the specified event - useful for diagnostics.

Parameters
[in]iEvtthe event number

Definition at line 967 of file LauAbsFitModel.cc.

void LauAbsFitModel::printFitParameters ( const LauPdfList pdfList,
std::ostream &  fout 
) const
protected

Print the fit parameters for all PDFs in the list.

Parameters
[in]pdfLista list of Pdfs
[in]foutthe output stream to write to

Definition at line 926 of file LauAbsFitModel.cc.

void LauAbsFitModel::printVarsInfo ( ) const
protectedvirtual

Same as printEventInfo, but printing out the values of the variables in the fit.

Definition at line 976 of file LauAbsFitModel.cc.

Double_t LauAbsFitModel::prodPdfValue ( LauPdfList pdfList,
UInt_t  iEvt 
)
protected

Calculate the product of the per-event likelihoods of the PDFs in the list.

Parameters
[in]pdfListthe list of pdfs
[in]iEvtthe event number

Definition at line 957 of file LauAbsFitModel.cc.

virtual void LauAbsFitModel::propagateParUpdates ( )
protectedpure virtual

This function (specific to each model) calculates anything that depends on the fit parameter values.

Implemented in LauCPFitModel, and LauSimpleFitModel.

UInt_t LauAbsFitModel::readExperimentData ( )
protectedvirtual

Read in the data for the current experiment.

Returns
the number of events read in

Implements LauSimFitSlave.

Definition at line 1053 of file LauAbsFitModel.cc.

virtual void LauAbsFitModel::recalculateNormalisation ( )
protectedpure virtual

Recalculate normalisation the signal DP model(s)

Implemented in LauCPFitModel, and LauSimpleFitModel.

const LauParameterPSet& LauAbsFitModel::resPars ( ) const
inlineprotected

Const access the fit variables which affect the DP normalisation.

Definition at line 679 of file LauAbsFitModel.hh.

LauParameterPSet& LauAbsFitModel::resPars ( )
inlineprotected

Access the fit variables which affect the DP normalisation.

Definition at line 681 of file LauAbsFitModel.hh.

void LauAbsFitModel::run ( const TString &  applicationCode,
const TString &  dataFileName,
const TString &  dataTreeName,
const TString &  histFileName,
const TString &  tableFileName = "" 
)

Start the toy generation / fitting.

Parameters
[in]applicationCodespecifies what to do, perform a fit ("fit") or generate toy MC ("gen")
[in]dataFileNamethe name of the input data file
[in]dataTreeNamethe name of the tree containing the data
[in]histFileNamethe file name for the output histograms
[in]tableFileNamethe file name for the latex output file

Definition at line 102 of file LauAbsFitModel.cc.

Bool_t LauAbsFitModel::runMinimisation ( )
protected

Routine to perform the minimisation.

Returns
the success/failure flag of the fit
Bool_t LauAbsFitModel::saveFilePDF ( ) const
inline

save files containing graphs of the resonance's PDFs

Definition at line 152 of file LauAbsFitModel.hh.

void LauAbsFitModel::saveFilePDF ( Bool_t  savePDF)
inline

Turn on or off the save of files containing graphs of the resonance's PDFs.

Parameters
[in]savePDFboolean specifying whether or not the save of files containing graphs of the resonance's PDFs

Definition at line 158 of file LauAbsFitModel.hh.

virtual void LauAbsFitModel::savePDFPlots ( const TString &  label)
protectedpure virtual

Save the pdf Plots for all the resonances of experiment number fitExp.

Parameters
[in]labelprefix for the file name to be saved

Implemented in LauCPFitModel, and LauSimpleFitModel.

virtual void LauAbsFitModel::savePDFPlotsWave ( const TString &  label,
const Int_t &  spin 
)
protectedpure virtual

Save the pdf Plots for the sum of ressonances correspondint to "sin" of experiment number fitExp.

Parameters
[in]labelprefix for the file name to be saved
[in]spinspin of the wave to be saved

Implemented in LauCPFitModel, and LauSimpleFitModel.

virtual Bool_t LauAbsFitModel::scfDPSmear ( ) const
protectedpure virtual

Check if the mis-reconstructed signal is to be smeared in the DP.

Implemented in LauCPFitModel, and LauSimpleFitModel.

virtual void LauAbsFitModel::setAmpCoeffSet ( LauAbsCoeffSet coeffSet)
pure virtual

Set the DP amplitude coefficients.

The name of the coeffSet must match the name of one of the resonances in the DP model.

The supplied order of coefficients will be rearranged to match the order in which the resonances are stored in the dynamics, see LauIsobarDynamics::addResonance.

Parameters
[in]coeffSetthe set of coefficients

Implemented in LauCPFitModel, and LauSimpleFitModel.

void LauAbsFitModel::setBkgndClassNames ( const std::vector< TString > &  names)
virtual

Setup the background class names.

Parameters
[in]namesa vector of all the background names

Definition at line 165 of file LauAbsFitModel.cc.

void LauAbsFitModel::setGenNtupleDoubleBranchValue ( const TString &  name,
Double_t  value 
)
protectedvirtual

Set the value of a double branch in the gen tree.

Parameters
[in]namethe name of the branch
[in]valuethe value to be stored

Definition at line 364 of file LauAbsFitModel.cc.

void LauAbsFitModel::setGenNtupleIntegerBranchValue ( const TString &  name,
Int_t  value 
)
protectedvirtual

Set the value of an integer branch in the gen tree.

Parameters
[in]namethe name of the branch
[in]valuethe value to be stored

Definition at line 359 of file LauAbsFitModel.cc.

void LauAbsFitModel::setGenValues ( )
protected

Make sure all parameters hold their genValue as the current value.

Definition at line 248 of file LauAbsFitModel.cc.

void LauAbsFitModel::setNamedParameters ( const TString &  fileName,
const TString &  treeName,
const std::set< TString > &  parameters,
const Bool_t  fix 
)

Set named model parameters from a file.

Identical to setParametersFromFile, but only import parameters named from parameters set. All others are set to their values specified in the model configuration.

Parameters
[in]fileNamethe name of the file with parameters to set
[in]treeNamethe name of the tree in the file corresponding to the parameters to set
[in]parametersthe set of parameters to import from the file
[in]fixwhether to fix (set constant) the loaded parameters, or leave them floating

Definition at line 1076 of file LauAbsFitModel.cc.

virtual void LauAbsFitModel::setNBkgndEvents ( LauAbsRValue nBkgndEvents)
pure virtual

Set the number of background events.

The name of the parameter must be that of the corresponding background category (so that it can be correctly assigned)

Parameters
[in]nBkgndEventscontains the name, yield and option to fix the yield of the background

Implemented in LauCPFitModel, and LauSimpleFitModel.

virtual void LauAbsFitModel::setNSigEvents ( LauParameter nSigEvents)
pure virtual

Set the number of signal events.

Parameters
[in]nSigEventscontains the signal yield and option to fix it

Implemented in LauCPFitModel, and LauSimpleFitModel.

void LauAbsFitModel::setParametersFileFallback ( const TString &  fileName,
const TString &  treeName,
const std::map< TString, Double_t > &  parameters,
const Bool_t  fix 
)

Set named model parameters from a given std::map, with fallback to those from a file.

Parameters named in the map are imported with their specified values. All other parameters are set to the values corresponding to the value in the given file.

Parameters
[in]fileNamethe name of the file with parameters to set
[in]treeNamethe name of the tree in the file corresponding to the parameters to set
[in]parametersmap from parameter name to imported value (override parameters form the file)
[in]fixwhether to fix (set constant) the loaded parameters, or leave them floating

Definition at line 1084 of file LauAbsFitModel.cc.

void LauAbsFitModel::setParametersFromFile ( const TString &  fileName,
const TString &  treeName,
const Bool_t  fix 
)

Set model parameters from a file.

Parameters
[in]fileNamethe name of the file with parameters to set
[in]treeNamethe name of the tree in the file corresponding to the parameters to set
[in]fixwhether to fix (set constant) the loaded parameters, or leave them floating

Definition at line 1063 of file LauAbsFitModel.cc.

void LauAbsFitModel::setParametersFromMap ( const std::map< TString, Double_t > &  parameters,
const Bool_t  fix 
)

Set model parameters from a given std::map.

Only parameters named in the map are imported, all others are set to their values specified in the model configuration.

Parameters
[in]parametersmap from parameter name to imported value
[in]fixwhether to fix (set constant) the loaded parameters, or leave them floating

Definition at line 1070 of file LauAbsFitModel.cc.

void LauAbsFitModel::setParsFromMinuit ( Double_t *  par,
Int_t  npar 
)
virtual

This function sets the parameter values from Minuit.

This function has to be public since it is called from the global FCN. It should not be called otherwise!

Parameters
[in]paran array storing the various parameter values
[in]nparthe number of free parameters

Implements LauSimFitSlave.

Definition at line 812 of file LauAbsFitModel.cc.

void LauAbsFitModel::setSPlotNtupleDoubleBranchValue ( const TString &  name,
Double_t  value 
)
protectedvirtual

Set the value of a double branch in the sPlot tree.

Parameters
[in]namethe name of the branch
[in]valuethe value to be stored

Definition at line 399 of file LauAbsFitModel.cc.

void LauAbsFitModel::setSPlotNtupleIntegerBranchValue ( const TString &  name,
Int_t  value 
)
protectedvirtual

Set the value of an integer branch in the sPlot tree.

Parameters
[in]namethe name of the branch
[in]valuethe value to be stored

Definition at line 394 of file LauAbsFitModel.cc.

virtual void LauAbsFitModel::setupBkgndVectors ( )
protectedpure virtual

Method to set up the storage for background-related quantities called by setBkgndClassNames.

Implemented in LauCPFitModel, and LauSimpleFitModel.

virtual void LauAbsFitModel::setupGenNtupleBranches ( )
protectedpure virtual

Setup the generation ntuple branches.

Implemented in LauCPFitModel, and LauSimpleFitModel.

void LauAbsFitModel::setupResultsOutputs ( const TString &  histFileName,
const TString &  tableFileName 
)
protectedvirtual

Setup saving of fit results to ntuple/LaTeX table etc.

Parameters
[in]histFileNamethe file name for the output histograms
[in]tableFileNamethe file name for the latex output file

Reimplemented from LauSimFitSlave.

Definition at line 514 of file LauAbsFitModel.cc.

virtual void LauAbsFitModel::setupSPlotNtupleBranches ( )
protectedpure virtual

Setup the branches of the sPlot tuple.

Implemented in LauCPFitModel, and LauSimpleFitModel.

virtual Bool_t LauAbsFitModel::splitSignal ( ) const
protectedpure virtual

Check if the signal is split into well-reconstructed and mis-reconstructed types.

Implemented in LauCPFitModel, and LauSimpleFitModel.

const LauGenNtuple* LauAbsFitModel::sPlotNtuple ( ) const
inlineprotected

Const access the sPlot ntuple.

Definition at line 699 of file LauAbsFitModel.hh.

LauGenNtuple* LauAbsFitModel::sPlotNtuple ( )
inlineprotected

Access the sPlot ntuple.

Definition at line 701 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::storeDPEff ( ) const
inline

Determine whether the efficiency information should be stored in the sPlot ntuple.

Definition at line 173 of file LauAbsFitModel.hh.

virtual void LauAbsFitModel::storePerEvtLlhds ( )
protectedpure virtual

Store the per-event likelihood values.

Implemented in LauCPFitModel, and LauSimpleFitModel.

virtual LauSPlot::TwoDMap LauAbsFitModel::twodimPDFs ( ) const
protectedpure virtual

Returns the species and variables for all 2D PDFs in the fit.

Implemented in LauCPFitModel, and LauSimpleFitModel.

virtual void LauAbsFitModel::updateCoeffs ( )
protectedpure virtual

For each amp in the fit this function takes its particular parameters and from them calculates the single complex number that is its coefficient. The vector of these coeffs can then be passed to the signal dynamics.

Implemented in LauCPFitModel, and LauSimpleFitModel.

void LauAbsFitModel::updateFitParameters ( LauPdfList pdfList)
protected

Update the fit parameters for all PDFs in the list.

Parameters
[in]pdfLista list of Pdfs

Definition at line 919 of file LauAbsFitModel.cc.

Bool_t LauAbsFitModel::useDP ( ) const
inline

Is the Dalitz plot term in the likelihood.

Definition at line 97 of file LauAbsFitModel.hh.

void LauAbsFitModel::useDP ( Bool_t  usingDP)
inline

Switch on/off the Dalitz plot term in the Likelihood (allows fits to other quantities, e.g. B mass)

Parameters
[in]usingDPthe boolean flag

Definition at line 103 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::useRandomInitFitPars ( ) const
inline

Determine whether the initial values of the fit parameters, in particular the isobar coefficient parameters, are to be randomised.

Definition at line 176 of file LauAbsFitModel.hh.

void LauAbsFitModel::useRandomInitFitPars ( Bool_t  boolean)
inline

Randomise the initial values of the fit parameters, in particular the isobar coefficient parameters.

Definition at line 179 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::validBkgndClass ( const TString &  className) const
protected

Check if the given background class is in the list.

Parameters
[in]classNamethe name of the class to check
Returns
true or false

Definition at line 180 of file LauAbsFitModel.cc.

virtual LauSPlot::NameSet LauAbsFitModel::variableNames ( ) const
protectedpure virtual

Returns the names of all variables in the fit.

Implemented in LauCPFitModel, and LauSimpleFitModel.

Bool_t LauAbsFitModel::verifyFitData ( const TString &  dataFileName,
const TString &  dataTreeName 
)
protectedvirtual

Open the input file and verify that all required variables are present.

Parameters
[in]dataFileNamethe name of the input file
[in]dataTreeNamethe name of the input tree

Implements LauSimFitSlave.

Definition at line 521 of file LauAbsFitModel.cc.

virtual void LauAbsFitModel::weightEvents ( const TString &  dataFileName,
const TString &  dataTreeName 
)
protectedpure virtual

Weighting - allows e.g. MC events to be weighted by the DP model.

Parameters
[in]dataFileNamethe name of the data file
[in]dataTreeNamethe name of the tree containing the data

Implemented in LauCPFitModel, and LauSimpleFitModel.

Bool_t LauAbsFitModel::writeLatexTable ( ) const
inline

Determine whether writing out of the latex table is enabled.

Definition at line 143 of file LauAbsFitModel.hh.

void LauAbsFitModel::writeLatexTable ( Bool_t  writeTable)
inline

Turn on or off the writing out of the latex table.

Parameters
[in]writeTableboolean specifying whether or not the latex table should be written out

Definition at line 149 of file LauAbsFitModel.hh.

virtual void LauAbsFitModel::writeOutTable ( const TString &  outputFile)
protectedpure virtual

Write the latex table.

Parameters
[in]outputFilethe name of the output file

Implemented in LauCPFitModel, and LauSimpleFitModel.

void LauAbsFitModel::writeSPlotData ( const TString &  fileName,
const TString &  treeName,
Bool_t  storeDPEfficiency,
const TString &  verbosity = "q" 
)

Set up the sPlot ntuple.

Parameters
[in]fileNamethe sPlot file name
[in]treeNamethe sPlot tree name
[in]storeDPEfficiencywhether or not to store the efficiency information too
[in]verbositydefine the level of output

Definition at line 257 of file LauAbsFitModel.cc.

Bool_t LauAbsFitModel::writeSPlotData ( ) const
inline

Determine whether the sPlot data is to be written out.

Definition at line 170 of file LauAbsFitModel.hh.

Member Data Documentation

std::set<LauParameter*> LauAbsFitModel::allImportedFreeParams_
protected

The set of parameters that are imported (either from a file or by value) and not.

Definition at line 726 of file LauAbsFitModel.hh.

LauBkgndClassMap LauAbsFitModel::bkgndClassNames_
private

The background class names.

Definition at line 786 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::compareFitData_
private

Option to make toy from 1st successful experiment.

Definition at line 738 of file LauAbsFitModel.hh.

LauAbsRValuePList LauAbsFitModel::conVars_
private

Internal vectors of Gaussian parameters.

Definition at line 772 of file LauAbsFitModel.hh.

TStopwatch LauAbsFitModel::cumulTimer_
private

The total fit timer.

Definition at line 806 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::doSFit_
private

Option to perfom the sFit.

Definition at line 793 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::emlFit_
private

Option to perform an extended ML fit.

Definition at line 750 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::enableEmbedding_
private

Option to enable embedding.

Definition at line 754 of file LauAbsFitModel.hh.

LauParameterList LauAbsFitModel::extraVars_
private

Extra variables that aren't in the fit but are stored in the ntuple.

Definition at line 769 of file LauAbsFitModel.hh.

TString LauAbsFitModel::fitToyMCFileName_
private

The output file name for Toy MC.

Definition at line 814 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::fitToyMCPoissonSmear_
private

Option to perform Poisson smearing.

Definition at line 820 of file LauAbsFitModel.hh.

UInt_t LauAbsFitModel::fitToyMCScale_
private

The scaling factor (toy vs data statistics)

Definition at line 818 of file LauAbsFitModel.hh.

TString LauAbsFitModel::fitToyMCTableName_
private

The output table name for Toy MC.

Definition at line 816 of file LauAbsFitModel.hh.

LauParameterPList LauAbsFitModel::fitVars_
private

Internal vector of fit parameters.

Definition at line 763 of file LauAbsFitModel.hh.

TString LauAbsFitModel::fixParamFileName_
protected

Imported parameters file name.

Definition at line 709 of file LauAbsFitModel.hh.

std::map<TString, Double_t> LauAbsFitModel::fixParamMap_
protected

Map from imported parameter name to value.

Definition at line 715 of file LauAbsFitModel.hh.

std::set<TString> LauAbsFitModel::fixParamNames_
protected

Imported parameter names.

Definition at line 718 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::fixParams_
protected

Whether to fix the loaded parameters (kTRUE) or leave them floating (kFALSE)

Definition at line 721 of file LauAbsFitModel.hh.

TString LauAbsFitModel::fixParamTreeName_
protected

Imported parameters tree name.

Definition at line 712 of file LauAbsFitModel.hh.

LauGenNtuple* LauAbsFitModel::genNtuple_
private

The generated ntuple.

Definition at line 779 of file LauAbsFitModel.hh.

LauFitDataTree* LauAbsFitModel::inputFitData_
private

The input data.

Definition at line 777 of file LauAbsFitModel.hh.

const TString LauAbsFitModel::nullString_
private

An empty string.

Definition at line 788 of file LauAbsFitModel.hh.

TString LauAbsFitModel::outputTableName_
private

The output table name.

Definition at line 809 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::pdfsDependOnDP_
private

Option to state if pdfs depend on DP position.

Definition at line 758 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::poissonSmear_
private

Option to perform Poisson smearing.

Definition at line 752 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::randomFit_
private

Option to randomise the initial values of the fit parameters.

Definition at line 748 of file LauAbsFitModel.hh.

LauParameterPSet LauAbsFitModel::resVars_
private

Internal set of fit parameters upon which the DP normalisation depends.

Definition at line 766 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::savePDF_
private

Option to output a .C file of PDF's.

Definition at line 740 of file LauAbsFitModel.hh.

TString LauAbsFitModel::sPlotFileName_
private

The name of the sPlot file.

Definition at line 825 of file LauAbsFitModel.hh.

LauGenNtuple* LauAbsFitModel::sPlotNtuple_
private

The sPlot ntuple.

Definition at line 781 of file LauAbsFitModel.hh.

TString LauAbsFitModel::sPlotTreeName_
private

The name of the sPlot tree.

Definition at line 827 of file LauAbsFitModel.hh.

TString LauAbsFitModel::sPlotVerbosity_
private

Control the verbosity of the sFit.

Definition at line 829 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::storeDPEff_
private

Option to store DP efficiencies in the sPlot ntuple.

Definition at line 746 of file LauAbsFitModel.hh.

TString LauAbsFitModel::sWeightBranchName_
private

The name of the sWeight branch.

Definition at line 795 of file LauAbsFitModel.hh.

std::vector<Double_t> LauAbsFitModel::sWeights_
private

The vector of sWeights.

Definition at line 797 of file LauAbsFitModel.hh.

Double_t LauAbsFitModel::sWeightScaleFactor_
private

The sWeight scaling factor.

Definition at line 799 of file LauAbsFitModel.hh.

TStopwatch LauAbsFitModel::timer_
private

The fit timer.

Definition at line 804 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::usingDP_
private

Option to include the DP as part of the fit.

Definition at line 756 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::writeLatexTable_
private

Option to output a Latex format table.

Definition at line 742 of file LauAbsFitModel.hh.

Bool_t LauAbsFitModel::writeSPlotData_
private

Option to write sPlot data.

Definition at line 744 of file LauAbsFitModel.hh.


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