Belle II Software  release-05-01-25
BasicSegmentPairRelationVarSet.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - 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 #include <tracking/trackFindingCDC/filters/segmentPairRelation/BasicSegmentPairRelationVarSet.h>
11 
12 #include <tracking/trackFindingCDC/eventdata/tracks/CDCSegmentPair.h>
13 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
14 
15 using namespace Belle2;
16 using namespace TrackFindingCDC;
17 
19 {
20  if (not ptrSegmentPairRelation) return false;
21 
22  const CDCSegmentPair* fromSegmentPair = ptrSegmentPairRelation->first;
23  const CDCSegmentPair* toSegmentPair = ptrSegmentPairRelation->second;
24  const CDCSegment2D* middleSegment = fromSegmentPair->getToSegment();
25 
26  var<named("middle_sl_id")>() = middleSegment->getISuperLayer();
27  var<named("middle_is_axial")>() = middleSegment->isAxial();
28  var<named("from_size")>() = fromSegmentPair->size();
29  var<named("to_size")>() = toSegmentPair->size();
30  var<named("middle_size")>() = middleSegment->size();
31 
32  return true;
33 }
Belle2::TrackFindingCDC::Relation
Type for two related objects.
Definition: CDCSegment2D.h:37
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::CDCSegmentPair::size
std::size_t size() const
Getter for the total number of hits in this segment pair.
Definition: CDCSegmentPair.cc:85
Belle2::TrackFindingCDC::BasicSegmentPairRelationVarSet::extract
bool extract(const Relation< const CDCSegmentPair > *ptrSegmentPairRelation) final
Generate and assign the contained variables.
Definition: BasicSegmentPairRelationVarSet.cc:18
Belle2::TrackFindingCDC::CDCSegmentPair::getToSegment
const CDCSegment2D * getToSegment() const
Getter for the to segment.
Definition: CDCSegmentPair.h:132
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< BasicSegmentPairRelationVarNames >::named
constexpr static int named(const char *name)
Getter for the index from the name.
Definition: VarSet.h:88
Belle2::TrackFindingCDC::VarSet< BasicSegmentPairRelationVarNames >::var
Float_t & var()
Reference getter for the value of the ith variable. Static version.
Definition: VarSet.h:103