RPhiFeatureTool class. More...
#include <RPhiFeatureTool.h>
Classes | |
class | KernelEstimate |
Kernel estimate class. More... | |
Public Member Functions | |
RPhiFeatureTool () | |
Default constructor. More... | |
void | Run (LArMvaHelper::MvaFeatureVector &featureVector, const VertexSelectionBaseAlgorithm *const pAlgorithm, const pandora::Vertex *const pVertex, const VertexSelectionBaseAlgorithm::SlidingFitDataListMap &, const VertexSelectionBaseAlgorithm::ClusterListMap &, const VertexSelectionBaseAlgorithm::KDTreeMap &kdTreeMap, const VertexSelectionBaseAlgorithm::ShowerClusterListMap &, const float beamDeweightingScore, float &bestFastScore) |
Run the tool. More... | |
Public Member Functions inherited from lar_content::MvaFeatureTool< Ts > | |
MvaFeatureTool ()=default | |
Default constructor. More... | |
virtual void | Run (MvaTypes::MvaFeatureVector &featureVector, Ts...args)=0 |
Run the algorithm tool. More... | |
Private Member Functions | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
float | GetFastScore (const KernelEstimate &kernelEstimateU, const KernelEstimate &kernelEstimateV, const KernelEstimate &kernelEstimateW) const |
Get the score for a trio of kernel estimations, using fast histogram approach. More... | |
float | GetMidwayScore (const KernelEstimate &kernelEstimateU, const KernelEstimate &kernelEstimateV, const KernelEstimate &kernelEstimateW) const |
Get the score for a trio of kernel estimations, using kernel density estimation but with reduced (binned) sampling. More... | |
float | GetFullScore (const KernelEstimate &kernelEstimateU, const KernelEstimate &kernelEstimateV, const KernelEstimate &kernelEstimateW) const |
Get the score for a trio of kernel estimations, using kernel density estimation and full hit-by-hit sampling. More... | |
void | FillKernelEstimate (const pandora::Vertex *const pVertex, const pandora::HitType hitType, VertexSelectionBaseAlgorithm::HitKDTree2D &kdTree, KernelEstimate &kernelEstimate) const |
Use hits in clusters (in the provided kd tree) to fill a provided kernel estimate with hit-vertex relationship information. More... | |
bool | AcceptVertexLocation (const pandora::Vertex *const pVertex, const pandora::VertexList &selectedVertexList) const |
Whether to accept a candidate vertex, based on its spatial position in relation to other selected candidates. More... | |
float | atan2Fast (const float y, const float x) const |
Fast estimate of std::atan2 function. Rather coarse (max |error| > 0.01) but should suffice for this use-case. More... | |
Private Attributes | |
bool | m_fastScoreCheck |
Whether to use the fast histogram based score to selectively avoid calling full or midway scores. More... | |
bool | m_fastScoreOnly |
Whether to use the fast histogram based score only. More... | |
bool | m_fullScore |
Whether to use the full kernel density estimation score, as opposed to the midway score. More... | |
float | m_kernelEstimateSigma |
The Gaussian width to use for kernel estimation. More... | |
float | m_kappa |
Hit-deweighting offset, of form: weight = 1 / sqrt(distance + kappa), units cm. More... | |
float | m_maxHitVertexDisplacement1D |
Max hit-vertex displacement in any one dimension for contribution to kernel estimation. More... | |
float | m_minFastScoreFraction |
Fast score must be at least this fraction of best fast score to calculate full score. More... | |
unsigned int | m_fastHistogramNPhiBins |
Number of bins to use for fast score histograms. More... | |
float | m_fastHistogramPhiMin |
Min value for fast score histograms. More... | |
float | m_fastHistogramPhiMax |
Max value for fast score histograms. More... | |
bool | m_enableFolding |
Whether to enable folding of -pi -> +pi phi distribution into 0 -> +pi region only. More... | |
Additional Inherited Members | |
Public Types inherited from lar_content::MvaFeatureTool< Ts > | |
typedef std::vector< MvaFeatureTool< Ts... > * > | FeatureToolVector |
RPhiFeatureTool class.
Definition at line 21 of file RPhiFeatureTool.h.
lar_content::RPhiFeatureTool::RPhiFeatureTool | ( | ) |
Default constructor.
Definition at line 21 of file RPhiFeatureTool.cc.
|
private |
Whether to accept a candidate vertex, based on its spatial position in relation to other selected candidates.
pVertex | the address of the vertex |
selectedVertexList | the selected vertex list |
|
private |
Fast estimate of std::atan2 function. Rather coarse (max |error| > 0.01) but should suffice for this use-case.
y | the y coordinate |
x | the x coordinate |
Definition at line 198 of file RPhiFeatureTool.cc.
|
private |
Use hits in clusters (in the provided kd tree) to fill a provided kernel estimate with hit-vertex relationship information.
pVertex | the address of the vertex |
hitType | the relevant hit type |
kdTree | the relevant kd tree |
kernelEstimate | to receive the populated kernel estimate |
Definition at line 166 of file RPhiFeatureTool.cc.
|
private |
Get the score for a trio of kernel estimations, using fast histogram approach.
kernelEstimateU | the kernel estimate for the u view |
kernelEstimateV | the kernel estimate for the v view |
kernelEstimateW | the kernel estimate for the w view |
Definition at line 82 of file RPhiFeatureTool.cc.
|
private |
Get the score for a trio of kernel estimations, using kernel density estimation and full hit-by-hit sampling.
kernelEstimateU | the kernel estimate for the u view |
kernelEstimateV | the kernel estimate for the v view |
kernelEstimateW | the kernel estimate for the w view |
Definition at line 148 of file RPhiFeatureTool.cc.
|
private |
Get the score for a trio of kernel estimations, using kernel density estimation but with reduced (binned) sampling.
kernelEstimateU | the kernel estimate for the u view |
kernelEstimateV | the kernel estimate for the v view |
kernelEstimateW | the kernel estimate for the w view |
Definition at line 118 of file RPhiFeatureTool.cc.
|
private |
Definition at line 243 of file RPhiFeatureTool.cc.
void lar_content::RPhiFeatureTool::Run | ( | LArMvaHelper::MvaFeatureVector & | featureVector, |
const VertexSelectionBaseAlgorithm *const | pAlgorithm, | ||
const pandora::Vertex *const | pVertex, | ||
const VertexSelectionBaseAlgorithm::SlidingFitDataListMap & | , | ||
const VertexSelectionBaseAlgorithm::ClusterListMap & | , | ||
const VertexSelectionBaseAlgorithm::KDTreeMap & | kdTreeMap, | ||
const VertexSelectionBaseAlgorithm::ShowerClusterListMap & | , | ||
const float | beamDeweightingScore, | ||
float & | bestFastScore | ||
) |
Run the tool.
pAlgorithm | address of the calling algorithm |
pVertex | address of the vertex |
kdTreeMap | map of the hit kd trees |
beamDeweightingScore | the beam deweighting score for this vertex |
bestFastScore | the best fast score |
Definition at line 38 of file RPhiFeatureTool.cc.
|
private |
Whether to enable folding of -pi -> +pi phi distribution into 0 -> +pi region only.
Definition at line 178 of file RPhiFeatureTool.h.
|
private |
Number of bins to use for fast score histograms.
Definition at line 174 of file RPhiFeatureTool.h.
|
private |
Max value for fast score histograms.
Definition at line 176 of file RPhiFeatureTool.h.
|
private |
Min value for fast score histograms.
Definition at line 175 of file RPhiFeatureTool.h.
|
private |
Whether to use the fast histogram based score to selectively avoid calling full or midway scores.
Definition at line 165 of file RPhiFeatureTool.h.
|
private |
Whether to use the fast histogram based score only.
Definition at line 166 of file RPhiFeatureTool.h.
|
private |
Whether to use the full kernel density estimation score, as opposed to the midway score.
Definition at line 167 of file RPhiFeatureTool.h.
|
private |
Hit-deweighting offset, of form: weight = 1 / sqrt(distance + kappa), units cm.
Definition at line 170 of file RPhiFeatureTool.h.
|
private |
The Gaussian width to use for kernel estimation.
Definition at line 169 of file RPhiFeatureTool.h.
|
private |
Max hit-vertex displacement in any one dimension for contribution to kernel estimation.
Definition at line 171 of file RPhiFeatureTool.h.
|
private |
Fast score must be at least this fraction of best fast score to calculate full score.
Definition at line 173 of file RPhiFeatureTool.h.