Belle II Software  release-05-01-25
CDCPathTruthVarSet.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/paths/BaseCDCPathFilter.h>
16 
17 namespace Belle2 {
22  constexpr
24  static char const* const cdcPathTruthVarNames[] = {
25  "mcTrackHits",
26  "daughters",
27  "PDG",
28  "seed_p_truth",
29  "seed_theta_truth",
30  "seed_pt_truth",
31  "seed_pz_truth",
32  "seed_px_truth",
33  "seed_py_truth"
34  };
35 
37  class CDCPathTruthVarNames : public TrackFindingCDC::VarNames<BaseCDCPathFilter::Object> {
38 
39  public:
41  static const size_t nVars = TrackFindingCDC::size(cdcPathTruthVarNames);
42 
44  constexpr
45  static char const* getName(int iName)
46  {
47  return cdcPathTruthVarNames[iName];
48  }
49  };
50 
54  class CDCPathTruthVarSet : public TrackFindingCDC::VarSet<CDCPathTruthVarNames> {
55 
56  public:
58  virtual bool extract(const BaseCDCPathFilter::Object* path) override;
59  };
61 }
Belle2::CDCPathTruthVarSet::extract
virtual bool extract(const BaseCDCPathFilter::Object *path) override
Generate and assign the variables from the object.
Definition: CDCPathTruthVarSet.cc:22
Belle2::cdcPathTruthVarNames
constexpr static char const *const cdcPathTruthVarNames[]
Names of the variables to be generated.
Definition: CDCPathTruthVarSet.h:32
Belle2::CDCPathTruthVarNames::getName
constexpr static char const * getName(int iName)
Get the name of the column.
Definition: CDCPathTruthVarSet.h:53
Belle2::CDCPathTruthVarSet
Var set to store basic quantities related to CDC CKF (using truth information)
Definition: CDCPathTruthVarSet.h:62
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46
Belle2::CDCPathTruthVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: CDCPathTruthVarSet.h:49
Belle2::TrackFindingCDC::Filter::Object
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:43