Belle II Software development
MVARealisticSegmentRelationFilter.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/segmentRelation/MVARealisticSegmentRelationFilter.h>
9
10#include <tracking/trackFindingCDC/filters/base/MVAFilter.icc.h>
11
12using namespace Belle2;
13using namespace TrackFindingCDC;
14
16
18 : Super(std::make_unique<VarSet>(),
19 "trackfindingcdc_RealisticSegmentRelationFilter",
20 0.805,
21 "trackfindingcdc_RealisticSegmentRelationFilterParameters")
22{
23 this->addProcessingSignalListener(&m_feasibleSegmentRelationFilter);
24}
25
27{
28 double isFeasibleWeight = m_feasibleSegmentRelationFilter(segmentRelation);
29 if (std::isnan(isFeasibleWeight)) {
30 return NAN;
31 } else {
32 return Super::operator()(segmentRelation);
33 }
34}
VariadicUnionVarSet< BasicSegmentRelationVarSet, FitlessSegmentRelationVarSet, FitSegmentRelationVarSet > VarSet
Type of the VarSet the filter is working on.
Weight operator()(const Relation< const CDCSegment2D > &segmentRelation) override
Function to object for its signalness.
MVA< BaseSegmentRelationFilter > Super
Type of the base class.
MVAFeasibleSegmentRelationFilter m_feasibleSegmentRelationFilter
Feasibility filter applied first before invoking the main cut.
MVARealisticSegmentRelationFilter()
Constructor initialising the MVAFilter with standard training name for this filter.
Filter based on a mva method.
Type for two related objects.
Definition Relation.h:21
Abstract base class for different kinds of events.
STL namespace.