Belle II Software  release-05-01-25
OnStateApplier.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/trackFindingCDC/findlets/base/Findlet.h>
13 
14 #include <tracking/trackFindingCDC/numerics/WithWeight.h>
15 #include <tracking/trackFindingCDC/numerics/Weight.h>
16 
17 #include <vector>
18 
19 namespace Belle2 {
30  template <class AState>
31  class OnStateApplier : public
32  TrackFindingCDC::Findlet<const TrackFindingCDC::WithWeight<const AState*>, TrackFindingCDC::WithWeight<AState*>> {
33  private:
35  using Super = TrackFindingCDC::Findlet<const TrackFindingCDC::WithWeight<const AState*>, TrackFindingCDC::WithWeight<AState*>>;
36 
37  public:
39  using Object = std::pair<const std::vector<TrackFindingCDC::WithWeight<const AState*>>, AState*>;
40 
42  void apply(const std::vector<TrackFindingCDC::WithWeight<const AState*>>& currentPath,
43  std::vector<TrackFindingCDC::WithWeight<AState*>>& childStates) override;
44 
46  virtual TrackFindingCDC::Weight operator()(const Object& object);
47  };
49 }
Belle2::OnStateApplier::Super
TrackFindingCDC::Findlet< const TrackFindingCDC::WithWeight< const AState * >, TrackFindingCDC::WithWeight< AState * > > Super
Parent class.
Definition: OnStateApplier.dcl.h:43
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::OnStateApplier::operator()
virtual TrackFindingCDC::Weight operator()(const Object &object)
The filter operator for this class.
Definition: OnStateApplier.icc.h:47
Belle2::OnStateApplier::Object
std::pair< const std::vector< TrackFindingCDC::WithWeight< const AState * > >, AState * > Object
The object this filter refers to.
Definition: OnStateApplier.dcl.h:47
Belle2::OnStateApplier::apply
void apply(const std::vector< TrackFindingCDC::WithWeight< const AState * >> &currentPath, std::vector< TrackFindingCDC::WithWeight< AState * >> &childStates) override
Apply the () operator to all pairs of state and current path.
Definition: OnStateApplier.icc.h:30