LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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
 

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

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::vector<MvaFeatureTool<Ts...> *> lar_content::MvaFeatureTool< Ts >::FeatureToolVector
inherited

Definition at line 30 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 201 of file RPhiFeatureTool.cc.

References f, and max.

Referenced by FillKernelEstimate().

202 {
203  const float ONE_QTR_PI(0.25f * M_PI);
204  const float THR_QTR_PI(0.75f * M_PI);
205 
206  const float abs_y(std::max(std::fabs(y), std::numeric_limits<float>::epsilon()));
207  const float abs_x(std::fabs(x));
208 
209  const float r((x < 0.f) ? (x + abs_y) / (abs_y + abs_x) : (abs_x - abs_y) / (abs_x + abs_y));
210  const float angle(((x < 0.f) ? THR_QTR_PI : ONE_QTR_PI) + (0.1963f * r * r - 0.9817f) * r);
211 
212  return ((y < 0.f) ? -angle : angle); // negate if in quad III or IV
213 }
Float_t x
Definition: compare.C:6
Float_t y
Definition: compare.C:6
TFile f
Definition: plotHisto.C:6
Int_t max
Definition: plot.C:27
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 169 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().

171 {
172  const CartesianVector vertexPosition2D(LArGeometryHelper::ProjectPosition(this->GetPandora(), pVertex->GetPosition(), hitType));
174 
176  kdTree.search(searchRegionHits, found);
177 
178  for (const auto &hit : found)
179  {
180  const CartesianVector displacement(hit.data->GetPositionVector() - vertexPosition2D);
181  const float magnitude(displacement.GetMagnitude());
182 
183  if (magnitude < std::numeric_limits<float>::epsilon())
184  continue;
185 
186  float phi(this->atan2Fast(displacement.GetZ(), displacement.GetX()));
187  float weight(1.f / (std::sqrt(magnitude + std::fabs(m_kappa))));
188 
189  if (m_enableFolding && (phi < 0.f))
190  {
191  phi += M_PI;
192  weight *= -1.f;
193  }
194 
195  kernelEstimate.AddContribution(phi, weight);
196  }
197 }
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().

84 {
88 
89  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateU.GetContributionList())
90  histogramU.Fill(contribution.first, contribution.second);
91 
92  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateV.GetContributionList())
93  histogramV.Fill(contribution.first, contribution.second);
94 
95  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateW.GetContributionList())
96  histogramW.Fill(contribution.first, contribution.second);
97 
98  // Is the below correct?
99  histogramU.Scale(1.f/histogramU.GetCumulativeSum());
100  histogramV.Scale(1.f/histogramV.GetCumulativeSum());
101  histogramW.Scale(1.f/histogramW.GetCumulativeSum());
102 
103  // ATTN Need to renormalise histograms if ever want to directly compare fast and full scores
104  float figureOfMerit(0.f);
105 
106  for (int xBin = 0; xBin < histogramU.GetNBinsX(); ++xBin)
107  {
108  const float binContentU(histogramU.GetBinContent(xBin));
109  const float binContentV(histogramV.GetBinContent(xBin));
110  const float binContentW(histogramW.GetBinContent(xBin));
111  figureOfMerit += binContentU * binContentU + binContentV * binContentV + binContentW * binContentW;
112  }
113 
114  return figureOfMerit;
115 }
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 150 of file RPhiFeatureTool.cc.

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

Referenced by Run().

152 {
153  float figureOfMerit(0.f);
154 
155  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateU.GetContributionList())
156  figureOfMerit += contribution.second * kernelEstimateU.Sample(contribution.first);
157 
158  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateV.GetContributionList())
159  figureOfMerit += contribution.second * kernelEstimateV.Sample(contribution.first);
160 
161  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateW.GetContributionList())
162  figureOfMerit += contribution.second * kernelEstimateW.Sample(contribution.first);
163 
164  return figureOfMerit;
165 }
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 119 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().

121 {
125 
126  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateU.GetContributionList())
127  histogramU.Fill(contribution.first, contribution.second);
128 
129  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateV.GetContributionList())
130  histogramV.Fill(contribution.first, contribution.second);
131 
132  for (const KernelEstimate::ContributionList::value_type &contribution : kernelEstimateW.GetContributionList())
133  histogramW.Fill(contribution.first, contribution.second);
134 
135  float figureOfMerit(0.f);
136 
137  for (int xBin = 0; xBin < histogramU.GetNBinsX(); ++xBin)
138  {
139  const float binCenter(histogramU.GetXLow() + (static_cast<float>(xBin) + 0.5f) * histogramU.GetXBinWidth());
140  figureOfMerit += histogramU.GetBinContent(xBin) * kernelEstimateU.Sample(binCenter);
141  figureOfMerit += histogramV.GetBinContent(xBin) * kernelEstimateV.Sample(binCenter);
142  figureOfMerit += histogramW.GetBinContent(xBin) * kernelEstimateW.Sample(binCenter);
143  }
144 
145  return figureOfMerit;
146 }
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 246 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.

247 {
248  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
249  "FastScoreCheck", m_fastScoreCheck));
250 
251  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
252  "FastScoreOnly", m_fastScoreOnly));
253 
254  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
255  "FullScore", m_fullScore));
256 
257  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
258  "KernelEstimateSigma", m_kernelEstimateSigma));
259 
260  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
261  "Kappa", m_kappa));
262 
263  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
264  "MaxHitVertexDisplacement1D", m_maxHitVertexDisplacement1D));
265 
266  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
267  "MinFastScoreFraction", m_minFastScoreFraction));
268 
269  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
270  "FastHistogramNPhiBins", m_fastHistogramNPhiBins));
271 
272  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
273  "FastHistogramPhiMin", m_fastHistogramPhiMin));
274 
275  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
276  "FastHistogramPhiMax", m_fastHistogramPhiMax));
277 
278  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
279  "EnableFolding", m_enableFolding));
280 
281  return STATUS_CODE_SUCCESS;
282 }
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

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 177 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 173 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 175 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 174 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 164 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 165 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 166 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 169 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 168 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 170 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 172 of file RPhiFeatureTool.h.

Referenced by ReadSettings(), and Run().


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