ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::VertexPositions Class Reference

VertexPositions class to represent and store a vertex. More...

#include <VertexPositions.h>

Inheritance diagram for Trk::VertexPositions:
Collaboration diagram for Trk::VertexPositions:

Public Member Functions

 VertexPositions ()
 default constructor
 VertexPositions (const Amg::VectorX &p)
 constructor with variable-size vector
 VertexPositions (const VertexPositions &)=default
 copy constructor
 VertexPositions (VertexPositions &&)=default
 move constructor
VertexPositionsoperator= (const VertexPositions &)=default
 Assignment operator.
VertexPositionsoperator= (VertexPositions &&)=default
 move Assignment operator
virtual ~VertexPositions ()=default
virtual MsgStream & dump (MsgStream &sl) const
 Output Method for MsgStream, to be overloaded by child classes.
virtual std::ostream & dump (std::ostream &sl) const
 Output Method for std::ostream, to be overloaded by child classes.
const Amg::VectorXposition () const
 return position of vertex
void setPosition (const Amg::VectorX &)

Static Public Member Functions

static std::size_t numberOfInstantiations ()

Static Public Attributes

static std::atomic_size_t s_numberOfInstantiations

Protected Attributes

Amg::VectorX m_position
 vertex position
bool m_useWeightTimesPosition

Detailed Description

VertexPositions class to represent and store a vertex.

Definition at line 27 of file VertexPositions.h.

Constructor & Destructor Documentation

◆ VertexPositions() [1/4]

Trk::VertexPositions::VertexPositions ( )

default constructor

Definition at line 20 of file VertexPositions.cxx.

21 : Trk::ObjectCounter<Trk::VertexPositions>()
24{
25 m_position.setZero();
26}
Amg::VectorX m_position
vertex position
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.

◆ VertexPositions() [2/4]

Trk::VertexPositions::VertexPositions ( const Amg::VectorX & p)

constructor with variable-size vector

Definition at line 28 of file VertexPositions.cxx.

29 : Trk::ObjectCounter<Trk::VertexPositions>()
30 , m_position(p)
32{
33}

◆ VertexPositions() [3/4]

Trk::VertexPositions::VertexPositions ( const VertexPositions & )
default

copy constructor

◆ VertexPositions() [4/4]

Trk::VertexPositions::VertexPositions ( VertexPositions && )
default

move constructor

◆ ~VertexPositions()

virtual Trk::VertexPositions::~VertexPositions ( )
virtualdefault

Member Function Documentation

◆ dump() [1/2]

MsgStream & Trk::VertexPositions::dump ( MsgStream & sl) const
virtual

Output Method for MsgStream, to be overloaded by child classes.

Reimplemented in Trk::RecVertexPositions.

Definition at line 36 of file VertexPositions.cxx.

37{
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}
#define endmsg
@ jet_zv
position x,y,z of primary vertex

◆ dump() [2/2]

std::ostream & Trk::VertexPositions::dump ( std::ostream & sl) const
virtual

Output Method for std::ostream, to be overloaded by child classes.

Reimplemented in Trk::RecVertexPositions.

Definition at line 55 of file VertexPositions.cxx.

56{
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}

◆ numberOfInstantiations()

std::size_t Trk::ObjectCounter< Trk::VertexPositions >::numberOfInstantiations ( )
inlinestaticinherited

Definition at line 25 of file TrkObjectCounter.h.

26 {
27#ifndef NDEBUG
28 return s_numberOfInstantiations.load();
29#endif
30 return 0;
31 }
Helper to enable counting number of instantiations in debug builds.

◆ operator=() [1/2]

VertexPositions & Trk::VertexPositions::operator= ( const VertexPositions & )
default

Assignment operator.

◆ operator=() [2/2]

VertexPositions & Trk::VertexPositions::operator= ( VertexPositions && )
default

move Assignment operator

◆ position()

const Amg::VectorX & Trk::VertexPositions::position ( ) const

return position of vertex

Definition at line 86 of file VertexPositions.cxx.

87{
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}

◆ setPosition()

void Trk::VertexPositions::setPosition ( const Amg::VectorX & newposition)

Definition at line 100 of file VertexPositions.cxx.

101{
102 m_position = newposition;
103}

Member Data Documentation

◆ m_position

Amg::VectorX Trk::VertexPositions::m_position
protected

vertex position

Definition at line 48 of file VertexPositions.h.

◆ m_useWeightTimesPosition

bool Trk::VertexPositions::m_useWeightTimesPosition
protected

Definition at line 49 of file VertexPositions.h.

◆ s_numberOfInstantiations

std::atomic_size_t Trk::ObjectCounter< Trk::VertexPositions >::s_numberOfInstantiations
inlinestaticinherited

Definition at line 22 of file TrkObjectCounter.h.


The documentation for this class was generated from the following files: