Belle II Software  release-05-02-19
AdvancedSegmentVarSet.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 namespace Belle2 {
20  namespace TrackFindingCDC {
21  class CDCSegment2D;
22 
24  constexpr
25  static char const* const advancedSegmentVarNames[] = {
26  "is_stereo",
27  "superlayer_id",
28  "size",
29 
30  "number_of_hit_layers",
31 
32  "total_number_of_neighbors",
33  "mean_number_of_neighbors",
34 
35  "total_drift_length",
36  "mean_drift_length",
37  "variance_drift_length",
38 
39  "total_inner_distance",
40  "mean_inner_distance",
41  "distance_to_superlayer_center",
42 
43  "total_adc_count",
44  "mean_adc_count",
45  "variance_adc_count",
46 
47  "number_of_taken_hits",
48 
49  "fit_prob",
50  "fitted_d0",
51  };
52 
54  struct AdvancedSegmentVarNames : public VarNames<CDCSegment2D> {
55 
57  static const size_t nVars = size(advancedSegmentVarNames);
58 
60  static constexpr char const* getName(int iName)
61  {
62  return advancedSegmentVarNames[iName];
63  }
64  };
65 
70  class AdvancedSegmentVarSet : public VarSet<AdvancedSegmentVarNames> {
71 
72  public:
74  bool extract(const CDCSegment2D* segment) final;
75  };
76  }
78 }
Belle2::TrackFindingCDC::AdvancedSegmentVarSet::extract
bool extract(const CDCSegment2D *segment) final
Generate and assign the contained variables.
Definition: AdvancedSegmentVarSet.cc:25
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::AdvancedSegmentVarNames::getName
static constexpr char const * getName(int iName)
Getter for the name at the given index.
Definition: AdvancedSegmentVarSet.h:68
Belle2::TrackFindingCDC::CDCSegment2D
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:40
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46
Belle2::TrackFindingCDC::AdvancedSegmentVarSet
Class to compute floating point variables from a segment which can be recorded as a flat TNtuple or s...
Definition: AdvancedSegmentVarSet.h:78
Belle2::TrackFindingCDC::AdvancedSegmentVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: AdvancedSegmentVarSet.h:65