9#include <tracking/modules/fitter/DAFRecoFitterModule.h>
10#include <tracking/trackFitting/fitter/base/TrackFitter.h>
11#include <tracking/dbobjects/DAFParameters.h>
19 setDescription(
"DAF Fitter using Genfit. If you have TrackCands, you have to convert them to RecoTracks"
20 "using the RecoTrackCreatorModule first. After that, you probably want to add the measurements from the"
21 "hits using the MeasurementCreatorModule. Default parameters are read from the database.");
24 "Probability cut for the DAF. Any value between 0 and 1 is possible. Common values are between 0.01 and 0.001",
28 "Type of track fit algorithm to use the corresponding DAFParameter, the list is defined in DAFConfiguration class.",
36 B2FATAL(
"DAF Configuration is not available.");
40 B2FATAL(
"DAF parameters for " << (
short)
m_trackFitType <<
" is not available.");
45 B2WARNING(
"DAF was called with a different probability cut than the database one (new: " <<
m_param_probabilityCut <<
" ; DB: " <<
46 DAFParams->
getProbabilityCut() <<
" ). This new value will be used, the other parameters are read from the database");
49 std::shared_ptr<genfit::DAF> fitter = std::make_shared<genfit::DAF>(DAFParams->
getAnnealingScheme(),
64 return std::shared_ptr<genfit::DAF>(
nullptr);
BaseRecoFitterModule()
Constructor.
ETrackFitType
Enum for identifying the type of track fit algorythm ( or cosmic)
The payload containing the DAF parameters.
int getMaximumIterations() const
Get the maximum number of iterations of annealing scheme.
std::tuple< float, float, int > getAnnealingScheme() const
Get the start and end temperatures and number of iterations for the annealing scheme returns a tuple ...
int getMaximumFailedHits() const
Get the maximum number of failed hits after which the fit should be cancelled.
int getMinimumIterationsForPVal() const
Get the minimum number of iterations for pValue check.
float getDeltaPValue() const
Get the DeltaPValue for p-value convergence criterion.
int getMinimumIterations() const
Get the minimum number of iterations of annealing scheme.
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.
float getDeltaWeight() const
Get the DeltaWeight for weight convergence criterion.
DBObjPtr< DAFConfiguration > m_DAFConfiguration
DAF Configuration Database OjbPtr.
DAFRecoFitterModule()
Module for the DAF fitter.
bool m_changedParametersMessageWasShown
Boolean to only show the warning about changed DAF parameters on first occurrence but not each time a...
double m_param_probabilityCut
Probability cut for the DAF.
std::shared_ptr< genfit::AbsFitter > createFitter() const override
Create a DAF fitter.
short m_trackFitType
Track Fit type to select the proper DAFParameter from DAFConfiguration; by default c_Default.
void setDescription(const std::string &description)
Sets the description of the module.
static constexpr double s_defaultProbCut
Default probCut for the default DAF fitter.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.