Belle II Software  release-08-01-10
BendFacetRelationVarSet.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/trackFindingCDC/utilities/Relation.h>
14 
15 namespace Belle2 {
20  namespace TrackFindingCDC {
21  class CDCFacet;
22 
24  constexpr
25  static char const* const bendFacetRelationVarNames[] = {
26  "delta_phi",
27  "delta_phi_pull",
28  "delta_phi_pull_per_r",
29  "delta_curv",
30  "delta_curv_pull",
31  "delta_curv_pull_per_r",
32  };
33 
35  struct BendFacetRelationVarNames : public VarNames<Relation<const CDCFacet>> {
36 
38  // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
39  // at least tell cppcheck that everything is fine
40  // cppcheck-suppress duplInheritedMember
41  static const size_t nVars = size(bendFacetRelationVarNames);
42 
44  static constexpr char const* getName(int iName)
45  {
46  return bendFacetRelationVarNames[iName];
47  }
48  };
49 
54  class BendFacetRelationVarSet : public VarSet<BendFacetRelationVarNames> {
55 
56  public:
58  bool extract(const Relation<const CDCFacet>* ptrFacetRelation) final;
59  };
60  }
62 }
Class to compute floating point variables from a facet relation which can be recorded as a flat TNtup...
bool extract(const Relation< const CDCFacet > *ptrFacetRelation) final
Generate and assign the contained variables.
Type for two related objects.
Definition: Relation.h:21
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
Abstract base class for different kinds of events.
Vehicle class to transport the variable names.
static const size_t nVars
Number of variables to be generated.
static constexpr char const * getName(int iName)
Getter for the name at the given index.