Belle II Software development
SegmentTrackVarSet.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/segmentTrack/BaseSegmentTrackFilter.h>
14
15#include <utility>
16
17namespace Belle2 {
22 namespace TrackFindingCDC {
23 class CDCSegment2D;
24 class CDCTrack;
25
27 constexpr
28 static char const* const segmentTrackVarNames[] = {
29 "is_stereo",
30 "segment_size",
31 "track_size",
32 "maxmimum_trajectory_distance_front",
33 "maxmimum_trajectory_distance_back",
34 "maxmimum_hit_distance_front",
35 "maxmimum_hit_distance_back",
36 "out_of_CDC",
37 "hits_in_same_region",
38 "fit_full",
39 "fit_neigh",
40 "pt_of_track",
41 "track_is_curler",
42 "superlayer_already_full",
43 "z_distance",
44 "theta_distance",
45 "number_of_hits_in_common",
46 "mean_hit_z_distance",
47 "max_hit_z_distance",
48 "stereo_quad_tree_distance",
49 "segment_super_layer",
50 "phi_between_track_and_segment",
51 "perp_s_of_front",
52 "perp_s_of_back",
53 };
54
56 struct SegmentTrackVarNames : public VarNames<BaseSegmentTrackFilter::Object> {
57
59 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
60 // at least tell cppcheck that everything is fine
61 // cppcheck-suppress duplInheritedMember
62 static const size_t nVars = size(segmentTrackVarNames);
63
65 static constexpr char const* getName(int iName)
66 {
67 return segmentTrackVarNames[iName];
68 }
69 };
70
75 class SegmentTrackVarSet : public VarSet<SegmentTrackVarNames> {
76
77 public:
79 bool extract(const BaseSegmentTrackFilter::Object* testPair) final;
80 };
81 }
83}
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:35
Class to compute floating point variables from a segment to track match which can be recorded as a fl...
bool extract(const BaseSegmentTrackFilter::Object *testPair) 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.