LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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...
 
Vector_t StartDirection () 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...
 
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...
 
Deprecated methods

— BEGIN Deprecated methods ----------------------------------------—

Temporarily kept for backward compatibility but soon to be removed.

Deprecated:
All these recob::Track methods are deprecated.
 Track (std::vector< TVector3 > const &xyz, std::vector< TVector3 > const &dxdydz, std::vector< std::vector< double > > dQdx=std::vector< std::vector< double > >(0), std::vector< double > fitMomentum=std::vector< double >(2, util::kBogusD), int ID=-1)
 Covariance matrices are either set or not. More...
 
 Track (std::vector< TVector3 > const &xyz, std::vector< TVector3 > const &dxdydz, std::vector< TMatrixD > const &cov, std::vector< std::vector< double > > dQdx=std::vector< std::vector< double > >(0), std::vector< double > fitMomentum=std::vector< double >(2, util::kBogusD), int ID=-1)
 Covariance matrices are either set or not. More...
 
size_t NumberCovariance () const
 Covariance matrices are either set or not. More...
 
TVector3 DirectionAtPoint (unsigned int p) const
 Covariance matrices are either set or not. More...
 
TVector3 LocationAtPoint (unsigned int p) const
 Covariance matrices are either set or not. More...
 
TMatrixD CovarianceAtPoint (unsigned int p) const
 Covariance matrices are either set or not. More...
 
size_t NumberFitMomentum () const
 Covariance matrices are either set or not. More...
 
TVector3 Vertex () const
 Covariance matrices are either set or not. More...
 
TVector3 End () const
 Covariance matrices are either set or not. More...
 
TVector3 VertexDirection () const
 Covariance matrices are either set or not. More...
 
TVector3 EndDirection () const
 Covariance matrices are either set or not. More...
 
TMatrixD VertexCovariance () const
 Covariance matrices are either set or not. More...
 
TMatrixD EndCovariance () const
 Covariance matrices are either set or not. More...
 
void TrajectoryAtPoint (unsigned int p, TVector3 &pos, TVector3 &dir) const
 Covariance matrices are either set or not. More...
 
void Extent (std::vector< double > &xyzStart, std::vector< double > &xyzEnd) const
 Covariance matrices are either set or not. More...
 
void Direction (double *dcosStart, double *dcosEnd) const
 Covariance matrices are either set or not. More...
 
size_t NumberdQdx (geo::View_t view=geo::kUnknown) const
 Covariance matrices are either set or not. More...
 
const double & DQdxAtPoint (unsigned int p, geo::View_t view=geo::kUnknown) const
 Covariance matrices are either set or not. More...
 
void GlobalToLocalRotationAtPoint (unsigned int p, TMatrixD &rot) const
 Covariance matrices are either set or not. More...
 
void LocalToGlobalRotationAtPoint (unsigned int p, TMatrixD &rot) const
 Covariance matrices are either set or not. 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...
 
std::vector< std::vector< double > > fdQdx
 

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.

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 51 of file Track.h.

Member Typedef Documentation

Definition at line 70 of file Track.h.

Definition at line 58 of file Track.h.

Definition at line 55 of file Track.h.

Definition at line 57 of file Track.h.

Definition at line 59 of file Track.h.

Definition at line 65 of file Track.h.

Definition at line 64 of file Track.h.

Definition at line 62 of file Track.h.

Definition at line 63 of file Track.h.

Definition at line 67 of file Track.h.

Definition at line 66 of file Track.h.

Definition at line 56 of file Track.h.

Constructor & Destructor Documentation

recob::Track::Track ( )
default

Referenced by Track().

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

Definition at line 92 of file Track.h.

