18 class TGraphAsymmErrors;
44 void DragRace(
const int NLaps = 100);
89 bool GetScaneRange(std::map<std::string, std::vector<double>>& scanRanges);
92 bool CheckSkipParameter(
const std::vector<std::string>& SkipVector,
const std::string& ParamName)
const;
107 void CustomRange(
const std::string& ParName,
const double sigma,
double& ParamShiftValue);
176 std::ofstream debugFile;
Base class for implementing fitting algorithms.
void RunLLHScan()
Perform a 1D likelihood scan.
void AddSystObj(ParameterHandlerBase *cov)
This function adds a Covariance object to the analysis framework. The Covariance object will be utili...
std::string GetName() const
Get name of class.
void AddSampleHandler(SampleHandlerBase *sample)
This function adds a sample PDF object to the analysis framework. The sample PDF object will be utili...
std::unique_ptr< TRandom3 > random
Random number.
std::vector< SampleHandlerBase * > samples
Sample holder.
double logLProp
proposed likelihood
bool CheckSkipParameter(const std::vector< std::string > &SkipVector, const std::string &ParamName) const
KS: Check whether we want to skip parameter using skip vector.
void ProcessMCMC()
Process MCMC output.
int accCount
counts accepted steps
bool OutputPrepared
Checks if output prepared not repeat some operations.
void SaveOutput()
Save output and close files.
TFile * outputFile
Output.
void SaveSettings()
Save the settings that the MCMC was run with.
manager * fitMan
The manager.
unsigned int step
current state
void PrepareOutput()
Prepare the output file.
bool SettingsSaved
Checks if setting saved not repeat some operations.
virtual void RunMCMC()=0
The specific fitting algorithm implemented in this function depends on the derived class....
double accProb
current acceptance prob
void GetStepScaleBasedOnLLHScan()
LLH scan is good first estimate of step scale.
virtual void StartFromPreviousFit(const std::string &FitName)
Allow to start from previous fit/chain.
bool FileSaved
Checks if file saved not repeat some operations.
std::string AlgorithmName
Name of fitting algorithm that is being used.
std::vector< double > sample_llh
store the llh breakdowns
void RunSigmaVar()
Perform a 2D and 1D sigma var for all samples.
double stepTime
Time of single step.
std::unique_ptr< TStopwatch > clock
tells global time how long fit took
unsigned int stepStart
step start, by default 0 if we start from previous chain then it will be different
void CustomRange(const std::string &ParName, const double sigma, double &ParamShiftValue)
For comparison with P-Theta we usually have to apply different parameter values then usual 1,...
std::unique_ptr< TStopwatch > stepClock
tells how long single step/fit iteration took
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....
TDirectory * CovFolder
Output cov folder.
TDirectory * SampleFolder
Output sample folder.
void DragRace(const int NLaps=100)
Calculates the required time for each sample or covariance object in a drag race simulation....
void Run2DLLHScan()
Perform a 2D likelihood scan.
unsigned int TotalNSamples
Total number of samples used.
double logLCurr
current likelihood
std::vector< double > syst_llh
systematic llh breakdowns
int auto_save
auto save every N steps
FitterBase(manager *const fitMan)
Constructor.
bool fTestLikelihood
Necessary for some fitting algorithms like PSO.
virtual ~FitterBase()
Destructor for the FitterBase class.
void RunSigmaVarFD()
Perform a 1D sigma var for all samples.
TTree * outTree
Output tree with posteriors.
void SanitiseInputs()
Remove obsolete memory and make other checks before fit starts.
std::vector< ParameterHandlerBase * > systematics
Systematic holder.
Base class responsible for handling of systematic error parameters. Capable of using PCA or using ada...
Class responsible for handling implementation of samples used in analysis, reweighting and returning ...
The manager class is responsible for managing configurations and settings.