13 #include "art/Framework/Services/Registry/ServiceHandle.h"
14 #include "cetlib_except/exception.h"
36 const art::PtrVector<recob::Hit>& hits,
41 art::ServiceHandle<geo::Geometry const> geom;
47 std::map<unsigned int, KHitGroup*> group_map;
51 for (art::PtrVector<recob::Hit>::const_iterator ihit = hits.begin(); ihit != hits.end();
58 uint32_t channel = hit.
Channel();
61 if (only_plane >= 0 && hitWireID.
Plane != (
unsigned int)(only_plane))
continue;
66 if (group_map.count(channel) == 0) {
69 group_map[channel] = pgr;
72 pgr = group_map[channel];
74 throw cet::exception(
"KHitContainerWireX")
75 << __func__ <<
": no group map for channel " << channel <<
"\n";
void fill(const detinfo::DetectorPropertiesData &clock_data, const art::PtrVector< recob::Hit > &hits, int only_plane) override
A KHitContainer for KHitWireX type measurements.
geo::WireID WireID() const
Kalman filter wire-time measurement on a SurfWireX surface.
const std::list< KHitGroup > & getUnsorted() const
PlaneID_t Plane
Index of the plane within its TPC.
void addHit(const std::shared_ptr< const KHitBase > &hit)
Add a mesaurement into the colleciton.
const std::shared_ptr< const Surface > & getSurface() const
Surface accessor.
2D representation of charge deposited in the TDC/wire plane
raw::ChannelID_t Channel() const
ID of the readout channel the hit was extracted from.
art framework interface to geometry description