Belle II Software development
FitlessSegmentRelationVarSet.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
15namespace Belle2 {
20 namespace TrackFindingCDC {
21 class CDCSegment2D;
22
24 constexpr
25 static char const* const fitlessSegmentRelationVarNames[] = {
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 "arc_length_front_offset",
47 "arc_length_back_offset",
48 "from_arc_length_total",
49 "to_arc_length_total",
50 "arc_length_gap",
51 };
52
54 struct FitlessSegmentRelationVarNames : public VarNames<Relation<const CDCSegment2D> > {
55
57 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
58 // at least tell cppcheck that everything is fine
59 // cppcheck-suppress duplInheritedMember
60 static const size_t nVars = size(fitlessSegmentRelationVarNames);
61
63 static constexpr char const* getName(int iName)
64 {
65 return fitlessSegmentRelationVarNames[iName];
66 }
67 };
68
73 class FitlessSegmentRelationVarSet : public VarSet<FitlessSegmentRelationVarNames> {
74
75 public:
77 bool extract(const Relation<const CDCSegment2D>* ptrSegmentRelation) override;
78 };
79 }
81}
Class to compute floating point variables from a segment relation which can be recorded as a flat TNt...
bool extract(const Relation< const CDCSegment2D > *ptrSegmentRelation) override
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.
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.