Belle II Software development
RandomFilter.icc.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/filters/base/RandomFilter.dcl.h>
11
12#include <TRandom.h>
13
14namespace Belle2 {
19 namespace TrackFindingCDC {
20
21 template <class AFilter>
22 Weight RandomFilter<AFilter>::operator()(const Object& obj __attribute__((unused)))
23 {
24 return gRandom->Rndm();
25 }
26 }
28}
Weight operator()(const Object &obj) final
Never reject an item but give back a random value between 0 and 1.
typename AFilter::Object Object
Type of the object to be filtered.
Abstract base class for different kinds of events.