8 #ifndef LAR_STITCHING_COSMIC_RAY_MERGING_TOOL_H 9 #define LAR_STITCHING_COSMIC_RAY_MERGING_TOOL_H 1 16 #include <unordered_map> 87 pandora::StatusCode
ReadSettings(
const pandora::TiXmlHandle xmlHandle);
109 typedef std::unordered_map<const pandora::LArTPC*, pandora::PfoList>
LArTPCToPfoMap;
118 void BuildTPCMaps(
const pandora::PfoList &inputPfoList,
const PfoToLArTPCMap &pfoToLArTPCMap, LArTPCToPfoMap &larTPCToPfoMap)
const;
120 typedef std::unordered_map<const pandora::ParticleFlowObject*, PfoAssociation>
PfoAssociationMap;
130 void CreatePfoMatches(
const LArTPCToPfoMap &larTPCToPfoMap,
const ThreeDPointingClusterMap &pointingClusterMap,
131 PfoAssociationMatrix &pfoAssociationMatrix)
const;
143 void CreatePfoMatches(
const pandora::LArTPC &larTPC1,
const pandora::LArTPC &larTPC2,
const pandora::ParticleFlowObject *
const pPfo1,
144 const pandora::ParticleFlowObject *
const pPfo2,
const ThreeDPointingClusterMap &pointingClusterMap, PfoAssociationMatrix &pfoAssociationMatrix)
const;
146 typedef std::unordered_map<const pandora::ParticleFlowObject*, pandora::PfoList>
PfoMergeMap;
154 void SelectPfoMatches(
const PfoAssociationMatrix &pfoAssociationMatrix, PfoMergeMap &pfoSelectedMatches)
const;
162 void SelectPfoMerges(
const PfoMergeMap &pfoMatches, PfoMergeMap &pfoMerges)
const;
173 void CollectAssociatedPfos(
const pandora::ParticleFlowObject *
const pSeedPfo,
const pandora::ParticleFlowObject *
const pCurrentPfo,
174 const PfoMergeMap &pfoMerges,
const pandora::PfoSet &vetoSet, pandora::PfoList &associatedList)
const;
185 const PfoMergeMap &inputPfoMerges, PfoMergeMap &outputPfoMerges)
const;
208 const pandora::PfoVector &pfoVector,
float &x0)
const;
222 #endif // #ifndef LAR_STITCHING_COSMIC_RAY_MERGING_TOOL_H std::unordered_map< const pandora::ParticleFlowObject *, LArPointingCluster > ThreeDPointingClusterMap
void SelectPrimaryPfos(const pandora::PfoList *pInputPfoList, const PfoToLArTPCMap &pfoToLArTPCMap, pandora::PfoList &outputPfoList) const
Select primary Pfos from the input list of Pfos.
Header file for the lar pointing cluster class.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
std::unordered_map< const pandora::ParticleFlowObject *, pandora::PfoList > PfoMergeMap
PfoAssociation(const VertexType parent, const VertexType daughter, const float fom)
Constructor.
void CollectAssociatedPfos(const pandora::ParticleFlowObject *const pSeedPfo, const pandora::ParticleFlowObject *const pCurrentPfo, const PfoMergeMap &pfoMerges, const pandora::PfoSet &vetoSet, pandora::PfoList &associatedList) const
Collect up associations between Pfos.
std::unordered_map< const pandora::LArTPC *, pandora::PfoList > LArTPCToPfoMap
std::unordered_map< const pandora::ParticleFlowObject *, float > PfoToFloatMap
float m_relaxCosRelativeAngle
void CreatePfoMatches(const LArTPCToPfoMap &larTPCToPfoMap, const ThreeDPointingClusterMap &pointingClusterMap, PfoAssociationMatrix &pfoAssociationMatrix) const
Create associations between Pfos using 3D pointing clusters.
void BuildTPCMaps(const pandora::PfoList &inputPfoList, const PfoToLArTPCMap &pfoToLArTPCMap, LArTPCToPfoMap &larTPCToPfoMap) const
Build a list of Pfos for each tpc.
StitchingCosmicRayMergingTool()
Default constructor.
StitchingCosmicRayMergingTool class.
VertexType
Vertex enumeration.
VertexType GetDaughter() const
Get daughter.
float m_relaxTransverseDisplacement
void OrderPfoMerges(const PfoToLArTPCMap &pfoToLArTPCMap, const ThreeDPointingClusterMap &pointingClusterMap, const PfoMergeMap &inputPfoMerges, PfoMergeMap &outputPfoMerges) const
Identify the vertex Pfo and then re-order the map of merges so that the vertex Pfo will be enlarged...
float m_minCosRelativeAngle
Header file for the master algorithm class.
void CalculateX0(const PfoToLArTPCMap &pfoToLArTPCMap, const ThreeDPointingClusterMap &pointingClusterMap, const pandora::PfoVector &pfoVector, float &x0) const
Calculate x0 shift for a group of associated Pfos.
float m_maxTransverseDisplacement
std::unordered_map< const pandora::ParticleFlowObject *, PfoAssociation > PfoAssociationMap
void StitchPfos(const MasterAlgorithm *const pAlgorithm, const ThreeDPointingClusterMap &pointingClusterMap, const PfoMergeMap &pfoMerges, PfoToLArTPCMap &pfoToLArTPCMap, PfoToFloatMap &stitchedPfosToX0Map) const
Apply X0 corrections, and then stitch together Pfos.
Header file for the lar three dimensional sliding fit result class.
void BuildPointingClusterMaps(const pandora::PfoList &inputPfoList, const PfoToLArTPCMap &pfoToLArTPCMap, ThreeDPointingClusterMap &pointingClusterMap) const
Build a 3D pointing cluster for each Pfo.
float m_maxLongitudinalDisplacementX
void SelectPfoMatches(const PfoAssociationMatrix &pfoAssociationMatrix, PfoMergeMap &pfoSelectedMatches) const
Select the best associations between Pfos; create a mapping between associated Pfos, handling any ambiguities.
VertexType GetParent() const
Get parent.
std::unordered_map< const pandora::ParticleFlowObject *, const pandora::LArTPC * > PfoToLArTPCMap
void Run(const MasterAlgorithm *const pAlgorithm, const pandora::PfoList *const pMultiPfoList, PfoToLArTPCMap &pfoToLArTPCMap, PfoToFloatMap &stitchedPfosToX0Map)
Run the algorithm tool.
float GetFigureOfMerit() const
Get figure of merit.
void SelectPfoMerges(const PfoMergeMap &pfoMatches, PfoMergeMap &pfoMerges) const
Create an initial map of Pfo merges to be made.
std::unordered_map< const pandora::ParticleFlowObject *, PfoAssociationMap > PfoAssociationMatrix