10#include <tracking/ckf/general/findlets/LayerToggledApplier.dcl.h>
11#include <tracking/ckf/general/findlets/OnStateApplier.icc.h>
12#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
21 template <
class AState,
class AFindlet>
30 template <
class AState,
class AFindlet>
32 const std::string& prefix)
34 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"toggleOnLayer"),
35 m_param_toggleOnLayer,
"Where to toggle between low, equal and high filter",
36 m_param_toggleOnLayer);
38 m_highLayerFindlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix,
"high"));
39 m_equalLayerFindlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix,
"equal"));
40 m_lowLayerFindlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix,
"low"));
44 template <
class AState,
class AFindlet>
48 const AState* previousState = currentPath.back();
49 const int layer = previousState->getGeometricalLayer();
51 if (layer > m_param_toggleOnLayer) {
52 m_highLayerFindlet.apply(currentPath, childStates);
53 }
else if (layer == m_param_toggleOnLayer) {
54 m_equalLayerFindlet.apply(currentPath, childStates);
56 m_lowLayerFindlet.apply(currentPath, childStates);
AFindlet m_lowLayerFindlet
Findlet used for layers < N.
AFindlet m_highLayerFindlet
Findlet used for layers > N.
AFindlet m_equalLayerFindlet
Findlet used for layers == N.
The Module parameter list class.
Helper findlet which applies its () operator to all pairs of path and state with all states in the gi...
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
A mixin class to attach a weight to an object.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
void apply(const std::vector< TrackFindingCDC::WithWeight< const AState * > > ¤tPath, std::vector< TrackFindingCDC::WithWeight< AState * > > &childStates) override
The weight is calculated using the subfilter based on the geometrical layer of the state.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose parameters of the subfilters and the layer to change.
LayerToggledApplier()
Add the subfilters as listeners.
Abstract base class for different kinds of events.