Belle II Software prerelease-10-00-00a
DAFParameters.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <TObject.h>
11#include <tuple>
12
13namespace Belle2 {
18
21 class DAFParameters: public TObject {
22
23 public:
24
29
33 void setDeltaPValue(const float pvalue)
34 {
35 m_DeltaPValue = pvalue;
36 }
37
40 void setDeltaWeight(const float weight)
41 {
42 m_DeltaWeight = weight;
43 }
44
47 void setProbabilityCut(const float probabilitycut)
48 {
49 m_ProbabilityCut = probabilitycut;
50 }
51
56 void setAnnealingScheme(const float temperaturestart, const float temperaturefinal, const int numberofiterations)
57 {
58 m_TemperatureStart = temperaturestart;
59 m_TemperatureFinal = temperaturefinal;
60 m_NumberOfIterations = numberofiterations;
61 }
62
65 void setMinimumIterations(const int minimumiterations)
66 {
67 m_MinimumIterations = minimumiterations;
68 }
69
73 void setMaximumIterations(const int maximumiterations)
74 {
75 m_MaximumIterations = maximumiterations;
76 }
77
80 void setMinimumIterationsForPVal(const int minimumiterationsforpval)
81 {
82 m_MinimumIterationsForPVal = minimumiterationsforpval;
83 }
84
89 void setMaximumFailedHits(const int maximumfailedhits)
90 {
91 m_MaximumFailedHits = maximumfailedhits;
92 }
93
97 void setMinimumPValue(const float minimumPValue)
98 {
99 m_MinimumPValue = minimumPValue;
100 }
101
102
105 float getDeltaPValue() const
106 {
107 return m_DeltaPValue;
108 }
109
111 float getDeltaWeight() const
112 {
113 return m_DeltaWeight;
114 }
115
117 float getProbabilityCut() const
118 {
119 return m_ProbabilityCut;
120 }
121
124 std::tuple<float, float, int> getAnnealingScheme() const
125 {
126 return std::tuple<float, float, int>(m_TemperatureStart, m_TemperatureFinal, m_NumberOfIterations);
127 }
128
131 {
132 return m_MinimumIterations;
133 }
134
137 {
138 return m_MaximumIterations;
139 }
140
143 {
145 }
146
151 {
152 return m_MaximumFailedHits;
153 }
154
157 float getMinimumPValue() const
158 {
159 return m_MinimumPValue;
160 }
161
162 private:
164 float m_DeltaPValue = 1;
166 float m_DeltaWeight = 0.001;
168 float m_ProbabilityCut = 0.001;
185 float m_MinimumPValue = 0.;
186
188 };
189
190}
int getMaximumIterations() const
Get the maximum number of iterations of annealing scheme.
float m_TemperatureStart
The annealing scheme : Start temperature.
std::tuple< float, float, int > getAnnealingScheme() const
Get the start and end temperatures and number of iterations for the annealing scheme returns a tuple ...
float m_DeltaWeight
The DeltaWeight for weights convergence criterion.
int getMaximumFailedHits() const
Get the maximum number of failed hits after which the fit should be cancelled.
float m_TemperatureFinal
End temperature.
void setAnnealingScheme(const float temperaturestart, const float temperaturefinal, const int numberofiterations)
Set the start and end temperatures, and the number of iterations for the annealing scheme.
void setMinimumIterations(const int minimumiterations)
Set the minimum number of iterations for pValue check.
void setMaximumIterations(const int maximumiterations)
Set the maximum number of iterations.
int m_MinimumIterations
The minimum number of iterations of annealing scheme.
int getMinimumIterationsForPVal() const
Get the minimum number of iterations for pValue check.
void setMinimumPValue(const float minimumPValue)
Set the minimum PValue used for the convergence criterion.
void setMaximumFailedHits(const int maximumfailedhits)
Set the maximum number of failed hits after which the fit should be cancelled.
int m_MaximumIterations
The maximum number of iterations of annealing scheme.
~DAFParameters()
Destructor.
float getDeltaPValue() const
Get the DeltaPValue for p-value convergence criterion.
void setProbabilityCut(const float probabilitycut)
Set the probability cut for the weight calculation for the hits.
void setDeltaWeight(const float weight)
Set the DeltaWeight for weights convergence criterion.
int m_MinimumIterationsForPVal
The minimum number of iterations for pValue check.
int getMinimumIterations() const
Get the minimum number of iterations of annealing scheme.
int m_NumberOfIterations
Number of iterations.
int m_MaximumFailedHits
The maximum number of failed hits after which the fit should be cancelled.
float m_ProbabilityCut
The probability cut for weight calculation.
ClassDef(DAFParameters, 1)
ClassDef, necessary for ROOT.
float getMinimumPValue() const
Get the minimum PValue used for the convergence criterion.
float getProbabilityCut() const
Get the probability cut for the weight calculation for the hits.
void setMinimumIterationsForPVal(const int minimumiterationsforpval)
Set the minimum number of iterations for pValue check.
float m_MinimumPValue
The minimum allowed pValue for the convergence criterion.
DAFParameters()
Default constructor.
void setDeltaPValue(const float pvalue)
Set the DeltaPValue for p-value convergence criterion.
float m_DeltaPValue
The DeltaPValue for p-value convergence criterion.
float getDeltaWeight() const
Get the DeltaWeight for weight convergence criterion.
Abstract base class for different kinds of events.