Belle II Software development
FitSegmentPairVarSet.h
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#pragma once
9
10#include <tracking/trackingUtilities/varsets/VarSet.h>
11#include <tracking/trackingUtilities/varsets/VarNames.h>
12
13namespace Belle2 {
18 namespace TrackingUtilities {
19 class CDCSegmentPair;
20 }
21 namespace TrackFindingCDC {
22
24 constexpr
25 static char const* const fitSegmentPairVarNames[] = {
26 "ndf",
27 "chi2",
28 "p_value",
29 "curv",
30 "z0",
31 "tanl",
32 "curv_var",
33 "z0_var",
34 "tanl_var",
35 };
36
38 struct FitSegmentPairVarNames : public TrackingUtilities::VarNames<TrackingUtilities::CDCSegmentPair> {
39
41 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
42 // at least tell cppcheck that everything is fine
43 // cppcheck-suppress duplInheritedMember
44 static const size_t nVars = TrackingUtilities::size(fitSegmentPairVarNames);
45
47 static constexpr char const* getName(int iName)
48 {
49 return fitSegmentPairVarNames[iName];
50 }
51 };
52
57 class FitSegmentPairVarSet : public TrackingUtilities::VarSet<FitSegmentPairVarNames> {
58
59 private:
62
63 public:
65 explicit FitSegmentPairVarSet(bool preliminaryFit = false);
66
68 bool extract(const TrackingUtilities::CDCSegmentPair* ptrSegmentPair) final;
69
71 std::vector<TrackingUtilities::Named<Float_t*>> getNamedVariables(const std::string& prefix) final;
72
73 private:
75 bool m_preliminaryFit = false;
76 };
77 }
79}
TrackingUtilities::VarSet< FitSegmentPairVarNames > Super
Type of the base class.
bool extract(const TrackingUtilities::CDCSegmentPair *ptrSegmentPair) final
Generate and assign the contained variables.
FitSegmentPairVarSet(bool preliminaryFit=false)
Construct the varset with a switch to only do the prelimiary axial stereo fusion fit.
bool m_preliminaryFit
Indicator that only the prelimiary fit should be used.
std::vector< Named< Float_t * > > getNamedVariables()
Definition BaseVarSet.h:74
Class representing a pair of one reconstructed axial segment and one stereo segment in adjacent super...
Class that specifies the names of the variables.
Definition VarNames.h:21
Generic class that generates some named float values from a given object.
Definition VarSet.h:36
Abstract base class for different kinds of events.
Vehicle class to transport the variable names.
static const size_t nVars
Number of variables to be generated.
static constexpr char const * getName(int iName)
Getter for the name at the given index.