LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
recob::Track Class Reference

Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track: More...

#include "Track.h"

Public Types

using Point_t = tracking::Point_t
 
using Vector_t = tracking::Vector_t
 
using Positions_t = tracking::Positions_t
 
using Momenta_t = tracking::Momenta_t
 
using Rotation_t = tracking::Rotation_t
 
using TrajectoryPoint_t = tracking::TrajectoryPoint_t
 
using SMatrixSym55 = tracking::SMatrixSym55
 
using SMatrixSym66 = tracking::SMatrixSym66
 
using SMatrix65 = tracking::SMatrix65
 
using SMatrix56 = tracking::SMatrix56
 
using SVector6 = tracking::SVector6
 
using SVector5 = tracking::SVector5
 
using PointFlags_t = TrackTrajectory::PointFlags_t
 
using Flags_t = TrackTrajectory::Flags_t
 

Public Member Functions

 Track ()=default
 
 Track (TrackTrajectory const &Traj, int PId, float Chi2, int Ndof, SMatrixSym55 const &CovVertex, SMatrixSym55 const &CovEnd, int tkID)
 
 Track (TrackTrajectory &&Traj, int PId, float Chi2, int Ndof, SMatrixSym55 &&CovVertex, SMatrixSym55 &&CovEnd, int tkID)
 
 Track (Positions_t &&positions, Momenta_t &&momenta, Flags_t &&flags, bool hasMomenta, int PId, float Chi2, int Ndof, SMatrixSym55 &&CovVertex, SMatrixSym55 &&CovEnd, int tkID)
 
const recob::TrackTrajectoryTrajectory () const
 Access to the stored recob::TrackTrajectory. More...
 
size_t NumberTrajectoryPoints () const
 Various functions related to the presence and the number of (valid) points. More...
 
size_t NPoints () const
 Various functions related to the presence and the number of (valid) points. More...
 
size_t FirstPoint () const
 Various functions related to the presence and the number of (valid) points. More...
 
size_t LastPoint () const
 Various functions related to the presence and the number of (valid) points. More...
 
size_t FirstValidPoint () const
 Various functions related to the presence and the number of (valid) points. More...
 
size_t NextValidPoint (size_t index) const
 Various functions related to the presence and the number of (valid) points. More...
 
size_t PreviousValidPoint (size_t index) const
 Various functions related to the presence and the number of (valid) points. More...
 
size_t LastValidPoint () const
 Various functions related to the presence and the number of (valid) points. More...
 
bool HasPoint (size_t i) const
 Various functions related to the presence and the number of (valid) points. More...
 
bool HasValidPoint (size_t i) const
 Various functions related to the presence and the number of (valid) points. More...
 
unsigned int CountValidPoints () const
 Various functions related to the presence and the number of (valid) points. More...
 
TrajectoryPoint_t TrajectoryPoint (size_t i) const
 Access to i-th TrajectoryPoint or its Flags. More...
 
PointFlags_t const & FlagsAtPoint (size_t i) const
 Access to i-th TrajectoryPoint or its Flags. More...
 
Point_t const & Start () const
 Access to track position at different points. More...
 
Point_t const & Vertex () const
 Access to track position at different points. More...
 
Point_t const & End () const
 Access to track position at different points. More...
 
Point_t const & LocationAtPoint (size_t i) const
 Access to track position at different points. More...
 
Vector_t StartDirection () const
 Access to track direction at different points. More...
 
Vector_t VertexDirection () const
 Access to track direction at different points. More...
 
Vector_t EndDirection () const
 Access to track direction at different points. More...
 
Vector_t DirectionAtPoint (size_t i) const
 Access to track direction at different points. More...
 
bool HasMomentum () const
 
double MomentumAtPoint (unsigned int p) const
 
double VertexMomentum () const
 
double StartMomentum () const
 
double EndMomentum () const
 
Vector_t const & VertexMomentumVector () const
 
Vector_t const & StartMomentumVector () const
 
Vector_t const & EndMomentumVector () const
 
Vector_t const & MomentumVectorAtPoint (size_t i) const
 
const SMatrixSym55StartCovariance () const
 Access to covariance matrices. More...
 
const SMatrixSym55VertexCovariance () const
 Access to covariance matrices. More...
 
const SMatrixSym55EndCovariance () const
 Access to covariance matrices. More...
 
std::pair< Point_t, Point_tExtent () const
 Access to position, momentum or covariance at the start and end of the track. More...
 
std::pair< Vector_t, Vector_tDirection () const
 Access to position, momentum or covariance at the start and end of the track. More...
 
std::pair< SMatrixSym55, SMatrixSym55Covariances () const
 Access to position, momentum or covariance at the start and end of the track. More...
 
double Length (size_t p=0) const
 Access to various track properties. More...
 
float Chi2 () const
 Access to various track properties. More...
 
float Chi2PerNdof () const
 Access to various track properties. More...
 
int Ndof () const
 Access to various track properties. More...
 
int ParticleId () const
 Access to various track properties. More...
 
double Theta () const
 Access to spherical or geographical angles at vertex or at any point. More...
 
double Theta (size_t p) const
 Access to spherical or geographical angles at vertex or at any point. More...
 
double Phi () const
 Access to spherical or geographical angles at vertex or at any point. More...
 
double Phi (size_t p) const
 Access to spherical or geographical angles at vertex or at any point. More...
 
double ZenithAngle () const
 Access to spherical or geographical angles at vertex or at any point. More...
 
double ZenithAngle (size_t p) const
 Access to spherical or geographical angles at vertex or at any point. More...
 
double AzimuthAngle () const
 Access to spherical or geographical angles at vertex or at any point. More...
 
double AzimuthAngle (size_t p) const
 Access to spherical or geographical angles at vertex or at any point. More...
 
Rotation_t GlobalToLocalRotationAtPoint (size_t p) const
 
Rotation_t LocalToGlobalRotationAtPoint (size_t p) const
 
SVector5 VertexParametersLocal5D () const
 Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates. More...
 
SVector5 EndParametersLocal5D () const
 Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates. More...
 
const SMatrixSym55VertexCovarianceLocal5D () const
 Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates. More...
 
const SMatrixSym55EndCovarianceLocal5D () const
 Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates. More...
 
SVector6 VertexParametersGlobal6D () const
 Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates. More...
 
SVector6 EndParametersGlobal6D () const
 Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates. More...
 
SMatrixSym66 VertexCovarianceGlobal6D () const
 Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates. More...
 
SMatrixSym66 EndCovarianceGlobal6D () const
 Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates. More...
 
Templated version of homonymous functions to access to position, direction, momentum information, and covariances.
template<typename T >
Start () const
 Start position. Use e.g. as: More...
 
template<typename T >
Vertex () const
 Start position. Use e.g. as: More...
 
template<typename T >
End () const
 End position. Use e.g. as: More...
 
template<typename T >
LocationAtPoint (unsigned int p) const
 Position at point p. Use e.g. as: More...
 
template<typename T >
StartDirection () const
 Start direction. Use e.g. as: More...
 
