8#include <tracking/trackFindingCDC/findlets/minimal/SegmentLinker.h>
10#include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
12#include <tracking/trackFindingCDC/utilities/WeightedRelation.h>
13#include <tracking/trackFindingCDC/utilities/Algorithms.h>
15#include <framework/core/ModuleParamList.templateDetails.h>
21using namespace TrackFindingCDC;
30 return "Links segments by extraction of segment paths in a cellular automaton.";
37 moduleParamList->
addParameter(prefixed(prefix,
"wholeSuperLayer"),
39 "Link segment in the whole superlayer instead of inside the super cluster.",
42 moduleParamList->
addParameter(prefixed(prefix,
"dealiasLinked"),
44 "Block hits that appear in linked segments such that unlinked reverse and aliases are excluded.",
47 moduleParamList->
addParameter(prefixed(prefix,
"onlyLinked"),
49 "Switch to construct only segments that have a linked partner.",
54 std::vector<CDCSegment2D>& outputSegment2Ds)
58 segment2D.setISuperCluster(-1);
63 std::vector<const CDCSegment2D*> segment2DPtrs = as_pointers<const CDCSegment2D>(inputSegment2Ds);
74 const bool toHits =
true;
76 segment.unsetAndForwardMaskedFlag(toHits);
80 std::vector<CDCSegment2D> tempOutputSegment2Ds;
87 (*segment2DPath[0])->hasMaskedFlag()) {
96 tempOutputSegment2Ds.back().setAndForwardMaskedFlag(toHits);
97 for (
const CDCSegment2D& otherSegment : inputSegment2Ds) {
98 otherSegment.receiveMaskedFlag(toHits);
103 outputSegment2Ds = std::move(tempOutputSegment2Ds);
The Module parameter list class.
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)
Register a processing signal listener to be notified.
std::vector< WeightedRelation< const CDCSegment2D > > m_segment2DRelations
Memory for the relations between segments to be followed on linking.
WeightedRelationCreator< const CDCSegment2D, ChooseableSegmentRelationFilter > m_segment2DRelationCreator
Creator of the segment relations for linking.
MultipassCellularPathFinder< const CDCSegment2D > m_cellularPathFinder
Instance of the cellular automaton path finder.
bool m_param_wholeSuperLayer
Parameter : Switch to activate segment linking in the whole superlayer instead of only the super clus...
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.
void apply(const std::vector< CDCSegment2D > &inputSegment2Ds, std::vector< CDCSegment2D > &outputSegment2Ds) final
Main algorithm.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
SegmentLinker()
Constructor adding the filter as a subordinary processing signal listener.
std::vector< Path< const CDCSegment2D > > m_segment2DPaths
Memory for the segment paths generated from the graph.
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.