MaCh3  2.2.3
Reference Guide
DelayedMR2T2.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Fitters/MR2T2.h"
4 
42 class DelayedMR2T2 : public MR2T2 {
43  public:
46  DelayedMR2T2(manager * const fitMan);
47 
49  virtual ~DelayedMR2T2() = default;
50 
51  protected:
53  double AcceptanceProbability() override;
54 
56  void DoStep() override;
57 
59  void StoreCurrentStep();
60 
62  void PrepareOutput();
63 
65  void ResetSystScale();
66 
69  void ScaleSystematics(const double scale);
70 
72  bool ProbabilisticDelay() const;
73 
75  std::vector<std::vector<double>> current_step_vals;
76 
78  std::vector<double> start_step_scale;
79 
81  double initial_scale;
83  double decay_rate;
86 
88  double MinLogLikelihood; // Max Likelihood
89 
92 
97 };
Implementation of delayed rejection for MR2T2.
Definition: DelayedMR2T2.h:42
bool accepted_delayed
Was the step we just accepted delayed?
Definition: DelayedMR2T2.h:91
void PrepareOutput()
override to add in rejection information to output
int max_rejections
How many rejections allowed?
Definition: DelayedMR2T2.h:85
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:96
DelayedMR2T2(manager *const fitMan)
Constructor.
Definition: DelayedMR2T2.cpp:4
std::vector< double > start_step_scale
Stores the initial scale for all parameters.
Definition: DelayedMR2T2.h:78
double AcceptanceProbability() override
Step acceptance probability.
bool delay_on_oob_only
Delay only if we go out of bounds.
Definition: DelayedMR2T2.h:94
double MinLogLikelihood
Minimum (negative) log-likelihood of proposed steps.
Definition: DelayedMR2T2.h:88
void ResetSystScale()
Reset scale after delay process.
double decay_rate
How much to decrease the step scale each step.
Definition: DelayedMR2T2.h:83
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:81
std::vector< std::vector< double > > current_step_vals
Store information about the current proposed step.
Definition: DelayedMR2T2.h:75
manager * fitMan
The manager.
Definition: FitterBase.h:110
MCMC algorithm implementing the Metropolis–Rosenbluth–Rosenbluth–Teller–Teller (MR T ) method.
Definition: MR2T2.h:25
The manager class is responsible for managing configurations and settings.
Definition: Manager.h:16