23 #ifndef genfit_KalmanFitterInfo_h
24 #define genfit_KalmanFitterInfo_h
26 #include "AbsFitterInfo.h"
27 #include "KalmanFittedStateOnPlane.h"
28 #include "MeasuredStateOnPlane.h"
29 #include "MeasurementOnPlane.h"
30 #include "ReferenceStateOnPlane.h"
31 #include "StateOnPlane.h"
57 MeasuredStateOnPlane* getPrediction(
int direction)
const {
if (direction >=0)
return forwardPrediction_.get();
return backwardPrediction_.get();}
60 KalmanFittedStateOnPlane* getUpdate(
int direction)
const {
if (direction >=0)
return forwardUpdate_.get();
return backwardUpdate_.get();}
61 const std::vector< genfit::MeasurementOnPlane* >& getMeasurementsOnPlane()
const {
return measurementsOnPlane_;}
77 double getSmoothedChi2(
unsigned int iMeasurement = 0)
const;
79 bool hasMeasurements()
const override {
return getNumMeasurements() > 0;}
80 bool hasReferenceState()
const override {
return (
referenceState_.get() !=
nullptr);}
81 bool hasForwardPrediction()
const override {
return (forwardPrediction_.get() !=
nullptr);}
82 bool hasBackwardPrediction()
const override {
return (backwardPrediction_.get() !=
nullptr);}
83 bool hasForwardUpdate()
const override {
return (forwardUpdate_.get() !=
nullptr);}
84 bool hasBackwardUpdate()
const override {
return (backwardUpdate_.get() !=
nullptr);}
85 bool hasUpdate(
int direction)
const override {
if (direction < 0)
return hasBackwardUpdate();
return hasForwardUpdate();}
86 bool hasPredictionsAndUpdates()
const {
return (hasForwardPrediction() && hasBackwardPrediction() && hasForwardUpdate() && hasBackwardUpdate());}
88 void setReferenceState(ReferenceStateOnPlane* referenceState);
89 void setForwardPrediction(MeasuredStateOnPlane* forwardPrediction);
90 void setBackwardPrediction(MeasuredStateOnPlane* backwardPrediction);
91 void setPrediction(MeasuredStateOnPlane* prediction,
int direction) {
if (direction >=0) setForwardPrediction(prediction);
else setBackwardPrediction(prediction);}
92 void setForwardUpdate(KalmanFittedStateOnPlane* forwardUpdate);
93 void setBackwardUpdate(KalmanFittedStateOnPlane* backwardUpdate);
94 void setUpdate(KalmanFittedStateOnPlane* update,
int direction) {
if (direction >=0) setForwardUpdate(update);
else setBackwardUpdate(update);}
95 void setMeasurementsOnPlane(
const std::vector< genfit::MeasurementOnPlane* >& measurementsOnPlane);
96 void addMeasurementOnPlane(MeasurementOnPlane* measurementOnPlane);
97 void addMeasurementsOnPlane(
const std::vector< genfit::MeasurementOnPlane* >& measurementsOnPlane);
100 void fixWeights(
bool arg =
true) {fixWeights_ = arg;}
101 void setRep(
const AbsTrackRep* rep)
override;
103 void deleteForwardInfo()
override;
104 void deleteBackwardInfo()
override;
105 void deletePredictions();
106 void deleteReferenceInfo()
override {setReferenceState(
nullptr);}
107 void deleteMeasurementInfo()
override;
109 virtual void Print(
const Option_t* =
"")
const override;
117 std::unique_ptr<MeasuredStateOnPlane> forwardPrediction_;
118 std::unique_ptr<KalmanFittedStateOnPlane> forwardUpdate_;
119 std::unique_ptr<MeasuredStateOnPlane> backwardPrediction_;
120 std::unique_ptr<KalmanFittedStateOnPlane> backwardUpdate_;
121 mutable std::unique_ptr<MeasuredStateOnPlane> fittedStateUnbiased_;
This class collects all information needed and produced by a specific AbsFitter and is specific to on...
Abstract base class for a track representation.
#MeasuredStateOnPlane with additional info produced by a Kalman filter or DAF.
Collects information needed and produced by a AbsKalmanFitter implementations and is specific to one ...
MeasurementOnPlane getResidual(unsigned int iMeasurement=0, bool biased=false, bool onlyMeasurementErrors=true) const override
Get unbiased (default) or biased residual from ith measurement.
void setWeights(const std::vector< double > &)
Set weights of measurements.
MeasurementOnPlane getAvgWeightedMeasurementOnPlane(bool ignoreWeights=false) const
Get weighted mean of all measurements.
MeasurementOnPlane * getClosestMeasurementOnPlane(const StateOnPlane *) const
Get measurements which is closest to state.
std::unique_ptr< ReferenceStateOnPlane > referenceState_
Reference state. Used by KalmanFitterRefTrack.
std::vector< MeasurementOnPlane * > measurementsOnPlane_
cache
std::unique_ptr< MeasuredStateOnPlane > fittedStateBiased_
cache
virtual KalmanFitterInfo * clone() const override
Deep copy ctor for polymorphic class.
const MeasuredStateOnPlane & getFittedState(bool biased=true) const override
Get unbiased or biased (default) smoothed state.
std::vector< double > getWeights() const
Get weights of measurements.
bool areWeightsFixed() const
Are the weights fixed?
#StateOnPlane with additional covariance matrix.
Measured coordinates on a plane.
#StateOnPlane with linearized transport to that #ReferenceStateOnPlane from previous and next #Refere...
A state with arbitrary dimension defined in a DetPlane.
Object containing AbsMeasurement and AbsFitterInfo objects.
Defines for I/O streams used for error and debug printing.
Info which information has been pruned from the Track.