13 #include "cetlib_except/exception.h" 57 throw cet::exception(
"KHitContainer") << __func__ <<
": no propagator" <<
"\n";
73 const std::shared_ptr<const Surface>& psurf = gr.
getSurface();
79 boost::optional<double> dist = prop->
vec_prop(trkp, psurf, dir,
false, 0, 0);
111 std::vector<unsigned int> planehits(3, 0);
123 ++planehits.at(plane);
128 unsigned int prefplane = 0;
129 for(
unsigned int i=0; i<planehits.size(); ++i) {
130 if(planehits[i] >= planehits[prefplane])
void sort(const KTrack &trk, bool addUnsorted, const Propagator *prop, Propagator::PropDirection dir=Propagator::UNKNOWN)
(Re)sort objects in unsorted and sorted lists.
void setPath(bool has_path, double path)
Set path flag and estimated path distance.
A collection of KHitGroups.
KHitContainer()
Default constructor.
unsigned int getPreferredPlane() const
Return the plane with the most KHitGroups in the unsorted list.
std::list< KHitGroup > fUnused
Unused KHitGroup objects.
virtual ~KHitContainer()
Destructor.
std::list< KHitGroup > fUnsorted
Unsorted KHitGroup objects.
boost::optional< double > vec_prop(KTrack &trk, const std::shared_ptr< const Surface > &psurf, PropDirection dir, bool doDedx, TrackMatrix *prop_matrix=0, TrackError *noise_matrix=0) const
Propagate without error (long distance).
void clear()
Clear all lists.
virtual void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)=0
const std::shared_ptr< const Surface > & getSurface() const
Surface accessor.
std::list< KHitGroup > fSorted
Sorted KHitGroup objects.
cet::coded_exception< error, detail::translate > exception
PropDirection
Propagation direction enum.
void reset()
Move all objects to unsorted list (from sorted and unused lists).
int getPlane() const
Plane index.