Belle II Software  release-05-02-19
BasicSegmentVarSet.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 basicSegmentVarNames[] = {
26  "size",
27  "superlayer_id",
28  };
29 
31  struct BasicSegmentVarNames : public VarNames<CDCSegment2D> {
32 
34  static const size_t nVars = size(basicSegmentVarNames);
35 
37  static constexpr char const* getName(int iName)
38  {
39  return basicSegmentVarNames[iName];
40  }
41  };
42 
47  class BasicSegmentVarSet : public VarSet<BasicSegmentVarNames> {
48 
49  public:
51  bool extract(const CDCSegment2D* ptrSegment2D) final;
52  };
53  }
55 }
Belle2::TrackFindingCDC::BasicSegmentVarNames::getName
static constexpr char const * getName(int iName)
Getter for the name at the given index.
Definition: BasicSegmentVarSet.h:45
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::BasicSegmentVarSet
Class to compute floating point variables from a segment which can be recorded as a flat TNtuple or s...
Definition: BasicSegmentVarSet.h:55
Belle2::TrackFindingCDC::CDCSegment2D
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:40
Belle2::TrackFindingCDC::BasicSegmentVarSet::extract
bool extract(const CDCSegment2D *ptrSegment2D) final
Generate and assign the contained variables.
Definition: BasicSegmentVarSet.cc:17
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46
Belle2::TrackFindingCDC::BasicSegmentVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: BasicSegmentVarSet.h:42