ATLAS Offline Software
PhysicsAnalysis
JetTagging
JetTagInfo
src
SETrackInfo.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
JetTagInfo/SETrackInfo.h
"
6
#include "GaudiKernel/MsgStream.h"
7
#include <iostream>
8
9
namespace
Analysis
{
10
11
SETrackInfo::SETrackInfo
() : m_electron(
ElementLink
<
ElectronContainer
>()),
12
m_photon(
ElementLink
<
PhotonContainer
>()),
13
m_valD0wrtPV(0),
14
m_pTrel(0)
15
{
16
}
17
18
SETrackInfo::SETrackInfo
(
const
ElectronContainer
* coll,
19
const
Electron
*
mu
,
20
double
d0val,
21
double
pTrel,
22
const
std::vector<double>& tagLikelihood) {
23
ElementLink<ElectronContainer>
link;
24
if
( link.
toContainedElement
(*coll,
const_cast<
Electron
*
>
(
mu
)) ) {
25
m_electron
= link;
26
}
27
m_valD0wrtPV
= d0val;
28
m_pTrel
=
pTrel
;
29
m_tagLikelihood
=
tagLikelihood
;
30
}
31
32
SETrackInfo::SETrackInfo
(
const
PhotonContainer
* coll,
33
const
Photon
*
mu
,
34
double
d0val,
35
double
pTrel,
36
const
std::vector<double>& tagLikelihood) {
37
ElementLink<PhotonContainer>
link;
38
if
( link.
toContainedElement
(*coll,
const_cast<
Photon
*
>
(
mu
)) ) {
39
m_photon
= link;
40
}
41
m_valD0wrtPV
= d0val;
42
m_pTrel
=
pTrel
;
43
m_tagLikelihood
=
tagLikelihood
;
44
}
45
46
SETrackInfo::SETrackInfo
(
const
ElementLink<ElectronContainer>
& eleLink,
47
double
d0val,
48
double
pTrel,
49
std::vector<double>&& tagLikelihood)
50
: m_electron (eleLink),
51
m_valD0wrtPV (d0val),
52
m_pTrel (pTrel),
53
m_tagLikelihood (std::move (tagLikelihood))
54
{
55
}
56
57
SETrackInfo::SETrackInfo
(
const
ElementLink<PhotonContainer>
& gamLink,
58
double
d0val,
59
double
pTrel,
60
std::vector<double>&& tagLikelihood)
61
: m_photon (gamLink),
62
m_valD0wrtPV (d0val),
63
m_pTrel (pTrel),
64
m_tagLikelihood (std::move (tagLikelihood))
65
{
66
}
67
68
const
egamma
*
SETrackInfo::electron
()
const
{
69
if
(
m_electron
.
isValid
() ) {
70
return
*(
m_electron
);
71
}
else
if
(
m_photon
.
isValid
() ) {
72
return
*(
m_photon
);
73
}
else
{
74
return
0;
75
}
76
}
77
78
bool
SETrackInfo::isPhoton
()
const
{
79
if
(
m_photon
.
isValid
() )
return
true
;
80
return
false
;
81
}
82
83
MsgStream&
operator<<
( MsgStream&
out
,
const
SETrackInfo
&
info
) {
84
const
egamma
*
tp
=
info
.electron();
85
double
phi = 0.;
86
double
ipt = 0.;
87
double
cth = 0.;
88
if
(
tp
) {
89
phi =
tp
->phi();
90
ipt =
tp
->iPt();
91
cth =
tp
->cotTh();
92
}
93
out
<<
" -> SETrackInfo "
94
<<
" isPhoton = "
<<
info
.isPhoton()
95
<<
" d0wrtPV= "
<<
info
.d0Value()
96
<<
" original 1/pt,phi,cotTh = "
<<ipt<<
" "
<<phi<<
" "
<<cth
97
<<
" pTrel= "
<<
info
.pTrel()
98
<<
endmsg
;
99
return
out
;
100
}
101
102
std::ostream&
operator<<
( std::ostream&
out
,
const
SETrackInfo
&
info
) {
103
const
egamma
*
tp
=
info
.electron();
104
double
phi = 0.;
105
double
ipt = 0.;
106
double
cth = 0.;
107
if
(
tp
) {
108
phi =
tp
->phi();
109
ipt =
tp
->iPt();
110
cth =
tp
->cotTh();
111
}
112
out
<<
" -> SETrackInfo "
113
<<
" isPhoton = "
<<
info
.isPhoton()
114
<<
" d0wrtPV= "
<<
info
.d0Value()
115
<<
" original 1/pt,phi,cotTh = "
<<ipt<<
" "
<<phi<<
" "
<<cth
116
<<
" pTrel= "
<<
info
.pTrel()
117
<< std::endl;
118
return
out
;
119
}
120
121
}
grepfile.info
info
Definition:
grepfile.py:38
Analysis::SETrackInfo::isPhoton
bool isPhoton() const
Definition:
SETrackInfo.cxx:78
ElementLink::toContainedElement
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
Analysis::SETrackInfo::m_pTrel
double m_pTrel
Definition:
SETrackInfo.h:52
Analysis::SETrackInfo::m_photon
ElementLink< PhotonContainer > m_photon
Definition:
SETrackInfo.h:50
Analysis::SETrackInfo::tagLikelihood
const std::vector< double > & tagLikelihood() const
Definition:
SETrackInfo.h:45
Analysis::SETrackInfo::m_electron
ElementLink< ElectronContainer > m_electron
Definition:
SETrackInfo.h:49
Analysis::Electron
Definition:
Reconstruction/egamma/egammaEvent/egammaEvent/Electron.h:20
python.AthDsoLogger.out
out
Definition:
AthDsoLogger.py:71
ParticleTest.tp
tp
Definition:
ParticleTest.py:25
Analysis::SETrackInfo::pTrel
double pTrel() const
Definition:
SETrackInfo.h:44
Analysis::Photon
Definition:
Reconstruction/egamma/egammaEvent/egammaEvent/Photon.h:20
ElementLink::isValid
bool isValid() const
Test to see if the link can be dereferenced.
Analysis::SETrackInfo::SETrackInfo
SETrackInfo()
Definition:
SETrackInfo.cxx:11
PhotonContainer
Definition:
Reconstruction/egamma/egammaEvent/egammaEvent/PhotonContainer.h:30
egamma
Definition:
egamma.h:58
Analysis::SETrackInfo::m_tagLikelihood
std::vector< double > m_tagLikelihood
vector to hold the taglikelihood (signal plus N background)
Definition:
SETrackInfo.h:53
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
ElementLink
ElementLink implementation for ROOT usage.
Definition:
AthLinks/ElementLink.h:121
SETrackInfo.h
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition:
BTaggingCnvAlg.h:20
Analysis::SETrackInfo
Definition:
SETrackInfo.h:20
Analysis::SETrackInfo::m_valD0wrtPV
double m_valD0wrtPV
Definition:
SETrackInfo.h:51
ElectronContainer
Definition:
Reconstruction/egamma/egammaEvent/egammaEvent/ElectronContainer.h:32
Analysis::operator<<
MsgStream & operator<<(MsgStream &out, const IPInfoBase &)
output.
Definition:
IPInfoBase.cxx:47
CaloNoise_fillDB.mu
mu
Definition:
CaloNoise_fillDB.py:53
Analysis::SETrackInfo::electron
const egamma * electron() const
Definition:
SETrackInfo.cxx:68
Generated on Thu Nov 7 2024 21:25:53 for ATLAS Offline Software by
1.8.18