Belle II Software
development
Toggle main menu visibility
Main Page
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
e
f
g
n
p
s
v
z
Enumerator
c
d
f
p
t
v
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Symbols
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
QEResultsExtractor.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
9
#pragma once
10
11
#include <tracking/trackFindingVXD/variableExtractors/VariableExtractor.h>
12
#include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorBase.h>
13
14
15
namespace
Belle2
{
21
class
QEResultsExtractor
:
public
VariableExtractor
{
22
public
:
23
25
QEResultsExtractor
(
const
std::string& method, std::vector<
Named<float*>
>& variableSet):
26
VariableExtractor
(),
m_method
(method)
27
{
28
addVariable
(method +
"_QI"
, variableSet);
29
addVariable
(method +
"_Chi2"
, variableSet);
30
addVariable
(method +
"_Pt"
, variableSet);
31
addVariable
(method +
"_PMag"
, variableSet);
32
addVariable
(method +
"_P_Mag"
, variableSet);
33
addVariable
(method +
"_P_Eta"
, variableSet);
34
addVariable
(method +
"_P_Phi"
, variableSet);
35
addVariable
(method +
"_P_X"
, variableSet);
36
addVariable
(method +
"_P_Y"
, variableSet);
37
addVariable
(method +
"_P_Z"
, variableSet);
38
}
25
QEResultsExtractor
(
const
std::string& method, std::vector<
Named<float*>
>& variableSet): {
…
}
39
41
void
extractVariables
(
QualityEstimationResults
const
& values)
42
{
43
m_variables
.at(
m_method
+
"_QI"
) = values.qualityIndicator;
44
45
float
saneValue;
46
saneValue = values.chiSquared ? *(values.chiSquared) : -1;
47
m_variables
.at(
m_method
+
"_Chi2"
) = saneValue;
48
saneValue = values.pt ? *(values.pt) : -1;
49
m_variables
.at(
m_method
+
"_Pt"
) = saneValue;
50
saneValue = values.pmag ? *(values.pmag) : -1;
51
m_variables
.at(
m_method
+
"_PMag"
) = saneValue;
52
53
54
if
(values.p) {
55
auto
&
vector
= *(values.p);
56
m_variables
.at(
m_method
+
"_P_Mag"
) =
vector
.Mag();
57
m_variables
.at(
m_method
+
"_P_Eta"
) =
vector
.Eta();
58
m_variables
.at(
m_method
+
"_P_Phi"
) =
vector
.Phi();
59
m_variables
.at(
m_method
+
"_P_X"
) =
vector
.X();
60
m_variables
.at(
m_method
+
"_P_Y"
) =
vector
.Y();
61
m_variables
.at(
m_method
+
"_P_Z"
) =
vector
.Z();
62
}
else
{
63
m_variables
.at(
m_method
+
"_P_Mag"
) = -1;
64
m_variables
.at(
m_method
+
"_P_Eta"
) = -1;
65
m_variables
.at(
m_method
+
"_P_Phi"
) = -1;
66
m_variables
.at(
m_method
+
"_P_X"
) = -1;
67
m_variables
.at(
m_method
+
"_P_Y"
) = -1;
68
m_variables
.at(
m_method
+
"_P_Z"
) = -1;
69
}
70
}
41
void
extractVariables
(
QualityEstimationResults
const
& values) {
…
}
71
72
protected
:
74
std::string
m_method
;
75
};
21
class
QEResultsExtractor
:
public
VariableExtractor
{
…
};
76
77
}
Belle2::Named
A mixin class to attach a name to an object. Based on class with same name in CDC package.
Definition
Named.h:21
Belle2::QEResultsExtractor::extractVariables
void extractVariables(QualityEstimationResults const &values)
extract the actual variables and write into a variable set
Definition
QEResultsExtractor.h:41
Belle2::QEResultsExtractor::m_method
std::string m_method
name of estimation method
Definition
QEResultsExtractor.h:74
Belle2::QEResultsExtractor::QEResultsExtractor
QEResultsExtractor(const std::string &method, std::vector< Named< float * > > &variableSet)
Define names of variables that get extracted.
Definition
QEResultsExtractor.h:25
Belle2::VariableExtractor
class to extract individual variables
Definition
VariableExtractor.h:22
Belle2::VariableExtractor::addVariable
void addVariable(const std::string &identifier, std::vector< Named< float * > > &variables)
add a variable to the variable set
Definition
VariableExtractor.h:27
Belle2::VariableExtractor::m_variables
std::unordered_map< std::string, float > m_variables
unordered_map to associate float value with a string name
Definition
VariableExtractor.h:35
vector
STL class.
Belle2
Abstract base class for different kinds of events.
Definition
MillepedeAlgorithm.h:17
Belle2::QualityEstimationResults
Container for complete fit/estimation results.
Definition
QualityEstimatorBase.h:24
tracking
trackFindingVXD
variableExtractors
include
QEResultsExtractor.h
Generated on Sun May 18 2025 03:07:21 for Belle II Software by
1.13.2