8#include <tracking/trackFindingCDC/filters/segmentPairRelation/MCSegmentPairRelationFilter.h>
10#include <tracking/trackingUtilities/eventdata/tracks/CDCSegmentPair.h>
11#include <tracking/trackingUtilities/eventdata/segments/CDCSegment2D.h>
13#include <tracking/trackFindingCDC/filters/base/MCSymmetricFilter.icc.h>
16using namespace TrackFindingCDC;
17using namespace TrackingUtilities;
29 const std::string& prefix)
46 ESign fromFBInfo = sign(mcFromPairWeight);
47 ESign toFBInfo = sign(mcToPairWeight);
49 if (isValid(fromFBInfo) and isValid(toFBInfo) and fromFBInfo == toFBInfo) {
50 ESign commonFBInfo = fromFBInfo;
52 size_t fromOverlapSize = fromSegmentPair.
getToSegment()->size();
53 size_t fromSize = fromOverlapSize + fromSegmentPair.
getFromSegment()->size();
57 size_t toSize = toOverlapSize + toSegmentPair.
getToSegment()->size();
59 double overlapWeight =
60 (fromWeight * fromOverlapSize / fromSize + toWeight * toOverlapSize / toSize) / 2.0;
63 return -std::fabs(overlapWeight);
64 }
else if (commonFBInfo > 0) {
65 return std::fabs(overlapWeight);
The Module parameter list class.
void setAllowReverse(bool allowReverse) final
Setter for the allow reverse parameter.
MCSymmetric< BaseSegmentPairRelationFilter > Super
Type of the super class.
void initialize() final
Initialize the before event processing.
TrackingUtilities::Weight operator()(const TrackingUtilities::CDCSegmentPair &fromSegmentPair, const TrackingUtilities::CDCSegmentPair &toSegmentPair) final
Main filter method returning the weight of the neighborhood relation.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
MCSegmentPairRelationFilter(bool allowReverse=true)
Constructor setting to default reversal symmetry.
MCSegmentPairFilter m_mcSegmentPairFilter
Instance of the Monte Carlo axial stereo segment filter for rejection of false cells.
Mixin for filters that use Monte Carlo information.
void initialize() override
bool getAllowReverse() const
Weight getCellWeight() const
Getter for the cell weight.
Class representing a pair of one reconstructed axial segment and one stereo segment in adjacent super...
const CDCSegment2D * getToSegment() const
Getter for the to segment.
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
const CDCSegment2D * getFromSegment() const
Getter for the from segment.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Abstract base class for different kinds of events.