 |
ATLAS Offline Software
|
Go to the documentation of this file.
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);
TrackParticleOrigin particleOriginType() const
Get the particle origin type.
TrackParticleBase & operator=(const TrackParticleBase &)
Assignement operator.
Contains information about the 'fitter' of this track.
const Trk::RecVertex & recVertex(void) const
Returns a reference to reconstructed vertex.
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
const TrackSummary * trackSummary() const
accessor function for TrackSummary.
virtual MsgStream & dump(MsgStream &out) const
Dump methods to be used by the overloaded stream operator (inheritance!)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
virtual ~TrackParticleBase()
Destructor.
@ NoVtx
Dummy vertex, TrackParticle was not used in vertex fit.
const ElementLink< TrackCollection > * trackElementLink() const
Return the ElementLink to the Track.
ElementLink< VxContainer > m_elVxCandidate
ElementLink to a VxCandidate.
TrackParticleBase()
Constructor 0 standard constructor which sets everything to 0, needed for persistency.
const FitQuality * fitQuality() const
accessor function for FitQuality.
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
bool setElement(ElementType element)
Set to point to an element.
Ensure that the ATLAS eigen extensions are properly loaded.
const VxCandidate * reconstructedVertex() const
Get a pointer to the primary vertex.
A summary of the information contained by a track.
const std::vector< const TrackParameters * > & trackParameters() const
Returns the track parameters.
std::string dumpInfo() const
Returns a string with the name of the fitter of this track (i.e.
bool isDefault() const
Test to see if this link is in the default state.
const FitQuality * m_fitQuality
the fit quality of this TrackParticle.
FitQualityOnSurface fitQuality(const MultiComponentState &, const MeasurementBase &)
Method for determining the chi2 of the multi-component state and the number of degrees of freedom.
TrackInfo m_trackInfo
This is a class which stores the identity of where the track was created, fitted,...
std::vector< const TrackParameters * > m_trackParameters
DataVector of TrackParameters stored inside this TrackParticle.
const TrackSummary * m_trackSummary
the summary of this TrackParticle.
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
ElementLink< TrackCollection > m_originalTrack
ElementLink to the Track used to create this TrackParticleBase object Before writing to disk,...
TrackParticleOrigin m_trackParticleOrigin
specifies the origin type of the particle (prim.vertex, ...)
TrackSummary_v1 TrackSummary