Belle II Software development
FitSegmentPairRelationVarSet.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 CDCSegmentPair;
22
24 constexpr
25 static char const* const fitSegmentRelationVarNames[] = {
26 "is_fitted",
27 "curv",
28 "curv_var",
29 "z0",
30 "z0_var",
31 "tanl",
32 "tanl_var",
33 "chi2",
34 "chi2_per_ndf",
35 "ndf",
36 "p_value",
37 };
38
40 struct FitSegmentPairRelationVarNames : public VarNames<Relation<const CDCSegmentPair>> {
41
43 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
44 // at least tell cppcheck that everything is fine
45 // cppcheck-suppress duplInheritedMember
46 static const size_t nVars = size(fitSegmentRelationVarNames);
47
49 static constexpr char const* getName(int iName)
50 {
51 return fitSegmentRelationVarNames[iName];
52 }
53 };
54
59 class FitSegmentPairRelationVarSet : public VarSet<FitSegmentPairRelationVarNames> {
60
61 public:
63 bool extract(const Relation<const CDCSegmentPair>* ptrSegmentPairRelation) final;
64 };
65 }
67}
Class representing a pair of one reconstructed axial segment and one stereo segment in adjacent super...
Class to compute floating point variables from an axial stereo segment pair relation which can be rec...
bool extract(const Relation< const CDCSegmentPair > *ptrSegmentPairRelation) 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.
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.