LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_content::ClearLongitudinalTracksTool Class Reference

ClearLongitudinalTracksTool class. More...

#include "ClearLongitudinalTracksTool.h"

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

Public Types

typedef ThreeViewLongitudinalTracksAlgorithm::MatchingType::TensorType TensorType
 
typedef std::vector< TensorType::ElementList::const_iteratorIteratorList
 

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...
 

Detailed Description

Member Typedef Documentation

Constructor & Destructor Documentation

lar_content::ClearLongitudinalTracksTool::ClearLongitudinalTracksTool ( )

Default constructor.

Definition at line 18 of file ClearLongitudinalTracksTool.cc.

18  :
20 {
21 }
TFile f
Definition: plotHisto.C:6
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 41 of file ClearLongitudinalTracksTool.cc.

References lar_content::MatchingBaseAlgorithm::CreateThreeDParticles(), lar_content::ProtoParticle::m_clusterList, and m_minMatchedFraction.

Referenced by Run().

43 {
44  ProtoParticleVector protoParticleVector;
45 
46  for (TensorType::ElementList::const_iterator iter = elementList.begin(), iterEnd = elementList.end(); iter != iterEnd; ++iter)
47  {
48  if (iter->GetOverlapResult().GetMatchedFraction() < m_minMatchedFraction)
49  continue;
50 
51  ProtoParticle protoParticle;
52  protoParticle.m_clusterList.push_back(iter->GetClusterU());
53  protoParticle.m_clusterList.push_back(iter->GetClusterV());
54  protoParticle.m_clusterList.push_back(iter->GetClusterW());
55  protoParticleVector.push_back(protoParticle);
56  }
57 
58  particlesMade |= pAlgorithm->CreateThreeDParticles(protoParticleVector);
59 }
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 63 of file ClearLongitudinalTracksTool.cc.

References m_minMatchedFraction.

64 {
65  PANDORA_RETURN_RESULT_IF_AND_IF(
66  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MinMatchedFraction", m_minMatchedFraction));
67 
68  return STATUS_CODE_SUCCESS;
69 }
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 25 of file ClearLongitudinalTracksTool.cc.

References CreateThreeDParticles(), and lar_content::OverlapTensor< T >::GetUnambiguousElements().

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

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.

Referenced by CreateThreeDParticles(), and ReadSettings().


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