Belle II Software  release-05-02-19
SegmentTrackVarSet.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/varsets/VarSet.h>
13 #include <tracking/trackFindingCDC/varsets/VarNames.h>
14 
15 #include <tracking/trackFindingCDC/filters/segmentTrack/BaseSegmentTrackFilter.h>
16 
17 #include <utility>
18 
19 namespace Belle2 {
24  namespace TrackFindingCDC {
25  class CDCSegment2D;
26  class CDCTrack;
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 VarNames<BaseSegmentTrackFilter::Object> {
59 
61  static const size_t nVars = size(segmentTrackVarNames);
62 
64  static constexpr char const* getName(int iName)
65  {
66  return segmentTrackVarNames[iName];
67  }
68  };
69 
74  class SegmentTrackVarSet : public VarSet<SegmentTrackVarNames> {
75 
76  public:
78  bool extract(const BaseSegmentTrackFilter::Object* testPair) final;
79  };
80  }
82 }
Belle2::TrackFindingCDC::SegmentTrackVarSet::extract
bool extract(const BaseSegmentTrackFilter::Object *testPair) final
Generate and assign the contained variables.
Definition: SegmentTrackVarSet.cc:28
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::SegmentTrackVarNames::getName
static constexpr char const * getName(int iName)
Getter for the name at the given index.
Definition: SegmentTrackVarSet.h:72
Belle2::TrackFindingCDC::SegmentTrackVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: SegmentTrackVarSet.h:69
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46
Belle2::TrackFindingCDC::SegmentTrackVarSet
Class to compute floating point variables from a segment to track match which can be recorded as a fl...
Definition: SegmentTrackVarSet.h:82
Belle2::TrackFindingCDC::Filter::Object
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:43