9 #ifndef LARDATAOBJ_RECOBASE_TRACK_H 10 #define LARDATAOBJ_RECOBASE_TRACK_H 105 : fTraj(
std::move(Traj))
110 , fCovEnd(
std::move(CovEnd))
123 : fTraj(
std::move(positions),
std::move(momenta),
std::move(flags), hasMomenta)
128 , fCovEnd(
std::move(CovEnd))
196 inline std::pair<Point_t, Point_t>
Extent()
const {
return fTraj.
Extent(); }
206 inline double Length(
size_t p = 0)
const {
return fTraj.
Length(p); }
215 inline double Theta()
const {
return fTraj.
Theta(); }
217 inline double Theta(
size_t p)
const {
return fTraj.
Theta(p); }
218 inline double Phi()
const {
return fTraj.
Phi(); }
219 inline double Phi(
size_t p)
const {
return fTraj.
Phi(p); }
241 inline int ID()
const {
return fID; }
264 template <
typename T>
267 return fTraj.
Start<T>();
271 template <
typename T>
278 template <
typename T>
281 return fTraj.
End<T>();
285 template <
typename T>
292 template <
typename T>
299 template <
typename T>
306 template <
typename T>
313 template <
typename T>
320 template <
typename T>
327 template <
typename T>
334 template <
typename T>
341 template <
typename T>
348 template <
typename T>
352 template <
typename T>
355 return StartCovariance<T>();
359 template <
typename T>
363 template <
typename T>
370 template <
typename T>
377 template <
typename T>
384 template <
typename T>
396 template <
typename T>
400 for (
unsigned int i = 0; i < 5; i++) {
401 for (
unsigned int j = 0; j < 5; j++) {
408 template <
typename T>
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);
420 #endif // LARDATAOBJ_RECOBASE_TRACK_H recob::TrajectoryPointFlags PointFlags_t
Type for flags of a point/hit.
TrackTrajectory fTraj
Stored trajectory data member.
T VertexCovariance() const
Covariance matrix at start point. Use e.g. as:
SVector6 EndParametersGlobal6D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
double EndMomentum() const
bool HasPoint(size_t i) const
Returns whether the specified trajectory point is available.
double VertexMomentum() const
A point in the trajectory, with position and momentum.
tracking::SVector5 SVector5
tracking::Momenta_t Momenta_t
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Reconstruction base classes.
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Track(Positions_t &&positions, Momenta_t &&momenta, Flags_t &&flags, bool hasMomenta, int PId, float Chi2, int Ndof, SMatrixSym55 &&CovVertex, SMatrixSym55 &&CovEnd, int tkID)
std::pair< T, T > Direction() const
Fills the starting and ending direction of the trajectory.
T Start() const
Start position. Use e.g. as:
T DirectionAtPoint(unsigned int p) const
Direction at point p. Use e.g. as:
int ParticleId() const
Access to various track properties.
Vector_t const & MomentumVectorAtPoint(size_t i) const
SMatrixSym66 EndCovarianceGlobal6D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
std::pair< T, T > Extent() const
Fills the first and last valid point in the trajectory.
const recob::TrackTrajectory & Trajectory() const
Access to the stored recob::TrackTrajectory.
const SMatrixSym55 & StartCovariance() const
Access to covariance matrices.
size_t LastValidPoint() const
Returns the index of the last valid point in the trajectory.
size_t PreviousValidPoint(size_t index) const
Various functions related to the presence and the number of (valid) points.
T GlobalToLocalRotationAtPoint(unsigned int p) const
Returns a rotation matrix that brings trajectory direction along z. Use e.g. as:
Point_t const & LocationAtPoint(size_t i) const
Access to track position at different points.
T MomentumVectorAtPoint(unsigned int p) const
Momentum vector at point p. Use e.g. as:
double ZenithAngle(size_t p) const
"Zenith" angle of trajectory, with respect to the vertical axis.
T LocationAtPoint(unsigned int p) const
Position at point p. Use e.g. as:
TrackTrajectory::Flags_t Flags_t
bool HasValidPoint(size_t i) const
Various functions related to the presence and the number of (valid) points.
Vector_t const & StartMomentumVector() const
Returns the momentum of the trajectory at the first valid point [GeV/c].
float Chi2() const
Access to various track properties.
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
Vector_t const & VertexMomentumVector() const
Returns the momentum of the trajectory at the first valid point [GeV/c].
Vector_t VertexDirection() const
Access to track direction at different points.
tracking::SMatrixSym66 SMatrixSym66
const SMatrixSym55 & VertexCovariance() const
Access to covariance matrices.
double ZenithAngle(size_t p) const
Access to spherical or geographical angles at vertex or at any point.
T LocalToGlobalRotationAtPoint(unsigned int p) const
Returns a rotation matrix bringing relative directions to global. Use e.g. as:
T EndDirection() const
End direction. Use e.g. as:
ROOT::Math::SMatrix< Double32_t, 6, 5 > SMatrix65
double ZenithAngle() const
Access to spherical or geographical angles at vertex or at any point.
ROOT::Math::SMatrix< Double32_t, 5, 5, ROOT::Math::MatRepSym< Double32_t, 5 >> SMatrixSym55
ROOT::Math::SMatrix< Double32_t, 6, 6, ROOT::Math::MatRepSym< Double32_t, 6 >> SMatrixSym66
T LocalToGlobalRotationAtPoint(unsigned int p) const
Returns a rotation matrix bringing relative directions to global. Use e.g. as:
double EndMomentum() const
std::pair< SMatrixSym55, SMatrixSym55 > Covariances() const
Access to position, momentum or covariance at the start and end of the track.
tracking::Rotation_t Rotation_t
T StartMomentumVector() const
Momentum vector at start point. Use e.g. as:
tracking::SVector6 SVector6
unsigned int CountValidPoints() const
Computes and returns the number of points with valid location.
SMatrixSym66 VertexCovarianceGlobal6D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
double MomentumAtPoint(unsigned int p) const
size_t FirstPoint() const
Various functions related to the presence and the number of (valid) points.
bool HasPoint(size_t i) const
Various functions related to the presence and the number of (valid) points.
tracking::SMatrix56 SMatrix56
friend bool operator<(const Track &a, const Track &b)
std::pair< Vector_t, Vector_t > Direction() const
Access to position, momentum or covariance at the start and end of the track.
Rotation_t GlobalToLocalRotationAtPoint(size_t p) const
tracking::Vector_t Vector_t
unsigned int CountValidPoints() const
Various functions related to the presence and the number of (valid) points.
Vector_t VertexDirection() const
Returns the direction of the trajectory at the first point.
SVector5 EndParametersLocal5D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
Vector_t const & EndMomentumVector() const
double Phi() const
Access to spherical or geographical angles at vertex or at any point.
Vector_t StartDirection() const
Access to track direction at different points.
double Length(size_t startAt=0) const
Returns the approximate length of the trajectory.
tracking::Positions_t Positions_t
double Length(size_t p=0) const
Access to various track properties.
size_t LastPoint() const
Returns the index of the last point in the trajectory.
size_t PreviousValidPoint(size_t index) const
Returns the index of the previous valid point in the trajectory.
TrajectoryPoint_t TrajectoryPoint(size_t i) const
Returns position and momentum at the specified trajectory point.
PointFlags_t const & FlagsAtPoint(size_t i) const
Returns the flags for the specified trajectory point.
size_t NPoints() const
Returns the number of stored trajectory points.
Point_t const & Start() const
Access to track position at different points.
size_t LastValidPoint() const
Various functions related to the presence and the number of (valid) points.
std::pair< T, T > Direction() const
Direction at start and end points. Use e.g. as:
A trajectory in space reconstructed from hits.
T LocationAtPoint(unsigned int p) const
Position at point p. Use e.g. as:
double Theta() const
Access to spherical or geographical angles at vertex or at any point.
Track(TrackTrajectory const &Traj, int PId, float Chi2, int Ndof, SMatrixSym55 const &CovVertex, SMatrixSym55 const &CovEnd, int tkID)
float Chi2PerNdof() const
Access to various track properties.
ROOT::Math::SVector< Double32_t, 6 > SVector6
double MomentumAtPoint(size_t i) const
Computes and returns the modulus of the momentum at a point.
Point_t const & Vertex() const
Access to track position at different points.
bool HasValidPoint(size_t i) const
Returns whether the specified point has NoPoint flag unset.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space. See recob::tracking::Coord_t for more details on the ...
Vector_t const & StartMomentumVector() const
double StartMomentum() const
TrajectoryPoint_t TrajectoryPoint(size_t i) const
Access to i-th TrajectoryPoint or its Flags.
const SMatrixSym55 & EndCovariance() const
Access to covariance matrices.
size_t NPoints() const
Various functions related to the presence and the number of (valid) points.
std::vector< Vector_t > Momenta_t
Type of momentum list.
T StartDirection() const
Start direction. Use e.g. as:
tracking::SMatrix65 SMatrix65
Data product for reconstructed trajectory in space.
T VertexMomentumVector() const
Momentum vector at start point. Use e.g. as:
friend std::ostream & operator<<(std::ostream &stream, Track const &a)
std::vector< PointFlags_t > Flags_t
Type of point flag list.
size_t FirstPoint() const
Returns the index of the first point in the trajectory (yep, it's 0).
size_t NumberTrajectoryPoints() const
Returns the number of stored trajectory points.
std::pair< T, T > Extent() const
Position at start and end points. Use e.g. as:
double AzimuthAngle(size_t p) const
Access to spherical or geographical angles at vertex or at any point.
T EndMomentumVector() const
Momentum vector at end point. Use e.g. as:
Track(TrackTrajectory &&Traj, int PId, float Chi2, int Ndof, SMatrixSym55 &&CovVertex, SMatrixSym55 &&CovEnd, int tkID)
double Phi(size_t p) const
Azimuthal angle at a point on the trajectory, with respect to z.
int Ndof() const
Access to various track properties.
Point_t const & Vertex() const
Returns the position of the first valid point of the trajectory [cm].
int fNdof
Number of degrees of freedom of the fit.
ROOT::Math::Rotation3D Rotation_t
Type for representation of space rotations.
tracking::SMatrixSym55 SMatrixSym55
size_t FirstValidPoint() const
Various functions related to the presence and the number of (valid) points.
Vector_t EndDirection() const
Returns the direction of the trajectory at the last point.
T VertexDirection() const
Start direction. Use e.g. as:
double Theta(size_t p) const
Trajectory angle at point, with respect to positive z direction.
double StartMomentum() const
SVector6 VertexParametersGlobal6D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
std::vector< Point_t > Positions_t
Type of trajectory point list.
size_t NextValidPoint(size_t index) const
Various functions related to the presence and the number of (valid) points.
size_t FirstValidPoint() const
Returns the index of the first valid point in the trajectory.
Rotation_t LocalToGlobalRotationAtPoint(size_t p) const
constexpr float kBogusF
obviously bogus float value
const SMatrixSym55 & EndCovarianceLocal5D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
bool HasMomentum() const
Returns whether information about the momentum is available.
double AzimuthAngle() const
Access to spherical or geographical angles at vertex or at any point.
Vector_t const & VertexMomentumVector() const
Vector_t const & EndMomentumVector() const
Returns the momentum of the trajectory at the last valid point [GeV/c].
Vector_t EndDirection() const
Access to track direction at different points.
SVector5 VertexParametersLocal5D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
ROOT::Math::SVector< Double32_t, 5 > SVector5
ROOT::Math::SMatrix< Double32_t, 5, 6 > SMatrix56
Point_t const & End() const
Returns the position of the last valid point of the trajectory [cm].
tracking::Point_t Point_t
size_t NextValidPoint(size_t index) const
Returns the index of the next valid point in the trajectory.
double AzimuthAngle(size_t p) const
"Azimuth" angle of trajectory, with respect to the sky.
PointFlags_t const & FlagsAtPoint(size_t i) const
Access to i-th TrajectoryPoint or its Flags.
Point_t const & End() const
Access to track position at different points.
double Phi(size_t p) const
Access to spherical or geographical angles at vertex or at any point.
T End() const
End position. Use e.g. as:
Vector_t DirectionAtPoint(size_t i) const
Access to track direction at different points.
T DirectionAtPoint(unsigned int p) const
Direction at point p. Use e.g. as:
double VertexMomentum() const
T MomentumVectorAtPoint(unsigned int p) const
Momentum vector at point p. Use e.g. as:
Collection of Physical constants used in LArSoft.
Vector_t StartDirection() const
Returns the direction of the trajectory at the first point.
double Theta(size_t p) const
Access to spherical or geographical angles at vertex or at any point.
Point_t const & Start() const
Returns the position of the first valid point of the trajectory [cm].
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space. See recob::tracking::Coord_t for more detai...
size_t LastPoint() const
Various functions related to the presence and the number of (valid) points.
const SMatrixSym55 & VertexCovarianceLocal5D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
T GlobalToLocalRotationAtPoint(unsigned int p) const
Returns a rotation matrix that brings trajectory direction along z. Use e.g. as:
Set of flags pertaining a point of the track.
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
std::pair< Point_t, Point_t > Extent() const
Access to position, momentum or covariance at the start and end of the track.
int fPId
Particle ID hypothesis used in the fit (if any)
T Vertex() const
Start position. Use e.g. as: