Belle II Software  release-08-01-10
AllSegmentPairFilter.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/AllSegmentPairFilter.h>
9 
10 #include <tracking/trackFindingCDC/eventdata/tracks/CDCSegmentPair.h>
11 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
12 
13 using namespace Belle2;
14 using namespace TrackFindingCDC;
15 
17 {
18  const CDCSegment2D* ptrStartSegment = segmentPair.getFromSegment();
19  const CDCSegment2D* ptrEndSegment = segmentPair.getToSegment();
20 
21  assert(ptrStartSegment);
22  assert(ptrEndSegment);
23 
24  const CDCSegment2D& startSegment = *ptrStartSegment;
25  const CDCSegment2D& endSegment = *ptrEndSegment;
26  return startSegment.size() + endSegment.size();
27 }
Weight operator()(const CDCSegmentPair &segmentPair) final
Checks if a pair of segments is a good combination.
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:39
Class representing a pair of one reconstructed axial segement and one stereo segment in adjacent supe...
const CDCSegment2D * getFromSegment() const
Getter for the from segment.
const CDCSegment2D * getToSegment() const
Getter for the to segment.
Abstract base class for different kinds of events.