LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
A trajectory in space reconstructed from hits. More...
#include "Trajectory.h"
Public Types | |
enum | Ends_t { kStart, kVertex = kStart, kEnd, NEnds } |
Mnemonics for the access to begin and end of trajectory. More... | |
using | Coord_t = tracking::Coord_t |
Type used for coordinates and values in general. More... | |
using | Point_t = tracking::Point_t |
Type for representation of position in physical 3D space. More... | |
using | Vector_t = tracking::Vector_t |
Type for representation of momenta in 3D space. More... | |
using | Positions_t = tracking::Positions_t |
Type of trajectory point list. More... | |
using | Momenta_t = tracking::Momenta_t |
Type of momentum list. More... | |
using | TrajectoryPoint_t = tracking::TrajectoryPoint_t |
A point in the trajectory, with position and momentum. More... | |
using | Rotation_t = tracking::Rotation_t |
Type for representation of space rotations. More... | |
Public Member Functions | |
Trajectory ()=default | |
Default constructor; do not use it! it's needed by ROOT I/O. More... | |
Trajectory (Positions_t &&positions, Momenta_t &&momenta, bool hasMomenta) | |
Constructor: specifies all the data for the trajectory. More... | |
Trajectory (Positions_t const &positions, Momenta_t const &momenta, bool hasMomenta) | |
Constructor: copies positions and momenta. More... | |
template<typename Stream > | |
void | Dump (Stream &&out, unsigned int verbosity, std::string indent, std::string indentFirst) const |
Prints trajectory content into a stream. More... | |
template<typename Stream > | |
void | Dump (Stream &&out, unsigned int verbosity=1, std::string indent={}) const |
Prints trajectory content into a stream. More... | |
template<typename Stream > | |
void | LowLevelDump (Stream &&out, std::string indent, std::string indentFirst) const |
Prints low-level trajectory content into a stream. More... | |
Access to trajectory information | |
size_t | NumberTrajectoryPoints () const |
Returns the number of stored trajectory points. More... | |
size_t | NPoints () const |
Returns the number of stored trajectory points. More... | |
size_t | FirstPoint () const |
Returns the index of the first point in the trajectory (yep, it's 0 ). More... | |
size_t | LastPoint () const |
Returns the index of the last point in the trajectory. More... | |
bool | HasPoint (size_t i) const |
Returns whether the specified trajectory point is available. More... | |
const Positions_t & | Positions () const |
Returns reference to stored vector of positions. More... | |
const Momenta_t & | Momenta () const |
Returns reference to stored vector of momenta. More... | |
bool | TrajectoryAtPoint (size_t i, TVector3 &pos, TVector3 &dir) const |
Fills position and direction at the specified trajectory point. More... | |
TrajectoryPoint_t | TrajectoryPoint (size_t i) const |
Returns position and momentum at the specified trajectory point. More... | |
Point_t const & | Vertex () const |
Returns the position of the first point of the trajectory [cm]. More... | |
Point_t const & | Start () const |
Returns the position of the first point of the trajectory [cm]. More... | |
Point_t const & | End () const |
Returns the position of the last point of the trajectory [cm]. More... | |
Point_t const & | LocationAtPoint (size_t i) const |
Returns the position at the specified trajectory point. More... | |
void | Extent (std::vector< double > &start, std::vector< double > &end) const |
Fills the first and last point in the trajectory. More... | |
std::pair< Point_t, Point_t > | Extent () const |
Returns a copy of the first and last point in the trajectory. More... | |
double | Length (size_t startAt=0) const |
Returns the approximate length of the trajectory. More... | |
Access to direction and momentum information | |
size_t | NumberFitMomentum () const |
Returns the number of stored momenta. More... | |
Vector_t | VertexDirection () const |
Returns the direction of the trajectory at the first point. More... | |
Vector_t | StartDirection () const |
Returns the direction of the trajectory at the first point. More... | |
Vector_t | EndDirection () const |
Returns the direction of the trajectory at the last point. More... | |
double | Theta (size_t p=0) const |
Trajectory angle at point, with respect to positive z direction. More... | |
double | Phi (size_t p=0) const |
Azimuthal angle at a point on the trajectory, with respect to z. More... | |
double | ZenithAngle (size_t p=0) const |
"Zenith" angle of trajectory, with respect to the vertical axis. More... | |
double | AzimuthAngle (size_t p=0) const |
"Azimuth" angle of trajectory, with respect to the sky. More... | |
Vector_t const & | VertexMomentumVector () const |
Returns the momentum of the trajectory at the first point [GeV/c]. More... | |
Vector_t const & | StartMomentumVector () const |
Returns the momentum of the trajectory at the first point [GeV/c]. More... | |
Vector_t const & | EndMomentumVector () const |
Returns the momentum of the trajectory at the last point [GeV/c]. More... | |
double | VertexMomentum () const |
Computes and returns the modulus of momentum at the first point [GeV/c]. More... | |
double | StartMomentum () const |
Computes and returns the modulus of momentum at the first point [GeV/c]. More... | |
double | EndMomentum () const |
Computes and returns the modulus of momentum at the last point [GeV/c]. More... | |
Vector_t | DirectionAtPoint (size_t i) const |
Computes and returns the direction of the trajectory at a point. More... | |
bool | HasMomentum () const |
Returns whether information about the momentum is available. More... | |
double | MomentumAtPoint (size_t i) const |
Computes and returns the modulus of the momentum at a point. More... | |
Vector_t const & | MomentumVectorAtPoint (size_t i) const |
Returns the momentum vector at a point. More... | |
void | Direction (double *start, double *end) const |
Fills the starting and ending direction of the trajectory. More... | |
std::pair< Vector_t, Vector_t > | Direction () const |
Returns the trajectory directions at first and last point. More... | |
Rotation_t | GlobalToLocalRotationAtPoint (size_t p) const |
Returns a rotation matrix that brings trajectory direction along z. More... | |
void | GlobalToLocalRotationAtPoint (unsigned int p, TMatrixD &rot) const |
Fills a rotation matrix that brings trajectory direction along z. More... | |
Rotation_t | LocalToGlobalRotationAtPoint (size_t p) const |
Returns a rotation matrix bringing relative directions to global. More... | |
void | LocalToGlobalRotationAtPoint (unsigned int p, TMatrixD &rot) const |
Fills a rotation matrix bringing relative directions to global. More... | |
Static Public Attributes | |
static constexpr unsigned int | MaxDumpVerbosity = 6 |
Largest verbosity level supported by Dump(). More... | |
Private Attributes | |
Positions_t | fPositions |
List of points the trajectory goes through. More... | |
Momenta_t | fMomenta |
Momentum of each of the points in trajectory. More... | |
bool | fHasMomentum = true |
Whether we have momentum modulus information. More... | |
A trajectory in space reconstructed from hits.
The trajectory class contains a trajectory in 6D space representing the path walked by a particle. A trajectory point is made of a 3D position component (measured in centimeters) and a momentum component (measured in GeV/c).
The object contains information about the trajectory, and no uncertainty, as that is considered a fit result (see recob::Track
). By convention the first point is considered "start" (or "vertex") and the last point "end", although this assignment can be arbitrary and should not be relied upon for physics decisions.
The momentum content is in part optional: the trajectory creating algorithm may decide not to provide information about the modulus of the momentum. In that case, Trajectory::HasMomentum()
will return false and every attempt to access the momentum vector will yield only the trajectory direction.
Trajectory::HasMomentum()
reports whether momentum modulus information is available;recob::TrajectoryCollectionMaker
. Definition at line 72 of file Trajectory.h.
Type used for coordinates and values in general.
Definition at line 75 of file Trajectory.h.
Type of momentum list.
Definition at line 87 of file Trajectory.h.
Type for representation of position in physical 3D space.
Definition at line 78 of file Trajectory.h.
Type of trajectory point list.
Definition at line 84 of file Trajectory.h.
Type for representation of space rotations.
Definition at line 102 of file Trajectory.h.
A point in the trajectory, with position and momentum.
Definition at line 99 of file Trajectory.h.
Type for representation of momenta in 3D space.
Definition at line 81 of file Trajectory.h.
Mnemonics for the access to begin and end of trajectory.
Enumerator | |
---|---|
kStart |
Index representing the start of the trajectory. |
kVertex |
Index representing the start of the trajectory. |
kEnd |
Index representing the end of the trajectory. |
NEnds |
Number of ends. |
Definition at line 90 of file Trajectory.h.
|
default |
Default constructor; do not use it! it's needed by ROOT I/O.
recob::Trajectory::Trajectory | ( | Positions_t && | positions, |
Momenta_t && | momenta, | ||
bool | hasMomenta | ||
) |
Constructor: specifies all the data for the trajectory.
positions | (moved) trajectory as a sorted list of points |
momenta | (moved) momentum along the trajectory, one per point |
hasMomenta | whether the information on momentum modulus is provided |
std::runtime_error | if the invariants are violated |
The most convenient way to create a recob::Trajectory is to use recob::trackutil::makeTrajectory()
.
Definition at line 42 of file Trajectory.cxx.
References util::flags::to_string(), and TrajectoryAtPoint().
|
inline |
Constructor: copies positions and momenta.
positions | trajectory as a sorted list of points |
momenta | momentum along the trajectory, one per point |
hasMomenta | whether the information on momentum modulus is provided |
std::runtime_error | if the invariants are violated |
Definition at line 141 of file Trajectory.h.
double recob::Trajectory::AzimuthAngle | ( | size_t | p = 0 | ) | const |
"Azimuth" angle of trajectory, with respect to the sky.
p | the point index to extract the angle from (default: start) |
The angle is defined on the plane orthogonal to the y direction. It describes the angle of the trajectory at the specified point. The angle is measured starting from the positive z direction, counterclockwise. Therefore, a trajectory start lying on the demiplane of y axis and positive z axis returns 0 radians, while one lying on the demiplane of y axis and positive x axis returns radians.
If the point number is invalid, the behaviour is undefined.
Definition at line 136 of file Trajectory.cxx.
References DirectionAtPoint().
Referenced by recob::TrackTrajectory::AzimuthAngle(), and Phi().
void recob::Trajectory::Direction | ( | double * | start, |
double * | end | ||
) | const |
Fills the starting and ending direction of the trajectory.
start | (output) direction at the beginning of the trajectory |
end | (output) direction at the end of the trajectory |
The two arguments are expected to point each one to an area with room for at least three double
numbers. The two filled vectors have norm 1.
The labelling of start and end is consistent within the trajectory but is not guaranteed to be physically correct.
Direction()
) Definition at line 167 of file Trajectory.cxx.
References EndDirection(), recob::details::legacy::FillTwoVectors(), GlobalToLocalRotationAtPoint(), and StartDirection().
Returns the trajectory directions at first and last point.
The two returned vectors have norm 1. The labelling of start and end is consistent within the trajectory but is not guaranteed to be physically correct.
Example:
Definition at line 529 of file Trajectory.h.
References Dump(), EndDirection(), GlobalToLocalRotationAtPoint(), art::detail::indent(), LocalToGlobalRotationAtPoint(), and StartDirection().
Referenced by MomentumVectorAtPoint().
recob::Trajectory::Vector_t recob::Trajectory::DirectionAtPoint | ( | size_t | i | ) | const |
Computes and returns the direction of the trajectory at a point.
i | index of the point in the trajectory |
The direction is computed as unit vector parallel to the momentum at that trajectory point. If the index is not contained in the trajectory, the result is undefined.
Definition at line 157 of file Trajectory.cxx.
References HasMomentum(), and MomentumVectorAtPoint().
Referenced by AzimuthAngle(), recob::Track::DirectionAtPoint(), recob::TrackTrajectory::EndDirection(), EndDirection(), EndMomentum(), recob::TrackTrajectory::EndMomentum(), trkf::BezierTrack::FillSeedVector(), GlobalToLocalRotationAtPoint(), trkf::TrajectoryMCSFitter::linearRegression(), LocalToGlobalRotationAtPoint(), trkf::KalmanFilterTrajectoryFitter::restoreInputPoints(), trkf::KalmanFilterFinalTrackFitter::restoreInputPoints(), recob::TrackTrajectory::StartDirection(), StartDirection(), and ZenithAngle().
void recob::Trajectory::Dump | ( | Stream && | out, |
unsigned int | verbosity, | ||
std::string | indent, | ||
std::string | indentFirst | ||
) | const |
Prints trajectory content into a stream.
Stream | type of the output stream |
out | stream to output the information into |
verbosity | verbosity level (default: 1 ) |
indent | indentation string (default: none) |
indentFirst | indentation for first output line (default: as indent) |
The amount of information dumped to screen is regulated by the Indentation string is prepended to each line, and the first line has its own special indentation string (indentFirst
).
The output can be multi-line, it ends with no end-of-line and it does not inserts an end-of-line at its beginning (unless that is explicitly inside indentFirst
). The lowest verbosity is guaranteed to be on a single line.
verbosity
argument) 0
: start position, direction, momentum modulus and number of points1
: also end position, direction and momentum modulus2
: also trajectory length3
: also angles at start4
: also 9 intermediate trajectory points5
: also 10 more intermediate trajectory points (19 total)6
: all trajectory points Referenced by Direction(), lar::example::CheatTrack::dump(), and Dump().
|
inline |
Prints trajectory content into a stream.
Stream | type of the output stream |
out | stream to output the information into |
verbosity | verbosity level (default: 1 ) |
indent | indentation string (default: none) |
Implementation detail for Dump(Stream&&, unsigned int, std::string).
Definition at line 649 of file Trajectory.h.
References Dump(), and LowLevelDump().
|
inline |
Returns the position of the last point of the trajectory [cm].
Definition at line 244 of file Trajectory.h.
References LastPoint(), and LocationAtPoint().
Referenced by Extent(), trkf::BezierTrack::GetTrackPoint(), and Length().
|
inline |
Returns the direction of the trajectory at the last point.
Definition at line 338 of file Trajectory.h.
References DirectionAtPoint(), and LastPoint().
Referenced by Direction().
|
inline |
Computes and returns the modulus of momentum at the last point [GeV/c].
Definition at line 436 of file Trajectory.h.
References DirectionAtPoint(), and EndMomentumVector().
|
inline |
Returns the momentum of the trajectory at the last point [GeV/c].
Definition at line 423 of file Trajectory.h.
References LastPoint(), and MomentumVectorAtPoint().
Referenced by EndMomentum().
void recob::Trajectory::Extent | ( | std::vector< double > & | start, |
std::vector< double > & | end | ||
) | const |
Fills the first and last point in the trajectory.
start | (output) position of the beginning of the trajectory |
end | (output) position of the end of the trajectory |
The labelling of start and end is consistent within the trajectory but is not guaranteed to be physically correct.
Extent()
) Definition at line 81 of file Trajectory.cxx.
References recob::details::legacy::FillTwoVectors().
Returns a copy of the first and last point in the trajectory.
The labelling of start and end is consistent within the trajectory but is not guaranteed to be physically correct.
Example:
Definition at line 288 of file Trajectory.h.
References End(), Length(), and Start().
Referenced by LocationAtPoint(), and TrajectoryAtPoint().
|
inline |
Returns the index of the first point in the trajectory (yep, it's 0
).
Definition at line 176 of file Trajectory.h.
Referenced by recob::Track::FirstPoint(), Start(), StartDirection(), StartMomentumVector(), and recob::TrackTrajectory::Trajectory().
recob::Trajectory::Rotation_t recob::Trajectory::GlobalToLocalRotationAtPoint | ( | size_t | p | ) | const |
Returns a rotation matrix that brings trajectory direction along z.
p | index of the trajectory point where to apply the rotation |
The returned rotation matrix, applied to the direction vector of the trajectory at point p
, will make that direction point toward the positive z axis direction, in a sort of "first person view" of the trajectory at that point. If p
does not denote a valid trajectory point, the result is undefined.
The return value can be used on a Vector_t
to rotate it. For example:
local will be a Vector_t
object (like the direction at the right side of the product) that points to (0, 0, 1).
While the transformation that yields the rotation matrix is continuous, the direction of the new "local" x and y axes is not defined.
Definition at line 173 of file Trajectory.cxx.
References DirectionAtPoint(), and recob::tracking::Plane::Global3DToLocal3DRotation().
Referenced by Direction(), recob::TrackTrajectory::Direction(), recob::Track::GlobalToLocalRotationAtPoint(), and GlobalToLocalRotationAtPoint().
void recob::Trajectory::GlobalToLocalRotationAtPoint | ( | unsigned int | p, |
TMatrixD & | rot | ||
) | const |
Fills a rotation matrix that brings trajectory direction along z.
p | index of the trajectory point where to apply the rotation |
rot | (output) the rotation matrix to be filled |
Definition at line 181 of file Trajectory.cxx.
References GlobalToLocalRotationAtPoint(), and LocalToGlobalRotationAtPoint().
|
inline |
Returns whether information about the momentum is available.
The trajectory may or may not store valid momentum information. If not, the methods returning momentum information will stick to a modulus 1 GeV/c and the momentum numerically matches the direction.
Definition at line 460 of file Trajectory.h.
References fHasMomentum.
Referenced by DirectionAtPoint(), recob::TrackTrajectory::EndMomentum(), recob::Track::FlagsAtPoint(), recob::TrackTrajectory::NumberFitMomentum(), NumberFitMomentum(), and trkmkr::KalmanFilterFitTrackMaker::restoreInputPoints().
|
inline |
Returns whether the specified trajectory point is available.
i | index of the trajectory point |
Definition at line 188 of file Trajectory.h.
References NPoints().
Referenced by recob::Track::HasPoint(), recob::TrackTrajectory::HasValidPoint(), and recob::TrackTrajectory::Trajectory().
|
inline |
Returns the index of the last point in the trajectory.
Definition at line 180 of file Trajectory.h.
References NPoints().
Referenced by End(), EndDirection(), EndMomentumVector(), recob::Track::LastPoint(), recob::TrackTrajectory::LastValidPoint(), Length(), recob::TrackTrajectory::Length(), and recob::TrackTrajectory::Trajectory().
double recob::Trajectory::Length | ( | size_t | startAt = 0 | ) | const |
Returns the approximate length of the trajectory.
startAt | (default: 0, from beginning) point to start from |
The residual length from the trajectory point startAt to the end of the trajectory is computed and returned. By default, the whole trajectory length is returned. If a non-existing point is specified, 0 is returned.
The length approximation is just the sum of Euclidean distances between all consecutive trajectory points (starting from the one with index startAt
).
This operation is slow, and the result should be stored in a variable.
Definition at line 103 of file Trajectory.cxx.
References End(), LastPoint(), LocationAtPoint(), and R.
Referenced by Extent(), and opdet::TrackTimeAssoc::ScanMIPHypotheses().
recob::Trajectory::Rotation_t recob::Trajectory::LocalToGlobalRotationAtPoint | ( | size_t | p | ) | const |
Returns a rotation matrix bringing relative directions to global.
p | index of the trajectory point where to apply the rotation |
The returned rotation matrix, applied to the unit vector (0, 0, 1) (local z axis direction), will turn it into the trajectory direction at point p
. If p
does not denote a valid trajectory point, the result is undefined.
While the transformation that yields the rotation matrix is continuous, the conversion of the directions orthogonal to the local z is not defined.
Definition at line 190 of file Trajectory.cxx.
References DirectionAtPoint(), and recob::tracking::Plane::Local3DToGlobal3DRotation().
Referenced by Direction(), recob::TrackTrajectory::Direction(), GlobalToLocalRotationAtPoint(), recob::Track::LocalToGlobalRotationAtPoint(), and LocalToGlobalRotationAtPoint().
void recob::Trajectory::LocalToGlobalRotationAtPoint | ( | unsigned int | p, |
TMatrixD & | rot | ||
) | const |
Fills a rotation matrix bringing relative directions to global.
p | index of the trajectory point where to apply the rotation |
rot | (output) the rotation matrix to be filled |
Definition at line 198 of file Trajectory.cxx.
References LocalToGlobalRotationAtPoint().
|
inline |
Returns the position at the specified trajectory point.
i | index of the point in the trajectory |
If the point index is invalid, the result is undefined.
Definition at line 255 of file Trajectory.h.
References evd::details::end(), Extent(), and fPositions.
Referenced by trkf::TrajectoryMCSFitter::breakTrajInSegments(), End(), recob::TrackTrajectory::End(), trkf::BezierTrack::FillSeedVector(), Length(), recob::TrackTrajectory::Length(), trkf::TrajectoryMCSFitter::linearRegression(), recob::Track::LocationAtPoint(), TrackProducerFromTrack::produce(), TrackProducerFromTrackTrajectory::produce(), TrackProducerFromPFParticle::produce(), trkf::KalmanFilterTrajectoryFitter::restoreInputPoints(), trkf::KalmanFilterFinalTrackFitter::restoreInputPoints(), trkmkr::KalmanFilterFitTrackMaker::restoreInputPoints(), Start(), recob::TrackTrajectory::Start(), and TrajectoryPoint().
void recob::Trajectory::LowLevelDump | ( | Stream && | out, |
std::string | indent, | ||
std::string | indentFirst | ||
) | const |
Prints low-level trajectory content into a stream.
Stream | type of the output stream |
out | stream to output the information into |
indent | indentation string (default: none) |
indentFirst | indentation for first output line (default: as indent) |
Referenced by Dump().
|
inline |
Returns reference to stored vector of momenta.
Definition at line 201 of file Trajectory.h.
References dir, fMomenta, and TrajectoryAtPoint().
|
inline |
Computes and returns the modulus of the momentum at a point.
i | index of the point in the trajectory |
The modulus of the momentum at the specified trajectory point is computed and returned. If the trajectory does not have momentum information, the value 1 GeV/c is always returned. This can be tested trajectory by trajectory by HasMomentum(). If the index is not valid in the trajectory, the result is undefined.
Definition at line 477 of file Trajectory.h.
References MomentumVectorAtPoint().
Referenced by recob::TrackTrajectory::EndMomentum(), and recob::Track::MomentumAtPoint().
|
inline |
Returns the momentum vector at a point.
i | index of the point in the trajectory |
The momentum at the specified trajectory point is returned. If the trajectory does not have momentum information, the returned value will represent the direction, that is a momentum with modulus 1 GeV/c. This can be tested trajectory by trajectory by HasMomentum(). If the index is not valid in the trajectory, the result is undefined.
Definition at line 492 of file Trajectory.h.
References Direction(), and fMomenta.
Referenced by DirectionAtPoint(), recob::TrackTrajectory::EndMomentum(), EndMomentumVector(), recob::TrackTrajectory::EndMomentumVector(), MomentumAtPoint(), recob::Track::MomentumVectorAtPoint(), Phi(), trkmkr::KalmanFilterFitTrackMaker::restoreInputPoints(), StartMomentumVector(), recob::TrackTrajectory::StartMomentumVector(), Theta(), and TrajectoryPoint().
|
inline |
Returns the number of stored trajectory points.
For each point, both position and momentum are available.
Definition at line 172 of file Trajectory.h.
References fPositions.
Referenced by recob::TrackTrajectory::AtLeastValidTrajectoryPoints(), recob::TrackTrajectory::CountValidPoints(), trkf::TrajectoryMCSFitter::fitMcs(), HasPoint(), trkmkr::TrackMaker::initEvent(), LastPoint(), trkmkr::TrackMaker::makeTrack(), recob::Track::NPoints(), recob::TrackTrajectory::NumberFitMomentum(), NumberFitMomentum(), NumberTrajectoryPoints(), recob::TrackTrajectory::TrackTrajectory(), and recob::TrackTrajectory::Trajectory().
|
inline |
Returns the number of stored momenta.
It's the same as trajectory points, unless there is no momentum (then it's 0).
Definition at line 325 of file Trajectory.h.
References HasMomentum(), and NPoints().
|
inline |
Returns the number of stored trajectory points.
For each point, both position and momentum are available.
Definition at line 161 of file Trajectory.h.
References NPoints().
Referenced by trkf::BezierTrack::NSegments(), recob::Track::Trajectory(), and recob::TrackTrajectory::Trajectory().
|
inline |
Azimuthal angle at a point on the trajectory, with respect to z.
p | the point index to extract the angle from (default: start) |
The angle is measured on the plane orthogonal to the z axis, in the same reference where Theta()
is measured. The angle is measured counterclockwise from the x axis. Skyward direction is expected to be radians in this system, provided that the standard reference frame with the y axis pointing skyward is chosen.
If the point number is invalid, the behaviour is undefined.
Definition at line 372 of file Trajectory.h.
References AzimuthAngle(), MomentumVectorAtPoint(), and ZenithAngle().
Referenced by recob::TrackTrajectory::Phi().
|
inline |
Returns reference to stored vector of positions.
Definition at line 195 of file Trajectory.h.
References fPositions.
|
inline |
Returns the position of the first point of the trajectory [cm].
Definition at line 240 of file Trajectory.h.
References FirstPoint(), and LocationAtPoint().
Referenced by Extent(), trkf::BezierTrack::GetTrackPoint(), opdet::TrackTimeAssoc::ScanMIPHypotheses(), and Vertex().
|
inline |
Returns the direction of the trajectory at the first point.
Definition at line 334 of file Trajectory.h.
References DirectionAtPoint(), and FirstPoint().
Referenced by Direction(), and VertexDirection().
|
inline |
Computes and returns the modulus of momentum at the first point [GeV/c].
Definition at line 432 of file Trajectory.h.
References StartMomentumVector().
Referenced by lar::example::CheatTrack::momentum(), and VertexMomentum().
|
inline |
Returns the momentum of the trajectory at the first point [GeV/c].
Definition at line 419 of file Trajectory.h.
References FirstPoint(), and MomentumVectorAtPoint().
Referenced by StartMomentum(), and VertexMomentumVector().
|
inline |
Trajectory angle at point, with respect to positive z direction.
p | the index point to extract the angle from (default: start) |
The reference direction is the positive z axis. Although this usually matches the beam direction, this is not guaranteed and if the explicit angle from beam direction is needed, the scalar product of the beam direction and the direction from StartDirection()
should be used instead.
If the point number is invalid, the behaviour is undefined.
Definition at line 355 of file Trajectory.h.
References MomentumVectorAtPoint().
Referenced by recob::TrackTrajectory::Theta().
bool recob::Trajectory::TrajectoryAtPoint | ( | size_t | i, |
TVector3 & | pos, | ||
TVector3 & | dir | ||
) | const |
Fills position and direction at the specified trajectory point.
i | index of the trajectory point |
pos | (output) filled with the position at the given point [cm] |
dir | (output) filled with the direction at the given point |
Definition at line 66 of file Trajectory.cxx.
References Extent().
Referenced by Momenta(), Trajectory(), recob::TrackTrajectory::Trajectory(), and recob::Track::TrajectoryAtPoint().
|
inline |
Returns position and momentum at the specified trajectory point.
i | index of the trajectory point |
Note that this method returns the momentum, not the direction.
If the specified index is not valid, result is undefined.
Definition at line 231 of file Trajectory.h.
References LocationAtPoint(), and MomentumVectorAtPoint().
Referenced by recob::Track::CountValidPoints(), and recob::TrackTrajectory::LastValidPoint().
|
inline |
Returns the position of the first point of the trajectory [cm].
Definition at line 236 of file Trajectory.h.
References Start().
|
inline |
Returns the direction of the trajectory at the first point.
Definition at line 330 of file Trajectory.h.
References StartDirection().
|
inline |
Computes and returns the modulus of momentum at the first point [GeV/c].
Definition at line 428 of file Trajectory.h.
References StartMomentum().
|
inline |
Returns the momentum of the trajectory at the first point [GeV/c].
Definition at line 415 of file Trajectory.h.
References StartMomentumVector().
double recob::Trajectory::ZenithAngle | ( | size_t | p = 0 | ) | const |
"Zenith" angle of trajectory, with respect to the vertical axis.
p | the point index to extract the angle from (default: start) |
The angle is defined with respect to the negative y direction. It describes the angle at the specified point on the trajectory. Therefore, a trajectory starting along the positive y direction returns radians, while a trajectory going downward along the negative y direction returns 0.
This is designed so that vertical cosmic rays produce trajectories with angle 0 radians.
If the point number is invalid, the behaviour is undefined.
Definition at line 122 of file Trajectory.cxx.
References DirectionAtPoint().
Referenced by Phi(), and recob::TrackTrajectory::ZenithAngle().
|
private |
Whether we have momentum modulus information.
Definition at line 676 of file Trajectory.h.
Referenced by HasMomentum().
|
private |
Momentum of each of the points in trajectory.
Definition at line 674 of file Trajectory.h.
Referenced by Momenta(), and MomentumVectorAtPoint().
|
private |
List of points the trajectory goes through.
Definition at line 673 of file Trajectory.h.
Referenced by LocationAtPoint(), NPoints(), and Positions().
|
static |
Largest verbosity level supported by Dump().
Definition at line 666 of file Trajectory.h.