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

#include <VxClusteringTable.h>

Collaboration diagram for Trk::VxClusteringTable:

Public Member Functions

 VxClusteringTable ()
 Default constructor, if called initializes a VxClusteringTable with all data members set to 0. More...
 
 ~VxClusteringTable ()
 
 VxClusteringTable (const VxClusteringTable &)=default
 
VxClusteringTableoperator= (const VxClusteringTable &)=default
 
void setCompatibilityOfTo (const PairOfVxVertexOnJetAxis &, float)
 Set compatibility of a new pair of tracks. More...
 
PairOfVxVertexOnJetAxis getMostCompatibleVertices (float &probability) const
 Get pair of tracks with highest compatibility. More...
 
const std::map< float, PairOfVxVertexOnJetAxis > & getCompatibilityPairOfVertices (void) const
 Get back full compatibility info (only for reading) More...
 
PairOfVxVertexOnJetAxis getMostCompatibleVerticesExcludingPrimary (float &probability) const
 Get pair of vertices with highest compatibility, removing cases with primary. More...
 
MsgStream & dump (MsgStream &sl) const
 Output Method for MsgStream, to be overloaded by child classes. More...
 
std::ostream & dump (std::ostream &sl) const
 Output Method for std::ostream, to be overloaded by child classes. More...
 

Private Attributes

std::map< float, PairOfVxVertexOnJetAxism_compatibilityPairOfVertices
 

Detailed Description

Definition at line 70 of file VxClusteringTable.h.

Constructor & Destructor Documentation

◆ VxClusteringTable() [1/2]

Trk::VxClusteringTable::VxClusteringTable ( )
default

Default constructor, if called initializes a VxClusteringTable with all data members set to 0.

◆ ~VxClusteringTable()

Trk::VxClusteringTable::~VxClusteringTable ( )
default

◆ VxClusteringTable() [2/2]

Trk::VxClusteringTable::VxClusteringTable ( const VxClusteringTable )
default

Member Function Documentation

◆ dump() [1/2]

MsgStream & Trk::VxClusteringTable::dump ( MsgStream &  sl) const

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

Definition at line 46 of file VxClusteringTable.cxx.

56  { return sf.dump(sl); }
57 
58  std::ostream& operator << ( std::ostream& sl, const VxClusteringTable& sf)
59  { return sf.dump(sl); }
60 
61  std::ostream& VxClusteringTable::dump(std::ostream& sl) const {
62  sl << "Trk::VxClusteringTable:" << std::endl;
63  if (m_compatibilityPairOfVertices.empty()) {
64  sl << "No couple of vertices contained in the table " << std::endl;
65  } else {
66  sl << "Numbers of compatibilities store: " << m_compatibilityPairOfVertices.size() << std::endl;
67  sl << "Highest probability: " << m_compatibilityPairOfVertices.rbegin()->first << std::endl;
68 

◆ dump() [2/2]

std::ostream & Trk::VxClusteringTable::dump ( std::ostream &  sl) const

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

Definition at line 76 of file VxClusteringTable.cxx.

86  {
88  }
89 
90 
91  void VxClusteringTable::setCompatibilityOfTo(const PairOfVxVertexOnJetAxis& pairOfVertices,float compatibility) {
92  if (compatibility!=0) {
93  m_compatibilityPairOfVertices[compatibility]=pairOfVertices;
94  }
95  // else {
96  // std::cout << "Warning in VxClusteringTable: assigning to a couple of track 0 probability. Should not happen (waste of time!) " << std::endl;
97  //}
98  //GP 02-04-2007 Too verbose... happens too often...
99  }

◆ getCompatibilityPairOfVertices()

const std::map< float, PairOfVxVertexOnJetAxis > & Trk::VxClusteringTable::getCompatibilityPairOfVertices ( void  ) const

Get back full compatibility info (only for reading)

Definition at line 101 of file VxClusteringTable.cxx.

102  {
103 

◆ getMostCompatibleVertices()

PairOfVxVertexOnJetAxis Trk::VxClusteringTable::getMostCompatibleVertices ( float &  probability) const

Get pair of tracks with highest compatibility.

Definition at line 117 of file VxClusteringTable.cxx.

120  {
121 
122  std::map<float,PairOfVxVertexOnJetAxis>::const_reverse_iterator revIteratorEnd=m_compatibilityPairOfVertices.rbegin();
123  std::map<float,PairOfVxVertexOnJetAxis>::const_reverse_iterator revIterator=revIteratorEnd;
124  std::map<float,PairOfVxVertexOnJetAxis>::const_reverse_iterator pairHighest=revIteratorEnd;
125 
126  bool found(false);
127  for ( ; revIterator!=m_compatibilityPairOfVertices.rend() ; ++revIterator)
128  {
129 
130  const PairOfVxVertexOnJetAxis & myVxVertex=(*revIterator).second;
131  VxVertexOnJetAxis* firstVertex=myVxVertex.first;
132  VxVertexOnJetAxis* secondVertex=myVxVertex.second;

◆ getMostCompatibleVerticesExcludingPrimary()

PairOfVxVertexOnJetAxis Trk::VxClusteringTable::getMostCompatibleVerticesExcludingPrimary ( float &  probability) const

Get pair of vertices with highest compatibility, removing cases with primary.

Definition at line 134 of file VxClusteringTable.cxx.

135  {
136  continue;
137  }
138 
139  found=true;
140  pairHighest=revIterator;
141  break;
142  }
143 
144 
145  if (!found)
146  {
147  probability=0;
148  return {};
149  }
150 
151  probability=(*pairHighest).first;
152  return (*pairHighest).second;
153  }
154 
155 }//end namespace

◆ operator=()

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

◆ setCompatibilityOfTo()

void Trk::VxClusteringTable::setCompatibilityOfTo ( const PairOfVxVertexOnJetAxis pairOfVertices,
float  compatibility 
)

Set compatibility of a new pair of tracks.

Definition at line 106 of file VxClusteringTable.cxx.

108  {};
109  }
110 
111  std::map<float,PairOfVxVertexOnJetAxis>::const_reverse_iterator pairHighest=
113 
114  probability=(*pairHighest).first;

Member Data Documentation

◆ m_compatibilityPairOfVertices

std::map<float,PairOfVxVertexOnJetAxis> Trk::VxClusteringTable::m_compatibilityPairOfVertices
private

Definition at line 124 of file VxClusteringTable.h.


The documentation for this class was generated from the following files:
Trk::VxClusteringTable::VxClusteringTable
VxClusteringTable()
Default constructor, if called initializes a VxClusteringTable with all data members set to 0.
Trk::VxClusteringTable::dump
MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
Definition: VxClusteringTable.cxx:46
Trk::VxClusteringTable::m_compatibilityPairOfVertices
std::map< float, PairOfVxVertexOnJetAxis > m_compatibilityPairOfVertices
Definition: VxClusteringTable.h:124
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition: AlignModule.cxx:204
Trk::VxClusteringTable::setCompatibilityOfTo
void setCompatibilityOfTo(const PairOfVxVertexOnJetAxis &, float)
Set compatibility of a new pair of tracks.
Definition: VxClusteringTable.cxx:106