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