Belle II Software  release-05-01-25
FitlessSegmentRelationVarSet.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 #include <tracking/trackFindingCDC/utilities/Relation.h>
16 
17 namespace Belle2 {
22  namespace TrackFindingCDC {
23  class CDCSegment2D;
24 
26  constexpr
27  static char const* const fitlessSegmentRelationVarNames[] = {
28  "from_ndf",
29  "to_ndf",
30 
31  "from_chi2_over_ndf",
32  "to_chi2_over_ndf",
33 
34  "from_p_value",
35  "to_p_value",
36 
37  "abs_avg_curv",
38  "delta_curv",
39  "delta_curv_var",
40  "delta_curv_pull",
41 
42  "delta_pos_phi",
43  "delta_mom_phi",
44  "from_delta_mom_phi",
45  "to_delta_mom_phi",
46  "delta_alpha",
47 
48  "arc_length_front_offset",
49  "arc_length_back_offset",
50  "from_arc_length_total",
51  "to_arc_length_total",
52  "arc_length_gap",
53  };
54 
56  struct FitlessSegmentRelationVarNames : public VarNames<Relation<const CDCSegment2D> > {
57 
59  static const size_t nVars = size(fitlessSegmentRelationVarNames);
60 
62  static constexpr char const* getName(int iName)
63  {
64  return fitlessSegmentRelationVarNames[iName];
65  }
66  };
67 
72  class FitlessSegmentRelationVarSet : public VarSet<FitlessSegmentRelationVarNames> {
73 
74  public:
76  bool extract(const Relation<const CDCSegment2D>* ptrSegmentRelation) override;
77  };
78  }
80 }
Belle2::TrackFindingCDC::Relation
Type for two related objects.
Definition: CDCSegment2D.h:37
Belle2::TrackFindingCDC::FitlessSegmentRelationVarSet::extract
bool extract(const Relation< const CDCSegment2D > *ptrSegmentRelation) override
Generate and assign the contained variables.
Definition: FitlessSegmentRelationVarSet.cc:19
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::FitlessSegmentRelationVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: FitlessSegmentRelationVarSet.h:67
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46
Belle2::TrackFindingCDC::FitlessSegmentRelationVarSet
Class to compute floating point variables from a segment relation which can be recorded as a flat TNt...
Definition: FitlessSegmentRelationVarSet.h:80
Belle2::TrackFindingCDC::FitlessSegmentRelationVarNames::getName
static constexpr char const * getName(int iName)
Getter for the name at the given index.
Definition: FitlessSegmentRelationVarSet.h:70