GooFit  v2.1.3
FitControl.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <goofit/Error.h>
5 
6 #include <string>
7 #include <vector>
8 
9 namespace GooFit {
10 
11 class PdfBase;
12 
13 class FitControl {
14  public:
15  FitControl(bool bin, std::string mn)
16  : binned(bin)
17  , metricName(mn) {}
18 
19  inline bool binnedFit() const { return binned; }
20  inline bool binErrors() const { return errorsOnBins; }
21  inline bool metricIsPdf() const { return !errorsOnBins; }
22  inline std::string getMetric() const { return metricName; }
23 
24  protected:
25  bool errorsOnBins{false};
26 
27  private:
28  bool binned;
29  std::string metricName;
30 };
31 
32 class UnbinnedNllFit : public FitControl {
33  public:
35  : FitControl(false, "ptr_to_NLL") {}
36 };
37 
38 class BinnedNllFit : public FitControl {
39  public:
41  : FitControl(true, "ptr_to_BinAvg") {}
42 };
43 
44 class BinnedErrorFit : public FitControl {
45  public:
47  : FitControl(true, "ptr_to_BinWithError") {
48  errorsOnBins = true;
49  }
50 };
51 
52 class BinnedChisqFit : public FitControl {
53  public:
55  : FitControl(true, "ptr_to_Chisq") {}
56 };
57 
58 } // namespace GooFit
bool metricIsPdf() const
Definition: FitControl.h:21
FitControl(bool bin, std::string mn)
Definition: FitControl.h:15
bool binnedFit() const
Definition: FitControl.h:19
bool binErrors() const
Definition: FitControl.h:20
std::string getMetric() const
Definition: FitControl.h:22