MopUpRemnantsTool class.
More...
#include "MopUpRemnantsTool.h"
lar_content::MopUpRemnantsTool::MopUpRemnantsTool |
( |
| ) |
|
Identify candidate particles.
- Parameters
-
overlapTensor | the input overlap tensor |
protoParticleVector | the output vector of candidate particles |
clusterMergeMap | the output map of clusters to be merged |
Definition at line 38 of file MopUpRemnantsTool.cc.
References lar_content::OverlapTensor< T >::GetConnectedElements(), lar_content::OverlapTensor< T >::GetSortedKeyClusters(), and lar_content::ProtoParticle::m_clusterList.
40 ClusterSet usedClusters;
42 overlapTensor.GetSortedKeyClusters(sortedKeyClusters);
44 for (
const Cluster *
const pKeyCluster : sortedKeyClusters)
46 if (!pKeyCluster->IsAvailable())
50 overlapTensor.GetConnectedElements(pKeyCluster,
true, connectedElements);
56 if (connectedElements.end() == eIter)
59 ProtoParticle protoParticle;
60 protoParticle.m_clusterList.push_back(eIter->GetClusterU());
61 protoParticle.m_clusterList.push_back(eIter->GetClusterV());
62 protoParticle.m_clusterList.push_back(eIter->GetClusterW());
63 protoParticleVector.push_back(protoParticle);
void GetUsedClusters(const TensorType::ElementList &elementList, pandora::ClusterSet &usedClusters) const
Copy used clusters into cluster list.
std::vector< Element > ElementList
void SelectBestElement(const TensorType::ElementList &elementList, const pandora::ClusterSet &usedClusters, TensorType::ElementList::const_iterator &bestIter) const
Select the best triplet of clusters.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
void lar_content::MopUpRemnantsTool::GetUsedClusters |
( |
const TensorType::ElementList & |
elementList, |
|
|
pandora::ClusterSet & |
usedClusters |
|
) |
| const |
|
private |
Copy used clusters into cluster list.
- Parameters
-
elementList | the input list of elements |
usedClusters | to receive the list of used clusters |
Definition at line 69 of file MopUpRemnantsTool.cc.
73 usedClusters.insert(eIter->GetClusterU());
74 usedClusters.insert(eIter->GetClusterV());
75 usedClusters.insert(eIter->GetClusterW());
StatusCode lar_content::MopUpRemnantsTool::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::RemnantTensorTool.
Definition at line 24 of file MopUpRemnantsTool.cc.
References lar_content::MatchingBaseAlgorithm::CreateThreeDParticles().
26 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
27 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() << std::endl;
32 const bool particlesMade(pAlgorithm->CreateThreeDParticles(protoParticleVector));
std::vector< ProtoParticle > ProtoParticleVector
void FindBestShowers(const TensorType &overlapTensor, ProtoParticleVector &protoParticleVector) const
Identify candidate particles.
Select the best triplet of clusters.
- Parameters
-
elementList | the input list of elements |
usedClusters | the list of cluster analysed so far |
bestIter | iterator to the best element in the list |
Definition at line 81 of file MopUpRemnantsTool.cc.
References f.
84 float bestFigureOfMerit(0.
f);
88 const Cluster *
const pClusterU = eIter->GetClusterU();
89 const Cluster *
const pClusterV = eIter->GetClusterV();
90 const Cluster *
const pClusterW = eIter->GetClusterW();
92 if (usedClusters.count(pClusterU) || usedClusters.count(pClusterV) || usedClusters.count(pClusterW))
95 const float figureOfMerit(pClusterU->GetHadronicEnergy() + pClusterV->GetHadronicEnergy() + pClusterW->GetHadronicEnergy());
97 if (figureOfMerit > bestFigureOfMerit)
99 bestFigureOfMerit = figureOfMerit;
The documentation for this class was generated from the following files:
- larpandoracontent/v04_08_01/source/larpandoracontent/LArThreeDReco/LArShowerFragments/MopUpRemnantsTool.h
- larpandoracontent/v04_08_01/source/larpandoracontent/LArThreeDReco/LArShowerFragments/MopUpRemnantsTool.cc