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/trackingUtilities/varsets/VarSet.h>
11#include <tracking/trackingUtilities/varsets/VarNames.h>
12
13namespace Belle2 {
18 namespace TrackingUtilities {
20 }
21 namespace TrackFindingCDC {
22
24 constexpr
25 static char const* const truthAxialSegmentPairVarNames[] = {
26 "truth_tanl",
27 "truth_z",
28 "truth_curv",
29 "truth_from_alpha",
30 "truth_to_alpha",
31 "truth_delta_alpha",
32 "truth_track_fraction",
33 "__weight__",
34 };
35
37 struct TruthAxialSegmentPairVarNames : public TrackingUtilities::VarNames<TrackingUtilities::CDCAxialSegmentPair> {
38
40 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
41 // at least tell cppcheck that everything is fine
42 // cppcheck-suppress duplInheritedMember
43 static const size_t nVars = TrackingUtilities::size(truthAxialSegmentPairVarNames);
44
46 static constexpr char const* getName(int iName)
47 {
48 return truthAxialSegmentPairVarNames[iName];
49 }
50 };
51
56 class TruthAxialSegmentPairVarSet : public TrackingUtilities::VarSet<TruthAxialSegmentPairVarNames> {
57
60
61 public:
63 void initialize() final;
64
66 void beginEvent() final;
67
69 bool extract(const TrackingUtilities::CDCAxialSegmentPair* ptrAxialSegmentPair) final;
70 };
71 }
73}
Class to compute floating point variables from an axial stereo segment pair which can be recorded as ...
bool extract(const TrackingUtilities::CDCAxialSegmentPair *ptrAxialSegmentPair) final
Generate and assign the contained variables.
void initialize() final
Require the Monte Carlo information before the event processing starts.
void beginEvent() final
Signal the begin of a new event.
TrackingUtilities::VarSet< TruthAxialSegmentPairVarNames > Super
Type of the base class.
Class representing a pair of reconstructed axial segments in adjacent superlayer.
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.