LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_content::RPhiFeatureTool Class Referenceabstract

RPhiFeatureTool class. More...

#include "RPhiFeatureTool.h"

Inheritance diagram for lar_content::RPhiFeatureTool:
lar_content::MvaFeatureTool< Ts >

Classes

class  KernelEstimate
 Kernel estimate class. More...
 

Public Types

typedef std::vector< MvaFeatureTool< Ts... > * > FeatureToolVector
 
typedef std::map< std::string, MvaFeatureTool< Ts... > * > FeatureToolMap
 

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...
 
virtual void Run (MvaTypes::MvaFeatureVector &featureVector, Ts...args)=0
 Run the algorithm tool. More...
 
virtual void Run (MvaTypes::MvaFeatureMap &featureMap, pandora::StringVector &featureOrder, const std::string &featureToolName, Ts...)
 

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

Detailed Description

RPhiFeatureTool class.

Definition at line 21 of file RPhiFeatureTool.h.

Member Typedef Documentation

template<typename... Ts>
typedef std::map<std::string, MvaFeatureTool<Ts...> *> lar_content::MvaFeatureTool< Ts >::FeatureToolMap
inherited

Definition at line 37 of file LArMvaHelper.h.

template<typename... Ts>
typedef std::vector<MvaFeatureTool<Ts...> *> lar_content::MvaFeatureTool< Ts >::FeatureToolVector
inherited

Definition at line 36 of file LArMvaHelper.h.

Constructor & Destructor Documentation

lar_content::RPhiFeatureTool::RPhiFeatureTool ( )

Default constructor.

Definition at line 21 of file RPhiFeatureTool.cc.

21  :
22  m_fastScoreCheck(true),
23  m_fastScoreOnly(false),
24  m_fullScore(false),
26  m_kappa(0.42f),
30  m_fastHistogramPhiMin(-1.1f * M_PI),
31  m_fastHistogramPhiMax(+1.1f * M_PI),
32  m_enableFolding(true)
33 {
34 }
bool m_fastScoreCheck
Whether to use the fast histogram based score to selectively avoid calling full or midway scores...
unsigned int m_fastHistogramNPhiBins
Number of bins to use for fast score histograms.
float m_fastHistogramPhiMin
Min value for fast score histograms.
float m_kappa
Hit-deweighting offset, of form: weight = 1 / sqrt(distance + kappa), units cm.
bool m_fastScoreOnly
Whether to use the fast histogram based score only.
float m_minFastScoreFraction
Fast score must be at least this fraction of best fast score to calculate full score.
TFile f
Definition: plotHisto.C:6
float m_maxHitVertexDisplacement1D
Max hit-vertex displacement in any one dimension for contribution to kernel estimation.
float m_fastHistogramPhiMax
Max value for fast score histograms.
bool m_fullScore
Whether to use the full kernel density estimation score, as opposed to the midway score...
float m_kernelEstimateSigma
The Gaussian width to use for kernel estimation.
bool m_enableFolding
Whether to enable folding of -pi -> +pi phi distribution into 0 -> +pi region only.

Member Function Documentation

bool lar_content::RPhiFeatureTool::AcceptVertexLocation ( const pandora::Vertex *const  pVertex,
const pandora::VertexList &  selectedVertexList 
) const
private

Whether to accept a candidate vertex, based on its spatial position in relation to other selected candidates.

Parameters
pVertexthe address of the vertex
selectedVertexListthe selected vertex list
Returns
boolean
float lar_content::RPhiFeatureTool::atan2Fast ( const float  y,
const float  x 
) const
private

Fast estimate of std::atan2 function. Rather coarse (max |error| > 0.01) but should suffice for this use-case.

Parameters
ythe y coordinate
xthe x coordinate
Returns
estimate of std::atan2

Definition at line 198 of file RPhiFeatureTool.cc.

References f, and r.

Referenced by FillKernelEstimate().

199 {
200  const float ONE_QTR_PI(0.25f * M_PI);
201  const float THR_QTR_PI(0.75f * M_PI);
202 
203  const float abs_y(std::max(std::fabs(y), std::numeric_limits<float>::epsilon()));
204  const float abs_x(std::fabs(x));
205 
206  const float r((x < 0.f) ? (x + abs_y) / (abs_y + abs_x) : (abs_x - abs_y) / (abs_x + abs_y));
207  const float angle(((x < 0.f) ? THR_QTR_PI : ONE_QTR_PI) + (0.1963f * r * r - 0.9817f) * r);
208 
209  return ((y < 0.f) ? -angle : angle); // negate if in quad III or IV
210 }
Float_t x
Definition: compare.C:6
TRandom r
Definition: spectrum.C:23
Float_t y
Definition: compare.C:6
TFile f
Definition: plotHisto.C:6
void lar_content::RPhiFeatureTool::FillKernelEstimate ( const pandora::Vertex *const  pVertex,
const pandora::HitType  hitType,
VertexSelectionBaseAlgorithm::HitKDTree2D kdTree,
KernelEstimate kernelEstimate 
) const
private

