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/trackFindingCDC/varsets/VarSet.h>
11#include <tracking/trackFindingCDC/varsets/VarNames.h>
12
13namespace Belle2 {
18 namespace TrackFindingCDC {
19 class CDCWireHitCluster;
20
22 static constexpr char const* const basicClusterNames[] = {
23 "is_stereo",
24 "superlayer_id",
25 "size",
26
27 "total_number_of_neighbors",
28 "mean_number_of_neighbors",
29
30 "total_drift_length",
31 "mean_drift_length",
32 "variance_drift_length",
33
34 "total_inner_distance",
35 "mean_inner_distance",
36 "distance_to_superlayer_center",
37
38 "total_adc_count",
39 "mean_adc_count",
40 "variance_adc_count",
41 };
42
44 struct BasicClusterVarNames : public VarNames<CDCWireHitCluster> {
45
47 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
48 // at least tell cppcheck that everything is fine
49 // cppcheck-suppress duplInheritedMember
50 static const size_t nVars = size(basicClusterNames);
51
53 static constexpr char const* getName(int iName)
54 {
55 return basicClusterNames[iName];
56 }
57 };
58
63 class BasicClusterVarSet : public VarSet<BasicClusterVarNames> {
64
65 public:
67 bool extract(const CDCWireHitCluster* ptrCluster) final;
68 };
69 }
71}
Class to compute floating point variables from a wire hit cluster which can be recorded as a flat TNt...
bool extract(const 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.