Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
HitAngleVertexSelectionAlgorithm.cc
Go to the documentation of this file.
1
9
11
13
15
16using namespace pandora;
17
18namespace lar_content
19{
20
24
25//------------------------------------------------------------------------------------------------------------------------------------------
26
28 HitKDTree2D &kdTreeU, HitKDTree2D &kdTreeV, HitKDTree2D &kdTreeW, VertexScoreList &vertexScoreList) const
29{
30 const KDTreeMap kdTreeMap{{TPC_VIEW_U, kdTreeU}, {TPC_VIEW_V, kdTreeV}, {TPC_VIEW_W, kdTreeW}};
31
32 float bestFastScore(0.f);
33 for (const Vertex *const pVertex : vertexVector)
34 {
35 const float beamDeweightingScore(this->IsBeamModeOn() ? std::exp(this->GetBeamDeweightingScore(beamConstants, pVertex)) : 1.f);
36
37 const float rPhiScore(LArMvaHelper::CalculateFeaturesOfType<RPhiFeatureTool>(m_featureToolVector, this, pVertex,
38 SlidingFitDataListMap(), ClusterListMap(), kdTreeMap, ShowerClusterListMap(), beamDeweightingScore, bestFastScore)
39 .at(0)
40 .Get());
41
42 vertexScoreList.emplace_back(pVertex, beamDeweightingScore * rPhiScore);
43 }
44}
45
46//------------------------------------------------------------------------------------------------------------------------------------------
47//------------------------------------------------------------------------------------------------------------------------------------------
48
50{
51 AlgorithmToolVector algorithmToolVector;
52 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ProcessAlgorithmToolList(*this, xmlHandle, "FeatureTools", algorithmToolVector));
53
54 for (AlgorithmTool *const pAlgorithmTool : algorithmToolVector)
56
58}
59
60} // namespace lar_content
Grouping of header files for many classes of use in particle flow algorithms.
Header file for the hit angle vertex selection algorithm class.
Header file for the r/phi feature tool class.
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
Definition StatusCodes.h:19
void GetVertexScoreList(const pandora::VertexVector &vertexVector, const BeamConstants &beamConstants, HitKDTree2D &kdTreeU, HitKDTree2D &kdTreeV, HitKDTree2D &kdTreeW, VertexScoreList &vertexScoreList) const
Get the vertex score list for a provided list of candidate vertices.
VertexFeatureTool::FeatureToolVector m_featureToolVector
The feature tool map.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
static pandora::StatusCode AddFeatureToolToVector(pandora::AlgorithmTool *const pFeatureTool, MvaFeatureToolVector< Ts... > &featureToolVector)
Add a feature tool to a vector of feature tools.
std::map< pandora::HitType, const SlidingFitDataList > SlidingFitDataListMap
Map of sliding fit data lists for passing to tools.
std::map< pandora::HitType, const pandora::ClusterList & > ClusterListMap
Map array of cluster lists for passing to tools.
std::map< pandora::HitType, const std::reference_wrapper< HitKDTree2D > > KDTreeMap
Map array of hit kd trees for passing to tools.
float GetBeamDeweightingScore(const BeamConstants &beamConstants, const pandora::Vertex *const pVertex) const
Get the beam deweighting score for a vertex.
std::map< pandora::HitType, const ShowerClusterList > ShowerClusterListMap
Map of shower cluster lists for passing to tools.
bool IsBeamModeOn() const
Whether algorithm is running in beam mode, assuming neutrinos travel in positive z-direction.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
AlgorithmTool class. Algorithm tools will tend to be tailored for specific parent algorithms,...
Vertex class.
Definition Vertex.h:26
static StatusCode ProcessAlgorithmToolList(const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &listName, AlgorithmToolVector &algorithmToolVector)
Process a list of algorithms tools in an xml file.
Definition XmlHelper.cc:101
std::vector< AlgorithmTool * > AlgorithmToolVector
StatusCode
The StatusCode enum.
std::vector< const Vertex * > VertexVector