Belle II Software  release-05-01-25
SVDResultTruthVarSet.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/varsets/VarSet.h>
13 #include <tracking/trackFindingCDC/varsets/VarNames.h>
14 #include <tracking/trackFindingCDC/varsets/FixedSizeNamedFloatTuple.h>
15 
16 #include <tracking/ckf/svd/entities/CKFToSVDResult.h>
17 #include <tracking/ckf/svd/utilities/SVDMCUtil.h>
18 
19 #include <framework/datastore/StoreObjPtr.h>
20 #include <framework/dataobjects/EventMetaData.h>
21 
22 namespace Belle2 {
27  constexpr
29  static char const* const svdResultTruthNames[] = {
30  "truth",
31  "truth_svd_cdc_relation",
32  "truth_number_of_correct_hits",
33  "truth_number_of_mc_pxd_hits",
34  "truth_number_of_mc_svd_hits",
35  "truth_number_of_mc_cdc_hits",
36  "truth_event_number",
37  "truth_seed_number",
38  };
39 
41  class SVDResultTruthVarNames : public TrackFindingCDC::VarNames<CKFToSVDResult> {
42 
43  public:
45  static const size_t nVars = TrackFindingCDC::size(svdResultTruthNames);
46 
48  constexpr
49  static char const* getName(int iName)
50  {
51  return svdResultTruthNames[iName];
52  }
53  };
54 
59  class SVDResultTruthVarSet : public TrackFindingCDC::VarSet<SVDResultTruthVarNames> {
60  public:
62  bool extract(const CKFToSVDResult* result) final;
63 
64  private:
67 
70  };
72 }
Belle2::SVDResultTruthVarSet::m_mcUtil
MCUtil m_mcUtil
MC information used in the SVD CKF.
Definition: SVDResultTruthVarSet.h:77
Belle2::svdResultTruthNames
constexpr static char const *const svdResultTruthNames[]
Names of the variables to be generated.
Definition: SVDResultTruthVarSet.h:37
Belle2::SVDResultTruthVarSet::extract
bool extract(const CKFToSVDResult *result) final
Generate and assign the variables from the object.
Definition: SVDResultTruthVarSet.cc:19
Belle2::SVDResultTruthVarNames::getName
constexpr static char const * getName(int iName)
Get the name of the column.
Definition: SVDResultTruthVarSet.h:57
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::CKFToSVDResult
Specialized CKF Result for extrapolating into the SVD.
Definition: CKFToSVDResult.h:33
Belle2::SVDResultTruthVarSet::m_eventMetaData
StoreObjPtr< EventMetaData > m_eventMetaData
Pointer to the object containing event number etc.
Definition: SVDResultTruthVarSet.h:74
Belle2::SVDResultTruthVarSet
Var set used in the CKF for calculating the probability of a correct result, which knows the truth in...
Definition: SVDResultTruthVarSet.h:67
Belle2::MCUtil
Class bundling all helper functions for the MC information used in the PXD CKF.
Definition: PXDMCUtil.h:33
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46
Belle2::SVDResultTruthVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: SVDResultTruthVarSet.h:53