Belle II Software  release-05-01-25
CDCfromEclPathTruthVarSet.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 cdcfromEclPathTruthVarNames[] = {
25  "matched",
26  "daughters",
27  "PDG",
28  "mcTrackHits",
29  "seed_p_truth",
30  "seed_theta_truth",
31  "seed_pt_truth",
32  "seed_pz_truth",
33  "seed_px_truth",
34  "seed_py_truth"
35  };
36 
38  class CDCfromEclPathTruthVarNames : public TrackFindingCDC::VarNames<BaseCDCPathFilter::Object> {
39 
40  public:
42  static const size_t nVars = TrackFindingCDC::size(cdcfromEclPathTruthVarNames);
43 
45  constexpr
46  static char const* getName(int iName)
47  {
48  return cdcfromEclPathTruthVarNames[iName];
49  }
50  };
51 
55  class CDCfromEclPathTruthVarSet : public TrackFindingCDC::VarSet<CDCfromEclPathTruthVarNames> {
56 
57  public:
59  virtual bool extract(const BaseCDCPathFilter::Object* path) override;
60  };
62 }
Belle2::CDCfromEclPathTruthVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: CDCfromEclPathTruthVarSet.h:50
Belle2::CDCfromEclPathTruthVarSet::extract
virtual bool extract(const BaseCDCPathFilter::Object *path) override
Generate and assign the variables from the object.
Definition: CDCfromEclPathTruthVarSet.cc:22
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CDCfromEclPathTruthVarSet
Var set to store basic quantities related to CDC CKF (using truth information)
Definition: CDCfromEclPathTruthVarSet.h:63
Belle2::cdcfromEclPathTruthVarNames
constexpr static char const *const cdcfromEclPathTruthVarNames[]
Names of the variables to be generated.
Definition: CDCfromEclPathTruthVarSet.h:32
Belle2::CDCfromEclPathTruthVarNames::getName
constexpr static char const * getName(int iName)
Get the name of the column.
Definition: CDCfromEclPathTruthVarSet.h:54
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