Belle II Software  release-05-01-25
BendFacetRelationVarSet.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
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/trackFindingCDC/utilities/Relation.h>
16 
17 namespace Belle2 {
22  namespace TrackFindingCDC {
23  class CDCFacet;
24 
26  constexpr
27  static char const* const bendFacetRelationVarNames[] = {
28  "delta_phi",
29  "delta_phi_pull",
30  "delta_phi_pull_per_r",
31  "delta_curv",
32  "delta_curv_pull",
33  "delta_curv_pull_per_r",
34  };
35 
37  struct BendFacetRelationVarNames : public VarNames<Relation<const CDCFacet>> {
38 
40  static const size_t nVars = size(bendFacetRelationVarNames);
41 
43  static constexpr char const* getName(int iName)
44  {
45  return bendFacetRelationVarNames[iName];
46  }
47  };
48 
53  class BendFacetRelationVarSet : public VarSet<BendFacetRelationVarNames> {
54 
55  public:
57  bool extract(const Relation<const CDCFacet>* ptrFacetRelation) final;
58  };
59  }
61 }
Belle2::TrackFindingCDC::BendFacetRelationVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: BendFacetRelationVarSet.h:48
Belle2::TrackFindingCDC::BendFacetRelationVarNames::getName
static constexpr char const * getName(int iName)
Getter for the name at the given index.
Definition: BendFacetRelationVarSet.h:51
Belle2::TrackFindingCDC::BendFacetRelationVarSet
Class to compute floating point variables from a facet relation which can be recorded as a flat TNtup...
Definition: BendFacetRelationVarSet.h:61
Belle2::TrackFindingCDC::Relation
Type for two related objects.
Definition: CDCSegment2D.h:37
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::BendFacetRelationVarSet::extract
bool extract(const Relation< const CDCFacet > *ptrFacetRelation) final
Generate and assign the contained variables.
Definition: BendFacetRelationVarSet.cc:17
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46