236 bool selectPdg =
true;
240 int pfPartIdx = pfpCluEntry.first;
243 if (pdg != 11)
continue;
247 mf::LogVerbatim(
"PMAlgFitter") <<
"Process clusters from PFP:" << pfPartIdx <<
", pdg:" <<
pdg;
249 std::vector<art::Ptr<recob::Hit>> allHits;
252 std::unordered_map<geo::View_t, size_t> clu_count;
253 for (
const auto& c : pfpCluEntry.second) {
254 if (c->NHits() == 0) {
continue; }
256 candidate.
Clusters().push_back(c.key());
257 clu_count[c->View()]++;
259 allHits.reserve(allHits.size() +
fCluHits.at(c.key()).
size());
260 for (
const auto&
h :
fCluHits.at(c.key()))
261 allHits.push_back(
h);
263 if (clu_count.size() > 1)
265 candidate.
SetKey(pfpCluEntry.first);
267 mf::LogVerbatim(
"PMAlgFitter") <<
"building..."
270 auto search =
fPfpVtx.find(pfPartIdx);
std::map< int, pma::Vector3D > fPfpVtx
void SetKey(int key)
Set key of an external object associated to this track candidate.
std::vector< pma::Node3D * > const & Nodes() const noexcept
std::size_t size(FixedBins< T, C > const &) noexcept
void SetTrack(pma::Track3D *trk)
std::map< int, std::vector< art::Ptr< recob::Cluster > > > fPfpClusters
std::vector< int > fTrackingOnlyPdg
std::map< int, int > fPfpPdgCodes
std::vector< int > fTrackingSkipPdg
pma::ProjectionMatchingAlg fProjectionMatchingAlg
bool has(const std::vector< int > &v, int i) const
std::vector< std::vector< art::Ptr< recob::Hit > > > fCluHits
bool HasTwoViews(size_t nmin=1) const
double Length(size_t step=1) const
pma::Track3D * buildShowerSeg(const detinfo::DetectorPropertiesData &detProp, const std::vector< art::Ptr< recob::Hit >> &hits, const pma::Vector3D &vtx) const
const std::vector< size_t > & Clusters() const
pma::TrkCandidateColl fResult
pma::Track3D * Track() const
void push_back(const TrkCandidate &trk)