Belle II Software  release-08-01-10
AllSegmentTripleFilter.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/segmentTriple/AllSegmentTripleFilter.h>
9 
10 #include <tracking/trackFindingCDC/eventdata/tracks/CDCSegmentTriple.h>
11 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
12 
13 using namespace Belle2;
14 using namespace TrackFindingCDC;
15 
17 {
18  const CDCAxialSegment2D* ptrStartSegment = segmentTriple.getStartSegment();
19  const CDCStereoSegment2D* ptrMiddleSegment = segmentTriple.getMiddleSegment();
20  const CDCAxialSegment2D* ptrEndSegment = segmentTriple.getEndSegment();
21 
22  assert(ptrStartSegment);
23  assert(ptrMiddleSegment);
24  assert(ptrEndSegment);
25 
26  const CDCAxialSegment2D& startSegment = *ptrStartSegment;
27  const CDCAxialSegment2D& middleSegment = *ptrMiddleSegment;
28  const CDCAxialSegment2D& endSegment = *ptrEndSegment;
29 
30  Weight result = startSegment.size() + middleSegment.size() + endSegment.size();
31 
32  return result;
33 }
Weight operator()(const CDCSegmentTriple &segmentTriple) final
All implementation returns the size of the segment triples accepting all.
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:39
Class representing a triple of reconstructed segements in adjacent superlayer.
const CDCAxialSegment2D * getStartSegment() const
Getter for the start axial segment.
const CDCAxialSegment2D * getEndSegment() const
Getter for the end axial segment.
const CDCStereoSegment2D * getMiddleSegment() const
Getter for the middle stereo segment.
Abstract base class for different kinds of events.