Use hits in clusters (in the provided kd tree) to fill a provided kernel estimate with hit-vertex relationship information.

Parameters
pVertexthe address of the vertex
hitTypethe relevant hit type
kdTreethe relevant kd tree
kernelEstimateto receive the populated kernel estimate

Definition at line 166 of file RPhiFeatureTool.cc.

References lar_content::RPhiFeatureTool::KernelEstimate::AddContribution(), atan2Fast(), lar_content::build_2d_kd_search_region(), f, m_enableFolding, m_kappa, m_maxHitVertexDisplacement1D, lar_content::LArGeometryHelper::ProjectPosition(), lar_content::KDTreeLinkerAlgo< DATA, DIM >::search(), and weight.

Referenced by Run().

168 {
169  const CartesianVector vertexPosition2D(LArGeometryHelper::ProjectPosition(this->GetPandora(), pVertex->GetPosition(), hitType));
171 
173  kdTree.search(searchRegionHits, found);
174 
175  for (const auto &hit : found)
176  {
177  const CartesianVector displacement(hit.data->GetPositionVector() - vertexPosition2D);
178  const float magnitude(displacement.GetMagnitude());
179 
180  if (magnitude < std::numeric_limits<float>::epsilon())
181  continue;
182 
183  float phi(this->atan2Fast(displacement.GetZ(), displacement.GetX()));
184  float weight(1.f / (std::sqrt(magnitude + std::fabs(m_kappa))));
185 
186  if (m_enableFolding && (phi < 0.f))
187  {
188  phi += M_PI;
189  weight *= -1.f;
190  }
191 
192  kernelEstimate.AddContribution(phi, weight);
193  }
194 }
static pandora::CartesianVector ProjectPosition(const pandora::Pandora &pandora, const pandora::CartesianVector &position3D, const pandora::HitType view)
Project 3D position into a given 2D view.
float m_kappa
Hit-deweighting offset, of form: weight = 1 / sqrt(distance + kappa), units cm.
TFile f
Definition: plotHisto.C:6
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 ...
float m_maxHitVertexDisplacement1D
Max hit-vertex displacement in any one dimension for contribution to kernel estimation.
bool m_enableFolding
Whether to enable folding of -pi -> +pi phi distribution into 0 -> +pi region only.
Detector simulation of raw signals on wires.
double weight
Definition: plottest35.C:25
KDTreeBox build_2d_kd_search_region(const pandora::CaloHit *const point, const float x_span, const float z_span)
build_2d_kd_search_region
KDTreeBoxT< 2 > KDTreeBox
float lar_content::RPhiFeatureTool::GetFastScore ( const KernelEstimate kernelEstimateU,
const KernelEstimate kernelEstimateV,
const KernelEstimate kernelEstimateW 
) const
private

Get the score for a trio of kernel estimations, using fast histogram approach.

Parameters
kernelEstimateUthe kernel estimate for the u view
kernelEstimateVthe kernel estimate for the v view
kernelEstimateWthe kernel estimate for the w view
Returns
the fast score

Definition at line 82 of file RPhiFeatureTool.cc.

References f, lar_content::RPhiFeatureTool::KernelEstimate::GetContributionList(), m_fastHistogramNPhiBins, m_fastHistogramPhiMax, and m_fastHistogramPhiMin.

Referenced by Run().

