Belle II Software development
StereoHitTruthVarSet.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/varsets/VarSet.h>
11#include <tracking/trackFindingCDC/varsets/VarNames.h>
12
13#include <tracking/trackFindingCDC/filters/stereoHits/BaseStereoHitFilter.h>
14#include <tracking/trackFindingCDC/mclookup/CDCMCManager.h>
15
16namespace Belle2 {
21 namespace TrackFindingCDC {
22
24 constexpr
25 static char const* const stereoHitTruthVarNames[] = {
26 "truth",
27 "truth_may_reversed",
28 "track_is_fake_truth",
29 };
30
32 struct StereoHitTruthVarNames : public VarNames<BaseStereoHitFilter::Object> {
33
35 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
36 // at least tell cppcheck that everything is fine
37 // cppcheck-suppress duplInheritedMember
38 static const size_t nVars = size(stereoHitTruthVarNames);
39
41 static constexpr char const* getName(int iName)
42 {
43 return stereoHitTruthVarNames[iName];
44 }
45 };
46
51 class StereoHitTruthVarSet : public VarSet<StereoHitTruthVarNames> {
52
53 public:
55 bool extract(const BaseStereoHitFilter::Object* testPair) override;
56
57 void initialize() override
58 {
61 }
62
63 void beginEvent() override
64 {
67 }
68 };
69 }
71}
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 singletone instance.
Definition: CDCMCManager.cc:74
void initialize() override
Receive and dispatch signal before the start of the event processing.
void beginEvent() override
Receive and dispatch signal for the start of a new event.
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:35
Class to compute floating point variables from a stereo hit to track match which can be recorded as a...
void initialize() override
Receive signal before the start of the event processing.
bool extract(const BaseStereoHitFilter::Object *testPair) override
Generate and assign the contained variables.
void beginEvent() override
Receive signal for the start of a new event.
Class that specifies the names of the variables.
Definition: VarNames.h:21
Generic class that generates some named float values from a given object.
Definition: VarSet.h:36
Abstract base class for different kinds of events.
Vehicle class to transport the variable names.
static const size_t nVars
Number of variables to be generated.
static constexpr char const * getName(int iName)
Getter for the name at the given index.