8 #ifndef LAR_PFO_HELPER_H 9 #define LAR_PFO_HELPER_H 1 11 #include "Objects/Cluster.h" 12 #include "Objects/ParticleFlowObject.h" 13 #include "Objects/Vertex.h" 33 static void GetCoordinateVector(
const pandora::ParticleFlowObject *
const pPfo,
const pandora::HitType &hitType,
34 pandora::CartesianPointVector &coordinateVector);
43 static void GetCaloHits(
const pandora::PfoList &pfoList,
const pandora::HitType &hitType, pandora::CaloHitList &caloHitList);
52 static void GetCaloHits(
const pandora::ParticleFlowObject *
const pPfo,
const pandora::HitType &hitType, pandora::CaloHitList &caloHitList);
61 static void GetIsolatedCaloHits(
const pandora::PfoList &pfoList,
const pandora::HitType &hitType, pandora::CaloHitList &caloHitList);
70 static void GetIsolatedCaloHits(
const pandora::ParticleFlowObject *
const pPfo,
const pandora::HitType &hitType, pandora::CaloHitList &caloHitList);
79 static void GetClusters(
const pandora::PfoList &pfoList,
const pandora::HitType &hitType, pandora::ClusterList &clusterList);
88 static void GetClusters(
const pandora::ParticleFlowObject *
const pPfo,
const pandora::HitType &hitType, pandora::ClusterList &clusterList);
96 static void GetTwoDClusterList(
const pandora::ParticleFlowObject *
const pPfo, pandora::ClusterList &clusterList);
104 static void GetThreeDClusterList(
const pandora::ParticleFlowObject *
const pPfo, pandora::ClusterList &clusterList);
112 static void GetAllConnectedPfos(
const pandora::PfoList &inputPfoList, pandora::PfoList &outputPfoList);
120 static void GetAllConnectedPfos(
const pandora::ParticleFlowObject *
const pPfo, pandora::PfoList &outputPfoList);
128 static void GetAllDownstreamPfos(
const pandora::PfoList &inputPfoList, pandora::PfoList &outputPfoList);
136 static void GetAllDownstreamPfos(
const pandora::ParticleFlowObject *
const pPfo, pandora::PfoList &outputPfoList);
162 static float GetClosestDistance(
const pandora::ParticleFlowObject *
const pPfo,
const pandora::Cluster *
const pCluster);
170 static float GetTwoDSeparation(
const pandora::ParticleFlowObject *
const pPfo1,
const pandora::ParticleFlowObject *
const pPfo2);
178 static float GetThreeDSeparation(
const pandora::ParticleFlowObject *
const pPfo1,
const pandora::ParticleFlowObject *
const pPfo2);
185 static bool IsTwoD(
const pandora::ParticleFlowObject *
const pPfo);
192 static bool IsThreeD(
const pandora::ParticleFlowObject *
const pPfo);
199 static bool IsTrack(
const pandora::ParticleFlowObject *
const pPfo);
206 static bool IsShower(
const pandora::ParticleFlowObject *
const pPfo);
224 static bool IsFinalState(
const pandora::ParticleFlowObject *
const pPfo);
242 static bool IsNeutrino(
const pandora::ParticleFlowObject *
const pPfo);
251 static bool IsTestBeam(
const pandora::ParticleFlowObject *
const pPfo);
259 static void GetRecoNeutrinos(
const pandora::PfoList *
const pPfoList, pandora::PfoList &recoNeutrinos);
268 static const pandora::ParticleFlowObject *
GetParentPfo(
const pandora::ParticleFlowObject *
const pPfo);
277 static const pandora::ParticleFlowObject *
GetParentNeutrino(
const pandora::ParticleFlowObject *
const pPfo);
286 static const pandora::Vertex *
GetVertex(
const pandora::ParticleFlowObject *
const pPfo);
298 static void GetSlidingFitTrajectory(
const pandora::CartesianPointVector &pointVector,
const pandora::CartesianVector &vertexPosition,
310 static void GetSlidingFitTrajectory(
const pandora::ParticleFlowObject *
const pPfo,
const pandora::Vertex *
const pVertex,
311 const unsigned int slidingFitHalfWindow,
const float layerPitch,
LArTrackStateVector &trackStateVector);
343 static bool SortByNHits(
const pandora::ParticleFlowObject *
const pLhs,
const pandora::ParticleFlowObject *
const pRhs);
356 template <
typename T>
357 static void SlidingFitTrajectoryImpl(
const T *
const pT,
const pandora::CartesianVector &vertexPosition,
const unsigned int layerWindow,
363 #endif // #ifndef LAR_PFO_HELPER_H static LArShowerPCA GetPrincipalComponents(const pandora::CartesianPointVector &pointVector, const pandora::CartesianVector &vertexPosition)
Perform PCA analysis on a set of 3D points and return results.
static float GetThreeDSeparation(const pandora::ParticleFlowObject *const pPfo1, const pandora::ParticleFlowObject *const pPfo2)
Get distance between two Pfos using 3D clusters.
static bool IsThreeD(const pandora::ParticleFlowObject *const pPfo)
Does Pfo contain 3D clusters.
static bool SortByNHits(const pandora::ParticleFlowObject *const pLhs, const pandora::ParticleFlowObject *const pRhs)
Sort pfos by number of constituent hits.
static void GetClusters(const pandora::PfoList &pfoList, const pandora::HitType &hitType, pandora::ClusterList &clusterList)
Get a list of clusters of a particular hit type from a list of pfos.
static void GetRecoNeutrinos(const pandora::PfoList *const pPfoList, pandora::PfoList &recoNeutrinos)
Get neutrino pfos from an input pfo list.
static void GetTwoDClusterList(const pandora::ParticleFlowObject *const pPfo, pandora::ClusterList &clusterList)
Get the list of 2D clusters from an input pfo.
Header file for lar pfo objects.
static float GetThreeDLengthSquared(const pandora::ParticleFlowObject *const pPfo)
Calculate length of Pfo using 3D clusters.
static float GetClosestDistance(const pandora::ParticleFlowObject *const pPfo, const pandora::Cluster *const pCluster)
Get closest distance between Pfo and cluster.
static const pandora::Vertex * GetVertex(const pandora::ParticleFlowObject *const pPfo)
Get the pfo vertex.
static void GetSlidingFitTrajectory(const pandora::CartesianPointVector &pointVector, const pandora::CartesianVector &vertexPosition, const unsigned int layerWindow, const float layerPitch, LArTrackStateVector &trackStateVector, pandora::IntVector *const pIndexVector=nullptr)
Apply 3D sliding fit to a set of 3D points and return track trajectory.
static bool IsTwoD(const pandora::ParticleFlowObject *const pPfo)
Does Pfo contain 2D clusters.
std::vector< int > IntVector
static bool IsTrack(const pandora::ParticleFlowObject *const pPfo)
Return track flag based on Pfo Particle ID.
static float GetTwoDLengthSquared(const pandora::ParticleFlowObject *const pPfo)
Calculate length of Pfo using 2D clusters.
static void SlidingFitTrajectoryImpl(const T *const pT, const pandora::CartesianVector &vertexPosition, const unsigned int layerWindow, const float layerPitch, LArTrackStateVector &trackStateVector, pandora::IntVector *const pIndexVector=nullptr)
Implementation of sliding fit trajectory extraction.
static bool IsShower(const pandora::ParticleFlowObject *const pPfo)
Return shower flag based on Pfo Particle ID.
static bool IsTestBeam(const pandora::ParticleFlowObject *const pPfo)
Whether a pfo is a test beam particle.
static int GetPrimaryNeutrino(const pandora::ParticleFlowObject *const pPfo)
Get primary neutrino or antineutrino.
static const pandora::ParticleFlowObject * GetParentPfo(const pandora::ParticleFlowObject *const pPfo)
Get the primary parent pfo.
static void GetCoordinateVector(const pandora::ParticleFlowObject *const pPfo, const pandora::HitType &hitType, pandora::CartesianPointVector &coordinateVector)
Get a list of coordinates of a particular hit type from an input pfos.
static const pandora::ParticleFlowObject * GetParentNeutrino(const pandora::ParticleFlowObject *const pPfo)
Get primary neutrino or antineutrino.
static bool IsNeutrino(const pandora::ParticleFlowObject *const pPfo)
Whether a pfo is a neutrino or (antineutrino)
static void GetThreeDClusterList(const pandora::ParticleFlowObject *const pPfo, pandora::ClusterList &clusterList)
Get the list of 3D clusters from an input pfo.
static bool SortByHitProjection(const LArTrackTrajectoryPoint &lhs, const LArTrackTrajectoryPoint &rhs)
Sort pfos by number of constituent hits.
static bool IsFinalState(const pandora::ParticleFlowObject *const pPfo)
Whether a pfo is a primary parent particle.
static void GetIsolatedCaloHits(const pandora::PfoList &pfoList, const pandora::HitType &hitType, pandora::CaloHitList &caloHitList)
Get a list of isolated calo hits of a particular hit type from a list of pfos.
static void GetAllDownstreamPfos(const pandora::PfoList &inputPfoList, pandora::PfoList &outputPfoList)
Get a flat list of all pfos, recursively, of all daughters associated with those pfos in an input lis...
static float GetTwoDSeparation(const pandora::ParticleFlowObject *const pPfo1, const pandora::ParticleFlowObject *const pPfo2)
Get distance between two Pfos using 2D clusters.
static bool IsNeutrinoFinalState(const pandora::ParticleFlowObject *const pPfo)
Whether a pfo is a final-state particle from a neutrino (or antineutrino) interaction.
std::vector< LArTrackState > LArTrackStateVector
LArTrackTrajectoryPoint class.
static void GetAllConnectedPfos(const pandora::PfoList &inputPfoList, pandora::PfoList &outputPfoList)
Get a flat list of all pfos, recursively including all daughters and parents associated with those pf...
static void GetCaloHits(const pandora::PfoList &pfoList, const pandora::HitType &hitType, pandora::CaloHitList &caloHitList)
Get a list of calo hits of a particular hit type from a list of pfos.