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>
24using namespace TrackFindingCDC;
28 return "Constructs tracks by extraction of segment pair paths in a cellular automaton.";
37 const std::vector<CDCSegmentPair>& inputSegmentPairs,
39 std::vector<CDCTrack>& outputTracks)
42 std::vector<const CDCSegmentPair*> segmentPairPtrs =
43 as_pointers<const CDCSegmentPair>(inputSegmentPairs);
51 CDCTrajectory3D startTrajectory3D = segmentPairPath.front()->getTrajectory3D();
52 CDCTrajectory3D endTrajectory3D = segmentPairPath.back()->getTrajectory3D();
55 auto saverStereoApogeePositions = [&fusionFitter](
const CDCSegmentPair * lhs,
58 if (lhs->
getFromSegment()->getISuperLayer() != rhs->getToSegment()->getISuperLayer())
return false;
71 std::ignore = std::adjacent_find(segmentPairPath.begin(), segmentPairPath.end(), saverStereoApogeePositions);
75 CDCTrack& track = outputTracks.back();
80 Vector3D startPos = track.getStartTrajectory3D().getLocalOrigin();
82 track.setStartTrajectory3D(startTrajectory3D);
84 Vector3D endPos = track.getEndTrajectory3D().getLocalOrigin();
86 track.setEndTrajectory3D(endTrajectory3D);
89 segmentPair->getFromSegment()->getAutomatonCell().setTakenFlag();
90 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 segment and one stereo segment in adjacent super...
const CDCSegment2D * getToSegment() const
Getter for the to segment.
const CDCSegment2D * getFromSegment() const
Getter for the from segment.
Class representing a sequence of three dimensional reconstructed hits.
static CDCTrack condense(const Path< const CDCTrack > &trackPath)
concatenates 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.
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.
std::string getDescription() final
Short description of the findlet.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
A three dimensional vector.
Type for two related objects with a weight.
Abstract base class for different kinds of events.