8#include <tracking/trackFindingCDC/findlets/minimal/AxialSegmentPairCreator.h>
10#include <tracking/trackingUtilities/eventdata/tracks/CDCAxialSegmentPair.h>
11#include <tracking/trackingUtilities/eventdata/segments/CDCSegment2D.h>
18using namespace TrackFindingCDC;
19using namespace TrackingUtilities;
28 return "Creates axial axial segment pairs from a set of segments filtered by some acceptance criterion";
37 std::vector<CDCAxialSegmentPair>& axialSegmentPairs)
41 segementsInSuperLayer.clear();
62 create(startSegments, endSegments, axialSegmentPairs);
67 create(startSegments, startSegments, axialSegmentPairs);
75 create(startSegments, endSegments, axialSegmentPairs);
81 std::sort(axialSegmentPairs.begin(), axialSegmentPairs.end());
85 const std::vector<const CDCSegment2D*>& endSegments,
86 std::vector<CDCAxialSegmentPair>& axialSegmentPairs)
89 for (
const CDCSegment2D* ptrStartSegment : startSegments) {
92 if (ptrStartSegment == ptrEndSegment)
continue;
93 axialSegmentPair.
setSegments(ptrStartSegment, ptrEndSegment);
97 if (not std::isnan(pairWeight)) {
99 axialSegmentPairs.push_back(axialSegmentPair);
The Module parameter list class.
void apply(const std::vector< TrackingUtilities::CDCSegment2D > &inputSegments, std::vector< TrackingUtilities::CDCAxialSegmentPair > &axialSegmentPairs) final
Main method constructing pairs in adjacent super layers.
AxialSegmentPairCreator()
Constructor adding the filter as a subordinary processing signal listener.
std::string getDescription() final
Short description of the findlet.
std::array< std::vector< const TrackingUtilities::CDCSegment2D * >, CDC::ISuperLayerUtil::c_N > m_segmentsBySuperLayer
Structure for the segments grouped by super layer id.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void create(const std::vector< const TrackingUtilities::CDCSegment2D * > &startSegments, const std::vector< const TrackingUtilities::CDCSegment2D * > &endSegments, std::vector< TrackingUtilities::CDCAxialSegmentPair > &axialSegmentPairs)
Creates segment pairs from a combination of start segments and end segments.
ChooseableAxialSegmentPairFilter m_axialSegmentPairFilter
The filter to be used for the segment pair generation.
void setCellWeight(Weight weight)
Setter for the cell weight.
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 addProcessingSignalListener(ProcessingSignalListener *psl)
signed short ISuperLayer
The type of the layer and superlayer ids.
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...