Belle II Software development
FitFacetRelationVarSet.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
13#include <tracking/trackFindingCDC/utilities/Relation.h>
14
15namespace Belle2 {
20 namespace TrackFindingCDC {
21 class CDCFacet;
22
24 constexpr
25 static char const* const fitFacetRelationVarNames[] = {
26 "cos_delta",
27 "from_middle_cos_delta",
28 "to_middle_cos_delta",
29
30
31 "alpha_0",
32 "chi2_0",
33 "chi2_0_per_s",
34 "erf_0",
35 "fit_0_phi0",
36 "fit_0_cos_delta",
37
38 "chi2_1",
39 "chi2_1_per_s",
40 "fit_1_phi0",
41 "fit_1_cos_delta",
42
43 "chi2",
44 "chi2_per_s",
45 "fit_phi0",
46 "fit_cos_delta",
47
48 "phi0_from_sigma",
49 "phi0_to_sigma",
50
51 "phi0_ref_pull",
52 "phi0_ref_diff",
53 "phi0_ref_sigma",
54
55 "chi2_comb",
56 "phi0_comb_pull",
57 "phi0_comb_diff",
58 "phi0_comb_sigma",
59
60 "chi2_kari_unit",
61 "abs_curv_unit",
62
63 "chi2_kari_l",
64 "abs_curv_l",
65
66 "chi2_kari_pseudo",
67 "abs_curv_pseudo",
68
69 "chi2_kari_proper",
70 "abs_curv_proper",
71 };
72
74 struct FitFacetRelationVarNames : public VarNames<Relation<const CDCFacet>> {
75
77 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
78 // at least tell cppcheck that everything is fine
79 // cppcheck-suppress duplInheritedMember
80 static const size_t nVars = size(fitFacetRelationVarNames);
81
83 static constexpr char const* getName(int iName)
84 {
85 return fitFacetRelationVarNames[iName];
86 }
87 };
88
93 class FitFacetRelationVarSet : public VarSet<FitFacetRelationVarNames> {
94
95 public:
97 bool extract(const Relation<const CDCFacet>* ptrFacetRelation) final;
98 };
99 }
101}
Class to compute floating point variables from a facet relation which can be recorded as a flat TNtup...
bool extract(const Relation< const CDCFacet > *ptrFacetRelation) final
Generate and assign the contained variables.
Type for two related objects.
Definition: Relation.h:21
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.