15 #ifndef LARDATAOBJ_RECOBASE_TRAJECTORY_H 16 #define LARDATAOBJ_RECOBASE_TRAJECTORY_H 18 #include "TMatrixDfwd.h" 269 [[deprecated(
"Use point interface instead")]]
270 void Extent(std::vector<double>& start, std::vector<double>&
end)
const;
288 std::pair<Point_t, Point_t>
Extent()
const 308 double Length (
size_t startAt = 0)
const;
324 [[deprecated(
"Use NumberTrajectoryPoints() instead")]]
372 double Phi(
size_t p = 0)
const 509 void Direction(
double* start,
double* end)
const;
630 template <
typename Stream>
633 unsigned int verbosity,
634 std::string
indent, std::string indentFirst
647 template <
typename Stream>
649 (Stream&& out,
unsigned int verbosity = 1, std::string indent = {})
651 {
Dump(std::forward<Stream>(out), verbosity, indent, indent); }
660 template <
typename Stream>
662 (Stream&& out, std::string indent, std::string indentFirst)
const;
701 template <
typename Vect>
702 void FillVector(Vect
const& source, std::vector<double>& dest);
705 template <
typename Vect>
706 void FillVector(Vect
const& source,
double* dest);
709 template <
typename SrcVect,
typename DestVect>
711 SrcVect
const& firstSource, SrcVect
const& secondSource,
712 DestVect&& firstDest, DestVect&& secondDest
735 #endif // LARDATAOBJ_RECOBASE_TRAJECTORY_H Trajectory(Positions_t const &positions, Momenta_t const &momenta, bool hasMomenta)
Constructor: copies positions and momenta.
Point_t const & Vertex() const
Returns the position of the first point of the trajectory [cm].
double Phi(size_t p=0) const
Azimuthal angle at a point on the trajectory, with respect to z.
Trajectory()=default
Default constructor; do not use it! it's needed by ROOT I/O.
double EndMomentum() const
Computes and returns the modulus of momentum at the last point [GeV/c].
bool HasPoint(size_t i) const
Returns whether the specified trajectory point is available.
A point in the trajectory, with position and momentum.
std::pair< Vector_t, Vector_t > Direction() const
Returns the trajectory directions at first and last point.
Reconstruction base classes.
Vector_t EndDirection() const
Returns the direction of the trajectory at the last point.
geo::Point_t Point_t
Type for representation of position in physical 3D space.
Ends_t
Mnemonics for the access to begin and end of trajectory.
Vector_t const & StartMomentumVector() const
Returns the momentum of the trajectory at the first point [GeV/c].
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].
bool TrajectoryAtPoint(size_t i, TVector3 &pos, TVector3 &dir) const
Fills position and direction at the specified trajectory point.
double AzimuthAngle(size_t p=0) const
"Azimuth" angle of trajectory, with respect to the sky.
void LowLevelDump(Stream &&out, std::string indent, std::string indentFirst) const
Prints low-level trajectory content into a stream.
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.
std::pair< Point_t, Point_t > Extent() const
Returns a copy of the first and last point in the trajectory.
double VertexMomentum() const
Computes and returns the modulus of momentum at the first point [GeV/c].
double StartMomentum() const
Computes and returns the modulus of momentum at the first point [GeV/c].
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.
size_t NumberFitMomentum() const
Returns the number of stored momenta.
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.
Index representing the end of the trajectory.
size_t LastPoint() const
Returns the index of the last 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.
size_t NPoints() const
Returns the number of stored trajectory points.
Index representing the start of the trajectory.
Index representing the start of the trajectory.
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 fHasMomentum
Whether we have momentum modulus information.
geo::Vector_t Vector_t
Type for representation of momenta in 3D space.
Point_t const & LocationAtPoint(size_t i) const
Returns the position at the specified trajectory point.
std::vector< Vector_t > Momenta_t
Type of momentum list.
Vector_t VertexDirection() const
Returns the direction of the trajectory at the first point.
tracking::Positions_t Positions_t
Type of trajectory point list.
static constexpr unsigned int MaxDumpVerbosity
Largest verbosity level supported by Dump().
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.
tracking::Momenta_t Momenta_t
Type of momentum list.
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 StartDirection() const
Returns the direction of the trajectory at the first point.
A trajectory in space reconstructed from hits.
std::vector< Point_t > Positions_t
Type of trajectory point list.
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.
const Momenta_t & Momenta() const
Returns reference to stored vector of momenta.
Vector_t const & VertexMomentumVector() const
Returns the momentum of the trajectory at the first point [GeV/c].
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.
void Dump(Stream &&out, unsigned int verbosity, std::string indent, std::string indentFirst) const
Prints trajectory content into a stream.
void FillVector(Vect const &source, double *dest)
Converts a vector into a C array.
Point_t const & Start() const
Returns the position of the first point of the trajectory [cm].
tracking::Rotation_t Rotation_t
Type for representation of space rotations.
std::ostream & operator<<(std::ostream &o, Cluster const &c)
Vector_t const & EndMomentumVector() const
Returns the momentum of the trajectory at the last point [GeV/c].
void FillTwoVectors(SrcVect const &firstSource, SrcVect const &secondSource, DestVect &&firstDest, DestVect &&secondDest)
Converts two vectors into another type of vector using FillVector.