TwoViewAmbiguousDeltaRayTool class.
More...
#include "TwoViewAmbiguousDeltaRayTool.h"
lar_content::TwoViewAmbiguousDeltaRayTool::TwoViewAmbiguousDeltaRayTool |
( |
| ) |
|
void lar_content::TwoViewAmbiguousDeltaRayTool::ExamineConnectedElements |
( |
MatrixType & |
overlapMatrix | ) |
const |
|
private |
Identify ambiguous matches (e.g. 3:2:1) and, if possible, create pfos out of the best 1:1:1 cluster match.
- Parameters
-
overlapMatrix | the overlap matrix |
Definition at line 39 of file TwoViewAmbiguousDeltaRayTool.cc.
References lar_content::OverlapMatrix< T >::GetConnectedElements(), and lar_content::OverlapMatrix< T >::GetSortedKeyClusters().
41 bool particleCreated(
false);
45 particleCreated =
false;
48 overlapMatrix.GetSortedKeyClusters(sortedKeyClusters);
50 ClusterSet usedKeyClusters;
52 for (
const Cluster *
const pKeyCluster : sortedKeyClusters)
54 if (usedKeyClusters.count(pKeyCluster))
58 overlapMatrix.GetConnectedElements(pKeyCluster,
true, elementList);
60 for (
const MatrixType::Element &element : elementList)
61 usedKeyClusters.insert(element.GetCluster1());
65 particleCreated =
true;
69 }
while (particleCreated);
std::vector< Element > ElementList
bool PickOutGoodMatches(const MatrixType::ElementList &elementList) const
Identify the best 1:1:1 match in a group of connected elements and from it create a pfo...
std::vector< art::Ptr< recob::Cluster > > ClusterVector
bool lar_content::TwoViewAmbiguousDeltaRayTool::PickOutGoodMatches |
( |
const MatrixType::ElementList & |
elementList | ) |
const |
|
private |
Identify the best 1:1:1 match in a group of connected elements and from it create a pfo.
- Parameters
-
elementList | the tensor element list |
- Returns
- whether any particles were created
Definition at line 74 of file TwoViewAmbiguousDeltaRayTool.cc.
76 unsigned int highestHitCount(0);
77 float bestChiSquared(std::numeric_limits<float>::max());
78 auto bestElementIter(elementList.end());
80 for (
auto iter = elementList.begin(); iter != elementList.end(); ++iter)
82 const MatrixType::Element &element(*iter);
83 const float chiSquared(element.GetOverlapResult().GetReducedChiSquared());
84 const Cluster *
const pCluster1(element.GetCluster1()), *
const pCluster2(element.GetCluster2());
85 const unsigned int hitSum(pCluster1->GetNCaloHits() + pCluster2->GetNCaloHits());
87 if ((hitSum > highestHitCount) || ((hitSum == highestHitCount) && (chiSquared < bestChiSquared)))
89 bestChiSquared = chiSquared;
90 highestHitCount = hitSum;
91 bestElementIter = iter;
95 if (bestElementIter != elementList.end())
TwoViewDeltaRayMatchingAlgorithm * m_pParentAlgorithm
Address of the parent matching algorithm.
bool CreatePfo(const MatrixType::Element &element)
Create delta ray pfos out of a given element, merging the third view clusters together and adding in ...
StatusCode lar_content::TwoViewAmbiguousDeltaRayTool::ReadSettings |
( |
const pandora::TiXmlHandle |
xmlHandle | ) |
|
|
private |
Run the algorithm tool.
- Parameters
-
pAlgorithm | address of the calling algorithm |
overlapTensor | the overlap tensor |
- Returns
- whether changes have been made by the tool
Implements lar_content::DeltaRayMatrixTool.
Definition at line 24 of file TwoViewAmbiguousDeltaRayTool.cc.
28 if (PandoraContentApi::GetSettings(*m_pParentAlgorithm)->ShouldDisplayAlgorithmInfo())
29 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() << std::endl;
void ExamineConnectedElements(MatrixType &overlapMatrix) const
Identify ambiguous matches (e.g. 3:2:1) and, if possible, create pfos out of the best 1:1:1 cluster m...
TwoViewDeltaRayMatchingAlgorithm * m_pParentAlgorithm
Address of the parent matching algorithm.
Address of the parent matching algorithm.
Definition at line 215 of file TwoViewDeltaRayMatchingAlgorithm.h.
Referenced by lar_content::TwoViewCosmicRayRemovalTool::CreateSeed(), lar_content::TwoViewCosmicRayRemovalTool::GrowSeed(), lar_content::TwoViewCosmicRayRemovalTool::IsBestElement(), lar_content::TwoViewCosmicRayRemovalTool::IsContaminated(), lar_content::TwoViewCosmicRayRemovalTool::IsMuonEndpoint(), lar_content::TwoViewCosmicRayRemovalTool::PassElementChecks(), lar_content::TwoViewCosmicRayRemovalTool::ProjectDeltaRayPositions(), lar_content::TwoViewCosmicRayRemovalTool::ReclusterRemnant(), lar_content::TwoViewCosmicRayRemovalTool::RemoveCosmicRayHits(), lar_content::TwoViewCosmicRayRemovalTool::Run(), and lar_content::TwoViewCosmicRayRemovalTool::SplitDeltaRayCluster().
The documentation for this class was generated from the following files: