Belle II Software  release-08-01-10
SloppyFilter.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/trackFindingCDC/numerics/Weight.h>
11 
12 #include <string>
13 namespace Belle2 {
18  class ModuleParamList;
19 
20  namespace TrackFindingCDC {
21 
23  template<class AFilter>
24  class Sloppy : public AFilter {
25 
26  private:
28  using Super = AFilter;
29 
30  public:
32  using Super::Super;
33 
35  void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override;
36 
37  public:
39  Weight operator()(const typename Super::Object& object) override;
40 
41  private:
43  unsigned int m_param_sloppinessFactor = 10;
44  };
45  }
47 }
The Module parameter list class.
A filter that accepts every <sloppinessFactor>th candidate on average (random selection)
unsigned int m_param_sloppinessFactor
Parameter : The prescaling of the false items returning true.
AFilter Super
The parent class.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the set of parameters of the filter to the module parameter list.
Weight operator()(const typename Super::Object &object) override
Reject an item if the truth variable is 0 or in some fractions of the events, else accept it.
Abstract base class for different kinds of events.