ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkEvent
VxJetVertex
src
VertexPositions.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
/***************************************************************************
6
VertexPositions.cxx - Description
7
-------------------
8
begin : Autumn 2006
9
authors : Giacinto Piacquadio (Freiburg University)
10
email : Giacinto.Piacquadio@physik.uni-freiburg.de
11
comments:
12
changes :
13
14
***************************************************************************/
15
16
#include "
VxJetVertex/VertexPositions.h
"
17
18
namespace
Trk
{
19
20
VertexPositions::VertexPositions
()
21
:
Trk
::
ObjectCounter
<
Trk
::
VertexPositions
>()
22
,
m_position
(
Amg
::VectorX())
23
,
m_useWeightTimesPosition
(false)
24
{
25
m_position
.setZero();
26
}
27
28
VertexPositions::VertexPositions
(
const
Amg::VectorX
& p)
29
:
Trk
::
ObjectCounter
<
Trk
::
VertexPositions
>()
30
,
m_position
(p)
31
,
m_useWeightTimesPosition
(false)
32
{
33
}
34
35
MsgStream&
36
VertexPositions::dump
(MsgStream& sl)
const
37
{
38
if
(
m_useWeightTimesPosition
) {
39
sl <<
"Trk::VertexPositions weight times position: ("
;
40
}
else
{
41
sl <<
"Trk::VertexPositions position: ("
;
42
}
43
sl <<
"xv "
<<
m_position
[
jet_xv
] <<
", "
44
<<
"yv "
<<
m_position
[
jet_yv
] <<
", "
45
<<
"zv "
<<
m_position
[
jet_zv
] <<
", "
46
<<
"phi "
<<
m_position
[
jet_phi
] <<
", "
47
<<
"theta "
<<
m_position
[
jet_theta
] <<
endmsg
;
48
for
(
int
i = 5; i <
m_position
.rows(); i++) {
49
sl <<
"dist"
<< i <<
" "
<<
m_position
[i] <<
" ."
<<
endmsg
;
50
}
51
return
sl;
52
}
53
54
std::ostream&
55
VertexPositions::dump
(std::ostream& sl)
const
56
{
57
if
(
m_useWeightTimesPosition
) {
58
sl <<
"Trk::VertexPositions weight times position: ("
;
59
}
else
{
60
sl <<
"Trk::VertexPositions position: ("
;
61
}
62
sl <<
"xv "
<<
m_position
[
jet_xv
] <<
", "
63
<<
"yv "
<<
m_position
[
jet_yv
] <<
", "
64
<<
"zv "
<<
m_position
[
jet_zv
] <<
", "
65
<<
"phi "
<<
m_position
[
jet_phi
] <<
", "
66
<<
"theta "
<<
m_position
[
jet_theta
] << std::endl;
67
for
(
int
i = 5; i <
m_position
.rows(); i++) {
68
sl <<
"dist"
<< i <<
" "
<<
m_position
[i] <<
" ."
<< std::endl;
69
}
70
return
sl;
71
}
72
73
MsgStream&
74
operator<<
(MsgStream& sl,
const
VertexPositions
& sf)
75
{
76
return
sf.dump(sl);
77
}
78
79
std::ostream&
80
operator<<
(std::ostream& sl,
const
VertexPositions
& sf)
81
{
82
return
sf.dump(sl);
83
}
84
85
const
Amg::VectorX
&
86
VertexPositions::position
()
const
87
{
88
if
(!
m_useWeightTimesPosition
) {
89
return
m_position
;
90
}
91
std::cout <<
"FATAL: VertexPositions is not able to return a valid position "
92
<<
" as a const object: need to go from Update to Use mode. "
93
"Unrecovered Bug!"
94
<< std::endl;
95
std::abort();
96
// return m_position;
97
}
98
99
void
100
VertexPositions::setPosition
(
const
Amg::VectorX
& newposition)
101
{
102
m_position
= newposition;
103
}
104
}
// end of namespace
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:61
VertexPositions.h
Trk::ObjectCounter< Trk::VertexPositions >::ObjectCounter
ObjectCounter()
Definition
TrkObjectCounter.h:36
Trk::VertexPositions
VertexPositions class to represent and store a vertex.
Definition
VertexPositions.h:28
Trk::VertexPositions::VertexPositions
VertexPositions()
default constructor
Definition
VertexPositions.cxx:20
Trk::VertexPositions::setPosition
void setPosition(const Amg::VectorX &)
Definition
VertexPositions.cxx:100
Trk::VertexPositions::m_position
Amg::VectorX m_position
vertex position
Definition
VertexPositions.h:48
Trk::VertexPositions::position
const Amg::VectorX & position() const
return position of vertex
Definition
VertexPositions.cxx:86
Trk::VertexPositions::dump
virtual MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
Definition
VertexPositions.cxx:36
Trk::VertexPositions::m_useWeightTimesPosition
bool m_useWeightTimesPosition
Definition
VertexPositions.h:49
Amg
Definition of ATLAS Math & Geometry primitives (Amg).
Definition
AmgStringHelpers.h:19
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition
EventPrimitives.h:30
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition
AlignModule.cxx:204
Trk::jet_theta
@ jet_theta
Definition
JetVtxParamDefs.h:28
Trk::jet_phi
@ jet_phi
Definition
JetVtxParamDefs.h:28
Trk::jet_xv
@ jet_xv
Definition
JetVtxParamDefs.h:27
Trk::jet_zv
@ jet_zv
position x,y,z of primary vertex
Definition
JetVtxParamDefs.h:27
Trk::jet_yv
@ jet_yv
Definition
JetVtxParamDefs.h:27
Generated on
for ATLAS Offline Software by
1.17.0