Belle II Software  release-08-01-10
CKFFunctors.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/trackFindingCDC/utilities/FunctorTag.h>
11 
12 namespace Belle2 {
18  struct SeedGetter {
20  explicit operator TrackFindingCDC::FunctorTag();
21 
23  template<class T>
24  auto operator()(const T& t) const
25  {
26  return t.getSeed();
27  }
28  };
29 
33  explicit operator TrackFindingCDC::FunctorTag();
34 
36  template<class T>
37  auto operator()(const T& t) const
38  {
39  return t->getHits().size();
40  }
41  };
42 
44  struct GetArcLength {
46  explicit operator TrackFindingCDC::FunctorTag();
47 
49  template<class T, class SFINAE = decltype(&T::getArcLength)>
50  double operator()(const T& t) const
51  {
52  return t.getArcLength();
53  }
54  };
56 }
Abstract base class for different kinds of events.
Helper Functor to get the arc length of a given result.
Definition: CKFFunctors.h:44
double operator()(const T &t) const
Returns the weight of an object.
Definition: CKFFunctors.h:50
Helper Functor to get the Number of hits of a given result.
Definition: CKFFunctors.h:31
auto operator()(const T &t) const
Returns the number of hits of an object.
Definition: CKFFunctors.h:37
Helper Functor to get the Seed of a given result.
Definition: CKFFunctors.h:18
auto operator()(const T &t) const
Returns the seed of an object.
Definition: CKFFunctors.h:24
Tag class to facilitate marking of class as a functor in the sense of this code.
Definition: FunctorTag.h:20