Belle II Software  release-05-01-25
TruthAxialSegmentPairVarSet.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 CDCAxialSegmentPair;
22 
24  constexpr
25  static char const* const truthAxialSegmentPairVarNames[] = {
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 TruthAxialSegmentPairVarNames : public VarNames<CDCAxialSegmentPair> {
38 
40  static const size_t nVars = size(truthAxialSegmentPairVarNames);
41 
43  static constexpr char const* getName(int iName)
44  {
45  return truthAxialSegmentPairVarNames[iName];
46  }
47  };
48 
53  class TruthAxialSegmentPairVarSet : public VarSet<TruthAxialSegmentPairVarNames> {
54 
57 
58  public:
60  void initialize() final;
61 
63  void beginEvent() final;
64 
66  bool extract(const CDCAxialSegmentPair* ptrAxialSegmentPair) final;
67  };
68  }
70 }
Belle2::TrackFindingCDC::TruthAxialSegmentPairVarSet::Super
VarSet< TruthAxialSegmentPairVarNames > Super
Type of the base class.
Definition: TruthAxialSegmentPairVarSet.h:64
Belle2::TrackFindingCDC::TruthAxialSegmentPairVarSet::beginEvent
void beginEvent() final
Signal the begin of a new event.
Definition: TruthAxialSegmentPairVarSet.cc:37
Belle2::TrackFindingCDC::TruthAxialSegmentPairVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: TruthAxialSegmentPairVarSet.h:48
Belle2::TrackFindingCDC::TruthAxialSegmentPairVarNames::getName
static constexpr char const * getName(int iName)
Getter for the name at the given index.
Definition: TruthAxialSegmentPairVarSet.h:51
Belle2::TrackFindingCDC::TruthAxialSegmentPairVarSet::extract
bool extract(const CDCAxialSegmentPair *ptrAxialSegmentPair) final
Generate and assign the contained variables.
Definition: TruthAxialSegmentPairVarSet.cc:43
Belle2::TrackFindingCDC::CDCAxialSegmentPair
Class representing a pair of reconstructed axial segements in adjacent superlayer.
Definition: CDCAxialSegmentPair.h:41
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::TruthAxialSegmentPairVarSet
Class to compute floating point variables from an axial stereo segment pair which can be recorded as ...
Definition: TruthAxialSegmentPairVarSet.h:61
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46
Belle2::TrackFindingCDC::TruthAxialSegmentPairVarSet::initialize
void initialize() final
Require the Monte Carlo information before the event processing starts.
Definition: TruthAxialSegmentPairVarSet.cc:31