Belle II Software development
AdvancedSegmentVarSet.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 advancedSegmentVarNames[] = {
26 "is_stereo",
27 "superlayer_id",
28 "size",
29
30 "number_of_hit_layers",
31
32 "total_number_of_neighbors",
33 "mean_number_of_neighbors",
34
35 "total_drift_length",
36 "mean_drift_length",
37 "variance_drift_length",
38
39 "total_inner_distance",
40 "mean_inner_distance",
41 "distance_to_superlayer_center",
42
43 "total_adc_count",
44 "mean_adc_count",
45 "variance_adc_count",
46
47 "number_of_taken_hits",
48
49 "fit_prob",
50 "fitted_d0",
51 };
52
54 struct AdvancedSegmentVarNames : public TrackingUtilities::VarNames<TrackingUtilities::CDCSegment2D> {
55
57 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
58 // at least tell cppcheck that everything is fine
59 // cppcheck-suppress duplInheritedMember
60 static const size_t nVars = TrackingUtilities::size(advancedSegmentVarNames);
61
63 static constexpr char const* getName(int iName)
64 {
65 return advancedSegmentVarNames[iName];
66 }
67 };
68
73 class AdvancedSegmentVarSet : public TrackingUtilities::VarSet<AdvancedSegmentVarNames> {
74
75 public:
77 bool extract(const TrackingUtilities::CDCSegment2D* segment) final;
78 };
79 }
81}
Class to compute floating point variables from a segment which can be recorded as a flat TNtuple or s...
bool extract(const TrackingUtilities::CDCSegment2D *segment) 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.