8#include <tracking/trackFindingCDC/findlets/minimal/SegmentTripleCreator.h>
10#include <tracking/trackFindingCDC/eventdata/tracks/CDCSegmentTriple.h>
11#include <tracking/trackFindingCDC/eventdata/tracks/CDCAxialSegmentPair.h>
12#include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
14#include <tracking/trackFindingCDC/topology/ISuperLayer.h>
16#include <framework/logging/Logger.h>
24using namespace TrackFindingCDC;
33 return "Creates segment triples from a set of middle segments and already combined axial "
34 "segment pairs filtered by some acceptance criterion";
43 const std::vector<CDCAxialSegmentPair>& inputAxialSegmentPairs,
44 std::vector<CDCSegmentTriple>& segmentTriples)
48 segementsInSuperLayer.clear();
52 ISuperLayer iSuperLayer = segment.getISuperLayer();
58 const CDCSegment2D* startSegment = axialSegmentPair.getStartSegment();
59 const CDCSegment2D* endSegment = axialSegmentPair.getEndSegment();
61 ISuperLayer startISuperLayer = startSegment->getISuperLayer();
62 ISuperLayer endISuperLayer = endSegment->getISuperLayer();
67 if (startISuperLayer != endISuperLayer) {
68 ISuperLayer middleISuperLayer = (startISuperLayer + endISuperLayer) / 2;
73 create(axialSegmentPair, middleSegments, segmentTriples);
79 for (ISuperLayer middleISuperLayer : {middleISuperLayerIn, middleISuperLayerOut}) {
82 create(axialSegmentPair, middleSegments, segmentTriples);
87 std::sort(segmentTriples.begin(), segmentTriples.end());
91 const std::vector<const CDCSegment2D*>& middleSegments,
92 std::vector<CDCSegmentTriple>& segmentTriples)
95 for (
const CDCSegment2D* middleSegment : middleSegments) {
102 if (not std::isnan(weight)) {
104 segmentTriples.insert(segmentTriples.end(), segmentTriple);
The Module parameter list class.
void setCellWeight(Weight weight)
Setter for the cell weight.
Class representing a pair of reconstructed axial segments in adjacent superlayer.
A reconstructed sequence of two dimensional hits in one super layer.
Class representing a triple of reconstructed segments in adjacent superlayer.
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
void setMiddleSegment(const CDCStereoSegment2D *middleSegment)
Setter for the middle stereo segment.
void clearTrajectory3D() const
Clears the three dimensional helix trajectory.
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.
void apply(const std::vector< CDCSegment2D > &inputSegments, const std::vector< CDCAxialSegmentPair > &inputAxialSegmentPairs, std::vector< CDCSegmentTriple > &segmentTriples) final
Main method constructing pairs in adjacent super layers.
void create(const CDCAxialSegmentPair &axialSegmentPair, const std::vector< const CDCSegment2D * > &middleSegments, std::vector< CDCSegmentTriple > &segmentTriples)
Creates segment triples by adding the middle segment to the axial segments and filter out the valuabl...
std::string getDescription() final
Short description of the findlet.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
SegmentTripleCreator()
Constructor adding the filter as a subordinary processing signal listener.
ChooseableSegmentTripleFilter m_segmentTripleFilter
The filter to be used for the segment triple generation.
std::array< std::vector< const CDCSegment2D * >, ISuperLayerUtil::c_N > m_segmentsBySuperLayer
Structure for the segments grouped by super layer id.
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 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...