Belle II Software  release-08-01-10
HitGapAxialSegmentPairVarSet.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 namespace Belle2 {
18  namespace TrackFindingCDC {
19  class CDCAxialSegmentPair;
20 
22  constexpr
23  static char const* const hitGapAxialSegmentPairVarNames[] = {
24  "delta_hit_pos_phi",
25  "delta_hit_mom_phi",
26  "delta_hit_alpha",
27 
28  "hit_distance",
29  "hit_long_distance",
30  "delta_hit_distance",
31 
32  "from_hit_forward",
33  "to_hit_forward",
34  "hit_forward",
35  "hit_ptolemy",
36  };
37 
39  struct HitGapAxialSegmentPairVarNames : public VarNames<CDCAxialSegmentPair > {
40 
42  // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
43  // at least tell cppcheck that everything is fine
44  // cppcheck-suppress duplInheritedMember
45  static const size_t nVars = size(hitGapAxialSegmentPairVarNames);
46 
48  static constexpr char const* getName(int iName)
49  {
50  return hitGapAxialSegmentPairVarNames[iName];
51  }
52  };
53 
58  class HitGapAxialSegmentPairVarSet : public VarSet<HitGapAxialSegmentPairVarNames> {
59 
60  public:
62  bool extract(const CDCAxialSegmentPair* ptrAxialSegmentPair) override;
63  };
64  }
66 }
Class representing a pair of reconstructed axial segements in adjacent superlayer.
Class to compute floating point variables from a segment relation which can be recorded as a flat TNt...
bool extract(const CDCAxialSegmentPair *ptrAxialSegmentPair) override
Generate and assign the contained variables.
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.
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.