Public Member Functions | Private Member Functions | List of all members
lar_content::ClearRemnantsTool Class Reference

ClearRemnantsTool class. More...

#include <ClearRemnantsTool.h>

Inheritance diagram for lar_content::ClearRemnantsTool:
lar_content::RemnantTensorTool

Public Member Functions

bool Run (ThreeViewRemnantsAlgorithm *const pAlgorithm, TensorType &overlapTensor)
 Run the algorithm tool. More...
 

Private Member Functions

pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 
void CreateThreeDParticles (ThreeViewRemnantsAlgorithm *const pAlgorithm, const TensorType::ElementList &elementList, bool &particlesMade) const
 Create three dimensional particles for a given tensor element list. More...
 

Additional Inherited Members

- Public Types inherited from lar_content::RemnantTensorTool
typedef ThreeViewRemnantsAlgorithm::MatchingType::TensorType TensorType
 
typedef std::vector< TensorType::ElementList::const_iteratorIteratorList
 

Detailed Description

ClearRemnantsTool class.

Definition at line 19 of file ClearRemnantsTool.h.

Member Function Documentation

void lar_content::ClearRemnantsTool::CreateThreeDParticles ( ThreeViewRemnantsAlgorithm *const  pAlgorithm,
const TensorType::ElementList elementList,
bool particlesMade 
) const
private

Create three dimensional particles for a given tensor element list.

Parameters
pAlgorithmaddress of the calling algorithm (ultimately responsible for the particles)
elementListthe tensor element list
particlesMadereceive boolean indicating whether particles have been made

Definition at line 34 of file ClearRemnantsTool.cc.

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 }
std::vector< ProtoParticle > ProtoParticleVector
intermediate_table::const_iterator const_iterator
StatusCode lar_content::ClearRemnantsTool::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
private

Definition at line 52 of file ClearRemnantsTool.cc.

53 {
54  return STATUS_CODE_SUCCESS;
55 }
bool lar_content::ClearRemnantsTool::Run ( ThreeViewRemnantsAlgorithm *const  pAlgorithm,
TensorType overlapTensor 
)
virtual

Run the algorithm tool.

Parameters
pAlgorithmaddress of the calling algorithm
overlapTensorthe overlap tensor
Returns
whether changes have been made by the tool

Implements lar_content::RemnantTensorTool.

Definition at line 18 of file ClearRemnantsTool.cc.

19 {
20  if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
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 }
void CreateThreeDParticles(ThreeViewRemnantsAlgorithm *const pAlgorithm, const TensorType::ElementList &elementList, bool &particlesMade) const
Create three dimensional particles for a given tensor element list.
std::vector< Element > ElementList
QTextStream & endl(QTextStream &s)

The documentation for this class was generated from the following files: