Belle II Software  release-08-01-10
CDCStateBasicVarSet.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #pragma once
9 
10 #include <tracking/trackFindingCDC/varsets/VarSet.h>
11 #include <tracking/trackFindingCDC/varsets/VarNames.h>
12 
13 #include <tracking/ckf/cdc/filters/states/BaseCDCStateFilter.h>
14 
15 #include <framework/datastore/StoreObjPtr.h>
16 #include <framework/dataobjects/EventMetaData.h>
17 
18 namespace Belle2 {
24  constexpr
25  static char const* const cdcStateBasicVarNames[] = {
26  "eventNumber",
27  "i_hit",
28  "firstHit",
29  "iCLayer_lastState",
30  "iCLayer",
31  "arcLength",
32  "hitDistance",
33  "seed_theta",
34  "seed_r",
35  "seed_z",
36  "seed_x",
37  "seed_y",
38  "seed_p",
39  "seed_pt",
40  "seed_pz",
41  "seed_px",
42  "seed_py",
43  "seed_charge",
44  "track_momTheta",
45  "track_p",
46  "track_pt",
47  "track_pz",
48  "track_px",
49  "track_py",
50  "track_posTheta",
51  "track_r",
52  "track_z",
53  "track_x",
54  "track_y",
55  "track_charge",
56  "track_pt_firstHit",
57  "track_pz_firstHit",
58  "track_r_firstHit",
59  "track_z_firstHit",
60  "wire_r",
61  "wire_z",
62  "wire_x",
63  "wire_y"
64  };
65 
67  class CDCStateBasicVarNames : public TrackFindingCDC::VarNames<BaseCDCStateFilter::Object> {
68 
69  public:
71  static const size_t nVars = TrackFindingCDC::size(cdcStateBasicVarNames);
72 
74  constexpr
75  static char const* getName(int iName)
76  {
77  return cdcStateBasicVarNames[iName];
78  }
79  };
80 
84  class CDCStateBasicVarSet : public TrackFindingCDC::VarSet<CDCStateBasicVarNames> {
85 
86  public:
88  virtual bool extract(const BaseCDCStateFilter::Object* result) override;
89 
90  private:
93  };
95 }
Vehicle class to transport the variable names.
static const size_t nVars
Number of variables to be generated.
constexpr static char const * getName(int iName)
Get the name of the column.
Var set to store basic quantities related to CDC CKF.
virtual bool extract(const BaseCDCStateFilter::Object *result) override
Generate and assign the variables from the object.
StoreObjPtr< EventMetaData > m_eventMetaData
use this to get the eventNumber
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:33
Class that specifies the names of the variables.
Definition: VarNames.h:21
Generic class that generates some named float values from a given object.
Definition: VarSet.h:36
constexpr static char const *const cdcStateBasicVarNames[]
Names of the variables to be generated.
Abstract base class for different kinds of events.