15 #ifndef LARDATAOBJ_RECOBASE_TRACKTRAJECTORY_H 16 #define LARDATAOBJ_RECOBASE_TRACKTRAJECTORY_H 88 using Flags_t = std::vector<PointFlags_t>;
214 {
return ToValidPoint<+1>(index); }
275 [[deprecated(
"Use point interface instead")]]
276 void Extent(std::vector<double>& start, std::vector<double>&
end)
const;
295 std::pair<Point_t, Point_t>
Extent()
const 316 double Length (
size_t startAt = 0)
const;
319 [[deprecated(
"Use NumberTrajectoryPoints() instead")]]
382 double Phi(
size_t p)
const 519 void Direction(
double* start,
double* end)
const;
582 template <
typename Stream>
585 unsigned int verbosity,
586 std::string
indent, std::string indentFirst
599 template <
typename Stream>
601 (Stream&& out,
unsigned int verbosity = 1, std::string indent = {})
603 {
Dump(std::forward<Stream>(out), verbosity, indent, indent); }
612 template <
typename Stream>
614 (Stream&& out, std::string indent, std::string indentFirst)
const;
683 #endif // LARDATAOBJ_RECOBASE_TRACKTRAJECTORY_H void Dump(Stream &&out, unsigned int verbosity, std::string indent, std::string indentFirst) const
Prints trajectory content into a stream.
double Phi(size_t p=0) const
Azimuthal angle at a point on the trajectory, with respect to z.
Data product for reconstructed trajectory in space.
bool HasPoint(size_t i) const
Returns whether the specified trajectory point is available.
A point in the trajectory, with position and momentum.
Trajectory_t const & Trajectory() const
Returns the plain trajectory of this object.
TrajectoryPointFlagTraits flag
Type of flag traits (indices and meaning of flags).
Reconstruction base classes.
TrackTrajectory()=default
Default constructor; do not use it! it's needed by ROOT I/O.
Flags_t const & Flags() const
Returns all flags.
static constexpr Flag_t NoPoint
The trajectory point is not defined.
geo::Point_t Point_t
Type for representation of position in physical 3D space.
bool isSet(Flag_t flag) const
Returns true if the flag exists and is set.
size_t LastValidPoint() const
Returns the index of the last valid point in the trajectory.
Ends_t
Mnemonics for the access to begin and end of trajectory.
tracking::Positions_t Positions_t
Type of trajectory point list.
double ZenithAngle(size_t p) const
"Zenith" angle of trajectory, with respect to the vertical axis.
Vector_t const & StartMomentumVector() const
Returns the momentum of the trajectory at the first valid point [GeV/c].
Vector_t const & VertexMomentumVector() const
Returns the momentum of the trajectory at the first valid point [GeV/c].
bool TrajectoryAtPoint(size_t i, TVector3 &pos, TVector3 &dir) const
Fills position and direction at the specified trajectory point.
Namespace for the trajectory point flags.
double AzimuthAngle(size_t p=0) const
"Azimuth" angle of trajectory, with respect to the sky.
size_t NumberFitMomentum() const
double ZenithAngle(size_t p=0) const
"Zenith" angle of trajectory, with respect to the vertical axis.
double EndMomentum() const
Rotation_t LocalToGlobalRotationAtPoint(size_t p) const
Returns a rotation matrix bringing relative directions to global.
unsigned int CountValidPoints() const
Computes and returns the number of points with valid location.
tracking::Momenta_t Momenta_t
Type of momentum list.
Flags_t fFlags
Flags 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.
double AzimuthAngle() const
"Azimuth" angle of trajectory, with respect to the sky.
Vector_t VertexDirection() const
Returns the direction of the trajectory at the first point.
double Length(size_t startAt=0) const
Returns the approximate length of the trajectory.
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.
const Positions_t & Positions() const
Returns reference to stored vector of positions.
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.
A trajectory in space reconstructed from hits.
std::string indent(std::size_t const i)
double MomentumAtPoint(size_t i) const
Computes and returns the modulus of the momentum at a point.
bool HasValidPoint(size_t i) const
Returns whether the specified point has NoPoint flag unset.
geo::Vector_t Vector_t
Type for representation of momenta in 3D space.
std::pair< Vector_t, Vector_t > Direction() const
Returns the trajectory directions at first and last valid points.
double StartMomentum() const
Point_t const & LocationAtPoint(size_t i) const
Returns the position at the specified trajectory point.
tracking::Rotation_t Rotation_t
Type for representation of space rotations.
std::vector< Vector_t > Momenta_t
Type of momentum list.
double ZenithAngle() const
"Zenith" angle of trajectory, with respect to the vertical axis.
tracking::Vector_t Vector_t
Type for representation of momenta in 3D space.
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).
double Coord_t
Type used for coordinates and values in general.
size_t NumberTrajectoryPoints() const
Returns the number of stored trajectory points.
Set of flags pertaining a point of the track.
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].
ROOT::Math::Rotation3D Rotation_t
Type for representation of space rotations.
Vector_t const & MomentumVectorAtPoint(size_t i) const
Returns the momentum vector at a point.
Vector_t EndDirection() const
Returns the direction of the trajectory at the last point.
tracking::Coord_t Coord_t
Type used for coordinates and values in general.
A trajectory in space reconstructed from hits.
double Theta(size_t p) const
Trajectory angle at point, with respect to positive z direction.
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
size_t ToValidPoint(size_t index) const
Returns the index of the first valid point from index on.
std::vector< Point_t > Positions_t
Type of trajectory point list.
size_t FirstValidPoint() const
Returns the index of the first valid point in the trajectory.
static constexpr size_t InvalidIndex
Value returned on failed index queries.
bool HasMomentum() const
Returns whether information about the momentum is available.
Vector_t const & EndMomentumVector() const
Returns the momentum of the trajectory at the last valid point [GeV/c].
static constexpr unsigned int MaxDumpVerbosity
Largest verbosity level supported by Dump().
Point_t const & End() const
Returns the position of the last valid point of the trajectory [cm].
TrackTrajectory(const Trajectory &traj, Flags_t &&flags)
Constructor: copies positions and momenta from an existing Trajecotry, adds the flags.
const Momenta_t & Momenta() const
Returns reference to stored vector of momenta.
size_t NextValidPoint(size_t index) const
Returns the index of the next valid point in the trajectory.
double Phi() const
Azimuthal angle at a first valid point, with respect to z.
double AzimuthAngle(size_t p) const
"Azimuth" angle of trajectory, with respect to the sky.
bool AtLeastValidTrajectoryPoints(unsigned int left) const
Returns whether there are at least min valid points in the trajectory.
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
double Theta(size_t p=0) const
Trajectory angle at point, with respect to positive z direction.
tracking::Point_t Point_t
Type for representation of position in physical 3D space.
double VertexMomentum() const
Vector_t StartDirection() const
Returns the direction of the trajectory at the first point.
Point_t const & Start() const
Returns the position of the first valid point of the trajectory [cm].
std::pair< Point_t, Point_t > Extent() const
Returns a copy of the first and last valid point in the trajectory.
double Theta() const
Trajectory angle at start, with respect to positive z direction.
Set of flags pertaining a point of the track.
void LowLevelDump(Stream &&out, std::string indent, std::string indentFirst) const
Prints low-level trajectory content into a stream.
std::ostream & operator<<(std::ostream &o, Cluster const &c)