11#include <framework/datastore/RelationsObject.h>
12#include <simulation/dataobjects/MCTrajectoryPoint.h>
27 typedef std::vector<MCTrajectoryPoint>::iterator
iterator;
56 void addPoint(
float x,
float y,
float z,
float px,
float py,
float pz)
59 m_points.emplace_back(x, y, z, px, py, pz);
66 void simplify(
float distanceTolerance);
Class to save the full simulated trajectory of a particle.
MCParticleTrajectory()
Default constructor.
const MCTrajectoryPoint & operator[](size_t index) const
return a point
const MCTrajectoryPoint & back() const
return reference to the last point
size_t size() const
return number of points
const_iterator begin() const
return const iterator to the first point
const MCTrajectoryPoint & front() const
return reference to the first point
std::vector< MCTrajectoryPoint >::const_iterator const_iterator
const iterator definition to allow iteration
void addPoint(float x, float y, float z, float px, float py, float pz)
Add a point to the trajectory.
bool empty() const
return true if size()==0
std::vector< MCTrajectoryPoint >::iterator iterator
iterator definition to allow iteration
ClassDef(MCParticleTrajectory, 1)
Needed to make the ROOT object storable.
iterator end()
return iterator beyond the last point
const_iterator end() const
return const iterator beyond the last point
iterator begin()
return iterator to the first point
void simplify(float distanceTolerance)
Simplify the trajectory using the Ramer-Douglas-Peuker algorithm.
std::vector< MCTrajectoryPoint > m_points
Collection of points along the trajectory.
Defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.
Small struct to encode a position/momentum without additional overhead.