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.
40 ClusterSet usedClusters;
42 overlapTensor.GetSortedKeyClusters(sortedKeyClusters);
44 for (
const Cluster *
const pKeyCluster : sortedKeyClusters)
46 if (!pKeyCluster->IsAvailable())
50 overlapTensor.GetConnectedElements(pKeyCluster,
true, connectedElements);
52 TensorType::ElementList::const_iterator eIter = connectedElements.end();
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.
71 for (TensorType::ElementList::const_iterator eIter = elementList.begin(); eIter != elementList.end(); ++eIter)
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.
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.
BEGIN_PROLOG could also be cout
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.
84 float bestFigureOfMerit(0.f);
86 for (TensorType::ElementList::const_iterator eIter = elementList.begin(); eIter != elementList.end(); ++eIter)
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: