ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagInfo
src
SMTrackInfo.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/SMTrackInfo.h
"
6
#include "GaudiKernel/MsgStream.h"
7
#include <iostream>
8
9
namespace
Analysis
{
10
11
SMTrackInfo::SMTrackInfo
()
12
:
m_muon
(
ElementLink
<
MuonContainer
>()),
13
m_valD0wrtPV
(0),
14
m_pTrel
(0)
15
{
16
}
17
18
SMTrackInfo::SMTrackInfo
(
const
MuonContainer
* coll,
19
const
Muon
* mu,
20
double
d0val,
21
double
pTrel
,
22
const
std::vector<double>&
tagLikelihood
) {
23
ElementLink<MuonContainer>
link;
24
if
( link.toContainedElement(*coll,
const_cast<
Muon
*
>
(mu)) ) {
25
m_muon
= link;
26
}
27
m_valD0wrtPV
= d0val;
28
m_pTrel
=
pTrel
;
29
m_tagLikelihood
=
tagLikelihood
;
30
}
31
32
SMTrackInfo::SMTrackInfo
(
const
ElementLink<MuonContainer>
&
muonLink
,
33
double
d0val,
34
double
pTrel
,
35
std::vector<double>&&
tagLikelihood
)
36
:
m_muon
(
muonLink
),
37
m_valD0wrtPV
(d0val),
38
m_pTrel
(
pTrel
),
39
m_tagLikelihood
(
std
::move (
tagLikelihood
))
40
{
41
}
42
43
const
Muon
*
SMTrackInfo::muon
()
const
{
44
if
(
m_muon
.isValid() ) {
45
return
*(
m_muon
);
46
}
else
{
47
return
0;
48
}
49
}
50
51
MsgStream&
operator<<
( MsgStream& out,
const
SMTrackInfo
& info) {
52
const
Muon
* tp = info.muon();
53
double
phi
= 0.;
54
double
ipt = 0.;
55
double
cth = 0.;
56
if
(tp) {
57
phi
= tp->
phi
();
58
ipt = tp->
iPt
();
59
cth = tp->
cotTh
();
60
}
61
out <<
" -> SMTrackInfo "
62
<<
" d0wrtPV= "
<< info.d0Value()
63
<<
" original 1/pt,phi,cotTh = "
<<ipt<<
" "
<<
phi
<<
" "
<<cth
64
<<
" pTrel= "
<< info.pTrel()
65
<<
endmsg
;
66
return
out;
67
}
68
69
std::ostream&
operator<<
( std::ostream& out,
const
SMTrackInfo
& info) {
70
const
Muon
* tp = info.muon();
71
double
phi
= 0.;
72
double
ipt = 0.;
73
double
cth = 0.;
74
if
(tp) {
75
phi
= tp->
phi
();
76
ipt = tp->
iPt
();
77
cth = tp->
cotTh
();
78
}
79
out <<
" -> SMTrackInfo "
80
<<
" d0wrtPV= "
<< info.d0Value()
81
<<
" original 1/pt,phi,cotTh = "
<<ipt<<
" "
<<
phi
<<
" "
<<cth
82
<<
" pTrel= "
<< info.pTrel()
83
<< std::endl;
84
return
out;
85
}
86
87
}
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:63
SMTrackInfo.h
Analysis::MuonContainer
definition of StoreGate container holding a vector of Analysis::Muon
Definition
Reconstruction/MuonIdentification/muonEvent/muonEvent/MuonContainer.h:38
Analysis::SMTrackInfo
Definition
SMTrackInfo.h:17
Analysis::SMTrackInfo::m_tagLikelihood
std::vector< double > m_tagLikelihood
vector to hold the taglikelihood (signal plus N background)
Definition
SMTrackInfo.h:38
Analysis::SMTrackInfo::tagLikelihood
const std::vector< double > & tagLikelihood() const
Definition
SMTrackInfo.h:33
Analysis::SMTrackInfo::m_valD0wrtPV
double m_valD0wrtPV
Definition
SMTrackInfo.h:36
Analysis::SMTrackInfo::muonLink
const ElementLink< MuonContainer > & muonLink() const
Definition
SMTrackInfo.h:30
Analysis::SMTrackInfo::m_pTrel
double m_pTrel
Definition
SMTrackInfo.h:37
Analysis::SMTrackInfo::SMTrackInfo
SMTrackInfo()
Definition
SMTrackInfo.cxx:11
Analysis::SMTrackInfo::pTrel
double pTrel() const
Definition
SMTrackInfo.h:32
Analysis::SMTrackInfo::muon
const Muon * muon() const
Definition
SMTrackInfo.cxx:43
Analysis::SMTrackInfo::m_muon
ElementLink< MuonContainer > m_muon
Definition
SMTrackInfo.h:35
ElementLink
ElementLink implementation for ROOT usage.
Definition
A/AthLinks/ElementLink.h:39
ParticleImpl::cotTh
virtual double cotTh() const
cottan theta
Definition
ParticleImpl.h:624
ParticleImpl::iPt
virtual double iPt() const
inverse of transverse momentum
Definition
ParticleImpl.h:564
ParticleImpl::phi
virtual double phi() const
phi in [-pi,pi[
Definition
ParticleImpl.h:524
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition
BTaggingCnvAlg.h:20
Analysis::operator<<
MsgStream & operator<<(MsgStream &out, const IPInfoBase &)
output.
Definition
IPInfoBase.cxx:47
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:45
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.16.1