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

#include <TwoTrackVerticesInJet.h>

Collaboration diagram for Trk::TwoTrackVerticesInJet:

Public Member Functions

 TwoTrackVerticesInJet ()
 Default constructor, if called initializes a VxVertexOnJetAxis with all data members set to 0. More...
 
 ~TwoTrackVerticesInJet ()
 Destructor. More...
 
 TwoTrackVerticesInJet (std::vector< const xAOD::Vertex * > twoTrackVertices, std::vector< const TrackParticleBase * > neutralTrackOfVertex)
 Constructs a TwoTrackVerticesInJet from a vector of the two track vertices. More...
 
 TwoTrackVerticesInJet (const TwoTrackVerticesInJet &)
 Copy constructor and assignement operator. More...
 
TwoTrackVerticesInJetoperator= (const TwoTrackVerticesInJet &)
 
 TwoTrackVerticesInJet (TwoTrackVerticesInJet &&) noexcept=default
 Move constructor and assignement operator. More...
 
TwoTrackVerticesInJetoperator= (TwoTrackVerticesInJet &&) noexcept=default
 
void setTwoTrackVertices (std::vector< const xAOD::Vertex * > twoTrackVertices)
 Set the two track vertices (takes ownership of pointers) More...
 
void setNeutralTrackOfVertices (std::vector< const TrackParticleBase * > neutralTrackOfVertex)
 Set the neutral tracks of Vertices (takes ownership also of TrackParticleBase pointers, VxCandidates must be already in the twoTrackVertices list) More...
 
const std::vector< const xAOD::Vertex * > & getTwoTrackVertice () const
 Get the two track vertices (please do not delete the pointers) More...
 
const std::vector< const TrackParticleBase * > & getNeutralTrackOfVertices () const
 Get the neutral tracks of Vertices (please do not delete the pointers) More...
 

Static Private Member Functions

static void deleteAll (std::vector< const TrackParticleBase * > &neutralTrackOfVertex) noexcept
 
static void deleteAll (std::vector< const xAOD::Vertex * > &twoTrackVertices) noexcept
 

Private Attributes

std::vector< const xAOD::Vertex * > m_twoTrackVertices
 
std::vector< const TrackParticleBase * > m_neutralTrackOfVertex
 

Detailed Description

Definition at line 44 of file TwoTrackVerticesInJet.h.

Constructor & Destructor Documentation

◆ TwoTrackVerticesInJet() [1/4]

Trk::TwoTrackVerticesInJet::TwoTrackVerticesInJet ( )
default

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

◆ ~TwoTrackVerticesInJet()

Trk::TwoTrackVerticesInJet::~TwoTrackVerticesInJet ( )

Destructor.

Definition at line 55 of file TwoTrackVerticesInJet.cxx.

59  {

◆ TwoTrackVerticesInJet() [2/4]

Trk::TwoTrackVerticesInJet::TwoTrackVerticesInJet ( std::vector< const xAOD::Vertex * >  twoTrackVertices,
std::vector< const TrackParticleBase * >  neutralTrackOfVertex 
)

Constructs a TwoTrackVerticesInJet from a vector of the two track vertices.

  • a map between the single neutral tracks (TrackParticleBase with NeutralPerigee) and the corresponding two track vertex (every neutral track in the second vector MUST correspond to a two track vertex in the first vector)

Definition at line 46 of file TwoTrackVerticesInJet.cxx.

48  {
49 
50  std::vector<const xAOD::Vertex*>::const_iterator vxBegin=rhs.m_twoTrackVertices.begin();
51  std::vector<const xAOD::Vertex*>::const_iterator vxEnd=rhs.m_twoTrackVertices.end();

◆ TwoTrackVerticesInJet() [3/4]

Trk::TwoTrackVerticesInJet::TwoTrackVerticesInJet ( const TwoTrackVerticesInJet rhs)

Copy constructor and assignement operator.

Definition at line 61 of file TwoTrackVerticesInJet.cxx.

61  {
62  const xAOD::Vertex* thisPtr=*vxIter;
63  //const xAOD::Vertex* newVertex=thisPtr->clone();
64  const xAOD::Vertex* newVertex = new xAOD::Vertex(*thisPtr);
65  m_twoTrackVertices.push_back(newVertex);
66  }
67  }
68 
69  for (std::vector<const TrackParticleBase*>::const_iterator neuIter=neuBegin;
70  neuIter!=neuEnd;++neuIter)
71  {
72  if (*neuIter!=nullptr)
73  {
74  m_neutralTrackOfVertex.push_back(new TrackParticleBase(**neuIter));
75  }
76  }
77  }
78 
80  {
81  if (this!=&rhs)
82  {
85 
86  m_twoTrackVertices.clear();
87  m_neutralTrackOfVertex.clear();
88 
89  std::vector<const xAOD::Vertex*>::const_iterator vxBegin=rhs.m_twoTrackVertices.begin();
90  std::vector<const xAOD::Vertex*>::const_iterator vxEnd=rhs.m_twoTrackVertices.end();
91 

◆ TwoTrackVerticesInJet() [4/4]

Trk::TwoTrackVerticesInJet::TwoTrackVerticesInJet ( TwoTrackVerticesInJet &&  )
defaultnoexcept

Move constructor and assignement operator.

Member Function Documentation

◆ deleteAll() [1/2]

void Trk::TwoTrackVerticesInJet::deleteAll ( std::vector< const TrackParticleBase * > &  neutralTrackOfVertex)
staticprivatenoexcept

Definition at line 175 of file TwoTrackVerticesInJet.cxx.

◆ deleteAll() [2/2]

void Trk::TwoTrackVerticesInJet::deleteAll ( std::vector< const xAOD::Vertex * > &  twoTrackVertices)
staticprivatenoexcept

Definition at line 159 of file TwoTrackVerticesInJet.cxx.

162  {
163  for (const TrackParticleBase* p : neutralTrackOfVertex)
164  {
165  delete p;
166  }
167  neutralTrackOfVertex.clear();
168  }
169 
170 
171 }//end namespace Trk
172 
173 

◆ getNeutralTrackOfVertices()

const std::vector< const TrackParticleBase * > & Trk::TwoTrackVerticesInJet::getNeutralTrackOfVertices ( ) const

Get the neutral tracks of Vertices (please do not delete the pointers)

Definition at line 153 of file TwoTrackVerticesInJet.cxx.

154  {
155  delete *vxIter;
156  }

◆ getTwoTrackVertice()

const std::vector< const xAOD::Vertex * > & Trk::TwoTrackVerticesInJet::getTwoTrackVertice ( ) const

Get the two track vertices (please do not delete the pointers)

Definition at line 149 of file TwoTrackVerticesInJet.cxx.

152  {

◆ operator=() [1/2]

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

Definition at line 93 of file TwoTrackVerticesInJet.cxx.

98  {
99  if (*vxIter!=nullptr)
100  {
101  const xAOD::Vertex* thisPtr=*vxIter;
102  //const xAOD::Vertex* newVertex=thisPtr->clone();
103  const xAOD::Vertex* newVertex = new xAOD::Vertex(*thisPtr);
104  m_twoTrackVertices.push_back(newVertex);
105  }
106  }
107 
108  for (std::vector<const TrackParticleBase*>::const_iterator neuIter=neuBegin;
109  neuIter!=neuEnd;++neuIter)
110  {
111  if (*neuIter!=nullptr)
112  {
113  m_neutralTrackOfVertex.push_back(new TrackParticleBase(**neuIter));
114  }
115  }
116 
117  }
118 
119  return *this;
120  }
121 
122 
123  void TwoTrackVerticesInJet::setTwoTrackVertices(std::vector<const xAOD::Vertex*> twoTrackVertices)
124  {
126  m_twoTrackVertices=std::move(twoTrackVertices);
127  }
128 
129  void TwoTrackVerticesInJet::setNeutralTrackOfVertices(std::vector<const TrackParticleBase*> neutralTrackOfVertex)
130  {
132  m_neutralTrackOfVertex=std::move(neutralTrackOfVertex);
133  }
134 

