Belle II Software  release-05-01-25
TruthSegmentPairVarSet.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 CDCSegmentPair;
22 
24  constexpr
25  static char const* const truthSegmentPairVarNames[] = {
26  "truth_tanl",
27  "truth_z",
28  "truth_curv",
29  "truth_from_alpha",
30  "truth_to_alpha",
31  "truth_delta_alpha",
32  "truth_track_fraction",
33  "__weight__",
34  };
35 
37  struct TruthSegmentPairVarNames : public VarNames<CDCSegmentPair> {
38 
40  static const size_t nVars = size(truthSegmentPairVarNames);
41 
43  static constexpr char const* getName(int iName)
44  {
45  return truthSegmentPairVarNames[iName];
46  }
47  };
48 
53  class TruthSegmentPairVarSet : public VarSet<TruthSegmentPairVarNames> {
54 
55  public:
57  bool extract(const CDCSegmentPair* ptrSegmentPair) final;
58  };
59  }
61 }
Belle2::TrackFindingCDC::CDCSegmentPair
Class representing a pair of one reconstructed axial segement and one stereo segment in adjacent supe...
Definition: CDCSegmentPair.h:44
Belle2::TrackFindingCDC::TruthSegmentPairVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: TruthSegmentPairVarSet.h:48
Belle2::TrackFindingCDC::TruthSegmentPairVarSet
Class to compute floating point variables from an axial stereo segment pair which can be recorded as ...
Definition: TruthSegmentPairVarSet.h:61
Belle2::TrackFindingCDC::TruthSegmentPairVarSet::extract
bool extract(const CDCSegmentPair *ptrSegmentPair) final
Generate and assign the contained variables.
Definition: TruthSegmentPairVarSet.cc:27
Belle2::TrackFindingCDC::TruthSegmentPairVarNames::getName
static constexpr char const * getName(int iName)
Getter for the name at the given index.
Definition: TruthSegmentPairVarSet.h:51
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46