Belle II Software development
FitSegmentRelationVarSet.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 fitSegmentRelationVarNames[] = {
26 "is_fitted",
27 "curv",
28 "curv_var",
29 "chi2",
30 "chi2_no_rl",
31 "chi2_per_ndf",
32 "chi2_no_rl_per_ndf",
33 "ndf",
34 "p_value",
35 };
36
38 struct FitSegmentRelationVarNames : public VarNames<Relation<const CDCSegment2D>> {
39
41 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
42 // at least tell cppcheck that everything is fine
43 // cppcheck-suppress duplInheritedMember
44 static const size_t nVars = size(fitSegmentRelationVarNames);
45
47 static constexpr char const* getName(int iName)
48 {
49 return fitSegmentRelationVarNames[iName];
50 }
51 };
52
57 class FitSegmentRelationVarSet : public VarSet<FitSegmentRelationVarNames> {
58
59 public:
61 bool extract(const Relation<const CDCSegment2D>* ptrSegmentRelation) final;
62 };
63 }
65}
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) final
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.
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.