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/trackFindingCDC/varsets/VarSet.h>
11#include <tracking/trackFindingCDC/varsets/VarNames.h>
12
13namespace Belle2 {
18 namespace TrackFindingCDC {
19 class CDCSegmentPair;
20
22 constexpr
23 static char const* const fitSegmentPairVarNames[] = {
24 "ndf",
25 "chi2",
26 "p_value",
27 "curv",
28 "z0",
29 "tanl",
30 "curv_var",
31 "z0_var",
32 "tanl_var",
33 };
34
36 struct FitSegmentPairVarNames : public VarNames<CDCSegmentPair> {
37
39 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
40 // at least tell cppcheck that everything is fine
41 // cppcheck-suppress duplInheritedMember
42 static const size_t nVars = size(fitSegmentPairVarNames);
43
45 static constexpr char const* getName(int iName)
46 {
47 return fitSegmentPairVarNames[iName];
48 }
49 };
50
55 class FitSegmentPairVarSet : public VarSet<FitSegmentPairVarNames> {
56
57 private:
60
61 public:
63 explicit FitSegmentPairVarSet(bool preliminaryFit = false);
64
66 bool extract(const CDCSegmentPair* ptrSegmentPair) final;
67
69 std::vector<Named<Float_t*>> getNamedVariables(const std::string& prefix) final;
70
71 private:
73 bool m_preliminaryFit = false;
74 };
75 }
77}
std::vector< Named< Float_t * > > getNamedVariables()
Getter for the named references to the individual variables.
Definition: BaseVarSet.h:73
Class representing a pair of one reconstructed axial segment and one stereo segment in adjacent super...
Class to compute floating point variables from an axial stereo segment pair which can be recorded as ...
bool extract(const CDCSegmentPair *ptrSegmentPair) final
Generate and assign the contained variables.
bool m_preliminaryFit
Indicator that only the prelimiary fit should be used.
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.