template<typename T >
VertexDirection () const
 Start direction. Use e.g. as: More...
 
template<typename T >
EndDirection () const
 End direction. Use e.g. as: More...
 
template<typename T >
DirectionAtPoint (unsigned int p) const
 Direction at point p. Use e.g. as: More...
 
template<typename T >
StartMomentumVector () const
 Momentum vector at start point. Use e.g. as: More...
 
template<typename T >
VertexMomentumVector () const
 Momentum vector at start point. Use e.g. as: More...
 
template<typename T >
EndMomentumVector () const
 Momentum vector at end point. Use e.g. as: More...
 
template<typename T >
MomentumVectorAtPoint (unsigned int p) const
 Momentum vector at point p. Use e.g. as: More...
 
template<typename T >
StartCovariance () const
 Covariance matrix at start point. Use e.g. as: More...
 
template<typename T >
VertexCovariance () const
 Covariance matrix at start point. Use e.g. as: More...
 
template<typename T >
EndCovariance () const
 Covariance matrix at end point. Use e.g. as: More...
 
template<typename T >
std::pair< T, T > Extent () const
 Position at start and end points. Use e.g. as: More...
 
template<typename T >
std::pair< T, T > Direction () const
 Direction at start and end points. Use e.g. as: More...
 
template<typename T >
GlobalToLocalRotationAtPoint (unsigned int p) const
 Returns a rotation matrix that brings trajectory direction along z. Use e.g. as: More...
 
template<typename T >
LocalToGlobalRotationAtPoint (unsigned int p) const
 Returns a rotation matrix bringing relative directions to global. Use e.g. as: More...
 

Protected Attributes

TrackTrajectory fTraj
 Stored trajectory data member. More...
 
int fPId = 0
 Particle ID hypothesis used in the fit (if any) More...
 
float fChi2 = -1.
 Fit chi2. More...
 
int fNdof = 0.
 Number of degrees of freedom of the fit. More...
 
SMatrixSym55 fCovVertex
 Covariance matrix (local 5D representation) at start point (vertex) More...
 
SMatrixSym55 fCovEnd
 Covariance matrix (local 5D representation) at end point. More...
 
int fID = -1
 track's ID More...
 

Friends

std::ostream & operator<< (std::ostream &stream, Track const &a)
 
int ID () const
 
bool operator< (const Track &a, const Track &b)
 

Detailed Description

Track from a non-cascading particle.

A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:

  • fit χ²
  • number of degrees of freedom
  • particle ID hypothesis used in the fit (if any)
  • covariance matrices at start (vertex) and end positions.

Please refer to the recob::TrackTrajectory documentation for more information about it; for a discussion on the object type for coordinates see recob::tracking::Coord_t.

In terms of interface, recob::Track extends recob::TrackTrajectory, so that methods of the stored recob::TrackTrajectory can be called directly from the recob::Track interface, e.g.:

Two different parameter conventions are used in a recob::Track, and functions to convert from one to the other are provided:

  1. Trajectory points and momenta (or directions) are in form of 3-vectors, corresponding to a global Cartesian 6D representation
  2. Covariance matrices are stored in a Local 5D representation (so that the covariance matrix is invertible), where the parameters are defined on the plane orthogonal to the track direction at a given track point. By construction the local parameters of the track itself are (0,0,0,0,1/p). See lardataobj/RecoBase/TrackingPlane.h for more information.

Definition at line 49 of file Track.h.

Member Typedef Documentation

Definition at line 67 of file Track.h.

Definition at line 55 of file Track.h.

Definition at line 52 of file Track.h.

Definition at line 54 of file Track.h.

Definition at line 56 of file Track.h.

Definition at line 62 of file Track.h.

Definition at line 61 of file Track.h.

Definition at line 59 of file Track.h.

Definition at line 60 of file Track.h.

Definition at line 64 of file Track.h.

Definition at line 63 of file Track.h.

Definition at line 53 of file Track.h.

Constructor & Destructor Documentation

recob::Track::Track ( )
default
recob::Track::Track ( TrackTrajectory const &  Traj,
int  PId,
float  Chi2,
int  Ndof,
SMatrixSym55 const &  CovVertex,
SMatrixSym55 const &  CovEnd,
int  tkID 
)
inline

Definition at line 83 of file Track.h.

90  : fTraj(Traj)
91  , fPId(PId)
92  , fChi2(Chi2)
93  , fNdof(Ndof)
94  , fCovVertex(CovVertex)
95  , fCovEnd(CovEnd)
96  , fID(tkID){};
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:75
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:76
float Chi2() const
Access to various track properties.
Definition: Track.h:208
int fID
track&#39;s ID
Definition: Track.h:77
float fChi2
Fit chi2.
Definition: Track.h:72
int Ndof() const
Access to various track properties.
Definition: Track.h:210
int fNdof
Number of degrees of freedom of the fit.
Definition: Track.h:73
int fPId
Particle ID hypothesis used in the fit (if any)
Definition: Track.h:71
recob::Track::Track ( TrackTrajectory &&  Traj,
int  PId,
float  Chi2,
int  Ndof,
SMatrixSym55 &&  CovVertex,
SMatrixSym55 &&  CovEnd,
int  tkID 
)
inline

Definition at line 98 of file Track.h.

105  : fTraj(std::move(Traj))
106  , fPId(PId)
107  , fChi2(Chi2)
108  , fNdof(Ndof)
109  , fCovVertex(std::move(CovVertex))
110  , fCovEnd(std::move(CovEnd))
111  , fID(tkID){};
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:75
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:76
float Chi2() const
Access to various track properties.
Definition: Track.h:208
int fID
track&#39;s ID
Definition: Track.h:77
float fChi2
Fit chi2.
Definition: Track.h:72
int Ndof() const
Access to various track properties.
Definition: Track.h:210
int fNdof
Number of degrees of freedom of the fit.
Definition: Track.h:73
int fPId
Particle ID hypothesis used in the fit (if any)
Definition: Track.h:71
recob::Track::Track ( Positions_t &&  positions,
Momenta_t &&  momenta,
Flags_t &&  flags,
bool  hasMomenta,
int  PId,
float  Chi2,
int  Ndof,
SMatrixSym55 &&  CovVertex,
SMatrixSym55 &&  CovEnd,
int  tkID 
)
inline

Definition at line 113 of file Track.h.

123  : fTraj(std::move(positions), std::move(momenta), std::move(flags), hasMomenta)
124  , fPId(PId)
125  , fChi2(Chi2)
126  , fNdof(Ndof)
127  , fCovVertex(std::move(CovVertex))
128  , fCovEnd(std::move(CovEnd))
129  , fID(tkID){};
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:75
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:76
float Chi2() const
Access to various track properties.
Definition: Track.h:208
int fID
track&#39;s ID
Definition: Track.h:77
float fChi2
Fit chi2.
Definition: Track.h:72
int Ndof() const
Access to various track properties.
Definition: Track.h:210
int fNdof
Number of degrees of freedom of the fit.
Definition: Track.h:73
int fPId
Particle ID hypothesis used in the fit (if any)
Definition: Track.h:71

