Belle II Software
release-05-01-25
ObserverFilter.icc.h
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2015 - 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/filters/base/OberverFilter.dcl.h>
13
14
#include <tracking/trackFindingCDC/numerics/Weight.h>
15
16
#include <framework/logging/Logger.h>
17
18
#include <cmath>
19
20
namespace
Belle2
{
25
namespace
TrackFindingCDC {
26
27
template
<
class
AFilter>
28
void
ObserverFilter<AFilter>::terminate
()
29
{
30
B2INFO(
"Filter said "
<< m_yesAnswers <<
" times yes and "
<< m_noAnswers <<
" times no."
);
31
Super::terminate();
32
}
33
34
template
<
class
AFilter>
35
Weight
ObserverFilter<AFilter>::operator()
(
const
Object&
object
)
36
{
37
Weight result = Super::operator()(
object
);
38
if
(std::isnan(result)) {
39
m_noAnswers += 1;
40
}
else
{
41
m_yesAnswers += 1;
42
}
43
44
return
result;
45
}
46
}
48
}
Belle2::TrackFindingCDC::ObserverFilter::terminate
void terminate() override
Terminate the filter after event processing.
Definition:
ObserverFilter.icc.h:36
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::ObserverFilter::operator()
Weight operator()(const Object &object) override
Function to evaluate the object.
Definition:
ObserverFilter.icc.h:43
tracking
trackFindingCDC
filters
base
include
ObserverFilter.icc.h
Generated on Fri Nov 5 2021 04:02:00 for Belle II Software by
1.8.17