Belle II Software  release-05-02-19
CDCStateTruthVarSet.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2019 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Simon Kurz, 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 <tracking/ckf/cdc/filters/states/BaseCDCStateFilter.h>
16 
17 namespace Belle2 {
22  constexpr
24  static char const* const cdcStateTruthVarNames[] = {
25  "match",
26  "PDG"
27  };
28 
30  class CDCStateTruthVarNames : public TrackFindingCDC::VarNames<BaseCDCStateFilter::Object> {
31 
32  public:
34  static const size_t nVars = TrackFindingCDC::size(cdcStateTruthVarNames);
35 
37  constexpr
38  static char const* getName(int iName)
39  {
40  return cdcStateTruthVarNames[iName];
41  }
42  };
43 
47  class CDCStateTruthVarSet : public TrackFindingCDC::VarSet<CDCStateTruthVarNames> {
48 
49  public:
51  virtual bool extract(const BaseCDCStateFilter::Object* result) override;
52  };
54 }
Belle2::CDCStateTruthVarNames::getName
constexpr static char const * getName(int iName)
Get the name of the column.
Definition: CDCStateTruthVarSet.h:46
Belle2::CDCStateTruthVarSet::extract
virtual bool extract(const BaseCDCStateFilter::Object *result) override
Generate and assign the variables from the object.
Definition: CDCStateTruthVarSet.cc:21
Belle2::CDCStateTruthVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: CDCStateTruthVarSet.h:42
Belle2::cdcStateTruthVarNames
constexpr static char const *const cdcStateTruthVarNames[]
Names of the variables to be generated.
Definition: CDCStateTruthVarSet.h:32
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CDCStateTruthVarSet
Var set to store basic quantities related to CDC CKF (using truth information)
Definition: CDCStateTruthVarSet.h:55
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46
Belle2::TrackFindingCDC::Filter::Object
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:43