Belle II Software  release-05-01-25
FirstOfPairInBox.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/numerics/Weight.h>
13 
14 namespace Belle2 {
19  namespace TrackFindingCDC {
20 
24  template<class AHitInBoxAlgorithm>
25  class FirstOfPairInBox {
26  public:
28  using HoughBox = typename AHitInBoxAlgorithm::HoughBox;
30  using BoxAlgorithm = AHitInBoxAlgorithm;
31 
33  template<class APairObject>
34  Weight operator()(const APairObject& pairObject,
35  const HoughBox* box)
36  {
37  AHitInBoxAlgorithm hitInBoxAlgorithm;
38  return hitInBoxAlgorithm(pairObject.first, box);
39  }
40  };
41  }
43 }
Belle2::TrackFindingCDC::FirstOfPairInBox::operator()
Weight operator()(const APairObject &pairObject, const HoughBox *box)
Redirect the first element of a pair to the next algorithm.
Definition: FirstOfPairInBox.h:42
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::FirstOfPairInBox::BoxAlgorithm
AHitInBoxAlgorithm BoxAlgorithm
The hit-finding algorithm.
Definition: FirstOfPairInBox.h:38
Belle2::TrackFindingCDC::FirstOfPairInBox::HoughBox
typename AHitInBoxAlgorithm::HoughBox HoughBox
The type of the underlying HoughBox (copied from the underlying hit algorithm)
Definition: FirstOfPairInBox.h:36