![]() |
MaCh3 2.2.1
Reference Guide
|
Implementation of Minuit fitting algorithm [15]. More...
#include <Fitters/MinuitFit.h>
Public Member Functions | |
MinuitFit (manager *const fitMan) | |
Constructor. | |
virtual | ~MinuitFit () |
Destructor. | |
void | RunMCMC () override |
Actual implementation of Minuit Fit algorithm. | |
std::string | GetName () const |
Get name of class. | |
![]() | |
LikelihoodFit (manager *const fitMan) | |
Constructor. | |
virtual | ~LikelihoodFit () |
Destructor. | |
virtual double | CalcChi2 (const double *x) |
Chi2 calculation over all included samples and syst objects. | |
int | GetNPars () |
Get total number of params, this sums over all covariance objects. | |
virtual void | RunMCMC ()=0 |
Implementation of fitting algorithm. | |
virtual std::string | GetName () const |
Get name of class. | |
![]() | |
FitterBase (manager *const fitMan) | |
Constructor. | |
virtual | ~FitterBase () |
Destructor for the FitterBase class. | |
void | AddSampleHandler (SampleHandlerBase *sample) |
This function adds a sample PDF object to the analysis framework. The sample PDF object will be utilized in fitting procedures or likelihood scans. | |
void | AddSystObj (ParameterHandlerBase *cov) |
This function adds a Covariance object to the analysis framework. The Covariance object will be utilized in fitting procedures or likelihood scans. | |
virtual void | RunMCMC ()=0 |
The specific fitting algorithm implemented in this function depends on the derived class. It could be Markov Chain Monte Carlo (MCMC), MinuitFit, or another algorithm. | |
void | DragRace (const int NLaps=100) |
Calculates the required time for each sample or covariance object in a drag race simulation. Inspired by Dan's feature. | |
void | RunLLHScan () |
Perform a 1D likelihood scan. | |
void | GetStepScaleBasedOnLLHScan () |
LLH scan is good first estimate of step scale. | |
void | Run2DLLHScan () |
Perform a 2D likelihood scan. | |
void | RunSigmaVar () |
Perform a 2D and 1D sigma var for all samples. | |
virtual void | StartFromPreviousFit (const std::string &FitName) |
Allow to start from previous fit/chain. | |
virtual std::string | GetName () const |
Get name of class. | |
Private Attributes | |
std::unique_ptr< ROOT::Math::Minimizer > | minuit |
Pointer to minimizer, which most often is Minuit. | |
Additional Inherited Members | |
![]() | |
void | PrepareFit () |
prepare output and perform sanity checks | |
![]() | |
void | ProcessMCMC () |
Process MCMC output. | |
void | PrepareOutput () |
Prepare the output file. | |
void | SaveOutput () |
Save output and close files. | |
void | SanitiseInputs () |
Remove obsolete memory and make other checks before fit starts. | |
void | SaveSettings () |
Save the settings that the MCMC was run with. | |
bool | GetScaneRange (std::map< std::string, std::vector< double > > &scanRanges) |
YSP: Set up a mapping to store parameters with user-specified ranges, suggested by D. Barrow. | |
bool | CheckSkipParameter (const std::vector< std::string > &SkipVector, const std::string &ParamName) const |
KS: Check whether we want to skip parameter using skip vector. | |
![]() | |
int | NPars |
Number of all parameters from all covariances. | |
int | NParsPCA |
Number of all parameters from all covariances in PCA base. | |
bool | fMirroring |
Flag telling if mirroring is used or not. | |
![]() | |
manager * | fitMan |
The manager. | |
unsigned int | step |
current state | |
double | logLCurr |
current likelihood | |
double | logLProp |
proposed likelihood | |
double | accProb |
current acceptance prob | |
int | accCount |
counts accepted steps | |
int | stepStart |
step start if restarting | |
std::vector< double > | sample_llh |
store the llh breakdowns | |
std::vector< double > | syst_llh |
systematic llh breakdowns | |
std::vector< SampleHandlerBase * > | samples |
Sample holder. | |
unsigned int | TotalNSamples |
Total number of samples used. | |
std::vector< ParameterHandlerBase * > | systematics |
Systematic holder. | |
std::unique_ptr< TStopwatch > | clock |
tells global time how long fit took | |
std::unique_ptr< TStopwatch > | stepClock |
tells how long single step/fit iteration took | |
double | stepTime |
Time of single step. | |
std::unique_ptr< TRandom3 > | random |
Random number. | |
TFile * | outputFile |
Output. | |
TDirectory * | CovFolder |
Output cov folder. | |
TDirectory * | SampleFolder |
Output sample folder. | |
TTree * | outTree |
Output tree with posteriors. | |
int | auto_save |
auto save every N steps | |
bool | fTestLikelihood |
Necessary for some fitting algorithms like PSO. | |
bool | FileSaved |
Checks if file saved not repeat some operations. | |
bool | SettingsSaved |
Checks if setting saved not repeat some operations. | |
bool | OutputPrepared |
Checks if output prepared not repeat some operations. | |
Implementation of Minuit fitting algorithm [15].
Definition at line 14 of file MinuitFit.h.
MinuitFit::MinuitFit | ( | manager *const | fitMan | ) |
Constructor.
Definition at line 5 of file MinuitFit.cpp.
|
virtual |
|
inlinevirtual |
Get name of class.
Reimplemented from LikelihoodFit.
Definition at line 25 of file MinuitFit.h.
|
overridevirtual |
Actual implementation of Minuit Fit algorithm.
Implements LikelihoodFit.
Definition at line 40 of file MinuitFit.cpp.
|
private |
Pointer to minimizer, which most often is Minuit.
Definition at line 29 of file MinuitFit.h.