Belle II Software development
TruthAxialSegmentPairVarSet.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
13namespace Belle2 {
18 namespace TrackFindingCDC {
19 class CDCAxialSegmentPair;
20
22 constexpr
23 static char const* const truthAxialSegmentPairVarNames[] = {
24 "truth_tanl",
25 "truth_z",
26 "truth_curv",
27 "truth_from_alpha",
28 "truth_to_alpha",
29 "truth_delta_alpha",
30 "truth_track_fraction",
31 "__weight__",
32 };
33
35 struct TruthAxialSegmentPairVarNames : public VarNames<CDCAxialSegmentPair> {
36
38 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
39 // at least tell cppcheck that everything is fine
40 // cppcheck-suppress duplInheritedMember
41 static const size_t nVars = size(truthAxialSegmentPairVarNames);
42
44 static constexpr char const* getName(int iName)
45 {
46 return truthAxialSegmentPairVarNames[iName];
47 }
48 };
49
54 class TruthAxialSegmentPairVarSet : public VarSet<TruthAxialSegmentPairVarNames> {
55
58
59 public:
61 void initialize() final;
62
64 void beginEvent() final;
65
67 bool extract(const CDCAxialSegmentPair* ptrAxialSegmentPair) final;
68 };
69 }
71}
Class representing a pair of reconstructed axial segments in adjacent superlayer.
Class to compute floating point variables from an axial stereo segment pair which can be recorded as ...
void initialize() final
Require the Monte Carlo information before the event processing starts.
void beginEvent() final
Signal the begin of a new event.
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.