Belle II Software  release-05-01-25
CKFFunctors.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost, Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/utilities/FunctorTag.h>
13 
14 namespace Belle2 {
19  struct SeedGetter {
22  explicit operator TrackFindingCDC::FunctorTag();
23 
25  template<class T>
26  auto operator()(const T& t) const
27  {
28  return t.getSeed();
29  }
30  };
31 
33  struct NumberOfHitsGetter {
35  explicit operator TrackFindingCDC::FunctorTag();
36 
38  template<class T>
39  auto operator()(const T& t) const
40  {
41  return t->getHits().size();
42  }
43  };
44 
46  struct GetArcLength {
48  explicit operator TrackFindingCDC::FunctorTag();
49 
51  template<class T, class SFINAE = decltype(&T::getArcLength)>
52  double operator()(const T& t) const
53  {
54  return t.getArcLength();
55  }
56  };
58 }
Belle2::NumberOfHitsGetter::operator()
auto operator()(const T &t) const
Returns the number of hits of an object.
Definition: CKFFunctors.h:47
Belle2::SeedGetter::operator()
auto operator()(const T &t) const
Returns the seed of an object.
Definition: CKFFunctors.h:34
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::GetArcLength::operator()
double operator()(const T &t) const
Returns the weight of an object.
Definition: CKFFunctors.h:60