8#include <tracking/trackFindingCDC/filters/segmentPairRelation/MCSegmentPairRelationFilter.h>
10#include <tracking/trackFindingCDC/eventdata/tracks/CDCSegmentPair.h>
11#include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
13#include <tracking/trackFindingCDC/filters/base/MCSymmetricFilter.icc.h>
16using namespace TrackFindingCDC;
28 const std::string& prefix)
45 ESign fromFBInfo = sign(mcFromPairWeight);
46 ESign toFBInfo = sign(mcToPairWeight);
48 if (isValid(fromFBInfo) and isValid(toFBInfo) and fromFBInfo == toFBInfo) {
49 ESign commonFBInfo = fromFBInfo;
51 size_t fromOverlapSize = fromSegmentPair.
getToSegment()->size();
52 size_t fromSize = fromOverlapSize + fromSegmentPair.
getFromSegment()->size();
56 size_t toSize = toOverlapSize + toSegmentPair.
getToSegment()->size();
58 double overlapWeight =
59 (fromWeight * fromOverlapSize / fromSize + toWeight * toOverlapSize / toSize) / 2.0;
62 return -std::fabs(overlapWeight);
63 }
else if (commonFBInfo > 0) {
64 return std::fabs(overlapWeight);
The Module parameter list class.
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)
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.
Weight operator()(const CDCSegmentPair &fromSegmentPair, const 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
Abstract base class for different kinds of events.