53 #include "art_root_io/TFileService.h" 54 #include "cetlib/cpu_timer.h" 99 std::unordered_map<const reco::ClusterHit3D*, art::Ptr<recob::SpacePoint>>;
120 std::string& pathName,
121 std::string& vertexName,
122 std::string& extremeName)
165 const std::string& path =
"")
167 for (
auto&
hit : recobHits)
202 std::vector<recob::SpacePoint>& spacePointVector,
204 size_t spacePointStart,
207 for (
size_t idx = spacePointStart; idx < spacePointVector.size(); idx++) {
218 for (
size_t idx = edgeStart; idx < edgeVector.size(); idx++) {
228 const std::string& path =
"")
230 for (
auto& spacePoint : spacePointVector)
335 std::vector<recob::Seed>& seedVec,
356 std::vector<recob::SpacePoint>& spacePointVec,
361 const std::string& path =
"")
const;
389 using IdxToPCAMap = std::map<size_t, const reco::PrincipalComponents*>;
407 size_t pfParticleParent,
437 size_t pfParticleParent,
490 std::unique_ptr<lar_cluster3d::IHit3DBuilder>
492 std::unique_ptr<lar_cluster3d::IClusterAlg>
494 std::unique_ptr<lar_cluster3d::IClusterModAlg>
496 std::unique_ptr<lar_cluster3d::IClusterModAlg>
498 std::unique_ptr<lar_cluster3d::IClusterParametersBuilder>
540 m_clusterBuilder = art::make_tool<lar_cluster3d::IClusterParametersBuilder>(
546 produces<std::vector<recob::PCAxis>>();
547 produces<std::vector<recob::PFParticle>>();
548 produces<std::vector<recob::Cluster>>();
549 produces<std::vector<recob::Seed>>();
550 produces<std::vector<recob::Edge>>();
552 produces<art::Assns<recob::PFParticle, recob::PCAxis>>();
553 produces<art::Assns<recob::PFParticle, recob::Cluster>>();
554 produces<art::Assns<recob::PFParticle, recob::Seed>>();
555 produces<art::Assns<recob::Edge, recob::PFParticle>>();
556 produces<art::Assns<recob::Seed, recob::Hit>>();
557 produces<art::Assns<recob::Cluster, recob::Hit>>();
559 produces<std::vector<recob::SpacePoint>>();
560 produces<art::Assns<recob::SpacePoint, recob::PFParticle>>();
561 produces<art::Assns<recob::Hit, recob::SpacePoint>>();
562 produces<art::Assns<recob::SpacePoint, recob::Edge>>();
566 produces<art::Assns<recob::SpacePoint, recob::PFParticle>>(
m_pathInstance);
567 produces<art::Assns<recob::Edge, recob::PFParticle>>(
m_pathInstance);
568 produces<art::Assns<recob::Hit, recob::SpacePoint>>(
m_pathInstance);
569 produces<art::Assns<recob::SpacePoint, recob::Edge>>(
m_pathInstance);
592 mf::LogInfo(
"Cluster3D") <<
" *** Cluster3D::produce(...) [Run=" << evt.
run()
593 <<
", Event=" << evt.
id().
event() <<
"] Starting Now! *** " 598 cet::cpu_timer theClockTotal;
599 cet::cpu_timer theClockFinish;
609 std::unique_ptr<reco::HitPairList> hitPairList(
618 m_clusterAlg->Cluster3DHits(*hitPairList, clusterParametersList);
638 ProduceArtClusters(gser, output, *hitPairList, clusterParametersList, clusterHitToArtPtrMap);
645 theClockFinish.stop();
646 theClockTotal.stop();
650 m_totalTime = theClockTotal.accumulated_real_time();
659 m_hits =
static_cast<int>(clusterHitToArtPtrMap.size());
660 m_hits3D =
static_cast<int>(hitPairList->size());
681 m_pRecoTree = tfs->make<TTree>(
"monitoring",
"LAr Reco");
720 std::vector<recob::Seed>& seedVec,
749 float transRMS = std::hypot(eigenVal0, eigenVal1);
751 bool foundGoodSeed(
false);
762 else if (eigenVal2 > 40. && transRMS < 5.) {
772 if (!foundGoodSeed) {
779 for (
const auto& seedHitPair : seedHitPairVec) {
780 seedVec.push_back(seedHitPair.first);
784 std::set<art::Ptr<recob::Hit>> seedHitSet;
785 for (
const auto& hit3D : seedHitPair.second) {
786 for (
const auto& hit2D : hit3D->getHits()) {
787 if (!hit2D)
continue;
790 seedHitSet.insert(hitToPtrMap[recobHit]);
795 for (
const auto& hit2D : seedHitSet)
804 const std::pair<float, const reco::ClusterHit3D*>&
right)
806 return left.first < right.first;
852 skeletonListPtr, clusterParameters.
getSkeletonPCA(), hitPairListPtrList);
855 if (hitPairListPtrList.size() < 2)
return;
875 for (
const auto& hit3D : hitPairListPtr) {
876 for (
const auto& hit2D : hit3D->getHits())
877 if (hit2D) hit2D->clearStatusBits(0
x1);
884 float allowedHitRange = 6. * firstHitListPCA.
getAveHitDoca();
897 newClusterHitList.resize(hitPairListPtr.size());
901 hitPairListPtr.end(),
902 newClusterHitList.begin(),
906 newClusterHitList.resize(std::distance(newClusterHitList.begin(), newListEnd));
915 m_clusterBuilder->FillClusterParams(newClusterParams, hit2DToClusterMap, 0., 1.);
935 float newAllowedHitRange = 6. * secondHitListPCA.
getAveHitDoca();
945 std::copy_if(newClusterHitList.begin(),
946 newClusterHitList.end(),
950 hitPairListPtr.insert(hitPairListPtr.end(), tempHitList.begin(), tempListEnd);
957 m_clusterBuilder->FillClusterParams(originalParams, hit2DToClusterMap, 0., 1.);
976 mf::LogDebug(
"Cluster3D") <<
" *** Cluster3D::ProduceArtClusters() *** " << std::endl;
979 if (!clusterParametersList.empty()) {
983 for (
auto& clusterParameters : clusterParametersList) {
989 if (!clusterParameters.getFullPCA().getSvdOK()) {
991 <<
"--> no feature extraction done on this cluster!!" << std::endl;
1007 if (clusterParameters.daughterList().empty()) {
1018 clusterParameters.getConvexHull().getConvexHullKinkPoints());
1037 std::vector<size_t> daughterVec;
1039 for (
auto& idxToPCA : idxToPCAMap)
1040 daughterVec.emplace_back(idxToPCA.first);
1048 double eigenVals[] = {0., 0., 0.};
1049 double avePosition[] = {0., 0., 0.};
1051 eigenVecs.resize(3);
1055 for (
size_t outerIdx = 0; outerIdx < 3; outerIdx++) {
1059 eigenVecs[outerIdx].resize(3);
1062 for (
size_t innerIdx = 0; innerIdx < 3; innerIdx++)
1063 eigenVecs[outerIdx][innerIdx] = skeletonPCA.
getEigenVectors().row(outerIdx)[innerIdx];
1078 for (
size_t outerIdx = 0; outerIdx < 3; outerIdx++) {
1082 for (
size_t innerIdx = 0; innerIdx < 3; innerIdx++)
1083 eigenVecs[outerIdx][innerIdx] = fullPCA.
getEigenVectors().row(outerIdx)(innerIdx);
1103 clusterParameters.getHitPairListPtr(),
1109 clusterParameters.getConvexHull().getConvexHullKinkPoints());
1114 for (
const auto& edge : clusterParameters.getConvexHull().getConvexHullEdgeList()) {
1118 spacePointVec.
push_back(hit3DToSPPtrMap.at(std::get<0>(edge)));
1119 spacePointVec.
push_back(hit3DToSPPtrMap.at(std::get<1>(edge)));
1122 std::cout <<
"Caught exception in looking up space point ptr... " << std::get<0>(edge)
1123 <<
", " << std::get<1>(edge) << std::endl;
1128 spacePointVec[0].key(),
1129 spacePointVec[1].key(),
1146 for (
auto& hitPair : hitPairVector) {
1149 double spacePointPos[] = {
1150 hitPair.getPosition()[0], hitPair.getPosition()[1], hitPair.getPosition()[2]};
1151 double spacePointErr[] = {1., 0., 0., 1., 0., 1.};
1152 double chisq = hitPair.getHitChiSquare();
1156 for (
const auto hit : hitPair.getHits()) {
1168 spacePointErr[1] = hitPair.getTotalCharge();
1169 spacePointErr[3] = hitPair.getChargeAsymmetry();
1174 if (!recobHits.
empty())
1179 std::cout <<
"++++>>>> total num hits: " << hitPairVector.size()
1180 <<
", num free: " << nFreePoints << std::endl;
1185 size_t localCount(0);
1188 for (
auto& clusterParams : clusterParameters.
daughterList())
1200 size_t pfParticleParent,
1208 for (
auto& clusterParams : clusterParameters.
daughterList())
1228 idxToPCAMap[daughterIdx] = &clusterParameters.
getFullPCA();
1231 return idxToPCAMap.size();
1237 size_t pfParticleParent,
1247 using OverriddenClusterParamsAlg_t =
1265 for (
const auto& clusParametersPair : clusterParameters.
getClusterParams()) {
1272 std::vector<const recob::Hit*> recobHitVec(clusParams.
m_hitVector.size());
1276 recobHitVec.begin(),
1277 [](
const auto& hit2D) {
return hit2D->getHit(); });
1286 ClusterParamAlgo.
ImportHits(gser, recobHitVec);
1310 for (
const auto& hit2D : clusParams.
m_hitVector) {
1311 if (hit2D ==
nullptr || hit2D->getHit() ==
nullptr)
continue;
1325 std::vector<size_t> nullVector;
1345 int spacePointStart = spVector->size();
1348 output, *spVector, *spHitAssns, *hit3DListPtr, hitToPtrMap, *hit3DToPtrMap);
1357 hit3DToPtrMap = &best3DToSPPtrMap;
1366 spacePointStart = spVector->size();
1369 output, *spVector, *spHitAssns, *hit3DListPtr, hitToPtrMap, *hit3DToPtrMap, instance);
1377 size_t edgeStart = edgeVector->size();
1383 spacePointVec.
push_back(hit3DToPtrMap->at(std::get<0>(edge)));
1384 spacePointVec.
push_back(hit3DToPtrMap->at(std::get<1>(edge)));
1387 std::cout <<
"Caught exception in looking up space point ptr... " << std::get<0>(edge)
1388 <<
", " << std::get<1>(edge) << std::endl;
1392 edgeVector->emplace_back(
1393 std::get<2>(edge), spacePointVec[0].key(), spacePointVec[1].key(), edgeVector->
size());
1404 double eigenVals[] = {0., 0., 0.};
1405 double avePosition[] = {0., 0., 0.};
1407 eigenVecs.resize(3);
1409 for (
size_t outerIdx = 0; outerIdx < 3; outerIdx++) {
1413 eigenVecs[outerIdx].resize(3);
1415 for (
size_t innerIdx = 0; innerIdx < 3; innerIdx++)
1416 eigenVecs[outerIdx][innerIdx] = skeletonPCA.
getEigenVectors().row(outerIdx)(innerIdx);
1429 for (
size_t outerIdx = 0; outerIdx < 3; outerIdx++) {
1433 for (
size_t innerIdx = 0; innerIdx < 3; innerIdx++)
1434 eigenVecs[outerIdx][innerIdx] = fullPCA.
getEigenVectors().row(outerIdx)(innerIdx);
1452 return pfParticleIdx;
1456 std::vector<recob::SpacePoint>& spacePointVec,
1464 spacePointVec.reserve(spacePointVec.size() + clusHitPairVector.size());
1467 double spError[] = {1., 0., 1., 0., 0., 1.};
1470 for (
auto& hitPair : clusHitPairVector) {
1472 if (hit3DToSPPtrMap.find(hitPair) != hit3DToSPPtrMap.end())
continue;
1477 double chisq = hitPair->getHitChiSquare();
1483 size_t spacePointID = spacePointVec.size();
1484 double spacePointPos[] = {
1485 hitPair->getPosition()[0], hitPair->getPosition()[1], hitPair->getPosition()[2]};
1487 spError[1] = hitPair->getTotalCharge();
1488 spError[3] = hitPair->getChargeAsymmetry();
1490 spacePointVec.emplace_back(spacePointPos, spError, chisq, spacePointID);
1498 for (
const auto&
hit : hitPair->getHits()) {
1505 if (!recobHits.
empty())
1516 double spError[] = {1., 0., 1., 0., 0., 1.};
1519 for (
auto& kinkTuple : kinkTupleVec) {
1525 double spacePointPos[] = {
1548 double spError[] = {1., 0., 1., 0., 0., 1.};
1552 std::map<const dcel2d::Vertex*, size_t> vertexToSpacePointMap;
1555 for (
auto&
vertex : vertexList) {
1559 double spacePointPos[] = {coords[0], coords[1], coords[2]};
1568 std::set<const dcel2d::HalfEdge*> halfEdgeSet;
1571 for (
const auto& halfEdge : halfEdgeList) {
1576 if (twin && halfEdgeSet.find(twin) == halfEdgeSet.end()) {
1582 if (!toVertex || !fromVertex)
continue;
1584 if (vertexToSpacePointMap.find(fromVertex) == vertexToSpacePointMap.end() ||
1585 vertexToSpacePointMap.find(toVertex) == vertexToSpacePointMap.end())
1592 vertexToSpacePointMap[fromVertex],
1593 vertexToSpacePointMap[toVertex],
1596 halfEdgeSet.insert(&halfEdge);
1615 Eigen::Vector3f avePosition(
1619 using DocaToPCAPair = std::pair<float, const reco::PrincipalComponents*>;
1620 using DocaToPCAVec = std::vector<DocaToPCAPair>;
1622 DocaToPCAVec docaToPCAVec;
1625 for (
const auto& idxToPCA : idxToPCAMap) {
1630 Eigen::Vector3f pcaPos(
1634 Eigen::Vector3f pcaToAveVec = pcaPos - avePosition;
1637 float arclenToPoca = pcaToAveVec.dot(axisDirVec);
1639 docaToPCAVec.emplace_back(arclenToPoca, pca);
1642 std::sort(docaToPCAVec.begin(), docaToPCAVec.end(), [](
const auto&
left,
const auto&
right) {
1648 double spError[] = {1., 0., 1., 0., 0., 1.};
1654 for (
const auto& docaToPCAPair : docaToPCAVec) {
1659 double lastPointPos[] = {
1662 double curPointPos[] = {
1664 size_t curPointBin = lastPointBin + 1;
1669 Eigen::Vector3f distVec(curPointPos[0] - lastPointPos[0],
1670 curPointPos[1] - lastPointPos[1],
1671 curPointPos[2] - lastPointPos[2]);
1674 distVec.norm(), lastPointBin, curPointBin, output.
artEdgeVector->size());
reco::HitPairListPtr & getBestHitPairListPtr()
std::unique_ptr< std::vector< recob::Edge > > artPathEdgeVector
float m_buildNeighborhoodTime
Keeps track of time to build epsilon neighborhood.
std::unique_ptr< art::Assns< recob::SpacePoint, recob::PFParticle > > artPFPartSPAssociations
void PCAAnalysis_calc3DDocas(const reco::HitPairListPtr &hitPairVector, const reco::PrincipalComponents &pca) const
std::list< reco::ClusterHit3D > HitPairList
std::unique_ptr< std::vector< recob::SpacePoint > > artVertexPointVector
std::unique_ptr< lar_cluster3d::IClusterModAlg > m_clusterPathAlg
Algorithm to do cluster path finding.
void makeEdgeSpacePointAssns(std::vector< recob::Edge > &edgeVector, RecobSpacePointVector &spacePointVector, art::Assns< recob::SpacePoint, recob::Edge > &edgeSPAssociations, const std::string &path="")
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Utilities related to art service access.
An object to define a "edge" which is used to connect space points in a triangulation algorithm...
void PCAAnalysis_3D(const reco::HitPairListPtr &hitPairList, reco::PrincipalComponents &pca, bool skeletonOnly=false) const
Class managing the creation of a new recob::Cluster object.
std::unique_ptr< std::vector< recob::Seed > > artSeedVector
Reconstruction base classes.
std::string m_vertexInstance
Special instance name for vertex points.
static constexpr size_t kPFParticlePrimary
Define index to signify primary particle.
std::list< HalfEdge > HalfEdgeList
void makePFPartSpacePointAssns(std::vector< recob::SpacePoint > &spacePointVector, art::Assns< recob::SpacePoint, recob::PFParticle > &pfPartSPAssociations, size_t spacePointStart, const std::string &instance="")
const Eigen::Vector3f getPosition() const
std::unique_ptr< art::Assns< recob::Seed, recob::Hit > > artSeedHitAssociations
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
float m_parallelHitsTransWid
Cut on transverse width of cluster (PCA 2nd eigenvalue)
HalfEdge * getTwinHalfEdge() const
Float_t x1[n_points_granero]
float m_parallelHitsCosAng
Cut for PCA 3rd axis angle to X axis.
bool aParallelHitsCluster(const reco::PrincipalComponents &pca) const
There are several places we will want to know if a candidate cluster is a "parallel hits" type of clu...
Declaration of signal hit object.
std::string & fVertexName
reco::PrincipalComponents & getSkeletonPCA()
EDProducer(fhicl::ParameterSet const &pset)
void findTrackSeeds(art::Event &evt, reco::ClusterParameters &cluster, IHit3DBuilder::RecobHitToPtrMap &hitToPtrMap, std::vector< recob::Seed > &seedVec, art::Assns< recob::Seed, recob::Hit > &seedHitAssns) const
An interface to the seed finding algorithm.
bool findTrackSeeds(reco::HitPairListPtr &hitPairListPtr, reco::PrincipalComponents &inputPCA, SeedHitPairListPairVec &seedHitPairVec) const override
Given the list of hits this will search for candidate Seed objects and return them.
void makeClusterHitAssns(RecobHitVector &recobHits)
SkeletonAlg m_skeletonAlg
Skeleton point finder.
CopyIfInRange(float maxRange)
void makePFPartEdgeAssns(std::vector< recob::Edge > &edgeVector, art::Assns< recob::Edge, recob::PFParticle > &pfPartEdgeAssociations, size_t edgeStart, const std::string &instance="")
std::unique_ptr< std::vector< recob::Edge > > artVertexEdgeVector
const std::string instance
int m_hits3D
Keeps track of the number of 3D hits made.
float getTotalCharge() const
Hit has been rejected for any reason.
reco::EdgeList & getBestEdgeList()
int getNumHitsUsed() const
HoughSeedFinderAlg class.
boost::graph_traits< ModuleGraph >::edge_descriptor Edge
std::list< HitPairListPtr > HitPairListPtrList
A utility class used in construction of 3D clusters.
reco::HitPairListPtr & getHitPairListPtr()
void ProduceArtClusters(util::GeometryUtilities const &gser, ArtOutputHandler &output, reco::HitPairList &hitPairList, reco::ClusterParametersList &clusterParametersList, IHit3DBuilder::RecobHitToPtrMap &hitToPtrMap) const
Top level output routine, allows checking cluster status.
bool m_onlyMakSpacePoints
If true we don't do the full cluster 3D processing.
void makePFPartSeedAssns(size_t numSeedsStart)
Cluster finding and building.
reco::PlaneToClusterParamsMap & getClusterParams()
HoughSeedFinderAlg m_seedFinderAlg
Seed finder.
std::unique_ptr< lar_cluster3d::IClusterAlg > m_clusterAlg
Algorithm to do 3D space point clustering.
std::unique_ptr< art::Assns< recob::PFParticle, recob::Seed > > artPFPartSeedAssociations
float m_makeHitsTime
Keeps track of time to build 3D hits.
std::unique_ptr< std::vector< recob::PFParticle > > artPFParticleVector
void makeSpacePointHitAssns(std::vector< recob::SpacePoint > &spacePointVector, RecobHitVector &recobHits, art::Assns< recob::Hit, recob::SpacePoint > &spHitAssns, const std::string &path="")
void GetSkeletonHits(const reco::HitPairListPtr &inputHitList, reco::HitPairListPtr &skeletonHitList) const
Return the skeleton hits from the input list.
art::Ptr< recob::Edge > makeEdgePtr(size_t index, const std::string &instance="")
This is an algorithm for finding recob::Seed objects in 3D clusters.
float getDocaToAxis() const
static const SentryArgument_t Sentry
An instance of the sentry object.
float m_dbscanTime
Keeps track of time to run DBScan.
void ImportHits(util::GeometryUtilities const &gser, Iter begin, Iter end)
Calls SetHits() with the hits in the sequence.
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
ClusterParametersList & daughterList()
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::unique_ptr< art::Assns< recob::Hit, recob::SpacePoint > > artPPHitAssociations
float getAveHitDoca() const
Overrides another ClusterParamsAlgBase class with selected constants.
This is an algorithm for finding recob::Seed objects in 3D clusters.
bool findTrackSeeds(reco::HitPairListPtr &hitPairListPtr, reco::PrincipalComponents &inputPCA, SeedHitPairListPairVec &seedHitMap) const override
Given the list of hits this will search for candidate Seed objects and return them.
const EigenValues & getEigenValues() const
art::PtrMaker< recob::Edge > fEdgePtrMaker
std::string m_extremeInstance
Instance name for the extreme points.
#define DEFINE_ART_MODULE(klass)
reco::PrincipalComponents & getFullPCA()
size_t countUltimateDaughters(reco::ClusterParameters &clusterParameters) const
Count number of end of line daughters.
float getChargeAsymmetry() const
art::PtrMaker< recob::SpacePoint > fSPPtrMakerPath
This is an algorithm for finding recob::Seed objects in 3D clusters.
void push_back(Ptr< U > const &p)
std::unique_ptr< std::vector< recob::SpacePoint > > artPathPointVector
void InitializeMonitoring()
Initialize the internal monitoring.
std::unordered_map< const reco::ClusterHit2D *, ClusterToHitPairSetMap > Hit2DToClusterMap
float m_finishTime
Keeps track of time to run output module.
Helper functions to create a cluster.
Wrapper for ClusterParamsAlgBase objects to accept diverse input.
std::unique_ptr< std::vector< recob::SpacePoint > > artSpacePointVector
float m_clusterMergeTime
Keeps track of the time to merge clusters.
const Eigen::Vector3f & getAvePosition() const
std::unique_ptr< art::Assns< recob::PFParticle, recob::PCAxis > > artPFPartAxisAssociations
std::unique_ptr< art::Assns< recob::Cluster, recob::Hit > > artClusterAssociations
PCASeedFinderAlg m_pcaSeedFinderAlg
Use PCA axis to find seeds.
ArtOutputHandler(art::Event &evt, std::string &pathName, std::string &vertexName, std::string &extremeName)
std::list< ConvexHullKinkTuple > ConvexHullKinkTupleList
void AverageSkeletonPositions(reco::HitPairListPtr &skeletonHitList) const
Modifies the position of input skeleton hits by averaging along the "best" wire direction.
Wrapper for ClusterParamsAlgBase objects to accept arbitrary input.
bool findTrackSeeds(reco::HitPairListPtr &hitPairListPtr, reco::PrincipalComponents &inputPCA, SeedHitPairListPairVec &seedHitMap) const override
Given the list of hits this will search for candidate Seed objects and return them.
ParallelHitsSeedFinderAlg m_parallelHitsAlg
Deal with parallel hits clusters.
std::unique_ptr< std::vector< recob::Edge > > artEdgeVector
void MakeAndSavePCAPoints(ArtOutputHandler &, const reco::PrincipalComponents &, IdxToPCAMap &) const
std::list< const reco::ClusterHit3D * > HitPairListPtr
std::unique_ptr< art::Assns< recob::Hit, recob::SpacePoint > > artSPHitAssociations
This provides an art tool interface definition for 3D Cluster algorithms.
std::unique_ptr< art::Assns< recob::SpacePoint, recob::Edge > > artEdgePPAssociations
int m_hits
Keeps track of the number of hits seen.
void produce(art::Event &evt) override
Declaration of cluster object.
size_t FindAndStoreDaughters(util::GeometryUtilities const &gser, ArtOutputHandler &output, reco::ClusterParameters &clusterParameters, size_t pfParticleParent, IdxToPCAMap &idxToPCAMap, IHit3DBuilder::RecobHitToPtrMap &hitToPtrMap, Hit3DToSPPtrMap &hit3DToSPPtrMap, Hit3DToSPPtrMap &best3DToSPPtrMap) const
This will produce art output for daughters noting that it needs to be done recursively.
Detector simulation of raw signals on wires.
bool operator()(const std::pair< float, const reco::ClusterHit3D * > &left, const std::pair< float, const reco::ClusterHit3D * > &right)
void MakeAndSaveSpacePoints(ArtOutputHandler &output, std::vector< recob::SpacePoint > &spacePointVec, art::Assns< recob::Hit, recob::SpacePoint > &spHitAssns, reco::HitPairListPtr &clusHitPairVector, IHit3DBuilder::RecobHitToPtrMap &hitToPtrMap, Hit3DToSPPtrMap &hit3DToSPPtrMap, const std::string &path="") const
Special routine to handle creating and saving space points.
This provides an art tool interface definition for tools which construct 3D hits used in 3D clusterin...
This header file defines the interface to a principal components analysis designed to be used within ...
std::unique_ptr< art::Assns< recob::SpacePoint, recob::PFParticle > > artPFPartPPAssociations
std::unique_ptr< art::Assns< recob::PFParticle, recob::Cluster > > artPFPartClusAssociations
ProducesCollector & producesCollector() noexcept
float m_pathFindingTime
Keeps track of the path finding time.
bool findTrackHits(reco::HitPairListPtr &hitPairListPtr, reco::PrincipalComponents &inputPCA, reco::HitPairListPtrList &hitPairListPtrList) const
Given the list of hits this will return the sets of hits which belong on the same line...
bool CreateAssn(art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t index=UINT_MAX)
Creates a single one-to-one association.
bool operator()(const reco::ClusterHit3D *hit3D) const
art::Ptr< recob::SpacePoint > makeSpacePointPtr(size_t index, const std::string &instance="")
std::unique_ptr< lar_cluster3d::IClusterParametersBuilder > m_clusterBuilder
Common cluster builder tool.
Cluster3D(fhicl::ParameterSet const &pset)
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
art::PtrMaker< recob::SpacePoint > fSPPtrMaker
std::unique_ptr< std::vector< recob::SpacePoint > > artExtremePointVector
Hierarchical representation of particle flow.
Utility object to perform functions of association.
void makePFPartPCAAssns()
void makePFPartClusterAssns(size_t clusterStart)
Header file to define the interface to the SkeletonAlg.
Hit has been made into Space Point.
std::vector< SeedHitPairListPair > SeedHitPairListPairVec
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
This provides an art tool interface definition for 3D Cluster algorithms.
void MakeAndSaveVertexPoints(ArtOutputHandler &, dcel2d::VertexList &, dcel2d::HalfEdgeList &) const
Special routine to handle creating and saving space points & edges associated to voronoi diagrams...
std::unique_ptr< std::vector< recob::Cluster > > artClusterVector
std::unique_ptr< lar_cluster3d::IClusterModAlg > m_clusterMergeAlg
Algorithm to do cluster merging.
size_t ConvertToArtOutput(util::GeometryUtilities const &gser, ArtOutputHandler &output, reco::ClusterParameters &clusterParameters, size_t pfParticleParent, IHit3DBuilder::RecobHitToPtrMap &hitToPtrMap, Hit3DToSPPtrMap &hit3DToSPPtrMap, Hit3DToSPPtrMap &best3DToSPPtrMap) const
Produces the art output from all the work done in this producer module.
std::unique_ptr< lar_cluster3d::IHit3DBuilder > m_hit3DBuilderAlg
Builds the 3D hits to operate on.
PrincipalComponentsAlg m_pcaAlg
Principal Components algorithm.
EventNumber_t event() const
art::PtrMaker< recob::Edge > fEdgePtrMakerPath
ClusterHit2DVec m_hitVector
2D representation of charge deposited in the TDC/wire plane
Algorithm collection class computing cluster parameters.
float getHitChiSquare() const
Definition of the Cluster3D class.
float m_artHitsTime
Keeps track of time to recover hits.
Interface to class computing cluster parameters.
std::string & fExtremeName
std::unique_ptr< std::vector< recob::PCAxis > > artPCAxisVector
Vertex * getTargetVertex() const
std::unique_ptr< art::Assns< recob::SpacePoint, recob::Edge > > artEdgeSPAssociations
std::unordered_map< const reco::ClusterHit3D *, art::Ptr< recob::SpacePoint >> Hit3DToSPPtrMap
void MakeAndSaveKinkPoints(ArtOutputHandler &output, reco::ConvexHullKinkTupleList &clusHitPairVector) const
Special routine to handle creating and saving space points.
std::vector< std::vector< double > > EigenVectors
std::unordered_map< const recob::Hit *, art::Ptr< recob::Hit >> RecobHitToPtrMap
Defines a structure mapping art representation to internal.
void PrepareEvent(const art::Event &evt)
Event Preparation.
const Coords & getCoords() const
std::list< Vertex > VertexList
ParallelHitsSeedFinderAlg class.
void splitClustersWithHough(reco::ClusterParameters &clusterParameters, reco::ClusterParametersList &clusterParametersList) const
Attempt to split clusters using the output of the Hough Filter.
std::string m_pathInstance
Special instance for path points.
art framework interface to geometry description
float m_totalTime
Keeps track of total execution time.
std::list< ClusterParameters > ClusterParametersList
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
const EigenVectors & getEigenVectors() const
std::unique_ptr< art::Assns< recob::Edge, recob::PFParticle > > artPFPartEdgeAssociations
std::unique_ptr< art::Assns< recob::Edge, recob::PFParticle > > artPFPartPathEdgeAssociations
std::map< size_t, const reco::PrincipalComponents * > IdxToPCAMap
Special routine to handle creating and saving space points & edges PCA points.
bool m_enableMonitoring
Turn on monitoring of this algorithm.