8#include <tracking/trackFindingCDC/findlets/minimal/SegmentLinker.h>
10#include <tracking/trackingUtilities/eventdata/segments/CDCSegment2D.h>
12#include <tracking/trackingUtilities/utilities/WeightedRelation.h>
13#include <tracking/trackingUtilities/utilities/Algorithms.h>
15#include <framework/core/ModuleParamList.templateDetails.h>
21using namespace TrackFindingCDC;
22using namespace TrackingUtilities;
31 return "Links segments by extraction of segment paths in a cellular automaton.";
38 moduleParamList->
addParameter(prefixed(prefix,
"wholeSuperLayer"),
40 "Link segment in the whole superlayer instead of inside the super cluster.",
43 moduleParamList->
addParameter(prefixed(prefix,
"dealiasLinked"),
45 "Block hits that appear in linked segments such that unlinked reverse and aliases are excluded.",
48 moduleParamList->
addParameter(prefixed(prefix,
"onlyLinked"),
50 "Switch to construct only segments that have a linked partner.",
55 std::vector<CDCSegment2D>& outputSegment2Ds)
59 segment2D.setISuperCluster(-1);
64 std::vector<const CDCSegment2D*> segment2DPtrs = as_pointers<const CDCSegment2D>(inputSegment2Ds);
75 const bool toHits =
true;
77 segment.unsetAndForwardMaskedFlag(toHits);
81 std::vector<CDCSegment2D> tempOutputSegment2Ds;
88 (*segment2DPath[0])->hasMaskedFlag()) {
97 tempOutputSegment2Ds.back().setAndForwardMaskedFlag(toHits);
98 for (
const CDCSegment2D& otherSegment : inputSegment2Ds) {
99 otherSegment.receiveMaskedFlag(toHits);
104 outputSegment2Ds = std::move(tempOutputSegment2Ds);
The Module parameter list class.
Implements a path consisting of Module and/or Path objects.
void apply(const std::vector< TrackingUtilities::CDCSegment2D > &inputSegment2Ds, std::vector< TrackingUtilities::CDCSegment2D > &outputSegment2Ds) final
Main algorithm.
bool m_param_wholeSuperLayer
Parameter : Switch to activate segment linking in the whole superlayer instead of only the super clus...
std::vector< TrackingUtilities::WeightedRelation< const TrackingUtilities::CDCSegment2D > > m_segment2DRelations
Memory for the relations between segments to be followed on linking.
std::vector< TrackingUtilities::Path< const TrackingUtilities::CDCSegment2D > > m_segment2DPaths
Memory for the segment paths generated from the graph.
bool m_param_dealiasLinked
Parameter : Switch to block hits that appear in linked segments such that unlinked reverse and aliase...
std::string getDescription() final
Short description of the findlet.
bool m_param_onlyLinked
Parameter : Switch to construct only segments that have a linked partner.
TrackingUtilities::WeightedRelationCreator< const TrackingUtilities::CDCSegment2D, TrackFindingCDC::ChooseableSegmentRelationFilter > m_segment2DRelationCreator
Creator of the segment relations for linking.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
TrackingUtilities::MultipassCellularPathFinder< const TrackingUtilities::CDCSegment2D > m_cellularPathFinder
Instance of the cellular automaton path finder.
SegmentLinker()
Constructor adding the filter as a subordinary processing signal listener.
A reconstructed sequence of two dimensional hits in one super layer.
static CDCSegment2D condense(const CDCTangentSegment &tangentSegment)
Averages the reconstructed positions from hits that overlap in adjacent tangents in the given tangent...
void addProcessingSignalListener(ProcessingSignalListener *psl)
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.