Belle II Software development
StateRejecter.icc.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/StateRejecter.dcl.h>
11#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
12#include <framework/logging/Logger.h>
13
14
15namespace Belle2 {
20 template <class AState, class AFindlet>
22 {
28 };
29
31 template <class AState, class AFindlet>
32 void StateRejecter<AState, AFindlet>::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
33 {
34 m_firstFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("first", prefix));
35 m_advanceFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("advance", prefix));
36 m_secondFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("second", prefix));
37 m_updateFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("update", prefix));
38 m_thirdFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("third", prefix));
39 };
40
41 template <class AState, class AFindlet>
43 std::vector<TrackFindingCDC::WithWeight<AState*>>& childStates)
44 {
45 B2DEBUG(29, "Starting with " << childStates.size() << " states.");
46 m_firstFilter.apply(currentPath, childStates);
47 B2DEBUG(29, "After first filter " << childStates.size() << " states.");
48 // Nothing to do anymore
49 if (childStates.size() == 0) {
50 return;
51 }
52 m_advanceFilter.apply(currentPath, childStates);
53 B2DEBUG(29, "After advance filter " << childStates.size() << " states.");
54 // Nothing to do anymore
55 if (childStates.size() == 0) {
56 return;
57 }
58 m_secondFilter.apply(currentPath, childStates);
59 B2DEBUG(29, "After second filter " << childStates.size() << " states.");
60 // Nothing to do anymore
61 if (childStates.size() == 0) {
62 return;
63 }
64 m_updateFilter.apply(currentPath, childStates);
65 B2DEBUG(29, "After update filter " << childStates.size() << " states.");
66 // Nothing to do anymore
67 if (childStates.size() == 0) {
68 return;
69 }
70 m_thirdFilter.apply(currentPath, childStates);
71 B2DEBUG(29, "After third filter " << childStates.size() << " states.");
72 };
74}
The Module parameter list class.
AFilter m_updateFilter
State filter to kalman update all states.
AFilter m_secondFilter
State filter to decide which available continuations should be traversed next.
AFilter m_advanceFilter
State filter to advance all states.
AFilter m_thirdFilter
State filter to decide which available continuations should be traversed next.
AFilter m_firstFilter
State filter to decide which available continuations should be traversed next.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
A mixin class to attach a weight to an object.
Definition: WithWeight.h:24
StateRejecter()
Construct this findlet and add the subfindlet as listener.
void apply(const std::vector< TrackFindingCDC::WithWeight< const AState * > > &currentPath, std::vector< TrackFindingCDC::WithWeight< AState * > > &childStates) final
Apply all five filters to the child states.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters of the subfindlet.
Abstract base class for different kinds of events.