8#include <tracking/ckf/cdc/filters/states/ExtrapolateAndUpdateCDCStateFilter.h>
10#include <tracking/trackFindingCDC/numerics/ERightLeft.h>
11#include <cdc/dataobjects/CDCRecoHit.h>
13#include <tracking/ckf/cdc/entities/CDCCKFState.h>
14#include <tracking/ckf/cdc/entities/CDCCKFPath.h>
16#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
17#include <framework/core/ModuleParamList.h>
25 const auto& wire = state.
getWireHit()->getWire();
28 const auto& hitPosition = wire.getWirePos3DAtZ(trackPosition.z());
38ExtrapolateAndUpdateCDCStateFilter::ExtrapolateAndUpdateCDCStateFilter()
47 moduleParamList->
getParameter<std::string>(TrackFindingCDC::prefixed(prefix,
"direction")).setDefaultValue(
"forward");
56 genfit::MeasuredStateOnPlane mSoP = lastState.
getTrackState();
59 CDCRecoHit recoHit(wireHit->getHit(),
nullptr);
68 B2ASSERT(
"Should be exactly two measurements", measurements.size() == 2);
70 const auto& rightLeft = setRLInfo(mSoP, state);
72 if (rightLeft == TrackFindingCDC::ERightLeft::c_Right) {
78 delete measurements[0];
79 delete measurements[1];
82 setRLInfo(mSoP, state);
85 }
catch (
const genfit::Exception& e) {
double extrapolateToPlane(genfit::MeasuredStateOnPlane &measuredStateOnPlane, const genfit::SharedPlanePtr &plane) const
Extrapolate the mSoP of one plane to another plane and return the traveled distance or NAN,...
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Expose the parameters.
Define states for CKF algorithm, which can be seed track or CDC wire hit.
void setRLinfo(const TrackFindingCDC::ERightLeft &rl)
Set right-left info for the hit.
void setTrackState(const genfit::MeasuredStateOnPlane &trackState)
Store genfit Measured state on plane.
double getChi2() const
Get state chi2.
void setChi2(double chi2)
Set set chi2.
const genfit::MeasuredStateOnPlane & getTrackState() const
Get genfit track state (but first check if already present)
const TrackFindingCDC::CDCWireHit * getWireHit() const
Get CDCWireHit corresponding to the state.
This class is used to transfer CDC information to the track fit.
std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane(const genfit::StateOnPlane &state) const override
build MeasurementsOnPlane
genfit::SharedPlanePtr constructPlane(const genfit::StateOnPlane &state) const override
Methods that actually interface to Genfit.
TrackFindingCDC::Weight operator()(const BaseCDCStateFilter::Object &pair) final
Extrapolate along the path (pair.first) to the CDC wireHit-state (pair.second). Return 1/chi2 if Ok,...
KalmanStepper< 1 > m_updater
Kalman filter updater.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
Advancer m_extrapolator
Kalman filter extrapolator.
double kalmanStep(genfit::MeasuredStateOnPlane &measuredStateOnPlane, const genfit::MeasurementOnPlane &measurementOnPlane) const
Kalman update of the mSoP using the measurement. Is just a wrapper around the other kalmanStepper wor...
The Module parameter list class.
Class representing a hit wire in the central drift chamber.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
AObject Object
Type of the object to be analysed.
ERightLeft isRightOrLeftOf(const Vector2D &rhs) const
Indicates if the given vector is more left or more right if you looked in the direction of this vecto...
A three dimensional vector.
const Vector2D & xy() const
Getter for the xy projected vector ( reference ! )
ModuleParam< T > & getParameter(const std::string &name) const
Returns a reference to a parameter.
std::vector< CDCCKFState > CDCCKFPath
Shortcut for the collection of CDC CKF-algorithm states.
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Abstract base class for different kinds of events.