LauAbsFitModel.hh
Go to the documentation of this file.
167 void writeSPlotData(const TString& fileName, const TString& treeName, Bool_t storeDPEfficiency, const TString& verbosity = "q");
235 void run(const TString& applicationCode, const TString& dataFileName, const TString& dataTreeName,
283 void setNamedParameters(const TString& fileName, const TString& treeName, const std::set<TString>& parameters, const Bool_t fix);
295 void setParametersFileFallback(const TString& fileName, const TString& treeName, const std::map<TString, Double_t>& parameters, const Bool_t fix);
334 virtual void generate(const TString& dataFileName, const TString& dataTreeName, const TString& histFileName, const TString& tableFileNameBase);
349 void fit(const TString& dataFileName, const TString& dataTreeName, const TString& histFileName, const TString& tableFileNameBase);
468 virtual void finaliseExperiment( const LauAbsFitter::FitStatus& fitStat, const TObjArray* parsFromMaster, const TMatrixD* covMat, TObjArray& parsToMaster );
virtual void addSPlotNtupleIntegerBranch(const TString &name) Add a branch to the sPlot tree for storing an integer. Definition: LauAbsFitModel.cc:384 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:623 virtual Double_t getEventSum() const =0 Returns the sum of the expected events over all hypotheses; used in the EML fit scenario. void setGenValues() Make sure all parameters hold their genValue as the current value. Definition: LauAbsFitModel.cc:248 void saveFilePDF(Bool_t savePDF) Turn on or off the save of files containing graphs of the resonance's PDFs. Definition: LauAbsFitModel.hh:158 virtual void writeOutTable(const TString &outputFile)=0 Write the latex table. virtual UInt_t readExperimentData() Read in the data for the current experiment. Definition: LauAbsFitModel.cc:1053 Bool_t writeLatexTable() const Determine whether writing out of the latex table is enabled. Definition: LauAbsFitModel.hh:143 Bool_t writeSPlotData() const Determine whether the sPlot data is to be written out. Definition: LauAbsFitModel.hh:170 virtual Double_t getTotNegLogLikelihood() Calculates the total negative log-likelihood. Definition: LauAbsFitModel.cc:732 LauAbsRValuePList conVars_ Internal vectors of Gaussian parameters. Definition: LauAbsFitModel.hh:772 Bool_t storeDPEff_ Option to store DP efficiencies in the sPlot ntuple. Definition: LauAbsFitModel.hh:746 void cacheInfo(LauPdfList &pdfList, const LauFitDataTree &theData) Have all PDFs in the list cache the data. Definition: LauAbsFitModel.cc:950 virtual void setGenNtupleIntegerBranchValue(const TString &name, Int_t value) Set the value of an integer branch in the gen tree. Definition: LauAbsFitModel.cc:359 void writeLatexTable(Bool_t writeTable) Turn on or off the writing out of the latex table. Definition: LauAbsFitModel.hh:149 virtual void setupBkgndVectors()=0 Method to set up the storage for background-related quantities called by setBkgndClassNames. virtual Bool_t verifyFitData(const TString &dataFileName, const TString &dataTreeName) Open the input file and verify that all required variables are present. Definition: LauAbsFitModel.cc:521 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:856 virtual void generate(const TString &dataFileName, const TString &dataTreeName, const TString &histFileName, const TString &tableFileNameBase) Generate toy MC. Definition: LauAbsFitModel.cc:274 virtual void setBkgndClassNames(const std::vector< TString > &names) Setup the background class names. Definition: LauAbsFitModel.cc:165 void doPoissonSmearing(Bool_t poissonSmear) Turn Poisson smearing (for the toy MC generation) on or off. Definition: LauAbsFitModel.hh:131 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:82 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:614 Bool_t randomFit_ Option to randomise the initial values of the fit parameters. Definition: LauAbsFitModel.hh:748 virtual void finaliseExperiment(const LauAbsFitter::FitStatus &fitStat, const TObjArray *parsFromMaster, const TMatrixD *covMat, TObjArray &parsToMaster) Perform all finalisation actions. Definition: LauAbsFitModel.cc:1004 virtual void cacheInputSWeights() Cache the value of the sWeights to be used in the sFit. Definition: LauAbsFitModel.cc:537 virtual void setGenNtupleDoubleBranchValue(const TString &name, Double_t value) Set the value of a double branch in the gen tree. Definition: LauAbsFitModel.cc:364 virtual void setNSigEvents(LauParameter *nSigEvents)=0 Set the number of signal events. 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... 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:967 ClassDef(LauSimFitSlave, 0) Bool_t pdfsDependOnDP() const Do any of the PDFs have a dependence on the DP? Definition: LauAbsFitModel.hh:665 Bool_t compareFitData_ Option to make toy from 1st successful experiment. Definition: LauAbsFitModel.hh:738 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:957 void setParametersFileFallback(const TString &fileName, const TString &treeName, const std::map< TString, Double_t > ¶meters, const Bool_t fix) Set named model parameters from a given std::map, with fallback to those from a file. Definition: LauAbsFitModel.cc:1084 virtual Int_t getGenNtupleIntegerBranchValue(const TString &name) const Get the value of an integer branch in the gen tree. Definition: LauAbsFitModel.cc:369 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. std::set< LauParameter * > LauParameterPSet Set of parameter pointers. Definition: LauAbsFitModel.hh:308 virtual void setSPlotNtupleDoubleBranchValue(const TString &name, Double_t value) Set the value of a double branch in the sPlot tree. Definition: LauAbsFitModel.cc:399 void printFitParameters(const LauPdfList &pdfList, std::ostream &fout) const Print the fit parameters for all PDFs in the list. Definition: LauAbsFitModel.cc:926 std::map< TString, Double_t > fixParamMap_ Map from imported parameter name to value. Definition: LauAbsFitModel.hh:715 virtual void setNBkgndEvents(LauAbsRValue *nBkgndEvents)=0 Set the number of background events. std::vector< LauAbsRValue * > LauAbsRValuePList List of parameter pointers. Definition: LauAbsFitModel.hh:306 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:878 void setParametersFromMap(const std::map< TString, Double_t > ¶meters, const Bool_t fix) Set model parameters from a given std::map. Definition: LauAbsFitModel.cc:1070 virtual void recalculateNormalisation()=0 Recalculate normalisation the signal DP model(s) const LauParameterList & extraPars() const Const access the extra variables. Definition: LauAbsFitModel.hh:684 void doEMLFit(Bool_t emlFit) Choice to perform an extended maximum likelihood fit. Definition: LauAbsFitModel.hh:122 Bool_t doSFit() const Return the flag to store the status of using an sFit or not. Definition: LauAbsFitModel.hh:106 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:102 std::vector< LauParameter * > LauParameterPList List of parameter pointers. Definition: LauAbsFitModel.hh:304 void setNamedParameters(const TString &fileName, const TString &treeName, const std::set< TString > ¶meters, const Bool_t fix) Set named model parameters from a file. Definition: LauAbsFitModel.cc:1076 LauParameterList extraVars_ Extra variables that aren't in the fit but are stored in the ntuple. Definition: LauAbsFitModel.hh:769 virtual void addGenNtupleIntegerBranch(const TString &name) Add a branch to the gen tree for storing an integer. Definition: LauAbsFitModel.cc:349 Bool_t fixParams_ Whether to fix the loaded parameters (kTRUE) or leave them floating (kFALSE) Definition: LauAbsFitModel.hh:721 virtual void prepareInitialParArray(TObjArray &array) Package the initial fit parameters for transmission to the master. Definition: LauAbsFitModel.cc:984 Bool_t doPoissonSmearing() const Determine whether Poisson smearing is enabled for the toy MC generation. Definition: LauAbsFitModel.hh:125 Bool_t saveFilePDF() const save files containing graphs of the resonance's PDFs Definition: LauAbsFitModel.hh:152 virtual Double_t getGenNtupleDoubleBranchValue(const TString &name) const Get the value of a double branch in the gen tree. Definition: LauAbsFitModel.cc:374 const LauAbsRValuePList & conPars() const Const access the Gaussian constrained variables. Definition: LauAbsFitModel.hh:689 virtual void setAmpCoeffSet(LauAbsCoeffSet *coeffSet)=0 Set the DP amplitude coefficients. virtual void weightEvents(const TString &dataFileName, const TString &dataTreeName)=0 Weighting - 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:76 Bool_t doEMLFit() const Determine whether an extended maximum likelihood fit it being performed. Definition: LauAbsFitModel.hh:116 std::map< UInt_t, TString > LauBkgndClassMap A type to store background classes. Definition: LauAbsFitModel.hh:312 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:46 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:49 void setParametersFromFile(const TString &fileName, const TString &treeName, const Bool_t fix) Set model parameters from a file. Definition: LauAbsFitModel.cc:1063 void clearFitParVectors() Clear the vectors containing fit parameters. Definition: LauAbsFitModel.cc:227 virtual void addSPlotNtupleDoubleBranch(const TString &name) Add a branch to the sPlot tree for storing a double. Definition: LauAbsFitModel.cc:389 void clearExtraVarVectors() Clear the vectors containing extra ntuple variables. Definition: LauAbsFitModel.cc:242 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:561 const LauGenNtuple * genNtuple() const Const access the gen ntuple. Definition: LauAbsFitModel.hh:694 Bool_t storeDPEff() const Determine whether the efficiency information should be stored in the sPlot ntuple. Definition: LauAbsFitModel.hh:173 const LauGenNtuple * sPlotNtuple() const Const access the sPlot ntuple. Definition: LauAbsFitModel.hh:699 UInt_t bkgndClassID(const TString &className) const The number assigned to a background class. Definition: LauAbsFitModel.cc:197 File containing declaration of LauSimFitSlave class. Bool_t useRandomInitFitPars() const Determine whether the initial values of the fit parameters, in particular the isobar coefficient para... Definition: LauAbsFitModel.hh:176 virtual void finaliseFitResults(const TString &tableFileName)=0 Write the results of the fit into the ntuple. const LauFitDataTree * fitData() const Const access the data store. Definition: LauAbsFitModel.hh:704 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:976 Bool_t validBkgndClass(const TString &className) const Check if the given background class is in the list. Definition: LauAbsFitModel.cc:180 std::set< LauParameter * > allImportedFreeParams_ The set of parameters that are imported (either from a file or by value) and not. ... Definition: LauAbsFitModel.hh:726 virtual Bool_t scfDPSmear() const =0 Check if the mis-reconstructed signal is to be smeared in the DP. const LauParameterPSet & resPars() const Const access the fit variables which affect the DP normalisation. Definition: LauAbsFitModel.hh:679 void fit(const TString &dataFileName, const TString &dataTreeName, const TString &histFileName, const TString &tableFileNameBase) Perform the total fit. Definition: LauAbsFitModel.cc:409 void enableEmbedding(Bool_t enable) Turn on or off embedding of events in the generation. Definition: LauAbsFitModel.hh:140 void pdfsDependOnDP(Bool_t dependOnDP) Do any of the PDFs have a dependence on the DP? Definition: LauAbsFitModel.hh:671 virtual void setSPlotNtupleIntegerBranchValue(const TString &name, Int_t value) Set the value of an integer branch in the sPlot tree. Definition: LauAbsFitModel.cc:394 LauAbsRValuePList & conPars() Access the Gaussian constrained variables. Definition: LauAbsFitModel.hh:691 File containing declaration of LauFitObject class. virtual void updateCoeffs()=0 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:755 virtual void savePDFPlots(const TString &label)=0 Save the pdf Plots for all the resonances of experiment number fitExp. UInt_t nBkgndClasses() const Returns the number of background classes. Definition: LauAbsFitModel.hh:188 The base class for any slave process for simultaneous/combined fits. Definition: LauSimFitSlave.hh:51 const TString & bkgndClassName(UInt_t classID) const Get the name of a background class from the number. Definition: LauAbsFitModel.cc:215 void useRandomInitFitPars(Bool_t boolean) Randomise the initial values of the fit parameters, in particular the isobar coefficient parameters... Definition: LauAbsFitModel.hh:179 LauParameterPSet resVars_ Internal set of fit parameters upon which the DP normalisation depends. Definition: LauAbsFitModel.hh:766 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:103 Bool_t enableEmbedding() const Determine whether embedding of events is enabled in the generation. Definition: LauAbsFitModel.hh:134 Double_t getLogLikelihood(UInt_t iStart, UInt_t iEnd) Calculate the sum of the log-likelihood over the specified events. Definition: LauAbsFitModel.cc:771 const LauParameterPList & fitPars() const Const access the fit variables. Definition: LauAbsFitModel.hh:674 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:354 void updateFitParameters(LauPdfList &pdfList) Update the fit parameters for all PDFs in the list. Definition: LauAbsFitModel.cc:919 Bool_t pdfsDependOnDP_ Option to state if pdfs depend on DP position. Definition: LauAbsFitModel.hh:758 LauParameterPSet & resPars() Access the fit variables which affect the DP normalisation. Definition: LauAbsFitModel.hh:681 virtual void setParsFromMinuit(Double_t *par, Int_t npar) This function sets the parameter values from Minuit. Definition: LauAbsFitModel.cc:812 Pure abstract base class for defining a parameter containing an R value. Definition: LauAbsRValue.hh:43 std::set< TString > NameSet Type to store names, e.g. of the discriminating/control variables. Definition: LauSPlot.hh:73 virtual void setupResultsOutputs(const TString &histFileName, const TString &tableFileName) Setup saving of fit results to ntuple/LaTeX table etc. Definition: LauAbsFitModel.cc:514 LauAbsFitModel & operator=(const LauAbsFitModel &rhs) Copy assignment operator (not implemented) Generated by 1.8.5 |