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

#include <VxJetCandidate.h>

Inheritance diagram for Trk::VxJetCandidate:
Collaboration diagram for Trk::VxJetCandidate:

Public Member Functions

 VxJetCandidate ()
 
 VxJetCandidate (const Trk::RecVertex &recVertex, const std::vector< Trk::VxTrackAtVertex * > &vxTrackAtVertex)
 
 VxJetCandidate (const std::vector< std::pair< const Trk::TrackParticleBase *, const Trk::TrackParticleBaseCollection * > > &)
 
 VxJetCandidate (const std::vector< std::pair< const Track *, const TrackCollection * > > &)
 
 VxJetCandidate (const std::vector< const Trk::TrackParticleBase * > &)
 
 VxJetCandidate (const std::vector< const Track * > &)
 
virtual VxJetCandidateclone () const
 
virtual ~VxJetCandidate ()
 
 VxJetCandidate (const VxJetCandidate &rhs)
 
VxJetCandidateoperator= (const VxJetCandidate &)
 Assignement operator. More...
 
void setTracksOrigin (const TrackCollection *)
 
void setTrackParticlesOrigin (const Trk::TrackParticleBaseCollection *)
 
const Trk::RecVertexPositionsgetRecVertexPositions () const
 
Trk::RecVertexPositionsgetRecVertexPositions ()
 
void setRecVertexPositions (const Trk::RecVertexPositions &)
 
const Trk::VertexPositionsgetLinearizationVertexPositions () const
 
Trk::VertexPositionsgetLinearizationVertexPositions ()
 
void setLinearizationVertexPositions (const Trk::VertexPositions &)
 
const std::vector< VxVertexOnJetAxis * > & getVerticesOnJetAxis (void) const
 
void setVerticesOnJetAxis (const std::vector< VxVertexOnJetAxis * > &)
 
const VxVertexOnJetAxisgetPrimaryVertex (void) const
 
VxVertexOnJetAxisgetPrimaryVertex (void)
 
void setPrimaryVertex (const VxVertexOnJetAxis *)
 
Trk::VxJetFitterDebugInfo *& getDebugInfo (void)
 
Trk::VxClusteringTable *& getClusteringTable (void)
 
const Trk::RecVertexPositionsgetConstraintVertexPositions () const
 
Trk::RecVertexPositionsgetConstraintVertexPositions ()
 
void setConstraintVertexPositions (const Trk::RecVertexPositions &)
 
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...
 
const Trk::RecVertexrecVertex (void) const
 Returns a reference to reconstructed vertex. More...
 
Trk::RecVertexrecVertex (void)
 Returns unconst reference to a reconstructed vertex Required by some of the vertex fitters. More...
 
void setRecVertex (Trk::RecVertex &recVertex)
 RecVertex set method. More...
 
std::vector< Trk::VxTrackAtVertex * > * vxTrackAtVertex (void)
 Unconst pointer to the vector of tracks Required by some of the vertex fitters. More...
 
const std::vector< Trk::VxTrackAtVertex * > * vxTrackAtVertex (void) const
 Const access to the vector of tracks fitted to the vertex. More...
 
void setVertexType (VertexType vertexType)
 return the type of the vertex More...
 
VertexType vertexType () const
 return the type of the vertex More...
 

Static Public Member Functions

static std::size_t numberOfInstantiations ()
 

Static Public Attributes

static std::atomic_size_t s_numberOfInstantiations
 

Protected Attributes

Trk::VxVertexOnJetAxism_primaryVertex
 
Trk::RecVertexPositions m_fittedPositions
 
Trk::VertexPositions m_linearizationPositions
 
Trk::RecVertexPositions m_constraintPositions
 
std::vector< VxVertexOnJetAxis * > m_verticesOnJetAxis
 
Trk::VxJetFitterDebugInfom_debugInfo
 
Trk::VxClusteringTablem_clusteringTable
 
Trk::VertexType m_vertexType
 
Trk::RecVertex m_recVertex
 
std::vector< Trk::VxTrackAtVertex * > m_vxTrackAtVertex
 

Detailed Description

Definition at line 71 of file VxJetCandidate.h.

Constructor & Destructor Documentation

◆ VxJetCandidate() [1/7]

Trk::VxJetCandidate::VxJetCandidate ( )

Definition at line 45 of file VxJetCandidate.cxx.

