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/trackingUtilities/varsets/VarSet.h>
11#include <tracking/trackingUtilities/varsets/VarNames.h>
12
13#include <tracking/trackFindingCDC/filters/segmentTrack/BaseSegmentTrackFilter.h>
14
15#include <utility>
16
17namespace Belle2 {
22 namespace TrackingUtilities {
23 class CDCTrack;
24 class CDCSegment2D;
25 }
26 namespace TrackFindingCDC {
27
29 constexpr
30 static char const* const segmentTrackVarNames[] = {
31 "is_stereo",
32 "segment_size",
33 "track_size",
34 "maxmimum_trajectory_distance_front",
35 "maxmimum_trajectory_distance_back",
36 "maxmimum_hit_distance_front",
37 "maxmimum_hit_distance_back",
38 "out_of_CDC",
39 "hits_in_same_region",
40 "fit_full",
41 "fit_neigh",
42 "pt_of_track",
43 "track_is_curler",
44 "superlayer_already_full",
45 "z_distance",
46 "theta_distance",
47 "number_of_hits_in_common",
48 "mean_hit_z_distance",
49 "max_hit_z_distance",
50 "stereo_quad_tree_distance",
51 "segment_super_layer",
52 "phi_between_track_and_segment",
53 "perp_s_of_front",
54 "perp_s_of_back",
55 };
56
58 struct SegmentTrackVarNames : public TrackingUtilities::VarNames<BaseSegmentTrackFilter::Object> {
59
61 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
62 // at least tell cppcheck that everything is fine
63 // cppcheck-suppress duplInheritedMember
64 static const size_t nVars = TrackingUtilities::size(segmentTrackVarNames);
65
67 static constexpr char const* getName(int iName)
68 {
69 return segmentTrackVarNames[iName];
70 }
71 };
72
77 class SegmentTrackVarSet : public TrackingUtilities::VarSet<SegmentTrackVarNames> {
78
79 public:
81 bool extract(const BaseSegmentTrackFilter::Object* testPair) final;
82 };
83 }
85}
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.
A reconstructed sequence of two dimensional hits in one super layer.
Class representing a sequence of three dimensional reconstructed hits.
Definition CDCTrack.h:39
TrackingUtilities::WeightedRelation< TrackingUtilities::CDCTrack, const TrackingUtilities::CDCSegment2D > Object
Definition Filter.dcl.h:35
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.