51 #include "cetlib/search_path.h" 52 #include "cetlib/cpu_timer.h" 269 std::vector<recob::Seed>& seedVec,
300 size_t pfParticleParent,
316 int spacePointStart)
const;
343 using IdxToPCAMap = std::map<size_t,const reco::PrincipalComponents*>;
360 size_t pfParticleParent,
450 m_pcaAlg(pset.get<
fhicl::ParameterSet>(
"PrincipalComponentsAlg")),
461 produces< std::vector<recob::PCAxis>>();
462 produces< std::vector<recob::PFParticle>>();
463 produces< std::vector<recob::Cluster>>();
464 produces< std::vector<recob::SpacePoint>>();
467 produces< std::vector<recob::Seed>>();
468 produces< std::vector<recob::Edge>>();
470 produces< art::Assns<recob::PFParticle, recob::PCAxis>>();
471 produces< art::Assns<recob::PFParticle, recob::Cluster>>();
472 produces< art::Assns<recob::PFParticle, recob::SpacePoint>>();
473 produces< art::Assns<recob::PFParticle, recob::Seed>>();
474 produces< art::Assns<recob::PFParticle, recob::Edge>>();
475 produces< art::Assns<recob::Seed, recob::Hit>>();
476 produces< art::Assns<recob::Cluster, recob::Hit>>();
477 produces< art::Assns<recob::SpacePoint, recob::Hit>>();
478 produces< art::Assns<recob::Edge, recob::SpacePoint>>();
521 m_detector = lar::providerFrom<detinfo::DetectorPropertiesService>();
537 mf::LogInfo(
"Cluster3D") <<
" *** Cluster3D::produce(...) [Run=" << evt.
run() <<
", Event=" << evt.
id().
event() <<
"] Starting Now! *** " << std::endl;
541 cet::cpu_timer theClockTotal;
542 cet::cpu_timer theClockFinish;
557 std::cout <<
"++> Produced: " << hitPairList->size() <<
" hits" << std::endl;
560 m_clusterAlg->Cluster3DHits(*hitPairList, clusterParametersList);
562 std::cout <<
"++> Produced: " << clusterParametersList.size() <<
" clusters" << std::endl;
575 std::cout <<
"++> Outputting clusters" << std::endl;
579 ProduceArtClusters(output, *hitPairList, clusterParametersList, clusterHitToArtPtrMap);
589 theClockTotal.stop();
593 m_totalTime = theClockTotal.accumulated_real_time();
602 m_hits =
static_cast<int>(clusterHitToArtPtrMap.size());
657 std::vector<recob::Seed>& seedVec,
686 float transRMS = sqrt(std::pow(eigenVal1,2) + std::pow(eigenVal2,2));
688 bool foundGoodSeed(
false);
700 else if (eigenVal0 > 40. && transRMS < 5.)
718 for(
const auto& seedHitPair : seedHitPairVec)
720 seedVec.push_back(seedHitPair.first);
724 std::set<art::Ptr<recob::Hit> > seedHitSet;
726 for(
const auto& hit3D : seedHitPair.second)
728 for(
const auto& hit2D : hit3D->getHits())
730 if (!hit2D)
continue;
732 const recob::Hit* recobHit = &hit2D->getHit();
734 seedHitSet.insert(hitToPtrMap[recobHit]);
740 for(
const auto& hit2D : seedHitSet) seedHitVec.push_back(hit2D);
750 bool operator()(
const std::pair<float, const reco::ClusterHit3D*>&
left,
const std::pair<float, const reco::ClusterHit3D*>&
right)
752 return left.first < right.first;
770 typedef std::pair<float, const reco::ClusterHit3D*> DistanceHit3DPair;
771 typedef std::list<DistanceHit3DPair > DistanceHit3DPairList;
772 typedef std::map<const reco::ClusterHit3D*, DistanceHit3DPairList > Hit3DToDistanceMap;
775 typedef std::list<const reco::ClusterHit3D*> Hit3DList;
776 typedef std::pair<Hit3DList::iterator, Hit3DList::iterator> Hit3DEdgePair;
777 typedef std::pair<float, Hit3DEdgePair > DistanceEdgePair;
778 typedef std::list<DistanceEdgePair > DistanceEdgePairList;
780 struct DistanceEdgePairOrder
782 bool operator()(
const DistanceEdgePair&
left,
const DistanceEdgePair&
right)
const 784 return left.first > right.first;
802 Hit3DToDistanceMap hit3DToDistanceMap;
807 DistanceHit3DPairList& outerHitList = hit3DToDistanceMap[hit3DOuter];
814 TVector3 deltaPos = innerPos - outerPos;
815 float hitDistance(
float(deltaPos.Mag()));
817 if (hitDistance > 20.)
continue;
819 hit3DToDistanceMap[hit3DInner].emplace_back(DistanceHit3DPair(hitDistance,hit3DOuter));
820 outerHitList.emplace_back(DistanceHit3DPair(hitDistance,hit3DInner));
828 for(
auto& mapPair : hit3DToDistanceMap)
835 DistanceEdgePairList distanceEdgePairList;
838 hit3DList.emplace_back(skeletonListPtr.front());
839 distanceEdgePairList.emplace_back(DistanceEdgePair(0.,Hit3DEdgePair(hit3DList.begin(),hit3DList.begin())));
843 float largestDistance(0.);
844 float averageDistance(0.);
848 while(hit3DList.size() < skeletonListPtr.size())
851 float bestDist = 10000000.;
854 for(
Hit3DList::iterator hit3DIter = hit3DList.begin(); hit3DIter != hit3DList.end(); hit3DIter++)
859 DistanceHit3DPairList& nearestList = hit3DToDistanceMap[hit3D];
861 while(!nearestList.empty())
867 if (nearestList.front().first < bestDist)
869 bestHit3DIter = hit3DIter;
870 bestDist = nearestList.front().first;
875 else nearestList.pop_front();
879 if (bestDist > largestDistance) largestDistance = bestDist;
881 averageDistance += bestDist;
890 distanceEdgePairList.emplace_back(DistanceEdgePair(bestDist,Hit3DEdgePair(bestHit3DIter,nextHit3DIter)));
895 averageDistance /= float(hit3DList.size());
900 distanceEdgePairList.sort(DistanceEdgePairOrder());
906 if (edgeIter->first < thirdDist)
break;
908 largestDistIter = edgeIter;
914 bestList.resize(std::distance(hit3DList.begin(), breakIter));
916 std::copy(hit3DList.begin(), breakIter, bestList.begin());
920 hitPairListPtr.sort();
924 std::set_difference(hitPairListPtr.begin(), hitPairListPtr.end(),
925 bestList.begin(), bestList.end(),
926 hitPairListPtr.begin() );
928 hitPairListPtr.erase(newListEnd, hitPairListPtr.end());
977 if (hitPairListPtrList.size() < 2)
return;
998 for(
const auto& hit3D : hitPairListPtr)
1000 for(
const auto& hit2D : hit3D->getHits())
1001 if (hit2D) hit2D->clearStatusBits(0
x1);
1008 float allowedHitRange = 6. * firstHitListPCA.
getAveHitDoca();
1021 newClusterHitList.resize(hitPairListPtr.size());
1025 std::copy_if(hitPairListPtr.begin(), hitPairListPtr.end(), newClusterHitList.begin(),
CopyIfInRange(allowedHitRange));
1028 newClusterHitList.resize(std::distance(newClusterHitList.begin(), newListEnd));
1058 float newAllowedHitRange = 6. * secondHitListPCA.
getAveHitDoca();
1068 std::copy_if(newClusterHitList.begin(), newClusterHitList.end(), tempHitList.begin(),
CopyIfInRange(newAllowedHitRange));
1070 hitPairListPtr.insert(hitPairListPtr.end(), tempHitList.begin(), tempListEnd);
1097 mf::LogDebug(
"Cluster3D") <<
" *** Cluster3D::ProduceArtClusters() *** " << std::endl;
1100 if (!clusterParametersList.empty())
1105 for(
auto& clusterParameters : clusterParametersList)
1112 if (!clusterParameters.getFullPCA().getSvdOK())
1114 mf::LogDebug(
"Cluster3D") <<
"--> no feature extraction done on this cluster!!" << std::endl;
1128 std::cout <<
"Preparing to save the vertex point list, size: " << vertexList.size() <<
", half edges: " << halfEdgeList.size() << std::endl;
1134 if (clusterParameters.daughterList().empty())
1149 FindAndStoreDaughters(output, clusterParameters, pfParticleIdx, idxToPCAMap, hitToPtrMap, hit3DToSPPtrMap);
1155 std::vector<size_t> daughterVec;
1157 for(
auto& idxToPCA : idxToPCAMap) daughterVec.emplace_back(idxToPCA.first);
1164 double eigenVals[] = {0.,0.,0.};
1165 double avePosition[] = {0.,0.,0.};
1167 eigenVecs.resize(3);
1171 for(
size_t outerIdx = 0; outerIdx < 3; outerIdx++)
1176 eigenVecs[outerIdx].resize(3);
1178 for(
size_t innerIdx = 0; innerIdx < 3; innerIdx++) eigenVecs[outerIdx][innerIdx] = skeletonPCA.
getEigenVectors()[outerIdx][innerIdx];
1194 for(
size_t outerIdx = 0; outerIdx < 3; outerIdx++)
1199 for(
size_t innerIdx = 0; innerIdx < 3; innerIdx++) eigenVecs[outerIdx][innerIdx] = fullPCA.
getEigenVectors()[outerIdx][innerIdx];
1216 MakeAndSaveSpacePoints(output, clusterParameters.getHitPairListPtr(), hitToPtrMap, hit3DToSPPtrMap, spacePointStart);
1224 for(
const auto& edge : clusterParameters.getConvexHull().getConvexHullEdgeList())
1229 bool hit0Found = hit0Itr != hit3DToSPPtrMap.end();
1230 bool hit1Found = hit1Itr != hit3DToSPPtrMap.end();
1232 if (!hit0Found || !hit1Found) std::cout <<
"<<<<< Did not find matching space point " << hit0Found <<
", " << hit1Found <<
" >>>>>>" << std::endl;
1246 for(
auto& hitPair : hitPairVector)
1250 double spacePointPos[] = {hitPair->getPosition()[0],hitPair->getPosition()[1],hitPair->getPosition()[2]};
1251 double spacePointErr[] = {1., 0., 0., 1., 0., 1.};
1252 double chisq(-100.);
1256 for(
const auto hit : hitPair->getHits())
1265 recobHits.push_back(hitPtr);
1275 std::cout <<
"++++>>>> total num hits: " << hitPairVector.size() <<
", num free: " << nFreePoints << std::endl;
1282 size_t localCount(0);
1286 for(
auto& clusterParams : clusterParameters.
daughterList())
1296 size_t pfParticleParent,
1304 for(
auto& clusterParams : clusterParameters.
daughterList())
1305 FindAndStoreDaughters(output, clusterParams, pfParticleParent, idxToPCAMap, hitToPtrMap, hit3DToSPPtrMap);
1310 size_t daughterIdx =
ConvertToArtOutput(output, clusterParameters, pfParticleParent, hitToPtrMap, hit3DToSPPtrMap);
1312 idxToPCAMap[daughterIdx] = &clusterParameters.
getFullPCA();
1315 return idxToPCAMap.size();
1320 size_t pfParticleParent,
1398 recobHits.push_back(hitPtr);
1413 if (!recobHits.empty())
1414 plane = recobHits.front()->WireID().planeID();
1457 for (
auto& hitPair : clusHitPairVector)
1462 double chisq = hitPair->getHitChiSquare();
1477 double spacePointPos[] = {hitPair->getPosition()[0],hitPair->getPosition()[1],hitPair->getPosition()[2]};
1482 hit3DToSPPtrMap[hitPair] = spacePointID;
1487 for(
const auto&
hit : hitPair->getHits())
1491 recobHits.push_back(hitPtr);
1501 output.
artEdgeVector->emplace_back(std::get<2>(edge), hit3DToSPPtrMap[std::get<0>(edge)], hit3DToSPPtrMap[std::get<1>(edge)], output.
artEdgeVector->size());
1504 std::vector<size_t> nullVector;
1513 double eigenVals[] = {0.,0.,0.};
1514 double avePosition[] = {0.,0.,0.};
1516 eigenVecs.resize(3);
1518 for(
size_t outerIdx = 0; outerIdx < 3; outerIdx++)
1523 eigenVecs[outerIdx].resize(3);
1525 for(
size_t innerIdx = 0; innerIdx < 3; innerIdx++) eigenVecs[outerIdx][innerIdx] = skeletonPCA.
getEigenVectors()[outerIdx][innerIdx];
1539 for(
size_t outerIdx = 0; outerIdx < 3; outerIdx++)
1544 for(
size_t innerIdx = 0; innerIdx < 3; innerIdx++) eigenVecs[outerIdx][innerIdx] = fullPCA.
getEigenVectors()[outerIdx][innerIdx];
1564 return pfParticleIdx;
1571 int spacePointStart)
const 1574 double spError[] = {1., 0., 1., 0., 0., 1.};
1577 for (
auto& hitPair : clusHitPairVector)
1580 if (hit3DToSPPtrMap.find(hitPair) != hit3DToSPPtrMap.end())
continue;
1585 double chisq = hitPair->getHitChiSquare();
1600 double spacePointPos[] = {hitPair->getPosition()[0],hitPair->getPosition()[1],hitPair->getPosition()[2]};
1604 hit3DToSPPtrMap[hitPair] = spacePointID;
1609 for(
const auto&
hit : hitPair->getHits())
1613 recobHits.push_back(hitPtr);
1627 double spError[] = {1., 0., 1., 0., 0., 1.};
1630 for (
auto& kinkTuple : kinkTupleVec)
1655 double spError[] = {1., 0., 1., 0., 0., 1.};
1659 std::map<const dcel2d::Vertex*,size_t> vertexToSpacePointMap;
1662 for (
auto&
vertex : vertexList)
1667 double spacePointPos[] = {coords[0], coords[1], coords[2]};
1675 std::set<const dcel2d::HalfEdge*> halfEdgeSet;
1678 for(
const auto& halfEdge : halfEdgeList)
1684 if (twin && halfEdgeSet.find(twin) == halfEdgeSet.end())
1691 if (!toVertex || !fromVertex)
continue;
1693 if (vertexToSpacePointMap.find(fromVertex) == vertexToSpacePointMap.end() ||
1694 vertexToSpacePointMap.find(toVertex) == vertexToSpacePointMap.end())
continue;
1699 output.
artVertexEdgeVector->emplace_back(distVec.norm(), vertexToSpacePointMap.at(fromVertex), vertexToSpacePointMap.at(toVertex), output.
artEdgeVector->size());
1701 halfEdgeSet.insert(&halfEdge);
1723 using DocaToPCAPair = std::pair<float, const reco::PrincipalComponents*>;
1724 using DocaToPCAVec = std::vector<DocaToPCAPair>;
1726 DocaToPCAVec docaToPCAVec;
1729 for (
const auto& idxToPCA : idxToPCAMap)
1738 Eigen::Vector3f pcaToAveVec = pcaPos - avePosition;
1741 float arclenToPoca = pcaToAveVec.dot(axisDirVec);
1743 docaToPCAVec.emplace_back(DocaToPCAPair(arclenToPoca,pca));
1746 std::sort(docaToPCAVec.begin(),docaToPCAVec.end(),[](
const auto&
left,
const auto&
right){
return left.first <
right.first;});
1750 double spError[] = {1., 0., 1., 0., 0., 1.};
1756 for(
const auto& docaToPCAPair : docaToPCAVec)
1766 size_t curPointBin = lastPointBin + 1;
1771 Eigen::Vector3f distVec(curPointPos[0]-lastPointPos[0],curPointPos[1]-lastPointPos[1],curPointPos[2]-lastPointPos[2]);
std::vector< SeedHitPairListPair > SeedHitPairListPairVec
float m_buildNeighborhoodTime
Keeps track of time to build epsilon neighborhood.
std::unique_ptr< std::vector< recob::Edge > > artEdgeVector
bool operator()(const reco::ClusterHit3D *hit3D)
void PCAAnalysis_calc3DDocas(const reco::HitPairListPtr &hitPairVector, const reco::PrincipalComponents &pca) const
std::unique_ptr< lar_cluster3d::IClusterModAlg > m_clusterPathAlg
Algorithm to do cluster path finding.
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
size_t FindAndStoreDaughters(ArtOutputHandler &output, reco::ClusterParameters &clusterParameters, size_t pfParticleParent, IdxToPCAMap &idxToPCAMap, RecobHitToPtrMap &hitToPtrMap, Hit3DToSPPtrMap &hit3DToSPPtrMap) const
This will produce art output for daughters noting that it needs to be done recursively.
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.
Reconstruction base classes.
This algorithm will create and then cluster 3D hits using DBScan.
std::unique_ptr< art::Assns< recob::Seed, recob::Hit > > artSeedHitAssociations
static constexpr size_t kPFParticlePrimary
Define index to signify primary particle.
std::list< HalfEdge > HalfEdgeList
virtual void reconfigure(fhicl::ParameterSet const &pset)
a handler for the case where the algorithm control parameters are to be reset
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]
void reconfigure(fhicl::ParameterSet const &pset)
a handler for the case where the algorithm control parameters are to be reset
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::unique_ptr< art::Assns< recob::PFParticle, recob::Seed > > artPFPartSeedAssociations
reco::PrincipalComponents & getSkeletonPCA()
void clearStatusBits(unsigned bits) const
const art::EDProducer & fOwner
void makeClusterHitAssns(RecobHitVector &recobHits)
virtual void reconfigure(fhicl::ParameterSet const &pset)
a handler for the case where the algorithm control parameters are to be reset
The data type to uniquely identify a Plane.
SkeletonAlg m_skeletonAlg
Skeleton point finder.
CopyIfInRange(float maxRange)
virtual bool findTrackSeeds(reco::HitPairListPtr &hitPairListPtr, reco::PrincipalComponents &inputPCA, SeedHitPairListPairVec &seedHitMap) const
Given the list of hits this will search for candidate Seed objects and return them.
std::unique_ptr< std::vector< recob::PFParticle > > artPFParticleVector
std::unique_ptr< art::Assns< recob::PFParticle, recob::SpacePoint > > artPFPartSPAssociations
Hit has been rejected for any reason.
std::unique_ptr< art::Assns< recob::Edge, recob::SpacePoint > > artEdgeSPAssociations
const float * getAvePosition() const
int getNumHitsUsed() const
HoughSeedFinderAlg class.
std::string m_spacePointInstance
Special instance name for vertex points.
std::list< HitPairListPtr > HitPairListPtrList
A utility class used in construction of 3D clusters.
reco::HitPairListPtr & getHitPairListPtr()
void makePFPartSeedAssns(size_t numSeedsStart)
Cluster finding and building.
std::unique_ptr< art::Assns< recob::PFParticle, recob::Cluster > > artPFPartClusAssociations
reco::PlaneToClusterParamsMap & getClusterParams()
HoughSeedFinderAlg m_seedFinderAlg
Seed finder.
std::unique_ptr< lar_cluster3d::IClusterAlg > m_clusterAlg
Algorithm to do 3D space point clustering.
float m_makeHitsTime
Keeps track of time to build 3D hits.
void GetSkeletonHits(const reco::HitPairListPtr &inputHitList, reco::HitPairListPtr &skeletonHitList) const
Return the skeleton hits from the input list.
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.
Hit has been used in Cluster Splitting MST.
void reconfigure(fhicl::ParameterSet const &pset)
a handler for the case where the algorithm control parameters are to be reset
std::list< std::unique_ptr< reco::ClusterHit3D >> HitPairList
void produce(art::Event &evt)
ProductID put(std::unique_ptr< PROD > &&product)
ClusterParametersList & daughterList()
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::map< const recob::Hit *, art::Ptr< recob::Hit >> RecobHitToPtrMap
void FillClusterParams(reco::ClusterParameters &, reco::Hit2DToClusterMap &, double minUniqueFrac=0., double maxLostFrac=1.) const
Fill the cluster parameters (expose to outside world for case of splitting/merging clusters) ...
std::unique_ptr< art::Assns< recob::SpacePoint, recob::Hit > > artSPHitAssociations
virtual void reconfigure(fhicl::ParameterSet const &pset)
a handler for the case where the algorithm control parameters are to be reset
Overrides another ClusterParamsAlgBase class with selected constants.
This is an algorithm for finding recob::Seed objects in 3D clusters.
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.
std::unique_ptr< std::vector< recob::SpacePoint > > artExtremePointVector
This is an algorithm for finding recob::Seed objects in 3D clusters.
void splitClustersWithMST(reco::ClusterParameters &clusterParameters, reco::ClusterParametersList &clusterParametersList) const
Attempt to split clusters by using a minimum spanning tree.
ClusterParamsBuilder class definiton.
void beginJob()
declare the standard art functions that we'll implement in this producer module
virtual double GetXTicksCoefficient(int t, int c) const =0
std::unique_ptr< std::vector< recob::PCAxis > > artPCAxisVector
void InitializeMonitoring()
Initialize the internal monitoring.
const detinfo::DetectorProperties * m_detector
Pointer to the detector properties.
virtual ~Cluster3D()
Destructor.
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.
T get(std::string const &key) const
float m_clusterMergeTime
Keeps track of the time to merge clusters.
PCASeedFinderAlg m_pcaSeedFinderAlg
Use PCA axis to find seeds.
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.
ParallelHitsSeedFinderAlg m_parallelHitsAlg
Deal with parallel hits clusters.
std::unique_ptr< std::vector< recob::Edge > > artVertexEdgeVector
void MakeAndSavePCAPoints(ArtOutputHandler &, const reco::PrincipalComponents &, IdxToPCAMap &) const
std::list< const reco::ClusterHit3D * > HitPairListPtr
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
This provides an art tool interface definition for 3D Cluster algorithms.
The geometry of one entire detector, as served by art.
int m_hits
Keeps track of the number of hits seen.
std::map< const recob::Hit *, art::Ptr< recob::Hit >> RecobHitToPtrMap
Defines a structure mapping art representation to internal.
Declaration of cluster object.
size_t ConvertToArtOutput(ArtOutputHandler &output, reco::ClusterParameters &clusterParameters, size_t pfParticleParent, RecobHitToPtrMap &hitToPtrMap, Hit3DToSPPtrMap &hit3DToSPPtrMap) const
Produces the art output from all the work done in this producer module.
const float * getPosition() const
geo::Geometry * m_geometry
pointer to the Geometry service
std::string & fInstanceName
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)
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 ...
Encapsulate the geometry of a wire.
void makePFPartEdgeAssns(size_t edgeStart)
float m_pathFindingTime
Keeps track of the path finding time.
virtual 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...
std::unique_ptr< std::vector< recob::SpacePoint > > artVertexPointVector
ClusterParamsBuilder m_clusterBuilder
Common cluster builder tool.
Cluster3D(fhicl::ParameterSet const &pset)
Constructor.
std::unique_ptr< std::vector< recob::SpacePoint > > artSpacePointVector
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
reco::ConvexHull & getConvexHull()
ArtOutputHandler(const art::EDProducer &owner, art::Event &evt, std::string &instanceName, std::string &extremeName)
std::map< size_t, const reco::PrincipalComponents * > IdxToPCAMap
Special routine to handle creating and saving space points & edges PCA points.
T * make(ARGS...args) const
Hierarchical representation of particle flow.
Utility object to perform functions of association.
bool bitsAreSet(const unsigned int &bitsToCheck) const
const float * getEigenValues() const
Encapsulate the construction of a single detector plane.
void makePFPartPCAAssns()
const float getAveHitDoca() const
void makePFPartSpacePointAssns(size_t spacePointStart)
void makePFPartClusterAssns(size_t clusterStart)
Header file to define the interface to the SkeletonAlg.
void ImportHits(Iter begin, Iter end)
Calls SetHits() with the hits in the sequence.
Hit has been made into Space Point.
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
This provides an art tool interface definition for 3D Cluster algorithms.
void reconfigure(fhicl::ParameterSet const &pset)
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< lar_cluster3d::IClusterModAlg > m_clusterMergeAlg
Algorithm to do cluster merging.
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
std::unordered_map< const reco::ClusterHit2D *, ClusterToHitPairSetMap > Hit2DToClusterMap
virtual bool findTrackSeeds(reco::HitPairListPtr &hitPairListPtr, reco::PrincipalComponents &inputPCA, SeedHitPairListPairVec &seedHitPairVec) const
Given the list of hits this will search for candidate Seed objects and return them.
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< art::Assns< recob::PFParticle, recob::PCAxis > > artPFPartAxisAssociations
void MakeAndSaveSpacePoints(ArtOutputHandler &output, reco::HitPairListPtr &clusHitPairVector, RecobHitToPtrMap &hitToPtrMap, Hit3DToSPPtrMap &hit3DToSPPtrMap, int spacePointStart) const
Special routine to handle creating and saving space points.
Vertex * getTargetVertex() const
void findTrackSeeds(art::Event &evt, reco::ClusterParameters &cluster, RecobHitToPtrMap &hitToPtrMap, std::vector< recob::Seed > &seedVec, art::Assns< recob::Seed, recob::Hit > &seedHitAssns) const
An interface to the seed finding algorithm.
void makeSpacePointHitAssns(RecobHitVector &recobHits)
void MakeAndSaveKinkPoints(ArtOutputHandler &output, reco::ConvexHullKinkTupleList &clusHitPairVector) const
Special routine to handle creating and saving space points.
reco::EdgeList & getConvexHullEdgeList()
std::vector< std::vector< double > > EigenVectors
std::unique_ptr< art::Assns< recob::Cluster, recob::Hit > > artClusterAssociations
void PrepareEvent(const art::Event &evt)
Event Preparation.
std::unique_ptr< art::Assns< recob::PFParticle, recob::Edge > > artPFPartEdgeAssociations
const Coords & getCoords() const
std::list< Vertex > VertexList
virtual bool findTrackSeeds(reco::HitPairListPtr &hitPairListPtr, reco::PrincipalComponents &inputPCA, SeedHitPairListPairVec &seedHitMap) const
Given the list of hits this will search for candidate Seed objects and return them.
std::unique_ptr< std::vector< recob::Seed > > artSeedVector
ParallelHitsSeedFinderAlg class.
void splitClustersWithHough(reco::ClusterParameters &clusterParameters, reco::ClusterParametersList &clusterParametersList) const
Attempt to split clusters using the output of the Hough Filter.
art framework interface to geometry description
float m_totalTime
Keeps track of total execution time.
std::list< ClusterParameters > ClusterParametersList
const EigenVectors & getEigenVectors() const
std::unique_ptr< std::vector< recob::Cluster > > artClusterVector
Edge is an object containing the results of a Principal Components Analysis of a group of space point...
std::vector< art::Ptr< recob::Hit >> RecobHitVector
void ProduceArtClusters(ArtOutputHandler &output, reco::HitPairList &hitPairList, reco::ClusterParametersList &clusterParametersList, RecobHitToPtrMap &hitToPtrMap) const
Top level output routine, allows checking cluster status.
void setStatusBit(unsigned bits) const
std::map< const reco::ClusterHit3D *, size_t > Hit3DToSPPtrMap
bool m_enableMonitoring
Turn on monitoring of this algorithm.