12 #include <tracking/trackFindingCDC/filters/base/Filter.dcl.h>
13 #include <tracking/trackFindingCDC/numerics/WithWeight.h>
14 #include <genfit/MeasuredStateOnPlane.h>
17 #include <framework/logging/Logger.h>
32 template <
class AState,
class AKalmanStepper>
33 class KalmanFilter :
public
34 TrackFindingCDC::Filter<std::pair<const std::vector<TrackFindingCDC::WithWeight<const AState*>>, AState*>> {
37 TrackFindingCDC::Weight
operator()(
const std::pair<
const std::vector<TrackFindingCDC::WithWeight<const AState*>>, AState*>& pair)
40 AState* currentState = pair.second;
42 B2ASSERT(
"Can not update with nothing", currentState->mSoPSet());
45 const double chi2 =
m_kalmanStepper.kalmanStep(measuredStateOnPlane, *currentState);
47 currentState->setChi2(chi2);
48 currentState->setMeasuredStateOnPlane(measuredStateOnPlane);