23 m_minClusterCaloHits(12),
24 m_slidingFitWindow(100),
26 m_asymmetryConstant(3.f)
47 float bestFastScore(0.f);
48 for (
const Vertex *
const pVertex : vertexVector)
52 const float energyKick(LArMvaHelper::CalculateFeaturesOfType<EnergyKickFeatureTool>(
m_featureToolVector,
this, pVertex,
57 const float energyAsymmetry(LArMvaHelper::CalculateFeaturesOfType<LocalAsymmetryFeatureTool>(
m_featureToolVector,
this, pVertex,
62 const float energyKickScore(-energyKick /
m_epsilon);
65 vertexScoreList.push_back(
VertexScore(pVertex, beamDeweightingScore + energyKickScore + energyAsymmetryScore));
77 for (
AlgorithmTool *
const pAlgorithmTool : algorithmToolVector)
95 std::cout <<
"EnergyKickVertexSelection: Invalid parameter(s), Epsilon " <<
m_epsilon <<
", AsymmetryConstant "
97 return STATUS_CODE_INVALID_PARAMETER;
Header file for the energy kick vertex selection algorithm class.
#define PANDORA_RETURN_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
EnergyKickVertexSelectionAlgorithm()
Default constructor.
unsigned int m_minClusterCaloHits
The min number of hits parameter in the energy score.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
float m_epsilon
The epsilon parameter in the energy score.
unsigned int m_slidingFitWindow
The layer window for the sliding linear fits.
float m_asymmetryConstant
The asymmetry constant parameter in the energy score.
VertexFeatureTool::FeatureToolVector m_featureToolVector
The feature tool map.
pandora::StringVector m_inputClusterListNames
The list of cluster list names.
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.
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::vector< VertexScore > VertexScoreList
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.
void GetClusterLists(const pandora::StringVector &inputClusterListNames, pandora::ClusterList &clusterListU, pandora::ClusterList &clusterListV, pandora::ClusterList &clusterListW) const
Get the cluster lists.
void CalculateClusterSlidingFits(const pandora::ClusterList &inputClusterList, const unsigned int minClusterCaloHits, const unsigned int slidingFitWindow, SlidingFitDataList &slidingFitDataList) const
Calculate the cluster sliding fits.
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.
std::vector< SlidingFitData > SlidingFitDataList
static StatusCode ReadVectorOfValues(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, std::vector< T > &vector)
Read a vector of values from a (space separated) list in an xml element.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
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.
MANAGED_CONTAINER< const Cluster * > ClusterList
std::vector< AlgorithmTool * > AlgorithmToolVector
StatusCode
The StatusCode enum.
std::vector< const Vertex * > VertexVector