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>
16 using namespace TrackFindingCDC;
20 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"maximalResidual"), m_param_maximalResidual,
21 "Maximum residual between extrapolated and measured position based on Kalman step.",
22 m_param_maximalResidual);
27 const std::vector<TrackFindingCDC::WithWeight<const CKFToSVDState*>>& previousStates = pair.first;
30 const auto* spacePoint = currentState->
getHit();
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) {
47 const double residual = m_kalmanStepper.calculateResidual(firstMeasurement, *currentState);
48 if (residual > m_param_maximalResidual) {
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.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the maximal residual.
AObject Object
Type of the object to be analysed.
#StateOnPlane with additional covariance matrix.
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.