LauAbsFitModel.hh
Go to the documentation of this file.
182 void writeSPlotData(const TString& fileName, const TString& treeName, Bool_t storeDPEfficiency, const TString& verbosity = "q");
275 void run(const TString& applicationCode, const TString& dataFileName, const TString& dataTreeName,
315 void addConstraint(const TString& formula, const std::vector<TString>& pars, const Double_t mean, const Double_t width);
348 virtual void generate(const TString& dataFileName, const TString& dataTreeName, const TString& histFileName, const TString& tableFileNameBase);
363 void fit(const TString& dataFileName, const TString& dataTreeName, const TString& histFileName, const TString& tableFileNameBase);
372 void fitSlave(const TString& dataFileName, const TString& dataTreeName, const TString& histFileName, const TString& tableFileNameBase);
Double_t mean_ The mean value of the Gaussian constraint to be applied. Definition: LauAbsFitModel.hh:703 virtual void addSPlotNtupleIntegerBranch(const TString &name) Add a branch to the sPlot tree for storing an integer. Definition: LauAbsFitModel.cc:435 virtual Bool_t twoStageFit() const Determine whether the two-stage fit is enabled. Definition: LauAbsFitModel.hh:115 virtual Bool_t genExpt()=0 The method that actually generates the toy MC events for the given experiment. File containing declaration of LauFormulaPar class. void createFitToyMC(const TString &mcFileName, const TString &tableFileName) Create a toy MC sample from the fitted parameters. Definition: LauAbsFitModel.cc:889 UInt_t firstExpt() const Obtain the number of the first experiment. Definition: LauAbsFitModel.hh:213 virtual Double_t getEventSum() const =0 Returns the sum of the expected events over all hypotheses; used in the EML fit scenario. UInt_t eventsPerExpt() const Obtain the total number of events in the current experiment. Definition: LauAbsFitModel.hh:207 void setGenValues() Make sure all parameters hold their genValue as the current value. Definition: LauAbsFitModel.cc:302 Double_t * parValues_ Parameter values array (for reading from the master) Definition: LauAbsFitModel.hh:845 virtual void writeOutTable(const TString &outputFile)=0 Write the latex table. Bool_t writeLatexTable() const Determine whether writing out of the latex table is enabled. Definition: LauAbsFitModel.hh:167 Bool_t writeSPlotData() const Determine whether the sPlot data is to be written out. Definition: LauAbsFitModel.hh:185 Double_t getTotNegLogLikelihood() Calculates the total negative log-likelihood. Definition: LauAbsFitModel.cc:988 LauAbsRValuePList conVars_ Internal vectors of Gaussian parameters. Definition: LauAbsFitModel.hh:756 Bool_t storeDPEff_ Option to store DP efficiencies in the sPlot ntuple. Definition: LauAbsFitModel.hh:724 void cacheInfo(LauPdfList &pdfList, const LauFitDataTree &theData) Have all PDFs in the list cache the data. Definition: LauAbsFitModel.cc:1199 virtual void setGenNtupleIntegerBranchValue(const TString &name, Int_t value) Set the value of an integer branch in the gen tree. Definition: LauAbsFitModel.cc:410 void writeLatexTable(Bool_t writeTable) Turn on or off the writing out of the latex table. Definition: LauAbsFitModel.hh:173 virtual void setupBkgndVectors()=0 Method to set up the storage for background-related quantities called by setBkgndClassNames. Bool_t withinAsymErrorCalc_ Flag to indicate if the asymmetric error calculation (e.g. MINOS) is currently running. Definition: LauAbsFitModel.hh:788 Bool_t useAsymmFitErrors() const Determine whether calculation of asymmetric errors is enabled. Definition: LauAbsFitModel.hh:131 virtual void setupGenNtupleBranches()=0 Setup the generation ntuple branches. UInt_t addFitParameters(LauPdfList &pdfList) Add parameters of the PDFs in the list to the list of all fit parameters. Definition: LauAbsFitModel.cc:1095 virtual void generate(const TString &dataFileName, const TString &dataTreeName, const TString &histFileName, const TString &tableFileNameBase) Generate toy MC. Definition: LauAbsFitModel.cc:328 virtual void setBkgndClassNames(const std::vector< TString > &names) Setup the background class names. Definition: LauAbsFitModel.cc:219 void doPoissonSmearing(Bool_t poissonSmear) Turn Poisson smearing (for the toy MC generation) on or off. Definition: LauAbsFitModel.hh:146 std::multimap< TString, std::pair< TString, TString > > TwoDMap Type to associate the name of the species that have 2D PDFs with the names of the two variables invol... Definition: LauSPlot.hh:68 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. Definition: LauAbsFitModel.cc:880 Bool_t randomFit_ Option to randomise the initial values of the fit parameters. Definition: LauAbsFitModel.hh:726 std::vector< TString > conPars_ The list of LauParameter names to be used in the LauFormulaPar. Definition: LauAbsFitModel.hh:701 virtual void cacheInputSWeights() Cache the value of the sWeights to be used in the sFit. Definition: LauAbsFitModel.cc:780 virtual void setGenNtupleDoubleBranchValue(const TString &name, Double_t value) Set the value of a double branch in the gen tree. Definition: LauAbsFitModel.cc:415 virtual void setNSigEvents(LauParameter *nSigEvents)=0 Set the number of signal events. void eventsPerExpt(UInt_t nEvents) Set the number of events in the current experiment. Definition: LauAbsFitModel.hh:507 virtual void storePerEvtLlhds()=0 Store the per-event likelihood values. virtual void printEventInfo(UInt_t iEvt) const Prints the values of all the fit variables for the specified event - useful for diagnostics. Definition: LauAbsFitModel.cc:1216 Bool_t pdfsDependOnDP() const Do any of the PDFs have a dependence on the DP? Definition: LauAbsFitModel.hh:646 Bool_t compareFitData_ Option to make toy from 1st successful experiment. Definition: LauAbsFitModel.hh:718 Double_t prodPdfValue(LauPdfList &pdfList, UInt_t iEvt) Calculate the product of the per-event likelihoods of the PDFs in the list. Definition: LauAbsFitModel.cc:1206 void addConstraint(const TString &formula, const std::vector< TString > &pars, const Double_t mean, const Double_t width) Store constraint information for fit parameters. Definition: LauAbsFitModel.cc:1118 virtual Int_t getGenNtupleIntegerBranchValue(const TString &name) const Get the value of an integer branch in the gen tree. Definition: LauAbsFitModel.cc:420 virtual LauSPlot::NumbMap fixdSpeciesNames() const =0 Returns the names and yields of species that are fixed in the fit. virtual void setupSPlotNtupleBranches()=0 Setup the branches of the sPlot tuple. void fitSlave(const TString &dataFileName, const TString &dataTreeName, const TString &histFileName, const TString &tableFileNameBase) Slaves required when performing a simultaneous fit. Definition: LauAbsFitModel.cc:575 virtual void setSPlotNtupleDoubleBranchValue(const TString &name, Double_t value) Set the value of a double branch in the sPlot tree. Definition: LauAbsFitModel.cc:450 void printFitParameters(const LauPdfList &pdfList, std::ostream &fout) const Print the fit parameters for all PDFs in the list. Definition: LauAbsFitModel.cc:1175 std::vector< LauAbsRValue * > LauAbsRValuePList List of parameter pointers. Definition: LauAbsFitModel.hh:326 virtual Double_t getTotEvtLikelihood(UInt_t iEvt)=0 Calculates the likelihood for a given event. virtual void propagateParUpdates()=0 This function (specific to each model) calculates anything that depends on the fit parameter values... void addConParameters() Add parameters to the list of Gaussian constrained parameters. Definition: LauAbsFitModel.cc:1128 const LauParameterList & extraPars() const Access the extra variables. Definition: LauAbsFitModel.hh:659 void doEMLFit(Bool_t emlFit) Choice to perform an extended maximum likelihood fit. Definition: LauAbsFitModel.hh:112 Bool_t doSFit() const Return the flag to store the status of using an sFit or not. Definition: LauAbsFitModel.hh:96 void run(const TString &applicationCode, const TString &dataFileName, const TString &dataTreeName, const TString &histFileName, const TString &tableFileName="") Start the toy generation / fitting. Definition: LauAbsFitModel.cc:111 std::vector< LauParameter * > LauParameterPList List of parameter pointers. Definition: LauAbsFitModel.hh:324 LauParameterList extraVars_ Extra variables that aren't in the fit but are stored in the ntuple. Definition: LauAbsFitModel.hh:753 std::vector< StoreConstraints > storeCon_ Store the constraints for fit parameters until initialisation is complete. Definition: LauAbsFitModel.hh:709 virtual void addGenNtupleIntegerBranch(const TString &name) Add a branch to the gen tree for storing an integer. Definition: LauAbsFitModel.cc:400 virtual void withinAsymErrorCalc(Bool_t inAsymErrCalc) Mark that the fit is calculating asymmetric errors. Definition: LauAbsFitModel.hh:164 Bool_t doPoissonSmearing() const Determine whether Poisson smearing is enabled for the toy MC generation. Definition: LauAbsFitModel.hh:140 virtual Double_t getGenNtupleDoubleBranchValue(const TString &name) const Get the value of a double branch in the gen tree. Definition: LauAbsFitModel.cc:425 const LauAbsRValuePList & conPars() const Access the Gaussian constrained variables. Definition: LauAbsFitModel.hh:663 void setNExpts(UInt_t nExperiments, UInt_t firstExperiment=0) Set the number of experiments and the first experiment. Definition: LauAbsFitModel.hh:201 virtual void setAmpCoeffSet(LauAbsCoeffSet *coeffSet)=0 Set the DP amplitude coefficients. virtual void weightEvents(const TString &dataFileName, const TString &dataTreeName)=0 Reweighting - allows e.g. MC events to be weighted by the DP model. std::map< TString, Double_t > NumbMap Type to associate a category name with a double precision number, e.g. a yield or PDF value for a giv... Definition: LauSPlot.hh:62 Bool_t doEMLFit() const Determine whether an extended maximum likelihood fit it being performed. Definition: LauAbsFitModel.hh:106 std::map< UInt_t, TString > LauBkgndClassMap A type to store background classes. Definition: LauAbsFitModel.hh:330 virtual void twoStageFit(Bool_t doTwoStageFit) Turn on or off the two stage fit. Definition: LauAbsFitModel.hh:128 virtual LauSPlot::NumbMap freeSpeciesNames() const =0 Returns the names and yields of species that are free in the fit. Class to store the results from the toy MC generation into an ntuple. Definition: LauGenNtuple.hh:32 File containing declaration of LauSPlot class. virtual Bool_t splitSignal() const =0 Check if the signal is split into well-reconstructed and mis-reconstructed types. ... Class for defining the abstract interface for complex coefficient classes. Definition: LauAbsCoeffSet.hh:34 void clearFitParVectors() Clear the vectors containing fit parameters. Definition: LauAbsFitModel.cc:281 virtual void addSPlotNtupleDoubleBranch(const TString &name) Add a branch to the sPlot tree for storing a double. Definition: LauAbsFitModel.cc:440 void clearExtraVarVectors() Clear the vectors containing extra ntuple variables. Definition: LauAbsFitModel.cc:296 Struct to store constraint information until the fit is run. Definition: LauAbsFitModel.hh:697 virtual void setNBkgndEvents(LauParameter *nBkgndEvents)=0 Set the number of background events. virtual void cacheInputFitVars()=0 Cache the input data values to calculate the likelihood during the fit. void fitExpt() Routine to perform the actual fit for a given experiment. Definition: LauAbsFitModel.cc:804 Bool_t storeDPEff() const Determine whether the efficiency information should be stored in the sPlot ntuple. Definition: LauAbsFitModel.hh:188 UInt_t bkgndClassID(const TString &className) const The number assigned to a background class. Definition: LauAbsFitModel.cc:251 Bool_t useRandomInitFitPars() const Determine whether the initial values of the fit parameters, in particular the isobar coefficient para... Definition: LauAbsFitModel.hh:191 virtual void finaliseFitResults(const TString &tableFileName)=0 Write the results of the fit into the ntuple. virtual void checkInitFitParams()=0 Update initial fit parameters if required. virtual void printVarsInfo() const Same as printEventInfo, but printing out the values of the variables in the fit. Definition: LauAbsFitModel.cc:1225 Bool_t validBkgndClass(const TString &className) const Check if the given background class is in the list. Definition: LauAbsFitModel.cc:234 virtual Bool_t scfDPSmear() const =0 Check if the mis-reconstructed signal is to be smeared in the DP. Bool_t cacheFitData(const TString &dataFileName, const TString &dataTreeName) Store variables from the input file into the internal data storage. Definition: LauAbsFitModel.cc:764 void fit(const TString &dataFileName, const TString &dataTreeName, const TString &histFileName, const TString &tableFileNameBase) Perform the total fit. Definition: LauAbsFitModel.cc:460 void enableEmbedding(Bool_t enable) Turn on or off embedding of events in the generation. Definition: LauAbsFitModel.hh:155 void pdfsDependOnDP(Bool_t dependOnDP) Do any of the PDFs have a dependence on the DP? Definition: LauAbsFitModel.hh:652 virtual void setSPlotNtupleIntegerBranchValue(const TString &name, Int_t value) Set the value of an integer branch in the sPlot tree. Definition: LauAbsFitModel.cc:445 File containing declaration of LauFitObject class. virtual void updateCoeffs()=0 Double_t width_ The width of the Gaussian constraint to be applied. Definition: LauAbsFitModel.hh:705 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. Definition: LauAbsFitModel.cc:160 virtual LauSPlot::TwoDMap twodimPDFs() const =0 Returns the species and variables for all 2D PDFs in the fit. Double_t getLogLikelihoodPenalty() Calculate the penalty terms to the log likelihood from Gaussian constraints. Definition: LauAbsFitModel.cc:1011 UInt_t nBkgndClasses() const Returns the number of background classes. Definition: LauAbsFitModel.hh:225 const TString & bkgndClassName(UInt_t classID) const Get the name of a background class from the number. Definition: LauAbsFitModel.cc:269 void useRandomInitFitPars(Bool_t boolean) Randomise the initial values of the fit parameters, in particular the isobar coefficient parameters... Definition: LauAbsFitModel.hh:194 void useDP(Bool_t usingDP) Switch on/off the Dalitz plot term in the Likelihood (allows fits to other quantities, e.g. B mass) Definition: LauAbsFitModel.hh:93 Bool_t enableEmbedding() const Determine whether embedding of events is enabled in the generation. Definition: LauAbsFitModel.hh:149 Double_t getLogLikelihood(UInt_t iStart, UInt_t iEnd) Calculate the sum of the log-likelihood over the specified events. Definition: LauAbsFitModel.cc:1027 const TMatrixD & covarianceMatrix() const Access the fit covariance matrix. Definition: LauAbsFitModel.hh:689 const LauParameterPList & fitPars() const Access the fit variables. Definition: LauAbsFitModel.hh:655 virtual LauSPlot::NameSet variableNames() const =0 Returns the names of all variables in the fit. virtual void addGenNtupleDoubleBranch(const TString &name) Add a branch to the gen tree for storing a double. Definition: LauAbsFitModel.cc:405 void useAsymmFitErrors(Bool_t useAsymmErrors) Turn on or off the computation of asymmetric errors (e.g. MINOS routine in Minuit) ... Definition: LauAbsFitModel.hh:137 void updateFitParameters(LauPdfList &pdfList) Update the fit parameters for all PDFs in the list. Definition: LauAbsFitModel.cc:1168 Bool_t pdfsDependOnDP_ Option to state if pdfs depend on DP position. Definition: LauAbsFitModel.hh:736 virtual void setParsFromMinuit(Double_t *par, Int_t npar) This function sets the parameter values from Minuit. Definition: LauAbsFitModel.cc:1067 Pure abstract base class for defining a parameter containing an R value. Definition: LauAbsRValue.hh:29 std::set< TString > NameSet Type to store names, e.g. of the discriminating/control variables. Definition: LauSPlot.hh:59 The abstract interface for the objects that control the calculation of the likelihood. Definition: LauFitObject.hh:26 Generated by 1.8.5 |