83 {
87 
88  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateU.GetContributionList())
89  histogramU.Fill(contribution.first, contribution.second);
90 
91  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateV.GetContributionList())
92  histogramV.Fill(contribution.first, contribution.second);
93 
94  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateW.GetContributionList())
95  histogramW.Fill(contribution.first, contribution.second);
96 
97  // Is the below correct?
98  histogramU.Scale(1.f / histogramU.GetCumulativeSum());
99  histogramV.Scale(1.f / histogramV.GetCumulativeSum());
100  histogramW.Scale(1.f / histogramW.GetCumulativeSum());
101 
102  // ATTN Need to renormalise histograms if ever want to directly compare fast and full scores
103  float figureOfMerit(0.f);
104 
105  for (int xBin = 0; xBin < histogramU.GetNBinsX(); ++xBin)
106  {
107  const float binContentU(histogramU.GetBinContent(xBin));
108  const float binContentV(histogramV.GetBinContent(xBin));
109  const float binContentW(histogramW.GetBinContent(xBin));
110  figureOfMerit += binContentU * binContentU + binContentV * binContentV + binContentW * binContentW;
111  }
112 
113  return figureOfMerit;
114 }
unsigned int m_fastHistogramNPhiBins
Number of bins to use for fast score histograms.
float m_fastHistogramPhiMin
Min value for fast score histograms.
TFile f
Definition: plotHisto.C:6
float m_fastHistogramPhiMax
Max value for fast score histograms.
float lar_content::RPhiFeatureTool::GetFullScore ( const KernelEstimate kernelEstimateU,
const KernelEstimate kernelEstimateV,
const KernelEstimate kernelEstimateW 
) const
private

Get the score for a trio of kernel estimations, using kernel density estimation and full hit-by-hit sampling.

Parameters
kernelEstimateUthe kernel estimate for the u view
kernelEstimateVthe kernel estimate for the v view
kernelEstimateWthe kernel estimate for the w view
Returns
the full score

Definition at line 148 of file RPhiFeatureTool.cc.

References f, lar_content::RPhiFeatureTool::KernelEstimate::GetContributionList(), and lar_content::RPhiFeatureTool::KernelEstimate::Sample().

Referenced by Run().

149 {
150  float figureOfMerit(0.f);
151 
152  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateU.GetContributionList())
153  figureOfMerit += contribution.second * kernelEstimateU.Sample(contribution.first);
154 
155  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateV.GetContributionList())
156  figureOfMerit += contribution.second * kernelEstimateV.Sample(contribution.first);
157 
158  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateW.GetContributionList())
159  figureOfMerit += contribution.second * kernelEstimateW.Sample(contribution.first);
160 
161  return figureOfMerit;
162 }
TFile f
Definition: plotHisto.C:6
float lar_content::RPhiFeatureTool::GetMidwayScore ( const KernelEstimate kernelEstimateU,
const KernelEstimate kernelEstimateV,
const KernelEstimate kernelEstimateW 
) const
private

Get the score for a trio of kernel estimations, using kernel density estimation but with reduced (binned) sampling.

Parameters
kernelEstimateUthe kernel estimate for the u view
kernelEstimateVthe kernel estimate for the v view
kernelEstimateWthe kernel estimate for the w view
Returns
the midway score

Definition at line 118 of file RPhiFeatureTool.cc.

References f, lar_content::RPhiFeatureTool::KernelEstimate::GetContributionList(), m_fastHistogramNPhiBins, m_fastHistogramPhiMax, m_fastHistogramPhiMin, and lar_content::RPhiFeatureTool::KernelEstimate::Sample().

Referenced by Run().

119 {
123 
124  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateU.GetContributionList())
125  histogramU.Fill(contribution.first, contribution.second);
126 
127  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateV.GetContributionList())
128  histogramV.Fill(contribution.first, contribution.second);
129 
130  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateW.GetContributionList())
131  histogramW.Fill(contribution.first, contribution.second);
132 
133  float figureOfMerit(0.f);
134 
135  for (int xBin = 0; xBin < histogramU.GetNBinsX(); ++xBin)
136  {
137  const float binCenter(histogramU.GetXLow() + (static_cast<float>(xBin) + 0.5f) * histogramU.GetXBinWidth());
138  figureOfMerit += histogramU.GetBinContent(xBin) * kernelEstimateU.Sample(binCenter);
139  figureOfMerit += histogramV.GetBinContent(xBin) * kernelEstimateV.Sample(binCenter);
140  figureOfMerit += histogramW.GetBinContent(xBin) * kernelEstimateW.Sample(binCenter);
141  }
142 
143  return figureOfMerit;
144 }
unsigned int m_fastHistogramNPhiBins
Number of bins to use for fast score histograms.
float m_fastHistogramPhiMin
Min value for fast score histograms.
TFile f
Definition: plotHisto.C:6
float m_fastHistogramPhiMax
Max value for fast score histograms.
StatusCode lar_content::RPhiFeatureTool::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
private

Definition at line 243 of file RPhiFeatureTool.cc.

