Belle II Software development
BasicClusterVarSet.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 {
20 }
21 namespace TrackFindingCDC {
22
24 static constexpr char const* const basicClusterNames[] = {
25 "is_stereo",
26 "superlayer_id",
27 "size",
28
29 "total_number_of_neighbors",
30 "mean_number_of_neighbors",
31
32 "total_drift_length",
33 "mean_drift_length",
34 "variance_drift_length",
35
36 "total_inner_distance",
37 "mean_inner_distance",
38 "distance_to_superlayer_center",
39
40 "total_adc_count",
41 "mean_adc_count",
42 "variance_adc_count",
43 };
44
46 struct BasicClusterVarNames : public TrackingUtilities::VarNames<TrackingUtilities::CDCWireHitCluster> {
47
49 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
50 // at least tell cppcheck that everything is fine
51 // cppcheck-suppress duplInheritedMember
52 static const size_t nVars = TrackingUtilities::size(basicClusterNames);
53
55 static constexpr char const* getName(int iName)
56 {
57 return basicClusterNames[iName];
58 }
59 };
60
65 class BasicClusterVarSet : public TrackingUtilities::VarSet<BasicClusterVarNames> {
66
67 public:
69 bool extract(const TrackingUtilities::CDCWireHitCluster* ptrCluster) final;
70 };
71 }
73}
Class to compute floating point variables from a wire hit cluster which can be recorded as a flat TNt...
bool extract(const TrackingUtilities::CDCWireHitCluster *ptrCluster) final
Generate and assign the contained variables.
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.