8 #ifndef LAR_DL_PRIMARY_HIERARCHY_TOOL_H 9 #define LAR_DL_PRIMARY_HIERARCHY_TOOL_H 1 11 #include "Pandora/PandoraInternal.h" 58 float m_nSpacepointsMin = 0.f;
59 float m_nSpacepointsMax = 2000.f;
60 float m_nuSeparationMin = -50.f;
61 float m_nuSeparationMax = 500.f;
62 float m_vertexRegionNHitsMin = -10.f;
63 float m_vertexRegionNHitsMax = 100.f;
64 float m_vertexRegionNParticlesMin = -1.f;
65 float m_vertexRegionNParticlesMax = 8.f;
66 float m_dcaMin = -60.f;
67 float m_dcaMax = 600.f;
68 float m_connectionExtrapDistanceMin = -700.f;
69 float m_connectionExtrapDistanceMax = 500.f;
70 float m_parentConnectionDistanceMin = -150.f;
71 float m_parentConnectionDistanceMax = 150.f;
72 float m_childConnectionDistanceMin = -30.f;
73 float m_childConnectionDistanceMax = 300.f;
76 pandora::StatusCode
Run(
const pandora::Algorithm *
const pAlgorithm,
const pandora::ParticleFlowObject *
const pNeutrinoPfo,
95 float &childConnectionDistance)
const;
98 pandora::StatusCode
ReadSettings(
const pandora::TiXmlHandle xmlHandle);
113 const pandora::ParticleFlowObject *
const pNeutrinoPfo,
const HierarchyPfoVector &trackPfos,
const bool useUpstream,
125 void SetVertexRegionParams(
const pandora::Algorithm *
const pAlgorithm,
const pandora::ParticleFlowObject *
const pPfo,
208 #endif // #ifndef LAR_DL_PRIMARY_HIERARCHY_TOOL_H pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
NormalisationLimits m_normLimits
struct of the normalisation limits
std::string m_primaryTrackBranchModelName
the name of the primary track edge model file
pandora::FloatVector ClassifyTrackEdge(const DLPrimaryNetworkParams &edgeParams, const DLPrimaryNetworkParams &otherEdgeParams)
Apply the primary track orientation edge network - determine whether an edge is signal (with correct ...
std::string m_primaryShowerClassifierModelName
the name of the primary shower classification model file
float m_extrapolationStepSize
the step size used to trace back a child particle's path
float ClassifyTrack(const DLPrimaryNetworkParams &edgeParamsUp, const DLPrimaryNetworkParams &edgeParamsDown)
Apply the primary track classification network.
Header file for the HierarchyPfo class.
std::string m_primaryTrackClassifierModelName
the name of the primary track classification model file
std::vector< HierarchyPfo > HierarchyPfoVector
torch::jit::script::Module TorchModel
bool m_trainingMode
whether to run the tool in training mode
DLBaseHierarchyTool to calculate variables related to the initial shower region.
DLPrimaryHierarchyTool()
Default constructor.
void NormaliseNetworkParams(DLPrimaryNetworkParams &primaryNetworkParams) const
Shift and normalise the primary network parameters.
float m_vertexRegionNHits
the number of 3D hits 'close to' the POI
float m_dca
the distance of closest approach from the POI to the nu vertex
void SetConnectionParams(const ExtremalPoint &particlePoint, const pandora::CartesianVector &nuVertex, DLPrimaryNetworkParams &primaryNetworkParams) const
Set the connection region DLPrimaryNetworkParams params (m_dca, m_connectionExtrapDistance) ...
Header file for the lar deep learning helper helper class.
float m_nSpacepoints
the number of 3D spacepoints
pandora::StatusCode Run(const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pNeutrinoPfo, const HierarchyPfoVector &trackPfos, const HierarchyPfo &hierarchyPfo, std::vector< DLPrimaryNetworkParams > &networkParamVector, float &primaryScore)
void SetContextParams(const pandora::ParticleFlowObject *const pPfo, const ExtremalPoint &particlePoint, const pandora::CartesianVector &nuVertex, const HierarchyPfoVector &trackPfos, DLPrimaryNetworkParams &primaryNetworkParams) const
Set the event context DLPrimaryNetworkParams params (m_parentConnectionDistance, m_childConnectionDis...
float m_nuSeparation
the sep. between the POI and the nu vertex
void AddCommonParamsToInput(int &insertIndex, LArDLHelper::TorchInput &modelInput) const
Add the orientation independent primary network parameters to the model input tensor.
float ClassifyShower(const DLPrimaryNetworkParams &primaryNetworkParams)
Apply the primary shower classification network.
float m_isPOIClosestToNu
whether the POI is that closest to the nu vertex
float m_connectionExtrapDistance
the sep. between the POI and the DCA point
void CalculateConnectionDistances(const ExtremalPoint &parentPoint, const ExtremalPoint &childPoint, float &parentConnectionDistance, float &childConnectionDistance) const
Calculate the variables describing the extension of a child particle to a given parent (m_parentConne...
float m_childConnectionDistance
the sep. between the POI and the extension point for m_parentConnectionDistance
void SetVertexRegionParams(const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pPfo, const pandora::CartesianVector &particleVertex, DLPrimaryNetworkParams &primaryNetworkParams) const
Set the vertex region DLPrimaryNetworkParams params (m_vertexRegionNHits, m_vertexRegionNParticles) ...
bool m_normalise
whether to normalise the network parameters
LArDLHelper::TorchModel m_primaryShowerClassifierModel
the primary shower classification model
float m_vertexRegionNParticles
the number of different particles 'close to' the POI
DLPrimaryHierarchyTool to apply the primary hierarchy DL networks.
LArDLHelper::TorchModel m_primaryTrackClassifierModel
the primary track classification model
float m_parentConnectionDistance
the DCA to the most likely parent pfo endpoint
LArDLHelper::TorchModel m_primaryTrackBranchModel
the primary track edge model
void AddOrientationParamsToInput(int &insertIndex, LArDLHelper::TorchInput &modelInput) const
Add the orientation dependent primary network parameters to the model input tensor.
pandora::StatusCode CalculateNetworkVariables(const pandora::Algorithm *const pAlgorithm, const HierarchyPfo &hierarchyPfo, const pandora::ParticleFlowObject *const pNeutrinoPfo, const HierarchyPfoVector &trackPfos, const bool useUpstream, DLPrimaryNetworkParams &primaryNetworkParams) const
Function to calculate the DLPrimaryNetworkParams.