Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ClearRemnantsTool.cc
Go to the documentation of this file.
1
10
12
13using namespace pandora;
14
15namespace lar_content
16{
17
18bool ClearRemnantsTool::Run(ThreeViewRemnantsAlgorithm *const pAlgorithm, TensorType &overlapTensor)
19{
21 std::cout << "----> Running Algorithm Tool: " << this->GetInstanceName() << ", " << this->GetType() << std::endl;
22
23 bool particlesMade(false);
24
25 TensorType::ElementList elementList;
26 overlapTensor.GetUnambiguousElements(true, elementList);
27 this->CreateThreeDParticles(pAlgorithm, elementList, particlesMade);
28
29 return particlesMade;
30}
31
32//------------------------------------------------------------------------------------------------------------------------------------------
33
34void ClearRemnantsTool::CreateThreeDParticles(ThreeViewRemnantsAlgorithm *const pAlgorithm, const TensorType::ElementList &elementList, bool &particlesMade) const
35{
36 ProtoParticleVector protoParticleVector;
37
38 for (TensorType::ElementList::const_iterator iter = elementList.begin(), iterEnd = elementList.end(); iter != iterEnd; ++iter)
39 {
40 ProtoParticle protoParticle;
41 protoParticle.m_clusterList.push_back(iter->GetClusterU());
42 protoParticle.m_clusterList.push_back(iter->GetClusterV());
43 protoParticle.m_clusterList.push_back(iter->GetClusterW());
44 protoParticleVector.push_back(protoParticle);
45 }
46
47 particlesMade |= pAlgorithm->CreateThreeDParticles(protoParticleVector);
48}
49
50//------------------------------------------------------------------------------------------------------------------------------------------
51
53{
54 return STATUS_CODE_SUCCESS;
55}
56
57} // namespace lar_content
Grouping of header files for many classes of use in particle flow algorithms.
Header file for the clear remnants tool class.
static const pandora::PandoraSettings * GetSettings(const pandora::Algorithm &algorithm)
Get the pandora settings instance.
void CreateThreeDParticles(ThreeViewRemnantsAlgorithm *const pAlgorithm, const TensorType::ElementList &elementList, bool &particlesMade) const
Create three dimensional particles for a given tensor element list.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
bool Run(ThreeViewRemnantsAlgorithm *const pAlgorithm, TensorType &overlapTensor)
Run the algorithm tool.
virtual bool CreateThreeDParticles(const ProtoParticleVector &protoParticleVector)
Create particles using findings from recent algorithm processing.
ThreeViewRemnantsAlgorithm::MatchingType::TensorType TensorType
bool ShouldDisplayAlgorithmInfo() const
Whether to display algorithm information during processing.
const std::string & GetType() const
Get the type.
Definition Process.h:102
const std::string & GetInstanceName() const
Get the instance name.
Definition Process.h:109
std::vector< ProtoParticle > ProtoParticleVector
pandora::ClusterList m_clusterList
List of 2D clusters in a 3D proto particle.
StatusCode
The StatusCode enum.