Belle II Software development
LimitedOnStateApplier.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/ckf/general/findlets/OnStateApplier.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
31 template <class AState, class AFilter>
32 class LimitedOnStateApplier : public OnStateApplier<AState> {
33 private:
36
38 using Object = typename Super::Object;
39
40 public:
43
45 void apply(const std::vector<TrackFindingCDC::WithWeight<const AState*>>& currentPath,
46 std::vector<TrackFindingCDC::WithWeight<AState*>>& childStates) override;
47
49 TrackFindingCDC::Weight operator()(const Object& object) override;
50
52 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override ;
53
54 private:
57
59 AFilter m_filter;
60 };
62}
Specialisation of the OnStateApplier, which (a) uses a filter for the () operator,...
typename Super::Object Object
The object to filer.
int m_param_useNStates
Parameter how many objects should pass maximal.
AFilter m_filter
Filter to decide on the states.
The Module parameter list class.
Helper findlet which applies its () operator to all pairs of path and state with all states in the gi...
std::pair< const std::vector< TrackFindingCDC::WithWeight< const AState * > >, AState * > Object
The object this filter refers to.
A mixin class to attach a weight to an object.
Definition: WithWeight.h:24
void apply(const std::vector< TrackFindingCDC::WithWeight< const AState * > > &currentPath, std::vector< TrackFindingCDC::WithWeight< AState * > > &childStates) override
Apply the filter to each pair of states and current path and let only pass the best N states.
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.
LimitedOnStateApplier()
Constructor adding the findlet as a listener.
Abstract base class for different kinds of events.