Belle II Software development
TruthSegmentPairRelationVarSet.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 truthSegmentPairRelationVarNames[] = {
26 "truth_tanl",
27 "truth_z",
28 "truth_curv",
29 "truth_track_fraction",
30 "__weight__",
31 };
32
34 struct TruthSegmentPairRelationVarNames : public VarNames<Relation<const CDCSegmentPair>> {
35
37 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
38 // at least tell cppcheck that everything is fine
39 // cppcheck-suppress duplInheritedMember
40 static const size_t nVars = size(truthSegmentPairRelationVarNames);
41
43 static constexpr char const* getName(int iName)
44 {
45 return truthSegmentPairRelationVarNames[iName];
46 }
47 };
48
53 class TruthSegmentPairRelationVarSet : public VarSet<TruthSegmentPairRelationVarNames> {
54
55 public:
57 bool extract(const Relation<const CDCSegmentPair>* ptrSegmentPairRelation) final;
58 };
59 }
61}
Type for two related objects.
Definition: Relation.h:21
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.
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.