27 #include "AbsFitter.h"
28 #include "AbsTrackRep.h"
29 #include "GblFitterInfo.h"
30 #include "GblFitStatus.h"
31 #include "GblTrackSegmentController.h"
46 class GblTrackSegmentController;
59 std::string m_gblInternalIterations;
60 bool m_enableScatterers;
61 bool m_enableIntermediateScatterer;
62 unsigned int m_externalIterations;
63 unsigned int m_recalcJacobians;
74 GblFitter() :
AbsFitter(), m_gblInternalIterations(
""), m_enableScatterers(true), m_enableIntermediateScatterer(true), m_externalIterations(1), m_recalcJacobians(0), scatEpsilon(1.e-8), m_segmentController(nullptr) {;}
100 void setOptions(
const std::string &internalIterations =
"",
bool enableScatterers =
true,
bool enableIntermediateScatterer =
true,
unsigned int externalIterations = 1,
unsigned int recalcJacobians = 1) {
101 m_externalIterations = externalIterations;
102 m_gblInternalIterations = internalIterations;
103 m_recalcJacobians = recalcJacobians;
104 if (!enableScatterers)
105 enableIntermediateScatterer =
false;
106 m_enableScatterers = enableScatterers;
107 m_enableIntermediateScatterer = enableIntermediateScatterer;
119 void setMSOptions(
bool enableScatterers =
true,
bool enableIntermediateScatterer =
true) {
120 if (!enableScatterers)
121 enableIntermediateScatterer =
false;
122 m_enableScatterers = enableScatterers;
123 m_enableIntermediateScatterer = enableIntermediateScatterer;
146 double& theta,
double& s,
double& ds,
147 const double p,
const double mass,
const double charge,
148 const std::vector<genfit::MatStep>& steps)
const;
GblTrajectory definition.
Abstract base class for fitters.
Abstract base class for a track representation.
Generic GBL implementation.
virtual ~GblFitter()
Destructor.
void setOptions(const std::string &internalIterations="", bool enableScatterers=true, bool enableIntermediateScatterer=true, unsigned int externalIterations=1, unsigned int recalcJacobians=1)
Set options of the fitter/GBL.
void updateGblInfo(gbl::GblTrajectory &traj, genfit::Track *trk, const genfit::AbsTrackRep *rep)
Populate all fitter infos in track for rep with results of trajectory fit.
double constructGblInfo(Track *trk, const AbsTrackRep *rep)
Propagate seed, populate track with scatterers and GblFitterInfos with reference state set.
GblFitter()
Default (and only) constructor.
void setMSOptions(bool enableScatterers=true, bool enableIntermediateScatterer=true)
Set multiple scattering options of the fitter/GBL.
void processTrackWithRep(Track *trk, const AbsTrackRep *rep, bool resortHits=false) override
Performs fit on a Track.
void sortHits(Track *trk, const AbsTrackRep *rep) const
Sort hits in track by arc-len using extrapolation.
void getScattererFromMatList(double &length, double &theta, double &s, double &ds, const double p, const double mass, const double charge, const std::vector< genfit::MatStep > &steps) const
Evaluates moments of radiation length distribution from list of material steps and computes parameter...
void cleanGblInfo(Track *trk, const AbsTrackRep *rep) const
Remove all previous gbl fitter data from track Also removes trackpoints without measurement.
std::vector< gbl::GblPoint > collectGblPoints(genfit::Track *trk, const genfit::AbsTrackRep *rep)
Constructs all GBL points and returns them in vector for trajectory construction.
TrackSegmentController for use with GblFitter.
Collection of TrackPoint objects, AbsTrackRep objects and FitStatus objects.
Defines for I/O streams used for error and debug printing.