8#include <tracking/ckf/svd/filters/states/ResidualSVDStateFilter.h>
10#include <tracking/trackFindingCDC/geometry/Vector3D.h>
11#include <tracking/spacePointCreation/SpacePoint.h>
12#include <framework/core/ModuleParamList.h>
13#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
16using namespace TrackFindingCDC;
21 "Maximum residual between extrapolated and measured position based on Kalman step.",
27 const std::vector<TrackFindingCDC::WithWeight<const CKFToSVDState*>>& previousStates = pair.first;
30 const auto* spacePoint = currentState->
getHit();
32 genfit::MeasuredStateOnPlane firstMeasurement;
36 firstMeasurement = previousStates.back()->getMeasuredStateOnPlane();
40 const Vector3D hitPosition =
static_cast<Vector3D>(spacePoint->getPosition());
42 const bool sameHemisphere = fabs(position.phi() - hitPosition.phi()) < TMath::PiOver2();
43 if (not sameHemisphere) {
53 return 1 / (residual + 1e-6);
const genfit::MeasuredStateOnPlane & getMeasuredStateOnPlane() const
Get the mSoP if already set during extrapolation (or fitting)
const Hit * getHit() const
Return the SP this state is related to. May be nullptr.
bool mSoPSet() const
Is the mSoP already set? (= state was already extrapolated)
Specialized CKF State for extrapolating into the SVD.
The Module parameter list class.
TrackFindingCDC::Weight operator()(const BaseSVDStateFilter::Object &pair) final
Return 1/residual and cut at the maximum residual.
SVDKalmanStepper m_kalmanStepper
Kalman Stepper to calculate the residual.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the maximal residual.
double m_param_maximalResidual
Parameter: maximal residual.
double calculateResidual(genfit::MeasuredStateOnPlane &measuredStateOnPlane, const CKFToSVDState &state)
Calculate the residual between the mSoP and the measurement in the state.
AObject Object
Type of the object to be analysed.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
HepGeom::Vector3D< double > Vector3D
3D Vector
Abstract base class for different kinds of events.