8#include <tracking/trackFindingCDC/findlets/minimal/TrackSZFitter.h>
10#include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
11#include <tracking/trackFindingCDC/fitting/CDCSZFitter.h>
12#include <tracking/trackFindingCDC/fitting/CDCAxialStereoFusion.h>
14#include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
16#include <tracking/trackFindingCDC/eventdata/hits/CDCRecoHit3D.h>
17#include <tracking/trackFindingCDC/eventdata/hits/CDCRecoHit2D.h>
19#include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory3D.h>
20#include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory2D.h>
21#include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectorySZ.h>
23#include <tracking/trackFindingCDC/geometry/UncertainHelix.h>
24#include <tracking/trackFindingCDC/geometry/Vector2D.h>
29using namespace TrackFindingCDC;
33 return "Use an SZFitter to create the 3D trajectory out of the 2D one.";
42 track.shiftToPositiveArcLengths2D();
43 track.sortByArcLength2D();
45 CDCTrajectory2D originalTrajectory2D = track.getStartTrajectory3D().getTrajectory2D();
49 CDCTrajectory3D preliminaryTrajectory3D{originalTrajectory2D, szTrajectory};
50 track.setStartTrajectory3D(preliminaryTrajectory3D);
57 if (recoHit3D.isAxial()) {
58 axialSegment2D.push_back(recoHit3D.getRecoHit2D());
60 stereoSegment2D.push_back(recoHit3D.getRecoHit2D());
62 if ((axialSegment2D.size() > 6) and (stereoSegment2D.size() > 6))
break;
65 if (not((axialSegment2D.size() > 6) and (stereoSegment2D.size() > 6)))
continue;
72 UncertainHelix preliminaryUncertainHelix = preliminaryTrajectory3D.getLocalHelix();
76 preliminaryUncertainHelix.
setChi2(uncertainHelix.
chi2());
77 preliminaryUncertainHelix.
setNDF(uncertainHelix.
ndf());
78 preliminaryTrajectory3D.setLocalHelix(preliminaryUncertainHelix);
80 track.setStartTrajectory3D(preliminaryTrajectory3D);
Utility class implementing the Kalmanesk combination of to two dimensional trajectories to one three ...
void reconstructFuseTrajectories(const CDCSegmentPair &segmentPair)
Combine the two trajectories of the segments in the pair and assign the resulting three dimensional t...
Class representing a three dimensional reconstructed hit.
Class implementing the z coordinate over travel distance line fit.
static const CDCSZFitter & getFitter()
Getter for a standard sz line fitter instance.
CDCTrajectorySZ fitWithStereoHits(const CDCTrack &track) const
Returns the fitted sz trajectory of the track with the z-information of all stereo hits of the number...
A reconstructed sequence of two dimensional hits in one super layer.
Class representing a sequence of three dimensional reconstructed hits.
Particle trajectory as it is seen in xy projection represented as a circle.
const Vector2D & getLocalOrigin() const
Getter for the origin of the local coordinate system.
Particle full three dimensional trajectory.
const UncertainHelix & getLocalHelix() const
Getter for the helix in local coordinates.
double setLocalOrigin(const Vector3D &localOrigin)
Setter for the origin of the local coordinate system.
Linear trajectory in sz space.
void apply(std::vector< CDCTrack > &tracks) final
Fit the tracks.
std::string getDescription() final
Short description of the findlet.
A general helix class including a covariance matrix.
const HelixCovariance & helixCovariance() const
Getter for the whole covariance matrix of the perigee parameters.
void setHelixCovariance(const HelixCovariance &helixCovariance)
Setter for the whole covariance matrix of the perigee parameters.
double chi2() const
Getter for the chi square value of the helix fit.
void setNDF(std::size_t ndf)
Setter for the number of degrees of freediom used in the helix fit.
void setChi2(const double chi2)
Setter for the chi square value of the helix fit.
std::size_t ndf() const
Getter for the number of degrees of freediom used in the helix fit.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
Abstract base class for different kinds of events.