ATLAS Offline Software
Functions
MSVertex.cxx File Reference
#include "MSVertexUtils/MSVertex.h"
#include <sstream>
Include dependency graph for MSVertex.cxx:

Go to the source code of this file.

Functions

std::string str (const MSVertex &a)
 
MsgStream & operator<< (MsgStream &m, const MSVertex &a)
 
bool operator== (const MSVertex &a, const MSVertex &b)
 

Function Documentation

◆ operator<<()

MsgStream& operator<< ( MsgStream &  m,
const MSVertex a 
)

Definition at line 93 of file MSVertex.cxx.

93 { return (m << str(a)); }

◆ operator==()

bool operator== ( const MSVertex a,
const MSVertex b 
)

Definition at line 95 of file MSVertex.cxx.

95  {
96  //* distance used to compare floats *//
97  const double DELTA = 1e-3;
98 
99  if (std::abs(a.getPosition().x() - b.getPosition().x()) > DELTA) return false;
100  if (std::abs(a.getPosition().y() - b.getPosition().y()) > DELTA) return false;
101  if (std::abs(a.getPosition().z() - b.getPosition().z()) > DELTA) return false;
102  if (std::abs(a.getPosition().eta() - b.getPosition().eta()) > DELTA) return false;
103  if (std::abs(a.getPosition().phi() - b.getPosition().phi()) > DELTA) return false;
104  if (std::abs(a.getChi2Probability() - b.getChi2Probability()) > DELTA) return false;
105 
106  if (a.getAuthor() - b.getAuthor() != 0) return false;
107  if (a.getNTracks() - b.getNTracks() != 0) return false;
108  if (a.getNMDT() - b.getNMDT() != 0) return false;
109  if (a.getNRPC() - b.getNRPC() != 0) return false;
110  if (a.getNTGC() - b.getNTGC() != 0) return false;
111 
112  return true;
113 }

◆ str()

std::string str ( const MSVertex a)

Definition at line 82 of file MSVertex.cxx.

82  {
83  std::stringstream ss;
84 
85  ss << "author = " << a.getAuthor() << "; x = " << a.getPosition().x() << "; y = " << a.getPosition().y()
86  << "; z = " << a.getPosition().z() << "; phi = " << a.getPosition().phi() << "; eta = " << a.getPosition().eta()
87  << "; chi2 prob. = " << a.getChi2Probability() << "; # tracks = " << a.getNTracks() << "; # MDT hits = " << a.getNMDT()
88  << "; # RPC hits = " << a.getNRPC() << "; # TGC hits = " << a.getNTGC();
89 
90  return ss.str();
91 }
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
str
std::string str(const MSVertex &a)
Definition: MSVertex.cxx:82
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10