51 #include "cetlib/search_path.h" 52 #include "cetlib/cpu_timer.h" 264 std::vector<recob::Seed>& seedVec,
295 size_t pfParticleParent,
311 int spacePointStart)
const;
330 using IdxToPCAMap = std::map<size_t,const reco::PrincipalComponents*>;
347 size_t pfParticleParent,
435 m_pcaAlg(pset.get<
fhicl::ParameterSet>(
"PrincipalComponentsAlg")),
445 produces< std::vector<recob::PCAxis>>();
446 produces< std::vector<recob::PFParticle>>();
447 produces< std::vector<recob::Cluster>>();
448 produces< std::vector<recob::SpacePoint>>();
450 produces< std::vector<recob::Seed>>();
451 produces< std::vector<recob::Edge>>();
453 produces< art::Assns<recob::PFParticle, recob::PCAxis>>();
454 produces< art::Assns<recob::PFParticle, recob::Cluster>>();
455 produces< art::Assns<recob::PFParticle, recob::SpacePoint>>();
456 produces< art::Assns<recob::PFParticle, recob::Seed>>();
457 produces< art::Assns<recob::PFParticle, recob::Edge>>();
458 produces< art::Assns<recob::Seed, recob::Hit>>();
459 produces< art::Assns<recob::Cluster, recob::Hit>>();
460 produces< art::Assns<recob::SpacePoint, recob::Hit>>();
461 produces< art::Assns<recob::Edge, recob::SpacePoint>>();
504 m_detector = lar::providerFrom<detinfo::DetectorPropertiesService>();
520 mf::LogInfo(
"Cluster3D") <<
" *** Cluster3D::produce(...) [Run=" << evt.
run() <<
", Event=" << evt.
id().
event() <<
"] Starting Now! *** " << std::endl;
524 cet::cpu_timer theClockTotal;
525 cet::cpu_timer theClockFinish;
540 std::cout <<
"++> Produced: " << hitPairList->size() <<
" hits" << std::endl;
543 m_clusterAlg->Cluster3DHits(*hitPairList, clusterParametersList);
545 std::cout <<
"++> Produced: " << clusterParametersList.size() <<
" clusters" << std::endl;
558 std::cout <<
"++> Outputting clusters" << std::endl;
562 ProduceArtClusters(output, *hitPairList, clusterParametersList, clusterHitToArtPtrMap);
572 theClockTotal.stop();
576 m_totalTime = theClockTotal.accumulated_real_time();
584 m_hits =
static_cast<int>(clusterHitToArtPtrMap.size());
634 std::vector<recob::Seed>& seedVec,
663 float transRMS = sqrt(std::pow(eigenVal1,2) + std::pow(eigenVal2,2));
665 bool foundGoodSeed(
false);
677 else if (eigenVal0 > 40. && transRMS < 5.)
695 for(
const auto& seedHitPair : seedHitPairVec)
697 seedVec.push_back(seedHitPair.first);
701 std::set<art::Ptr<recob::Hit> > seedHitSet;
703 for(
const auto& hit3D : seedHitPair.second)
705 for(
const auto& hit2D : hit3D->getHits())
707 if (!hit2D)
continue;
709 const recob::Hit* recobHit = &hit2D->getHit();
711 seedHitSet.insert(hitToPtrMap[recobHit]);
717 for(
const auto& hit2D : seedHitSet) seedHitVec.push_back(hit2D);
727 bool operator()(
const std::pair<float, const reco::ClusterHit3D*>&
left,
const std::pair<float, const reco::ClusterHit3D*>&
right)
729 return left.first < right.first;
747 typedef std::pair<float, const reco::ClusterHit3D*> DistanceHit3DPair;
748 typedef std::list<DistanceHit3DPair > DistanceHit3DPairList;
749 typedef std::map<const reco::ClusterHit3D*, DistanceHit3DPairList > Hit3DToDistanceMap;
752 typedef std::list<const reco::ClusterHit3D*> Hit3DList;
753 typedef std::pair<Hit3DList::iterator, Hit3DList::iterator> Hit3DEdgePair;
754 typedef std::pair<float, Hit3DEdgePair > DistanceEdgePair;
755 typedef std::list<DistanceEdgePair > DistanceEdgePairList;
757 struct DistanceEdgePairOrder
759 bool operator()(
const DistanceEdgePair&
left,
const DistanceEdgePair&
right)
const 761 return left.first > right.first;
779 Hit3DToDistanceMap hit3DToDistanceMap;
784 DistanceHit3DPairList& outerHitList = hit3DToDistanceMap[hit3DOuter];
791 TVector3 deltaPos = innerPos - outerPos;
792 float hitDistance(
float(deltaPos.Mag()));
794 if (hitDistance > 20.)
continue;
796 hit3DToDistanceMap[hit3DInner].emplace_back(DistanceHit3DPair(hitDistance,hit3DOuter));
797 outerHitList.emplace_back(DistanceHit3DPair(hitDistance,hit3DInner));
805 for(
auto& mapPair : hit3DToDistanceMap)
812 DistanceEdgePairList distanceEdgePairList;
815 hit3DList.emplace_back(skeletonListPtr.front());
816 distanceEdgePairList.emplace_back(DistanceEdgePair(0.,Hit3DEdgePair(hit3DList.begin(),hit3DList.begin())));
820 float largestDistance(0.);
821 float averageDistance(0.);
825 while(hit3DList.size() < skeletonListPtr.size())
828 float bestDist = 10000000.;
831 for(
Hit3DList::iterator hit3DIter = hit3DList.begin(); hit3DIter != hit3DList.end(); hit3DIter++)
836 DistanceHit3DPairList& nearestList = hit3DToDistanceMap[hit3D];
838 while(!nearestList.empty())
844 if (nearestList.front().first < bestDist)
846 bestHit3DIter = hit3DIter;
847 bestDist = nearestList.front().first;
852 else nearestList.pop_front();
856 if (bestDist > largestDistance) largestDistance = bestDist;
858 averageDistance += bestDist;
867 distanceEdgePairList.emplace_back(DistanceEdgePair(bestDist,Hit3DEdgePair(bestHit3DIter,nextHit3DIter)));
872 averageDistance /= float(hit3DList.size());
877 distanceEdgePairList.sort(DistanceEdgePairOrder());
883 if (edgeIter->first < thirdDist)
break;
885 largestDistIter = edgeIter;
891 bestList.resize(std::distance(hit3DList.begin(), breakIter));
893 std::copy(hit3DList.begin(), breakIter, bestList.begin());
897 hitPairListPtr.sort();
901 std::set_difference(hitPairListPtr.begin(), hitPairListPtr.end(),
902 bestList.begin(), bestList.end(),
903 hitPairListPtr.begin() );
905 hitPairListPtr.erase(newListEnd, hitPairListPtr.end());
954 if (hitPairListPtrList.size() < 2)
return;
975 for(
const auto& hit3D : hitPairListPtr)
977 for(
const auto& hit2D : hit3D->getHits())
978 if (hit2D) hit2D->clearStatusBits(0
x1);
985 float allowedHitRange = 6. * firstHitListPCA.
getAveHitDoca();
998 newClusterHitList.resize(hitPairListPtr.size());
1002 std::copy_if(hitPairListPtr.begin(), hitPairListPtr.end(), newClusterHitList.begin(),
CopyIfInRange(allowedHitRange));
1005 newClusterHitList.resize(std::distance(newClusterHitList.begin(), newListEnd));
1035 float newAllowedHitRange = 6. * secondHitListPCA.
getAveHitDoca();
1045 std::copy_if(newClusterHitList.begin(), newClusterHitList.end(), tempHitList.begin(),
CopyIfInRange(newAllowedHitRange));
1047 hitPairListPtr.insert(hitPairListPtr.end(), tempHitList.begin(), tempListEnd);
1074 mf::LogDebug(
"Cluster3D") <<
" *** Cluster3D::ProduceArtClusters() *** " << std::endl;
1077 if (!clusterParametersList.empty())
1082 for(
auto& clusterParameters : clusterParametersList)
1089 if (!clusterParameters.getFullPCA().getSvdOK())
1091 mf::LogDebug(
"Cluster3D") <<
"--> no feature extraction done on this cluster!!" << std::endl;
1105 std::cout <<
"Preparing to save the vertex point list, size: " << vertexList.size() <<
", half edges: " << halfEdgeList.size() << std::endl;
1111 if (clusterParameters.daughterList().empty())
1123 FindAndStoreDaughters(output, clusterParameters, pfParticleIdx, idxToPCAMap, hitToPtrMap, hit3DToSPPtrMap);
1129 std::vector<size_t> daughterVec;
1131 for(
auto& idxToPCA : idxToPCAMap) daughterVec.emplace_back(idxToPCA.first);
1138 double eigenVals[] = {0.,0.,0.};
1139 double avePosition[] = {0.,0.,0.};
1141 eigenVecs.resize(3);
1145 for(
size_t outerIdx = 0; outerIdx < 3; outerIdx++)
1150 eigenVecs[outerIdx].resize(3);
1152 for(
size_t innerIdx = 0; innerIdx < 3; innerIdx++) eigenVecs[outerIdx][innerIdx] = skeletonPCA.
getEigenVectors()[outerIdx][innerIdx];
1168 for(
size_t outerIdx = 0; outerIdx < 3; outerIdx++)
1173 for(
size_t innerIdx = 0; innerIdx < 3; innerIdx++) eigenVecs[outerIdx][innerIdx] = fullPCA.
getEigenVectors()[outerIdx][innerIdx];
1190 MakeAndSaveSpacePoints(output, clusterParameters.getHitPairListPtr(), hitToPtrMap, hit3DToSPPtrMap, spacePointStart);
1195 for(
const auto& edge : clusterParameters.getBestEdgeList())
1200 bool hit0Found = hit0Itr != hit3DToSPPtrMap.end();
1201 bool hit1Found = hit1Itr != hit3DToSPPtrMap.end();
1203 if (!hit0Found || !hit1Found) std::cout <<
"<<<<< Did not find matching space point " << hit0Found <<
", " << hit1Found <<
" >>>>>>" << std::endl;
1217 for(
auto& hitPair : hitPairVector)
1221 double spacePointPos[] = {hitPair->getPosition()[0],hitPair->getPosition()[1],hitPair->getPosition()[2]};
1222 double spacePointErr[] = {1., 0., 0., 1., 0., 1.};
1223 double chisq(-100.);
1227 for(
const auto hit : hitPair->getHits())
1236 recobHits.push_back(hitPtr);
1246 std::cout <<
"++++>>>> total num hits: " << hitPairVector.size() <<
", num free: " << nFreePoints << std::endl;
1253 size_t localCount(0);
1257 for(
auto& clusterParams : clusterParameters.
daughterList())
1267 size_t pfParticleParent,
1275 for(
auto& clusterParams : clusterParameters.
daughterList())
1276 FindAndStoreDaughters(output, clusterParams, pfParticleParent, idxToPCAMap, hitToPtrMap, hit3DToSPPtrMap);
1281 size_t daughterIdx =
ConvertToArtOutput(output, clusterParameters, pfParticleParent, hitToPtrMap, hit3DToSPPtrMap);
1283 idxToPCAMap[daughterIdx] = &clusterParameters.
getFullPCA();
1286 return idxToPCAMap.size();
1291 size_t pfParticleParent,
1369 recobHits.push_back(hitPtr);
1384 if (!recobHits.empty())
1385 plane = recobHits.front()->WireID().planeID();
1428 for (
auto& hitPair : clusHitPairVector)
1433 double chisq = hitPair->getHitChiSquare();
1448 double spacePointPos[] = {hitPair->getPosition()[0],hitPair->getPosition()[1],hitPair->getPosition()[2]};
1453 hit3DToSPPtrMap[hitPair] = spacePointID;
1458 for(
const auto&
hit : hitPair->getHits())
1462 recobHits.push_back(hitPtr);
1472 output.
artEdgeVector->emplace_back(std::get<2>(edge), hit3DToSPPtrMap[std::get<0>(edge)], hit3DToSPPtrMap[std::get<1>(edge)], output.
artEdgeVector->size());
1475 std::vector<size_t> nullVector;
1484 double eigenVals[] = {0.,0.,0.};
1485 double avePosition[] = {0.,0.,0.};
1487 eigenVecs.resize(3);
1489 for(
size_t outerIdx = 0; outerIdx < 3; outerIdx++)
1494 eigenVecs[outerIdx].resize(3);
1496 for(
size_t innerIdx = 0; innerIdx < 3; innerIdx++) eigenVecs[outerIdx][innerIdx] = skeletonPCA.
getEigenVectors()[outerIdx][innerIdx];
1510 for(
size_t outerIdx = 0; outerIdx < 3; outerIdx++)
1515 for(
size_t innerIdx = 0; innerIdx < 3; innerIdx++) eigenVecs[outerIdx][innerIdx] = fullPCA.
getEigenVectors()[outerIdx][innerIdx];
1535 return pfParticleIdx;
1542 int spacePointStart)
const 1545 double spError[] = {1., 0., 1., 0., 0., 1.};
1548 for (
auto& hitPair : clusHitPairVector)
1551 if (hit3DToSPPtrMap.find(hitPair) != hit3DToSPPtrMap.end())
continue;
1556 double chisq = hitPair->getHitChiSquare();
1571 double spacePointPos[] = {hitPair->getPosition()[0],hitPair->getPosition()[1],hitPair->getPosition()[2]};
1575 hit3DToSPPtrMap[hitPair] = spacePointID;
1580 for(
const auto&
hit : hitPair->getHits())
1584 recobHits.push_back(hitPtr);
1605 double spError[] = {1., 0., 1., 0., 0., 1.};
1609 std::map<const dcel2d::Vertex*,size_t> vertexToSpacePointMap;
1612 for (
auto&
vertex : vertexList)
1617 double spacePointPos[] = {coords[0], coords[1], coords[2]};
1625 std::set<const dcel2d::HalfEdge*> halfEdgeSet;
1628 for(
const auto& halfEdge : halfEdgeList)
1634 if (twin && halfEdgeSet.find(twin) == halfEdgeSet.end())
1641 if (!toVertex || !fromVertex)
continue;
1643 if (vertexToSpacePointMap.find(fromVertex) == vertexToSpacePointMap.end() ||
1644 vertexToSpacePointMap.find(toVertex) == vertexToSpacePointMap.end())
continue;
1649 output.
artVertexEdgeVector->emplace_back(distVec.norm(), vertexToSpacePointMap.at(fromVertex), vertexToSpacePointMap.at(toVertex), output.
artEdgeVector->size());
1651 halfEdgeSet.insert(&halfEdge);
1673 using DocaToPCAPair = std::pair<float, const reco::PrincipalComponents*>;
1674 using DocaToPCAVec = std::vector<DocaToPCAPair>;
1676 DocaToPCAVec docaToPCAVec;
1679 for (
const auto& idxToPCA : idxToPCAMap)
1688 Eigen::Vector3f pcaToAveVec = pcaPos - avePosition;
1691 float arclenToPoca = pcaToAveVec.dot(axisDirVec);
1693 docaToPCAVec.emplace_back(DocaToPCAPair(arclenToPoca,pca));
1696 std::sort(docaToPCAVec.begin(),docaToPCAVec.end(),[](
const auto&
left,
const auto&
right){
return left.first <
right.first;});
1700 double spError[] = {1., 0., 1., 0., 0., 1.};
1706 for(
const auto& docaToPCAPair : docaToPCAVec)
1716 size_t curPointBin = lastPointBin + 1;
1721 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
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.
ArtOutputHandler(const art::EDProducer &owner, art::Event &evt, std::string &instanceName)
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.
reco::EdgeList & getBestEdgeList()
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.
const art::EDProducer & m_owner
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.
#define DEFINE_ART_MODULE(klass)
reco::PrincipalComponents & getFullPCA()
size_t countUltimateDaughters(reco::ClusterParameters &clusterParameters) const
Count number of end of line daughters.
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
PCASeedFinderAlg m_pcaSeedFinderAlg
Use PCA axis to find seeds.
std::string & m_instanceName
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
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)
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.
Definition of the Cluster3D class.
float m_artHitsTime
Keeps track of time to recover hits.
Interface to class computing cluster parameters.
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)
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.