◆ operator=() [2/2]

TwoTrackVerticesInJet& Trk::TwoTrackVerticesInJet::operator= ( TwoTrackVerticesInJet &&  )
defaultnoexcept

◆ setNeutralTrackOfVertices()

void Trk::TwoTrackVerticesInJet::setNeutralTrackOfVertices ( std::vector< const TrackParticleBase * >  neutralTrackOfVertex)

Set the neutral tracks of Vertices (takes ownership also of TrackParticleBase pointers, VxCandidates must be already in the twoTrackVertices list)

Definition at line 143 of file TwoTrackVerticesInJet.cxx.

146  {
147  std::vector<const xAOD::Vertex*>::iterator vxBegin=twoTrackVertices.begin();

◆ setTwoTrackVertices()

void Trk::TwoTrackVerticesInJet::setTwoTrackVertices ( std::vector< const xAOD::Vertex * >  twoTrackVertices)

Set the two track vertices (takes ownership of pointers)

Definition at line 137 of file TwoTrackVerticesInJet.cxx.

140  {
141  return m_neutralTrackOfVertex;

Member Data Documentation

◆ m_neutralTrackOfVertex

std::vector<const TrackParticleBase*> Trk::TwoTrackVerticesInJet::m_neutralTrackOfVertex
private

Definition at line 111 of file TwoTrackVerticesInJet.h.

◆ m_twoTrackVertices

std::vector<const xAOD::Vertex*> Trk::TwoTrackVerticesInJet::m_twoTrackVertices
private

Definition at line 110 of file TwoTrackVerticesInJet.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Trk::TwoTrackVerticesInJet::m_neutralTrackOfVertex
std::vector< const TrackParticleBase * > m_neutralTrackOfVertex
Definition: TwoTrackVerticesInJet.h:111
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
Trk::TwoTrackVerticesInJet::m_twoTrackVertices
std::vector< const xAOD::Vertex * > m_twoTrackVertices
Definition: TwoTrackVerticesInJet.h:110
Trk::TwoTrackVerticesInJet::deleteAll
static void deleteAll(std::vector< const TrackParticleBase * > &neutralTrackOfVertex) noexcept
Definition: TwoTrackVerticesInJet.cxx:175
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Trk::TwoTrackVerticesInJet::TwoTrackVerticesInJet
TwoTrackVerticesInJet()
Default constructor, if called initializes a VxVertexOnJetAxis with all data members set to 0.
Trk::TwoTrackVerticesInJet::setNeutralTrackOfVertices
void setNeutralTrackOfVertices(std::vector< const TrackParticleBase * > neutralTrackOfVertex)
Set the neutral tracks of Vertices (takes ownership also of TrackParticleBase pointers,...
Definition: TwoTrackVerticesInJet.cxx:143
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
Trk::TwoTrackVerticesInJet::setTwoTrackVertices
void setTwoTrackVertices(std::vector< const xAOD::Vertex * > twoTrackVertices)
Set the two track vertices (takes ownership of pointers)
Definition: TwoTrackVerticesInJet.cxx:137
Trk::TwoTrackVerticesInJet::operator=
TwoTrackVerticesInJet & operator=(const TwoTrackVerticesInJet &)
Definition: TwoTrackVerticesInJet.cxx:93