Belle II Software development
MCSegmentTripleRelationFilter.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <tracking/trackFindingCDC/filters/segmentTripleRelation/MCSegmentTripleRelationFilter.h>
9
10#include <tracking/trackFindingCDC/filters/base/MCSymmetricFilter.icc.h>
11
12#include <tracking/trackingUtilities/eventdata/tracks/CDCSegmentTriple.h>
13#include <tracking/trackingUtilities/eventdata/segments/CDCSegment2D.h>
14
15using namespace Belle2;
16using namespace TrackFindingCDC;
17using namespace TrackingUtilities;
18
20
26
28 const std::string& prefix)
29{
30 m_mcSegmentTripleFilter.exposeParameters(moduleParamList, prefix);
31}
32
38
40 const CDCSegmentTriple& toTriple)
41{
42 if (fromTriple.getEndSegment() != toTriple.getStartSegment()) return NAN;
43
44 Weight mcFromTripleWeight = m_mcSegmentTripleFilter(fromTriple);
45 Weight mcToTripleWeight = m_mcSegmentTripleFilter(toTriple);
46
47 ESign fromFBInfo = sign(mcFromTripleWeight);
48 ESign toFBInfo = sign(mcToTripleWeight);
49
50 if (not isValid(fromFBInfo) or not isValid(toFBInfo) or fromFBInfo != toFBInfo) return NAN;
51
52 ESign commonFBInfo = fromFBInfo;
53
54 Weight overlapWeight = toTriple.getStartSegment()->size();
55 return commonFBInfo > 0 ? overlapWeight : -overlapWeight;
56}
The Module parameter list class.
MCSegmentTripleFilter m_mcSegmentTripleFilter
Instance of the Monte Carlo segment triple filter for rejection of false cells.
void initialize() final
Initialize the before event processing.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void setAllowReverse(bool allowReverse) override
Setter for the allow reverse parameter.
TrackingUtilities::Weight operator()(const TrackingUtilities::CDCSegmentTriple &fromTriple, const TrackingUtilities::CDCSegmentTriple &toTriple) final
Main filter method returning the weight of the neighborhood relation.
Mixin for filters that use Monte Carlo information.
Class representing a triple of reconstructed segments in adjacent superlayer.
const CDCAxialSegment2D * getEndSegment() const
Getter for the end axial segment.
const CDCAxialSegment2D * getStartSegment() const
Getter for the start axial segment.
Abstract base class for different kinds of events.