LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Track.h
Go to the documentation of this file.
1 
9 #ifndef LARDATAOBJ_RECOBASE_TRACK_H
10 #define LARDATAOBJ_RECOBASE_TRACK_H
11 
15 
16 #include <iosfwd>
17 #include <stddef.h>
18 
19 namespace recob {
20 
49  class Track {
50 
51  public:
58 
65 
68 
69  protected:
71  int fPId = 0;
72  float fChi2 = -1.;
73  int fNdof = 0.;
77  int fID = -1;
78 
79  public:
80  //Default constructor
81  Track() = default;
82 
83  Track(TrackTrajectory const& Traj,
84  int PId,
85  float Chi2,
86  int Ndof,
87  SMatrixSym55 const& CovVertex,
88  SMatrixSym55 const& CovEnd,
89  int tkID)
90  : fTraj(Traj)
91  , fPId(PId)
92  , fChi2(Chi2)
93  , fNdof(Ndof)
94  , fCovVertex(CovVertex)
95  , fCovEnd(CovEnd)
96  , fID(tkID){};
97 
99  int PId,
100  float Chi2,
101  int Ndof,
102  SMatrixSym55&& CovVertex,
103  SMatrixSym55&& CovEnd,
104  int tkID)
105  : fTraj(std::move(Traj))
106  , fPId(PId)
107  , fChi2(Chi2)
108  , fNdof(Ndof)
109  , fCovVertex(std::move(CovVertex))
110  , fCovEnd(std::move(CovEnd))
111  , fID(tkID){};
112 
113  Track(Positions_t&& positions,
114  Momenta_t&& momenta,
115  Flags_t&& flags,
116  bool hasMomenta,
117  int PId,
118  float Chi2,
119  int Ndof,
120  SMatrixSym55&& CovVertex,
121  SMatrixSym55&& CovEnd,
122  int tkID)
123  : fTraj(std::move(positions), std::move(momenta), std::move(flags), hasMomenta)
124  , fPId(PId)
125  , fChi2(Chi2)
126  , fNdof(Ndof)
127  , fCovVertex(std::move(CovVertex))
128  , fCovEnd(std::move(CovEnd))
129  , fID(tkID){};
130 
132  inline const recob::TrackTrajectory& Trajectory() const { return fTraj; }
133 
135  inline size_t NumberTrajectoryPoints() const { return fTraj.NumberTrajectoryPoints(); }
137  inline size_t NPoints() const { return fTraj.NPoints(); }
138  inline size_t FirstPoint() const { return fTraj.FirstPoint(); }
139  inline size_t LastPoint() const { return fTraj.LastPoint(); }
140  inline size_t FirstValidPoint() const { return fTraj.FirstValidPoint(); }
141  inline size_t NextValidPoint(size_t index) const { return fTraj.NextValidPoint(index); }
142  inline size_t PreviousValidPoint(size_t index) const { return fTraj.PreviousValidPoint(index); }
143  inline size_t LastValidPoint() const { return fTraj.LastValidPoint(); }
144  inline bool HasPoint(size_t i) const { return fTraj.HasPoint(i); }
145  inline bool HasValidPoint(size_t i) const { return fTraj.HasValidPoint(i); }
146  inline unsigned int CountValidPoints() const { return fTraj.CountValidPoints(); }
148 
150  inline TrajectoryPoint_t TrajectoryPoint(size_t i) const { return fTraj.TrajectoryPoint(i); }
152  inline PointFlags_t const& FlagsAtPoint(size_t i) const { return fTraj.FlagsAtPoint(i); }
154 
156  inline Point_t const& Start() const { return fTraj.Start(); }
158  inline Point_t const& Vertex() const { return fTraj.Vertex(); }
159  inline Point_t const& End() const { return fTraj.End(); }
160  inline Point_t const& LocationAtPoint(size_t i) const { return fTraj.LocationAtPoint(i); }
162 
164  inline Vector_t StartDirection() const { return fTraj.StartDirection(); }
166  inline Vector_t VertexDirection() const { return fTraj.VertexDirection(); }
167  inline Vector_t EndDirection() const { return fTraj.EndDirection(); }
168  inline Vector_t DirectionAtPoint(size_t i) const { return fTraj.DirectionAtPoint(i); }
170 
172  inline bool HasMomentum() const { return fTraj.HasMomentum(); }
175  inline double MomentumAtPoint(unsigned int p) const { return fTraj.MomentumAtPoint(p); }
176  inline double VertexMomentum() const { return fTraj.VertexMomentum(); }
177  inline double StartMomentum() const { return fTraj.StartMomentum(); }
178  inline double EndMomentum() const { return fTraj.EndMomentum(); }
179  inline Vector_t const& VertexMomentumVector() const { return fTraj.VertexMomentumVector(); }
180  inline Vector_t const& StartMomentumVector() const { return fTraj.StartMomentumVector(); }
181  inline Vector_t const& EndMomentumVector() const { return fTraj.EndMomentumVector(); }
182  inline Vector_t const& MomentumVectorAtPoint(size_t i) const
183  {
184  return fTraj.MomentumVectorAtPoint(i);
185  }
187 
189  const SMatrixSym55& StartCovariance() const { return fCovVertex; }
191  const SMatrixSym55& VertexCovariance() const { return fCovVertex; }
192  const SMatrixSym55& EndCovariance() const { return fCovEnd; }
194 
196  inline std::pair<Point_t, Point_t> Extent() const { return fTraj.Extent(); }
198  inline std::pair<Vector_t, Vector_t> Direction() const { return fTraj.Direction(); }
199  inline std::pair<SMatrixSym55, SMatrixSym55> Covariances() const
200  {
201  return std::pair<SMatrixSym55, SMatrixSym55>(fCovVertex, fCovEnd);
202  }
204 
206  inline double Length(size_t p = 0) const { return fTraj.Length(p); }
208  inline float Chi2() const { return fChi2; }
209  inline float Chi2PerNdof() const { return fNdof > 0 ? fChi2 / float(fNdof) : util::kBogusF; }
210  inline int Ndof() const { return fNdof; }
211  inline int ParticleId() const { return fPId; }
213 
215  inline double Theta() const { return fTraj.Theta(); }
217  inline double Theta(size_t p) const { return fTraj.Theta(p); }
218  inline double Phi() const { return fTraj.Phi(); }
219  inline double Phi(size_t p) const { return fTraj.Phi(p); }
220  inline double ZenithAngle() const { return fTraj.ZenithAngle(); }
221  inline double ZenithAngle(size_t p) const { return fTraj.ZenithAngle(p); }
222  inline double AzimuthAngle() const { return fTraj.AzimuthAngle(); }
223  inline double AzimuthAngle(size_t p) const { return fTraj.AzimuthAngle(p); }
225 
227  // Calculate rotation matrices between global (x,y,z) and local (u,v,w)
228  // coordinate systems based on track direction (fDir).
229  // The local w-axis points along the track direction.
231  {
232  return fTraj.GlobalToLocalRotationAtPoint(p);
233  }
235  {
236  return fTraj.LocalToGlobalRotationAtPoint(p);
237  }
239 
241  inline int ID() const { return fID; }
245  friend bool operator<(const Track& a, const Track& b);
247 
253  const SMatrixSym55& EndCovarianceLocal5D() const { return fCovEnd; }
259 
262 
264  template <typename T>
265  inline T Start() const
266  {
267  return fTraj.Start<T>();
268  }
269 
271  template <typename T>
272  inline T Vertex() const
273  {
274  return fTraj.Vertex<T>();
275  }
276 
278  template <typename T>
279  inline T End() const
280  {
281  return fTraj.End<T>();
282  }
283 
285  template <typename T>
286  inline T LocationAtPoint(unsigned int p) const
287  {
288  return fTraj.LocationAtPoint<T>(p);
289  }
290 
292  template <typename T>
293  inline T StartDirection() const
294  {
295  return fTraj.StartDirection<T>();
296  }
297 
299  template <typename T>
300  inline T VertexDirection() const
301  {
302  return fTraj.VertexDirection<T>();
303  }
304 
306  template <typename T>
307  inline T EndDirection() const
308  {
309  return fTraj.EndDirection<T>();
310  }
311 
313  template <typename T>
314  inline T DirectionAtPoint(unsigned int p) const
315  {
316  return fTraj.DirectionAtPoint<T>(p);
317  }
318 
320  template <typename T>
321  inline T StartMomentumVector() const
322  {
323  return fTraj.StartMomentumVector<T>();
324  }
325 
327  template <typename T>
328  inline T VertexMomentumVector() const
329  {
330  return fTraj.VertexMomentumVector<T>();
331  }
332 
334  template <typename T>
335  inline T EndMomentumVector() const
336  {
337  return fTraj.EndMomentumVector<T>();
338  }
339 
341  template <typename T>
342  inline T MomentumVectorAtPoint(unsigned int p) const
343  {
344  return fTraj.MomentumVectorAtPoint<T>(p);
345  }
346 
348  template <typename T>
349  inline T StartCovariance() const;
350 
352  template <typename T>
353  inline T VertexCovariance() const
354  {
355  return StartCovariance<T>();
356  }
357 
359  template <typename T>
360  inline T EndCovariance() const;
361 
363  template <typename T>
364  inline std::pair<T, T> Extent() const
365  {
366  return fTraj.Extent<T>();
367  }
368 
370  template <typename T>
371  inline std::pair<T, T> Direction() const
372  {
373  return fTraj.Direction<T>();
374  }
375 
377  template <typename T>
378  inline T GlobalToLocalRotationAtPoint(unsigned int p) const
379  {
380  return fTraj.GlobalToLocalRotationAtPoint<T>(p);
381  }
382 
384  template <typename T>
385  inline T LocalToGlobalRotationAtPoint(unsigned int p) const
386  {
387  return fTraj.LocalToGlobalRotationAtPoint<T>(p);
388  }
390 
391  protected:
392  friend std::ostream& operator<<(std::ostream& stream, Track const& a);
393  };
394 }
395 
396 template <typename T>
398 {
399  T result = T(5, 5);
400  for (unsigned int i = 0; i < 5; i++) {
401  for (unsigned int j = 0; j < 5; j++) {
402  result(i, j) = fCovVertex.At(i, j);
403  }
404  }
405  return result;
406 }
407 
408 template <typename T>
410 {
411  T result = T(5, 5);
412  for (unsigned int i = 0; i < 5; i++) {
413  for (unsigned int j = 0; j < 5; j++) {
414  result(i, j) = fCovEnd.At(i, j);
415  }
416  }
417  return result;
418 }
419 
420 #endif // LARDATAOBJ_RECOBASE_TRACK_H
recob::TrajectoryPointFlags PointFlags_t
Type for flags of a point/hit.
TrackTrajectory fTraj
Stored trajectory data member.
Definition: Track.h:70
T VertexCovariance() const
Covariance matrix at start point. Use e.g. as:
Definition: Track.h:353
SVector6 EndParametersGlobal6D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
Definition: Track.cxx:57
double EndMomentum() const
Definition: Track.h:178
bool HasPoint(size_t i) const
Returns whether the specified trajectory point is available.
Definition: Trajectory.h:166
double VertexMomentum() const
Definition: Track.h:176
A point in the trajectory, with position and momentum.
Definition: TrackingTypes.h:85
tracking::SVector5 SVector5
Definition: Track.h:64
tracking::Momenta_t Momenta_t
Definition: Track.h:55
SMatrixSym55 fCovVertex
Covariance matrix (local 5D representation) at start point (vertex)
Definition: Track.h:75
Reconstruction base classes.
SMatrixSym55 fCovEnd
Covariance matrix (local 5D representation) at end point.
Definition: Track.h:76
Track(Positions_t &&positions, Momenta_t &&momenta, Flags_t &&flags, bool hasMomenta, int PId, float Chi2, int Ndof, SMatrixSym55 &&CovVertex, SMatrixSym55 &&CovEnd, int tkID)
Definition: Track.h:113
std::pair< T, T > Direction() const
Fills the starting and ending direction of the trajectory.
T Start() const
Start position. Use e.g. as:
Definition: Track.h:265
T DirectionAtPoint(unsigned int p) const
Direction at point p. Use e.g. as:
int ParticleId() const
Access to various track properties.
Definition: Track.h:211
Vector_t const & MomentumVectorAtPoint(size_t i) const
Definition: Track.h:182
SMatrixSym66 EndCovarianceGlobal6D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
Definition: Track.cxx:87
std::pair< T, T > Extent() const
Fills the first and last valid point in the trajectory.
const recob::TrackTrajectory & Trajectory() const
Access to the stored recob::TrackTrajectory.
Definition: Track.h:132
const SMatrixSym55 & StartCovariance() const
Access to covariance matrices.
Definition: Track.h:190
size_t LastValidPoint() const
Returns the index of the last valid point in the trajectory.
size_t PreviousValidPoint(size_t index) const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:142
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
Access to track position at different points.
Definition: Track.h:160
T MomentumVectorAtPoint(unsigned int p) const
Momentum vector at point p. Use e.g. as:
Definition: Track.h:342
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:
Definition: Track.h:286
bool HasMomentum() const
Definition: Track.h:174
TrackTrajectory::Flags_t Flags_t
Definition: Track.h:67
bool HasValidPoint(size_t i) const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:145
Vector_t const & StartMomentumVector() const
Returns the momentum of the trajectory at the first valid point [GeV/c].
float Chi2() const
Access to various track properties.
Definition: Track.h:208
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:136
Vector_t const & VertexMomentumVector() const
Returns the momentum of the trajectory at the first valid point [GeV/c].
Vector_t VertexDirection() const
Access to track direction at different points.
Definition: Track.h:166
tracking::SMatrixSym66 SMatrixSym66
Definition: Track.h:60
const SMatrixSym55 & VertexCovariance() const
Access to covariance matrices.
Definition: Track.h:191
double ZenithAngle(size_t p) const
Access to spherical or geographical angles at vertex or at any point.
Definition: Track.h:221
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:
Definition: Track.h:307
ROOT::Math::SMatrix< Double32_t, 6, 5 > SMatrix65
STL namespace.
double ZenithAngle() const
Access to spherical or geographical angles at vertex or at any point.
Definition: Track.h:220
ROOT::Math::SMatrix< Double32_t, 5, 5, ROOT::Math::MatRepSym< Double32_t, 5 >> SMatrixSym55
ROOT::Math::SMatrix< Double32_t, 6, 6, ROOT::Math::MatRepSym< Double32_t, 6 >> SMatrixSym66
T LocalToGlobalRotationAtPoint(unsigned int p) const
Returns a rotation matrix bringing relative directions to global. Use e.g. as:
Definition: Track.h:385
double EndMomentum() const
std::pair< SMatrixSym55, SMatrixSym55 > Covariances() const
Access to position, momentum or covariance at the start and end of the track.
Definition: Track.h:199
tracking::Rotation_t Rotation_t
Definition: Track.h:56
T StartMomentumVector() const
Momentum vector at start point. Use e.g. as:
Definition: Track.h:321
tracking::SVector6 SVector6
Definition: Track.h:63
unsigned int CountValidPoints() const
Computes and returns the number of points with valid location.
SMatrixSym66 VertexCovarianceGlobal6D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
Definition: Track.cxx:81
double MomentumAtPoint(unsigned int p) const
Definition: Track.h:175
size_t FirstPoint() const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:138
bool HasPoint(size_t i) const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:144
tracking::SMatrix56 SMatrix56
Definition: Track.h:62
friend bool operator<(const Track &a, const Track &b)
Definition: Track.cxx:37
std::pair< Vector_t, Vector_t > Direction() const
Access to position, momentum or covariance at the start and end of the track.
Definition: Track.h:198
Rotation_t GlobalToLocalRotationAtPoint(size_t p) const
Definition: Track.h:230
tracking::Vector_t Vector_t
Definition: Track.h:53
unsigned int CountValidPoints() const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:146
Vector_t VertexDirection() const
Returns the direction of the trajectory at the first point.
SVector5 EndParametersLocal5D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
Definition: Track.cxx:75
Vector_t const & EndMomentumVector() const
Definition: Track.h:181
double Phi() const
Access to spherical or geographical angles at vertex or at any point.
Definition: Track.h:218
Vector_t StartDirection() const
Access to track direction at different points.
Definition: Track.h:165
double Length(size_t startAt=0) const
Returns the approximate length of the trajectory.
tracking::Positions_t Positions_t
Definition: Track.h:54
double Length(size_t p=0) const
Access to various track properties.
Definition: Track.h:207
size_t LastPoint() const
Returns the index of the last point in the trajectory.
Definition: Trajectory.h:159
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.
Definition: Trajectory.h:195
int fID
track&#39;s ID
Definition: Track.h:77
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.
Definition: Trajectory.h:153
Point_t const & Start() const
Access to track position at different points.
Definition: Track.h:157
size_t LastValidPoint() const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:143
float fChi2
Fit chi2.
Definition: Track.h:72
std::pair< T, T > Direction() const
Direction at start and end points. Use e.g. as:
Definition: Track.h:371
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.
Definition: Track.h:216
Track(TrackTrajectory const &Traj, int PId, float Chi2, int Ndof, SMatrixSym55 const &CovVertex, SMatrixSym55 const &CovEnd, int tkID)
Definition: Track.h:83
float Chi2PerNdof() const
Access to various track properties.
Definition: Track.h:209
ROOT::Math::SVector< Double32_t, 6 > SVector6
double MomentumAtPoint(size_t i) const
Computes and returns the modulus of the momentum at a point.
Definition: Trajectory.h:402
Point_t const & Vertex() const
Access to track position at different points.
Definition: Track.h:158
bool HasValidPoint(size_t i) const
Returns whether the specified point has NoPoint flag unset.
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 ...
Definition: TrackingTypes.h:31
Vector_t const & StartMomentumVector() const
Definition: Track.h:180
double StartMomentum() const
TrajectoryPoint_t TrajectoryPoint(size_t i) const
Access to i-th TrajectoryPoint or its Flags.
Definition: Track.h:151
const SMatrixSym55 & EndCovariance() const
Access to covariance matrices.
Definition: Track.h:192
size_t NPoints() const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:137
std::vector< Vector_t > Momenta_t
Type of momentum list.
Definition: TrackingTypes.h:37
T StartDirection() const
Start direction. Use e.g. as:
Definition: Track.h:293
tracking::SMatrix65 SMatrix65
Definition: Track.h:61
Data product for reconstructed trajectory in space.
Track()=default
T VertexMomentumVector() const
Momentum vector at start point. Use e.g. as:
Definition: Track.h:328
friend std::ostream & operator<<(std::ostream &stream, Track const &a)
Definition: Track.cxx:20
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&#39;s 0).
Definition: Trajectory.h:156
size_t NumberTrajectoryPoints() const
Returns the number of stored trajectory points.
Definition: Trajectory.h:143
std::pair< T, T > Extent() const
Position at start and end points. Use e.g. as:
Definition: Track.h:364
double AzimuthAngle(size_t p) const
Access to spherical or geographical angles at vertex or at any point.
Definition: Track.h:223
T EndMomentumVector() const
Momentum vector at end point. Use e.g. as:
Definition: Track.h:335
Track(TrackTrajectory &&Traj, int PId, float Chi2, int Ndof, SMatrixSym55 &&CovVertex, SMatrixSym55 &&CovEnd, int tkID)
Definition: Track.h:98
double Phi(size_t p) const
Azimuthal angle at a point on the trajectory, with respect to z.
int Ndof() const
Access to various track properties.
Definition: Track.h:210
Point_t const & Vertex() const
Returns the position of the first valid point of the trajectory [cm].
int fNdof
Number of degrees of freedom of the fit.
Definition: Track.h:73
ROOT::Math::Rotation3D Rotation_t
Type for representation of space rotations.
Definition: TrackingTypes.h:40
tracking::SMatrixSym55 SMatrixSym55
Definition: Track.h:59
size_t FirstValidPoint() const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:140
Vector_t EndDirection() const
Returns the direction of the trajectory at the last point.
T VertexDirection() const
Start direction. Use e.g. as:
Definition: Track.h:300
double Theta(size_t p) const
Trajectory angle at point, with respect to positive z direction.
int ID() const
Definition: Track.h:244
double StartMomentum() const
Definition: Track.h:177
SVector6 VertexParametersGlobal6D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
Definition: Track.cxx:45
std::vector< Point_t > Positions_t
Type of trajectory point list.
Definition: TrackingTypes.h:34
size_t NextValidPoint(size_t index) const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:141
size_t FirstValidPoint() const
Returns the index of the first valid point in the trajectory.
Rotation_t LocalToGlobalRotationAtPoint(size_t p) const
Definition: Track.h:234
constexpr float kBogusF
obviously bogus float value
const SMatrixSym55 & EndCovarianceLocal5D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
Definition: Track.h:253
bool HasMomentum() const
Returns whether information about the momentum is available.
Definition: Trajectory.h:387
double AzimuthAngle() const
Access to spherical or geographical angles at vertex or at any point.
Definition: Track.h:222
Vector_t const & VertexMomentumVector() const
Definition: Track.h:179
Vector_t const & EndMomentumVector() const
Returns the momentum of the trajectory at the last valid point [GeV/c].
Vector_t EndDirection() const
Access to track direction at different points.
Definition: Track.h:167
SVector5 VertexParametersLocal5D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
Definition: Track.cxx:69
ROOT::Math::SVector< Double32_t, 5 > SVector5
ROOT::Math::SMatrix< Double32_t, 5, 6 > SMatrix56
Point_t const & End() const
Returns the position of the last valid point of the trajectory [cm].
tracking::Point_t Point_t
Definition: Track.h:52
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
Access to i-th TrajectoryPoint or its Flags.
Definition: Track.h:152
Point_t const & End() const
Access to track position at different points.
Definition: Track.h:159
double Phi(size_t p) const
Access to spherical or geographical angles at vertex or at any point.
Definition: Track.h:219
T End() const
End position. Use e.g. as:
Definition: Track.h:279
Vector_t DirectionAtPoint(size_t i) const
Access to track direction at different points.
Definition: Track.h:168
T DirectionAtPoint(unsigned int p) const
Direction at point p. Use e.g. as:
Definition: Track.h:314
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
Access to spherical or geographical angles at vertex or at any point.
Definition: Track.h:217
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...
Definition: TrackingTypes.h:27
size_t LastPoint() const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:139
const SMatrixSym55 & VertexCovarianceLocal5D() const
Accessors to track parameters and covariance matrices in Local5D and Global6D coordinates.
Definition: Track.h:252
T GlobalToLocalRotationAtPoint(unsigned int p) const
Returns a rotation matrix that brings trajectory direction along z. Use e.g. as:
Definition: Track.h:378
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:
Definition: Track.h:49
std::pair< Point_t, Point_t > Extent() const
Access to position, momentum or covariance at the start and end of the track.
Definition: Track.h:197
int fPId
Particle ID hypothesis used in the fit (if any)
Definition: Track.h:71
T Vertex() const
Start position. Use e.g. as:
Definition: Track.h:272