Belle II Software
release-08-01-10
|
Generic GBL implementation. More...
#include <GblFitter.h>
Public Member Functions | |
GblFitter () | |
Default (and only) constructor. | |
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. More... | |
void | setMSOptions (bool enableScatterers=true, bool enableIntermediateScatterer=true) |
Set multiple scattering options of the fitter/GBL. More... | |
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 parameters describing a corresponding thick scatterer. More... | |
void | processTrackWithRep (Track *trk, const AbsTrackRep *rep, bool resortHits=false) override |
Performs fit on a Track. More... | |
double | constructGblInfo (Track *trk, const AbsTrackRep *rep) |
Propagate seed, populate track with scatterers and GblFitterInfos with reference state set. More... | |
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. More... | |
std::vector< gbl::GblPoint > | collectGblPoints (genfit::Track *trk, const genfit::AbsTrackRep *rep) |
Constructs all GBL points and returns them in vector for trajectory construction. More... | |
void | cleanGblInfo (Track *trk, const AbsTrackRep *rep) const |
Remove all previous gbl fitter data from track Also removes trackpoints without measurement. More... | |
void | sortHits (Track *trk, const AbsTrackRep *rep) const |
Sort hits in track by arc-len using extrapolation. More... | |
void | setTrackSegmentController (GblTrackSegmentController *controler) |
void | processTrack (Track *, bool resortHits=false) |
Process all reps. More... | |
virtual void | setDebugLvl (unsigned int lvl=1) |
Protected Attributes | |
unsigned int | debugLvl_ |
Private Member Functions | |
GblFitter (const GblFitter &) | |
GblFitter & | operator= (GblFitter const &) |
Private Attributes | |
std::string | m_gblInternalIterations |
bool | m_enableScatterers |
bool | m_enableIntermediateScatterer |
unsigned int | m_externalIterations |
unsigned int | m_recalcJacobians |
double | scatEpsilon |
GblTrackSegmentController * | m_segmentController |
Generic GBL implementation.
The interface class to GBL track fit
Definition at line 53 of file GblFitter.h.
void cleanGblInfo | ( | Track * | trk, |
const AbsTrackRep * | rep | ||
) | const |
Remove all previous gbl fitter data from track Also removes trackpoints without measurement.
trk | The track |
rep | Representation for which to clean data |
Definition at line 233 of file GblFitter.cc.
std::vector< gbl::GblPoint > collectGblPoints | ( | genfit::Track * | trk, |
const genfit::AbsTrackRep * | rep | ||
) |
Constructs all GBL points and returns them in vector for trajectory construction.
Definition at line 274 of file GblFitter.cc.
double constructGblInfo | ( | Track * | trk, |
const AbsTrackRep * | rep | ||
) |
Propagate seed, populate track with scatterers and GblFitterInfos with reference state set.
trk | Track to attach with infos at given rep |
rep | TrackRep to which fitter info shall be attached |
Definition at line 376 of file GblFitter.cc.
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 parameters describing a corresponding thick scatterer.
Based on input from Claus Kleinwort (DESY), adapted for continuous material distribution represented by a sum of step functions. Returned thick scatterer can be represented by two GBL scattering points. Calculates variance of theta from total sum of radiation lengths instead of summimg squares of individual deflection angle variances.
length | returned: Length of the track |
theta | returned: Variation of distribution of deflection angle |
s | returned: First moment of material scattering distribution |
ds | returned: Second moment (variance) of material scattering distribution |
p | Particle momentum magnitude (GeV/c) |
mass | Mass of particle (GeV/c/c) |
steps | Vector of material steps from (RKTrackRep) extrapolation |
Definition at line 315 of file GblFitter.cc.
|
inherited |
Process all reps.
Start with the cardinalRep and resort the hits if necessary (and supported by the fitter)
Definition at line 25 of file AbsFitter.cc.
|
overridevirtual |
Performs fit on a Track.
Hit resorting currently supported (use only if necessary /wire chamber/ ... will extrapolate along whole track to sort the hits).
Implements AbsFitter.
Definition at line 106 of file GblFitter.cc.
|
inline |
Set multiple scattering options of the fitter/GBL.
enableScatterers | If false, no scatterers will be added to GBL trajectory |
enableIntermediateScatterer | True to simulate thick sctatterers by two thin scatterers 1st at detector plane and intermediate between each two planes |
Definition at line 119 of file GblFitter.h.
|
inline |
Set options of the fitter/GBL.
internalIterations | GBL down-weighting in iterations. One letter (T,H,C) per iteration. Seems "HH" is resonable for outliers. Default "" is OK. Separate by comma for each external iteration (usually last), e.g., for 3 iterations: ",,HH" to down-weight at last one |
enableScatterers | If false, no scatterers will be added to GBL trajectory |
enableIntermediateScatterer | True to simulate thick sctatterers by two thin scatterers 1st at detector plane and intermediate between each two planes |
externalIterations | Sets number of times GblTrajectory.fit(...) will be called in processTrackWithRep(...). Called external iterations. State is updated each time with GBL results. If =0, GblFitterInfos will filled by reference states and GblFitStatus in track able to construct simple GBL trajectory (for fit by GBL of output to Mille binary) / get list of points 1st at detector plane and intermediate between each two planes |
recalcJacobians | Number of iteration up to which Jacobians should be recalculated / planes/meas updated after the fit. 0 = do not recalculate Jacobians. 1 = recalculate after first GBL fit. 2 = after 1st and 2nd GBL fit etc. |
Definition at line 100 of file GblFitter.h.
void sortHits | ( | Track * | trk, |
const AbsTrackRep * | rep | ||
) | const |
Sort hits in track by arc-len using extrapolation.
trk | The track |
rep | The track representation |
Definition at line 244 of file GblFitter.cc.
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.
Updates also seed state in track (from forward prediction at first point)
(The trajectory can only be cut before track end, cannot have missing points in between (if valid))
TODO ?? Re-construct all points in GblFitterInfos (updated) and collect them in fit status
traj | The fitted GblTrajectory |
trk | The track with fitter infos from whose points traj was created |
rep | The representation to which this fit status belong |
Definition at line 289 of file GblFitter.cc.