Assignement operator.
360 if (*DelVtxIter!=
nullptr) {
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;
374 std::map<Trk::VxTrackAtVertex*,Trk::VxTrackAtVertex*> oldToNewPointer;
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) {
380 std::cout <<
" Pointer of one of the tracks of the object to copy is zero. PROBLEM! Skipping track " << std::endl;
384 oldToNewPointer[*itr]=newVxTrackPointer;
388 m_primaryVertex=(rhs.m_primaryVertex!=
nullptr) ?
new VxVertexOnJetAxis(*rhs.m_primaryVertex) :
nullptr;
390 if (rhs.m_primaryVertex!=
nullptr) {
391 const std::vector<VxTrackAtVertex*> & primaryVectorTracks=rhs.m_primaryVertex->
getTracksAtVertex();
393 const std::vector<VxTrackAtVertex*>::const_iterator primaryVectorTracksBegin=primaryVectorTracks.begin();
394 const std::vector<VxTrackAtVertex*>::const_iterator primaryVectorTracksEnd=primaryVectorTracks.end();
396 std::vector<VxTrackAtVertex*> primaryVectorNew;
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);
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;
413 std::cout <<
"VxJetCandidate EDM class: Warning in COPY: no primary vertex present" << std::endl;
417 std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=rhs.m_verticesOnJetAxis.begin();
418 std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=rhs.m_verticesOnJetAxis.end();
420 for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;
423 if (*VtxIter!=
nullptr) {
425 VxVertexOnJetAxis* newVertexOnJetAxis=
new VxVertexOnJetAxis(**VtxIter);
429 std::vector<VxTrackAtVertex*> vertexVectorNew;
431 const std::vector<VxTrackAtVertex*> & TracksAtVertex=(*VtxIter)->getTracksAtVertex();
433 const std::vector<VxTrackAtVertex*>::const_iterator TracksBegin=TracksAtVertex.begin();
434 const std::vector<VxTrackAtVertex*>::const_iterator TracksEnd=TracksAtVertex.end();
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);
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;
447 newVertexOnJetAxis->setTracksAtVertex(std::move(vertexVectorNew));
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;
457 if (rhs.m_debugInfo!=
nullptr) {
458 m_debugInfo=
new VxJetFitterDebugInfo(*rhs.m_debugInfo);