12 #include "GaudiKernel/MsgStream.h"
21 m_trackParticleOrigin(
NoVtx),
24 m_trackSummary(nullptr),
25 m_fitQuality(nullptr),
28 #ifdef DEBUG_CTOR_DTOR
29 std::cout<<
"TrackParticleBase blank ctr :"<<
this<<std::endl;
38 std::vector<const TrackParameters*>&
parameters,
43 m_trackParticleOrigin( trkPrtOrigin ),
46 m_trackSummary( trkSummary ),
49 #ifdef DEBUG_CTOR_DTOR
50 std::cout<<
"TrackParticleBase ctr :"<<
this<<std::endl;
54 assert ((vxCandidate!=
nullptr)||(trkPrtOrigin==
NoVtx));
72 std::unique_ptr<Trk::TrackSummary> trkSummary,
73 std::vector<const Trk::TrackParameters*>&&
parameters,
77 m_originalTrack(trackLink),
78 m_trackParticleOrigin( trkPrtOrigin ),
79 m_elVxCandidate(vxCandidate),
81 m_trackSummary( trkSummary.
release() ),
94 m_originalTrack(rhs.m_originalTrack),
95 m_trackParticleOrigin(rhs.m_trackParticleOrigin),
96 m_elVxCandidate(rhs.m_elVxCandidate),
98 m_trackSummary( (rhs.m_trackSummary) ?
new TrackSummary(*(rhs.m_trackSummary)) : nullptr ),
99 m_fitQuality( (rhs.m_fitQuality) ?
new FitQuality(*(rhs.m_fitQuality)) : nullptr ),
100 m_trackInfo(rhs.m_trackInfo)
103 #ifdef DEBUG_CTOR_DTOR
104 std::cout<<
"TrackParticleBase copy ctr :"<<
this<<std::endl;
108 std::vector<const TrackParameters*>::const_iterator itEnd = rhs.
m_trackParameters.end();
125 std::vector<const TrackParameters*>::const_iterator itEnd =
m_trackParameters.end();
126 for (;
it!=itEnd; ++
it) {
delete (*it);
150 delete m_trackSummary;
152 rhs.m_trackSummary =
nullptr;
155 m_fitQuality = rhs.m_fitQuality;
156 rhs.m_fitQuality =
nullptr;
162 m_trackParameters = std::move(rhs.m_trackParameters);
164 m_originalTrack = rhs.m_originalTrack;
165 m_trackParticleOrigin = rhs.m_trackParticleOrigin;
166 m_elVxCandidate = rhs.m_elVxCandidate;
168 m_trackInfo = rhs.m_trackInfo;
177 #ifdef DEBUG_CTOR_DTOR
178 std::cout<<
"TrackParticleBase dtor :"<<
this<<std::endl;
181 std::vector<const TrackParameters*>::const_iterator itEnd =
m_trackParameters.end();
182 for (;
it!=itEnd; ++
it) {
delete (*it);
196 sl <<
"The ElementLink<TrackCollection> is valid." <<
endmsg;
199 sl <<
"The ElementLink<TrackCollection> is NOT valid." <<
endmsg;
209 sl <<
"TrackParticle has " <<
trackParameters.size() <<
" track parameters. Printing them:" <<
endmsg;
212 sl << (*trackParameter) <<
endmsg;
214 sl<<
"TrackInfo inherited from original Track comes below:"<<
endmsg;
221 sl <<
"Printing TrackParticle. OriginType: " << this->
particleOriginType() << std::endl;
224 sl <<
"The ElementLink<TrackCollection> is valid." << std::endl;
227 sl <<
"The ElementLink<TrackCollection> is NOT valid." << std::endl;
237 sl <<
"TrackParticle has " <<
trackParameters.size() <<
" track parameters. Printing them:" << std::endl;
240 sl << (*trackParameter) << std::endl;
242 sl<<
"TrackInfo inherited from original Track comes below:"<<std::endl;
249 trackParticleBase.
dump(sl);
255 trackParticleBase.
dump(sl);