14 class DetectorPropertiesData;
42 trackFitHitInfo = std::make_unique<recob::TrackFitHitInfo>(
std::move(aTrackFitHitInfo));
47 trackFitHitInfo = std::make_unique<recob::TrackFitHitInfo>(aTrackFitHitInfo);
53 return bool(trackFitHitInfo);
59 auto tmp = *trackFitHitInfo;
60 trackFitHitInfo.reset();
68 spacePoint = std::make_unique<recob::SpacePoint>(aSpacePoint);
73 spacePoint = std::make_unique<recob::SpacePoint>(aSpacePoint);
79 return bool(spacePoint);
85 auto tmp = *spacePoint;
116 typedef std::pair<recob::SpacePoint, art::Ptr<recob::Hit>>
SpHitPair;
131 outSpacePointHitPairs->emplace_back(ope.
getSpacePoint(), hptr);
139 if (isTrackFitInfosInit()) {
140 outTrackFitHitInfos.reset();
143 if (isSpacePointsInit()) {
144 outSpacePointHitPairs.reset();
152 outTrackFitHitInfos = std::make_unique<std::vector<recob::TrackFitHitInfo>>();
158 outSpacePointHitPairs = std::make_unique<std::vector<SpHitPair>>();
164 return bool(outTrackFitHitInfos);
170 return bool(outSpacePointHitPairs);
173 std::vector<recob::TrackFitHitInfo>
176 if (!isTrackFitInfosInit())
177 throw std::logic_error(
"outTrackFitHitInfos is not available (any more?).");
178 auto tmp = *outTrackFitHitInfos;
179 outTrackFitHitInfos.reset();
183 std::vector<SpHitPair>
186 if (!isSpacePointsInit())
187 throw std::logic_error(
"outSpacePointHitPairs is not available (any more?).");
188 auto tmp = *outSpacePointHitPairs;
189 outSpacePointHitPairs.reset();
237 const std::vector<recob::TrajectoryPointFlags>& flags,
256 const std::vector<recob::TrajectoryPointFlags>& flags,
282 return makeTrack(detProp, *ttraj, ttraj.
key(), inHits, outTrack, outHits, optionals);
307 detProp, track->
Trajectory(), track.
key(), inHits, outTrack, outHits, optionals);
319 detProp, track.
Trajectory(), track.
ID(), inHits, outTrack, outHits, optionals);
virtual bool makeTrack(const detinfo::DetectorPropertiesData &detProp, 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...
bool isTrackFitInfoSet()
check if the recob::TrackFitHitInfo unique_ptr is set
virtual bool makeTrack(const detinfo::DetectorPropertiesData &detProp, 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
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
std::unique_ptr< recob::SpacePoint > spacePoint
std::unique_ptr< std::vector< recob::TrackFitHitInfo > > outTrackFitHitInfos
std::unique_ptr< recob::TrackFitHitInfo > trackFitHitInfo
virtual bool makeTrack(const detinfo::DetectorPropertiesData &detProp, const art::Ptr< recob::Track > track, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
Base abstract class for tools used to fit tracks.
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.
key_type key() const noexcept
void setSpacePoint(const recob::SpacePoint &aSpacePoint)
virtual bool makeTrack(const detinfo::DetectorPropertiesData &detProp, const recob::Trajectory &traj, const std::vector< recob::TrajectoryPointFlags > &flags, const int tkID, 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...
General LArSoft Utilities.
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::unique_ptr< std::vector< SpHitPair > > outSpacePointHitPairs
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.
Declaration of signal hit object.
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
Provides recob::Track data product.
bool isTrackFitInfosInit()
check initialization of the output vector of TrackFitHitInfos
void setSpacePoint(recob::SpacePoint &&aSpacePoint)
set the recob::SpacePoint unique_ptr
void setTrackFitHitInfo(recob::TrackFitHitInfo &&aTrackFitHitInfo)
set the recob::TrackFitHitInfo unique_ptr
virtual bool makeTrack(const detinfo::DetectorPropertiesData &detProp, 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
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