Belle II Software development
FirstOfPairInBox.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/numerics/Weight.h>
11
12namespace Belle2 {
17 namespace TrackFindingCDC {
18
22 template<class AHitInBoxAlgorithm>
24 public:
26 using HoughBox = typename AHitInBoxAlgorithm::HoughBox;
28 using BoxAlgorithm = AHitInBoxAlgorithm;
29
31 template<class APairObject>
32 Weight operator()(const APairObject& pairObject,
33 const HoughBox* box)
34 {
35 AHitInBoxAlgorithm hitInBoxAlgorithm;
36 return hitInBoxAlgorithm(pairObject.first, box);
37 }
38 };
39 }
41}
Helper class to redirect only the first element in a pair to the child algorithm.
AHitInBoxAlgorithm BoxAlgorithm
The hit-finding algorithm.
Weight operator()(const APairObject &pairObject, const HoughBox *box)
Redirect the first element of a pair to the next algorithm.
typename AHitInBoxAlgorithm::HoughBox HoughBox
The type of the underlying HoughBox (copied from the underlying hit algorithm)
Abstract base class for different kinds of events.