Belle II Software  release-05-01-25
PXDResultTruthVarSet.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/pxd/entities/CKFToPXDResult.h>
17 #include <tracking/ckf/pxd/utilities/PXDMCUtil.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 pxdResultTruthNames[] = {
30  "truth",
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 PXDResultTruthVarNames : public TrackFindingCDC::VarNames<CKFToPXDResult> {
41 
42  public:
44  static const size_t nVars = TrackFindingCDC::size(pxdResultTruthNames);
45 
47  constexpr
48  static char const* getName(int iName)
49  {
50  return pxdResultTruthNames[iName];
51  }
52  };
53 
58  class PXDResultTruthVarSet : public TrackFindingCDC::VarSet<PXDResultTruthVarNames> {
59  public:
61  bool extract(const CKFToPXDResult* result) final;
62 
63  private:
66 
69  };
71 }
Belle2::PXDResultTruthVarSet::m_eventMetaData
StoreObjPtr< EventMetaData > m_eventMetaData
Pointer to the object containing event number etc.
Definition: PXDResultTruthVarSet.h:73
Belle2::PXDResultTruthVarSet
Var set used in the CKF for calculating the probability of a correct result, which knows the truth in...
Definition: PXDResultTruthVarSet.h:66
Belle2::PXDResultTruthVarNames::getName
constexpr static char const * getName(int iName)
Get the name of the column.
Definition: PXDResultTruthVarSet.h:56
Belle2::PXDResultTruthVarSet::extract
bool extract(const CKFToPXDResult *result) final
Generate and assign the variables from the object.
Definition: PXDResultTruthVarSet.cc:19
Belle2::PXDResultTruthVarSet::m_mcUtil
MCUtil m_mcUtil
MC information used in the PXD CKF.
Definition: PXDResultTruthVarSet.h:76
Belle2::CKFToPXDResult
Specialized CKF Result for extrapolating into the PXD.
Definition: CKFToPXDResult.h:31
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::PXDResultTruthVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: PXDResultTruthVarSet.h:52
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::pxdResultTruthNames
constexpr static char const *const pxdResultTruthNames[]
Names of the variables to be generated.
Definition: PXDResultTruthVarSet.h:37