22 : fPositions(
std::move(positions)), fMomenta(
std::move(momenta)), fHasMomentum(hasMomenta)
26 throw std::runtime_error(
"recob::Trajectory constructed with " +
29 " momenta! it requires the same number for both.");
32 throw std::runtime_error(
"recob::Trajectory constructed with " +
34 " trajectory points! it requires at least 2.");
66 while (next++ != last) {
67 length += (*next - *curr).R();
96 return std::atan2(startDir.X(), startDir.Z());
Trajectory()=default
Default constructor; do not use it! it's needed by ROOT I/O.
Data product for reconstructed trajectory in space.
Rotation_t Global3DToLocal3DRotation() const
Calculate rotation matrices from global (x,y,z) to local (u,v,w) coordinates.
tracking::Coord_t Coord_t
Type used for coordinates and values in general.
Point_t const & End() const
Returns the position of the last point of the trajectory [cm].
double AzimuthAngle(size_t p=0) const
"Azimuth" angle of trajectory, with respect to the sky.
double ZenithAngle(size_t p=0) const
"Zenith" angle of trajectory, with respect to the vertical axis.
double Length(size_t startAt=0) const
Returns the approximate length of the trajectory.
Rotation_t LocalToGlobalRotationAtPoint(size_t p) const
Returns a rotation matrix bringing relative directions to global.
Momenta_t fMomenta
Momentum of each of the points in trajectory.
Vector_t DirectionAtPoint(size_t i) const
Computes and returns the direction of the trajectory at a point.
Rotation_t GlobalToLocalRotationAtPoint(size_t p) const
Returns a rotation matrix that brings trajectory direction along z.
tracking::Vector_t Vector_t
Type for representation of momenta in 3D space.
Positions_t fPositions
List of points the trajectory goes through.
size_t LastPoint() const
Returns the index of the last point in the trajectory.
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
Point_t const & LocationAtPoint(size_t i) const
Returns the position at the specified trajectory point.
tracking::Positions_t Positions_t
Type of trajectory point list.
tracking::Momenta_t Momenta_t
Type of momentum list.
Vector_t const & MomentumVectorAtPoint(size_t i) const
Returns the momentum vector at a point.
A trajectory in space reconstructed from hits.
bool HasMomentum() const
Returns whether information about the momentum is available.
tracking::Point_t Point_t
Type for representation of position in physical 3D space.
void Dump(Stream &&out, unsigned int verbosity, std::string indent, std::string indentFirst) const
Prints trajectory content into a stream.
Collection of Physical constants used in LArSoft.
Rotation_t Local3DToGlobal3DRotation() const
Calculate rotation matrices from local (u,v,w) to global (x,y,z) coordinates.
tracking::Rotation_t Rotation_t
Type for representation of space rotations.
std::ostream & operator<<(std::ostream &o, Cluster const &c)