8 #include <tracking/trackFindingCDC/findlets/minimal/TrackCreatorSegmentPairAutomaton.h>
10 #include <tracking/trackFindingCDC/fitting/CDCAxialStereoFusion.h>
12 #include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
13 #include <tracking/trackFindingCDC/eventdata/tracks/CDCSegmentPair.h>
14 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
16 #include <tracking/trackFindingCDC/ca/Path.h>
18 #include <tracking/trackFindingCDC/utilities/WeightedRelation.h>
21 using namespace TrackFindingCDC;
25 return "Constructs tracks by extraction of segment pair paths in a cellular automaton.";
34 const std::vector<CDCSegmentPair>& inputSegmentPairs,
36 std::vector<CDCTrack>& outputTracks)
39 std::vector<const CDCSegmentPair*> segmentPairPtrs =
40 as_pointers<const CDCSegmentPair>(inputSegmentPairs);
48 CDCTrajectory3D startTrajectory3D = segmentPairPath.front()->getTrajectory3D();
49 CDCTrajectory3D endTrajectory3D = segmentPairPath.back()->getTrajectory3D();
52 auto saverStereoApogeePositions = [&fusionFitter](
const CDCSegmentPair * lhs,
55 if (lhs->
getFromSegment()->getISuperLayer() != rhs->getToSegment()->getISuperLayer())
return false;
69 std::adjacent_find(segmentPairPath.begin(), segmentPairPath.end(), saverStereoApogeePositions);
73 CDCTrack& track = outputTracks.back();
78 Vector3D startPos = track.getStartTrajectory3D().getLocalOrigin();
80 track.setStartTrajectory3D(startTrajectory3D);
82 Vector3D endPos = track.getEndTrajectory3D().getLocalOrigin();
84 track.setEndTrajectory3D(endTrajectory3D);
87 segmentPair->getFromSegment()->getAutomatonCell().setTakenFlag();
88 segmentPair->getToSegment()->getAutomatonCell().setTakenFlag();
The Module parameter list class.
Utility class implementing the Kalmanesk combination of to two dimensional trajectories to one three ...
void fusePreliminary(const CDCSegmentPair &segmentPair)
Fit the given segment pair using the preliminary helix fit without proper covariance matrix.
Class representing a pair of one reconstructed axial segement and one stereo segment in adjacent supe...
const CDCSegment2D * getFromSegment() const
Getter for the from segment.
const CDCSegment2D * getToSegment() const
Getter for the to segment.
Class representing a sequence of three dimensional reconstructed hits.
static CDCTrack condense(const Path< const CDCTrack > &trackPath)
Concats several tracks from a path.
Particle full three dimensional trajectory.
double setLocalOrigin(const Vector3D &localOrigin)
Setter for the origin of the local coordinate system.
std::vector< Path< const CDCSegmentPair > > m_segmentPairPaths
Memory for the segment pair paths generated from the graph.
MultipassCellularPathFinder< const CDCSegmentPair > m_cellularPathFinder
Instance of the cellular automaton path finder.
std::string getDescription() final
Short description of the findlet.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void apply(const std::vector< CDCSegmentPair > &inputSegmentPairs, const std::vector< WeightedRelation< const CDCSegmentPair >> &inputSegmentPairRelations, std::vector< CDCTrack > &outputTracks) final
Main function of the segment finding by the cellular automaton.
A three dimensional vector.
Type for two related objects with a weight.
Abstract base class for different kinds of events.