80 const art::FindManyP<recob::Cluster>& fmc =
83 std::vector<art::Ptr<recob::Cluster>> clusters = fmc.at(pfparticle.
key());
86 const art::FindManyP<recob::Hit>& fmhc =
90 std::map<geo::PlaneID::PlaneID_t, std::vector<art::Ptr<recob::Hit>>> planeHits;
93 for (
auto const&
cluster : clusters) {
96 std::vector<art::Ptr<recob::Hit>> hits = fmhc.at(
cluster.key());
101 planeHits[plane].insert(planeHits[plane].
end(), hits.begin(), hits.end());
106 unsigned int bestPlaneNumHits = 0;
109 std::vector<double> energyVec(
fNumPlanes, -999.);
110 std::vector<double> energyError(
fNumPlanes, -999.);
112 auto const clockData =
117 for (
auto const& [plane, hits] : planeHits) {
119 unsigned int planeNumHits = hits.size();
124 if (Energy > 0) energyVec.at(plane) = Energy;
126 if (planeNumHits > bestPlaneNumHits) {
128 bestPlaneNumHits = planeNumHits;
134 if (bestPlane < fGeom->Nplanes()) {
137 int bestPlaneVal(bestPlane);
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
unsigned int PlaneID_t
Type for the ID number.
Set of hits with a 2D structure.
Cluster finding and building.
key_type key() const noexcept
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
static int max(int a, int b)
2D representation of charge deposited in the TDC/wire plane