Belle II Software  release-08-01-10
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/trackFindingCDC/eventdata/tracks/CDCSegmentPair.h>
11 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
12 
13 #include <tracking/trackFindingCDC/filters/base/FilterOnVarSet.icc.h>
14 
15 using namespace Belle2;
16 using namespace TrackFindingCDC;
17 
19 
21 {
22  const CDCSegment2D* ptrStartSegment = segmentPair.getFromSegment();
23  const CDCSegment2D* ptrEndSegment = segmentPair.getToSegment();
24 
25  assert(ptrStartSegment);
26  assert(ptrEndSegment);
27 
28  const CDCSegment2D& startSegment = *ptrStartSegment;
29  const CDCSegment2D& endSegment = *ptrEndSegment;
30 
31  double weight = startSegment.size() + endSegment.size();
32  return Super::operator()(segmentPair) * weight;
33 }
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.
Weight operator()(const CDCSegmentPair &segmentPair) final
Checks if a pair of segments is a good combination.
Weight operator()(const Object &obj) override
Function extracting the variables of the object into the variable set.
Abstract base class for different kinds of events.