9 #include "Pandora/AlgorithmHeaders.h" 
   24 CutPfoCharacterisationAlgorithm::CutPfoCharacterisationAlgorithm() :
 
   25     m_postBranchAddition(
false),
 
   26     m_slidingFitWindow(5),
 
   27     m_slidingShowerFitWindow(10),
 
   28     m_maxShowerLengthCut(80.f),
 
   29     m_dTdLWidthRatioCut(0.045f),
 
   30     m_vertexDistanceRatioCut(0.6f),
 
   31     m_showerWidthRatioCut(0.2f)
 
   39     float straightLineLength(-1.f);
 
   40     float dTdLMin(+std::numeric_limits<float>::max()), dTdLMax(-std::numeric_limits<float>::max());
 
   45         straightLineLength = (slidingFitResult.GetGlobalMaxLayerPosition() - slidingFitResult.GetGlobalMinLayerPosition()).GetMagnitude();
 
   47         for (
const auto &mapEntry : slidingFitResult.GetLayerFitResultMap())
 
   49             dTdLMin = std::min(dTdLMin, static_cast<float>(mapEntry.second.GetGradient()));
 
   50             dTdLMax = std::max(dTdLMax, static_cast<float>(mapEntry.second.GetGradient()));
 
   53     catch (
const StatusCodeException &)
 
   57     if (straightLineLength < std::numeric_limits<float>::epsilon())
 
   68     if ((vertexDistance > std::numeric_limits<float>::epsilon()) && ((vertexDistance / straightLineLength) > 
m_vertexDistanceRatioCut))
 
   73     if ((showerFitWidth < std::numeric_limits<float>::epsilon()) || ((showerFitWidth / straightLineLength) > 
m_showerWidthRatioCut))
 
   83     throw StatusCodeException(STATUS_CODE_NOT_ALLOWED);
 
   90     PANDORA_RETURN_RESULT_IF_AND_IF(
 
   91         STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, 
"PostBranchAddition", 
m_postBranchAddition));
 
  102     PANDORA_RETURN_RESULT_IF_AND_IF(
 
  103         STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, 
"SlidingFitWindow", 
m_slidingFitWindow));
 
  105     PANDORA_RETURN_RESULT_IF_AND_IF(
 
  106         STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, 
"SlidingShowerFitWindow", 
m_slidingShowerFitWindow));
 
  108     PANDORA_RETURN_RESULT_IF_AND_IF(
 
  109         STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, 
"MaxShowerLengthCut", 
m_maxShowerLengthCut));
 
  111     PANDORA_RETURN_RESULT_IF_AND_IF(
 
  112         STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, 
"DTDLWidthRatioCut", 
m_dTdLWidthRatioCut));
 
  114     PANDORA_RETURN_RESULT_IF_AND_IF(
 
  115         STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, 
"VertexDistanceRatioCut", 
m_vertexDistanceRatioCut));
 
  117     PANDORA_RETURN_RESULT_IF_AND_IF(
 
  118         STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, 
"ShowerWidthRatioCut", 
m_showerWidthRatioCut));
 
Header file for the pfo helper class. 
Header file for the cut based pfo characterisation algorithm class. 
Header file for the cut based cluster characterisation algorithm class. 
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
float m_dTdLWidthRatioCut
The maximum ratio of transverse fit gradient width to straight line length to qualify as a track...
unsigned int m_slidingShowerFitWindow
The layer window for the sliding shower fits. 
static float GetVertexDistance(const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster)
Get the distance between the interaction vertex (if present in the current vertex list) and a provide...
static float GetWireZPitch(const pandora::Pandora &pandora, const float maxWirePitchDiscrepancy=0.01)
Return the wire pitch. 
Header file for the geometry helper class. 
float m_showerWidthRatioCut
The maximum ratio of shower fit width to straight line length to qualify as a track. 
float m_vertexDistanceRatioCut
The maximum ratio of vertex separation to straight line length to qualify as a track. 
float m_maxShowerLengthCut
The maximum cluster length to qualify as a shower. 
Header file for the lar two dimensional sliding fit result class. 
bool IsClearTrack(const pandora::Cluster *const pCluster) const 
Whether cluster is identified as a clear track. 
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
required by fuzzyCluster table::sbnd_g4_services gaushitTruthMatch pandora
unsigned int m_slidingFitWindow
The layer window for the sliding linear fits. 
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. 
bool m_postBranchAddition
Whether to use configuration for shower clusters post branch addition. 
TwoDSlidingFitResult class.