94  : fTraj(Traj), fPId(PId), fChi2(Chi2), fNdof(Ndof), fCovVertex(CovVertex), fCovEnd(CovEnd),fID(tkID),fdQdx(0) { };
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:78
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:79
float Chi2() const
Access to various track properties.
Definition: Track.h:175
std::vector< std::vector< double > > fdQdx
Definition: Track.h:83
int fID
track&#39;s ID
Definition: Track.h:80
float fChi2
Fit chi2.
Definition: Track.h:76
int Ndof() const
Access to various track properties.
Definition: Track.h:177
int fNdof
Number of degrees of freedom of the fit.
Definition: Track.h:77
int fPId
Particle ID hypothesis used in the fit (if any)
Definition: Track.h:75
recob::Track::Track ( TrackTrajectory &&  Traj,
int  PId,
float  Chi2,
int  Ndof,
SMatrixSym55 &&  CovVertex,
SMatrixSym55 &&  CovEnd,
int  tkID 
)
inline

Definition at line 96 of file Track.h.

98  : fTraj(std::move(Traj)), fPId(PId), fChi2(Chi2), fNdof(Ndof), fCovVertex(std::move(CovVertex)), fCovEnd(std::move(CovEnd)),fID(tkID),fdQdx(0) { };
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:78
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:79
float Chi2() const
Access to various track properties.
Definition: Track.h:175
std::vector< std::vector< double > > fdQdx
Definition: Track.h:83
int fID
track&#39;s ID
Definition: Track.h:80
float fChi2
Fit chi2.
Definition: Track.h:76
int Ndof() const
Access to various track properties.
Definition: Track.h:177
int fNdof
Number of degrees of freedom of the fit.
Definition: Track.h:77
int fPId
Particle ID hypothesis used in the fit (if any)
Definition: Track.h:75
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 100 of file Track.h.

102  : fTraj(std::move(positions),std::move(momenta),std::move(flags),hasMomenta), fPId(PId), fChi2(Chi2), fNdof(Ndof), fCovVertex(std::move(CovVertex)), fCovEnd(std::move(CovEnd)),fID(tkID),fdQdx(0) { };
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:78
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:79
float Chi2() const
Access to various track properties.
Definition: Track.h:175
std::vector< std::vector< double > > fdQdx
Definition: Track.h:83
int fID
track&#39;s ID
Definition: Track.h:80
float fChi2
Fit chi2.
Definition: Track.h:76
int Ndof() const
Access to various track properties.
Definition: Track.h:177
int fNdof
Number of degrees of freedom of the fit.
Definition: Track.h:77
int fPId
Particle ID hypothesis used in the fit (if any)
Definition: Track.h:75
recob::Track::Track ( std::vector< TVector3 > const &  xyz,
std::vector< TVector3 > const &  dxdydz,
std::vector< std::vector< double > >  dQdx = std::vector< std::vector<double> >(0),
std::vector< double >  fitMomentum = std::vector<double>(2, util::kBogusD),
int  ID = -1 
)
inline

Covariance matrices are either set or not.

Definition at line 227 of file Track.h.

References ID(), util::kBogusD, Track(), and lar::dump::vector().

232  : Track(xyz,dxdydz,std::vector<TMatrixT<double> >(),dQdx,fitMomentum,ID) { };
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
Track()=default
int ID() const
Definition: Track.h:205
recob::Track::Track ( std::vector< TVector3 > const &  xyz,
std::vector< TVector3 > const &  dxdydz,
std::vector< TMatrixD > const &  cov,
std::vector< std::vector< double > >  dQdx = std::vector< std::vector< double > >(0),
std::vector< double >  fitMomentum = std::vector< double >(2, util::kBogusD),
int  ID = -1 
)

Covariance matrices are either set or not.

Member Function Documentation

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

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

Definition at line 189 of file Track.h.

References recob::TrackTrajectory::AzimuthAngle().

189 { return fTraj.AzimuthAngle(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 190 of file Track.h.

References recob::TrackTrajectory::AzimuthAngle().

190 { return fTraj.AzimuthAngle(p); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 175 of file Track.h.

References fChi2.

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

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

Access to various track properties.

Definition at line 176 of file Track.h.

References util::kBogusF.

176 { return fNdof>0 ? fChi2/float(fNdof) : util::kBogusF; }
Namespace for general, non-LArSoft-specific utilities.
Definition: PIDAAlg.h:17
float fChi2
Fit chi2.
Definition: Track.h:76
int fNdof
Number of degrees of freedom of the fit.
Definition: Track.h:77
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 119 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::DrawTrack2D(), evd::RecoBaseDrawer::DrawTrack3D(), evd::RecoBaseDrawer::DrawTrackOrtho(), and trkf::Geometric3DVertexFitter::fitTwoTracks().

119 { return fTraj.CountValidPoints(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
unsigned int CountValidPoints() const
Computes and returns the number of points with valid location.
TMatrixD recob::Track::CovarianceAtPoint ( unsigned int  p) const
inline

Covariance matrices are either set or not.

Definition at line 242 of file Track.h.

References EndCovariance(), and VertexCovariance().

242 { return (p==0 ? this->VertexCovariance() : this->EndCovariance()); }
TMatrixD EndCovariance() const
Covariance matrices are either set or not.
Definition: Track.cxx:142
TMatrixD VertexCovariance() const
Covariance matrices are either set or not.
Definition: Track.cxx:131
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 169 of file Track.h.

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

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

169 { return std::pair<SMatrixSym55, SMatrixSym55>(fCovVertex,fCovEnd); }
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:78
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:79
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 168 of file Track.h.

References recob::TrackTrajectory::Direction().

168 { return fTraj.Direction(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
void Direction(double *start, double *end) const
Fills the starting and ending direction of the trajectory.
void recob::Track::Direction ( double *  dcosStart,
double *  dcosEnd 
) const
inline

Covariance matrices are either set or not.

Definition at line 254 of file Track.h.

References recob::TrackTrajectory::Direction(), DQdxAtPoint(), geo::kUnknown, and NumberdQdx().

254 { return fTraj.Direction(dcosStart, dcosEnd); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
void Direction(double *start, double *end) const
Fills the starting and ending direction of the trajectory.
TVector3 recob::Track::DirectionAtPoint ( unsigned int  p) const
inline

Covariance matrices are either set or not.

Definition at line 240 of file Track.h.

References dir, and recob::Trajectory::DirectionAtPoint().

Referenced by evd::RecoBaseDrawer::DrawTrack3D(), lar::util::TrackPitchInView(), and lar::util::TrackProjectedLength().

240 { auto dir = fTraj.DirectionAtPoint(p); return TVector3(dir.X(),dir.Y(),dir.Z()); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
Vector_t DirectionAtPoint(size_t i) const
Computes and returns the direction of the trajectory at a point.
Definition: Trajectory.cxx:157
TDirectory * dir
Definition: macro.C:5
const double & Track::DQdxAtPoint ( unsigned int  p,
geo::View_t  view = geo::kUnknown 
) const

Covariance matrices are either set or not.

Definition at line 80 of file Track.cxx.

References geo::kUnknown.

Referenced by lar_pandora::PFParticleTrackAna::analyze(), Direction(), calo::GeneralCalorimetry::produce(), and ems::ShowerInfo::ShowerInfo().

82  {
83  if(view == geo::kUnknown){
84  mf::LogWarning("Track") << "asking for unknown view to get number of dQdX entries"
85  << " return the size for the 0th view vector";
86  return fdQdx.at(0).at(p);
87  }
88 
89  return fdQdx.at(view).at(p);
90  }
Unknown view.
Definition: geo_types.h:83
std::vector< std::vector< double > > fdQdx
Definition: Track.h:83
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
TMatrixD Track::EndCovariance ( ) const

Covariance matrices are either set or not.

Definition at line 142 of file Track.cxx.

Referenced by trkf::TrackAna::analyze(), CovarianceAtPoint(), and EndDirection().

142  {
143  TMatrixD result = TMatrixD(5,5);
144  for (unsigned int i=0; i<5; i++) {
145  for (unsigned int j=0; j<5; j++) {
146  result(i,j) = fCovEnd.At(i,j);
147  }
148  }
149  return result;
150  }
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:79
Track::SMatrixSym66 Track::EndCovarianceGlobal6D ( ) const

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

Definition at line 193 of file Track.cxx.

Referenced by EndCovarianceLocal5D().

193  {
195  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:79
bool HasMomentum() const
Definition: Track.h:147
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...
Definition: TrackingPlane.h:97
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 214 of file Track.h.

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

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

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

Covariance matrices are either set or not.

Definition at line 248 of file Track.h.

References dir, EndCovariance(), recob::TrackTrajectory::EndDirection(), and VertexCovariance().

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

248 { auto dir = fTraj.EndDirection(); return TVector3(dir.X(),dir.Y(),dir.Z()); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
Vector_t EndDirection() const
Returns the direction of the trajectory at the last point.
TDirectory * dir
Definition: macro.C:5
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 151 of file Track.h.

References recob::TrackTrajectory::EndMomentum().

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

151 { return fTraj.EndMomentum(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 154 of file Track.h.

References recob::TrackTrajectory::EndMomentumVector().

154 { return fTraj.EndMomentumVector(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 168 of file Track.cxx.

Referenced by EndCovarianceLocal5D().

168  {
169  Track::SVector6 result;
170  result[0] = End()[0];
171  result[1] = End()[1];
172  result[2] = End()[2];
173  result[3] = EndDirection()[0];
174  result[4] = EndDirection()[1];
175  result[5] = EndDirection()[2];
176  return result;
177  }
tracking::SVector6 SVector6
Definition: Track.h:66
TVector3 EndDirection() const
Covariance matrices are either set or not.
Definition: Track.h:248
TVector3 End() const
Covariance matrices are either set or not.
Definition: Track.h:246
Track::SVector5 Track::EndParametersLocal5D ( ) const

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

Definition at line 184 of file Track.cxx.

Referenced by LocalToGlobalRotationAtPoint().

184  {
185  //return tracking::Plane::Global6DToLocal5DParameters(EndParametersGlobal6D(), fTraj.End(), fTraj.EndDirection());
186  return Track::SVector5(0.,0.,0.,0.,(HasMomentum() ? 1./EndMomentum() : 1. ));
187  }
double EndMomentum() const
Definition: Track.h:151
tracking::SVector5 SVector5
Definition: Track.h:67
bool HasMomentum() const
Definition: Track.h:147
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 167 of file Track.h.

Referenced by MomentumVectorAtPoint(), and TrajectoryAtPoint().

167 { return fTraj.Extent(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
void Extent(std::vector< double > &start, std::vector< double > &end) const
Fills the first and last valid point in the trajectory.
void Track::Extent ( std::vector< double > &  xyzStart,
std::vector< double > &  xyzEnd 
) const

Covariance matrices are either set or not.

Definition at line 152 of file Track.cxx.

References recob::details::legacy::FillTwoVectors().

153  { details::legacy::FillTwoVectors(Vertex(), End(), start, end); }
TVector3 Vertex() const
Covariance matrices are either set or not.
Definition: Track.h:245
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
TVector3 End() const
Covariance matrices are either set or not.
Definition: Track.h:246
void FillTwoVectors(SrcVect const &firstSource, SrcVect const &secondSource, DestVect &&firstDest, DestVect &&secondDest)
Converts two vectors into another type of vector using FillVector.
size_t recob::Track::FirstPoint ( ) const
inline

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

Definition at line 111 of file Track.h.

References recob::Trajectory::FirstPoint().

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

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

Definition at line 113 of file Track.h.

References recob::TrackTrajectory::FirstValidPoint().

113 { return fTraj.FirstValidPoint(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
size_t FirstValidPoint() const
Returns the index of the first valid point in the trajectory.
PointFlags_t const& recob::Track::FlagsAtPoint ( size_t  i) const
inline

Access to i-th TrajectoryPoint or its Flags.

Definition at line 125 of file Track.h.

References recob::TrackTrajectory::FlagsAtPoint(), HasMomentum(), recob::Trajectory::HasMomentum(), Start(), recob::TrackTrajectory::Start(), StartDirection(), and recob::TrackTrajectory::StartDirection().

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

125 { return fTraj.FlagsAtPoint(i); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
PointFlags_t const & FlagsAtPoint(size_t i) const
Returns the flags for the specified trajectory point.
Rotation_t recob::Track::GlobalToLocalRotationAtPoint ( size_t  p) const
inline

Definition at line 197 of file Track.h.

References recob::Trajectory::GlobalToLocalRotationAtPoint().

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

197 { return fTraj.GlobalToLocalRotationAtPoint(p); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
Rotation_t GlobalToLocalRotationAtPoint(size_t p) const
Returns a rotation matrix that brings trajectory direction along z.
Definition: Trajectory.cxx:173
void recob::Track::GlobalToLocalRotationAtPoint ( unsigned int  p,
TMatrixD &  rot 
) const
inline

Covariance matrices are either set or not.

Definition at line 257 of file Track.h.

References recob::Trajectory::GlobalToLocalRotationAtPoint().

257 { return fTraj.GlobalToLocalRotationAtPoint(p,rot); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
Rotation_t GlobalToLocalRotationAtPoint(size_t p) const
Returns a rotation matrix that brings trajectory direction along z.
Definition: Trajectory.cxx:173
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 147 of file Track.h.

Referenced by trkf::TrackAna::analyze(), FlagsAtPoint(), and NumberFitMomentum().

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

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

Definition at line 117 of file Track.h.

References recob::Trajectory::HasPoint().

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

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

Definition at line 118 of file Track.h.

References recob::TrackTrajectory::HasValidPoint().

Referenced by evd::RecoBaseDrawer::DrawTrack2D(), evd::RecoBaseDrawer::DrawTrack3D(), evd::RecoBaseDrawer::DrawTrackOrtho(), and trkf::TrackKalmanFitter::fillResult().

118 { return fTraj.HasValidPoint(i); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 112 of file Track.h.

References recob::Trajectory::LastPoint().

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

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

Definition at line 116 of file Track.h.

References recob::TrackTrajectory::LastValidPoint().

116 { return fTraj.LastValidPoint(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 198 of file Track.h.

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

198 { return fTraj.LocalToGlobalRotationAtPoint(p); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
Rotation_t LocalToGlobalRotationAtPoint(size_t p) const
Returns a rotation matrix bringing relative directions to global.
Definition: Trajectory.cxx:190
void recob::Track::LocalToGlobalRotationAtPoint ( unsigned int  p,
TMatrixD &  rot 
) const
inline

Covariance matrices are either set or not.

Definition at line 258 of file Track.h.

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

258 { return fTraj.LocalToGlobalRotationAtPoint(p,rot); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
Rotation_t LocalToGlobalRotationAtPoint(size_t p) const
Returns a rotation matrix bringing relative directions to global.
Definition: Trajectory.cxx:190
TVector3 recob::Track::LocationAtPoint ( unsigned int  p) const
inline

Covariance matrices are either set or not.

Definition at line 241 of file Track.h.

References recob::Trajectory::LocationAtPoint().

Referenced by calo::TrackCalorimetryAlg::AnalyzeHit(), calo::TrackCalorimetryAlg::CreatePathLengthFractionVector(), evd::RecoBaseDrawer::DrawTrack2D(), evd::RecoBaseDrawer::DrawTrack3D(), evd::RecoBaseDrawer::DrawTrackOrtho(), 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(), cosmic::CosmicTrackTagger::length(), trk::TrackContainmentAlg::MinDistanceEndPt(), trk::TrackContainmentAlg::MinDistanceStartPt(), cosmic::BeamFlashTrackMatchTaggerAlg::PrintTrackProperties(), calo::GeneralCalorimetry::produce(), cosmic::BeamFlashTrackMatchTaggerAlg::RunCompatibilityCheck(), cosmic::BeamFlashTrackMatchTaggerAlg::RunHypothesisComparison(), lar::util::TrackPitchInView(), and lar::util::TrackProjectedLength().

241 { auto& loc = fTraj.LocationAtPoint(p); return TVector3(loc.X(),loc.Y(),loc.Z()); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
Point_t const & LocationAtPoint(size_t i) const
Returns the position at the specified trajectory point.
Definition: Trajectory.h:255
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 148 of file Track.h.

References recob::Trajectory::MomentumAtPoint().

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

148 { return fTraj.MomentumAtPoint(p); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
double MomentumAtPoint(size_t i) const
Computes and returns the modulus of the momentum at a point.
Definition: Trajectory.h:477
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 155 of file Track.h.

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

155 { return fTraj.MomentumVectorAtPoint(i); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
Vector_t const & MomentumVectorAtPoint(size_t i) const
Returns the momentum vector at a point.
Definition: Trajectory.h:492
int recob::Track::Ndof ( ) const
inline

Access to various track properties.

Definition at line 177 of file Track.h.

References fNdof.

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

177 { return fNdof; }
int fNdof
Number of degrees of freedom of the fit.
Definition: Track.h:77
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 114 of file Track.h.

References recob::TrackTrajectory::NextValidPoint().

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

114 { return fTraj.NextValidPoint(index); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 110 of file Track.h.

References recob::Trajectory::NPoints().

Referenced by NumberFitMomentum().

110 { return fTraj.NPoints(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
size_t NPoints() const
Returns the number of stored trajectory points.
Definition: Trajectory.h:172
size_t recob::Track::NumberCovariance ( ) const
inline

Covariance matrices are either set or not.

Definition at line 239 of file Track.h.

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

size_t Track::NumberdQdx ( geo::View_t  view = geo::kUnknown) const

Covariance matrices are either set or not.

Definition at line 67 of file Track.cxx.

References geo::kUnknown.

Referenced by Direction(), and calo::GeneralCalorimetry::produce().

68  {
69  if (fdQdx.size() == 0) return 0;
70  if(view == geo::kUnknown){
71  mf::LogWarning("Track") << "asking for unknown view to get number of dQdX entries"
72  << " return the size for the 0th view vector";
73  return fdQdx.at(0).size();
74  }
75 
76  return fdQdx.at(view).size();
77  }
Unknown view.
Definition: geo_types.h:83
std::vector< std::vector< double > > fdQdx
Definition: Track.h:83
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
size_t recob::Track::NumberFitMomentum ( ) const
inline

Covariance matrices are either set or not.

Definition at line 244 of file Track.h.

References HasMomentum(), and NPoints().

244 { return HasMomentum()? NPoints(): 0U; }
bool HasMomentum() const
Definition: Track.h:147
size_t NPoints() const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:110
size_t recob::Track::NumberTrajectoryPoints ( ) const
inline

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

Definition at line 109 of file Track.h.

Referenced by lar_pandora::PFParticleTrackAna::analyze(), lar_pandora::PFParticleAnalysis::analyze(), trkf::TrackAna::analyze(), trkf::Track3DKalmanHit::createOutputs(), calo::TrackCalorimetryAlg::CreatePathLengthFractionVector(), 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(), cosmic::CosmicTrackTagger::length(), trk::TrackContainmentAlg::MinDistanceEndPt(), trk::TrackContainmentAlg::MinDistanceStartPt(), recob::operator<<(), cosmic::BeamFlashTrackMatchTaggerAlg::PrintTrackProperties(), TrackProducerFromTrack::produce(), TrackProducerFromTrackTrajectory::produce(), calo::GeneralCalorimetry::produce(), TrackProducerFromPFParticle::produce(), cosmic::CosmicTrackTagger::produce(), trkf::KalmanFilterTrajectoryFitter::restoreInputPoints(), trkf::KalmanFilterFinalTrackFitter::restoreInputPoints(), trkmkr::KalmanFilterFitTrackMaker::restoreInputPoints(), cosmic::BeamFlashTrackMatchTaggerAlg::RunCompatibilityCheck(), cosmic::BeamFlashTrackMatchTaggerAlg::RunHypothesisComparison(), lar::util::TrackPitchInView(), lar::util::TrackProjectedLength(), and Trajectory().

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

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

Definition at line 185 of file Track.h.

References recob::TrackTrajectory::Phi().

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

185 { return fTraj.Phi(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 186 of file Track.h.

References recob::TrackTrajectory::Phi().

186 { return fTraj.Phi(p); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 115 of file Track.h.

References recob::TrackTrajectory::PreviousValidPoint().

115 { return fTraj.PreviousValidPoint(index); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
size_t PreviousValidPoint(size_t index) const
Returns the index of the previous valid point in the trajectory.
Point_t const& recob::Track::Start ( ) const
inline

Access to track position at different points.

Definition at line 130 of file Track.h.

Referenced by trkf::Geometric3DVertexFitter::addTrackToVertex(), trkf::Geometric3DVertexFitter::closestPointAlongTrack(), trkf::TrackKalmanFitter::fillResult(), trkf::Geometric3DVertexFitter::fitTwoTracks(), and FlagsAtPoint().

130 { return fTraj.Start(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 160 of file Track.h.

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

160 { return fCovVertex; }
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:78
Vector_t recob::Track::StartDirection ( ) const
inline

Access to track direction at different points.

Definition at line 138 of file Track.h.

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

138 { return fTraj.StartDirection(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 150 of file Track.h.

References recob::TrackTrajectory::StartMomentum().

150 { return fTraj.StartMomentum(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 153 of file Track.h.

References recob::TrackTrajectory::StartMomentumVector().

153 { return fTraj.StartMomentumVector(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 183 of file Track.h.

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

183 { return fTraj.Theta(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 184 of file Track.h.

References recob::TrackTrajectory::Theta().

184 { return fTraj.Theta(p); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
double Theta(size_t p) const
Trajectory angle at point, with respect to positive z direction.
void recob::Track::TrajectoryAtPoint ( unsigned int  p,
TVector3 &  pos,
TVector3 &  dir 
) const
inline

Covariance matrices are either set or not.

Definition at line 251 of file Track.h.

References Extent(), and recob::Trajectory::TrajectoryAtPoint().

Referenced by lar_pandora::PFParticleTrackAna::analyze().

251 { fTraj.TrajectoryAtPoint(p,pos,dir); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
bool TrajectoryAtPoint(size_t i, TVector3 &pos, TVector3 &dir) const
Fills position and direction at the specified trajectory point.
Definition: Trajectory.cxx:66
TDirectory * dir
Definition: macro.C:5
TrajectoryPoint_t recob::Track::TrajectoryPoint ( size_t  i) const
inline

Access to i-th TrajectoryPoint or its Flags.

Definition at line 124 of file Track.h.

Referenced by CountValidPoints().

124 { return fTraj.TrajectoryPoint(i); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
TrajectoryPoint_t TrajectoryPoint(size_t i) const
Returns position and momentum at the specified trajectory point.
Definition: Trajectory.h:231
TMatrixD Track::VertexCovariance ( ) const

Covariance matrices are either set or not.

Definition at line 131 of file Track.cxx.

Referenced by trkf::TrackAna::analyze(), CovarianceAtPoint(), and EndDirection().

131  {
132  TMatrixD result = TMatrixD(5,5);
133  for (unsigned int i=0; i<5; i++) {
134  for (unsigned int j=0; j<5; j++) {
135  result(i,j) = fCovVertex.At(i,j);
136  }
137  }
138  return result;
139  }
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:78
Track::SMatrixSym66 Track::VertexCovarianceGlobal6D ( ) const

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

Definition at line 189 of file Track.cxx.

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

189  {
191  }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:78
bool HasMomentum() const
Definition: Track.h:147
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...
Definition: TrackingPlane.h:97
const SMatrixSym55& recob::Track::VertexCovarianceLocal5D ( ) const
inline

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

Definition at line 213 of file Track.h.

References fCovVertex.

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

213 { return fCovVertex; }
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:78
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 149 of file Track.h.

References recob::TrackTrajectory::VertexMomentum().

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

149 { return fTraj.VertexMomentum(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 152 of file Track.h.

References recob::TrackTrajectory::VertexMomentumVector().

152 { return fTraj.VertexMomentumVector() ; }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 157 of file Track.cxx.

Referenced by EndCovarianceLocal5D().

157  {
158  Track::SVector6 result;
159  result[0] = Vertex()[0];
160  result[1] = Vertex()[1];
161  result[2] = Vertex()[2];
162  result[3] = VertexDirection()[0];
163  result[4] = VertexDirection()[1];
164  result[5] = VertexDirection()[2];
165  return result;
166  }
TVector3 VertexDirection() const
Covariance matrices are either set or not.
Definition: Track.h:247
tracking::SVector6 SVector6
Definition: Track.h:66
TVector3 Vertex() const
Covariance matrices are either set or not.
Definition: Track.h:245
Track::SVector5 Track::VertexParametersLocal5D ( ) const

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

Definition at line 179 of file Track.cxx.

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

179  {
180  //return tracking::Plane::Global6DToLocal5DParameters(VertexParametersGlobal6D(), fTraj.Vertex(), fTraj.VertexDirection());
181  return Track::SVector5(0.,0.,0.,0.,(HasMomentum() ? 1./VertexMomentum() : 1. ));
182  }
double VertexMomentum() const
Definition: Track.h:149
tracking::SVector5 SVector5
Definition: Track.h:67
bool HasMomentum() const
Definition: Track.h:147
double recob::Track::ZenithAngle ( ) const
inline

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

Definition at line 187 of file Track.h.

References recob::TrackTrajectory::ZenithAngle().

187 { return fTraj.ZenithAngle(); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 188 of file Track.h.

References recob::TrackTrajectory::ZenithAngle().

188 { return fTraj.ZenithAngle(p); }
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:74
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 122 of file Track.cxx.

Referenced by LocalToGlobalRotationAtPoint().

123  {
124  if(a.ID() != b. ID())
125  return a.ID() < b.ID();
126 
127  return false; //They are equal
128  }
int ID() const
Definition: Track.h:205
std::ostream& operator<< ( std::ostream &  stream,
Track const &  a 
)
friend

— END Deprecated methods ------------------------------------------—

Definition at line 95 of file Track.cxx.

Referenced by LocalToGlobalRotationAtPoint().

96  {
97  //double dcoss[3];
98  //double dcose[3];
99  //a.Direction(dcoss,dcose);
100  TVector3 const& start = a.VertexDirection();
101  TVector3 const& end = a.EndDirection();
102  stream << std::setiosflags(std::ios::fixed) << std::setprecision(3)
103  << "\n Track ID " << std::setw(4) << std::right << a.ID()
104  << " Theta = " << std::setw(6) << std::right << a.Theta()
105  << " Phi = " << std::setw(6) << std::right << a.Phi()
106  << "\n StartCosines : ( " << start.X() << " ; " << start.Y() << " ; " << start.Z()
107  << ") EndCosines : ( " << end.X() << " ; " << end.Y() << " ; " << end.Z()
108  << ")"
109  << "\n #Position and Direction = "
110  << std::setw(5) << std::right << a.NumberTrajectoryPoints()
111  << " #Covariance = " << std::setw(6) << std::right << a.NumberCovariance()
112  << " #dQdx = " << std::setw(6) << std::right;
113  for(size_t i = 0; i < a.fdQdx.size(); ++i)
114  stream << " " << a.fdQdx.at(i).size();
115 
116  stream << std::endl;
117 
118  return stream;
119  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)

Member Data Documentation

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

Fit chi2.

Definition at line 76 of file Track.h.

Referenced by Chi2().

SMatrixSym55 recob::Track::fCovEnd
protected

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

Definition at line 79 of file Track.h.

Referenced by Covariances(), and EndCovarianceLocal5D().

SMatrixSym55 recob::Track::fCovVertex
protected

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

Definition at line 78 of file Track.h.

Referenced by Covariances(), MomentumVectorAtPoint(), and VertexCovarianceLocal5D().

std::vector< std::vector <double> > recob::Track::fdQdx
protected

charge deposition per unit length at points along track outer vector index is over view

Definition at line 83 of file Track.h.

Referenced by recob::operator<<().

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

track's ID

Definition at line 80 of file Track.h.

Referenced by LocalToGlobalRotationAtPoint().

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

Number of degrees of freedom of the fit.

Definition at line 77 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 75 of file Track.h.

Referenced by ParticleId().

TrackTrajectory recob::Track::fTraj
protected

Stored trajectory data member.

Definition at line 74 of file Track.h.

Referenced by Trajectory().


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