Belle II Software  release-05-01-25
HitGapSegmentRelationVarSet.h
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 #pragma once
11 
12 #include <tracking/trackFindingCDC/varsets/VarSet.h>
13 #include <tracking/trackFindingCDC/varsets/VarNames.h>
14 
15 #include <tracking/trackFindingCDC/utilities/Relation.h>
16 
17 namespace Belle2 {
22  namespace TrackFindingCDC {
23  class CDCSegment2D;
24 
26  constexpr
27  static char const* const hitGapSegmentRelationVarNames[] = {
28  "delta_hit_pos_phi",
29  "delta_hit_mom_phi",
30  "delta_hit_alpha",
31 
32  "hit_distance",
33  "hit_long_distance",
34  "delta_hit_distance",
35 
36  "from_hit_forward",
37  "to_hit_forward",
38  "hit_forward",
39  "hit_ptolemy",
40  };
41 
43  struct HitGapSegmentRelationVarNames : public VarNames<Relation<const CDCSegment2D> > {
44 
46  static const size_t nVars = size(hitGapSegmentRelationVarNames);
47 
49  static constexpr char const* getName(int iName)
50  {
51  return hitGapSegmentRelationVarNames[iName];
52  }
53  };
54 
59  class HitGapSegmentRelationVarSet : public VarSet<HitGapSegmentRelationVarNames> {
60 
61  public:
63  bool extract(const Relation<const CDCSegment2D>* ptrSegmentRelation) override;
64  };
65  }
67 }
Belle2::TrackFindingCDC::Relation
Type for two related objects.
Definition: CDCSegment2D.h:37
Belle2::TrackFindingCDC::HitGapSegmentRelationVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: HitGapSegmentRelationVarSet.h:54
Belle2::TrackFindingCDC::HitGapSegmentRelationVarSet::extract
bool extract(const Relation< const CDCSegment2D > *ptrSegmentRelation) override
Generate and assign the contained variables.
Definition: HitGapSegmentRelationVarSet.cc:19
Belle2::TrackFindingCDC::HitGapSegmentRelationVarSet
Class to compute floating point variables from a segment relation which can be recorded as a flat TNt...
Definition: HitGapSegmentRelationVarSet.h:67
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::HitGapSegmentRelationVarNames::getName
static constexpr char const * getName(int iName)
Getter for the name at the given index.
Definition: HitGapSegmentRelationVarSet.h:57
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46