SimpleShowersTool class.
More...
#include <SimpleShowersTool.h>
lar_content::SimpleShowersTool::SimpleShowersTool |
( |
| ) |
|
Default constructor.
Definition at line 18 of file SimpleShowersTool.cc.
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
unsigned int m_minMatchedSamplingPoints
The min number of matched sampling points for particle creation.
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
Find best shower match as a simple way to (try to) resolve ambiguities in the tensor.
- Parameters
-
overlapTensor | the overlap tensor |
protoParticleVector | to receive the list of proto particles |
Definition at line 38 of file SimpleShowersTool.cc.
41 overlapTensor.GetSortedKeyClusters(sortedKeyClusters);
43 for (
const Cluster *
const pKeyCluster : sortedKeyClusters)
45 if (!pKeyCluster->IsAvailable())
48 unsigned int nU(0), nV(0), nW(0);
50 overlapTensor.GetConnectedElements(pKeyCluster,
true, elementList, nU, nV, nW);
52 if (elementList.empty())
55 TensorType::Element bestElement(elementList.back());
57 if (!bestElement.GetOverlapResult().IsInitialized())
60 if ((NULL == bestElement.GetClusterU()) || (NULL == bestElement.GetClusterV()) || (NULL == bestElement.GetClusterW()))
63 ProtoParticle protoParticle;
64 protoParticle.m_clusterList.push_back(bestElement.GetClusterU());
65 protoParticle.m_clusterList.push_back(bestElement.GetClusterV());
66 protoParticle.m_clusterList.push_back(bestElement.GetClusterW());
67 protoParticleVector.push_back(protoParticle);
std::vector< Element > ElementList
std::vector< art::Ptr< recob::Cluster > > ClusterVector
Whether a provided (iterator to a) tensor element passes the selection cuts for particle creation.
- Parameters
-
eIter | the iterator to the tensor element |
Definition at line 75 of file SimpleShowersTool.cc.
83 const XOverlap &xOverlap(eIter->GetOverlapResult().GetXOverlap());
85 if ((xOverlap.GetXSpanU() > std::numeric_limits<float>::epsilon()) && (xOverlap.GetXOverlapSpan() / xOverlap.GetXSpanU() >
m_minXOverlapFraction) &&
86 (xOverlap.GetXSpanV() > std::numeric_limits<float>::epsilon()) && (xOverlap.GetXOverlapSpan() / xOverlap.GetXSpanV() >
m_minXOverlapFraction) &&
87 (xOverlap.GetXSpanW() > std::numeric_limits<float>::epsilon()) && (xOverlap.GetXOverlapSpan() / xOverlap.GetXSpanW() >
m_minXOverlapFraction))
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
unsigned int m_minMatchedSamplingPoints
The min number of matched sampling points for particle creation.
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
StatusCode lar_content::SimpleShowersTool::ReadSettings |
( |
const pandora::TiXmlHandle |
xmlHandle | ) |
|
|
private |
Definition at line 97 of file SimpleShowersTool.cc.
99 PANDORA_RETURN_RESULT_IF_AND_IF(
100 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinMatchedFraction",
m_minMatchedFraction));
102 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
105 PANDORA_RETURN_RESULT_IF_AND_IF(
106 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinXOverlapFraction",
m_minXOverlapFraction));
108 return STATUS_CODE_SUCCESS;
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
unsigned int m_minMatchedSamplingPoints
The min number of matched sampling points for particle creation.
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
Run the algorithm tool.
- Parameters
-
pAlgorithm | address of the calling algorithm |
overlapTensor | the overlap tensor |
- Returns
- whether changes have been made by the tool
Implements lar_content::ShowerTensorTool.
Definition at line 24 of file SimpleShowersTool.cc.
26 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
27 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() <<
std::endl;
32 const bool particlesMade(pAlgorithm->CreateThreeDParticles(protoParticleVector));
std::vector< ProtoParticle > ProtoParticleVector
void FindBestShower(const TensorType &overlapTensor, ProtoParticleVector &protoParticleVector) const
Find best shower match as a simple way to (try to) resolve ambiguities in the tensor.
QTextStream & endl(QTextStream &s)
float lar_content::SimpleShowersTool::m_minMatchedFraction |
|
private |
The min matched sampling point fraction for particle creation.
Definition at line 47 of file SimpleShowersTool.h.
unsigned int lar_content::SimpleShowersTool::m_minMatchedSamplingPoints |
|
private |
The min number of matched sampling points for particle creation.
Definition at line 48 of file SimpleShowersTool.h.
float lar_content::SimpleShowersTool::m_minXOverlapFraction |
|
private |
The min x overlap fraction (in each view) for particle creation.
Definition at line 49 of file SimpleShowersTool.h.
The documentation for this class was generated from the following files: