10#include <tracking/trackFindingCDC/filters/base/SloppyFilter.dcl.h>
12#include <framework/core/ModuleParamList.templateDetails.h>
21 namespace TrackFindingCDC {
23 template<
class AFilter>
26 Super::exposeParameters(moduleParamList, prefix);
28 m_param_sloppinessFactor,
29 "Only accept every <sloppinessFactor>th instance "
30 "that would normally pass the filter.",
31 m_param_sloppinessFactor);
34 template<
class AFilter>
37 Weight response = Super::operator()(
object);
39 if (std::isnan(response)) {
40 const unsigned int randomNumber = gRandom->Integer(m_param_sloppinessFactor);
41 if (randomNumber != 0) {
The Module parameter list 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.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.