8 #ifndef LAR_DL_NEUTRINO_HIERARCHY_ALGORITHM_H 9 #define LAR_DL_NEUTRINO_HIERARCHY_ALGORITHM_H 1 11 #include "Pandora/Algorithm.h" 45 typedef std::map<const pandora::ParticleFlowObject *, const pandora::MCParticle *>
PfoToMCParticleMap;
46 typedef std::map<const pandora::ParticleFlowObject *, std::pair<const pandora::ParticleFlowObject *, int>>
ChildToParentPfoMap;
49 pandora::StatusCode Run();
58 bool GetNeutrinoPfo(
const pandora::ParticleFlowObject *&pNeutrinoPfo)
const;
81 bool GetExtremalVerticesAndDirections(
const pandora::ParticleFlowObject *
const pNeutrinoPfo,
const pandora::ParticleFlowObject *
const pPfo,
94 bool GetShowerDirection(
95 const pandora::ParticleFlowObject *
const pPfo,
const pandora::CartesianVector &
vertex, pandora::CartesianVector &direction)
const;
115 float GetPrimaryScore(
131 void UpdateHierarchy(
const pandora::ParticleFlowObject *
const pNeutrinoPfo,
const bool buildPrimaryTier,
const bool usePrimaryScore,
132 const float trackThreshold,
const float showerThreshold,
const bool isLowerThreshold,
HierarchyPfoVector &trackPfos,
155 float GetLaterTierScore(
const pandora::ParticleFlowObject *
const pNeutrinoPfo,
const HierarchyPfo &parentPfo,
const HierarchyPfo &childPfo)
const;
164 void BuildPandoraHierarchy(
const pandora::ParticleFlowObject *
const pNeutrinoPfo,
const HierarchyPfoVector &trackPfos,
178 bool ShouldTrainOnEvent(
const pandora::ParticleFlowObject *
const pNeutrinoPfo)
const;
188 std::map<const pandora::ParticleFlowObject *, int> &particleIDMap)
const;
201 std::pair<float, float> GetTrainingCuts(
const HierarchyPfo &parentHierarchyPfo,
const HierarchyPfo &childHierarchyPfo,
202 const bool trueParentOrientation,
const bool trueChildOrientation)
const;
215 const int nPrimaryShowerLinks,
const int nLaterTierTrackTrackLinks,
const int nLaterTierTrackShowerLinks)
const;
229 void FillPrimaryTrees(
const PfoToMCParticleMap &matchingMap,
const ChildToParentPfoMap &childToParentPfoMap,
231 const std::map<const pandora::ParticleFlowObject *, int> &particleIDMap,
int &nPrimaryTrackLinks,
int &nPrimaryShowerLinks)
const;
246 void FillPrimaryTree(
const std::string &treeName,
const bool isTrainingLink,
const bool isTrueLink,
const bool isOrientationCorrect,
247 const int trueVisibleGen,
const int truePDG,
const int trueParentID,
const int particleID,
262 void FillLaterTierTrees(
const PfoToMCParticleMap &matchingMap,
const ChildToParentPfoMap &childToParentPfoMap,
264 const std::map<const pandora::ParticleFlowObject *, int> &particleIDMap,
int &nTrackLinks,
int &nShowerLinks)
const;
279 void FillLaterTierTree(
const std::string &treeName,
const bool isTrainingLink,
const bool isTrueLink,
const bool isOrientationCorrect,
280 const int childTrueGen,
const std::pair<float, float> &trainingCuts,
const int parentID,
const int childID,
283 pandora::StatusCode ReadSettings(
const pandora::TiXmlHandle xmlHandle);
317 #endif // #ifndef LAR_DL_NEUTRINO_HIERARCHY_ALGORITHM_H float m_primaryThresholdTrackPass2
The threshold applied to tracks in pass 2 primary tier building.
float m_primaryThresholdShowerPass2
The threshold applied to showers in pass 2 primary tier building.
Header file for the pfo helper class.
float m_laterTierThresholdTrackPass2
The threshold applied to track-track links in pass 2 later tier building.
std::string m_primaryTrackTreeName
the name of the output primary track link tree
DLNeutrinoHierarchyAlgorithm class.
int m_eventID
the event counter
pandora::StringVector m_pfoListNames
the name of the pfo lists
std::string m_primaryShowerTreeName
the name of the output primary shower link tree
float m_primaryThresholdTrackPass1
The threshold applied to tracks in pass 1 primary tier building.
std::string m_mcParticleListName
the name of the MCParticle list
Header file for the HierarchyPfo class.
std::string m_laterTierTrackTrackTreeName
the name of the output track-track later tier link tree
std::map< const pandora::ParticleFlowObject *, std::pair< const pandora::ParticleFlowObject *, int > > ChildToParentPfoMap
std::vector< HierarchyPfo > HierarchyPfoVector
DLCheatHierarchyTool to calculate variables related to the initial shower region. ...
std::string m_neutrinoPfoListName
the name of the neutrino pfo list
std::string m_laterTierTrackShowerTreeName
the name of the output track-shower later tier link tree
std::string m_trainingFileName
the name of the output training file
DLLaterTierHierarchyTool to apply the later-tier hierarchy DL networks.
bool m_trainingMode
whether to run in training mode
Header file for the lar three dimensional sliding fit result class.
float m_primaryRegion
the radius of the nu vertex region where particles are assumed to be primaries
float m_primaryThresholdShowerPass1
The threshold applied to showers in pass 1 primary tier building.
std::vector< pandora::PfoVector > Hierarchy
ThreeDSlidingFitResult class.
int m_slidingFitWindow
the sliding fit window to use in pfo sliding linear fits
DLLaterTierHierarchyTool * m_laterTierHierarchyTool
The tool used to build the later tiers.
float m_regionForDirFit
the radius of the region used in shower direction fits
float m_laterTierThresholdTrackPass1
The threshold applied to track-track links in pass 1 later tier building.
DLPrimaryHierarchyTool * m_primaryHierarchyTool
The tool used to build the primary tiers.
std::string m_eventTreeName
the name of the output event tree
unsigned int m_minClusterSize
the minimum threshold of 3D hits of a considered pfo
DLPrimaryHierarchyTool to apply the primary hierarchy DL networks.
float m_laterTierThresholdShowerPass2
The threshold applied to track-shower links in pass 2 later tier building.
DLCheatHierarchyTool * m_cheatHierarchyTool
The tool used to obtain the true hierarchy.
int m_nAngularBins
the number of angle bins used by the shower direction fitter
std::map< const pandora::ParticleFlowObject *, const pandora::MCParticle * > PfoToMCParticleMap
float m_trainingVertexAccuracy
the maximum true-reco nu vertex displacement allowed for training
float m_laterTierThresholdShowerPass1
The threshold applied to track-shower links in pass 1 later tier building.