Belle II Software  release-05-01-25
BkgTruthSegmentVarSet.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - 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/filters/segment/TruthSegmentVarSet.h>
13 
14 namespace Belle2 {
19  namespace TrackFindingCDC {
20  class CDCSegment2D;
21 
26  class BkgTruthSegmentVarSet : public TruthSegmentVarSet {
27 
28  private:
30  using Super = TruthSegmentVarSet;
31 
32  public:
34  bool extract(const CDCSegment2D* segment) final {
35  bool extracted = Super::extract(segment);
36  var<named("truth")>() = not var<named("segment_is_fake_truth")>();
37  return extracted;
38  }
39  };
40  }
42 }
Belle2::TrackFindingCDC::TruthSegmentVarSet::extract
bool extract(const CDCSegment2D *segment) override
Generate and assign the contained variables.
Definition: TruthSegmentVarSet.cc:36
Belle2::TrackFindingCDC::BkgTruthSegmentVarSet::Super
TruthSegmentVarSet Super
Type of the base class.
Definition: BkgTruthSegmentVarSet.h:38
Belle2::TrackFindingCDC::BkgTruthSegmentVarSet::extract
bool extract(const CDCSegment2D *segment) final
Generate and assign the contained variables.
Definition: BkgTruthSegmentVarSet.h:42
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::CDCSegment2D
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:40
Belle2::TrackFindingCDC::VarSet< TruthSegmentVarNames >::named
constexpr static int named(const char *name)
Getter for the index from the name.
Definition: VarSet.h:88
Belle2::TrackFindingCDC::VarSet< TruthSegmentVarNames >::var
Float_t & var()
Reference getter for the value of the ith variable. Static version.
Definition: VarSet.h:103