Definition of the Cluster3D class. More...
Classes | |
class | ArtOutputHandler |
Public Member Functions | |
Cluster3D (fhicl::ParameterSet const &pset) | |
Public Member Functions inherited from art::EDProducer | |
EDProducer (fhicl::ParameterSet const &pset) | |
template<typename Config > | |
EDProducer (Table< Config > const &config) | |
std::string | workerType () const |
Public Member Functions inherited from art::detail::Producer | |
virtual | ~Producer () noexcept |
Producer (fhicl::ParameterSet const &) | |
Producer (Producer const &)=delete | |
Producer (Producer &&)=delete | |
Producer & | operator= (Producer const &)=delete |
Producer & | operator= (Producer &&)=delete |
void | doBeginJob (SharedResources const &resources) |
void | doEndJob () |
void | doRespondToOpenInputFile (FileBlock const &fb) |
void | doRespondToCloseInputFile (FileBlock const &fb) |
void | doRespondToOpenOutputFiles (FileBlock const &fb) |
void | doRespondToCloseOutputFiles (FileBlock const &fb) |
bool | doBeginRun (RunPrincipal &rp, ModuleContext const &mc) |
bool | doEndRun (RunPrincipal &rp, ModuleContext const &mc) |
bool | doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
bool | doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
bool | doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed) |
Public Member Functions inherited from art::Modifier | |
~Modifier () noexcept | |
Modifier () | |
Modifier (Modifier const &)=delete | |
Modifier (Modifier &&)=delete | |
Modifier & | operator= (Modifier const &)=delete |
Modifier & | operator= (Modifier &&)=delete |
Public Member Functions inherited from art::ModuleBase | |
virtual | ~ModuleBase () noexcept |
ModuleBase () | |
ModuleDescription const & | moduleDescription () const |
void | setModuleDescription (ModuleDescription const &) |
std::array< std::vector< ProductInfo >, NumBranchTypes > const & | getConsumables () const |
void | sortConsumables (std::string const ¤t_process_name) |
template<typename T , BranchType BT> | |
ViewToken< T > | consumesView (InputTag const &tag) |
template<typename T , BranchType BT> | |
ViewToken< T > | mayConsumeView (InputTag const &tag) |
Private Types | |
using | IdxToPCAMap = std::map< size_t, const reco::PrincipalComponents * > |
Special routine to handle creating and saving space points & edges PCA points. More... | |
Private Member Functions | |
void | beginJob () override |
void | produce (art::Event &evt) override |
void | PrepareEvent (const art::Event &evt) |
Event Preparation. More... | |
void | InitializeMonitoring () |
Initialize the internal monitoring. More... | |
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. More... | |
void | splitClustersWithMST (reco::ClusterParameters &clusterParameters, reco::ClusterParametersList &clusterParametersList) const |
Attempt to split clusters by using a minimum spanning tree. More... | |
void | splitClustersWithHough (reco::ClusterParameters &clusterParameters, reco::ClusterParametersList &clusterParametersList) const |
Attempt to split clusters using the output of the Hough Filter. More... | |
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. More... | |
void | MakeAndSaveKinkPoints (ArtOutputHandler &output, reco::ConvexHullKinkTupleList &clusHitPairVector) const |
Special routine to handle creating and saving space points. More... | |
void | MakeAndSaveVertexPoints (ArtOutputHandler &, dcel2d::VertexList &, dcel2d::HalfEdgeList &) const |
Special routine to handle creating and saving space points & edges associated to voronoi diagrams. More... | |
void | MakeAndSavePCAPoints (ArtOutputHandler &, const reco::PrincipalComponents &, IdxToPCAMap &) const |
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. More... | |
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. More... | |
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. More... | |
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 cluster so encapsulate that here. More... | |
size_t | countUltimateDaughters (reco::ClusterParameters &clusterParameters) const |
Count number of end of line daughters. More... | |
Private Attributes | |
bool | m_onlyMakSpacePoints |
If true we don't do the full cluster 3D processing. More... | |
bool | m_enableMonitoring |
Turn on monitoring of this algorithm. More... | |
float | m_parallelHitsCosAng |
Cut for PCA 3rd axis angle to X axis. More... | |
float | m_parallelHitsTransWid |
Cut on transverse width of cluster (PCA 2nd eigenvalue) More... | |
TTree * | m_pRecoTree |
int | m_run |
int | m_event |
int | m_hits |
Keeps track of the number of hits seen. More... | |
int | m_hits3D |
Keeps track of the number of 3D hits made. More... | |
float | m_totalTime |
Keeps track of total execution time. More... | |
float | m_artHitsTime |
Keeps track of time to recover hits. More... | |
float | m_makeHitsTime |
Keeps track of time to build 3D hits. More... | |
float | m_buildNeighborhoodTime |
Keeps track of time to build epsilon neighborhood. More... | |
float | m_dbscanTime |
Keeps track of time to run DBScan. More... | |
float | m_clusterMergeTime |
Keeps track of the time to merge clusters. More... | |
float | m_pathFindingTime |
Keeps track of the path finding time. More... | |
float | m_finishTime |
Keeps track of time to run output module. More... | |
std::string | m_pathInstance |
Special instance for path points. More... | |
std::string | m_vertexInstance |
Special instance name for vertex points. More... | |
std::string | m_extremeInstance |
Instance name for the extreme points. More... | |
std::unique_ptr< lar_cluster3d::IHit3DBuilder > | m_hit3DBuilderAlg |
Builds the 3D hits to operate on. More... | |
std::unique_ptr< lar_cluster3d::IClusterAlg > | m_clusterAlg |
Algorithm to do 3D space point clustering. More... | |
std::unique_ptr< lar_cluster3d::IClusterModAlg > | m_clusterMergeAlg |
Algorithm to do cluster merging. More... | |
std::unique_ptr< lar_cluster3d::IClusterModAlg > | m_clusterPathAlg |
Algorithm to do cluster path finding. More... | |
std::unique_ptr< lar_cluster3d::IClusterParametersBuilder > | m_clusterBuilder |
Common cluster builder tool. More... | |
PrincipalComponentsAlg | m_pcaAlg |
Principal Components algorithm. More... | |
SkeletonAlg | m_skeletonAlg |
Skeleton point finder. More... | |
HoughSeedFinderAlg | m_seedFinderAlg |
Seed finder. More... | |
PCASeedFinderAlg | m_pcaSeedFinderAlg |
Use PCA axis to find seeds. More... | |
ParallelHitsSeedFinderAlg | m_parallelHitsAlg |
Deal with parallel hits clusters. More... | |
Additional Inherited Members | |
Public Types inherited from art::EDProducer | |
using | ModuleType = EDProducer |
using | WorkerType = WorkerT< EDProducer > |
Public Types inherited from art::detail::Producer | |
template<typename UserConfig , typename KeysToIgnore = void> | |
using | Table = Modifier::Table< UserConfig, KeysToIgnore > |
Public Types inherited from art::Modifier | |
template<typename UserConfig , typename UserKeysToIgnore = void> | |
using | Table = ProducerTable< UserConfig, detail::ModuleConfig, UserKeysToIgnore > |
Static Public Member Functions inherited from art::EDProducer | |
static void | commitEvent (EventPrincipal &ep, Event &e) |
Protected Member Functions inherited from art::ModuleBase | |
ConsumesCollector & | consumesCollector () |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | consumes (InputTag const &) |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | consumesView (InputTag const &) |
template<typename T , BranchType = InEvent> | |
void | consumesMany () |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | mayConsume (InputTag const &) |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | mayConsumeView (InputTag const &) |
template<typename T , BranchType = InEvent> | |
void | mayConsumeMany () |
Definition of the Cluster3D class.
Definition at line 107 of file Cluster3D_module.cc.
|
private |
Special routine to handle creating and saving space points & edges PCA points.
output | the object containting the art output |
clusterParamsList | List of clusters to get PCA's from |
Definition at line 407 of file Cluster3D_module.cc.
|
explicit |
Definition at line 535 of file Cluster3D_module.cc.
|
inlineprivate |
There are several places we will want to know if a candidate cluster is a "parallel hits" type of cluster so encapsulate that here.
pca | The Principal Components Analysis parameters for the cluster |
Definition at line 467 of file Cluster3D_module.cc.
|
overrideprivatevirtual |
beginJob will be tasked with initializing monitoring, in necessary, but also to init the geometry and detector services (and this probably needs to go in a "beginEvent" method?)
Reimplemented from art::EDProducer.
Definition at line 599 of file Cluster3D_module.cc.
|
private |
Produces the art output from all the work done in this producer module.
output | the object containting the art output |
clusterParameters | Cluster info to output (in internal format) |
pfParticleParent | The parent ID reference for the output PFParticle |
hitToPtrMap | This maps our Cluster2D hits back to art Ptr's to reco Hits |
Definition at line 1444 of file Cluster3D_module.cc.
|
private |
Count number of end of line daughters.
clusterParams | input cluster parameters to look at |
Definition at line 1391 of file Cluster3D_module.cc.
|
private |
This will produce art output for daughters noting that it needs to be done recursively.
output | the object containting the art output |
clusterParameters | Cluster info to output (in internal format) |
pfParticleParent | The parent ID reference for the output PFParticle |
daughterList | List of PFParticle indices for stored daughters |
hitToPtrMap | This maps our Cluster2D hits back to art Ptr's to reco Hits |
Definition at line 1406 of file Cluster3D_module.cc.
|
private |
An interface to the seed finding algorithm.
evt | the ART event |
cluster | structure of information representing a single cluster |
hitToPtrMap | This maps our Cluster2D hits back to art Ptr's to reco Hits |
seedVec | the output vector of candidate seeds |
seedHitAssns | the associations between the seeds and the 2D hits making them |
This method provides an interface to various algorithms for finding candiate recob::Seed objects and, as well, their candidate related seed hits
Definition at line 741 of file Cluster3D_module.cc.
|
private |
Initialize the internal monitoring.
Definition at line 700 of file Cluster3D_module.cc.
|
private |
Special routine to handle creating and saving space points.
output | the object containting the art output |
clusHitPairVector | List of 3D hits to output as "extreme" space points |
Definition at line 1724 of file Cluster3D_module.cc.
|
private |
Definition at line 1817 of file Cluster3D_module.cc.
|
private |
Special routine to handle creating and saving space points.
output | the object containting the art output |
clusterParameters | Cluster info to output (in internal format) |
pfParticleParent | The parent ID reference for the output PFParticle |
hitToPtrMap | This maps our Cluster2D hits back to art Ptr's to reco Hits |
Definition at line 1666 of file Cluster3D_module.cc.
|
private |
Special routine to handle creating and saving space points & edges associated to voronoi diagrams.
output | the object containting the art output |
vertexList | list of vertices in the diagram |
HalfEdgeList | list of half edges in the diagram |
Definition at line 1751 of file Cluster3D_module.cc.
|
private |
Event Preparation.
evt | the ART event |
Definition at line 723 of file Cluster3D_module.cc.
|
overrideprivatevirtual |
Implements art::EDProducer.
Definition at line 611 of file Cluster3D_module.cc.
|
private |
Top level output routine, allows checking cluster status.
hitPairList | List of all 3D Hits in internal Cluster3D format |
clusterParametersList | Data structure containing the cluster information to output |
hitToPtrMap | This maps our Cluster2D hits back to art Ptr's to reco Hits |
The workhorse to take the candidate 3D clusters and produce all of the necessary art output
Definition at line 1173 of file Cluster3D_module.cc.
|
private |
Attempt to split clusters using the output of the Hough Filter.
clusterParameters | The given cluster parameters object to try to split |
clusterParametersList | The list of clusters |
Definition at line 1029 of file Cluster3D_module.cc.
|
private |
Attempt to split clusters by using a minimum spanning tree.
clusterParameters | The given cluster parameters object to try to split |
clusterParametersList | The list of clusters |
Definition at line 836 of file Cluster3D_module.cc.
|
private |
Keeps track of time to recover hits.
Definition at line 497 of file Cluster3D_module.cc.
|
private |
Keeps track of time to build epsilon neighborhood.
Definition at line 499 of file Cluster3D_module.cc.
|
private |
Algorithm to do 3D space point clustering.
Definition at line 512 of file Cluster3D_module.cc.
|
private |
Common cluster builder tool.
Definition at line 518 of file Cluster3D_module.cc.
|
private |
Algorithm to do cluster merging.
Definition at line 514 of file Cluster3D_module.cc.
|
private |
Keeps track of the time to merge clusters.
Definition at line 501 of file Cluster3D_module.cc.
|
private |
Algorithm to do cluster path finding.
Definition at line 516 of file Cluster3D_module.cc.
|
private |
Keeps track of time to run DBScan.
Definition at line 500 of file Cluster3D_module.cc.
|
private |
Turn on monitoring of this algorithm.
Definition at line 484 of file Cluster3D_module.cc.
|
private |
Definition at line 493 of file Cluster3D_module.cc.
|
private |
Instance name for the extreme points.
Definition at line 506 of file Cluster3D_module.cc.
|
private |
Keeps track of time to run output module.
Definition at line 503 of file Cluster3D_module.cc.
|
private |
Builds the 3D hits to operate on.
Definition at line 510 of file Cluster3D_module.cc.
|
private |
Keeps track of the number of hits seen.
Definition at line 494 of file Cluster3D_module.cc.
|
private |
Keeps track of the number of 3D hits made.
Definition at line 495 of file Cluster3D_module.cc.
|
private |
Keeps track of time to build 3D hits.
Definition at line 498 of file Cluster3D_module.cc.
|
private |
If true we don't do the full cluster 3D processing.
Algorithm parameters
Definition at line 483 of file Cluster3D_module.cc.
|
private |
Deal with parallel hits clusters.
Definition at line 523 of file Cluster3D_module.cc.
|
private |
Cut for PCA 3rd axis angle to X axis.
Definition at line 485 of file Cluster3D_module.cc.
|
private |
Cut on transverse width of cluster (PCA 2nd eigenvalue)
Definition at line 486 of file Cluster3D_module.cc.
|
private |
Keeps track of the path finding time.
Definition at line 502 of file Cluster3D_module.cc.
|
private |
Special instance for path points.
Definition at line 504 of file Cluster3D_module.cc.
|
private |
Principal Components algorithm.
Definition at line 519 of file Cluster3D_module.cc.
|
private |
Use PCA axis to find seeds.
Definition at line 522 of file Cluster3D_module.cc.
|
private |
Tree variables for output
Definition at line 491 of file Cluster3D_module.cc.
|
private |
Definition at line 492 of file Cluster3D_module.cc.
|
private |
Seed finder.
Definition at line 521 of file Cluster3D_module.cc.
|
private |
Skeleton point finder.
Definition at line 520 of file Cluster3D_module.cc.
|
private |
Keeps track of total execution time.
Definition at line 496 of file Cluster3D_module.cc.
|
private |
Special instance name for vertex points.
Definition at line 505 of file Cluster3D_module.cc.