8#include <tracking/trackFindingCDC/findlets/minimal/AxialSegmentPairCreator.h>
10#include <tracking/trackFindingCDC/eventdata/tracks/CDCAxialSegmentPair.h>
11#include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
17using namespace TrackFindingCDC;
26 return "Creates axial axial segment pairs from a set of segments filtered by some acceptance criterion";
35 std::vector<CDCAxialSegmentPair>& axialSegmentPairs)
39 segementsInSuperLayer.clear();
43 ISuperLayer iSuperLayer = segment.getISuperLayer();
60 create(startSegments, endSegments, axialSegmentPairs);
65 create(startSegments, startSegments, axialSegmentPairs);
73 create(startSegments, endSegments, axialSegmentPairs);
79 std::sort(axialSegmentPairs.begin(), axialSegmentPairs.end());
83 const std::vector<const CDCSegment2D*>& endSegments,
84 std::vector<CDCAxialSegmentPair>& axialSegmentPairs)
87 for (
const CDCSegment2D* ptrStartSegment : startSegments) {
90 if (ptrStartSegment == ptrEndSegment)
continue;
91 axialSegmentPair.
setSegments(ptrStartSegment, ptrEndSegment);
95 if (not std::isnan(pairWeight)) {
97 axialSegmentPairs.push_back(axialSegmentPair);
The Module parameter list class.
void setCellWeight(Weight weight)
Setter for the cell weight.
AxialSegmentPairCreator()
Constructor adding the filter as a subordinary processing signal listener.
std::string getDescription() final
Short description of the findlet.
void create(const std::vector< const CDCSegment2D * > &startSegments, const std::vector< const CDCSegment2D * > &endSegments, std::vector< CDCAxialSegmentPair > &axialSegmentPairs)
Creates segment pairs from a combination of start segments and end segments.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void apply(const std::vector< CDCSegment2D > &inputSegments, std::vector< CDCAxialSegmentPair > &axialSegmentPairs) final
Main method constructing pairs in adjacent super layers.
std::array< std::vector< const CDCSegment2D * >, ISuperLayerUtil::c_N > m_segmentsBySuperLayer
Structure for the segments grouped by super layer id.
ChooseableAxialSegmentPairFilter m_axialSegmentPairFilter
The filter to be used for the segment pair generation.
Class representing a pair of reconstructed axial segments in adjacent superlayer.
void clearTrajectory2D() const
Invalidates the currently stored trajectory information.
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
void setSegments(const CDCSegment2D *startSegment, const CDCSegment2D *endSegment)
Setter for both segments simultaneously.
A reconstructed sequence of two dimensional hits in one super layer.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the set of parameters of the filter to the module parameter list.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
Abstract base class for different kinds of events.
static bool isAxial(ISuperLayer iSuperLayer)
Returns if the super layer with the given id is axial.
static const ISuperLayer c_N
Constant representing the total number of cdc superlayers.
static ISuperLayer getNextInwards(ISuperLayer iSuperLayer)
Returns the super layer that is inside of the given super layer.
static ISuperLayer getNextOutwards(ISuperLayer iSuperLayer)
Returns the super layer that is outside of the given super layer.
static bool isInCDC(ISuperLayer iSuperLayer)
Indicates if the given number corresponds to a true cdc superlayer - excludes the logic ids for inner...