Belle II Software development
SVDResultTruthVarSet.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#include <tracking/trackFindingCDC/varsets/FixedSizeNamedFloatTuple.h>
13
14#include <tracking/ckf/svd/utilities/SVDMCUtil.h>
15
16#include <framework/datastore/StoreObjPtr.h>
17
18namespace Belle2 {
23 class CKFToSVDResult;
24 class EventMetaData;
25
27 constexpr
28 static char const* const svdResultTruthNames[] = {
29 "truth",
30 "truth_svd_cdc_relation",
31 "truth_number_of_correct_hits",
32 "truth_number_of_mc_pxd_hits",
33 "truth_number_of_mc_svd_hits",
34 "truth_number_of_mc_cdc_hits",
35 "truth_event_number",
36 "truth_seed_number",
37 };
38
40 class SVDResultTruthVarNames : public TrackFindingCDC::VarNames<CKFToSVDResult> {
41
42 public:
44 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
45 // at least tell cppcheck that everything is fine
46 // cppcheck-suppress duplInheritedMember
47 static const size_t nVars = TrackFindingCDC::size(svdResultTruthNames);
48
50 constexpr
51 static char const* getName(int iName)
52 {
53 return svdResultTruthNames[iName];
54 }
55 };
56
61 class SVDResultTruthVarSet : public TrackFindingCDC::VarSet<SVDResultTruthVarNames> {
62 public:
64 bool extract(const CKFToSVDResult* result) final;
65
66 private:
69
72 };
73
74}
Specialized CKF Result for extrapolating into the SVD.
Store event, run, and experiment numbers.
Class bundling all helper functions for the MC information used in the PXD CKF.
Definition PXDMCUtil.h:23
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)
Get the name of the column.
Var set used in the CKF for calculating the probability of a correct result, which knows the truth in...
MCUtil m_mcUtil
MC information used in the SVD CKF.
StoreObjPtr< EventMetaData > m_eventMetaData
Pointer to the object containing event number etc.
bool extract(const CKFToSVDResult *result) final
Generate and assign the variables from the object.
Type-safe access to single objects in the data store.
Definition StoreObjPtr.h:96
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
static constexpr char const *const svdResultTruthNames[]
Names of the variables to be generated.
Abstract base class for different kinds of events.