Belle II Software  release-05-01-25
CDCfromEclStateTruthVarSet.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 cdcfromEclStateTruthVarNames[] = {
25  "match",
26  "PDG",
27  "seed_p_truth",
28  "seed_theta_truth",
29  "seed_pt_truth",
30  "seed_pz_truth",
31  "seed_px_truth",
32  "seed_py_truth"
33  };
34 
36  class CDCfromEclStateTruthVarNames : public TrackFindingCDC::VarNames<BaseCDCStateFilter::Object> {
37 
38  public:
40  static const size_t nVars = TrackFindingCDC::size(cdcfromEclStateTruthVarNames);
41 
43  constexpr
44  static char const* getName(int iName)
45  {
46  return cdcfromEclStateTruthVarNames[iName];
47  }
48  };
49 
53  class CDCfromEclStateTruthVarSet : public TrackFindingCDC::VarSet<CDCfromEclStateTruthVarNames> {
54 
55  public:
57  virtual bool extract(const BaseCDCStateFilter::Object* result) override;
58  };
60 }
Belle2::CDCfromEclStateTruthVarSet::extract
virtual bool extract(const BaseCDCStateFilter::Object *result) override
Generate and assign the variables from the object.
Definition: CDCfromEclStateTruthVarSet.cc:22
Belle2::cdcfromEclStateTruthVarNames
constexpr static char const *const cdcfromEclStateTruthVarNames[]
Names of the variables to be generated.
Definition: CDCfromEclStateTruthVarSet.h:32
Belle2::CDCfromEclStateTruthVarSet
Var set to store basic quantities related to CDC CKF (using truth information)
Definition: CDCfromEclStateTruthVarSet.h:61
Belle2::CDCfromEclStateTruthVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: CDCfromEclStateTruthVarSet.h:48
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CDCfromEclStateTruthVarNames::getName
constexpr static char const * getName(int iName)
Get the name of the column.
Definition: CDCfromEclStateTruthVarSet.h:52
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