Belle II Software  release-05-02-19
CDCStateBasicVarSet.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 #include <framework/datastore/StoreObjPtr.h>
18 #include <framework/dataobjects/EventMetaData.h>
19 
20 namespace Belle2 {
25  constexpr
27  static char const* const cdcStateBasicVarNames[] = {
28  "eventNumber",
29  "i_hit",
30  "firstHit",
31  "iCLayer_lastState",
32  "iCLayer",
33  "arcLength",
34  "hitDistance",
35  "seed_theta",
36  "seed_r",
37  "seed_z",
38  "seed_x",
39  "seed_y",
40  "seed_p",
41  "seed_pt",
42  "seed_pz",
43  "seed_px",
44  "seed_py",
45  "seed_charge",
46  "track_momTheta",
47  "track_p",
48  "track_pt",
49  "track_pz",
50  "track_px",
51  "track_py",
52  "track_posTheta",
53  "track_r",
54  "track_z",
55  "track_x",
56  "track_y",
57  "track_charge",
58  "track_pt_firstHit",
59  "track_pz_firstHit",
60  "track_r_firstHit",
61  "track_z_firstHit",
62  "wire_r",
63  "wire_z",
64  "wire_x",
65  "wire_y"
66  };
67 
69  class CDCStateBasicVarNames : public TrackFindingCDC::VarNames<BaseCDCStateFilter::Object> {
70 
71  public:
73  static const size_t nVars = TrackFindingCDC::size(cdcStateBasicVarNames);
74 
76  constexpr
77  static char const* getName(int iName)
78  {
79  return cdcStateBasicVarNames[iName];
80  }
81  };
82 
86  class CDCStateBasicVarSet : public TrackFindingCDC::VarSet<CDCStateBasicVarNames> {
87 
88  public:
90  virtual bool extract(const BaseCDCStateFilter::Object* result) override;
91 
92  private:
95  };
97 }
Belle2::CDCStateBasicVarSet::extract
virtual bool extract(const BaseCDCStateFilter::Object *result) override
Generate and assign the variables from the object.
Definition: CDCStateBasicVarSet.cc:19
Belle2::CDCStateBasicVarNames::getName
constexpr static char const * getName(int iName)
Get the name of the column.
Definition: CDCStateBasicVarSet.h:85
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::CDCStateBasicVarSet
Var set to store basic quantities related to CDC CKF.
Definition: CDCStateBasicVarSet.h:94
Belle2::CDCStateBasicVarSet::m_eventMetaData
StoreObjPtr< EventMetaData > m_eventMetaData
use this to get the eventNumber
Definition: CDCStateBasicVarSet.h:102
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46
Belle2::CDCStateBasicVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: CDCStateBasicVarSet.h:81
Belle2::TrackFindingCDC::Filter::Object
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:43
Belle2::cdcStateBasicVarNames
constexpr static char const *const cdcStateBasicVarNames[]
Names of the variables to be generated.
Definition: CDCStateBasicVarSet.h:35