Belle II Software  release-08-01-10
PXDResultTruthVarSet.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/pxd/entities/CKFToPXDResult.h>
15 #include <tracking/ckf/pxd/utilities/PXDMCUtil.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 pxdResultTruthNames[] = {
28  "truth",
29  "truth_number_of_correct_hits",
30  "truth_number_of_mc_pxd_hits",
31  "truth_number_of_mc_svd_hits",
32  "truth_number_of_mc_cdc_hits",
33  "truth_event_number",
34  "truth_seed_number",
35  };
36 
38  class PXDResultTruthVarNames : public TrackFindingCDC::VarNames<CKFToPXDResult> {
39 
40  public:
42  // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
43  // at least tell cppcheck that everything is fine
44  // cppcheck-suppress duplInheritedMember
45  static const size_t nVars = TrackFindingCDC::size(pxdResultTruthNames);
46 
48  constexpr
49  static char const* getName(int iName)
50  {
51  return pxdResultTruthNames[iName];
52  }
53  };
54 
59  class PXDResultTruthVarSet : public TrackFindingCDC::VarSet<PXDResultTruthVarNames> {
60  public:
62  bool extract(const CKFToPXDResult* result) final;
63 
64  private:
67 
70  };
72 }
Specialized CKF Result for extrapolating into the PXD.
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 PXD CKF.
bool extract(const CKFToPXDResult *result) final
Generate and assign the variables from the object.
StoreObjPtr< EventMetaData > m_eventMetaData
Pointer to the object containing event number etc.
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 pxdResultTruthNames[]
Names of the variables to be generated.
Abstract base class for different kinds of events.