MaCh3  2.4.2
Reference Guide
DelayedMR2T2.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Fitters/MR2T2.h"
4 
44 class DelayedMR2T2 : public MR2T2 {
45  public:
48  DelayedMR2T2(Manager * const fitMan);
49 
51  virtual ~DelayedMR2T2() = default;
52 
53  protected:
55  double AcceptanceProbability() override;
56 
58  void DoStep() override;
59 
61  void StoreCurrentStep();
62 
64  void PrepareOutput();
65 
67  void ResetSystScale();
68 
71  void ScaleSystematics(const double scale);
72 
74  bool ProbabilisticDelay() const;
75 
77  std::vector<std::vector<double>> current_step_vals;
78 
80  std::vector<double> start_step_scale;
81 
83  double initial_scale;
85  double decay_rate;
88 
90  double MinLogLikelihood; // Max Likelihood
91 
94 
99 };
Implementation of delayed rejection for MR2T2.
Definition: DelayedMR2T2.h:44
bool accepted_delayed
Was the step we just accepted delayed?
Definition: DelayedMR2T2.h:93
void PrepareOutput()
override to add in rejection information to output
int max_rejections
How many rejections allowed?
Definition: DelayedMR2T2.h:87
bool ProbabilisticDelay() const
if delay has a chance of occurring
void StoreCurrentStep()
Store information about the current proposed step.
double delay_probability
Can delay with probability instead.
Definition: DelayedMR2T2.h:98
std::vector< double > start_step_scale
Stores the initial scale for all parameters.
Definition: DelayedMR2T2.h:80
double AcceptanceProbability() override
Step acceptance probability.
bool delay_on_oob_only
Delay only if we go out of bounds.
Definition: DelayedMR2T2.h:96
double MinLogLikelihood
Minimum (negative) log-likelihood of proposed steps.
Definition: DelayedMR2T2.h:90
DelayedMR2T2(Manager *const fitMan)
Constructor.
Definition: DelayedMR2T2.cpp:4
void ResetSystScale()
Reset scale after delay process.
double decay_rate
How much to decrease the step scale each step.
Definition: DelayedMR2T2.h:85
void DoStep() override
The MCMC step proposal.
virtual ~DelayedMR2T2()=default
Destructor.
void ScaleSystematics(const double scale)
Set parameter scale to be original_scale* scale.
double initial_scale
Scale for (non-delayed) step is initial_scale * start_step_scale.
Definition: DelayedMR2T2.h:83
std::vector< std::vector< double > > current_step_vals
Store information about the current proposed step.
Definition: DelayedMR2T2.h:77
Manager * fitMan
The manager for configuration handling.
Definition: FitterBase.h:108
MCMC algorithm implementing the Metropolis–Rosenbluth–Rosenbluth–Teller–Teller (MR T ) method.
Definition: MR2T2.h:27
The manager class is responsible for managing configurations and settings.
Definition: Manager.h:16