Member Function Documentation

double recob::Track::AzimuthAngle ( ) const
inline

Access to spherical or geographical angles at vertex or at any point.

Definition at line 222 of file Track.h.

References recob::TrackTrajectory::AzimuthAngle().

222 { return fTraj.AzimuthAngle(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
double AzimuthAngle(size_t p) const
"Azimuth" angle of trajectory, with respect to the sky.
double recob::Track::AzimuthAngle ( size_t  p) const
inline

Access to spherical or geographical angles at vertex or at any point.

Definition at line 223 of file Track.h.

References recob::TrackTrajectory::AzimuthAngle().

223 { return fTraj.AzimuthAngle(p); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
double AzimuthAngle(size_t p) const
"Azimuth" angle of trajectory, with respect to the sky.
float recob::Track::Chi2 ( ) const
inline

Access to various track properties.

Definition at line 208 of file Track.h.

References fChi2.

Referenced by trkf::KalmanFilterTrajectoryFitter::restoreInputPoints(), trkf::KalmanFilterFinalTrackFitter::restoreInputPoints(), and trkmkr::KalmanFilterFitTrackMaker::restoreInputPoints().

208 { return fChi2; }
float fChi2
Fit chi2.
Definition: Track.h:72
float recob::Track::Chi2PerNdof ( ) const
inline

Access to various track properties.

Definition at line 209 of file Track.h.

References util::kBogusF.

Referenced by trkf::TrackKalmanFitter::fillResult().

209 { return fNdof > 0 ? fChi2 / float(fNdof) : util::kBogusF; }
Namespace for general, non-LArSoft-specific utilities.
Definition: PIDAAlg.h:26
float fChi2
Fit chi2.
Definition: Track.h:72
int fNdof
Number of degrees of freedom of the fit.
Definition: Track.h:73
constexpr float kBogusF
obviously bogus float value
unsigned int recob::Track::CountValidPoints ( ) const
inline

Various functions related to the presence and the number of (valid) points.

Definition at line 146 of file Track.h.

References recob::TrackTrajectory::CountValidPoints(), TrajectoryPoint(), and recob::Trajectory::TrajectoryPoint().

Referenced by trkf::Geometric3DVertexFitter::addTrackToVertex(), RecoProxyUsageExample::analyze(), trkf::Geometric3DVertexFitter::closestPointAlongTrack(), evd::RecoBaseDrawer::DrawTrack3D(), evd::RecoBaseDrawer::DrawTrackOrtho(), and trkf::Geometric3DVertexFitter::fitTwoTracks().

146 { return fTraj.CountValidPoints(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
unsigned int CountValidPoints() const
Computes and returns the number of points with valid location.
std::pair<SMatrixSym55, SMatrixSym55> recob::Track::Covariances ( ) const
inline

Access to position, momentum or covariance at the start and end of the track.

Definition at line 199 of file Track.h.

References fCovEnd, fCovVertex, Length(), and recob::TrackTrajectory::Length().

Referenced by trkf::KalmanFilterTrajectoryFitter::restoreInputPoints(), trkf::KalmanFilterFinalTrackFitter::restoreInputPoints(), and trkmkr::KalmanFilterFitTrackMaker::restoreInputPoints().

200  {
201  return std::pair<SMatrixSym55, SMatrixSym55>(fCovVertex, fCovEnd);
202  }
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:75
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:76
std::pair<Vector_t, Vector_t> recob::Track::Direction ( ) const
inline

Access to position, momentum or covariance at the start and end of the track.

Definition at line 198 of file Track.h.

References recob::TrackTrajectory::Direction().

198 { return fTraj.Direction(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
std::pair< T, T > Direction() const
Fills the starting and ending direction of the trajectory.
template<typename T >
std::pair<T, T> recob::Track::Direction ( ) const
inline

Direction at start and end points. Use e.g. as:

TVector3 startdir, enddir; std::tie(startdir, enddir) = track.Direction<TVector3>();

.

Definition at line 371 of file Track.h.

References recob::TrackTrajectory::Direction().

372  {
373  return fTraj.Direction<T>();
374  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
std::pair< T, T > Direction() const
Fills the starting and ending direction of the trajectory.
template<typename T >
T recob::Track::DirectionAtPoint ( unsigned int  p) const
inline

Direction at point p. Use e.g. as:

TVector3 dir = track.DirectionAtPoint<TVector3>(p);

.

Definition at line 314 of file Track.h.

References recob::TrackTrajectory::DirectionAtPoint().

315  {
316  return fTraj.DirectionAtPoint<T>(p);
317  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
T DirectionAtPoint(unsigned int p) const
Direction at point p. Use e.g. as:
template<typename T >
T recob::Track::End ( ) const
inline

End position. Use e.g. as:

TVector3 end = track.End<TVector3>();

.

Definition at line 279 of file Track.h.

References recob::TrackTrajectory::End().

280  {
281  return fTraj.End<T>();
282  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Point_t const & End() const
Returns the position of the last valid point of the trajectory [cm].
const SMatrixSym55& recob::Track::EndCovariance ( ) const
inline

Access to covariance matrices.

Definition at line 192 of file Track.h.

References Extent(), recob::TrackTrajectory::Extent(), and fCovEnd.

Referenced by trkf::TrackAna::analyze(), and VertexCovariance().

192 { return fCovEnd; }
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:76
template<typename T >
T Track::EndCovariance ( ) const
inline

Covariance matrix at end point. Use e.g. as:

TMatrixD endcov = track.EndCovariance<TMatrixD>();

.

Definition at line 409 of file Track.h.

References fCovEnd.

410 {
411  T result = T(5, 5);
412  for (unsigned int i = 0; i < 5; i++) {
413  for (unsigned int j = 0; j < 5; j++) {
414  result(i, j) = fCovEnd.At(i, j);
415  }
416  }
417  return result;
418 }
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:76
Track::SMatrixSym66 Track::EndCovarianceGlobal6D ( ) const

Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.

Definition at line 87 of file Track.cxx.

References recob::TrackTrajectory::EndDirection(), recob::TrackTrajectory::EndMomentumVector(), fCovEnd, fTraj, HasMomentum(), and recob::tracking::Plane::Local5DToGlobal6DCovariance().

Referenced by EndCovarianceLocal5D().

88  {
91  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:76
bool HasMomentum() const
Definition: Track.h:174
SMatrixSym66 Local5DToGlobal6DCovariance(SMatrixSym55 cov5d, bool hasMomentum, const Vector_t &trackMomOrDir) const
Translate track covariance from local to global coordinates. The track momentum (or direction) is nee...
Vector_t EndDirection() const
Returns the direction of the trajectory at the last point.
Vector_t const & EndMomentumVector() const
Returns the momentum of the trajectory at the last valid point [GeV/c].
const SMatrixSym55& recob::Track::EndCovarianceLocal5D ( ) const
inline

Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.

Definition at line 253 of file Track.h.

References EndCovarianceGlobal6D(), EndParametersGlobal6D(), fCovEnd, VertexCovarianceGlobal6D(), and VertexParametersGlobal6D().

Referenced by trkf::KalmanFilterFinalTrackFitter::produce().

253 { return fCovEnd; }
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:76
Vector_t recob::Track::EndDirection ( ) const
inline

Access to track direction at different points.

Definition at line 167 of file Track.h.

References recob::TrackTrajectory::EndDirection().

Referenced by lar_pandora::PFParticleAnalysis::analyze(), trkf::TrackAna::analyze(), recob::DumpTracks::DumpTrack(), EndParametersGlobal6D(), lar_pandora::PFParticleCosmicAna::FillRecoTree(), trkf::StitchAlg::FindHeadsAndTails(), DUNE::MuonTrackingEff::FuncDistanceAndAngleBetweenTracks(), shower::TCShowerAlg::makeShowers(), and recob::operator<<().

167 { return fTraj.EndDirection(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Vector_t EndDirection() const
Returns the direction of the trajectory at the last point.
template<typename T >
T recob::Track::EndDirection ( ) const
inline

End direction. Use e.g. as:

TVector3 enddir = track.EndDirection<TVector3>();

.

Definition at line 307 of file Track.h.

References recob::TrackTrajectory::EndDirection().

308  {
309  return fTraj.EndDirection<T>();
310  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Vector_t EndDirection() const
Returns the direction of the trajectory at the last point.
double recob::Track::EndMomentum ( ) const
inline

Access to track momentum at different points. The user must check that HasMomentum() returns true to ensure the validity of the result of these functions.

Definition at line 178 of file Track.h.

References recob::TrackTrajectory::EndMomentum().

Referenced by trkf::TrackAna::analyze(), and EndParametersLocal5D().

178 { return fTraj.EndMomentum(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
double EndMomentum() const
Vector_t const& recob::Track::EndMomentumVector ( ) const
inline

Access to track momentum at different points. The user must check that HasMomentum() returns true to ensure the validity of the result of these functions.

Definition at line 181 of file Track.h.

References recob::TrackTrajectory::EndMomentumVector().

181 { return fTraj.EndMomentumVector(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Vector_t const & EndMomentumVector() const
Returns the momentum of the trajectory at the last valid point [GeV/c].
template<typename T >
T recob::Track::EndMomentumVector ( ) const
inline

Momentum vector at end point. Use e.g. as:

TVector3 endmom = track.EndMomentumVector<TVector3>();

.

Definition at line 335 of file Track.h.

References recob::TrackTrajectory::EndMomentumVector().

336  {
337  return fTraj.EndMomentumVector<T>();
338  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Vector_t const & EndMomentumVector() const
Returns the momentum of the trajectory at the last valid point [GeV/c].
Track::SVector6 Track::EndParametersGlobal6D ( ) const

Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.

Definition at line 57 of file Track.cxx.

References End(), and EndDirection().

Referenced by EndCovarianceLocal5D().

58  {
59  Track::SVector6 result;
60  result[0] = End().X();
61  result[1] = End().Y();
62  result[2] = End().Z();
63  result[3] = EndDirection().X();
64  result[4] = EndDirection().Y();
65  result[5] = EndDirection().Z();
66  return result;
67  }
tracking::SVector6 SVector6
Definition: Track.h:63
Vector_t EndDirection() const
Access to track direction at different points.
Definition: Track.h:167
Point_t const & End() const
Access to track position at different points.
Definition: Track.h:159
Track::SVector5 Track::EndParametersLocal5D ( ) const

Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.

Definition at line 75 of file Track.cxx.

References EndMomentum(), and HasMomentum().

Referenced by LocalToGlobalRotationAtPoint().

76  {
77  //return tracking::Plane::Global6DToLocal5DParameters(EndParametersGlobal6D(), fTraj.End(), fTraj.EndDirection());
78  return Track::SVector5(0., 0., 0., 0., (HasMomentum() ? 1. / EndMomentum() : 1.));
79  }
double EndMomentum() const
Definition: Track.h:178
tracking::SVector5 SVector5
Definition: Track.h:64
bool HasMomentum() const
Definition: Track.h:174
std::pair<Point_t, Point_t> recob::Track::Extent ( ) const
inline

Access to position, momentum or covariance at the start and end of the track.

Definition at line 197 of file Track.h.

Referenced by EndCovariance().

197 { return fTraj.Extent(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
std::pair< T, T > Extent() const
Fills the first and last valid point in the trajectory.
template<typename T >
std::pair<T, T> recob::Track::Extent ( ) const
inline

Position at start and end points. Use e.g. as:

TVector3 start, end; std::tie(start, end) = track.Extent<TVector3>();

.

Definition at line 364 of file Track.h.

References recob::TrackTrajectory::Extent().

365  {
366  return fTraj.Extent<T>();
367  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
std::pair< T, T > Extent() const
Fills the first and last valid point in the trajectory.
size_t recob::Track::FirstPoint ( ) const
inline

Various functions related to the presence and the number of (valid) points.

Definition at line 138 of file Track.h.

References recob::Trajectory::FirstPoint().

138 { return fTraj.FirstPoint(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
size_t FirstPoint() const
Returns the index of the first point in the trajectory (yep, it&#39;s 0).
Definition: Trajectory.h:156
size_t recob::Track::FirstValidPoint ( ) const
inline

Various functions related to the presence and the number of (valid) points.

Definition at line 140 of file Track.h.

References recob::TrackTrajectory::FirstValidPoint().

140 { return fTraj.FirstValidPoint(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
size_t FirstValidPoint() const
Returns the index of the first valid point in the trajectory.
Rotation_t recob::Track::GlobalToLocalRotationAtPoint ( size_t  p) const
inline

Definition at line 230 of file Track.h.

References recob::TrackTrajectory::GlobalToLocalRotationAtPoint().

Referenced by trkf::TrackAna::analyze().

231  {
233  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
T GlobalToLocalRotationAtPoint(unsigned int p) const
Returns a rotation matrix that brings trajectory direction along z. Use e.g. as:
template<typename T >
T recob::Track::GlobalToLocalRotationAtPoint ( unsigned int  p) const
inline

Returns a rotation matrix that brings trajectory direction along z. Use e.g. as:

TMatrixD rot = track.GlobalToLocalRotationAtPoint<TMatrixD>(p);

.

Definition at line 378 of file Track.h.

References recob::TrackTrajectory::GlobalToLocalRotationAtPoint().

379  {
380  return fTraj.GlobalToLocalRotationAtPoint<T>(p);
381  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
T GlobalToLocalRotationAtPoint(unsigned int p) const
Returns a rotation matrix that brings trajectory direction along z. Use e.g. as:
bool recob::Track::HasMomentum ( ) const
inline

Access to track momentum at different points. The user must check that HasMomentum() returns true to ensure the validity of the result of these functions.

Definition at line 174 of file Track.h.

Referenced by trkf::TrackAna::analyze(), DirectionAtPoint(), EndCovarianceGlobal6D(), EndParametersLocal5D(), VertexCovarianceGlobal6D(), and VertexParametersLocal5D().

174 { return fTraj.HasMomentum(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
bool HasMomentum() const
Returns whether information about the momentum is available.
Definition: Trajectory.h:387
bool recob::Track::HasPoint ( size_t  i) const
inline

Various functions related to the presence and the number of (valid) points.

Definition at line 144 of file Track.h.

References recob::Trajectory::HasPoint().

144 { return fTraj.HasPoint(i); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
bool HasPoint(size_t i) const
Returns whether the specified trajectory point is available.
Definition: Trajectory.h:166
bool recob::Track::HasValidPoint ( size_t  i) const
inline

Various functions related to the presence and the number of (valid) points.

Definition at line 145 of file Track.h.

References recob::TrackTrajectory::HasValidPoint().

Referenced by evd::RecoBaseDrawer::DrawTrack2D(), evd::RecoBaseDrawer::DrawTrack3D(), evd::RecoBaseDrawer::DrawTrackOrtho(), trkf::TrackKalmanFitter::fillResult(), trkf::TrackMomentumCalculator::GetMomentumMultiScatterChi2(), trkf::TrackMomentumCalculator::GetMomentumMultiScatterLLHD(), and calo::GnocchiCalorimetry::HitIsValid().

145 { return fTraj.HasValidPoint(i); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
bool HasValidPoint(size_t i) const
Returns whether the specified point has NoPoint flag unset.
size_t recob::Track::LastPoint ( ) const
inline

Various functions related to the presence and the number of (valid) points.

Definition at line 139 of file Track.h.

References recob::Trajectory::LastPoint().

139 { return fTraj.LastPoint(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
size_t LastPoint() const
Returns the index of the last point in the trajectory.
Definition: Trajectory.h:159
size_t recob::Track::LastValidPoint ( ) const
inline

Various functions related to the presence and the number of (valid) points.

Definition at line 143 of file Track.h.

References recob::TrackTrajectory::LastValidPoint().

143 { return fTraj.LastValidPoint(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
size_t LastValidPoint() const
Returns the index of the last valid point in the trajectory.
Rotation_t recob::Track::LocalToGlobalRotationAtPoint ( size_t  p) const
inline

Definition at line 234 of file Track.h.

References EndParametersLocal5D(), fID, ID(), recob::TrackTrajectory::LocalToGlobalRotationAtPoint(), operator<, and VertexParametersLocal5D().

235  {
237  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
T LocalToGlobalRotationAtPoint(unsigned int p) const
Returns a rotation matrix bringing relative directions to global. Use e.g. as:
template<typename T >
T recob::Track::LocalToGlobalRotationAtPoint ( unsigned int  p) const
inline

Returns a rotation matrix bringing relative directions to global. Use e.g. as:

TMatrixD rot = track.LocalToGlobalRotationAtPoint<TMatrixD>(p);

.

Definition at line 385 of file Track.h.

References recob::TrackTrajectory::LocalToGlobalRotationAtPoint(), and operator<<.

386  {
387  return fTraj.LocalToGlobalRotationAtPoint<T>(p);
388  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
T LocalToGlobalRotationAtPoint(unsigned int p) const
Returns a rotation matrix bringing relative directions to global. Use e.g. as:
Point_t const& recob::Track::LocationAtPoint ( size_t  i) const
inline

Access to track position at different points.

Definition at line 160 of file Track.h.

References recob::TrackTrajectory::LocationAtPoint(), StartDirection(), and recob::TrackTrajectory::StartDirection().

Referenced by lar_pandora::PFParticleTrackAna::analyze(), calo::TrackCalorimetryAlg::AnalyzeHit(), ShowerRecoTools::ShowerTrackStartPosition::CalculateElement(), ShowerRecoTools::ShowerTrackDirection::CalculateElement(), ShowerRecoTools::ShowerTrackTrajPointDirection::CalculateElement(), ShowerRecoTools::ShowerTrackTrajToSpacePoint::CalculateElement(), ShowerRecoTools::ShowerTrackColinearTrajPointDirection::CalculateElement(), ShowerRecoTools::ShowerTrajPointdEdx::CalculateElement(), calo::TrackCalorimetryAlg::CreatePathLengthFractionVector(), shower::LArPandoraShowerAlg::DebugEVD(), evd::RecoBaseDrawer::DrawTrack2D(), evd::RecoBaseDrawer::DrawTrack3D(), evd::RecoBaseDrawer::DrawTrackOrtho(), recob::DumpTracks::DumpTrack(), calo::TrackCalorimetryAlg::ExtractCalorimetry(), lar_pandora::PFParticleHitDumper::FillRecoTracks(), opdet::FlashHypothesisCreator::GetFlashHypothesisCollection(), calo::GnocchiCalorimetry::GetLocation(), calo::GnocchiCalorimetry::GetLocationAtWires(), cosmic::BeamFlashTrackMatchTaggerAlg::GetMIPHypotheses(), trkf::TrackMomentumCalculator::GetMomentumMultiScatterChi2(), trkf::TrackMomentumCalculator::GetMomentumMultiScatterLLHD(), trkf::TrackMomentumCalculator::GetMultiScatterStartingPoint(), trkf::TrackMomentumCalculator::GetMuMultiScatterLLHD3(), calo::GnocchiCalorimetry::GetPitch(), shower::TrackShowerSeparationAlg::Gradient(), trk::TrackContainmentAlg::MinDistanceEndPt(), trk::TrackContainmentAlg::MinDistanceStartPt(), cosmic::BeamFlashTrackMatchTaggerAlg::PrintTrackProperties(), calo::GnocchiCalorimetry::produce(), cosmic::BeamFlashTrackMatchTaggerAlg::RunCompatibilityCheck(), cosmic::BeamFlashTrackMatchTaggerAlg::RunHypothesisComparison(), and lar::util::TrackProjectedLength().

160 { return fTraj.LocationAtPoint(i); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
T LocationAtPoint(unsigned int p) const
Position at point p. Use e.g. as:
template<typename T >
T recob::Track::LocationAtPoint ( unsigned int  p) const
inline

Position at point p. Use e.g. as:

TVector3 pos = track.LocationAtPoint<TVector3>(p);

.

Definition at line 286 of file Track.h.

References recob::TrackTrajectory::LocationAtPoint().

287  {
288  return fTraj.LocationAtPoint<T>(p);
289  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
T LocationAtPoint(unsigned int p) const
Position at point p. Use e.g. as:
double recob::Track::MomentumAtPoint ( unsigned int  p) const
inline

Access to track momentum at different points. The user must check that HasMomentum() returns true to ensure the validity of the result of these functions.

Definition at line 175 of file Track.h.

References recob::Trajectory::MomentumAtPoint().

Referenced by trkf::TrackKalmanFitter::fillResult().

175 { return fTraj.MomentumAtPoint(p); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
double MomentumAtPoint(size_t i) const
Computes and returns the modulus of the momentum at a point.
Definition: Trajectory.h:402
Vector_t const& recob::Track::MomentumVectorAtPoint ( size_t  i) const
inline

Access to track momentum at different points. The user must check that HasMomentum() returns true to ensure the validity of the result of these functions.

Definition at line 182 of file Track.h.

References fCovVertex, recob::TrackTrajectory::MomentumVectorAtPoint(), and StartCovariance().

183  {
184  return fTraj.MomentumVectorAtPoint(i);
185  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
T MomentumVectorAtPoint(unsigned int p) const
Momentum vector at point p. Use e.g. as:
template<typename T >
T recob::Track::MomentumVectorAtPoint ( unsigned int  p) const
inline

Momentum vector at point p. Use e.g. as:

TVector3 mom = track.MomentumVectorAtPoint<TVector3>(p);

.

Definition at line 342 of file Track.h.

References recob::TrackTrajectory::MomentumVectorAtPoint(), and StartCovariance().

343  {
344  return fTraj.MomentumVectorAtPoint<T>(p);
345  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
T MomentumVectorAtPoint(unsigned int p) const
Momentum vector at point p. Use e.g. as:
int recob::Track::Ndof ( ) const
inline

Access to various track properties.

Definition at line 210 of file Track.h.

References fNdof.

Referenced by trkf::KalmanFilterTrajectoryFitter::restoreInputPoints(), and trkf::KalmanFilterFinalTrackFitter::restoreInputPoints().

210 { return fNdof; }
int fNdof
Number of degrees of freedom of the fit.
Definition: Track.h:73
size_t recob::Track::NextValidPoint ( size_t  index) const
inline

Various functions related to the presence and the number of (valid) points.

Definition at line 141 of file Track.h.

References recob::TrackTrajectory::NextValidPoint().

Referenced by trkf::TrackKalmanFitter::fillResult().

141 { return fTraj.NextValidPoint(index); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
size_t NextValidPoint(size_t index) const
Returns the index of the next valid point in the trajectory.
size_t recob::Track::NPoints ( ) const
inline

Various functions related to the presence and the number of (valid) points.

Definition at line 137 of file Track.h.

References recob::Trajectory::NPoints().

137 { return fTraj.NPoints(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
size_t NPoints() const
Returns the number of stored trajectory points.
Definition: Trajectory.h:153
size_t recob::Track::NumberTrajectoryPoints ( ) const
inline

Various functions related to the presence and the number of (valid) points.

Definition at line 136 of file Track.h.

Referenced by lar_pandora::PFParticleTrackAna::analyze(), lar_pandora::PFParticleAnalysis::analyze(), trkf::TrackAna::analyze(), ShowerRecoTools::ShowerTrackDirection::CalculateElement(), ShowerRecoTools::ShowerTrackTrajPointDirection::CalculateElement(), ShowerRecoTools::ShowerTrackTrajToSpacePoint::CalculateElement(), ShowerRecoTools::ShowerTrackColinearTrajPointDirection::CalculateElement(), ShowerRecoTools::ShowerTrajPointdEdx::CalculateElement(), trkf::Track3DKalmanHit::createOutputs(), calo::TrackCalorimetryAlg::CreatePathLengthFractionVector(), shower::LArPandoraShowerAlg::DebugEVD(), evd::RecoBaseDrawer::DrawTrack2D(), evd::RecoBaseDrawer::DrawTrack3D(), evd::RecoBaseDrawer::DrawTrackOrtho(), evd::RecoBaseDrawer::DrawTrackVertexAssns2D(), recob::DumpTracks::DumpTrack(), calo::TrackCalorimetryAlg::ExtractCalorimetry(), lar_pandora::PFParticleHitDumper::FillRecoTracks(), opdet::FlashHypothesisCreator::GetFlashHypothesisCollection(), cosmic::BeamFlashTrackMatchTaggerAlg::GetMIPHypotheses(), trkf::TrackMomentumCalculator::GetMomentumMultiScatterChi2(), trkf::TrackMomentumCalculator::GetMomentumMultiScatterLLHD(), trkf::TrackMomentumCalculator::GetMultiScatterStartingPoint(), trkf::TrackMomentumCalculator::GetMuMultiScatterLLHD3(), shower::TrackShowerSeparationAlg::Gradient(), trk::TrackContainmentAlg::MinDistanceEndPt(), trk::TrackContainmentAlg::MinDistanceStartPt(), recob::operator<<(), lar_pandora::LArPandoraEventDump::PrintTrack(), cosmic::BeamFlashTrackMatchTaggerAlg::PrintTrackProperties(), cosmic::CosmicTrackTagger::produce(), TrackProducerFromTrack::produce(), TrackProducerFromTrackTrajectory::produce(), TrackProducerFromPFParticle::produce(), trkf::KalmanFilterTrajectoryFitter::restoreInputPoints(), trkf::KalmanFilterFinalTrackFitter::restoreInputPoints(), trkmkr::KalmanFilterFitTrackMaker::restoreInputPoints(), cosmic::BeamFlashTrackMatchTaggerAlg::RunCompatibilityCheck(), cosmic::BeamFlashTrackMatchTaggerAlg::RunHypothesisComparison(), lar::util::TrackPitchInView(), lar::util::TrackProjectedLength(), and Trajectory().

136 { return fTraj.NumberTrajectoryPoints(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
size_t NumberTrajectoryPoints() const
Returns the number of stored trajectory points.
Definition: Trajectory.h:143
double recob::Track::Phi ( ) const
inline

Access to spherical or geographical angles at vertex or at any point.

Definition at line 218 of file Track.h.

References recob::TrackTrajectory::Phi().

Referenced by recob::DumpTracks::DumpTrack(), and recob::operator<<().

218 { return fTraj.Phi(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
double Phi(size_t p) const
Azimuthal angle at a point on the trajectory, with respect to z.
double recob::Track::Phi ( size_t  p) const
inline

Access to spherical or geographical angles at vertex or at any point.

Definition at line 219 of file Track.h.

References recob::TrackTrajectory::Phi().

219 { return fTraj.Phi(p); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
double Phi(size_t p) const
Azimuthal angle at a point on the trajectory, with respect to z.
size_t recob::Track::PreviousValidPoint ( size_t  index) const
inline

Various functions related to the presence and the number of (valid) points.

Definition at line 142 of file Track.h.

References recob::TrackTrajectory::PreviousValidPoint().

142 { return fTraj.PreviousValidPoint(index); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
size_t PreviousValidPoint(size_t index) const
Returns the index of the previous valid point in the trajectory.
template<typename T >
T recob::Track::Start ( ) const
inline

Start position. Use e.g. as:

TVector3 start = track.Start<TVector3>();

.

Definition at line 265 of file Track.h.

References recob::TrackTrajectory::Start().

266  {
267  return fTraj.Start<T>();
268  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Point_t const & Start() const
Returns the position of the first valid point of the trajectory [cm].
const SMatrixSym55& recob::Track::StartCovariance ( ) const
inline

Access to covariance matrices.

Definition at line 190 of file Track.h.

Referenced by trkf::TrackKalmanFitter::fillResult(), and MomentumVectorAtPoint().

190 { return fCovVertex; }
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:75
template<typename T >
T Track::StartCovariance ( ) const
inline

Covariance matrix at start point. Use e.g. as:

TMatrixD startcov = track.StartCovariance<TMatrixD>();

.

Definition at line 397 of file Track.h.

References fCovVertex.

398 {
399  T result = T(5, 5);
400  for (unsigned int i = 0; i < 5; i++) {
401  for (unsigned int j = 0; j < 5; j++) {
402  result(i, j) = fCovVertex.At(i, j);
403  }
404  }
405  return result;
406 }
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:75
Vector_t recob::Track::StartDirection ( ) const
inline

Access to track direction at different points.

Definition at line 165 of file Track.h.

Referenced by trkf::Geometric3DVertexFitter::addTrackToVertex(), trkf::TrackKalmanFitter::fillResult(), and LocationAtPoint().

165 { return fTraj.StartDirection(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Vector_t StartDirection() const
Returns the direction of the trajectory at the first point.
template<typename T >
T recob::Track::StartDirection ( ) const
inline

Start direction. Use e.g. as:

TVector3 startdir = track.StartDirection<TVector3>();

.

Definition at line 293 of file Track.h.

References recob::TrackTrajectory::StartDirection().

294  {
295  return fTraj.StartDirection<T>();
296  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Vector_t StartDirection() const
Returns the direction of the trajectory at the first point.
double recob::Track::StartMomentum ( ) const
inline

Access to track momentum at different points. The user must check that HasMomentum() returns true to ensure the validity of the result of these functions.

Definition at line 177 of file Track.h.

References recob::TrackTrajectory::StartMomentum().

177 { return fTraj.StartMomentum(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
double StartMomentum() const
Vector_t const& recob::Track::StartMomentumVector ( ) const
inline

Access to track momentum at different points. The user must check that HasMomentum() returns true to ensure the validity of the result of these functions.

Definition at line 180 of file Track.h.

References recob::TrackTrajectory::StartMomentumVector().

180 { return fTraj.StartMomentumVector(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Vector_t const & StartMomentumVector() const
Returns the momentum of the trajectory at the first valid point [GeV/c].
template<typename T >
T recob::Track::StartMomentumVector ( ) const
inline

Momentum vector at start point. Use e.g. as:

TVector3 startmom = track.StartMomentumVector<TVector3>();

.

Definition at line 321 of file Track.h.

References recob::TrackTrajectory::StartMomentumVector().

322  {
323  return fTraj.StartMomentumVector<T>();
324  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Vector_t const & StartMomentumVector() const
Returns the momentum of the trajectory at the first valid point [GeV/c].
double recob::Track::Theta ( ) const
inline

Access to spherical or geographical angles at vertex or at any point.

Definition at line 216 of file Track.h.

Referenced by recob::DumpTracks::DumpTrack(), recob::operator<<(), and ParticleId().

216 { return fTraj.Theta(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
double Theta(size_t p) const
Trajectory angle at point, with respect to positive z direction.
double recob::Track::Theta ( size_t  p) const
inline

Access to spherical or geographical angles at vertex or at any point.

Definition at line 217 of file Track.h.

References recob::TrackTrajectory::Theta().

217 { return fTraj.Theta(p); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
double Theta(size_t p) const
Trajectory angle at point, with respect to positive z direction.
TrajectoryPoint_t recob::Track::TrajectoryPoint ( size_t  i) const
inline

Access to i-th TrajectoryPoint or its Flags.

Definition at line 151 of file Track.h.

Referenced by CountValidPoints(), and lar::util::TrackPitchInView().

151 { return fTraj.TrajectoryPoint(i); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
TrajectoryPoint_t TrajectoryPoint(size_t i) const
Returns position and momentum at the specified trajectory point.
Definition: Trajectory.h:195
template<typename T >
T recob::Track::Vertex ( ) const
inline

Start position. Use e.g. as:

TVector3 vertex = track.Vertex<TVector3>();

.

Definition at line 272 of file Track.h.

References recob::TrackTrajectory::Vertex().

273  {
274  return fTraj.Vertex<T>();
275  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Point_t const & Vertex() const
Returns the position of the first valid point of the trajectory [cm].
const SMatrixSym55& recob::Track::VertexCovariance ( ) const
inline

Access to covariance matrices.

Definition at line 191 of file Track.h.

References fCovVertex.

Referenced by trkf::TrackAna::analyze().

191 { return fCovVertex; }
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:75
template<typename T >
T recob::Track::VertexCovariance ( ) const
inline

Covariance matrix at start point. Use e.g. as:

TMatrixD vertexcov = track.VertexCovariance<TMatrixD>();

.

Definition at line 353 of file Track.h.

References EndCovariance().

354  {
355  return StartCovariance<T>();
356  }
Track::SMatrixSym66 Track::VertexCovarianceGlobal6D ( ) const

Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.

Definition at line 81 of file Track.cxx.

References fCovVertex, fTraj, HasMomentum(), recob::tracking::Plane::Local5DToGlobal6DCovariance(), recob::TrackTrajectory::VertexDirection(), and recob::TrackTrajectory::VertexMomentumVector().

Referenced by trkf::Geometric3DVertexFitter::addTrackToVertex(), trkf::Geometric3DVertexFitter::closestPointAlongTrack(), EndCovarianceLocal5D(), and trkf::Geometric3DVertexFitter::fitTwoTracks().

82  {
85  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:75
bool HasMomentum() const
Definition: Track.h:174
Vector_t const & VertexMomentumVector() const
Returns the momentum of the trajectory at the first valid point [GeV/c].
Vector_t VertexDirection() const
Returns the direction of the trajectory at the first point.
SMatrixSym66 Local5DToGlobal6DCovariance(SMatrixSym55 cov5d, bool hasMomentum, const Vector_t &trackMomOrDir) const
Translate track covariance from local to global coordinates. The track momentum (or direction) is nee...
const SMatrixSym55& recob::Track::VertexCovarianceLocal5D ( ) const
inline

Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.

Definition at line 252 of file Track.h.

References fCovVertex.

Referenced by trkf::Geometric3DVertexFitter::closestPointAlongTrack(), trkf::Geometric3DVertexFitter::fitTwoTracks(), trkf::Geometric3DVertexFitter::getParsCovsOnPlane(), and trkf::KalmanFilterFinalTrackFitter::produce().

252 { return fCovVertex; }
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:75
template<typename T >
T recob::Track::VertexDirection ( ) const
inline

Start direction. Use e.g. as:

TVector3 vertexdir = track.VertexDirection<TVector3>();

.

Definition at line 300 of file Track.h.

References recob::TrackTrajectory::VertexDirection().

301  {
302  return fTraj.VertexDirection<T>();
303  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Vector_t VertexDirection() const
Returns the direction of the trajectory at the first point.
double recob::Track::VertexMomentum ( ) const
inline

Access to track momentum at different points. The user must check that HasMomentum() returns true to ensure the validity of the result of these functions.

Definition at line 176 of file Track.h.

References recob::TrackTrajectory::VertexMomentum().

Referenced by trkf::TrackAna::analyze(), trkf::KalmanFilterTrajectoryFitter::restoreInputPoints(), trkf::KalmanFilterFinalTrackFitter::restoreInputPoints(), and VertexParametersLocal5D().

176 { return fTraj.VertexMomentum(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
double VertexMomentum() const
Vector_t const& recob::Track::VertexMomentumVector ( ) const
inline

Access to track momentum at different points. The user must check that HasMomentum() returns true to ensure the validity of the result of these functions.

Definition at line 179 of file Track.h.

References recob::TrackTrajectory::VertexMomentumVector().

179 { return fTraj.VertexMomentumVector(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Vector_t const & VertexMomentumVector() const
Returns the momentum of the trajectory at the first valid point [GeV/c].
template<typename T >
T recob::Track::VertexMomentumVector ( ) const
inline

Momentum vector at start point. Use e.g. as:

TVector3 vertexmom = track.VertexMomentumVector<TVector3>();

.

Definition at line 328 of file Track.h.

References recob::TrackTrajectory::VertexMomentumVector().

329  {
330  return fTraj.VertexMomentumVector<T>();
331  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
Vector_t const & VertexMomentumVector() const
Returns the momentum of the trajectory at the first valid point [GeV/c].
Track::SVector6 Track::VertexParametersGlobal6D ( ) const

Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.

Definition at line 45 of file Track.cxx.

References Vertex(), and VertexDirection().

Referenced by EndCovarianceLocal5D().

46  {
47  Track::SVector6 result;
48  result[0] = Vertex().X();
49  result[1] = Vertex().Y();
50  result[2] = Vertex().Z();
51  result[3] = VertexDirection().X();
52  result[4] = VertexDirection().Y();
53  result[5] = VertexDirection().Z();
54  return result;
55  }
Vector_t VertexDirection() const
Access to track direction at different points.
Definition: Track.h:166
tracking::SVector6 SVector6
Definition: Track.h:63
Point_t const & Vertex() const
Access to track position at different points.
Definition: Track.h:158
Track::SVector5 Track::VertexParametersLocal5D ( ) const

Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.

Definition at line 69 of file Track.cxx.

References HasMomentum(), and VertexMomentum().

Referenced by trkf::Geometric3DVertexFitter::closestPointAlongTrack(), trkf::Geometric3DVertexFitter::fitTwoTracks(), trkf::Geometric3DVertexFitter::getParsCovsOnPlane(), and LocalToGlobalRotationAtPoint().

70  {
71  //return tracking::Plane::Global6DToLocal5DParameters(VertexParametersGlobal6D(), fTraj.Vertex(), fTraj.VertexDirection());
72  return Track::SVector5(0., 0., 0., 0., (HasMomentum() ? 1. / VertexMomentum() : 1.));
73  }
double VertexMomentum() const
Definition: Track.h:176
tracking::SVector5 SVector5
Definition: Track.h:64
bool HasMomentum() const
Definition: Track.h:174
double recob::Track::ZenithAngle ( ) const
inline

Access to spherical or geographical angles at vertex or at any point.

Definition at line 220 of file Track.h.

References recob::TrackTrajectory::ZenithAngle().

220 { return fTraj.ZenithAngle(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
double ZenithAngle(size_t p) const
"Zenith" angle of trajectory, with respect to the vertical axis.
double recob::Track::ZenithAngle ( size_t  p) const
inline

Access to spherical or geographical angles at vertex or at any point.

Definition at line 221 of file Track.h.

References recob::TrackTrajectory::ZenithAngle().

221 { return fTraj.ZenithAngle(p); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
double ZenithAngle(size_t p) const
"Zenith" angle of trajectory, with respect to the vertical axis.

Friends And Related Function Documentation

bool operator< ( const Track a,
const Track b 
)
friend

Track ID number, needed to relate a track to its possible track parent (e.g. in case of a refit). Note that art Assns to the same object are not currently supported. The < operator is based on the track ID.

Definition at line 37 of file Track.cxx.

Referenced by LocalToGlobalRotationAtPoint().

38  {
39  if (a.ID() != b.ID()) return a.ID() < b.ID();
40 
41  return false; //They are equal
42  }
std::ostream& operator<< ( std::ostream &  stream,
Track const &  a 
)
friend

Definition at line 20 of file Track.cxx.

Referenced by LocalToGlobalRotationAtPoint().

21  {
22  auto const& start = a.VertexDirection();
23  auto const& end = a.EndDirection();
24  stream << std::setiosflags(std::ios::fixed) << std::setprecision(3) << "\n Track ID "
25  << std::setw(4) << std::right << a.ID() << " Theta = " << std::setw(6) << std::right
26  << a.Theta() << " Phi = " << std::setw(6) << std::right << a.Phi()
27  << "\n StartCosines : ( " << start.X() << " ; " << start.Y() << " ; " << start.Z()
28  << ") EndCosines : ( " << end.X() << " ; " << end.Y() << " ; " << end.Z() << ")"
29  << "\n #Position and Direction = " << std::setw(5) << std::right
30  << a.NumberTrajectoryPoints();
31  stream << std::endl;
32 
33  return stream;
34  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:102
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:77

Member Data Documentation

float recob::Track::fChi2 = -1.
protected

Fit chi2.

Definition at line 72 of file Track.h.

Referenced by Chi2().

SMatrixSym55 recob::Track::fCovEnd
protected

Covariance matrix (local 5D representation) at end point.

Definition at line 76 of file Track.h.

Referenced by Covariances(), EndCovariance(), EndCovarianceGlobal6D(), and EndCovarianceLocal5D().

SMatrixSym55 recob::Track::fCovVertex
protected

Covariance matrix (local 5D representation) at start point (vertex)

Definition at line 75 of file Track.h.

Referenced by Covariances(), MomentumVectorAtPoint(), StartCovariance(), VertexCovariance(), VertexCovarianceGlobal6D(), and VertexCovarianceLocal5D().

int recob::Track::fID = -1
protected

track's ID

Definition at line 77 of file Track.h.

Referenced by LocalToGlobalRotationAtPoint().

int recob::Track::fNdof = 0.
protected

Number of degrees of freedom of the fit.

Definition at line 73 of file Track.h.

Referenced by Ndof().

int recob::Track::fPId = 0
protected

Particle ID hypothesis used in the fit (if any)

Definition at line 71 of file Track.h.

Referenced by ParticleId().

TrackTrajectory recob::Track::fTraj
protected

Stored trajectory data member.

Definition at line 70 of file Track.h.

Referenced by EndCovarianceGlobal6D(), Trajectory(), and VertexCovarianceGlobal6D().


The documentation for this class was generated from the following files: