Belle II Software development
FitlessSegmentPairVarSet.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/trackingUtilities/varsets/VarSet.h>
11#include <tracking/trackingUtilities/varsets/VarNames.h>
12
13namespace Belle2 {
18 namespace TrackingUtilities {
19 class CDCSegmentPair;
20 }
21 namespace TrackFindingCDC {
22
24 constexpr
25 static char const* const fitlessSegmentPairVarNames[] = {
26 "from_ndf",
27 "to_ndf",
28
29 "from_chi2_over_ndf",
30 "to_chi2_over_ndf",
31
32 "from_p_value",
33 "to_p_value",
34
35 "abs_avg_curv",
36 "delta_curv",
37 "delta_curv_var",
38 "delta_curv_pull",
39
40 "delta_pos_phi",
41 "delta_mom_phi",
42 "from_delta_mom_phi",
43 "to_delta_mom_phi",
44 "delta_alpha",
45
46 "reco_arc_length_gap",
47 "stereo_arc_length",
48 "near_reco_z",
49 "near_z_bound_factor",
50 "far_reco_z",
51 "far_z_bound_factor",
52
53 "coarse_tanl",
54 "stereo_rel_size",
55
56 "arc_length_front_offset",
57 "arc_length_back_offset",
58 "from_arc_length_total",
59 "to_arc_length_total",
60 "arc_length_gap",
61 };
62
64 struct FitlessSegmentPairVarNames : public TrackingUtilities::VarNames<TrackingUtilities::CDCSegmentPair> {
65
67 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
68 // at least tell cppcheck that everything is fine
69 // cppcheck-suppress duplInheritedMember
70 static const size_t nVars = TrackingUtilities::size(fitlessSegmentPairVarNames);
71
73 // cppcheck-suppress duplInheritedMember ; intentionally hides the base class member, which is the empty default of VarNames
74 static constexpr char const* getName(int iName)
75 {
76 return fitlessSegmentPairVarNames[iName];
77 }
78 };
79
84 class FitlessSegmentPairVarSet : public TrackingUtilities::VarSet<FitlessSegmentPairVarNames> {
85
86 public:
88 bool extract(const TrackingUtilities::CDCSegmentPair* ptrSegmentPair) final;
89 };
90 }
92}
Class to compute floating point variables from an axial stereo segment pair which can be recorded as ...
bool extract(const TrackingUtilities::CDCSegmentPair *ptrSegmentPair) final
Generate and assign the contained variables.
Class representing a pair of one reconstructed axial segment and one stereo segment in adjacent super...
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.