Belle II Software development
LimitedOnHitApplier.dcl.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/vxdHoughTracking/findlets/OnHitApplier.dcl.h>
11#include <tracking/trackFindingCDC/numerics/WithWeight.h>
12#include <tracking/trackFindingCDC/numerics/Weight.h>
13
14#include <vector>
15#include <string>
16
17namespace Belle2 {
22 class ModuleParamList;
23
24 namespace vxdHoughTracking {
25
33 template <class AHit, class AFilter>
34 class LimitedOnHitApplier : public OnHitApplier<AHit> {
35 private:
38
40 using Object = typename Super::Object;
41
42 public:
45
47 void apply(const std::vector<TrackFindingCDC::WithWeight<const AHit*>>& currentPath,
48 std::vector<TrackFindingCDC::WithWeight<AHit*>>& childHits) override;
49
51 TrackFindingCDC::Weight operator()(const Object& object) override;
52
54 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override ;
55
56 private:
58 int m_useNHits = 0;
59
61 AFilter m_filter;
62 };
63
64 }
66}
The Module parameter list class.
A mixin class to attach a weight to an object.
Definition: WithWeight.h:24
Specialisation of the OnHitApplier, which (a) uses a filter for the () operator, which is configurabl...
typename Super::Object Object
The object to filer.
int m_useNHits
Parameter how many objects should pass maximal.
void apply(const std::vector< TrackFindingCDC::WithWeight< const AHit * > > &currentPath, std::vector< TrackFindingCDC::WithWeight< AHit * > > &childHits) override
Apply the filter to each pair of hits and current path and let only pass the best N hits.
TrackFindingCDC::Weight operator()(const Object &object) override
Copy the filter operator to this method.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the subfindlet.
AFilter m_filter
Filter to decide on the hits.
LimitedOnHitApplier()
Constructor adding the findlet as a listener.
Helper findlet which applies its () operator to all pairs of path and hit with all hits in the given ...
std::pair< const std::vector< TrackFindingCDC::WithWeight< const AHit * > >, AHit * > Object
The object this filter refers to.
Abstract base class for different kinds of events.