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

ClearLongitudinalTracksTool class. More...

#include <ClearLongitudinalTracksTool.h>

Inheritance diagram for lar_content::ClearLongitudinalTracksTool:
lar_content::LongitudinalTensorTool

Public Member Functions

 ClearLongitudinalTracksTool ()
 Default constructor. More...
 
bool Run (ThreeViewLongitudinalTracksAlgorithm *const pAlgorithm, TensorType &overlapTensor)
 Run the algorithm tool. More...
 

Private Member Functions

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

Private Attributes

float m_minMatchedFraction
 The min matched sampling point fraction for particle creation. More...
 

Additional Inherited Members

- Public Types inherited from lar_content::LongitudinalTensorTool
typedef ThreeViewLongitudinalTracksAlgorithm::MatchingType::TensorType TensorType
 
typedef std::vector< TensorType::ElementList::const_iteratorIteratorList
 

Detailed Description

ClearLongitudinalTracksTool class.

Definition at line 19 of file ClearLongitudinalTracksTool.h.

Constructor & Destructor Documentation

lar_content::ClearLongitudinalTracksTool::ClearLongitudinalTracksTool ( )

Default constructor.

Definition at line 18 of file ClearLongitudinalTracksTool.cc.

19 {
20 }
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.

Member Function Documentation

void lar_content::ClearLongitudinalTracksTool::CreateThreeDParticles ( ThreeViewLongitudinalTracksAlgorithm *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 40 of file ClearLongitudinalTracksTool.cc.

42 {
43  ProtoParticleVector protoParticleVector;
44 
45  for (TensorType::ElementList::const_iterator iter = elementList.begin(), iterEnd = elementList.end(); iter != iterEnd; ++iter)
46  {
47  if (iter->GetOverlapResult().GetMatchedFraction() < m_minMatchedFraction)
48  continue;
49 
50  ProtoParticle protoParticle;
51  protoParticle.m_clusterList.push_back(iter->GetClusterU());
52  protoParticle.m_clusterList.push_back(iter->GetClusterV());
53  protoParticle.m_clusterList.push_back(iter->GetClusterW());
54  protoParticleVector.push_back(protoParticle);
55  }
56 
57  particlesMade |= pAlgorithm->CreateThreeDParticles(protoParticleVector);
58 }
std::vector< ProtoParticle > ProtoParticleVector
intermediate_table::const_iterator const_iterator
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
StatusCode lar_content::ClearLongitudinalTracksTool::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
private

Definition at line 62 of file ClearLongitudinalTracksTool.cc.

63 {
64  PANDORA_RETURN_RESULT_IF_AND_IF(
65  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MinMatchedFraction", m_minMatchedFraction));
66 
67  return STATUS_CODE_SUCCESS;
68 }
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
bool lar_content::ClearLongitudinalTracksTool::Run ( ThreeViewLongitudinalTracksAlgorithm *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::LongitudinalTensorTool.

Definition at line 24 of file ClearLongitudinalTracksTool.cc.

25 {
26  if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
27  std::cout << "----> Running Algorithm Tool: " << this->GetInstanceName() << ", " << this->GetType() << std::endl;
28 
29  bool particlesMade(false);
30 
31  TensorType::ElementList elementList;
32  overlapTensor.GetUnambiguousElements(true, elementList);
33  this->CreateThreeDParticles(pAlgorithm, elementList, particlesMade);
34 
35  return particlesMade;
36 }
void CreateThreeDParticles(ThreeViewLongitudinalTracksAlgorithm *const pAlgorithm, const TensorType::ElementList &elementList, bool &particlesMade) const
Create three dimensional particles for a given tensor element list.
QTextStream & endl(QTextStream &s)

Member Data Documentation

float lar_content::ClearLongitudinalTracksTool::m_minMatchedFraction
private

The min matched sampling point fraction for particle creation.

Definition at line 42 of file ClearLongitudinalTracksTool.h.


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