ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Private Attributes | List of all members
Trk::RecVertexPositions Class Reference

#include <RecVertexPositions.h>

Inheritance diagram for Trk::RecVertexPositions:
Collaboration diagram for Trk::RecVertexPositions:

Public Member Functions

 RecVertexPositions ()
 default constructor, if called initializes a RecVertexPositions with all data members set to 0. More...
 
 RecVertexPositions (const VertexPositions &pos)
 construct a RecVertexPositions from a Vertex. More...
 
 RecVertexPositions (const Amg::VectorX &pos, const Amg::MatrixX &cov, const double ndf=0., const double chi2=0., bool isWeightTimesPosition=false)
 constructs a RecVertexPositions with position, error, ndf, dhi2 and ntrk More...
 
 RecVertexPositions (const Amg::VectorX &pos, const double ndf=0., const double chi2=0.)
 
 RecVertexPositions (const RecVertexPositions &)
 copy constructor More...
 
RecVertexPositionsoperator= (const RecVertexPositions &)
 Assignement operator. More...
 
virtual MsgStream & dump (MsgStream &sl) const
 Output Method for MsgStream, to be overloaded by child classes. More...
 
virtual std::ostream & dump (std::ostream &sl) const
 Output Method for std::ostream, to be overloaded by child classes. More...
 
virtual ~RecVertexPositions ()
 default destructor More...
 
Amg::MatrixX constcovariancePosition () const
 return the covDeltaV matrix of the vertex fit More...
 
void setCovariancePosition (const Amg::MatrixX &)
 
void setFitQuality (const Trk::FitQuality &)
 
const Trk::FitQualityfitQuality () const
 Fit quality access method. More...
 
const Amg::VectorXweightTimesPosition ()
 
void setWeightTimesPosition (const Amg::VectorX &)
 
void finalizePosition ()
 
const Amg::VectorXposition () const
 return position of vertex More...
 
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 More...
 
bool m_useWeightTimesPosition
 

Private Attributes

Amg::MatrixX m_positionError
 cov matrix on vertex position (primary vtx+jet dir+distance) More...
 
Trk::FitQuality m_fitQuality
 

Detailed Description

Definition at line 34 of file RecVertexPositions.h.

Constructor & Destructor Documentation

◆ RecVertexPositions() [1/5]

Trk::RecVertexPositions::RecVertexPositions ( )

default constructor, if called initializes a RecVertexPositions with all data members set to 0.

Definition at line 33 of file RecVertexPositions.cxx.

33  { m_positionError.setZero();}
34 
35 

◆ RecVertexPositions() [2/5]

Trk::RecVertexPositions::RecVertexPositions ( const VertexPositions pos)

construct a RecVertexPositions from a Vertex.

ErrorMatrix will be 0,0,0.

Definition at line 39 of file RecVertexPositions.cxx.

39  {
40  m_useWeightTimesPosition=isWeightTimesPosition;
41  }
42 

◆ RecVertexPositions() [3/5]

Trk::RecVertexPositions::RecVertexPositions ( const Amg::VectorX pos,
const Amg::MatrixX cov,
const double  ndf = 0.,
const double  chi2 = 0.,
bool  isWeightTimesPosition = false 
)

constructs a RecVertexPositions with position, error, ndf, dhi2 and ntrk

Definition at line 45 of file RecVertexPositions.cxx.

47  { m_positionError.setZero();}
48 
50 

◆ RecVertexPositions() [4/5]

Trk::RecVertexPositions::RecVertexPositions ( const Amg::VectorX pos,
const double  ndf = 0.,
const double  chi2 = 0. 
)

Definition at line 53 of file RecVertexPositions.cxx.

53  {
56  } else {

◆ RecVertexPositions() [5/5]

Trk::RecVertexPositions::RecVertexPositions ( const RecVertexPositions )
default

copy constructor

◆ ~RecVertexPositions()

Trk::RecVertexPositions::~RecVertexPositions ( )
virtualdefault

default destructor

Member Function Documentation

◆ covariancePosition()

const Amg::MatrixX & Trk::RecVertexPositions::covariancePosition ( ) const

return the covDeltaV matrix of the vertex fit

Definition at line 171 of file RecVertexPositions.cxx.

◆ dump() [1/2]

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

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

Reimplemented from Trk::VertexPositions.

Definition at line 105 of file RecVertexPositions.cxx.

110  {
111  for (int i=5;i<m_position.rows();i++) {
112  sl << "dist" << i << " " << m_position(i) << "+/-" << sqrt(m_positionError(i,i))<<" , ";
113  }
114  } else {
115  for (int i=5;i<m_position.rows();i++) {
116  sl << "dist corrected" << i << " " << (m_positionError*m_position).eval()(i) << "+/-" << sqrt(m_positionError(i,i))<<" , ";
117  }
118  }
119  sl << endmsg;
120 
121  sl << m_positionError << std::endl;
122  sl << " ndf: " << m_fitQuality.doubleNumberDoF() << "\t chi2: " << m_fitQuality.chiSquared() << endmsg;
123  return sl;
124  }
125 
126  std::ostream& RecVertexPositions::dump(std::ostream& sl) const {
127  // sl << "Trk::RecVertexPositions: " << std::endl;
129  sl << "Trk::VertexPositions weight times position: (" ;
130  } else {
131  sl << "Trk::VertexPositions position: (" ;
132  }
133  sl << "xv " << m_position(jet_xv) << "+/-" <<sqrt(this->covariancePosition()(jet_xv,jet_xv)) << " , "

◆ dump() [2/2]

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

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

Reimplemented from Trk::VertexPositions.

Definition at line 135 of file RecVertexPositions.cxx.

