8#include <tracking/ckf/svd/filters/states/SimpleSVDStateFilter.h>
10#include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory3D.h>
11#include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory2D.h>
12#include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectorySZ.h>
13#include <tracking/trackFindingCDC/geometry/Vector3D.h>
15#include <tracking/trackFindingCDC/eventdata/trajectories/CDCBFieldUtil.h>
16#include <tracking/spacePointCreation/SpacePoint.h>
17#include <tracking/dataobjects/RecoTrack.h>
20using namespace TrackFindingCDC;
26 const double pT = momentum.xy().norm();
29 }
else if (pT > 0.2) {
48 const std::vector<TrackFindingCDC::WithWeight<const CKFToSVDState*>>& previousStates = pair.first;
51 const auto* spacePoint = currentState->
getHit();
53 genfit::MeasuredStateOnPlane firstMeasurement;
57 firstMeasurement = previousStates.back()->getMeasuredStateOnPlane();
63 const Vector3D hitPosition =
static_cast<Vector3D>(spacePoint->getPosition());
65 const bool sameHemisphere = fabs(position.phi() - hitPosition.phi()) < TMath::PiOver2();
66 if (not sameHemisphere) {
76 const RecoTrack* cdcTrack = previousStates.front()->getSeed();
78 B2ASSERT(
"A path without a seed?", cdcTrack);
85 const Vector3D trackPositionAtHit(trackPositionAtHit2D, trackPositionAtHitZ);
86 const Vector3D differenceHelix = trackPositionAtHit - hitPosition;
88 valueToCheck = differenceHelix.norm();
93 valueToCheck = residual;
102 if (valueToCheck > (*maximumValues)[layer - 3][getPTRange(momentum)]) {
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 isFitted() const
Check if state was already fitted.
bool mSoPSet() const
Is the mSoP already set? (= state was already extrapolated)
Specialized CKF State for extrapolating into the SVD.
unsigned int getGeometricalLayer() const
Extract the real layer this state sits on.
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.
double calculateResidual(genfit::MeasuredStateOnPlane &measuredStateOnPlane, const CKFToSVDState &state)
Calculate the residual between the mSoP and the measurement in the state.
static constexpr const MaximalValueArray m_param_maximumResidual
Maximum distance calculated with normal extrapolation in filter 3. Numbers calculated on MC.
void beginRun() final
Set the cached B field.
TrackFindingCDC::Weight operator()(const BaseSVDStateFilter::Object &pair) final
Function to evaluate the object.
static constexpr const MaximalValueArray m_param_maximumHelixDistance
Maximum distance calculated with helix extrapolation in filter 1. Numbers calculated on MC.
double[4][3] MaximalValueArray
Shortcut for a 4x3 array.
SVDKalmanStepper m_kalmanStepper
Kalman stepper (CKF) for SVD.
double m_cachedBField
Cache for the B field at the IP.
static constexpr const MaximalValueArray m_param_maximumResidual2
Maximum distance calculated with normal extrapolation in filter 2. Numbers calculated on MC.
static double getBFieldZ()
Getter for the signed magnetic field strength in z direction at the origin ( in Tesla )
Vector2D getPos2DAtArcLength2D(double arcLength2D)
Getter for the position at a given two dimensional arc length.
Particle full three dimensional trajectory.
double calcArcLength2D(const Vector3D &point) const
Calculate the travel distance from the start position of the trajectory.
CDCTrajectory2D getTrajectory2D() const
Getter for the two dimensional trajectory.
CDCTrajectorySZ getTrajectorySZ() const
Getter for the sz trajectory.
double mapSToZ(const double s=0) const
Translates the travel distance to the z coordinate.
AObject Object
Type of the object to be analysed.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
A three dimensional vector.
HepGeom::Vector3D< double > Vector3D
3D Vector
Abstract base class for different kinds of events.