References m_enableFolding, m_fastHistogramNPhiBins, m_fastHistogramPhiMax, m_fastHistogramPhiMin, m_fastScoreCheck, m_fastScoreOnly, m_fullScore, m_kappa, m_kernelEstimateSigma, m_maxHitVertexDisplacement1D, and m_minFastScoreFraction.

244 {
245  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "FastScoreCheck", m_fastScoreCheck));
246 
247  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "FastScoreOnly", m_fastScoreOnly));
248 
249  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "FullScore", m_fullScore));
250 
251  PANDORA_RETURN_RESULT_IF_AND_IF(
252  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "KernelEstimateSigma", m_kernelEstimateSigma));
253 
254  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "Kappa", m_kappa));
255 
256  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
257  XmlHelper::ReadValue(xmlHandle, "MaxHitVertexDisplacement1D", m_maxHitVertexDisplacement1D));
258 
259  PANDORA_RETURN_RESULT_IF_AND_IF(
260  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MinFastScoreFraction", m_minFastScoreFraction));
261 
262  PANDORA_RETURN_RESULT_IF_AND_IF(
263  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "FastHistogramNPhiBins", m_fastHistogramNPhiBins));
264 
265  PANDORA_RETURN_RESULT_IF_AND_IF(
266  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "FastHistogramPhiMin", m_fastHistogramPhiMin));
267 
268  PANDORA_RETURN_RESULT_IF_AND_IF(
269  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "FastHistogramPhiMax", m_fastHistogramPhiMax));
270 
271  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "EnableFolding", m_enableFolding));
272 
273  return STATUS_CODE_SUCCESS;
274 }
bool m_fastScoreCheck
Whether to use the fast histogram based score to selectively avoid calling full or midway scores...
unsigned int m_fastHistogramNPhiBins
Number of bins to use for fast score histograms.
float m_fastHistogramPhiMin
Min value for fast score histograms.
float m_kappa
Hit-deweighting offset, of form: weight = 1 / sqrt(distance + kappa), units cm.
bool m_fastScoreOnly
Whether to use the fast histogram based score only.
float m_minFastScoreFraction
Fast score must be at least this fraction of best fast score to calculate full score.
float m_maxHitVertexDisplacement1D
Max hit-vertex displacement in any one dimension for contribution to kernel estimation.
float m_fastHistogramPhiMax
Max value for fast score histograms.
bool m_fullScore
Whether to use the full kernel density estimation score, as opposed to the midway score...
float m_kernelEstimateSigma
The Gaussian width to use for kernel estimation.
bool m_enableFolding
Whether to enable folding of -pi -> +pi phi distribution into 0 -> +pi region only.
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.

Parameters
pAlgorithmaddress of the calling algorithm
pVertexaddress of the vertex
kdTreeMapmap of the hit kd trees
beamDeweightingScorethe beam deweighting score for this vertex
bestFastScorethe best fast score
Returns
the r/phi feature

Definition at line 38 of file RPhiFeatureTool.cc.

References FillKernelEstimate(), GetFastScore(), GetFullScore(), GetMidwayScore(), m_fastScoreCheck, m_fastScoreOnly, m_fullScore, m_kernelEstimateSigma, and m_minFastScoreFraction.

