Belle II Software development
FitlessFacetVarSet.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 CDCFacet;
20 }
21 namespace TrackFindingCDC {
22
24 constexpr
25 static char const* const fitlessFacetVarNames[] = {
26 "superlayer_id",
27 "oclock_delta",
28 "abs_oclock_delta",
29 "cell_extend",
30 "short_arm_is_crossing",
31 "long_arm_is_crossing",
32 "stable_twist",
33 "abs_layer_id_difference",
34 "layer_id_difference",
35 "crossing_id",
36 "shape_id",
37 "is_forward_progression",
38 };
39
41 struct FitlessFacetVarNames : public TrackingUtilities::VarNames<const TrackingUtilities::CDCFacet> {
42
44 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
45 // at least tell cppcheck that everything is fine
46 // cppcheck-suppress duplInheritedMember
47 static const size_t nVars = TrackingUtilities::size(fitlessFacetVarNames);
48
50 // cppcheck-suppress duplInheritedMember ; intentionally hides the base class member, which is the empty default of VarNames
51 static constexpr char const* getName(int iName)
52 {
53 return fitlessFacetVarNames[iName];
54 }
55 };
56
61 class FitlessFacetVarSet : public TrackingUtilities::VarSet<FitlessFacetVarNames> {
62
63 public:
65 bool extract(const TrackingUtilities::CDCFacet* ptrFacet) final;
66 };
67 }
69}
Class to compute floating point variables from a facet which can be recorded as a flat TNtuple or ser...
bool extract(const TrackingUtilities::CDCFacet *ptrFacet) final
Generate and assign the contained variables.
Class representing a triple of neighboring oriented wire with additional trajectory information.
Definition CDCFacet.h:33
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.