LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
TrackTrajectoryCreationBookKeeper.h
Go to the documentation of this file.
1 #ifndef TRACKTRAJECTORYCREATIONBOOKKEEPER_H
2 #define TRACKTRAJECTORYCREATIONBOOKKEEPER_H
3 
8 
9 #include <utility>
10 #include <vector>
11 
12 namespace trkmkr {
13 
32 
34  public:
37  : hasMomenta_(hasMomenta), hits(&outhits)
38  {
39  hits->clear();
40  }
41  //
49  //
51  void addPoint(const Point_t& point,
53  const Vector_t& vect,
55  const PointFlags_t& flag)
56  {
57  positions.push_back(point);
58  momenta.push_back(vect);
59  hits->push_back(hit);
60  flags.push_back(flag);
61  }
62  void addPoint(Point_t&& point, Vector_t&& vect, art::Ptr<recob::Hit> hit, PointFlags_t&& flag)
63  {
64  positions.push_back(std::move(point));
65  momenta.push_back(std::move(vect));
66  hits->push_back(hit);
67  flags.push_back(std::move(flag));
68  }
70  //
73  {
75  std::move(positions), std::move(momenta), std::move(flags), hasMomenta_);
76  }
77  //
78  private:
80  std::vector<art::Ptr<recob::Hit>>* hits;
81  std::vector<Point_t> positions;
82  std::vector<Vector_t> momenta;
83  std::vector<PointFlags_t> flags;
84  //
85  };
86 
87 }
88 #endif
recob::TrajectoryPointFlags PointFlags_t
Type for flags of a point/hit.
TrackTrajectoryCreationBookKeeper(std::vector< art::Ptr< recob::Hit >> &outhits, bool hasMomenta)
Constructor: needs reference to output hit vector, and hasMomenta bool (true if Vector_t are momenta...
Declaration of signal hit object.
recob::TrackTrajectory finalizeTrackTrajectory()
Get the finalized recob::TrackTrajectory object; internal data vectors are moved so no more points sh...
void addPoint(const Point_t &point, const Vector_t &vect, art::Ptr< recob::Hit > hit, const PointFlags_t &flag)
Add a single point; different version of the functions are provided using const references or rvalue ...
recob::tracking::Point_t Point_t
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
recob::TrackTrajectory::PointFlags_t PointFlags_t
Helper class to aid the creation of a recob::TrackTrajectory, keeping data vectors in sync...
A trajectory in space reconstructed from hits.
recob::tracking::Vector_t Vector_t
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
Data product for reconstructed trajectory in space.
void addPoint(Point_t &&point, Vector_t &&vect, art::Ptr< recob::Hit > hit, PointFlags_t &&flag)
Add a single point; different version of the functions are provided using const references or rvalue ...
Detector simulation of raw signals on wires.
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
TrackTrajectoryCreationBookKeeper & operator=(const TrackTrajectoryCreationBookKeeper &)=delete
Avoid copies of this object.
recob::tracking::Vector_t Vector_t
Set of flags pertaining a point of the track.
recob::tracking::Point_t Point_t