ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagInfo
src
TruthInfo.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
JetTagInfo/TruthInfo.h
"
6
#include <algorithm>
7
#include <utility>
8
9
namespace
Analysis
10
{
11
13
TruthInfo::TruthInfo
()
14
:
BaseTagInfo
(),
15
m_jetTruthLabel
(
"N/A"
),
16
m_distanceToBQuark
(999.),
17
m_distanceToCQuark
(999.),
18
m_distanceToTLepton
(999.),
19
m_BHadronPdg
(0)
20
{}
21
23
TruthInfo::TruthInfo
(
const
TagInfoType
& tagJetInfoType)
24
:
BaseTagInfo
(tagJetInfoType),
25
m_jetTruthLabel
(
"N/A"
),
26
m_distanceToBQuark
(999.),
27
m_distanceToCQuark
(999.),
28
m_distanceToTLepton
(999.),
29
m_BHadronPdg
(0)
30
{}
31
35
TruthInfo::TruthInfo
(
const
TruthInfo
& rhs) :
BaseTagInfo
(rhs),
36
m_jetTruthLabel
(rhs.
m_jetTruthLabel
),
37
m_distanceToBQuark
(rhs.
m_distanceToBQuark
),
38
m_distanceToCQuark
(rhs.
m_distanceToCQuark
),
39
m_distanceToTLepton
(rhs.
m_distanceToTLepton
),
40
m_BHadronDecayVertex
(rhs.
m_BHadronDecayVertex
),
41
m_BHadronPdg
(rhs.
m_BHadronPdg
)
42
{}
43
45
TruthInfo
&
TruthInfo::operator=
(
const
TruthInfo
& rhs)
46
{
47
if
(
this
!=&rhs)
48
{
49
m_jetTruthLabel
=rhs.
m_jetTruthLabel
;
50
m_distanceToBQuark
=rhs.
m_distanceToBQuark
;
51
m_distanceToCQuark
=rhs.
m_distanceToCQuark
;
52
m_distanceToTLepton
=rhs.
m_distanceToTLepton
;
53
m_BHadronDecayVertex
=rhs.
m_BHadronDecayVertex
;
54
m_BHadronPdg
=rhs.
m_BHadronPdg
;
55
}
56
return
*
this
;
57
}
58
60
TruthInfo::~TruthInfo
()
61
{}
62
63
void
TruthInfo::deltaRMinTo
(
const
std::string& key,
double
dR) {
64
if
(
"B"
==key ||
"b"
==key )
m_distanceToBQuark
= dR;
65
if
(
"C"
==key ||
"c"
==key )
m_distanceToCQuark
= dR;
66
if
(
"T"
==key ||
"t"
==key )
m_distanceToTLepton
= dR;
67
}
68
69
double
TruthInfo::deltaRMinTo
(
const
std::string& key)
const
{
70
double
dR = 9999.;
71
if
(
"B"
==key ||
"b"
==key ) dR =
m_distanceToBQuark
;
72
if
(
"C"
==key ||
"c"
==key ) dR =
m_distanceToCQuark
;
73
if
(
"T"
==key ||
"t"
==key ) dR =
m_distanceToTLepton
;
74
return
dR;
75
}
76
77
}
TruthInfo.h
Analysis::BaseTagInfo::BaseTagInfo
BaseTagInfo()=default
Analysis::TruthInfo::m_distanceToCQuark
double m_distanceToCQuark
Definition
TruthInfo.h:63
Analysis::TruthInfo::deltaRMinTo
void deltaRMinTo(const std::string &key, double dR)
min deltaR to quarks:
Definition
TruthInfo.cxx:63
Analysis::TruthInfo::m_jetTruthLabel
std::string m_jetTruthLabel
Definition
TruthInfo.h:61
Analysis::TruthInfo::m_BHadronDecayVertex
Eigen::Vector3d m_BHadronDecayVertex
Definition
TruthInfo.h:65
Analysis::TruthInfo::m_distanceToTLepton
double m_distanceToTLepton
Definition
TruthInfo.h:64
Analysis::TruthInfo::operator=
TruthInfo & operator=(const TruthInfo &rhs)
assigenment operator
Definition
TruthInfo.cxx:45
Analysis::TruthInfo::TruthInfo
TruthInfo()
default constructor
Definition
TruthInfo.cxx:13
Analysis::TruthInfo::m_BHadronPdg
int m_BHadronPdg
Definition
TruthInfo.h:66
Analysis::TruthInfo::m_distanceToBQuark
double m_distanceToBQuark
Definition
TruthInfo.h:62
Analysis::TruthInfo::~TruthInfo
virtual ~TruthInfo()
default destructor
Definition
TruthInfo.cxx:60
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition
IConstituent.h:25
Analysis::TagInfoType
std::string TagInfoType
Definition
JetTagInfoBase.h:19
Generated on
for ATLAS Offline Software by
1.17.0