Skip to content
Snippets Groups Projects
Commit e5423ed0 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'Trk__Track_documentation_const' into 'master'

Trk  Track update documentation for const changes

See merge request atlas/athena!23354
parents 491e5b82 dddbc2aa
No related branches found
No related tags found
No related merge requests found
/* /*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/ */
#ifndef TRKTRACK_H #ifndef TRKTRACK_H
...@@ -36,28 +36,50 @@ namespace Trk ...@@ -36,28 +36,50 @@ namespace Trk
* allowing a Track to be incomplete (and in general a Track WILL be * allowing a Track to be incomplete (and in general a Track WILL be
* incomplete). * incomplete).
* *
* A Track can contain: * A Track typically is constructed via
* *
* - Trk::FitQuality - the fit quality of a track * - Trk::FitQuality - the fit quality of a track
* - Trk::TrackStateOnSurface - this is a sub-container, which holds * - A DataVector of Trk::TrackStateOnSurface
* various properties defining a Track, *
* on a particular surface. It can contain: * A TrackStateOnSurface is a sub-container, which holds
* various properties defining a Track, on a particular surface.
* It can contain:
* - Trk::FitQualityOnSurface * - Trk::FitQualityOnSurface
* - Trk::TrackParameters * - Trk::TrackParameters
* - Trk::MeasurementBase * - Trk::MeasurementBase
* - Trk::MaterialEffectsOnTrack * - Trk::MaterialEffectsOnTrack
* - Trk::ScatteringAngleOnTrack * - Trk::ScatteringAngleOnTrack
*
* This class provides convenient helpers to retrieve and cache
* DataVectors (VIEW ELEMENTs) to
* - TrackParameters
* - Measurements
* - Outliers
* from the TrackStateOnSurface DataVector
*
* It also allows for retrieving/caching
* the Track Parameter at perigee
*
*
* Furthermore a Track can contain
* - Trk::TrackInfo * - Trk::TrackInfo
* - Trk::TrackSummary - used to cache the TrackSummary. Might be 0!
* *
* - Trk::TrackSummary - used to cash TrackSummary. Might be 0! * They can be modified for a non-const Track
* One still needs to use the TrackSummaryTool to create it. * But not for a const one
* SummaryTool will return the cashed pointer if it exists. *
* For the TrackSummary one still needs
* to use the TrackSummaryTool to create it.
*The SummaryTool will return the cashed pointer if it exists.
*
* *
* Please look at the mainpage of this package (see the link at the top * Please look at the mainpage of this package (see the link at the top
* of the page) for more information. * of the page) for more information.
* *
* @author edward.moyse@cern.ch * @author edward.moyse@cern.ch
* @author Kirill.Prokofiev@cern.ch * @author Kirill.Prokofiev@cern.ch
*
* MT modification Christos
*/ */
class Track class Track
...@@ -159,25 +181,31 @@ namespace Trk ...@@ -159,25 +181,31 @@ namespace Trk
return m_trackStateVector; return m_trackStateVector;
} }
/** /**
* returns the const info of the track for const tracks. * returns a const info for const tracks.
*/ */
const TrackInfo& info() const{ const TrackInfo& info() const{
return m_trackInfo; return m_trackInfo;
} }
/** /**
* returns the info of the track for non-const tracks. * returns the info (non-const) for non-const tracks.
*/ */
TrackInfo& info() { TrackInfo& info() {
return m_trackInfo; return m_trackInfo;
} }
/** /**
* Returns A pointer to the Trk::TrackSummary owned by this track (could be 0) * Returns a const pointer to the Trk::TrackSummary owned by this const track (could be 0)
*/ */
const Trk::TrackSummary* trackSummary() const{ const Trk::TrackSummary* trackSummary() const{
return m_trackSummary; return m_trackSummary;
} }
/**
* Returns a pointer to the Trk::TrackSummary owned by this track (could be 0)
*/
Trk::TrackSummary* trackSummary() {
return m_trackSummary;
}
/** /**
* reset all caches * reset all caches
...@@ -261,7 +289,7 @@ namespace Trk ...@@ -261,7 +289,7 @@ namespace Trk
/** /**
* Datamember to cache the TrackSummary * Datamember to cache the TrackSummary
*/ */
const Trk::TrackSummary* m_trackSummary; Trk::TrackSummary* m_trackSummary;
/** /**
* This is aclass which stores the identity of where the track * This is aclass which stores the identity of where the track
...@@ -275,7 +303,7 @@ namespace Trk ...@@ -275,7 +303,7 @@ namespace Trk
private: private:
/** /**
* find PerigeeImpl. * find PerigeeImpl.
* Assumes that Perigee parameters are currently inValid * Assumes that Perigee parameters are currently inValid.
*/ */
void findPerigeeImpl() const; void findPerigeeImpl() const;
......
...@@ -369,7 +369,7 @@ void Trk::TrackSummaryTool::updateSharedHitCount(Track& track) const ...@@ -369,7 +369,7 @@ void Trk::TrackSummaryTool::updateSharedHitCount(Track& track) const
createSummary( track, true ); createSummary( track, true );
return; return;
} }
Trk::TrackSummary* tSummary = const_cast<Trk::TrackSummary*>(track.m_trackSummary); Trk::TrackSummary* tSummary = track.m_trackSummary;
m_idTool->updateSharedHitCount(track, *tSummary); m_idTool->updateSharedHitCount(track, *tSummary);
return; return;
} }
...@@ -381,7 +381,7 @@ void Trk::TrackSummaryTool::updateAdditionalInfo(Track& track) const ...@@ -381,7 +381,7 @@ void Trk::TrackSummaryTool::updateAdditionalInfo(Track& track) const
createSummary( track, true ); createSummary( track, true );
return; return;
} }
Trk::TrackSummary* tSummary = const_cast<Trk::TrackSummary*>(track.m_trackSummary); Trk::TrackSummary* tSummary = track.m_trackSummary;
unsigned int numberOfeProbabilityTypes = Trk::numberOfeProbabilityTypes+1; unsigned int numberOfeProbabilityTypes = Trk::numberOfeProbabilityTypes+1;
std::vector<float> eProbability(numberOfeProbabilityTypes,0.5); std::vector<float> eProbability(numberOfeProbabilityTypes,0.5);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment