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/trackFindingCDC/eventdata/tracks/CDCSegmentTriple.h>
13#include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
14
15using namespace Belle2;
16using namespace TrackFindingCDC;
17
19
25
27 const std::string& prefix)
28{
29 m_mcSegmentTripleFilter.exposeParameters(moduleParamList, prefix);
30}
31
37
39 const CDCSegmentTriple& toTriple)
40{
41 if (fromTriple.getEndSegment() != toTriple.getStartSegment()) return NAN;
42
43 Weight mcFromTripleWeight = m_mcSegmentTripleFilter(fromTriple);
44 Weight mcToTripleWeight = m_mcSegmentTripleFilter(toTriple);
45
46 ESign fromFBInfo = sign(mcFromTripleWeight);
47 ESign toFBInfo = sign(mcToTripleWeight);
48
49 if (not isValid(fromFBInfo) or not isValid(toFBInfo) or fromFBInfo != toFBInfo) return NAN;
50
51 ESign commonFBInfo = fromFBInfo;
52
53 Weight overlapWeight = toTriple.getStartSegment()->size();
54 return commonFBInfo > 0 ? overlapWeight : -overlapWeight;
55}
The Module parameter list class.
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.
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.
Weight operator()(const CDCSegmentTriple &fromTriple, const CDCSegmentTriple &toTriple) final
Main filter method returning the weight of the neighborhood relation.
Mixin for filters that use Monte Carlo information.
Abstract base class for different kinds of events.