diff --git a/Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h b/Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h index f165e7e9cf2a5b326f7d2e0906e5433b5ae488a8..2791931cd15618a6b83ed58427dd4776631b0098 100755 --- a/Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h +++ b/Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h @@ -1,5 +1,5 @@ /* - 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 @@ -36,28 +36,50 @@ namespace Trk * allowing a Track to be incomplete (and in general a Track WILL be * incomplete). * - * A Track can contain: + * A Track typically is constructed via * * - Trk::FitQuality - the fit quality of a track - * - Trk::TrackStateOnSurface - this is a sub-container, which holds - * various properties defining a Track, - * on a particular surface. It can contain: + * - A DataVector of Trk::TrackStateOnSurface + * + * A TrackStateOnSurface is a sub-container, which holds + * various properties defining a Track, on a particular surface. + * It can contain: * - Trk::FitQualityOnSurface * - Trk::TrackParameters * - Trk::MeasurementBase * - Trk::MaterialEffectsOnTrack * - 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::TrackSummary - used to cache the TrackSummary. Might be 0! * - * - Trk::TrackSummary - used to cash TrackSummary. Might be 0! - * One still needs to use the TrackSummaryTool to create it. - * SummaryTool will return the cashed pointer if it exists. + * They can be modified for a non-const Track + * But not for a const one + * + * 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 * of the page) for more information. * * @author edward.moyse@cern.ch * @author Kirill.Prokofiev@cern.ch + * + * MT modification Christos */ class Track @@ -159,25 +181,31 @@ namespace Trk return m_trackStateVector; } /** - * returns the const info of the track for const tracks. + * returns a const info for const tracks. */ const TrackInfo& info() const{ return m_trackInfo; } /** - * returns the info of the track for non-const tracks. + * returns the info (non-const) for non-const tracks. */ TrackInfo& info() { 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{ 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 @@ -261,7 +289,7 @@ namespace Trk /** * 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 @@ -275,7 +303,7 @@ namespace Trk private: /** * find PerigeeImpl. - * Assumes that Perigee parameters are currently inValid + * Assumes that Perigee parameters are currently inValid. */ void findPerigeeImpl() const; diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx index 0ad0df6dc3a1a0c58d9f9a192f57b26c9ea1c910..9ef687a6fc2709aaad7e3b0acc9af2914802a04b 100755 --- a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx +++ b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx @@ -369,7 +369,7 @@ void Trk::TrackSummaryTool::updateSharedHitCount(Track& track) const createSummary( track, true ); return; } - Trk::TrackSummary* tSummary = const_cast<Trk::TrackSummary*>(track.m_trackSummary); + Trk::TrackSummary* tSummary = track.m_trackSummary; m_idTool->updateSharedHitCount(track, *tSummary); return; } @@ -381,7 +381,7 @@ void Trk::TrackSummaryTool::updateAdditionalInfo(Track& track) const createSummary( track, true ); return; } - Trk::TrackSummary* tSummary = const_cast<Trk::TrackSummary*>(track.m_trackSummary); + Trk::TrackSummary* tSummary = track.m_trackSummary; unsigned int numberOfeProbabilityTypes = Trk::numberOfeProbabilityTypes+1; std::vector<float> eProbability(numberOfeProbabilityTypes,0.5);