Belle II Software  release-05-01-25
StereoHitVarSet.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun *
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/stereoHits/BaseStereoHitFilter.h>
16 
17 namespace Belle2 {
22  namespace TrackFindingCDC {
23 
25  constexpr
26  static char const* const stereoHitVarNames[] = {
27  "track_size",
28  "pt",
29  "reco_s",
30  "reco_z",
31  "phi_track",
32  "phi_hit",
33  "theta_hit",
34  "drift_length",
35  "adc_count",
36  "xy_distance_zero_z",
37  "right_hit",
38  "track_back_s",
39  "track_front_s",
40  "track_mean_s",
41  "s_distance",
42  "track_radius",
43  "superlayer_id",
44  };
45 
47  struct StereoHitVarNames : public VarNames<BaseStereoHitFilter::Object> {
48 
50  static const size_t nVars = size(stereoHitVarNames);
51 
53  static constexpr char const* getName(int iName)
54  {
55  return stereoHitVarNames[iName];
56  }
57  };
58 
63  class StereoHitVarSet : public VarSet<StereoHitVarNames> {
64 
65  public:
67  bool extract(const BaseStereoHitFilter::Object* testPair) override;
68  };
69  }
71 }
Belle2::TrackFindingCDC::StereoHitVarNames::getName
static constexpr char const * getName(int iName)
Getter for the name at the given index.
Definition: StereoHitVarSet.h:61
Belle2::TrackFindingCDC::StereoHitVarSet
Class to compute floating point variables from a stereo hit to track match which can be recorded as a...
Definition: StereoHitVarSet.h:71
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::StereoHitVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: StereoHitVarSet.h:58
Belle2::TrackFindingCDC::StereoHitVarSet::extract
bool extract(const BaseStereoHitFilter::Object *testPair) override
Generate and assign the contained variables.
Definition: StereoHitVarSet.cc:29
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46
Belle2::TrackFindingCDC::Filter::Object
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:43