TwoDShowerFitFeatureTool to calculate variables related to sliding shower fit.
More...
#include "TrackShowerIdFeatureTool.h"
|
| TwoDShowerFitFeatureTool () |
| Default constructor. More...
|
|
void | Run (LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster) |
|
void | Run (LArMvaHelper::MvaFeatureMap &featureMap, pandora::StringVector &featureOrder, const std::string &featureToolName, const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster) |
|
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...) |
|
|
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
|
float | CalculateShowerFitWidth (const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster) const |
| Calculation of the shower fit width variable. More...
|
|
TwoDShowerFitFeatureTool to calculate variables related to sliding shower fit.
Definition at line 26 of file TrackShowerIdFeatureTool.h.
lar_content::TwoDShowerFitFeatureTool::TwoDShowerFitFeatureTool |
( |
| ) |
|
Default constructor.
Definition at line 27 of file TrackShowerIdFeatureTool.cc.
unsigned int m_slidingShowerFitWindow
The sliding shower fit window.
unsigned int m_slidingLinearFitWindow
The sliding linear fit window.
float lar_content::TwoDShowerFitFeatureTool::CalculateShowerFitWidth |
( |
const pandora::Algorithm *const |
pAlgorithm, |
|
|
const pandora::Cluster *const |
pCluster |
|
) |
| const |
|
private |
Calculation of the shower fit width variable.
- Parameters
-
pAlgorithm | address of the calling algorithm |
pCluster | the cluster we are characterizing |
- Returns
- shower fit width
StatusCode lar_content::TwoDShowerFitFeatureTool::ReadSettings |
( |
const pandora::TiXmlHandle |
xmlHandle | ) |
|
|
private |
Definition at line 76 of file TrackShowerIdFeatureTool.cc.
References m_slidingLinearFitWindow, and m_slidingShowerFitWindow.
78 PANDORA_RETURN_RESULT_IF_AND_IF(
79 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"SlidingShowerFitWindow",
m_slidingShowerFitWindow));
81 PANDORA_RETURN_RESULT_IF_AND_IF(
82 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"SlidingLinearFitWindow",
m_slidingLinearFitWindow));
84 return STATUS_CODE_SUCCESS;
unsigned int m_slidingShowerFitWindow
The sliding shower fit window.
unsigned int m_slidingLinearFitWindow
The sliding linear fit window.
void lar_content::TwoDShowerFitFeatureTool::Run |
( |
LArMvaHelper::MvaFeatureVector & |
featureVector, |
|
|
const pandora::Algorithm *const |
pAlgorithm, |
|
|
const pandora::Cluster *const |
pCluster |
|
) |
| |
Definition at line 35 of file TrackShowerIdFeatureTool.cc.
References f, lar_content::TwoDSlidingFitResult::GetGlobalMaxLayerPosition(), lar_content::TwoDSlidingFitResult::GetGlobalMinLayerPosition(), lar_content::CutClusterCharacterisationAlgorithm::GetShowerFitWidth(), lar_content::LArGeometryHelper::GetWireZPitch(), m_slidingLinearFitWindow, and m_slidingShowerFitWindow.
37 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
38 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() << std::endl;
44 const float straightLineLength =
45 (slidingFitResultLarge.GetGlobalMaxLayerPosition() - slidingFitResultLarge.GetGlobalMinLayerPosition()).GetMagnitude();
46 if (straightLineLength > std::numeric_limits<float>::epsilon())
49 catch (
const StatusCodeException &)
53 featureVector.push_back(ratio);
unsigned int m_slidingShowerFitWindow
The sliding shower fit window.
static float GetWireZPitch(const pandora::Pandora &pandora, const float maxWirePitchDiscrepancy=0.01)
Return the wire pitch.
unsigned int m_slidingLinearFitWindow
The sliding linear fit window.
static float GetShowerFitWidth(const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster, const unsigned int showerFitWindow)
Get a measure of the width of a cluster, using a sliding shower fit result.
void lar_content::TwoDShowerFitFeatureTool::Run |
( |
LArMvaHelper::MvaFeatureMap & |
featureMap, |
|
|
pandora::StringVector & |
featureOrder, |
|
|
const std::string & |
featureToolName, |
|
|
const pandora::Algorithm *const |
pAlgorithm, |
|
|
const pandora::Cluster *const |
pCluster |
|
) |
| |
Run the algorithm tool.
- Parameters
-
featureVector | the vector of features to append |
args | arguments to pass to the tool |
unsigned int lar_content::TwoDShowerFitFeatureTool::m_slidingLinearFitWindow |
|
private |
unsigned int lar_content::TwoDShowerFitFeatureTool::m_slidingShowerFitWindow |
|
private |
The documentation for this class was generated from the following files: