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/trackFindingCDC/varsets/VarSet.h>
11#include <tracking/trackFindingCDC/varsets/VarNames.h>
12
13namespace Belle2 {
18 namespace TrackFindingCDC {
19 class CDCSegment2D;
20
22 constexpr
23 static char const* const basicSegmentVarNames[] = {
24 "size",
25 "superlayer_id",
26 };
27
29 struct BasicSegmentVarNames : public VarNames<CDCSegment2D> {
30
32 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
33 // at least tell cppcheck that everything is fine
34 // cppcheck-suppress duplInheritedMember
35 static const size_t nVars = size(basicSegmentVarNames);
36
38 static constexpr char const* getName(int iName)
39 {
40 return basicSegmentVarNames[iName];
41 }
42 };
43
48 class BasicSegmentVarSet : public VarSet<BasicSegmentVarNames> {
49
50 public:
52 bool extract(const CDCSegment2D* ptrSegment2D) final;
53 };
54 }
56}
Class to compute floating point variables from a segment which can be recorded as a flat TNtuple or s...
bool extract(const CDCSegment2D *ptrSegment2D) final
Generate and assign the contained variables.
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:39
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.