Belle II Software  release-05-01-25
PXDStateTruthVarSet.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 
15 #include <framework/dataobjects/EventMetaData.h>
16 #include <framework/datastore/StoreObjPtr.h>
17 
18 #include <tracking/ckf/pxd/filters/states/BasePXDStateFilter.h>
19 #include <tracking/ckf/pxd/utilities/PXDMCUtil.h>
20 
21 namespace Belle2 {
26  constexpr
28  static char const* const pxdStateTruthVarNames[] = {
29  "truth",
30  "truth_inverted",
31  "truth_position_x",
32  "truth_position_y",
33  "truth_position_z",
34  "truth_momentum_x",
35  "truth_momentum_y",
36  "truth_momentum_z",
37  "truth_event_id",
38  "truth_seed_number"
39  };
40 
42  class PXDStateTruthVarNames : public TrackFindingCDC::VarNames<BasePXDStateFilter::Object> {
43 
44  public:
46  static const size_t nVars = TrackFindingCDC::size(pxdStateTruthVarNames);
47 
49  constexpr
50  static char const* getName(int iName)
51  {
52  return pxdStateTruthVarNames[iName];
53  }
54  };
55 
60  class PXDStateTruthVarSet : public TrackFindingCDC::VarSet<PXDStateTruthVarNames> {
61 
62  public:
64  virtual bool extract(const BasePXDStateFilter::Object* result) override;
65 
66  private:
69 
72  };
74 }
Belle2::pxdStateTruthVarNames
constexpr static char const *const pxdStateTruthVarNames[]
Names of the variables to be generated.
Definition: PXDStateTruthVarSet.h:36
Belle2::PXDStateTruthVarSet::m_mcUtil
MCUtil m_mcUtil
MC information used in the PXD CKF.
Definition: PXDStateTruthVarSet.h:79
Belle2::PXDStateTruthVarSet::extract
virtual bool extract(const BasePXDStateFilter::Object *result) override
Generate and assign the variables from the object.
Definition: PXDStateTruthVarSet.cc:19
Belle2::PXDStateTruthVarNames::getName
constexpr static char const * getName(int iName)
Get the name of the column.
Definition: PXDStateTruthVarSet.h:58
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PXDStateTruthVarSet::m_eventMetaData
StoreObjPtr< EventMetaData > m_eventMetaData
Pointer to the object containing event number etc.
Definition: PXDStateTruthVarSet.h:76
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::MCUtil
Class bundling all helper functions for the MC information used in the PXD CKF.
Definition: PXDMCUtil.h:33
Belle2::PXDStateTruthVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: PXDStateTruthVarSet.h:54
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46
Belle2::PXDStateTruthVarSet
Var set used in the VXD-CDC-Merger for calculating the probability of a VXD-CDC-track match,...
Definition: PXDStateTruthVarSet.h:68
Belle2::TrackFindingCDC::Filter::Object
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:43