46  { }
47 
48 
49 VxJetCandidate::VxJetCandidate(const std::vector<std::pair<const Trk::TrackParticleBase*,

◆ VxJetCandidate() [2/7]

Trk::VxJetCandidate::VxJetCandidate ( const Trk::RecVertex recVertex,
const std::vector< Trk::VxTrackAtVertex * > &  vxTrackAtVertex 
)

Definition at line 51 of file VxJetCandidate.cxx.

54  {
55 
56  std::vector<std::pair<const Trk::TrackParticleBase*,const Trk::TrackParticleBaseCollection*> >::const_iterator

◆ VxJetCandidate() [3/7]

Trk::VxJetCandidate::VxJetCandidate ( const std::vector< std::pair< const Trk::TrackParticleBase *, const Trk::TrackParticleBaseCollection * > > &  vectorOfTrackParticles)

Definition at line 59 of file VxJetCandidate.cxx.

63  {
64 
65  if ((*vTPIter).first!=0) {
67  link.setElement((*vTPIter).first);
68  LinkToTrackParticleBase * linkTT = new LinkToTrackParticleBase(link);
69  linkTT->setStorableObject(*((*vTPIter).second));
70  VxTrackAtVertex* newVxTrack=new VxTrackAtVertex(linkTT);
71  m_vxTrackAtVertex.push_back(newVxTrack);
72  std::vector<VxTrackAtVertex*> temp_vector_tracksAtVertex;
73  temp_vector_tracksAtVertex.push_back(newVxTrack);
74  m_verticesOnJetAxis.push_back(new VxVertexOnJetAxis(temp_vector_tracksAtVertex));
75  //every track is added at the beginning to a new additional vertex (all vertices have only 1 track at the beginning)
76  } else {
77  std::cout << "************************************ ------------- *********************************************" << std::endl;
78  std::cout << "ERROR in VxJetCandidate constructor: inconsistency in VxTrackAtVertex tracks. Skipping track..." << std::endl;
79  std::cout << "************************************ ------------- *********************************************" << std::endl;
80  }
81  }
82  }
83 
84 VxJetCandidate::VxJetCandidate(const std::vector<const Trk::TrackParticleBase*> & vectorOfTrackParticles):
85  VxCandidate(),
86  m_primaryVertex(nullptr),
87  m_debugInfo(nullptr),
88  m_clusteringTable(nullptr) {
89 
90  std::vector<const Trk::TrackParticleBase*>::const_iterator vTPBegin=vectorOfTrackParticles.begin();
91  std::vector<const Trk::TrackParticleBase*>::const_iterator vTPEnd=vectorOfTrackParticles.end();
92 

◆ VxJetCandidate() [4/7]

Trk::VxJetCandidate::VxJetCandidate ( const std::vector< std::pair< const Track *, const TrackCollection * > > &  vectorOfTracks)

Definition at line 125 of file VxJetCandidate.cxx.

128  {
129 
130  if ((*vTIter).first!=0) {
132  link.setElement((*vTIter).first);
133  LinkToTrack * linkTT = new LinkToTrack(link);
134  linkTT->setStorableObject(*(*vTIter).second);
135  VxTrackAtVertex* myPointer=new VxTrackAtVertex(linkTT);
136  m_vxTrackAtVertex.push_back(myPointer);
137  std::vector<VxTrackAtVertex*> temp_vector_tracksAtVertex;
138  temp_vector_tracksAtVertex.push_back(myPointer);
139  VxVertexOnJetAxis* myVertexOnJetAxis=new VxVertexOnJetAxis(temp_vector_tracksAtVertex);
140  // myVertexOnJetAxis->setLinearizationPosition(0.);//should already be zero
141  //HERE
142  m_verticesOnJetAxis.push_back(myVertexOnJetAxis);
143  //every track is added at the beginning to a new additional vertex (all vertices have only 1 track at the beginning)
144  } else {
145  std::cout << "************************************ ------------- *********************************************" << std::endl;
146  std::cout << "ERROR in VxJetCandidate constructor: inconsistency in VxTrackAtVertex tracks. Skipping track..." << std::endl;
147  std::cout << "************************************ ------------- *********************************************" << std::endl;
148  }
149  }
150 
151  }
152 
153 
154 VxJetCandidate::VxJetCandidate(const std::vector<const Track*> & vectorOfTracks):
155  VxCandidate(),
156  m_primaryVertex(nullptr),
157  m_debugInfo(nullptr),
158  m_clusteringTable(nullptr) {
159 
160  std::vector<const Trk::Track*>::const_iterator vTBegin=vectorOfTracks.begin();
161  std::vector<const Trk::Track*>::const_iterator vTEnd=vectorOfTracks.end();

◆ VxJetCandidate() [5/7]

Trk::VxJetCandidate::VxJetCandidate ( const std::vector< const Trk::TrackParticleBase * > &  vectorOfTrackParticles)

Definition at line 94 of file VxJetCandidate.cxx.

95  {
97  link.setElement(*vTPIter);
98  LinkToTrackParticleBase * linkTT = new LinkToTrackParticleBase(link);
99  VxTrackAtVertex* newVxTrack=new VxTrackAtVertex(linkTT);
100  m_vxTrackAtVertex.push_back(newVxTrack);
101  std::vector<VxTrackAtVertex*> temp_vector_tracksAtVertex;
102  temp_vector_tracksAtVertex.push_back(newVxTrack);
103  m_verticesOnJetAxis.push_back(new VxVertexOnJetAxis(temp_vector_tracksAtVertex));
104  //every track is added at the beginning to a new additional vertex (all vertices have only 1 track at the beginning)
105  } else {
106  std::cout << "************************************ ------------- *********************************************" << std::endl;
107  std::cout << "ERROR in VxJetCandidate constructor: inconsistency in VxTrackAtVertex tracks. Skipping track..." << std::endl;
108  std::cout << "************************************ ------------- *********************************************" << std::endl;
109  }
110 
111  }
112  }
113 
114 
115 VxJetCandidate::VxJetCandidate(const std::vector<std::pair<const Track*,const TrackCollection*> > & vectorOfTracks):
116  VxCandidate(),
117  m_primaryVertex(nullptr),
118  m_debugInfo(nullptr),
119  m_clusteringTable(nullptr) {
120 
121  std::vector<std::pair<const Trk::Track*,const TrackCollection*> >::const_iterator
122  vTBegin=vectorOfTracks.begin();

◆ VxJetCandidate() [6/7]

Trk::VxJetCandidate::VxJetCandidate ( const std::vector< const Track * > &  vectorOfTracks)

Definition at line 164 of file VxJetCandidate.cxx.

164  {
165 
166  if (*vTIter!=nullptr) {
168  link.setElement(*vTIter);
169  LinkToTrack * linkTT = new LinkToTrack(link);
170  VxTrackAtVertex* myPointer=new VxTrackAtVertex(linkTT);
171  m_vxTrackAtVertex.push_back(myPointer);
172  std::vector<VxTrackAtVertex*> temp_vector_tracksAtVertex;
173  temp_vector_tracksAtVertex.push_back(myPointer);
174  VxVertexOnJetAxis* myVertexOnJetAxis=new VxVertexOnJetAxis(temp_vector_tracksAtVertex);
175  // myVertexOnJetAxis->setLinearizationPosition(0.);//should already be zero
176  //HERE
177  m_verticesOnJetAxis.push_back(myVertexOnJetAxis);
178  //every track is added at the beginning to a new additional vertex (all vertices have only 1 track at the beginning)
179  } else {
180  std::cout << "************************************ ------------- *********************************************" << std::endl;
181  std::cout << "ERROR in VxJetCandidate constructor: inconsistency in VxTrackAtVertex tracks. Skipping track..." << std::endl;
182  std::cout << "************************************ ------------- *********************************************" << std::endl;
183  }
184 
185  }
186 
187  }
188 
189 void VxJetCandidate::setTracksOrigin(const TrackCollection * trackTES) {
190 
193 
194  for (std::vector<Trk::VxTrackAtVertex*>::iterator tracksIter=tracksBegin;
195  tracksIter!=tracksEnd;++tracksIter) {
196 
197  ITrackLink* IlinkTT=(*tracksIter)->trackOrParticleLink();

◆ ~VxJetCandidate()

Trk::VxJetCandidate::~VxJetCandidate ( )
virtual

Definition at line 483 of file VxJetCandidate.cxx.

487  {
488 
489  if (*VtxIter!=nullptr) {
490  delete *VtxIter;
491  } else {
492  std::cout << "************************************ ------------- ***********************************************" << std::endl;
493  std::cout << "ERROR in destructor of VxJetCandidate: one of the VxVertexOnJetAxis is already an empty pointer..." << std::endl;
494  std::cout << "************************************ ------------- ***********************************************" << std::endl;
495  }
496  }
497 
498  if (m_debugInfo!=nullptr) {
499  delete m_debugInfo;
500  m_debugInfo=nullptr;
501  }
502 
503  if (m_clusteringTable!=nullptr) {
504  delete m_clusteringTable;
505  m_clusteringTable=nullptr;
506  }
507 
508 }
510  return m_fittedPositions;
511 }
512 
514  return m_fittedPositions;
515 }
516 
518  m_fittedPositions=newPositions;

