LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
lar_content::ClearRemnantsTool Class Reference

ClearRemnantsTool class. More...

#include "ClearRemnantsTool.h"

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

Public Types

typedef ThreeDRemnantsAlgorithm::TensorType TensorType
 
typedef std::vector< TensorType::ElementList::const_iteratorIteratorList
 

Public Member Functions

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

Private Member Functions

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

Detailed Description

ClearRemnantsTool class.

Definition at line 19 of file ClearRemnantsTool.h.

Member Typedef Documentation

Member Function Documentation

void lar_content::ClearRemnantsTool::CreateThreeDParticles ( ThreeDRemnantsAlgorithm *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.

References lar_content::ThreeDBaseAlgorithm< T >::CreateThreeDParticles(), lar_content::ProtoParticle::m_clusterListU, lar_content::ProtoParticle::m_clusterListV, and lar_content::ProtoParticle::m_clusterListW.

36 {
37  ProtoParticleVector protoParticleVector;
38 
39  for (TensorType::ElementList::const_iterator iter = elementList.begin(), iterEnd = elementList.end(); iter != iterEnd; ++iter)
40  {
41  ProtoParticle protoParticle;
42  protoParticle.m_clusterListU.push_back(iter->GetClusterU());
43  protoParticle.m_clusterListV.push_back(iter->GetClusterV());
44  protoParticle.m_clusterListW.push_back(iter->GetClusterW());
45  protoParticleVector.push_back(protoParticle);
46  }
47 
48  particlesMade |= pAlgorithm->CreateThreeDParticles(protoParticleVector);
49 }
std::vector< ProtoParticle > ProtoParticleVector
intermediate_table::const_iterator const_iterator
StatusCode lar_content::ClearRemnantsTool::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
private

Definition at line 53 of file ClearRemnantsTool.cc.

54 {
55  return STATUS_CODE_SUCCESS;
56 }
bool lar_content::ClearRemnantsTool::Run ( ThreeDRemnantsAlgorithm *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.

References lar_content::OverlapTensor< T >::GetUnambiguousElements().

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 }
std::vector< Element > ElementList
void CreateThreeDParticles(ThreeDRemnantsAlgorithm *const pAlgorithm, const TensorType::ElementList &elementList, bool &particlesMade) const
Create three dimensional particles for a given tensor element list.

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