75 typedef std::pair<recob::SpacePoint, art::Ptr<recob::Hit> >
SpHitPair;
86 outSpacePointHitPairs->emplace_back(ope.
getSpacePoint(), hptr);
92 if (isTrackFitInfosInit()) {
93 outTrackFitHitInfos.reset();
96 if (isSpacePointsInit()) {
97 outSpacePointHitPairs.reset();
103 outTrackFitHitInfos = std::make_unique< std::vector<recob::TrackFitHitInfo> >();
107 outSpacePointHitPairs = std::make_unique< std::vector<SpHitPair> >();
115 if (!isTrackFitInfosInit())
throw std::logic_error(
"outTrackFitHitInfos is not available (any more?).");
116 auto tmp = *outTrackFitHitInfos; outTrackFitHitInfos.reset();
return tmp;
120 if (!isSpacePointsInit())
throw std::logic_error(
"outSpacePointHitPairs is not available (any more?).");
121 auto tmp = *outSpacePointHitPairs; outSpacePointHitPairs.reset();
return tmp;
161 virtual bool makeTrack(
const recob::Trajectory& traj,
const std::vector<recob::TrajectoryPointFlags>& flags,
180 return makeTrack(*ttraj, ttraj.
key(), inHits, outTrack, outHits, optionals);
192 return makeTrack(track->
Trajectory(), track.
key(), inHits, outTrack, outHits, optionals);
198 return makeTrack(track.
Trajectory(), track.
ID(), inHits, outTrack, outHits, optionals);
bool isTrackFitInfoSet()
check if the recob::TrackFitHitInfo unique_ptr is set
void initTrackFitInfos()
initialize the output vector of TrackFitHitInfos
void setTrackFitHitInfo(const recob::TrackFitHitInfo &aTrackFitHitInfo)
const recob::TrackTrajectory & Trajectory() const
Access to the stored recob::TrackTrajectory.
recob::TrackFitHitInfo getTrackFitHitInfo()
get the recob::TrackFitHitInfo object, and reset the unique_ptr
bool isSpacePointSet()
check if the recob::SpacePoint unique_ptr is set
Declaration of signal hit object.
std::unique_ptr< recob::SpacePoint > spacePoint
virtual bool makeTrack(const art::Ptr< recob::Trajectory > traj, const std::vector< recob::TrajectoryPointFlags > &flags, const std::vector< art::Ptr< recob::Hit > > &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit > > &outHits, OptionalOutputs &optionals) const
makeTrack functions with recob::Trajectory as argument; calls the version with recob::TrackTrajectory...
Base abstract class for tools used to fit tracks.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::unique_ptr< std::vector< SpHitPair > > outSpacePointHitPairs
Provides recob::Track data product.
size_t NPoints() const
Returns the number of stored trajectory points.
A trajectory in space reconstructed from hits.
Object storing per-hit information from a track fit.
Struct holding point-by-point elements used in OptionalOutputs.
void setSpacePoint(const recob::SpacePoint &aSpacePoint)
std::vector< PointFlags_t > Flags_t
Type of point flag list.
void addPoint(OptionalPointElement &ope, art::Ptr< recob::Hit > hptr)
add one OptionalPointElement and the corresponding hit
std::vector< SpHitPair > spacePointHitPairs()
get the output vector of SpHitPair by releasing and moving
void reset()
reset the stored vectors
A trajectory in space reconstructed from hits.
virtual void initEvent(const art::Event &e)
per-event initialization; concrete classes may override this function to retrieve other products or a...
recob::SpacePoint getSpacePoint()
get the recob::SpacePoint object, and release the unique_ptr
std::vector< recob::TrackFitHitInfo > trackFitHitInfos()
get the output vector of TrackFitHitInfos by releasing and moving
std::pair< recob::SpacePoint, art::Ptr< recob::Hit > > SpHitPair
void addPoint(OptionalPointElement &ope)
add one OptionalPointElement
bool isTrackFitInfosInit()
check initialization of the output vector of TrackFitHitInfos
void setSpacePoint(recob::SpacePoint &&aSpacePoint)
set the recob::SpacePoint unique_ptr
virtual bool makeTrack(const art::Ptr< recob::TrackTrajectory > ttraj, const std::vector< art::Ptr< recob::Hit > > &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit > > &outHits, OptionalOutputs &optionals) const
makeTrack functions with art::Ptr<recob::TrackTrajectory>; calls the purely virtual version with cons...
virtual bool makeTrack(const recob::Track &track, const std::vector< art::Ptr< recob::Hit > > &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit > > &outHits, OptionalOutputs &optionals) const
makeTrack functions with recob::Track as argument; calls the version with recob::TrackTrajectory.
void setTrackFitHitInfo(recob::TrackFitHitInfo &&aTrackFitHitInfo)
set the recob::TrackFitHitInfo unique_ptr
std::unique_ptr< recob::TrackFitHitInfo > trackFitHitInfo
std::unique_ptr< std::vector< recob::TrackFitHitInfo > > outTrackFitHitInfos
void initSpacePoints()
initialize the output vector of SpHitPair
Struct holding optional TrackMaker outputs.
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
bool isSpacePointsInit()
check initialization of the output vector of SpHitPair