Belle II Software  release-05-01-25
AllSegmentPairFilter.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #include <tracking/trackFindingCDC/filters/segmentPair/AllSegmentPairFilter.h>
11 
12 #include <tracking/trackFindingCDC/eventdata/tracks/CDCSegmentPair.h>
13 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
14 
15 using namespace Belle2;
16 using namespace TrackFindingCDC;
17 
19 {
20  const CDCSegment2D* ptrStartSegment = segmentPair.getFromSegment();
21  const CDCSegment2D* ptrEndSegment = segmentPair.getToSegment();
22 
23  assert(ptrStartSegment);
24  assert(ptrEndSegment);
25 
26  const CDCSegment2D& startSegment = *ptrStartSegment;
27  const CDCSegment2D& endSegment = *ptrEndSegment;
28  return startSegment.size() + endSegment.size();
29 }
Belle2::TrackFindingCDC::CDCSegmentPair
Class representing a pair of one reconstructed axial segement and one stereo segment in adjacent supe...
Definition: CDCSegmentPair.h:44
Belle2::TrackFindingCDC::AllSegmentPairFilter::operator()
Weight operator()(const CDCSegmentPair &segmentPair) final
Checks if a pair of segments is a good combination.
Definition: AllSegmentPairFilter.cc:18
Belle2::TrackFindingCDC::CDCSegmentPair::getToSegment
const CDCSegment2D * getToSegment() const
Getter for the to segment.
Definition: CDCSegmentPair.h:132
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::CDCSegment2D
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:40
Belle2::TrackFindingCDC::CDCSegmentPair::getFromSegment
const CDCSegment2D * getFromSegment() const
Getter for the from segment.
Definition: CDCSegmentPair.h:120