Belle II Software  release-08-01-10
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/entities/CKFToSVDResult.h>
15 #include <tracking/ckf/svd/utilities/SVDMCUtil.h>
16 
17 #include <framework/datastore/StoreObjPtr.h>
18 #include <framework/dataobjects/EventMetaData.h>
19 
20 namespace Belle2 {
26  constexpr
27  static char const* const svdResultTruthNames[] = {
28  "truth",
29  "truth_svd_cdc_relation",
30  "truth_number_of_correct_hits",
31  "truth_number_of_mc_pxd_hits",
32  "truth_number_of_mc_svd_hits",
33  "truth_number_of_mc_cdc_hits",
34  "truth_event_number",
35  "truth_seed_number",
36  };
37 
39  class SVDResultTruthVarNames : public TrackFindingCDC::VarNames<CKFToSVDResult> {
40 
41  public:
43  // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
44  // at least tell cppcheck that everything is fine
45  // cppcheck-suppress duplInheritedMember
46  static const size_t nVars = TrackFindingCDC::size(svdResultTruthNames);
47 
49  constexpr
50  static char const* getName(int iName)
51  {
52  return svdResultTruthNames[iName];
53  }
54  };
55 
60  class SVDResultTruthVarSet : public TrackFindingCDC::VarSet<SVDResultTruthVarNames> {
61  public:
63  bool extract(const CKFToSVDResult* result) final;
64 
65  private:
68 
71  };
73 }
Specialized CKF Result for extrapolating into the SVD.
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.
constexpr static 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
constexpr static char const *const svdResultTruthNames[]
Names of the variables to be generated.
Abstract base class for different kinds of events.