ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigMuonEvent
src
TileTrackMuFeature.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include "
TrigMuonEvent/TileTrackMuFeature.h
"
7
8
9
11
namespace
{
12
constexpr
double
DELTA
= 0.001;
13
}
14
15
16
17
TileTrackMuFeature::TileTrackMuFeature
(
18
float
PtTR_Trk
,
19
float
EtaTR_Trk
,
float
PhiTR_Trk
,
int
Typ_IDTrk
,
20
const
ElementLink< TileMuFeatureContainer>
&
TileMuOutput
,
21
const
ElementLink< TrigInDetTrackCollection>
&
IDScanOutput
)
22
:
P4PtEtaPhiMBase
()
23
,
m_PtTR_Trk
(
PtTR_Trk
)
24
,
m_EtaTR_Trk
(
EtaTR_Trk
)
25
,
m_PhiTR_Trk
(
PhiTR_Trk
)
26
,
m_Typ_IDTrk
(
Typ_IDTrk
)
27
,
m_TileMuOutput
(
TileMuOutput
)
28
,
m_IDScanOutput
(
IDScanOutput
)
29
{
30
}
31
32
33
TileTrackMuFeature::TileTrackMuFeature
(
const
TileTrackMuFeature
& muon_feature)
34
:
m_PtTR_Trk
(muon_feature.
m_PtTR_Trk
)
35
,
m_EtaTR_Trk
(muon_feature.
m_EtaTR_Trk
)
36
,
m_PhiTR_Trk
(muon_feature.
m_PhiTR_Trk
)
37
,
m_Typ_IDTrk
(muon_feature.
m_Typ_IDTrk
)
38
,
m_TileMuOutput
(muon_feature.
m_TileMuOutput
)
39
,
m_IDScanOutput
(muon_feature.
m_IDScanOutput
)
40
{
41
}
42
43
TileTrackMuFeature
&
44
TileTrackMuFeature::operator=
(
TileTrackMuFeature
&& muon_feature)
noexcept
45
{
46
if
(
this
!= &muon_feature) {
47
m_PtTR_Trk
= muon_feature.m_PtTR_Trk;
48
m_EtaTR_Trk
= muon_feature.m_EtaTR_Trk;
49
m_PhiTR_Trk
= muon_feature.m_PhiTR_Trk;
50
m_Typ_IDTrk
= muon_feature.m_Typ_IDTrk;
51
m_TileMuOutput
= std::move(muon_feature.m_TileMuOutput);
52
m_IDScanOutput
= std::move(muon_feature.m_IDScanOutput);
53
}
54
return
*
this
;
55
}
56
57
59
TileTrackMuFeature
&
60
TileTrackMuFeature::operator=
(
const
TileTrackMuFeature
& muon_feature) {
61
if
(
this
!= &muon_feature) {
62
m_PtTR_Trk
= muon_feature.
m_PtTR_Trk
;
63
m_EtaTR_Trk
= muon_feature.
m_EtaTR_Trk
;
64
m_PhiTR_Trk
= muon_feature.
m_PhiTR_Trk
;
65
m_Typ_IDTrk
= muon_feature.
m_Typ_IDTrk
;
66
m_TileMuOutput
= muon_feature.
m_TileMuOutput
;
67
m_IDScanOutput
= muon_feature.
m_IDScanOutput
;
68
}
69
return
*
this
;
70
}
71
73
74
std::string
str
(
const
TileTrackMuFeature
& d )
75
{
76
std::stringstream
ss
;
77
78
ss
<<
"EtaTR_Trk: "
<< d.EtaTR_Trk()
79
<<
"; PhiTR_Trk: "
<< d.PhiTR_Trk()
80
<<
"; PtTR_Trk: "
<< d.PtTR_Trk();
81
82
return
ss
.str();
83
}
84
85
const
TileMuFeature
*
86
TileTrackMuFeature::TileMuOutput
()
const
{
return
*
m_TileMuOutput
; }
87
88
const
TrigInDetTrack
*
89
TileTrackMuFeature::IDScanOutput
()
const
{
return
*
m_IDScanOutput
; }
90
const
ElementLink<TileMuFeatureContainer>
&
91
TileTrackMuFeature::TileMuLink
()
const
{
92
return
m_TileMuOutput
;
93
}
94
const
ElementLink<TrigInDetTrackCollection>
&
95
TileTrackMuFeature::IDScanLink
()
const
{
96
return
m_IDScanOutput
;
97
}
98
MsgStream&
operator<<
( MsgStream& m,
const
TileTrackMuFeature
& d )
99
{
100
return
( m <<
str
( d ) );
101
}
102
103
bool
operator==
(
const
TileTrackMuFeature
&
a
,
const
TileTrackMuFeature
& b )
104
{
105
if
( std::abs(
a
.EtaTR_Trk() - b.EtaTR_Trk() ) >
DELTA
)
return
false
;
106
if
( std::abs(
a
.PhiTR_Trk() - b.PhiTR_Trk() ) >
DELTA
)
return
false
;
107
if
( std::abs(
a
.PtTR_Trk() - b.PtTR_Trk() ) >
DELTA
)
return
false
;
108
109
return
true
;
110
}
111
112
void
diff
(
const
TileTrackMuFeature
&
a
,
const
TileTrackMuFeature
& b, std::map< std::string, double >& variableChange )
113
{
114
if
( std::abs(
a
.EtaTR_Trk() - b.EtaTR_Trk() ) >
DELTA
) {
115
variableChange[
"EtaTR_Trk"
] =
a
.EtaTR_Trk() - b.EtaTR_Trk();
116
}
117
if
( std::abs(
a
.PhiTR_Trk() - b.PhiTR_Trk() ) >
DELTA
) {
118
variableChange[
"PhiTR_Trk"
] =
a
.PhiTR_Trk() - b.PhiTR_Trk();
119
}
120
if
( std::abs(
a
.PtTR_Trk() - b.PtTR_Trk() ) >
DELTA
) {
121
variableChange[
"PtTR_Trk"
] =
a
.PtTR_Trk() - b.PtTR_Trk();
122
}
123
124
return
;
125
}
DELTA
static const double DELTA
Definition
CombinedMuonFeature.cxx:19
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
operator<<
MsgStream & operator<<(MsgStream &m, const TileTrackMuFeature &d)
Helper operator for printing the object.
Definition
TileTrackMuFeature.cxx:98
diff
void diff(const TileTrackMuFeature &a, const TileTrackMuFeature &b, std::map< std::string, double > &variableChange)
Comparison with feedback.
Definition
TileTrackMuFeature.cxx:112
operator==
bool operator==(const TileTrackMuFeature &a, const TileTrackMuFeature &b)
Operator comparing two CombinedMuonFeature objects for equality.
Definition
TileTrackMuFeature.cxx:103
TileTrackMuFeature.h
ElementLink
ElementLink implementation for ROOT usage.
Definition
A/AthLinks/ElementLink.h:40
P4PtEtaPhiMBase
P4PtEtaPhiMBase is a base class for classes with 4-momentum behavior, for which pt,...
Definition
P4PtEtaPhiMBase.h:26
TileMuFeature
Definition
TileMuFeature.h:33
TileTrackMuFeature
Definition
TileTrackMuFeature.h:44
TileTrackMuFeature::m_PhiTR_Trk
float m_PhiTR_Trk
Definition
TileTrackMuFeature.h:92
TileTrackMuFeature::TileMuLink
const ElementLink< TileMuFeatureContainer > & TileMuLink() const
Definition
TileTrackMuFeature.cxx:91
TileTrackMuFeature::IDScanOutput
const TrigInDetTrack * IDScanOutput() const
Definition
TileTrackMuFeature.cxx:89
TileTrackMuFeature::m_Typ_IDTrk
int m_Typ_IDTrk
Definition
TileTrackMuFeature.h:93
TileTrackMuFeature::IDScanLink
const ElementLink< TrigInDetTrackCollection > & IDScanLink() const
Definition
TileTrackMuFeature.cxx:95
TileTrackMuFeature::m_TileMuOutput
ElementLink< TileMuFeatureContainer > m_TileMuOutput
Definition
TileTrackMuFeature.h:95
TileTrackMuFeature::operator=
TileTrackMuFeature & operator=(TileTrackMuFeature &&muon_feature) noexcept
Move assignment.
Definition
TileTrackMuFeature.cxx:44
TileTrackMuFeature::m_EtaTR_Trk
float m_EtaTR_Trk
Definition
TileTrackMuFeature.h:91
TileTrackMuFeature::TileTrackMuFeature
TileTrackMuFeature()=default
Constructor.
TileTrackMuFeature::m_IDScanOutput
ElementLink< TrigInDetTrackCollection > m_IDScanOutput
Definition
TileTrackMuFeature.h:96
TileTrackMuFeature::PhiTR_Trk
double PhiTR_Trk() const
Definition
TileTrackMuFeature.h:74
TileTrackMuFeature::m_PtTR_Trk
float m_PtTR_Trk
Definition
TileTrackMuFeature.h:90
TileTrackMuFeature::EtaTR_Trk
double EtaTR_Trk() const
Definition
TileTrackMuFeature.h:73
TileTrackMuFeature::TileMuOutput
const TileMuFeature * TileMuOutput() const
Definition
TileTrackMuFeature.cxx:86
TileTrackMuFeature::Typ_IDTrk
int Typ_IDTrk() const
Definition
TileTrackMuFeature.h:75
TileTrackMuFeature::PtTR_Trk
double PtTR_Trk() const
Override pure virtual methods.
Definition
TileTrackMuFeature.h:72
TrigInDetTrack
represents a LVL2 ID track
Definition
TrigInDetTrack.h:34
str
Definition
BTagTrackIpAccessor.cxx:11
Generated on
for ATLAS Offline Software by
1.17.0