Belle II Software  release-05-01-25
FitlessSegmentPairFilter.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2014 - 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/FitlessSegmentPairFilter.h>
11 
12 #include <tracking/trackFindingCDC/eventdata/tracks/CDCSegmentPair.h>
13 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
14 
15 #include <tracking/trackFindingCDC/filters/base/FilterOnVarSet.icc.h>
16 
17 using namespace Belle2;
18 using namespace TrackFindingCDC;
19 
21 
23 {
24  const CDCSegment2D* ptrStartSegment = segmentPair.getFromSegment();
25  const CDCSegment2D* ptrEndSegment = segmentPair.getToSegment();
26 
27  assert(ptrStartSegment);
28  assert(ptrEndSegment);
29 
30  const CDCSegment2D& startSegment = *ptrStartSegment;
31  const CDCSegment2D& endSegment = *ptrEndSegment;
32 
33  double weight = startSegment.size() + endSegment.size();
34  return Super::operator()(segmentPair) * weight;
35 }
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::OnVarSet< Filter< SkimmedHitGapSegmentPairVarSet ::Object > >::operator()
Weight operator()(const Object &obj) override
Function extracting the variables of the object into the variable set.
Definition: FilterOnVarSet.icc.h:76
Belle2::TrackFindingCDC::CDCSegmentPair::getToSegment
const CDCSegment2D * getToSegment() const
Getter for the to segment.
Definition: CDCSegmentPair.h:132
Belle2::TrackFindingCDC::FilterOnVarSet< SkimmedHitGapSegmentPairVarSet >
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
Belle2::TrackFindingCDC::FitlessSegmentPairFilter::operator()
Weight operator()(const CDCSegmentPair &segmentPair) final
Checks if a pair of segments is a good combination.
Definition: FitlessSegmentPairFilter.cc:22