Belle II Software
release-08-01-10
|
Collects information needed and produced by a GblFitter/GBL and is specific to one AbsTrackRep of the Track. More...
#include <GblFitterInfo.h>
Public Member Functions | |
GblFitterInfo () | |
Constructor for ROOT I/O. | |
GblFitterInfo (const TrackPoint *trackPoint, const AbsTrackRep *rep) | |
Default (inherited) constructor Should not be used or the reference should set immediately upon construction (to set the plane). | |
GblFitterInfo (const TrackPoint *trackPoint, const AbsTrackRep *rep, StateOnPlane &referenceState) | |
Default user constructor. More... | |
void | reset (unsigned int measurementDim=2, unsigned int repDim=5) |
(Initial) reset of fitter info More... | |
void | setReferenceState (StateOnPlane &referenceState) |
Set the prediction and plane (from measurement if any) You should use the user constructor instead. More... | |
void | setJacobian (TMatrixD jacobian) |
Set the Jacobian for further GblPoint construction. More... | |
TMatrixDSym | getCovariance (double variance, TVector3 trackDirection, SharedPlanePtr measurementPlane) const |
Get scattering covariance projected into (measurement) plane. More... | |
gbl::GblPoint | constructGblPoint () |
Collect all data and create a GblPoint. More... | |
void | updateFitResults (gbl::GblTrajectory &traj) |
Update fitter info from GBL fit results. More... | |
const MeasuredStateOnPlane & | getFittedState (bool afterKink=true) const override |
Get the prediction at this point Always biased in GBL (global fit) There are 2 states, before and after kink (if there is a scatterer at this point). More... | |
MeasurementOnPlane | getResidual (unsigned int=0, bool=false, bool onlyMeasurementErrors=true) const override |
Get the residual. More... | |
MeasurementOnPlane | getKink () const |
Get kink (residual) with diagonalized covariance (2D) Covariance may be zero if not yet fitted or no scatterer! More... | |
TVectorD | getKinks () const |
Get kink (residual) (2D) = 0 - ( (+)pred - (-)pred ) More... | |
MeasurementOnPlane | getMeasurement () const |
Get the measurement on plane from stored measurement data (from last construction/update) More... | |
void | updateMeasurementAndPlane (const StateOnPlane &sop) |
SHOULD BE USED ONLY INTERNALY! Update the plane from measurement constructed with state or take plane from state if there is no measurement. More... | |
StateOnPlane | getReferenceState () const |
Returns (copy of) the stored reference 5D state at current plane with internal rep. More... | |
void | recalculateJacobian (GblFitterInfo *prevFitterInfo) |
Re-extrapolates between prevFitterInfo and this point using forward state to update the Jacobian (if planes and/or states changed, internal predictions are extrapolated to new planes) More... | |
virtual GblFitterInfo * | clone () const override |
Deep copy ctor for polymorphic class. | |
bool | hasMeasurements () const override |
bool | hasReferenceState () const override |
bool | hasForwardPrediction () const override |
bool | hasBackwardPrediction () const override |
bool | hasForwardUpdate () const override |
bool | hasBackwardUpdate () const override |
bool | hasUpdate (int direction) const override |
bool | hasPredictionsAndUpdates () const |
void | deleteForwardInfo () override |
void | deleteBackwardInfo () override |
void | deletePredictions () |
void | deleteReferenceInfo () override |
void | deleteMeasurementInfo () override |
virtual void | Print (const Option_t *="") const override |
virtual bool | checkConsistency (const genfit::PruneFlags *=nullptr) const override |
const TrackPoint * | getTrackPoint () const |
const AbsTrackRep * | getRep () const |
void | setTrackPoint (const TrackPoint *tp) |
virtual void | setRep (const AbsTrackRep *rep) |
virtual bool | hasPrediction (int direction) const |
const SharedPlanePtr & | getPlane () const |
void | setPlane (const SharedPlanePtr &plane) |
Protected Attributes | |
const TrackPoint * | trackPoint_ |
Pointer to TrackPoint where the FitterInfo belongs to. | |
const AbsTrackRep * | rep_ |
No ownership. More... | |
SharedPlanePtr | sharedPlane_ |
No ownership. | |
Private Attributes | |
TMatrixD | jacobian_ |
TVectorD | measResiduals_ |
TVectorD | measResidualErrors_ |
TVectorD | kinkResiduals_ |
TVectorD | kinkResidualErrors_ |
TVectorD | measDownWeights_ |
TVectorD | kinkDownWeights_ |
TVectorD | bwdStateCorrection_ |
TVectorD | fwdStateCorrection_ |
TMatrixDSym | bwdCov_ |
TMatrixDSym | fwdCov_ |
TVectorD | fwdPrediction_ |
TVectorD | bwdPrediction_ |
TVectorD | refPrediction_ |
TVectorD | measurement_ |
TMatrixDSym | measCov_ |
TMatrixD | hMatrix_ |
std::unique_ptr< MeasuredStateOnPlane > | fittedStateBwd_ |
std::unique_ptr< MeasuredStateOnPlane > | fittedStateFwd_ |
cache | |
Collects information needed and produced by a GblFitter/GBL and is specific to one AbsTrackRep of the Track.
Definition at line 52 of file GblFitterInfo.h.
GblFitterInfo | ( | const TrackPoint * | trackPoint, |
const AbsTrackRep * | rep, | ||
StateOnPlane & | referenceState | ||
) |
Default user constructor.
trackPoint | The point at track to attach fitter info. |
rep | The representation this fitter info belongs to |
referenceState | State from extrapolation to init predictions and plane |
Definition at line 27 of file GblFitterInfo.cc.
gbl::GblPoint constructGblPoint | ( | ) |
Collect all data and create a GblPoint.
Definition at line 111 of file GblFitterInfo.cc.
TMatrixDSym getCovariance | ( | double | variance, |
TVector3 | trackDirection, | ||
SharedPlanePtr | measurementPlane | ||
) | const |
Get scattering covariance projected into (measurement) plane.
variance | Variance of slopes in track frame |
trackDirection | Direction of the track at the plane |
measurementPlane | The plane with measurement to which MS shall be projected |
Definition at line 96 of file GblFitterInfo.cc.
|
overridevirtual |
Get the prediction at this point Always biased in GBL (global fit) There are 2 states, before and after kink (if there is a scatterer at this point).
Per default the state after kink for forward propagation is returned.
If not yet fitted, returns the reference state
afterKink | If true, returns prediction for forward propagation. If false, for backward |
Implements AbsFitterInfo.
Definition at line 398 of file GblFitterInfo.cc.
MeasurementOnPlane getKink | ( | ) | const |
Get kink (residual) with diagonalized covariance (2D) Covariance may be zero if not yet fitted or no scatterer!
Definition at line 453 of file GblFitterInfo.cc.
TVectorD getKinks | ( | ) | const |
Get kink (residual) (2D) = 0 - ( (+)pred - (-)pred )
Definition at line 462 of file GblFitterInfo.cc.
MeasurementOnPlane getMeasurement | ( | ) | const |
Get the measurement on plane from stored measurement data (from last construction/update)
Definition at line 473 of file GblFitterInfo.cc.
|
inline |
Returns (copy of) the stored reference 5D state at current plane with internal rep.
Definition at line 213 of file GblFitterInfo.h.
|
overridevirtual |
Get the residual.
Temporarily constructs measurements and calculates residual as meas - prediction.
Always biased. Always only one (1st) measurement!
... | |
... | |
onlyMeasurementErrors | If true, covariance of measurement returned. If false, diagonalized residual error incl. correlation from track fit is returned. |
Implements AbsFitterInfo.
Definition at line 416 of file GblFitterInfo.cc.
void recalculateJacobian | ( | GblFitterInfo * | prevFitterInfo | ) |
Re-extrapolates between prevFitterInfo and this point using forward state to update the Jacobian (if planes and/or states changed, internal predictions are extrapolated to new planes)
prevFitterInfo | Pointer to GblFitterInfo of previous point |
Definition at line 346 of file GblFitterInfo.cc.
void reset | ( | unsigned int | measurementDim = 2 , |
unsigned int | repDim = 5 |
||
) |
(Initial) reset of fitter info
measurementDim | Measurement dimesion (2) |
repDim | Representation dimesion (5) |
Definition at line 41 of file GblFitterInfo.cc.
void setJacobian | ( | TMatrixD | jacobian | ) |
Set the Jacobian for further GblPoint construction.
jacobian | 5x5 TMatrixD with Jacobian for propagation of the state from previous point to this point. |
Definition at line 91 of file GblFitterInfo.cc.
void setReferenceState | ( | StateOnPlane & | referenceState | ) |
Set the prediction and plane (from measurement if any) You should use the user constructor instead.
Reference gets not updated internally in fitter info. After updateFitResults(...), updates affect the +/- predictions directly.
Should be called only once (so rather use constructor). Otherwise will rewrite fitted state by reference (and you have to update from fit again)
referenceState | StateOnPlane from extrapolation to this point |
Definition at line 78 of file GblFitterInfo.cc.
void updateFitResults | ( | gbl::GblTrajectory & | traj | ) |
Update fitter info from GBL fit results.
Locates itself in track/trajectory and updates predictions, errors, etc.
traj | Fitted GblTrajectory constructed with this point |
Definition at line 246 of file GblFitterInfo.cc.
void updateMeasurementAndPlane | ( | const StateOnPlane & | sop | ) |
SHOULD BE USED ONLY INTERNALY! Update the plane from measurement constructed with state or take plane from state if there is no measurement.
1st raw Measurement with highest weight is constructed and stored as matrices.
Definition at line 195 of file GblFitterInfo.cc.
|
protectedinherited |
No ownership.
Pointer to AbsTrackRep with respect to which the FitterInfo is defined
Definition at line 92 of file AbsFitterInfo.h.