Belle II Software development
ArcLengthBasedCDCfromEclPathPairFilter.h
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#pragma once
9
10#include <tracking/ckf/cdc/filters/pathPairs/BaseCDCPathPairFilter.h>
11
12#include <tracking/trackFindingCDC/numerics/Weight.h>
13
14namespace Belle2 {
21 public:
23 TrackFindingCDC::Weight operator()(const BaseCDCPathPairFilter::Object& pair) final
24 {
25 const auto& lhs = *pair.first;
26 const auto& rhs = *pair.second;
27 const auto& lhsLastState = lhs.back();
28 const auto& rhsLastState = rhs.back();
29
30 const auto lhsArcLength = - lhsLastState.getArcLength();
31 const auto rhsArcLength = - rhsLastState.getArcLength();
32
33 // priority is most hits
34 if (lhs.size() != rhs.size()) {
35 return lhs.size() > rhs.size();
36 }
37
38 return lhsArcLength < rhsArcLength;
39 }
40 };
42}
For the two paths with the same number of hits prefers one with shortest arcLength ("densest path")
TrackFindingCDC::Weight operator()(const BaseCDCPathPairFilter::Object &pair) final
Input: pair of paths, returns 1 if pair.first to be selected, 0 otherwise.
Base class for filters on a generic object type.
Definition: Filter.dcl.h:31
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:35
Abstract base class for different kinds of events.