Belle II Software  release-08-01-10
BasicSegmentVarSet.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #include <tracking/trackFindingCDC/filters/segment/BasicSegmentVarSet.h>
9 
10 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
11 
12 using namespace Belle2;
13 using namespace TrackFindingCDC;
14 
15 bool BasicSegmentVarSet::extract(const CDCSegment2D* ptrSegment2D)
16 {
17  if (not ptrSegment2D) return false;
18 
19  var<named("size")>() = ptrSegment2D->size();
20  var<named("superlayer_id")>() = ptrSegment2D->getISuperLayer();
21 
22  return true;
23 }
bool extract(const CDCSegment2D *ptrSegment2D) final
Generate and assign the contained variables.
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:39
constexpr static int named(const char *name)
Getter for the index from the name.
Definition: VarSet.h:78
Float_t & var()
Reference getter for the value of the ith variable. Static version.
Definition: VarSet.h:93
Abstract base class for different kinds of events.