Belle II Software development
BasicSegmentVarSet.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 {
19 class CDCSegment2D;
20 }
21 namespace TrackFindingCDC {
22
24 constexpr
25 static char const* const basicSegmentVarNames[] = {
26 "size",
27 "superlayer_id",
28 };
29
31 struct BasicSegmentVarNames : public TrackingUtilities::VarNames<TrackingUtilities::CDCSegment2D> {
32
34 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
35 // at least tell cppcheck that everything is fine
36 // cppcheck-suppress duplInheritedMember
37 static const size_t nVars = TrackingUtilities::size(basicSegmentVarNames);
38
40 static constexpr char const* getName(int iName)
41 {
42 return basicSegmentVarNames[iName];
43 }
44 };
45
50 class BasicSegmentVarSet : public TrackingUtilities::VarSet<BasicSegmentVarNames> {
51
52 public:
54 bool extract(const TrackingUtilities::CDCSegment2D* ptrSegment2D) final;
55 };
56 }
58}
Class to compute floating point variables from a segment which can be recorded as a flat TNtuple or s...
bool extract(const TrackingUtilities::CDCSegment2D *ptrSegment2D) final
Generate and assign the contained variables.
A reconstructed sequence of two dimensional hits in one super layer.
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.