9 #ifndef LARDATAOBJ_RECOBASE_TRACK_H 10 #define LARDATAOBJ_RECOBASE_TRACK_H 87 : fTraj(Traj), fPId(PId), fChi2(Chi2), fNdof(Ndof), fCovVertex(CovVertex), fCovEnd(CovEnd),fID(tkID) { };
91 : fTraj(
std::
move(Traj)), fPId(PId), fChi2(Chi2), fNdof(Ndof), fCovVertex(
std::
move(CovVertex)), fCovEnd(
std::
move(CovEnd)),fID(tkID) { };
95 : 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) { };
160 inline std::pair<Point_t, Point_t>
Extent()
const {
return fTraj.
Extent(); }
178 inline double Phi()
const {
return fTraj.
Phi(); }
179 inline double Phi(
size_t p)
const {
return fTraj.
Phi(p); }
198 inline int ID()
const {
return fID; }
218 template<
typename T>
inline T Start()
const {
return fTraj.
Start<
T>(); }
224 template<
typename T>
inline T End()
const {
return fTraj.
End<
T>(); }
263 template<
typename T>
inline std::pair<T, T>
Extent()
const {
return fTraj.
Extent<
T>(); }
285 for (
unsigned int i=0; i<5; i++) {
286 for (
unsigned int j=0; j<5; j++) {
295 for (
unsigned int i=0; i<5; i++) {
296 for (
unsigned int j=0; j<5; j++) {
303 #endif // LARDATAOBJ_RECOBASE_TRACK_H recob::TrajectoryPointFlags PointFlags_t
Type for flags of a point/hit.
SMatrixSym66 EndCovarianceGlobal6D() const
TrackTrajectory fTraj
Stored trajectory data member.
T VertexCovariance() const
Covariance matrix at start point. Use e.g. as:
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)
SVector6 EndParametersGlobal6D() const
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)
T Start() const
Start position. Use e.g. as:
T DirectionAtPoint(unsigned int p) const
Direction at point p. Use e.g. as:
ROOT::Math::SMatrix< Double32_t, 5, 5, ROOT::Math::MatRepSym< Double32_t, 5 > > SMatrixSym55
Vector_t const & MomentumVectorAtPoint(size_t i) const
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
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
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
SVector5 VertexParametersLocal5D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
bool HasValidPoint(size_t i) const
Vector_t const & StartMomentumVector() const
Returns the momentum of the trajectory at the first valid point [GeV/c].
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
tracking::SMatrixSym66 SMatrixSym66
const SMatrixSym55 & VertexCovariance() const
double ZenithAngle(size_t p) const
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:
double ZenithAngle() const
T LocalToGlobalRotationAtPoint(unsigned int p) const
Returns a rotation matrix bringing relative directions to global. Use e.g. as:
double EndMomentum() const
ROOT::Math::SMatrix< Double32_t, 5, 6 > SMatrix56
std::pair< SMatrixSym55, SMatrixSym55 > Covariances() const
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.
std::pair< T, T > Extent() const
Fills the first and last valid point in the trajectory.
double MomentumAtPoint(unsigned int p) const
size_t FirstPoint() const
bool HasPoint(size_t i) const
ROOT::Math::SVector< Double32_t, 5 > SVector5
tracking::SMatrix56 SMatrix56
friend bool operator<(const Track &a, const Track &b)
SMatrixSym66 VertexCovarianceGlobal6D() const
std::pair< Vector_t, Vector_t > Direction() const
Rotation_t GlobalToLocalRotationAtPoint(size_t p) const
tracking::Vector_t Vector_t
unsigned int CountValidPoints() const
Vector_t VertexDirection() const
Returns the direction of the trajectory at the first point.
std::pair< T, T > Direction() const
Fills the starting and ending direction of the trajectory.
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 & EndMomentumVector() const
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
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
double MomentumAtPoint(size_t i) const
Computes and returns the modulus of the momentum at a point.
Point_t const & Vertex() const
bool HasValidPoint(size_t i) const
Returns whether the specified point has NoPoint flag unset.
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
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
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.
Point_t const & Vertex() const
Returns the position of the first valid point of the trajectory [cm].
SVector5 EndParametersLocal5D() const
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
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.
ROOT::Math::SMatrix< Double32_t, 6, 6, ROOT::Math::MatRepSym< Double32_t, 6 > > SMatrixSym66
double StartMomentum() const
std::vector< Point_t > Positions_t
Type of trajectory point list.
size_t NextValidPoint(size_t index) const
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
bool HasMomentum() const
Returns whether information about the momentum is available.
double AzimuthAngle() const
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
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
Point_t const & End() const
double Phi(size_t p) const
T End() const
End position. Use e.g. as:
Vector_t DirectionAtPoint(size_t i) const
ROOT::Math::SVector< Double32_t, 6 > SVector6
T DirectionAtPoint(unsigned int p) const
Direction at point p. Use e.g. as:
SVector6 VertexParametersGlobal6D() const
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
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...
const SMatrixSym55 & VertexCovarianceLocal5D() const
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)
ROOT::Math::SMatrix< Double32_t, 6, 5 > SMatrix65
T Vertex() const
Start position. Use e.g. as: