11 #include "art_root_io/TFileDirectory.h" 101 int level = 0)
const;
110 const Eigen::Vector3f&,
111 const Eigen::Vector3f&,
112 const Eigen::Vector3f&,
114 Eigen::Vector3f&)
const;
116 using Point = std::tuple<float,float,const reco::ClusterHit3D*>;
196 art::TFileDirectory
dir = histDir.mkdir(dirName.c_str());
200 fTopNum3DHits = dir.make<TH1F>(
"TopNum3DHits",
"Number 3D Hits", 200, 0., 200.);
201 fTopNumEdges = dir.make<TH1F>(
"TopNumEdges",
"Number Edges", 200, 0., 200.);
202 fTopEigen21Ratio = dir.make<TH1F>(
"TopEigen21Rat",
"Eigen 2/1 Ratio", 100, 0., 1.);
203 fTopEigen20Ratio = dir.make<TH1F>(
"TopEigen20Rat",
"Eigen 2/0 Ratio", 100, 0., 1.);
204 fTopEigen10Ratio = dir.make<TH1F>(
"TopEigen10Rat",
"Eigen 1/0 Ratio", 100, 0., 1.);
205 fTopPrimaryLength = dir.make<TH1F>(
"TopPrimaryLen",
"Primary Length", 200, 0., 200.);
207 fSubNum3DHits = dir.make<TH1F>(
"SubNum3DHits",
"Number 3D Hits", 200, 0., 200.);
208 fSubNumEdges = dir.make<TH1F>(
"SubNumEdges",
"Number Edges", 200, 0., 200.);
209 fSubEigen21Ratio = dir.make<TH1F>(
"SubEigen21Rat",
"Eigen 2/1 Ratio", 100, 0., 1.);
210 fSubEigen20Ratio = dir.make<TH1F>(
"SubEigen20Rat",
"Eigen 2/0 Ratio", 100, 0., 1.);
211 fSubEigen10Ratio = dir.make<TH1F>(
"SubEigen10Rat",
"Eigen 1/0 Ratio", 100, 0., 1.);
212 fSubPrimaryLength = dir.make<TH1F>(
"SubPrimaryLen",
"Primary Length", 200, 0., 200.);
213 fSubCosToPrevPCA = dir.make<TH1F>(
"SubCosToPrev",
"Cos(theta)", 101, 0., 1.01);
214 fSubCosExtToPCA = dir.make<TH1F>(
"SubCosExtPCA",
"Cos(theta)", 102, -1.01, 1.01);
215 fSubMaxDefect = dir.make<TH1F>(
"SubMaxDefect",
"Max Defect", 100, 0., 50.);
216 fSubUsedDefect = dir.make<TH1F>(
"SubUsedDefect",
"Used Defect", 100, 0., 50.);
236 int countClusters(0);
243 while(clusterParametersListItr != clusterParametersList.end())
248 std::cout <<
"**> Looking at Cluster " << countClusters++ <<
", # hits: " << clusterParameters.
getHitPairListPtr().size() <<
std::endl;
264 reclusteredParameters.push_back(clusterParameters);
266 std::cout <<
">>>>>>>>>>> Reclustered to " << reclusteredParameters.size() <<
" Clusters <<<<<<<<<<<<<<<" <<
std::endl;
269 if (!reclusteredParameters.empty())
272 for (
auto&
cluster : reclusteredParameters)
274 std::cout <<
"****> Calling breakIntoTinyBits with " <<
cluster.getHitPairListPtr().size() <<
" hits" <<
std::endl;
284 std::cout <<
"****> Broke Cluster with " <<
cluster.getHitPairListPtr().size() <<
" into " <<
cluster.daughterList().size() <<
" sub clusters";
285 for(
auto& clus :
cluster.daughterList()) std::cout <<
", " << clus.getHitPairListPtr().size();
295 std::vector<double> eigenValVec = {3. * std::sqrt(fullPCA.
getEigenValues()[0]),
298 double eigen2To1Ratio = eigenValVec[0] / eigenValVec[1];
299 double eigen1To0Ratio = eigenValVec[1] / eigenValVec[2];
300 double eigen2To0Ratio = eigenValVec[0] / eigenValVec[2];
301 int num3DHits =
cluster.getHitPairListPtr().size();
302 int numEdges =
cluster.getBestEdgeList().size();
316 clusterParametersListItr++;
321 theClockBuildClusters.
stop();
355 std::vector<double> eigenValVec = {3. * std::sqrt(fullPCA.
getEigenValues()[0]),
361 double cosNewToLast =
std::abs(fullPrimaryVec.dot(lastPrimaryVec));
362 double eigen2To1Ratio = eigenValVec[2] / eigenValVec[1];
363 double eigen1To0Ratio = eigenValVec[1] / eigenValVec[2];
364 double eigen2To0Ratio = eigenValVec[0] / eigenValVec[2];
365 double eigen2And1Ave = 0.5 * (eigenValVec[1] + eigenValVec[0]);
366 double eigenAveTo0Ratio = eigen2And1Ave / eigenValVec[2];
368 bool storeCurrentCluster(
true);
371 std::cout << indent <<
">>> breakIntoTinyBits with " << clusterToBreak.
getHitPairListPtr().size() <<
" input hits, " << clusterToBreak.
getBestEdgeList().size() <<
" edges, rat21: " << eigen2To1Ratio <<
", rat20: " << eigen2To0Ratio <<
", rat10: " << eigen1To0Ratio <<
", ave0: " << eigenAveTo0Ratio <<
std::endl;
372 std::cout << indent <<
" --> eigen 0/1/2: " << eigenValVec[0] <<
"/" << eigenValVec[1] <<
"/" << eigenValVec[2] <<
", cos: " << cosNewToLast <<
std::endl;
375 if (clusterToBreak.
getBestEdgeList().size() > 5 && cosNewToLast > 0.25 && eigen2To1Ratio < 0.9 && eigen2To0Ratio > 0.001 &&
388 Eigen::Vector3f edgeVec(secondEdgeHit->getPosition()[0] - firstEdgeHit->
getPosition()[0],
389 secondEdgeHit->getPosition()[1] - firstEdgeHit->
getPosition()[1],
390 secondEdgeHit->getPosition()[2] - firstEdgeHit->
getPosition()[2]);
391 double edgeLen = edgeVec.norm();
404 clusHitPairVector.sort([](
const auto&
left,
const auto&
right){
return left->getArclenToPoca() <
right->getArclenToPoca();});
407 using DistEdgeTuple = std::tuple<float, const reco::EdgeTuple*>;
408 using DistEdgeTupleVec = std::vector<DistEdgeTuple>;
410 DistEdgeTupleVec distEdgeTupleVec;
423 float hitProjection = hitToEdgeVec.dot(edgeVec);
426 if (hitProjection > 0. && hitProjection < edgeLen)
428 Eigen::Vector3f distToHitVec = hitToEdgeVec - hitProjection * edgeVec;
429 float distToHit = distToHitVec.norm();
431 distEdgeTupleVec.emplace_back(distToHit,&edge);
435 std::sort(distEdgeTupleVec.begin(),distEdgeTupleVec.end(),[](
const auto&
left,
const auto&
right){
return std::get<0>(
left) > std::get<0>(
right);});
437 for(
const auto& distEdgeTuple : distEdgeTupleVec)
446 if (vertexItr == clusHitPairVector.end() ||
std::distance(clusHitPairVector.begin(),vertexItr) < minimumClusterSize ||
std::distance(vertexItr,clusHitPairVector.end()) < minimumClusterSize)
continue;
449 using Hit3DItrPair = std::pair<reco::HitPairListPtr::iterator,reco::HitPairListPtr::iterator>;
450 using VertexPairList = std::list<Hit3DItrPair>;
452 VertexPairList vertexPairList;
454 vertexPairList.emplace_back(Hit3DItrPair(clusHitPairVector.begin(),vertexItr));
455 vertexPairList.emplace_back(Hit3DItrPair(vertexItr,clusHitPairVector.end()));
457 storeCurrentCluster =
false;
460 for(
auto& hit3DItrPair : vertexPairList)
465 std::cout << indent <<
"+> -- building new cluster, size: " <<
std::distance(hit3DItrPair.first,hit3DItrPair.second) <<
std::endl;
468 hitPairListPtr.resize(
std::distance(hit3DItrPair.first,hit3DItrPair.second));
471 std::copy(hit3DItrPair.first,hit3DItrPair.second,hitPairListPtr.begin());
482 std::cout << indent <<
"+> -- >> cluster has a valid Full PCA" <<
std::endl;
487 for(
size_t vecIdx = 0; vecIdx < 3; vecIdx++) newFullPCA.
flipAxis(vecIdx);
496 positionItr =
breakIntoTinyBits(clusterParams, fullPCA, positionItr, outputClusterList, level+4);
507 if (storeCurrentCluster)
512 std::set<const reco::ClusterHit2D*> hitSet;
517 for(
const auto& hit2D : hit3D->getHits())
519 if (hit2D) hitSet.insert(hit2D);
524 for(
const auto& hit2D : hitSet)
530 std::cout << indent <<
"*********>>> storing new subcluster of size " << clusterToBreak.
getHitPairListPtr().size() <<
std::endl;
532 positionItr = outputClusterList.insert(positionItr,clusterToBreak);
541 float cosToLast = newPrimaryVec.dot(lastPrimaryVec);
555 else if (inputPositionItr != positionItr)
557 std::cout << indent <<
"***** DID NOT STORE A CLUSTER *****" <<
std::endl;
586 std::vector<double> eigenValVec = {3. * std::sqrt(fullPCA.
getEigenValues()[0]),
601 Eigen::Vector3f edgeVec(secondEdgeHit->getPosition()[0] - firstEdgeHit->
getPosition()[0],
602 secondEdgeHit->getPosition()[1] - firstEdgeHit->
getPosition()[1],
603 secondEdgeHit->getPosition()[2] - firstEdgeHit->
getPosition()[2]);
604 double edgeLen = edgeVec.norm();
617 clusHitPairVector.sort([](
const auto&
left,
const auto&
right){
return left->getArclenToPoca() <
right->getArclenToPoca();});
620 using DistEdgeTuple = std::tuple<float, const reco::EdgeTuple*>;
621 using DistEdgeTupleVec = std::vector<DistEdgeTuple>;
623 DistEdgeTupleVec distEdgeTupleVec;
636 float hitProjection = hitToEdgeVec.dot(edgeVec);
639 if (hitProjection > 0. && hitProjection < edgeLen)
641 Eigen::Vector3f distToHitVec = hitToEdgeVec - hitProjection * edgeVec;
642 float distToHit = distToHitVec.norm();
644 distEdgeTupleVec.emplace_back(distToHit,&edge);
648 std::sort(distEdgeTupleVec.begin(),distEdgeTupleVec.end(),[](
const auto&
left,
const auto&
right){
return std::get<0>(
left) > std::get<0>(
right);});
652 float usedDefectDist(0.);
654 for(
const auto& distEdgeTuple : distEdgeTupleVec)
659 usedDefectDist = std::get<0>(distEdgeTuple);
681 tempClusterParametersList.clear();
685 if (tempClusterParametersList.empty())
687 std::cout << indent <<
"===> no cluster cands, edgeLen: " << edgeLen <<
", # hits: " << clusHitPairVector.size() <<
", max defect: " << std::get<0>(distEdgeTupleVec.front()) <<
std::endl;
695 std::advance(vertexItr, clusHitPairVector.size()/2);
708 tempClusterParametersList.clear();
714 for(
auto& clusterParams : tempClusterParametersList)
716 size_t curOutputClusterListSize = outputClusterList.size();
718 positionItr =
subDivideCluster(clusterParams, fullPCA, positionItr, outputClusterList, level+4);
720 std::cout << indent <<
"Output cluster list prev: " << curOutputClusterListSize <<
", now: " << outputClusterList.size() <<
std::endl;
724 if (curOutputClusterListSize < outputClusterList.size())
continue;
729 std::set<const reco::ClusterHit2D*> hitSet;
732 for(
const auto& hit3D : clusterParams.getHitPairListPtr())
734 for(
const auto& hit2D : hit3D->getHits())
736 if (hit2D) hitSet.insert(hit2D);
741 for(
const auto& hit2D : hitSet)
744 clusterParams.UpdateParameters(hit2D);
747 std::cout << indent <<
"*********>>> storing new subcluster of size " << clusterParams.getHitPairListPtr().size() <<
std::endl;
749 positionItr = outputClusterList.insert(positionItr,clusterParams);
760 int num3DHits = clusterParams.getHitPairListPtr().size();
761 int numEdges = clusterParams.getBestEdgeList().size();
762 float cosToLast = newPrimaryVec.dot(lastPrimaryVec);
763 double eigen2To1Ratio = eigenValVec[0] / eigenValVec[1];
764 double eigen1To0Ratio = eigenValVec[1] / eigenValVec[2];
765 double eigen2To0Ratio = eigenValVec[2] / eigenValVec[2];
775 fSubMaxDefect->Fill(std::get<0>(distEdgeTupleVec.front()), 1.);
797 std::cout << indent <<
"+> -- building new cluster, size: " <<
std::distance(firstHitItr,lastHitItr) <<
std::endl;
800 hitPairListPtr.resize(
std::distance(firstHitItr,lastHitItr));
803 std::copy(firstHitItr,lastHitItr,hitPairListPtr.begin());
812 bool keepThisCluster(
false);
817 std::cout << indent <<
"+> -- >> cluster has a valid Full PCA" <<
std::endl;
823 if (primaryPCA.dot(newPrimaryVec) < 0.)
825 for(
size_t vecIdx = 0; vecIdx < 3; vecIdx++) newFullPCA.
flipAxis(vecIdx);
836 std::vector<double> eigenValVec = {3. * std::sqrt(newFullPCA.
getEigenValues()[0]),
839 double cosNewToLast =
std::abs(primaryPCA.dot(newPrimaryVec));
840 double eigen2To1Ratio = eigenValVec[2] / eigenValVec[1];
841 double eigen1To0Ratio = eigenValVec[1] / eigenValVec[2];
842 double eigen2To0Ratio = eigenValVec[0] / eigenValVec[2];
843 double eigen2And1Ave = 0.5 * (eigenValVec[1] + eigenValVec[0]);
844 double eigenAveTo0Ratio = eigen2And1Ave / eigenValVec[2];
846 std::cout << indent <<
">>> subDivideClusters with " << candCluster.
getHitPairListPtr().size() <<
" input hits, " << candCluster.
getBestEdgeList().size() <<
" edges, rat21: " << eigen2To1Ratio <<
", rat20: " << eigen2To0Ratio <<
", rat10: " << eigen1To0Ratio <<
", ave0: " << eigenAveTo0Ratio <<
std::endl;
847 std::cout << indent <<
" --> eigen 0/1/2: " << eigenValVec[0] <<
"/" << eigenValVec[1] <<
"/" << eigenValVec[2] <<
", cos: " << cosNewToLast <<
std::endl;
851 if (candCluster.
getBestEdgeList().size() > 4 && cosNewToLast > 0.25 && eigen2To1Ratio > 0.01 && eigen2To1Ratio < 0.99 && eigen1To0Ratio < 0.5)
853 keepThisCluster =
true;
857 return keepThisCluster;
877 using Point = std::tuple<float,float,const reco::ClusterHit3D*>;
886 Eigen::Vector3f pcaToHitVec(hit3D->getPosition()[0] - pcaCenter(0),
887 hit3D->getPosition()[1] - pcaCenter(1),
888 hit3D->getPosition()[2] - pcaCenter(2));
891 pointList.emplace_back(
dcel2d::Point(pcaToHit(0),pcaToHit(1),hit3D));
895 pointList.sort([](
const auto&
left,
const auto&
right){
return (
std::abs(std::get<0>(
left) - std::get<0>(
right)) > std::numeric_limits<float>::epsilon()) ? std::get<0>(
left) < std::get<0>(
right) : std::get<1>(
left) < std::get<1>(
right);});
898 std::vector<ConvexHull> convexHullVec;
899 std::vector<PointList> rejectedListVec;
900 bool increaseDepth(pointList.size() > 5);
906 convexHullVec.push_back(
ConvexHull(pointList));
909 const ConvexHull& convexHull = convexHullVec.back();
910 PointList& rejectedList = rejectedListVec.back();
913 increaseDepth =
false;
917 std::cout << indent <<
"-> built convex hull, 3D hits: " << pointList.size() <<
" with " << convexHullPoints.size() <<
" vertices" <<
", area: " << convexHull.
getConvexHullArea() <<
std::endl;
918 std::cout << indent <<
"-> -Points:";
919 for(
const auto& point : convexHullPoints)
920 std::cout <<
" (" << std::get<0>(point) <<
"," << std::get<1>(point) <<
")";
925 for(
auto& point : convexHullPoints)
927 pointList.remove(point);
928 rejectedList.emplace_back(point);
937 while(!convexHullVec.empty() && convexHullVec.back().getConvexHullArea() < 0.5)
939 convexHullVec.pop_back();
940 rejectedListVec.pop_back();
944 if (!convexHullVec.empty())
946 size_t nRejectedTotal(0);
949 for(
const auto& rejectedList : rejectedListVec)
951 nRejectedTotal += rejectedList.size();
953 for(
const auto& rejectedPoint : rejectedList)
955 std::cout << indent <<
"-> -- Point is " << convexHullVec.back().findNearestDistance(rejectedPoint) <<
" from nearest edge" <<
std::endl;
957 if (convexHullVec.back().findNearestDistance(rejectedPoint) > 0.5)
958 hitPairListPtr.remove(std::get<2>(rejectedPoint));
962 std::cout << indent <<
"-> Removed " << nRejectedTotal <<
" leaving " << pointList.size() <<
"/" << hitPairListPtr.size() <<
" points" <<
std::endl;
968 Point lastPoint = convexHullVec.back().getConvexHull().front();
970 for(
auto& curPoint : convexHullVec.back().getConvexHull())
972 if (curPoint == lastPoint)
continue;
977 float distBetweenPoints = (curPoint3D->getPosition()[0] - lastPoint3D->
getPosition()[0]) * (curPoint3D->getPosition()[0] - lastPoint3D->
getPosition()[0])
978 + (curPoint3D->getPosition()[1] - lastPoint3D->
getPosition()[1]) * (curPoint3D->getPosition()[1] - lastPoint3D->
getPosition()[1])
979 + (curPoint3D->getPosition()[2] - lastPoint3D->
getPosition()[2]) * (curPoint3D->getPosition()[2] - lastPoint3D->
getPosition()[2]);
981 distBetweenPoints = std::sqrt(distBetweenPoints);
985 edgeMap[lastPoint3D].push_back(edge);
986 edgeMap[curPoint3D].push_back(edge);
987 bestEdgeList.emplace_back(edge);
989 lastPoint = curPoint;
996 for(
const auto& point : extremePoints) extremePointList.push_back(point);
1017 Eigen::Vector3f pcaToHitVec(hit3D->getPosition()[0] - pcaCenter(0),
1018 hit3D->getPosition()[1] - pcaCenter(1),
1019 hit3D->getPosition()[2] - pcaCenter(2));
1022 pointList.emplace_back(
dcel2d::Point(pcaToHit(1),pcaToHit(2),hit3D));
1026 pointList.sort([](
const auto&
left,
const auto&
right){
return (
std::abs(std::get<0>(
left) - std::get<0>(
right)) > std::numeric_limits<float>::epsilon()) ? std::get<0>(
left) < std::get<0>(
right) : std::get<1>(
left) < std::get<1>(
right);});
1028 std::cout <<
" ==> Build V diagram, sorted point list contains " << pointList.size() <<
" hits" <<
std::endl;
1044 for(
auto&
vertex : vertexList)
1046 Eigen::Vector3f coords = rotationMatrixInv *
vertex.getCoords();
1048 coords += pcaCenter;
1050 vertex.setCoords(coords);
1070 dcel2d::Point lastPoint = voronoiDiagram.getConvexHull().front();
1075 for(
auto& curPoint : voronoiDiagram.getConvexHull())
1077 if (curPoint == lastPoint)
continue;
1082 float distBetweenPoints = (curPoint3D->getPosition()[0] - lastPoint3D->
getPosition()[0]) * (curPoint3D->getPosition()[0] - lastPoint3D->
getPosition()[0])
1083 + (curPoint3D->getPosition()[1] - lastPoint3D->
getPosition()[1]) * (curPoint3D->getPosition()[1] - lastPoint3D->
getPosition()[1])
1084 + (curPoint3D->getPosition()[2] - lastPoint3D->
getPosition()[2]) * (curPoint3D->getPosition()[2] - lastPoint3D->
getPosition()[2]);
1086 distBetweenPoints = std::sqrt(distBetweenPoints);
1090 edgeMap[lastPoint3D].push_back(edge);
1091 edgeMap[curPoint3D].push_back(edge);
1092 bestEdgeList.emplace_back(edge);
1094 lastPoint = curPoint;
1097 std::cout <<
"****> vertexList containted " << vertexList.size() <<
" vertices for " << clusterParameters.
getHitPairListPtr().size() <<
" hits" <<
std::endl;
1104 const Eigen::Vector3f& u0,
1105 const Eigen::Vector3f& P1,
1106 const Eigen::Vector3f& u1,
1107 Eigen::Vector3f& poca0,
1108 Eigen::Vector3f& poca1)
const 1111 Eigen::Vector3f w0 = P0 - P1;
1113 float b(u0.dot(u1));
1115 float d(u0.dot(w0));
1116 float e(u1.dot(w0));
1117 float den(a * c -
b *
b);
1119 float arcLen0 = (b *
e - c *
d) / den;
1120 float arcLen1 = (a *
e - b *
d) / den;
1122 poca0 = P0 + arcLen0 * u0;
1123 poca1 = P1 + arcLen1 * u1;
1125 return (poca0 - poca1).norm();
1130 float largestDistance(0.);
1137 while(firstEdgeItr != convexHull.end())
1145 while(++nextEdgeItr != convexHull.end())
1151 return largestDistance;
void PCAAnalysis_calc3DDocas(const reco::HitPairListPtr &hitPairVector, const reco::PrincipalComponents &pca) const
void PCAAnalysis_3D(const reco::HitPairListPtr &hitPairList, reco::PrincipalComponents &pca, bool skeletonOnly=false) const
void cluster(In first, In last, Out result, Pred *pred)
float getTimeToExecute() const override
If monitoring, recover the time to execute a particular function.
void flipAxis(size_t axis)
const Eigen::Vector3f getPosition() const
std::list< ProjectedPoint > ProjectedPointList
float closestApproach(const Eigen::Vector3f &, const Eigen::Vector3f &, const Eigen::Vector3f &, const Eigen::Vector3f &, Eigen::Vector3f &, Eigen::Vector3f &) const
reco::PrincipalComponents & getSkeletonPCA()
std::list< Point > PointList
The list of the projected points.
reco::EdgeList & getBestEdgeList()
std::pair< Point, Point > MinMaxPoints
reco::Hit3DToEdgeMap & getHit3DToEdgeMap()
reco::HitPairListPtr & getHitPairListPtr()
Cluster finding and building.
~VoronoiPathFinder()
Destructor.
IClusterModAlg interface class definiton.
bool fEnableMonitoring
FHICL parameters.
ClusterParametersList & daughterList()
Implements a ConvexHull for use in clustering.
std::list< EdgeTuple > EdgeList
const EigenValues & getEigenValues() const
VoronoiDiagram class definiton.
reco::PrincipalComponents & getFullPCA()
reco::Hit3DToEdgeMap & getConvexHullEdgeMap()
std::unique_ptr< lar_cluster3d::IClusterAlg > fClusterAlg
Tools.
std::tuple< double, double, const reco::ClusterHit3D * > Point
Definitions used by the VoronoiDiagram algorithm.
reco::ProjectedPointList & getConvexHullExtremePoints()
void buildVoronoiDiagram(const dcel2d::PointList &)
Given an input set of 2D points construct a 2D voronoi diagram.
void ModifyClusters(reco::ClusterParametersList &) const override
Scan an input collection of clusters and modify those according to the specific implementing algorith...
Define a container for working with the convex hull.
void initializeHistograms(art::TFileDirectory &) override
Interface for initializing histograms if they are desired Note that the idea is to put hisgtograms in...
T get(std::string const &key) const
const Eigen::Vector3f & getAvePosition() const
void buildConvexHull(reco::ClusterParameters &clusterParameters, int level=0) const
PrincipalComponentsAlg fPCAAlg
reco::ClusterParametersList::iterator subDivideCluster(reco::ClusterParameters &cluster, reco::PrincipalComponents &lastPCA, reco::ClusterParametersList::iterator positionItr, reco::ClusterParametersList &outputClusterList, int level=0) const
Use PCA to try to find path in cluster.
std::tuple< const reco::ClusterHit3D *, const reco::ClusterHit3D *, double > EdgeTuple
std::list< const reco::ClusterHit3D * > HitPairListPtr
void UpdateParameters(const reco::ClusterHit2D *hit)
float getConvexHullArea() const
recover the area of the convex hull
This provides an art tool interface definition for 3D Cluster algorithms.
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
static int max(int a, int b)
const PointList & getConvexHull() const
recover the list of convex hull vertices
ConvexHull class definiton.
reco::ConvexHull & getConvexHull()
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
reco::ClusterParametersList::iterator breakIntoTinyBits(reco::ClusterParameters &cluster, reco::PrincipalComponents &lastPCA, reco::ClusterParametersList::iterator positionItr, reco::ClusterParametersList &outputClusterList, int level=0) const
Use PCA to try to find path in cluster.
dcel2d::FaceList & getFaceList()
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
This provides an art tool interface definition for 3D Cluster algorithms.
void buildVoronoiDiagram(reco::ClusterParameters &clusterParameters, int level=0) const
bool makeCandidateCluster(Eigen::Vector3f &, reco::ClusterParameters &, reco::HitPairListPtr::iterator, reco::HitPairListPtr::iterator, int) const
size_t fMinTinyClusterSize
Minimum size for a "tiny" cluster.
std::list< Point > PointList
std::list< Point > PointList
std::unordered_map< const reco::ClusterHit3D *, reco::EdgeList > Hit3DToEdgeMap
double accumulated_real_time() const
auto const & get(AssnsNode< L, R, D > const &r)
std::pair< MinMaxPoints, MinMaxPoints > MinMaxPointPair
reco::ProjectedPointList & getProjectedPointList()
reco::EdgeList & getConvexHullEdgeList()
dcel2d::HalfEdgeList & getHalfEdgeList()
std::list< Vertex > VertexList
bool fFillHistograms
Histogram definitions.
std::list< ClusterParameters > ClusterParametersList
VoronoiPathFinder(const fhicl::ParameterSet &)
Constructor.
const EigenVectors & getEigenVectors() const
QTextStream & endl(QTextStream &s)
dcel2d::VertexList & getVertexList()
void configure(fhicl::ParameterSet const &pset) override
float findConvexHullEndPoints(const reco::EdgeList &, const reco::ClusterHit3D *, const reco::ClusterHit3D *) const