139  {
140  for (int i=5;i<m_position.rows();i++) {
141  sl << "dist" << i << " " << m_position(i) << "+/-" << sqrt(this->covariancePosition()(i,i))<<" , ";
142  }
143  } else {
144  for (int i=5;i<m_position.rows();i++) {
145  sl << "dist corrected" << i << " " << (m_positionError*m_position).eval()(i) << "+/-" << sqrt(m_positionError(i,i))<<" , ";
146  }
147  }
148  sl << std::endl;
149 
151  sl << m_positionError << std::endl;
152  sl << " ndf: " << m_fitQuality.doubleNumberDoF() << "\t chi2: " << m_fitQuality.chiSquared() << std::endl;
153  return sl;
154  }
155 
157 
159  {return m_fitQuality;}
160 
161 
163  {return m_positionError; }

◆ finalizePosition()

void Trk::RecVertexPositions::finalizePosition ( )

Definition at line 84 of file RecVertexPositions.cxx.

85  {
86  if (this!=&rhs)
87  {
88  // you need to call the base class assignment operator

◆ fitQuality()

const Trk::FitQuality & Trk::RecVertexPositions::fitQuality ( ) const

Fit quality access method.

Definition at line 167 of file RecVertexPositions.cxx.

◆ numberOfInstantiations()

static 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  }

◆ operator=()

RecVertexPositions & Trk::RecVertexPositions::operator= ( const RecVertexPositions rhs)

Assignement operator.

Definition at line 93 of file RecVertexPositions.cxx.

96  {
97  sl << "Trk::RecVertexPositions: " << std::endl;
98  //VertexOnJetAxis::dump(sl);
99 
101  sl << "Trk::VertexPositions weight times position: (" ;
102  } else {
103  sl << "Trk::VertexPositions position: (" ;

◆ position()

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

return position of vertex

Definition at line 95 of file VertexPositions.cxx.

101 {
102  m_position = newposition;
103 }
104 } // end of namespace

◆ setCovariancePosition()

void Trk::RecVertexPositions::setCovariancePosition ( const Amg::MatrixX newerror)

Definition at line 175 of file RecVertexPositions.cxx.

◆ setFitQuality()

void Trk::RecVertexPositions::setFitQuality ( const Trk::FitQuality newFitQuality)

Definition at line 179 of file RecVertexPositions.cxx.

◆ setPosition()

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

Definition at line 109 of file VertexPositions.cxx.

◆ setWeightTimesPosition()

void Trk::RecVertexPositions::setWeightTimesPosition ( const Amg::VectorX weightTimesPosition)

Definition at line 76 of file RecVertexPositions.cxx.

◆ weightTimesPosition()

const Amg::VectorX & Trk::RecVertexPositions::weightTimesPosition ( )

Definition at line 61 of file RecVertexPositions.cxx.

Member Data Documentation

◆ m_fitQuality

Trk::FitQuality Trk::RecVertexPositions::m_fitQuality
private

Definition at line 90 of file RecVertexPositions.h.

◆ m_position

Amg::VectorX Trk::VertexPositions::m_position
protectedinherited

vertex position

Definition at line 64 of file VertexPositions.h.

◆ m_positionError

Amg::MatrixX Trk::RecVertexPositions::m_positionError
private

cov matrix on vertex position (primary vtx+jet dir+distance)

Definition at line 89 of file RecVertexPositions.h.

◆ m_useWeightTimesPosition

bool Trk::VertexPositions::m_useWeightTimesPosition
protectedinherited

Definition at line 65 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:
Trk::RecVertexPositions::RecVertexPositions
RecVertexPositions()
default constructor, if called initializes a RecVertexPositions with all data members set to 0.
Definition: RecVertexPositions.cxx:33
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Trk::RecVertexPositions::dump
virtual MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
Definition: RecVertexPositions.cxx:105
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
Trk::jet_xv
@ jet_xv
Definition: JetVtxParamDefs.h:27
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Trk::VertexPositions::m_useWeightTimesPosition
bool m_useWeightTimesPosition
Definition: VertexPositions.h:65
Trk::RecVertexPositions::m_fitQuality
Trk::FitQuality m_fitQuality
Definition: RecVertexPositions.h:90
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
Trk::RecVertexPositions::fitQuality
const Trk::FitQuality & fitQuality() const
Fit quality access method.
Definition: RecVertexPositions.cxx:167
Trk::RecVertexPositions::m_positionError
Amg::MatrixX m_positionError
cov matrix on vertex position (primary vtx+jet dir+distance)
Definition: RecVertexPositions.h:89
Trk::RecVertexPositions::~RecVertexPositions
virtual ~RecVertexPositions()
default destructor
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::ObjectCounter< Trk::VertexPositions >::s_numberOfInstantiations
static std::atomic_size_t s_numberOfInstantiations
Definition: TrkObjectCounter.h:22
Trk::RecVertexPositions::covariancePosition
Amg::MatrixX const & covariancePosition() const
return the covDeltaV matrix of the vertex fit
Definition: RecVertexPositions.cxx:171
Trk::VertexPositions::dump
virtual MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
Definition: VertexPositions.cxx:45
Trk::VertexPositions::operator=
VertexPositions & operator=(const VertexPositions &)=default
Assignment operator.
Trk::VertexPositions::m_position
Amg::VectorX m_position
vertex position
Definition: VertexPositions.h:64
Trk::FitQuality::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
Trk::RecVertexPositions::weightTimesPosition
const Amg::VectorX & weightTimesPosition()
Definition: RecVertexPositions.cxx:61
Trk::FitQuality::doubleNumberDoF
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double
Definition: FitQuality.h:68