8#include <tracking/ckf/general/filters/NonIPCrossingStateFilter.dcl.h>
10#include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory2D.h>
11#include <tracking/trackFindingCDC/geometry/Vector3D.h>
12#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
14#include <tracking/ckf/general/utilities/SearchDirection.h>
16#include <tracking/spacePointCreation/SpacePoint.h>
17#include <tracking/dataobjects/RecoTrack.h>
19#include <framework/core/ModuleParamList.h>
26 template <
class AllStateFilter>
29 if (std::isnan(AllStateFilter::operator()(
pair))) {
33 const auto& previousStates =
pair.first;
34 auto* state =
pair.second;
36 const RecoTrack* cdcTrack = previousStates.front()->getSeed();
37 B2ASSERT(
"Path without seed?", cdcTrack);
39 const SpacePoint* spacePoint = state->getHit();
40 B2ASSERT(
"Path without hit?", spacePoint);
42 const genfit::MeasuredStateOnPlane& firstMeasurement = [&state, &previousStates]() {
43 if (state->mSoPSet()) {
44 return state->getMeasuredStateOnPlane();
46 B2ASSERT(
"Previous state was not fitted?", previousStates.back()->mSoPSet());
47 return previousStates.back()->getMeasuredStateOnPlane();
59 const double deltaArcLengthHitOrigin = trajectory2D.calcArcLength2DBetween(hitPosition.xy(), origin);
60 const double deltaArcLengthTrackHit = trajectory2D.calcArcLength2D(hitPosition.xy());
70 template <
class AllStateFilter>
74 "The direction where the extrapolation will happen.");
77 template <
class AllStateFilter>
The Module parameter list class.
typename AllStateFilter::Object Object
The object to filter.
TrackFindingCDC::EForwardBackward m_param_direction
Direction parameter converted from the string parameters.
std::string m_param_directionAsString
Parameter for the distance given to the framework (can not handle EForwardBackward directly)
This is the Reconstruction Event-Data Model Track.
short int getChargeSeed() const
Return the charge seed stored in the reco track. ATTENTION: This is not the fitted charge.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
const B2Vector3D & getPosition() const
return the position vector in global coordinates
Particle trajectory as it is seen in xy projection represented as a circle.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
A three dimensional vector.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
TrackFindingCDC::Weight operator()(const Object &pair) final
Main function testing the object for the direction.
void initialize() final
Copy the string direction parameter to the enum.
TrackFindingCDC::EForwardBackward fromString(const std::string &directionString)
Helper function to turn a direction string into a valid forward backward information.
constexpr bool arcLengthInRightDirection(double arcLength2D, TrackFindingCDC::EForwardBackward forwardBackward)
Given the calculated arc length between a start point and an end point, checks if the travelled path ...
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the direction parameter.
Abstract base class for different kinds of events.