GENFIT
Rev:NoNumberAvailable
|
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. More... | |
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). More... | |
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 |
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. More... | |
MeasurementOnPlane | getResidual (unsigned int=0, bool=false, bool onlyMeasurementErrors=true) const |
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. 1st raw Measurement with highest weight is constructed and stored as matrices. 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 () |
virtual GblFitterInfo * | clone () const |
Deep copy ctor for polymorphic class. More... | |
bool | hasMeasurements () const |
bool | hasReferenceState () const |
bool | hasForwardPrediction () const |
bool | hasBackwardPrediction () const |
bool | hasForwardUpdate () const |
bool | hasBackwardUpdate () const |
bool | hasUpdate (int direction) const |
bool | hasPredictionsAndUpdates () const |
void | deleteForwardInfo () |
void | deleteBackwardInfo () |
void | deletePredictions () |
void | deleteReferenceInfo () |
void | deleteMeasurementInfo () |
virtual void | Print (const Option_t *="") const |
virtual bool | checkConsistency (const genfit::PruneFlags *=NULL) const |
![]() | |
AbsFitterInfo () | |
AbsFitterInfo (const TrackPoint *trackPoint, const AbsTrackRep *rep) | |
virtual | ~AbsFitterInfo () |
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) |
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_ |
boost::scoped_ptr < MeasuredStateOnPlane > | fittedStateBwd_ |
boost::scoped_ptr < MeasuredStateOnPlane > | fittedStateFwd_ |
cache More... | |
Additional Inherited Members | |
![]() | |
const TrackPoint * | trackPoint_ |
const AbsTrackRep * | rep_ |
No ownership. More... | |
SharedPlanePtr | sharedPlane_ |
No ownership. More... | |
Collects information needed and produced by a GblFitter/GBL and is specific to one AbsTrackRep of the Track.
Definition at line 55 of file GblFitterInfo.h.
genfit::GblFitterInfo::GblFitterInfo | ( | ) |
Constructor for ROOT I/O.
Definition at line 10 of file GblFitterInfo.cc.
References reset().
Referenced by clone().
genfit::GblFitterInfo::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).
Definition at line 14 of file GblFitterInfo.cc.
References genfit::AbsTrackRep::getDim(), genfit::AbsTrackRep::getForwardJacobianAndNoise(), jacobian_, and reset().
genfit::GblFitterInfo::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.
References genfit::AbsTrackRep::getDim(), genfit::AbsTrackRep::getForwardJacobianAndNoise(), jacobian_, reset(), and setReferenceState().
|
inlinevirtual |
Definition at line 228 of file GblFitterInfo.h.
|
virtual |
Implements genfit::AbsFitterInfo.
Definition at line 475 of file GblFitterInfo.cc.
|
virtual |
Deep copy ctor for polymorphic class.
Implements genfit::AbsFitterInfo.
Definition at line 480 of file GblFitterInfo.cc.
References bwdCov_, bwdPrediction_, bwdStateCorrection_, fwdCov_, fwdPrediction_, fwdStateCorrection_, GblFitterInfo(), genfit::AbsFitterInfo::getRep(), genfit::AbsFitterInfo::getTrackPoint(), hMatrix_, jacobian_, kinkDownWeights_, kinkResidualErrors_, kinkResiduals_, measCov_, measDownWeights_, measResidualErrors_, measResiduals_, measurement_, refPrediction_, genfit::AbsFitterInfo::setPlane(), and genfit::AbsFitterInfo::sharedPlane_.
gbl::GblPoint genfit::GblFitterInfo::constructGblPoint | ( | ) |
Collect all data and create a GblPoint.
Definition at line 111 of file GblFitterInfo.cc.
References gbl::GblPoint::addGlobals(), gbl::GblPoint::addLocals(), gbl::GblPoint::addMeasurement(), gbl::GblPoint::addScatterer(), genfit::ICalibrationParametersDerivatives::derivatives(), genfit::MeasuredStateOnPlane::getCov(), getCovariance(), genfit::MaterialProperties::getDensity(), genfit::StateOnPlane::getDir(), genfit::Track::getFitStatus(), getFittedState(), getKinks(), genfit::ThinScatterer::getMaterial(), genfit::TrackPoint::getMaterialInfo(), genfit::HMatrixU::getMatrix(), genfit::GblFitStatus::getMaxLocalFitParams(), genfit::StateOnPlane::getPlane(), genfit::TrackPoint::getRawMeasurement(), getResidual(), genfit::StateOnPlane::getState(), genfit::TrackPoint::getTrack(), hasMeasurements(), genfit::TrackPoint::hasThinScatterer(), hMatrix_, jacobian_, genfit::ICalibrationParametersDerivatives::labels(), genfit::ICalibrationParametersDerivatives::localDerivatives(), genfit::AbsFitterInfo::rep_, genfit::GblFitStatus::setMaxLocalFitParams(), genfit::AbsFitterInfo::sharedPlane_, and genfit::AbsFitterInfo::trackPoint_.
Referenced by genfit::GblFitter::collectGblPoints().
|
inlinevirtual |
Implements genfit::AbsFitterInfo.
Definition at line 240 of file GblFitterInfo.h.
Referenced by deletePredictions().
|
inlinevirtual |
Implements genfit::AbsFitterInfo.
Definition at line 239 of file GblFitterInfo.h.
Referenced by deletePredictions().
|
inlinevirtual |
Implements genfit::AbsFitterInfo.
Definition at line 246 of file GblFitterInfo.h.
|
inline |
Definition at line 241 of file GblFitterInfo.h.
References deleteBackwardInfo(), and deleteForwardInfo().
|
inlinevirtual |
Implements genfit::AbsFitterInfo.
Definition at line 245 of file GblFitterInfo.h.
TMatrixDSym genfit::GblFitterInfo::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.
Referenced by constructGblPoint().
|
virtual |
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 genfit::AbsFitterInfo.
Definition at line 397 of file GblFitterInfo.cc.
References bwdCov_, bwdPrediction_, fittedStateBwd_, fittedStateFwd_, fwdCov_, fwdPrediction_, genfit::AbsFitterInfo::rep_, and genfit::AbsFitterInfo::sharedPlane_.
Referenced by constructGblPoint(), getKinks(), getResidual(), and recalculateJacobian().
MeasurementOnPlane genfit::GblFitterInfo::getKink | ( | ) | const |
Get kink (residual) with diagonalized covariance (2D) Covariance may be zero if not yet fitted or no scatterer!
Definition at line 451 of file GblFitterInfo.cc.
References getKinks(), kinkResidualErrors_, genfit::AbsFitterInfo::rep_, and genfit::AbsFitterInfo::sharedPlane_.
TVectorD genfit::GblFitterInfo::getKinks | ( | ) | const |
Get kink (residual) (2D) = 0 - ( (+)pred - (-)pred )
Definition at line 460 of file GblFitterInfo.cc.
References getFittedState().
Referenced by constructGblPoint(), getKink(), and Print().
MeasurementOnPlane genfit::GblFitterInfo::getMeasurement | ( | ) | const |
Get the measurement on plane from stored measurement data (from last construction/update)
Definition at line 471 of file GblFitterInfo.cc.
References genfit::AbsMeasurement::constructHMatrix(), genfit::TrackPoint::getRawMeasurement(), hasMeasurements(), measCov_, measurement_, genfit::AbsFitterInfo::rep_, genfit::AbsFitterInfo::sharedPlane_, and genfit::AbsFitterInfo::trackPoint_.
|
inline |
Returns (copy of) the stored reference 5D state at current plane with internal rep.
Definition at line 216 of file GblFitterInfo.h.
References refPrediction_, genfit::AbsFitterInfo::rep_, and genfit::AbsFitterInfo::sharedPlane_.
|
virtual |
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 genfit::AbsFitterInfo.
Definition at line 414 of file GblFitterInfo.cc.
References genfit::AbsMeasurement::constructHMatrix(), getFittedState(), genfit::TrackPoint::getRawMeasurement(), genfit::AbsFitterInfo::getRep(), hasMeasurements(), hMatrix_, measCov_, measResidualErrors_, measurement_, genfit::AbsFitterInfo::rep_, genfit::AbsFitterInfo::sharedPlane_, and genfit::AbsFitterInfo::trackPoint_.
Referenced by constructGblPoint(), and Print().
|
inlinevirtual |
Implements genfit::AbsFitterInfo.
Definition at line 233 of file GblFitterInfo.h.
References hasReferenceState().
Referenced by hasBackwardUpdate(), hasPredictionsAndUpdates(), and hasUpdate().
|
inlinevirtual |
Implements genfit::AbsFitterInfo.
Definition at line 235 of file GblFitterInfo.h.
References hasBackwardPrediction().
Referenced by hasPredictionsAndUpdates().
|
inlinevirtual |
Implements genfit::AbsFitterInfo.
Definition at line 232 of file GblFitterInfo.h.
References hasReferenceState().
Referenced by hasForwardUpdate(), hasPredictionsAndUpdates(), and hasUpdate().
|
inlinevirtual |
Implements genfit::AbsFitterInfo.
Definition at line 234 of file GblFitterInfo.h.
References hasForwardPrediction().
Referenced by hasPredictionsAndUpdates().
|
inlinevirtual |
Implements genfit::AbsFitterInfo.
Definition at line 230 of file GblFitterInfo.h.
References genfit::TrackPoint::hasRawMeasurements(), and genfit::AbsFitterInfo::trackPoint_.
Referenced by constructGblPoint(), getMeasurement(), getResidual(), Print(), and recalculateJacobian().
|
inline |
Definition at line 237 of file GblFitterInfo.h.
References hasBackwardPrediction(), hasBackwardUpdate(), hasForwardPrediction(), and hasForwardUpdate().
|
inlinevirtual |
Implements genfit::AbsFitterInfo.
Definition at line 231 of file GblFitterInfo.h.
References refPrediction_.
Referenced by hasBackwardPrediction(), and hasForwardPrediction().
|
inlinevirtual |
Reimplemented from genfit::AbsFitterInfo.
Definition at line 236 of file GblFitterInfo.h.
References hasBackwardPrediction(), and hasForwardPrediction().
|
virtual |
Reimplemented from genfit::AbsFitterInfo.
Definition at line 510 of file GblFitterInfo.cc.
References bwdCov_, bwdPrediction_, bwdStateCorrection_, genfit::AbsMeasurement::constructHMatrix(), fwdCov_, fwdPrediction_, fwdStateCorrection_, getKinks(), genfit::TrackPoint::getRawMeasurement(), genfit::AbsFitterInfo::getRep(), getResidual(), genfit::StateOnPlane::getState(), hasMeasurements(), hMatrix_, genfit::AbsHMatrix::isEqual(), jacobian_, kinkDownWeights_, kinkResidualErrors_, kinkResiduals_, measCov_, measDownWeights_, measResidualErrors_, measResiduals_, measurement_, refPrediction_, genfit::AbsFitterInfo::rep_, genfit::AbsFitterInfo::sharedPlane_, and genfit::AbsFitterInfo::trackPoint_.
void genfit::GblFitterInfo::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 345 of file GblFitterInfo.cc.
References bwdPrediction_, genfit::AbsMeasurement::constructPlane(), genfit::AbsTrackRep::extrapolateToPlane(), fittedStateBwd_, fittedStateFwd_, fwdPrediction_, getFittedState(), genfit::AbsTrackRep::getForwardJacobianAndNoise(), genfit::AbsFitterInfo::getPlane(), genfit::TrackPoint::getRawMeasurement(), genfit::StateOnPlane::getState(), hasMeasurements(), jacobian_, genfit::AbsFitterInfo::rep_, genfit::AbsFitterInfo::sharedPlane_, genfit::AbsFitterInfo::trackPoint_, and updateMeasurementAndPlane().
Referenced by genfit::GblFitter::processTrackWithRep().
void genfit::GblFitterInfo::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.
References bwdCov_, bwdPrediction_, bwdStateCorrection_, fwdCov_, fwdPrediction_, fwdStateCorrection_, genfit::HMatrixUV::getMatrix(), hMatrix_, kinkDownWeights_, kinkResidualErrors_, kinkResiduals_, measCov_, measDownWeights_, measResidualErrors_, measResiduals_, measurement_, and refPrediction_.
Referenced by GblFitterInfo().
void genfit::GblFitterInfo::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.
References jacobian_.
Referenced by genfit::GblFitter::constructGblInfo().
void genfit::GblFitterInfo::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.
References bwdPrediction_, fittedStateBwd_, fittedStateFwd_, fwdPrediction_, genfit::Track::getCovSeed(), genfit::StateOnPlane::getState(), genfit::TrackPoint::getTrack(), refPrediction_, genfit::AbsFitterInfo::trackPoint_, and updateMeasurementAndPlane().
Referenced by GblFitterInfo().
void genfit::GblFitterInfo::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 245 of file GblFitterInfo.cc.
References bwdCov_, bwdPrediction_, bwdStateCorrection_, fittedStateBwd_, fittedStateFwd_, fwdCov_, fwdPrediction_, fwdStateCorrection_, genfit::Track::getFitStatus(), genfit::TrackPoint::getFitterInfo(), genfit::GblFitStatus::getMaxLocalFitParams(), gbl::GblTrajectory::getMeasResults(), gbl::GblTrajectory::getNumPoints(), genfit::Track::getNumPoints(), genfit::Track::getPoint(), gbl::GblTrajectory::getResults(), gbl::GblTrajectory::getScatResults(), genfit::TrackPoint::getTrack(), gbl::GblTrajectory::isValid(), kinkDownWeights_, kinkResidualErrors_, kinkResiduals_, measDownWeights_, measResidualErrors_, measResiduals_, genfit::AbsFitterInfo::rep_, genfit::AbsFitterInfo::sharedPlane_, and genfit::AbsFitterInfo::trackPoint_.
Referenced by genfit::GblFitter::updateGblInfo().
void genfit::GblFitterInfo::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 194 of file GblFitterInfo.cc.
References genfit::AbsMeasurement::constructMeasurementsOnPlane(), genfit::StateOnPlane::getPlane(), genfit::TrackPoint::getRawMeasurement(), genfit::TrackPoint::hasRawMeasurements(), hMatrix_, measCov_, measurement_, genfit::AbsFitterInfo::setPlane(), and genfit::AbsFitterInfo::trackPoint_.
Referenced by recalculateJacobian(), and setReferenceState().
|
private |
Definition at line 260 of file GblFitterInfo.h.
Referenced by clone(), getFittedState(), Print(), reset(), and updateFitResults().
|
private |
Definition at line 263 of file GblFitterInfo.h.
Referenced by clone(), getFittedState(), Print(), recalculateJacobian(), reset(), setReferenceState(), and updateFitResults().
|
private |
Definition at line 258 of file GblFitterInfo.h.
Referenced by clone(), Print(), reset(), and updateFitResults().
|
mutableprivate |
Definition at line 271 of file GblFitterInfo.h.
Referenced by getFittedState(), recalculateJacobian(), setReferenceState(), and updateFitResults().
|
mutableprivate |
cache
Definition at line 272 of file GblFitterInfo.h.
Referenced by getFittedState(), recalculateJacobian(), setReferenceState(), and updateFitResults().
|
private |
Definition at line 261 of file GblFitterInfo.h.
Referenced by clone(), getFittedState(), Print(), reset(), and updateFitResults().
|
private |
Definition at line 262 of file GblFitterInfo.h.
Referenced by clone(), getFittedState(), Print(), recalculateJacobian(), reset(), setReferenceState(), and updateFitResults().
|
private |
Definition at line 259 of file GblFitterInfo.h.
Referenced by clone(), Print(), reset(), and updateFitResults().
|
private |
Definition at line 268 of file GblFitterInfo.h.
Referenced by clone(), constructGblPoint(), getResidual(), Print(), reset(), and updateMeasurementAndPlane().
|
private |
Definition at line 251 of file GblFitterInfo.h.
Referenced by clone(), constructGblPoint(), GblFitterInfo(), Print(), recalculateJacobian(), and setJacobian().
|
private |
Definition at line 257 of file GblFitterInfo.h.
Referenced by clone(), Print(), reset(), and updateFitResults().
|
private |
Definition at line 255 of file GblFitterInfo.h.
Referenced by clone(), getKink(), Print(), reset(), and updateFitResults().
|
private |
Definition at line 254 of file GblFitterInfo.h.
Referenced by clone(), Print(), reset(), and updateFitResults().
|
private |
Definition at line 267 of file GblFitterInfo.h.
Referenced by clone(), getMeasurement(), getResidual(), Print(), reset(), and updateMeasurementAndPlane().
|
private |
Definition at line 256 of file GblFitterInfo.h.
Referenced by clone(), Print(), reset(), and updateFitResults().
|
private |
Definition at line 253 of file GblFitterInfo.h.
Referenced by clone(), getResidual(), Print(), reset(), and updateFitResults().
|
private |
Definition at line 252 of file GblFitterInfo.h.
Referenced by clone(), Print(), reset(), and updateFitResults().
|
private |
Definition at line 266 of file GblFitterInfo.h.
Referenced by clone(), getMeasurement(), getResidual(), Print(), reset(), and updateMeasurementAndPlane().
|
private |
Definition at line 264 of file GblFitterInfo.h.
Referenced by clone(), getReferenceState(), hasReferenceState(), Print(), reset(), and setReferenceState().