Belle II Software development
FitlessSegmentPairFilter.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/segmentPair/FitlessSegmentPairFilter.h>
9
10#include <tracking/trackingUtilities/eventdata/tracks/CDCSegmentPair.h>
11#include <tracking/trackingUtilities/eventdata/segments/CDCSegment2D.h>
12
13#include <tracking/trackingUtilities/filters/base/FilterOnVarSet.icc.h>
14
15using namespace Belle2;
16using namespace TrackFindingCDC;
17using namespace TrackingUtilities;
18
20
22{
23 const CDCSegment2D* ptrStartSegment = segmentPair.getFromSegment();
24 const CDCSegment2D* ptrEndSegment = segmentPair.getToSegment();
25
26 assert(ptrStartSegment);
27 assert(ptrEndSegment);
28
29 const CDCSegment2D& startSegment = *ptrStartSegment;
30 const CDCSegment2D& endSegment = *ptrEndSegment;
31
32 double weight = startSegment.size() + endSegment.size();
33 return Super::operator()(segmentPair) * weight;
34}
TrackingUtilities::Weight operator()(const TrackingUtilities::CDCSegmentPair &segmentPair) final
Checks if a pair of segments is a good combination.
A reconstructed sequence of two dimensional hits in one super layer.
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.
const CDCSegment2D * getFromSegment() const
Getter for the from segment.
Convenience template to create a filter operating on a specific set of variables.
Abstract base class for different kinds of events.