◆ VxJetCandidate() [7/7]

Trk::VxJetCandidate::VxJetCandidate ( const VxJetCandidate rhs)

Definition at line 237 of file VxJetCandidate.cxx.

242  {
243  if (*itr==nullptr) {
244  std::cout << " Pointer of one of the tracks of the object to copy is zero. PROBLEM! Skipping track " << std::endl;
245  continue;
246  }
247  Trk::VxTrackAtVertex* newVxTrackPointer=(*itr)->clone();
248  oldToNewPointer[*itr]=newVxTrackPointer;
249  this->m_vxTrackAtVertex.push_back(newVxTrackPointer);
250  }
251 
252  m_primaryVertex=(rhs.m_primaryVertex!=nullptr) ? new VxVertexOnJetAxis(*rhs.m_primaryVertex) : nullptr;
253 
254  if (rhs.m_primaryVertex!=nullptr) {
255  const std::vector<VxTrackAtVertex*> & primaryVectorTracks=rhs.m_primaryVertex->getTracksAtVertex();
256 
257  const std::vector<VxTrackAtVertex*>::const_iterator primaryVectorTracksBegin=primaryVectorTracks.begin();
258  const std::vector<VxTrackAtVertex*>::const_iterator primaryVectorTracksEnd=primaryVectorTracks.end();
259 
260  std::vector<VxTrackAtVertex*> primaryVectorNew;
261 
262  for (std::vector<VxTrackAtVertex*>::const_iterator primaryVectorIter=primaryVectorTracksBegin;
263  primaryVectorIter!=primaryVectorTracksEnd;++primaryVectorIter) {
264  VxTrackAtVertex* newTrackPointer=oldToNewPointer[*primaryVectorIter];
265  if (newTrackPointer!=nullptr) {
266  primaryVectorNew.push_back(newTrackPointer);
267  } else {
268  std::cout << "************************************ ---------------------------- ********************************" << std::endl;
269  std::cout << "Not able to copy old pointer to new one when inizializing tracks of primary vertex to new pointers" << std::endl;
270  std::cout << "************************************ ---------------------------- ********************************" << std::endl;
271  }
272  }
273 
274  m_primaryVertex->setTracksAtVertex(std::move(primaryVectorNew));
275 
276  } else {
277  std::cout << "VxJetCandidate EDM class: Warning in COPY: no primary vertex present" << std::endl;
278  }
279 
280  //copying over m_verticesOnJetAxis
281  std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=rhs.m_verticesOnJetAxis.begin();
282  std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=rhs.m_verticesOnJetAxis.end();
283 
284  for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;
285  ++VtxIter) {
286 
287  if (*VtxIter!=nullptr) {
288 
289  VxVertexOnJetAxis* newVertexOnJetAxis=new VxVertexOnJetAxis(**VtxIter);
290 
291  //now you still need to attach the new pointers...
292 
293  std::vector<VxTrackAtVertex*> vertexVectorNew;
294 
295  const std::vector<VxTrackAtVertex*> & TracksAtVertex=(*VtxIter)->getTracksAtVertex();
296 
297  const std::vector<VxTrackAtVertex*>::const_iterator TracksBegin=TracksAtVertex.begin();
298  const std::vector<VxTrackAtVertex*>::const_iterator TracksEnd=TracksAtVertex.end();
299 
300  for (std::vector<VxTrackAtVertex*>::const_iterator TrackVectorIter=TracksBegin;
301  TrackVectorIter!=TracksEnd;++TrackVectorIter) {
302  VxTrackAtVertex* newTrackPointer=oldToNewPointer[*TrackVectorIter];
303  if (newTrackPointer!=nullptr) {
304  vertexVectorNew.push_back(newTrackPointer);
305  } else {
306  std::cout << "************************************ ---------------------------- **********************(((((***********" << std::endl;
307  std::cout << "Not able to copy old pointer to new one when inizializing tracks of vertices on jet axis to new pointers" << std::endl;
308  std::cout << "************************************ ---------------------------- **************************************" << std::endl;
309  }
310  }
311  newVertexOnJetAxis->setTracksAtVertex(std::move(vertexVectorNew));
312  m_verticesOnJetAxis.push_back(newVertexOnJetAxis);
313 
314  } else {
315  std::cout << "************************************ ------------- *********************************************" << std::endl;
316  std::cout << "ERROR in copy constructor of VxJetCandidate: one of the VxVertexOnJetAxis is an empty pointer..." << std::endl;
317  std::cout << "************************************ ------------- *********************************************" << std::endl;
318  }
319  }
320 
321  if (rhs.m_debugInfo!=nullptr) {
322  m_debugInfo=new VxJetFitterDebugInfo(*rhs.m_debugInfo);
323  } else {
324  m_debugInfo=nullptr;
325  }
326 
327  // if (rhs.m_clusteringTable!=0) {
328  // std::cout << "Warning: during copy of VxJetCandidate the clusteringTable is not copied over" << std::endl;
329  m_clusteringTable=nullptr;//new VxClusteringTable(*rhs.m_clusteringTable);
330  // } else {
331  // m_clusteringTable=0;
332  // }
333 }
334 
336 {
337  if (this!=&rhs)
338  {
339  // this->operator=(rhs);
340  // delete objects where pointers pointed to
341  // (otherwise -> memory leak)

Member Function Documentation

◆ clone()

Trk::VxJetCandidate * Trk::VxJetCandidate::clone ( ) const
inlinevirtual

Reimplemented from Trk::VxCandidate.

Definition at line 127 of file VxJetCandidate.h.

◆ dump() [1/2]

MsgStream & Trk::VxCandidate::dump ( MsgStream &  sl) const
virtualinherited

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

Reimplemented in Trk::MVFVxCandidate.

Definition at line 106 of file VxCandidate.cxx.

112 {
113  sl << "Printing Trk::VxCandidate of type: " << m_vertexType << std::endl;
114  sl << m_recVertex << std::endl;
115  sl << "Tracks used in the vertex fit: " << m_vxTrackAtVertex.size() << std::endl;

◆ dump() [2/2]

std::ostream & Trk::VxCandidate::dump ( std::ostream &  sl) const
virtualinherited

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

Reimplemented in Trk::MVFVxCandidate.

Definition at line 118 of file VxCandidate.cxx.

124 {
125  return sf.dump(sl);
126 }
127 

◆ getClusteringTable()

Trk::VxClusteringTable *& Trk::VxJetCandidate::getClusteringTable ( void  )

Definition at line 569 of file VxJetCandidate.cxx.

571  {//non-const overload

◆ getConstraintVertexPositions() [1/2]

Trk::RecVertexPositions & Trk::VxJetCandidate::getConstraintVertexPositions ( )

Definition at line 581 of file VxJetCandidate.cxx.

◆ getConstraintVertexPositions() [2/2]

const Trk::RecVertexPositions & Trk::VxJetCandidate::getConstraintVertexPositions ( ) const

Definition at line 577 of file VxJetCandidate.cxx.

◆ getDebugInfo()

Trk::VxJetFitterDebugInfo *& Trk::VxJetCandidate::getDebugInfo ( void  )

Definition at line 565 of file VxJetCandidate.cxx.

567  {

◆ getLinearizationVertexPositions() [1/2]

Trk::VertexPositions & Trk::VxJetCandidate::getLinearizationVertexPositions ( )

Definition at line 535 of file VxJetCandidate.cxx.

537  {

◆ getLinearizationVertexPositions() [2/2]

const Trk::VertexPositions & Trk::VxJetCandidate::getLinearizationVertexPositions ( ) const

Definition at line 531 of file VxJetCandidate.cxx.

533  {

◆ getPrimaryVertex() [1/2]

VxVertexOnJetAxis * Trk::VxJetCandidate::getPrimaryVertex ( void  )

Definition at line 555 of file VxJetCandidate.cxx.

555  {
556  return m_debugInfo;
557 }

◆ getPrimaryVertex() [2/2]

const VxVertexOnJetAxis * Trk::VxJetCandidate::getPrimaryVertex ( void  ) const

Definition at line 551 of file VxJetCandidate.cxx.

◆ getRecVertexPositions() [1/2]

Trk::RecVertexPositions & Trk::VxJetCandidate::getRecVertexPositions ( )

Definition at line 523 of file VxJetCandidate.cxx.

525  {//non-const overlaod

◆ getRecVertexPositions() [2/2]

const Trk::RecVertexPositions & Trk::VxJetCandidate::getRecVertexPositions ( ) const

Definition at line 519 of file VxJetCandidate.cxx.

521  {

◆ getVerticesOnJetAxis()

const std::vector< VxVertexOnJetAxis * > & Trk::VxJetCandidate::getVerticesOnJetAxis ( void  ) const

Definition at line 543 of file VxJetCandidate.cxx.

545  {//non-const overload

◆ numberOfInstantiations()

static std::size_t Trk::ObjectCounter< Trk::VxCandidate >::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=()

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

Assignement operator.

Definition at line 345 of file VxJetCandidate.cxx.

358  {
359 
360  if (*DelVtxIter!=nullptr) {
361  delete *DelVtxIter;
362  } else {
363  std::cout << "************************************ ---------------------------- ***********************************************" << std::endl;
364  std::cout << "ERROR in constructor of VxJetCandidate when deleting: one of the VxVertexOnJetAxis is already an empty pointer..." << std::endl;
365  std::cout << "************************************ ---------------------------- ***********************************************" << std::endl;
366  }
367  }
368 
369  m_verticesOnJetAxis.clear();//you own them... you need to delete them
370 
371 
372  //you need this map to update all the VxVertexOnJetAxis which only have
373  //pointers to the objects... (with persistency it will be a mess anyway)
374  std::map<Trk::VxTrackAtVertex*,Trk::VxTrackAtVertex*> oldToNewPointer;
375 
376  std::vector<Trk::VxTrackAtVertex*>::const_iterator RhsVxTracksEnd=rhs.m_vxTrackAtVertex.end();
377  for (std::vector<Trk::VxTrackAtVertex*>::const_iterator itr = rhs.m_vxTrackAtVertex.begin();
378  itr != RhsVxTracksEnd; ++itr) {
379  if (*itr==nullptr) {
380  std::cout << " Pointer of one of the tracks of the object to copy is zero. PROBLEM! Skipping track " << std::endl;
381  continue;
382  }
383  Trk::VxTrackAtVertex* newVxTrackPointer=(*itr)->clone();
384  oldToNewPointer[*itr]=newVxTrackPointer;
385  this->m_vxTrackAtVertex.push_back(newVxTrackPointer);
386  }
387 
388  m_primaryVertex=(rhs.m_primaryVertex!=nullptr) ? new VxVertexOnJetAxis(*rhs.m_primaryVertex) : nullptr;
389 
390  if (rhs.m_primaryVertex!=nullptr) {
391  const std::vector<VxTrackAtVertex*> & primaryVectorTracks=rhs.m_primaryVertex->getTracksAtVertex();
392 
393  const std::vector<VxTrackAtVertex*>::const_iterator primaryVectorTracksBegin=primaryVectorTracks.begin();
394  const std::vector<VxTrackAtVertex*>::const_iterator primaryVectorTracksEnd=primaryVectorTracks.end();
395 
396  std::vector<VxTrackAtVertex*> primaryVectorNew;
397 
398  for (std::vector<VxTrackAtVertex*>::const_iterator primaryVectorIter=primaryVectorTracksBegin;
399  primaryVectorIter!=primaryVectorTracksEnd;++primaryVectorIter) {
400  VxTrackAtVertex* newTrackPointer=oldToNewPointer[*primaryVectorIter];
401  if (newTrackPointer!=nullptr) {
402  primaryVectorNew.push_back(newTrackPointer);
403  } else {
404  std::cout << "************************************ ---------------------------- ********************************" << std::endl;
405  std::cout << "Not able to copy old pointer to new one when inizializing tracks of primary vertex to new pointers" << std::endl;
406  std::cout << "************************************ ---------------------------- ********************************" << std::endl;
407  }
408  }
409 
410  m_primaryVertex->setTracksAtVertex(std::move(primaryVectorNew));
411 
412  } else {
413  std::cout << "VxJetCandidate EDM class: Warning in COPY: no primary vertex present" << std::endl;
414  }
415 
416  //copying over m_verticesOnJetAxis
417  std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=rhs.m_verticesOnJetAxis.begin();
418  std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=rhs.m_verticesOnJetAxis.end();
419 
420  for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;
421  ++VtxIter) {
422 
423  if (*VtxIter!=nullptr) {
424 
425  VxVertexOnJetAxis* newVertexOnJetAxis=new VxVertexOnJetAxis(**VtxIter);
426 
427  //now you still need to attach the new pointers...
428 
429  std::vector<VxTrackAtVertex*> vertexVectorNew;
430 
431  const std::vector<VxTrackAtVertex*> & TracksAtVertex=(*VtxIter)->getTracksAtVertex();
432 
433  const std::vector<VxTrackAtVertex*>::const_iterator TracksBegin=TracksAtVertex.begin();
434  const std::vector<VxTrackAtVertex*>::const_iterator TracksEnd=TracksAtVertex.end();
435 
436  for (std::vector<VxTrackAtVertex*>::const_iterator TrackVectorIter=TracksBegin;
437  TrackVectorIter!=TracksEnd;++TrackVectorIter) {
438  VxTrackAtVertex* newTrackPointer=oldToNewPointer[*TrackVectorIter];
439  if (newTrackPointer!=nullptr) {
440  vertexVectorNew.push_back(newTrackPointer);
441  } else {
442  std::cout << "************************************ ---------------------------- **********************(((((***********" << std::endl;
443  std::cout << "Not able to copy old pointer to new one when inizializing tracks of vertices on jet axis to new pointers" << std::endl;
444  std::cout << "************************************ ---------------------------- **************************************" << std::endl;
445  }
446  }
447  newVertexOnJetAxis->setTracksAtVertex(std::move(vertexVectorNew));
448  m_verticesOnJetAxis.push_back(newVertexOnJetAxis);
449 
450  } else {
451  std::cout << "************************************ ------------- *********************************************" << std::endl;
452  std::cout << "ERROR in copy constructor of VxJetCandidate: one of the VxVertexOnJetAxis is an empty pointer..." << std::endl;
453  std::cout << "************************************ ------------- *********************************************" << std::endl;
454  }
455  }
456 
457  if (rhs.m_debugInfo!=nullptr) {
458  m_debugInfo=new VxJetFitterDebugInfo(*rhs.m_debugInfo);
459  } else {
460  m_debugInfo=nullptr;
461  }
462 
463  // if (rhs.m_clusteringTable!=0) {
464  // std::cout << "Warning: during copy of VxJetCandidate the clusteringTable is not copied over" << std::endl;
465  m_clusteringTable=nullptr;//new VxClusteringTable(*rhs.m_clusteringTable);
466  // } else {
467  // m_clusteringTable=0;
468  // }
469  }
470  return *this;
471 }
472 
474 {
475 
476  if (m_primaryVertex!=nullptr) {
477  delete m_primaryVertex;
478  m_primaryVertex=nullptr;
479  }
480 
481 

◆ recVertex() [1/2]

Trk::RecVertex & Trk::VxCandidate::recVertex ( void  )
inlineinherited

Returns unconst reference to a reconstructed vertex Required by some of the vertex fitters.

Definition at line 138 of file VxCandidate.h.

139 {
140  return m_recVertex;
141 }

◆ recVertex() [2/2]

const Trk::RecVertex & Trk::VxCandidate::recVertex ( void  ) const
inlineinherited

Returns a reference to reconstructed vertex.

Definition at line 132 of file VxCandidate.h.

133 {
134  return m_recVertex;
135 }

◆ setConstraintVertexPositions()

void Trk::VxJetCandidate::setConstraintVertexPositions ( const Trk::RecVertexPositions vtxPositions)

Definition at line 573 of file VxJetCandidate.cxx.

◆ setLinearizationVertexPositions()

void Trk::VxJetCandidate::setLinearizationVertexPositions ( const Trk::VertexPositions vtxPositions)

Definition at line 539 of file VxJetCandidate.cxx.

541  {

◆ setPrimaryVertex()

void Trk::VxJetCandidate::setPrimaryVertex ( const VxVertexOnJetAxis newPrimary)

Definition at line 559 of file VxJetCandidate.cxx.

559  {
560  return m_clusteringTable;
561 }
562 

◆ setRecVertex()

void Trk::VxCandidate::setRecVertex ( Trk::RecVertex recVertex)
inlineinherited

RecVertex set method.

Definition at line 126 of file VxCandidate.h.

127 {
129 }

◆ setRecVertexPositions()

void Trk::VxJetCandidate::setRecVertexPositions ( const Trk::RecVertexPositions newPositions)

Definition at line 527 of file VxJetCandidate.cxx.

529  {

◆ setTrackParticlesOrigin()

void Trk::VxJetCandidate::setTrackParticlesOrigin ( const Trk::TrackParticleBaseCollection trackParticleTES)

Definition at line 218 of file VxJetCandidate.cxx.

218  {
219  linkTT->setStorableObject(*trackParticleTES);
220  }
221  (*tracksIter)->setOrigTrack(linkTT);
222 
223  }
224 
225 }
226 
228  : VxCandidate(rhs)
232 {
233 
234  m_recVertex = rhs.m_recVertex;
235 

◆ setTracksOrigin()

void Trk::VxJetCandidate::setTracksOrigin ( const TrackCollection trackTES)

Definition at line 199 of file VxJetCandidate.cxx.

199  {
200  linkTT->setStorableObject(*trackTES);
201  }
202  (*tracksIter)->setOrigTrack(linkTT);
203 
204  }
205 
206 }
207 
209 
212 
213  for (std::vector<Trk::VxTrackAtVertex*>::iterator tracksIter=tracksBegin;
214  tracksIter!=tracksEnd;++tracksIter) {
215 
216  ITrackLink* IlinkTT=(*tracksIter)->trackOrParticleLink();

◆ setVertexType()

void Trk::VxCandidate::setVertexType ( VertexType  vertexType)
inlineinherited

return the type of the vertex

Definition at line 114 of file VxCandidate.h.

115 {
117 }

◆ setVerticesOnJetAxis()

void Trk::VxJetCandidate::setVerticesOnJetAxis ( const std::vector< VxVertexOnJetAxis * > &  newVertices)

Definition at line 547 of file VxJetCandidate.cxx.

549  {

◆ vertexType()

VertexType Trk::VxCandidate::vertexType ( ) const
inlineinherited

return the type of the vertex

Definition at line 120 of file VxCandidate.h.

121 {
122  return m_vertexType;
123 }

◆ vxTrackAtVertex() [1/2]

std::vector< Trk::VxTrackAtVertex * > * Trk::VxCandidate::vxTrackAtVertex ( void  )
inlineinherited

Unconst pointer to the vector of tracks Required by some of the vertex fitters.

Definition at line 144 of file VxCandidate.h.

145 {
146  return &m_vxTrackAtVertex;
147 }

◆ vxTrackAtVertex() [2/2]

const std::vector< Trk::VxTrackAtVertex * > * Trk::VxCandidate::vxTrackAtVertex ( void  ) const
inlineinherited

Const access to the vector of tracks fitted to the vertex.

Definition at line 150 of file VxCandidate.h.

151 {
152  return &m_vxTrackAtVertex;
153 }

Member Data Documentation

◆ m_clusteringTable

Trk::VxClusteringTable* Trk::VxJetCandidate::m_clusteringTable
protected

Definition at line 123 of file VxJetCandidate.h.

◆ m_constraintPositions

Trk::RecVertexPositions Trk::VxJetCandidate::m_constraintPositions
protected

Definition at line 120 of file VxJetCandidate.h.

◆ m_debugInfo

Trk::VxJetFitterDebugInfo* Trk::VxJetCandidate::m_debugInfo
protected

Definition at line 122 of file VxJetCandidate.h.

◆ m_fittedPositions

Trk::RecVertexPositions Trk::VxJetCandidate::m_fittedPositions
protected

Definition at line 118 of file VxJetCandidate.h.

◆ m_linearizationPositions

Trk::VertexPositions Trk::VxJetCandidate::m_linearizationPositions
protected

Definition at line 119 of file VxJetCandidate.h.

◆ m_primaryVertex

Trk::VxVertexOnJetAxis* Trk::VxJetCandidate::m_primaryVertex
protected

Definition at line 117 of file VxJetCandidate.h.

◆ m_recVertex

Trk::RecVertex Trk::VxCandidate::m_recVertex
protectedinherited

Definition at line 99 of file VxCandidate.h.

◆ m_vertexType

Trk::VertexType Trk::VxCandidate::m_vertexType
protectedinherited

Definition at line 96 of file VxCandidate.h.

◆ m_verticesOnJetAxis

std::vector<VxVertexOnJetAxis*> Trk::VxJetCandidate::m_verticesOnJetAxis
protected

Definition at line 121 of file VxJetCandidate.h.

◆ m_vxTrackAtVertex

std::vector<Trk::VxTrackAtVertex*> Trk::VxCandidate::m_vxTrackAtVertex
protectedinherited

Definition at line 102 of file VxCandidate.h.

◆ s_numberOfInstantiations

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

Definition at line 22 of file TrkObjectCounter.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Trk::VxJetCandidate::setConstraintVertexPositions
void setConstraintVertexPositions(const Trk::RecVertexPositions &)
Definition: VxJetCandidate.cxx:573
Trk::VxCandidate::recVertex
const Trk::RecVertex & recVertex(void) const
Returns a reference to reconstructed vertex.
Definition: VxCandidate.h:132
Trk::VxTrackAtVertex
The VxTrackAtVertex is a common class for all present TrkVertexFitters The VxTrackAtVertex is designe...
Definition: VxTrackAtVertex.h:77
Trk::VxVertexOnJetAxis::getTracksAtVertex
const std::vector< VxTrackAtVertex * > & getTracksAtVertex(void) const
get Tracks At Vertex Method
Definition: VxVertexOnJetAxis.cxx:102
Trk::VxCandidate::m_vertexType
Trk::VertexType m_vertexType
Definition: VxCandidate.h:96
Trk::VxJetCandidate::m_clusteringTable
Trk::VxClusteringTable * m_clusteringTable
Definition: VxJetCandidate.h:123
Trk::VxJetCandidate::m_verticesOnJetAxis
std::vector< VxVertexOnJetAxis * > m_verticesOnJetAxis
Definition: VxJetCandidate.h:121
Trk::VxCandidate::vertexType
VertexType vertexType() const
return the type of the vertex
Definition: VxCandidate.h:120
Trk::VxJetCandidate::m_linearizationPositions
Trk::VertexPositions m_linearizationPositions
Definition: VxJetCandidate.h:119
Trk::VxJetCandidate::setTracksOrigin
void setTracksOrigin(const TrackCollection *)
Definition: VxJetCandidate.cxx:199
Trk::VxJetCandidate::setTrackParticlesOrigin
void setTrackParticlesOrigin(const Trk::TrackParticleBaseCollection *)
Definition: VxJetCandidate.cxx:218
Trk::VxJetCandidate::operator=
VxJetCandidate & operator=(const VxJetCandidate &)
Assignement operator.
Definition: VxJetCandidate.cxx:345
Trk::VxJetCandidate::getRecVertexPositions
const Trk::RecVertexPositions & getRecVertexPositions() const
Definition: VxJetCandidate.cxx:519
Trk::TrackParticleBase
Definition: TrackParticleBase.h:41
Trk::VxCandidate::VxCandidate
VxCandidate()
Default constructor for persistency.
Definition: VxCandidate.cxx:27
Trk::VxCandidate::m_recVertex
Trk::RecVertex m_recVertex
Definition: VxCandidate.h:99
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::VxCandidate::m_vxTrackAtVertex
std::vector< Trk::VxTrackAtVertex * > m_vxTrackAtVertex
Definition: VxCandidate.h:102
Trk::VxJetCandidate::~VxJetCandidate
virtual ~VxJetCandidate()
Definition: VxJetCandidate.cxx:483
Trk::VxJetCandidate::setRecVertexPositions
void setRecVertexPositions(const Trk::RecVertexPositions &)
Definition: VxJetCandidate.cxx:527
DataVector< Trk::Track >
Trk::VxJetCandidate::m_constraintPositions
Trk::RecVertexPositions m_constraintPositions
Definition: VxJetCandidate.h:120
Trk::RecVertexPositions
Definition: RecVertexPositions.h:34
Trk::ObjectCounter< Trk::VxCandidate >::s_numberOfInstantiations
static std::atomic_size_t s_numberOfInstantiations
Definition: TrkObjectCounter.h:22
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
Trk::VxJetCandidate::m_primaryVertex
Trk::VxVertexOnJetAxis * m_primaryVertex
Definition: VxJetCandidate.h:117
Trk::VxTrackAtVertex::clone
virtual VxTrackAtVertex * clone() const
Clone method.
Definition: VxTrackAtVertex.cxx:373
Trk::VxJetCandidate::VxJetCandidate
VxJetCandidate()
Definition: VxJetCandidate.cxx:45
Trk::VxVertexOnJetAxis::setTracksAtVertex
void setTracksAtVertex(std::vector< VxTrackAtVertex * > tracksAtVertex)
set Tracks At Vertex Method
Definition: VxVertexOnJetAxis.cxx:106
Trk::VxJetCandidate::m_fittedPositions
Trk::RecVertexPositions m_fittedPositions
Definition: VxJetCandidate.h:118
Trk::VxJetCandidate::m_debugInfo
Trk::VxJetFitterDebugInfo * m_debugInfo
Definition: VxJetCandidate.h:122