LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
TrackTrajectoryCreationBookKeeper.h
Go to the documentation of this file.
1 #ifndef TRACKTRAJECTORYCREATIONBOOKKEEPER_H
2 #define TRACKTRAJECTORYCREATIONBOOKKEEPER_H
3 
4 
8 
9 namespace trkmkr {
10 
26  using namespace recob;
27  using Point_t = tracking::Point_t;
30 
32  public:
35  : hasMomenta_(hasMomenta), hits(&outhits)
36  {
37  hits->clear();
38  }
39  //
47  //
49  void addPoint(const Point_t& point, const Vector_t& vect, art::Ptr<Hit> hit, const PointFlags_t& flag) {
51  positions.push_back(point);
52  momenta.push_back(vect);
53  hits->push_back(hit);
54  flags.push_back(flag);
55  }
56  void addPoint(Point_t&& point, Vector_t&& vect, art::Ptr<Hit> hit, PointFlags_t&& flag) {
57  positions.push_back(std::move(point));
58  momenta.push_back(std::move(vect));
59  hits->push_back(hit);
60  flags.push_back(std::move(flag));
61  }
63  //
66  return TrackTrajectory(std::move(positions),std::move(momenta),std::move(flags),hasMomenta_);
67  }
68  //
69  private:
71  std::vector<art::Ptr<Hit> >* hits;
72  std::vector<Point_t> positions;
73  std::vector<Vector_t> momenta;
74  std::vector<PointFlags_t> flags;
75  //
76  };
77 
78 }
79 #endif
recob::TrajectoryPointFlags PointFlags_t
Type for flags of a point/hit.
tracking::Point_t Point_t
void addPoint(Point_t &&point, Vector_t &&vect, art::Ptr< Hit > hit, PointFlags_t &&flag)
Add a single point; different version of the functions are provided using const references or rvalue ...
Reconstruction base classes.
Declaration of signal hit object.
recob::tracking::Point_t Point_t
tracking::Vector_t Vector_t
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
void hits()
Definition: readHits.C:15
Helper class to aid the creation of a recob::TrackTrajectory, keeping data vectors in sync...
A trajectory in space reconstructed from hits.
Data product for reconstructed trajectory in space.
TrackTrajectoryCreationBookKeeper(std::vector< art::Ptr< Hit > > &outhits, bool hasMomenta)
Constructor: needs reference to output hit vector, and hasMomenta bool (true if Vector_t are momenta...
Detector simulation of raw signals on wires.
recob::tracking::Vector_t Vector_t
Definition: fwd.h:25
Set of flags pertaining a point of the track.
TrackTrajectory::PointFlags_t PointFlags_t
TrackTrajectory finalizeTrackTrajectory()
Get the finalized recob::TrackTrajectory object; internal data vectors are moved so no more points sh...