Belle II Software development
StereoHitVarSet.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
13#include <tracking/trackFindingCDC/filters/stereoHits/BaseStereoHitFilter.h>
14
15namespace Belle2 {
20 namespace TrackFindingCDC {
21
23 constexpr
24 static char const* const stereoHitVarNames[] = {
25 "track_size",
26 "pt",
27 "reco_s",
28 "reco_z",
29 "phi_track",
30 "phi_hit",
31 "theta_hit",
32 "drift_length",
33 "adc_count",
34 "xy_distance_zero_z",
35 "right_hit",
36 "track_back_s",
37 "track_front_s",
38 "track_mean_s",
39 "s_distance",
40 "track_radius",
41 "superlayer_id",
42 };
43
45 struct StereoHitVarNames : public VarNames<BaseStereoHitFilter::Object> {
46
48 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
49 // at least tell cppcheck that everything is fine
50 // cppcheck-suppress duplInheritedMember
51 static const size_t nVars = size(stereoHitVarNames);
52
54 static constexpr char const* getName(int iName)
55 {
56 return stereoHitVarNames[iName];
57 }
58 };
59
64 class StereoHitVarSet : public VarSet<StereoHitVarNames> {
65
66 public:
68 bool extract(const BaseStereoHitFilter::Object* testPair) override;
69 };
70 }
72}
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:35
Class to compute floating point variables from a stereo hit to track match which can be recorded as a...
bool extract(const BaseStereoHitFilter::Object *testPair) override
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.