42 {
43  if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
44  std::cout << "----> Running Algorithm Tool: " << this->GetInstanceName() << ", " << this->GetType() << std::endl;
45 
46  KernelEstimate kernelEstimateU(m_kernelEstimateSigma);
47  KernelEstimate kernelEstimateV(m_kernelEstimateSigma);
48  KernelEstimate kernelEstimateW(m_kernelEstimateSigma);
49 
50  this->FillKernelEstimate(pVertex, TPC_VIEW_U, kdTreeMap.at(TPC_VIEW_U), kernelEstimateU);
51  this->FillKernelEstimate(pVertex, TPC_VIEW_V, kdTreeMap.at(TPC_VIEW_V), kernelEstimateV);
52  this->FillKernelEstimate(pVertex, TPC_VIEW_W, kdTreeMap.at(TPC_VIEW_W), kernelEstimateW);
53 
54  const float expBeamDeweightingScore = std::exp(beamDeweightingScore);
55 
57  {
58  const float fastScore(this->GetFastScore(kernelEstimateU, kernelEstimateV, kernelEstimateW));
59 
60  if (m_fastScoreOnly)
61  {
62  featureVector.push_back(fastScore);
63  return;
64  }
65 
66  if (expBeamDeweightingScore * fastScore < m_minFastScoreFraction * bestFastScore)
67  {
68  featureVector.push_back(0.);
69  return;
70  }
71 
72  if (expBeamDeweightingScore * fastScore > bestFastScore)
73  bestFastScore = expBeamDeweightingScore * fastScore;
74  }
75 
76  featureVector.push_back(m_fullScore ? this->GetFullScore(kernelEstimateU, kernelEstimateV, kernelEstimateW)
77  : this->GetMidwayScore(kernelEstimateU, kernelEstimateV, kernelEstimateW));
78 }
bool m_fastScoreCheck
Whether to use the fast histogram based score to selectively avoid calling full or midway scores...
bool m_fastScoreOnly
Whether to use the fast histogram based score only.
float m_minFastScoreFraction
Fast score must be at least this fraction of best fast score to calculate full score.
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.
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 s...
bool m_fullScore
Whether to use the full kernel density estimation score, as opposed to the midway score...
float m_kernelEstimateSigma
The Gaussian width to use for kernel estimation.
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 (bin...
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 rel...
template<typename... Ts>
virtual void lar_content::MvaFeatureTool< Ts >::Run ( MvaTypes::MvaFeatureVector featureVector,
Ts...  args 
)
pure virtualinherited

Run the algorithm tool.

Parameters
featureVectorthe vector of features to append
argsarguments to pass to the tool
template<typename... Ts>
virtual void lar_content::MvaFeatureTool< Ts >::Run ( MvaTypes::MvaFeatureMap featureMap,
pandora::StringVector &  featureOrder,
const std::string &  featureToolName,
Ts...   
)
inlinevirtualinherited

Definition at line 51 of file LArMvaHelper.h.

52  {
53  (void)featureMap;
54  (void)featureOrder;
55  (void)featureToolName;
56  return;
57  };

Member Data Documentation

bool lar_content::RPhiFeatureTool::m_enableFolding
private

Whether to enable folding of -pi -> +pi phi distribution into 0 -> +pi region only.

Definition at line 178 of file RPhiFeatureTool.h.

Referenced by FillKernelEstimate(), and ReadSettings().

unsigned int lar_content::RPhiFeatureTool::m_fastHistogramNPhiBins
private

Number of bins to use for fast score histograms.

Definition at line 174 of file RPhiFeatureTool.h.

Referenced by GetFastScore(), GetMidwayScore(), and ReadSettings().

float lar_content::RPhiFeatureTool::m_fastHistogramPhiMax
private

Max value for fast score histograms.

Definition at line 176 of file RPhiFeatureTool.h.

Referenced by GetFastScore(), GetMidwayScore(), and ReadSettings().

float lar_content::RPhiFeatureTool::m_fastHistogramPhiMin
private

Min value for fast score histograms.

Definition at line 175 of file RPhiFeatureTool.h.

Referenced by GetFastScore(), GetMidwayScore(), and ReadSettings().

bool lar_content::RPhiFeatureTool::m_fastScoreCheck
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.

Referenced by ReadSettings(), and Run().

bool lar_content::RPhiFeatureTool::m_fastScoreOnly
private

Whether to use the fast histogram based score only.

Definition at line 166 of file RPhiFeatureTool.h.

Referenced by ReadSettings(), and Run().

bool lar_content::RPhiFeatureTool::m_fullScore
private

Whether to use the full kernel density estimation score, as opposed to the midway score.

Definition at line 167 of file RPhiFeatureTool.h.

Referenced by ReadSettings(), and Run().

float lar_content::RPhiFeatureTool::m_kappa
private

Hit-deweighting offset, of form: weight = 1 / sqrt(distance + kappa), units cm.

Definition at line 170 of file RPhiFeatureTool.h.

Referenced by FillKernelEstimate(), and ReadSettings().

float lar_content::RPhiFeatureTool::m_kernelEstimateSigma
private

The Gaussian width to use for kernel estimation.

Definition at line 169 of file RPhiFeatureTool.h.

Referenced by ReadSettings(), and Run().

float lar_content::RPhiFeatureTool::m_maxHitVertexDisplacement1D
private

Max hit-vertex displacement in any one dimension for contribution to kernel estimation.

Definition at line 171 of file RPhiFeatureTool.h.

Referenced by FillKernelEstimate(), and ReadSettings().

float lar_content::RPhiFeatureTool::m_minFastScoreFraction
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.

Referenced by ReadSettings(), and Run().


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