Belle II Software development
MCSymmetricFilter.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/MCSymmetricFilter.dcl.h>
11
12#include <tracking/trackFindingCDC/mclookup/CDCMCManager.h>
13
14#include <framework/core/ModuleParamList.templateDetails.h>
15#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
16
17#include <string>
18
19namespace Belle2 {
25 namespace TrackFindingCDC {
26
27 template <class AFilter>
29 : Super()
30 , m_param_allowReverse(allowReverse)
31 {
32 }
33
34 template <class AFilter>
36
37 template <class AFilter>
38 void MCSymmetric<AFilter>::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
39 {
40 Super::exposeParameters(moduleParamList, prefix);
41 moduleParamList->addParameter(prefixed(prefix, "allowReverse"),
42 m_param_allowReverse,
43 "Indication whether the reverse to the truth is accepted"
44 "preserving the propagation reversal symmetry.",
45 m_param_allowReverse);
46 }
47
48 template <class AFilter>
50 {
52 Super::initialize();
53 }
54
55 template <class AFilter>
57 {
59 Super::beginEvent();
60 }
61
62 template <class AFilter>
64 {
65 return true;
66 }
67
68 template <class AFilter>
70 {
71 m_param_allowReverse = allowReverse;
72 }
73
74 template <class AFilter>
76 {
77 return m_param_allowReverse;
78 }
79 }
81}
The Module parameter list class.
void requireTruthInformation()
Require the MC information store arrays.
void fill()
Fill Monte Carlo look up maps from the DataStore.
static CDCMCManager & getInstance()
Getter for the singleton instance.
Definition: CDCMCManager.cc:74
bool needsTruthInformation() final
Indicates that the filter requires Monte Carlo information.
MCSymmetric(bool allowReverse=true)
Constructor.
void initialize() override
Initialize the before event processing.
AFilter Super
Type of the super class.
virtual void setAllowReverse(bool allowReverse)
Setter for the allow reverse parameter.
void beginEvent() override
Signal the beginning of a new event.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the set of parameters of the filter to the module parameter list.
bool getAllowReverse() const
Getter for the allow reverse parameter.
void addParameter(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.