Belle II Software  release-05-01-25
LayerToggledApplier.dcl.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/ckf/general/findlets/OnStateApplier.dcl.h>
13 #include <tracking/trackFindingCDC/numerics/WithWeight.h>
14 #include <vector>
15 
16 namespace Belle2 {
25  template <class AState, class AFindlet>
26  class LayerToggledApplier : public OnStateApplier<AState> {
28  using Super = OnStateApplier<AState>;
29 
30  public:
33 
35  void exposeParameters(ModuleParamList* moduleParamList,
36  const std::string& prefix) final;
37 
39  void apply(const std::vector<TrackFindingCDC::WithWeight<const AState*>>& currentPath,
40  std::vector<TrackFindingCDC::WithWeight<AState*>>& childStates) override;
41 
42  private:
44  AFindlet m_highLayerFindlet;
46  AFindlet m_equalLayerFindlet;
48  AFindlet m_lowLayerFindlet;
49 
51  int m_param_toggleOnLayer = -99;
52  };
54 }
Belle2::LayerToggledApplier::m_highLayerFindlet
AFindlet m_highLayerFindlet
Findlet used for layers > N.
Definition: LayerToggledApplier.dcl.h:52
Belle2::LayerToggledApplier::m_param_toggleOnLayer
int m_param_toggleOnLayer
On which N to toggle the layers.
Definition: LayerToggledApplier.dcl.h:59
Belle2::LayerToggledApplier::exposeParameters
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose parameters of the subfilters and the layer to change.
Definition: LayerToggledApplier.icc.h:41
Belle2::LayerToggledApplier::LayerToggledApplier
LayerToggledApplier()
Add the subfilters as listeners.
Definition: LayerToggledApplier.icc.h:32
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::WithWeight
A mixin class to attach a weight to an object.
Definition: WithWeight.h:34
Belle2::LayerToggledApplier::Super
OnStateApplier< AState > Super
the parent class
Definition: LayerToggledApplier.dcl.h:36
Belle2::LayerToggledApplier::m_lowLayerFindlet
AFindlet m_lowLayerFindlet
Findlet used for layers < N.
Definition: LayerToggledApplier.dcl.h:56
Belle2::LayerToggledApplier::m_equalLayerFindlet
AFindlet m_equalLayerFindlet
Findlet used for layers == N.
Definition: LayerToggledApplier.dcl.h:54
Belle2::LayerToggledApplier::apply
void apply(const std::vector< TrackFindingCDC::WithWeight< const AState * >> &currentPath, std::vector< TrackFindingCDC::WithWeight< AState * >> &childStates) override
The weight is calculated using the subfilter based on the geometrical layer of the state.
Definition: LayerToggledApplier.icc.h:55