LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 ThreeDLongitudinalTracksAlgorithm::TensorType TensorType
 
typedef std::vector< TensorType::ElementList::const_iteratorIteratorList
 

Public Member Functions

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

Private Member Functions

pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 
void CreateThreeDParticles (ThreeDLongitudinalTracksAlgorithm *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 ( ThreeDLongitudinalTracksAlgorithm *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::ThreeDBaseAlgorithm< T >::CreateThreeDParticles(), lar_content::ProtoParticle::m_clusterListU, lar_content::ProtoParticle::m_clusterListV, lar_content::ProtoParticle::m_clusterListW, 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_clusterListU.push_back(iter->GetClusterU());
53  protoParticle.m_clusterListV.push_back(iter->GetClusterV());
54  protoParticle.m_clusterListW.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(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
66  "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 ( ThreeDLongitudinalTracksAlgorithm *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(ThreeDLongitudinalTracksAlgorithm *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 41 of file ClearLongitudinalTracksTool.h.

Referenced by CreateThreeDParticles(), and ReadSettings().


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