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_;
149 #endif // genfit_KalmanFitterInfo_h