Belle II Software  release-08-01-10
FitlessAxialSegmentPairVarSet.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 fitlessAxialSegmentPairVarNames[] = {
24  "from_ndf",
25  "to_ndf",
26 
27  "from_chi2_over_ndf",
28  "to_chi2_over_ndf",
29 
30  "from_p_value",
31  "to_p_value",
32 
33  "abs_avg_curv",
34  "delta_curv",
35  "delta_curv_var",
36  "delta_curv_pull",
37 
38  "delta_pos_phi",
39  "delta_mom_phi",
40  "from_delta_mom_phi",
41  "to_delta_mom_phi",
42  "delta_alpha",
43 
44  "arc_length_front_offset",
45  "arc_length_back_offset",
46  "from_arc_length_total",
47  "to_arc_length_total",
48  "arc_length_gap",
49  };
50 
52  struct FitlessAxialSegmentPairVarNames : public VarNames<CDCAxialSegmentPair> {
53 
55  // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
56  // at least tell cppcheck that everything is fine
57  // cppcheck-suppress duplInheritedMember
58  static const size_t nVars = size(fitlessAxialSegmentPairVarNames);
59 
61  static constexpr char const* getName(int iName)
62  {
63  return fitlessAxialSegmentPairVarNames[iName];
64  }
65  };
66 
71  class FitlessAxialSegmentPairVarSet : public VarSet<FitlessAxialSegmentPairVarNames> {
72 
73  public:
75  bool extract(const CDCAxialSegmentPair* ptrAxialSegmentPair) override;
76  };
77  }
79 }
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.