ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagInfo
src
IPTrackInfo.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/IPTrackInfo.h
"
6
#include "
Particle/TrackParticle.h
"
7
#include "
Particle/TrackParticleContainer.h
"
8
#include "GaudiKernel/MsgStream.h"
9
#include <iostream>
10
11
namespace
Analysis
{
12
13
IPTrackInfo::IPTrackInfo
() :
14
m_track
(
ElementLink
<
Rec
::TrackParticleContainer>()),
15
m_trackGrade
(),
16
m_isFromV0
(false),
17
m_valD0wrtPV
(0),
18
m_sigD0wrtPV
(0),
19
m_valZ0wrtPV
(0),
20
m_sigZ0wrtPV
(0),
21
m_trackWeight2D
(0),
22
m_trackWeight3D
(0),
23
m_trackProbJP
(0),
24
m_trackProbJPneg
(0)
25
{
26
}
27
28
IPTrackInfo::IPTrackInfo
(
const
Rec::TrackParticleContainer
* coll,
29
const
Rec::TrackParticle
* trk,
30
const
TrackGrade
& grade,
31
bool
isFromV0
,
32
double
d0val,
double
d0sig,
33
double
z0val,
double
z0sig)
34
:
m_trackWeight2D
(0),
35
m_trackWeight3D
(0),
36
m_trackProbJP
(0),
37
m_trackProbJPneg
(0)
38
{
39
ElementLink<Rec::TrackParticleContainer>
link;
40
if
( link.
toContainedElement
(*coll,
const_cast<
Rec::TrackParticle
*
>
(trk)) ) {
41
m_track = link;
42
}
43
m_trackGrade
= grade;
44
m_isFromV0
=
isFromV0
;
45
m_valD0wrtPV
= d0val;
46
m_sigD0wrtPV
= d0sig;
47
m_valZ0wrtPV
= z0val;
48
m_sigZ0wrtPV
= z0sig;
49
}
50
51
IPTrackInfo::IPTrackInfo
(
const
ElementLink<Rec::TrackParticleContainer>
&
track
,
52
const
TrackGrade
& grade,
53
bool
isFromV0
,
54
double
d0val,
double
d0sig,
55
double
z0val,
double
z0sig)
56
:
m_track
(
track
),
57
m_trackGrade
(grade),
58
m_isFromV0
(
isFromV0
),
59
m_valD0wrtPV
(d0val),
60
m_sigD0wrtPV
(d0sig),
61
m_valZ0wrtPV
(z0val),
62
m_sigZ0wrtPV
(z0sig),
63
m_trackWeight2D
(0),
64
m_trackWeight3D
(0),
65
m_trackProbJP
(0),
66
m_trackProbJPneg
(0)
67
{
68
}
69
70
const
Rec::TrackParticle
*
IPTrackInfo::track
()
const
{
71
if
(
m_track
.isValid() ) {
72
return
*(
m_track
);
73
}
else
{
74
return
0;
75
}
76
}
77
78
MsgStream&
operator<<
( MsgStream& out,
const
IPTrackInfo
& info) {
79
const
Rec::TrackParticle
* tp = info.track();
80
double
phi
= 0.;
81
double
d0 = 0.;
82
double
pt = 0.;
83
double
eta
= 0.;
84
if
(tp) {
85
phi
= tp->measuredPerigee()->parameters()[
Trk::phi
];
86
d0 = tp->measuredPerigee()->parameters()[
Trk::d0
];
87
pt = tp->pt();
88
eta
= tp->eta();
89
}
90
out <<
" -> IPTrackInfo "
91
<<
" grade= "
<< info.trackGrade().gradeString()
92
<<
" fromV0= "
<< info.isFromV0()
93
<<
" d0wrtPV= "
<< info.d0Value() <<
" S="
<< info.d0Significance()
94
<<
" z0wrtPV= "
<< info.z0Value() <<
" S="
<< info.z0Significance()
95
<<
" original pt,eta,phi,d0 = "
<<pt<<
" "
<<
eta
<<
" "
<<
phi
<<
" "
<<d0
96
<<
" weight2D= "
<< info.trackWeight2D()
97
<<
" weight3D= "
<< info.trackWeight3D()
98
<<
" probJP= "
<< info.trackProbJP()
99
<<
" probJPneg= "
<< info.trackProbJPneg()
100
<<
endmsg
;
101
return
out;
102
}
103
104
std::ostream&
operator<<
( std::ostream& out,
const
IPTrackInfo
& info) {
105
const
Rec::TrackParticle
* tp = info.track();
106
double
phi
= 0.;
107
double
d0 = 0.;
108
double
pt = 0.;
109
double
eta
= 0.;
110
if
(tp) {
111
phi
= tp->measuredPerigee()->parameters()[
Trk::phi
];
112
d0 = tp->measuredPerigee()->parameters()[
Trk::d0
];
113
pt = tp->pt();
114
eta
= tp->eta();
115
}
116
out <<
" -> IPTrackInfo "
117
<<
" grade= "
<< info.trackGrade().gradeString()
118
<<
" fromV0= "
<< info.isFromV0()
119
<<
" d0wrtPV= "
<< info.d0Value() <<
" S="
<< info.d0Significance()
120
<<
" z0wrtPV= "
<< info.z0Value() <<
" S="
<< info.z0Significance()
121
<<
" original pt,eta,phi,d0 = "
<<pt<<
" "
<<
eta
<<
" "
<<
phi
<<
" "
<<d0
122
<<
" weight2D= "
<< info.trackWeight2D()
123
<<
" weight3D= "
<< info.trackWeight3D()
124
<<
" probJP= "
<< info.trackProbJP()
125
<<
" probJPneg= "
<< info.trackProbJPneg()
126
<< std::endl;
127
return
out;
128
}
129
130
}
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:63
IPTrackInfo.h
TrackParticleContainer.h
TrackParticle.h
Analysis::IPTrackInfo
Definition
IPTrackInfo.h:18
Analysis::IPTrackInfo::m_track
ElementLink< Rec::TrackParticleContainer > m_track
Definition
IPTrackInfo.h:51
Analysis::IPTrackInfo::track
const Rec::TrackParticle * track() const
Definition
IPTrackInfo.cxx:70
Analysis::IPTrackInfo::m_trackProbJP
double m_trackProbJP
Definition
IPTrackInfo.h:60
Analysis::IPTrackInfo::IPTrackInfo
IPTrackInfo()
Definition
IPTrackInfo.cxx:13
Analysis::IPTrackInfo::m_trackGrade
TrackGrade m_trackGrade
Definition
IPTrackInfo.h:52
Analysis::IPTrackInfo::m_isFromV0
bool m_isFromV0
Definition
IPTrackInfo.h:53
Analysis::IPTrackInfo::m_trackWeight3D
double m_trackWeight3D
Definition
IPTrackInfo.h:59
Analysis::IPTrackInfo::m_valZ0wrtPV
double m_valZ0wrtPV
Definition
IPTrackInfo.h:56
Analysis::IPTrackInfo::m_trackWeight2D
double m_trackWeight2D
Definition
IPTrackInfo.h:58
Analysis::IPTrackInfo::isFromV0
bool isFromV0() const
Definition
IPTrackInfo.h:40
Analysis::IPTrackInfo::m_trackProbJPneg
double m_trackProbJPneg
Definition
IPTrackInfo.h:61
Analysis::IPTrackInfo::m_valD0wrtPV
double m_valD0wrtPV
Definition
IPTrackInfo.h:54
Analysis::IPTrackInfo::m_sigZ0wrtPV
double m_sigZ0wrtPV
Definition
IPTrackInfo.h:57
Analysis::IPTrackInfo::m_sigD0wrtPV
double m_sigD0wrtPV
Definition
IPTrackInfo.h:55
Analysis::TrackGrade
Definition
TrackGrade.h:11
ElementLink
ElementLink implementation for ROOT usage.
Definition
AthLinks/ElementLink.h:123
ElementLink::toContainedElement
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
Rec::TrackParticleContainer
Definition
Reconstruction/Particle/Particle/TrackParticleContainer.h:33
Rec::TrackParticle
Definition
Reconstruction/Particle/Particle/TrackParticle.h:47
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
Rec
Gaudi Tools.
Definition
FakeTrackBuilder.h:10
Trk::phi
@ phi
Definition
ParamDefs.h:75
Trk::d0
@ d0
Definition
ParamDefs.h:63
Generated on
for ATLAS Offline Software by
1.14.0