LauAbsFitModel.hh
Go to the documentation of this file.
185 void writeSPlotData(const TString& fileName, const TString& treeName, Bool_t storeDPEfficiency, const TString& verbosity = "q");
278 void run(const TString& applicationCode, const TString& dataFileName, const TString& dataTreeName,
318 virtual void addConstraint(const TString& formula, const std::vector<TString>& pars, const Double_t mean, const Double_t width);
350 virtual void generate(const TString& dataFileName, const TString& dataTreeName, const TString& histFileName, const TString& tableFileNameBase);
365 void fit(const TString& dataFileName, const TString& dataTreeName, const TString& histFileName, const TString& tableFileNameBase);
374 void fitSlave(const TString& dataFileName, const TString& dataTreeName, const TString& histFileName, const TString& tableFileNameBase);
488 virtual void finaliseResults( const Int_t fitStat, const Double_t NLL, const TObjArray* parsFromMaster, const TMatrixD* covMat, TObjArray& parsToMaster );
Double_t mean_ The mean value of the Gaussian constraint to be applied. Definition: LauAbsFitModel.hh:745 virtual void addSPlotNtupleIntegerBranch(const TString &name) Add a branch to the sPlot tree for storing an integer. Definition: LauAbsFitModel.cc:411 virtual Bool_t twoStageFit() const Determine whether the two-stage fit is enabled. Definition: LauAbsFitModel.hh:118 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:695 UInt_t firstExpt() const Obtain the number of the first experiment. Definition: LauAbsFitModel.hh:216 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:210 void setGenValues() Make sure all parameters hold their genValue as the current value. Definition: LauAbsFitModel.cc:278 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:170 Bool_t writeSPlotData() const Determine whether the sPlot data is to be written out. Definition: LauAbsFitModel.hh:188 virtual Double_t getTotNegLogLikelihood() Calculates the total negative log-likelihood. Definition: LauAbsFitModel.cc:794 LauAbsRValuePList conVars_ Internal vectors of Gaussian parameters. Definition: LauAbsFitModel.hh:801 Bool_t storeDPEff_ Option to store DP efficiencies in the sPlot ntuple. Definition: LauAbsFitModel.hh:766 void cacheInfo(LauPdfList &pdfList, const LauFitDataTree &theData) Have all PDFs in the list cache the data. Definition: LauAbsFitModel.cc:1020 virtual void setGenNtupleIntegerBranchValue(const TString &name, Int_t value) Set the value of an integer branch in the gen tree. Definition: LauAbsFitModel.cc:386 void writeLatexTable(Bool_t writeTable) Turn on or off the writing out of the latex table. Definition: LauAbsFitModel.hh:176 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:833 Bool_t useAsymmFitErrors() const Determine whether calculation of asymmetric errors is enabled. Definition: LauAbsFitModel.hh:134 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:916 virtual void generate(const TString &dataFileName, const TString &dataTreeName, const TString &histFileName, const TString &tableFileNameBase) Generate toy MC. Definition: LauAbsFitModel.cc:304 virtual void setBkgndClassNames(const std::vector< TString > &names) Setup the background class names. Definition: LauAbsFitModel.cc:195 void doPoissonSmearing(Bool_t poissonSmear) Turn Poisson smearing (for the toy MC generation) on or off. Definition: LauAbsFitModel.hh:149 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:686 Bool_t randomFit_ Option to randomise the initial values of the fit parameters. Definition: LauAbsFitModel.hh:768 std::vector< TString > conPars_ The list of LauParameter names to be used in the LauFormulaPar. Definition: LauAbsFitModel.hh:743 virtual void cacheInputSWeights() Cache the value of the sWeights to be used in the sFit. Definition: LauAbsFitModel.cc:586 virtual void setGenNtupleDoubleBranchValue(const TString &name, Double_t value) Set the value of a double branch in the gen tree. Definition: LauAbsFitModel.cc:391 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:539 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:1037 ClassDef(LauSimFitSlave, 0) Bool_t pdfsDependOnDP() const Do any of the PDFs have a dependence on the DP? Definition: LauAbsFitModel.hh:678 Bool_t compareFitData_ Option to make toy from 1st successful experiment. Definition: LauAbsFitModel.hh:760 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:1027 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. Definition: LauAbsFitModel.cc:939 virtual Int_t getGenNtupleIntegerBranchValue(const TString &name) const Get the value of an integer branch in the gen tree. Definition: LauAbsFitModel.cc:396 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:549 std::set< LauParameter * > LauParameterPSet Set of parameter pointers. Definition: LauAbsFitModel.hh:331 virtual void setSPlotNtupleDoubleBranchValue(const TString &name, Double_t value) Set the value of a double branch in the sPlot tree. Definition: LauAbsFitModel.cc:426 void printFitParameters(const LauPdfList &pdfList, std::ostream &fout) const Print the fit parameters for all PDFs in the list. Definition: LauAbsFitModel.cc:996 virtual UInt_t readExperimentData(const UInt_t exptIndex) Read in the data for the specified experiment. Definition: LauAbsFitModel.cc:1126 std::vector< LauAbsRValue * > LauAbsRValuePList List of parameter pointers. Definition: LauAbsFitModel.hh:329 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:949 virtual void recalculateNormalisation()=0 Recalculate normalisation the signal DP model(s) const LauParameterList & extraPars() const Access the extra variables. Definition: LauAbsFitModel.hh:695 void doEMLFit(Bool_t emlFit) Choice to perform an extended maximum likelihood fit. Definition: LauAbsFitModel.hh:115 Bool_t doSFit() const Return the flag to store the status of using an sFit or not. Definition: LauAbsFitModel.hh:99 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:105 std::vector< LauParameter * > LauParameterPList List of parameter pointers. Definition: LauAbsFitModel.hh:327 LauParameterList extraVars_ Extra variables that aren't in the fit but are stored in the ntuple. Definition: LauAbsFitModel.hh:798 std::vector< StoreConstraints > storeCon_ Store the constraints for fit parameters until initialisation is complete. Definition: LauAbsFitModel.hh:751 virtual void addGenNtupleIntegerBranch(const TString &name) Add a branch to the gen tree for storing an integer. Definition: LauAbsFitModel.cc:376 virtual void prepareInitialParArray(TObjArray &array) Package the initial fit parameters for transmission to the master. Definition: LauAbsFitModel.cc:1054 virtual void withinAsymErrorCalc(Bool_t inAsymErrCalc) Mark that the fit is calculating asymmetric errors. Definition: LauAbsFitModel.hh:167 Bool_t doPoissonSmearing() const Determine whether Poisson smearing is enabled for the toy MC generation. Definition: LauAbsFitModel.hh:143 virtual Double_t getGenNtupleDoubleBranchValue(const TString &name) const Get the value of a double branch in the gen tree. Definition: LauAbsFitModel.cc:401 const LauAbsRValuePList & conPars() const Access the Gaussian constrained variables. Definition: LauAbsFitModel.hh:699 void setNExpts(UInt_t nExperiments, UInt_t firstExperiment=0) Set the number of experiments and the first experiment. Definition: LauAbsFitModel.hh:204 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:109 std::map< UInt_t, TString > LauBkgndClassMap A type to store background classes. Definition: LauAbsFitModel.hh:335 virtual void twoStageFit(Bool_t doTwoStageFit) Turn on or off the two stage fit. Definition: LauAbsFitModel.hh:131 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:257 virtual void addSPlotNtupleDoubleBranch(const TString &name) Add a branch to the sPlot tree for storing a double. Definition: LauAbsFitModel.cc:416 void clearExtraVarVectors() Clear the vectors containing extra ntuple variables. Definition: LauAbsFitModel.cc:272 Struct to store constraint information until the fit is run. Definition: LauAbsFitModel.hh:739 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:610 Bool_t storeDPEff() const Determine whether the efficiency information should be stored in the sPlot ntuple. Definition: LauAbsFitModel.hh:191 UInt_t bkgndClassID(const TString &className) const The number assigned to a background class. Definition: LauAbsFitModel.cc:227 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:194 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:1046 Bool_t validBkgndClass(const TString &className) const Check if the given background class is in the list. Definition: LauAbsFitModel.cc:210 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:570 const LauParameterPSet & resPars() const Access the fit variables which affect the DP normalisation. Definition: LauAbsFitModel.hh:691 virtual void finaliseResults(const Int_t fitStat, const Double_t NLL, const TObjArray *parsFromMaster, const TMatrixD *covMat, TObjArray &parsToMaster) Perform all finalisation actions. Definition: LauAbsFitModel.cc:1072 void fit(const TString &dataFileName, const TString &dataTreeName, const TString &histFileName, const TString &tableFileNameBase) Perform the total fit. Definition: LauAbsFitModel.cc:436 void enableEmbedding(Bool_t enable) Turn on or off embedding of events in the generation. Definition: LauAbsFitModel.hh:158 void pdfsDependOnDP(Bool_t dependOnDP) Do any of the PDFs have a dependence on the DP? Definition: LauAbsFitModel.hh:684 virtual void setSPlotNtupleIntegerBranchValue(const TString &name, Int_t value) Set the value of an integer branch in the sPlot tree. Definition: LauAbsFitModel.cc:421 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:747 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:152 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:817 UInt_t nBkgndClasses() const Returns the number of background classes. Definition: LauAbsFitModel.hh:228 The base class for any slave process for simultaneous/combined fits. Definition: LauSimFitSlave.hh:36 const TString & bkgndClassName(UInt_t classID) const Get the name of a background class from the number. Definition: LauAbsFitModel.cc:245 void useRandomInitFitPars(Bool_t boolean) Randomise the initial values of the fit parameters, in particular the isobar coefficient parameters... Definition: LauAbsFitModel.hh:197 LauParameterPSet resVars_ Internal set of fit parameters upon which the DP normalisation depends. Definition: LauAbsFitModel.hh:795 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:96 Bool_t enableEmbedding() const Determine whether embedding of events is enabled in the generation. Definition: LauAbsFitModel.hh:152 Double_t getLogLikelihood(UInt_t iStart, UInt_t iEnd) Calculate the sum of the log-likelihood over the specified events. Definition: LauAbsFitModel.cc:833 const TMatrixD & covarianceMatrix() const Access the fit covariance matrix. Definition: LauAbsFitModel.hh:725 const LauParameterPList & fitPars() const Access the fit variables. Definition: LauAbsFitModel.hh:687 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:381 void useAsymmFitErrors(Bool_t useAsymmErrors) Turn on or off the computation of asymmetric errors (e.g. MINOS routine in Minuit) ... Definition: LauAbsFitModel.hh:140 void updateFitParameters(LauPdfList &pdfList) Update the fit parameters for all PDFs in the list. Definition: LauAbsFitModel.cc:989 Bool_t pdfsDependOnDP_ Option to state if pdfs depend on DP position. Definition: LauAbsFitModel.hh:778 virtual void setParsFromMinuit(Double_t *par, Int_t npar) This function sets the parameter values from Minuit. Definition: LauAbsFitModel.cc:873 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 LauAbsFitModel & operator=(const LauAbsFitModel &rhs) Copy assignment operator (not implemented) Generated by 1.8.5 |