Belle II Software  release-05-01-25
FitSegmentPairRelationVarSet.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 CDCSegmentPair;
24 
26  constexpr
27  static char const* const fitSegmentRelationVarNames[] = {
28  "is_fitted",
29  "curv",
30  "curv_var",
31  "z0",
32  "z0_var",
33  "tanl",
34  "tanl_var",
35  "chi2",
36  "chi2_per_ndf",
37  "ndf",
38  "p_value",
39  };
40 
42  struct FitSegmentPairRelationVarNames : public VarNames<Relation<const CDCSegmentPair>> {
43 
45  static const size_t nVars = size(fitSegmentRelationVarNames);
46 
48  static constexpr char const* getName(int iName)
49  {
50  return fitSegmentRelationVarNames[iName];
51  }
52  };
53 
58  class FitSegmentPairRelationVarSet : public VarSet<FitSegmentPairRelationVarNames> {
59 
60  public:
62  bool extract(const Relation<const CDCSegmentPair>* ptrSegmentPairRelation) final;
63  };
64  }
66 }
Belle2::TrackFindingCDC::Relation
Type for two related objects.
Definition: CDCSegment2D.h:37
Belle2::TrackFindingCDC::FitSegmentPairRelationVarNames::nVars
static const size_t nVars
Number of variables to be generated.
Definition: FitSegmentPairRelationVarSet.h:53
Belle2::TrackFindingCDC::FitSegmentPairRelationVarNames::getName
static constexpr char const * getName(int iName)
Getter for the name at the given index.
Definition: FitSegmentPairRelationVarSet.h:56
Belle2::TrackFindingCDC::FitSegmentPairRelationVarSet
Class to compute floating point variables from an axial stereo segment pair relation which can be rec...
Definition: FitSegmentPairRelationVarSet.h:66
Belle2::TrackFindingCDC::FitSegmentPairRelationVarSet::extract
bool extract(const Relation< const CDCSegmentPair > *ptrSegmentPairRelation) final
Generate and assign the contained variables.
Definition: FitSegmentPairRelationVarSet.cc:17
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::VarSet
Generic class that generates some named float values from a given object.
Definition: VarSet.h:46