8 #ifndef LAR_TRACK_CLUSTER_CREATION_ALGORITHM_H 9 #define LAR_TRACK_CLUSTER_CREATION_ALGORITHM_H 1 11 #include "Pandora/Algorithm.h" 13 #include <unordered_map> 42 HitAssociation(
const pandora::CaloHit *
const pPrimaryTarget,
const float primaryDistanceSquared);
50 void SetSecondaryTarget(
const pandora::CaloHit *
const pSecondaryTarget,
const float secondaryDistanceSquared);
88 typedef std::unordered_map<const pandora::CaloHit*, const pandora::CaloHit*>
HitJoinMap;
89 typedef std::unordered_map<const pandora::CaloHit*, const pandora::Cluster*>
HitToClusterMap;
91 pandora::StatusCode
Run();
92 pandora::StatusCode
ReadSettings(
const pandora::TiXmlHandle xmlHandle);
101 pandora::StatusCode
FilterCaloHits(
const pandora::CaloHitList *
const pCaloHitList, pandora::OrderedCaloHitList &selectedCaloHitList, pandora::OrderedCaloHitList& rejectedCaloHitList)
const;
110 pandora::StatusCode
AddFilteredCaloHits(
const pandora::OrderedCaloHitList &selectedCaloHitList,
const pandora::OrderedCaloHitList& rejectedCaloHitList, HitToClusterMap& hitToClusterMap)
const;
119 void MakePrimaryAssociations(
const pandora::OrderedCaloHitList &orderedCaloHitList, HitAssociationMap &forwardHitAssociationMap,
120 HitAssociationMap &backwardHitAssociationMap)
const;
129 void MakeSecondaryAssociations(
const pandora::OrderedCaloHitList &orderedCaloHitList, HitAssociationMap &forwardHitAssociationMap,
130 HitAssociationMap &backwardHitAssociationMap)
const;
140 void IdentifyJoins(
const pandora::OrderedCaloHitList &orderedCaloHitList,
const HitAssociationMap &forwardHitAssociationMap,
141 const HitAssociationMap &backwardHitAssociationMap, HitJoinMap &hitJoinMap)
const;
150 void CreateClusters(
const pandora::OrderedCaloHitList &orderedCaloHitList,
const HitJoinMap &hitJoinMap, HitToClusterMap& hitToClusterMap)
const;
160 void CreatePrimaryAssociation(
const pandora::CaloHit *
const pCaloHitI,
const pandora::CaloHit *
const pCaloHitJ, HitAssociationMap &forwardHitAssociationMap,
161 HitAssociationMap &backwardHitAssociationMap)
const;
171 void CreateSecondaryAssociation(
const pandora::CaloHit *
const pCaloHitI,
const pandora::CaloHit *
const pCaloHitJ, HitAssociationMap &forwardHitAssociationMap,
172 HitAssociationMap &backwardHitAssociationMap)
const;
183 const pandora::CaloHit *
GetJoinHit(
const pandora::CaloHit *
const pCaloHit,
const HitAssociationMap &hitAssociationMapI,
const HitAssociationMap &hitAssociationMapJ)
const;
195 const pandora::CaloHit *
TraceHitAssociation(
const pandora::CaloHit *
const pCaloHit,
const HitAssociationMap &hitAssociationMapI,
const HitAssociationMap &hitAssociationMapJ,
196 unsigned int &nSteps)
const;
253 #endif // #ifndef LAR_TRACK_CLUSTER_CREATION_ALGORITHM_H const pandora::CaloHit * m_pSecondaryTarget
the secondary target
pandora::StatusCode FilterCaloHits(const pandora::CaloHitList *const pCaloHitList, pandora::OrderedCaloHitList &selectedCaloHitList, pandora::OrderedCaloHitList &rejectedCaloHitList) const
Filter out low pulse height hits in close proximity to high pulse height hits.
TrackClusterCreationAlgorithm()
Default constructor.
float m_primaryDistanceSquared
the primary distance squared
float m_maxCaloHitSeparationSquared
Square of maximum calo hit separation.
pandora::StatusCode AddFilteredCaloHits(const pandora::OrderedCaloHitList &selectedCaloHitList, const pandora::OrderedCaloHitList &rejectedCaloHitList, HitToClusterMap &hitToClusterMap) const
Merge previously filtered hits back into their associated clusters.
void IdentifyJoins(const pandora::OrderedCaloHitList &orderedCaloHitList, const HitAssociationMap &forwardHitAssociationMap, const HitAssociationMap &backwardHitAssociationMap, HitJoinMap &hitJoinMap) const
Identify final hit joins for use in cluster formation.
pandora::StatusCode Run()
float GetSecondaryDistanceSquared() const
Get the secondary distance squared.
void MakePrimaryAssociations(const pandora::OrderedCaloHitList &orderedCaloHitList, HitAssociationMap &forwardHitAssociationMap, HitAssociationMap &backwardHitAssociationMap) const
Control primary association formation.
std::unordered_map< const pandora::CaloHit *, const pandora::CaloHit * > HitJoinMap
const pandora::CaloHit * GetPrimaryTarget() const
Get the primary target.
float GetPrimaryDistanceSquared() const
Get the primary distance squared.
void SetSecondaryTarget(const pandora::CaloHit *const pSecondaryTarget, const float secondaryDistanceSquared)
Set secondary target.
void CreateClusters(const pandora::OrderedCaloHitList &orderedCaloHitList, const HitJoinMap &hitJoinMap, HitToClusterMap &hitToClusterMap) const
Final cluster formation.
void CreatePrimaryAssociation(const pandora::CaloHit *const pCaloHitI, const pandora::CaloHit *const pCaloHitJ, HitAssociationMap &forwardHitAssociationMap, HitAssociationMap &backwardHitAssociationMap) const
Create primary association if appropriate, hitI<->hitJ.
std::unordered_map< const pandora::CaloHit *, HitAssociation > HitAssociationMap
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
std::unordered_map< const pandora::CaloHit *, const pandora::Cluster * > HitToClusterMap
unsigned int m_maxGapLayers
Maximum number of layers for a gap.
const pandora::CaloHit * GetSecondaryTarget() const
Get the secondary target.
float m_secondaryDistanceSquared
the secondary distance squared
TrackClusterCreationAlgorithm class.
const pandora::CaloHit * m_pPrimaryTarget
the primary target
const pandora::CaloHit * GetJoinHit(const pandora::CaloHit *const pCaloHit, const HitAssociationMap &hitAssociationMapI, const HitAssociationMap &hitAssociationMapJ) const
Get hit to join by tracing associations via map I, checking via map J.
bool m_mergeBackFilteredHits
Merge rejected hits into their associated clusters.
void MakeSecondaryAssociations(const pandora::OrderedCaloHitList &orderedCaloHitList, HitAssociationMap &forwardHitAssociationMap, HitAssociationMap &backwardHitAssociationMap) const
Control secondary association formation.
HitAssociation(const pandora::CaloHit *const pPrimaryTarget, const float primaryDistanceSquared)
Constructor.
void CreateSecondaryAssociation(const pandora::CaloHit *const pCaloHitI, const pandora::CaloHit *const pCaloHitJ, HitAssociationMap &forwardHitAssociationMap, HitAssociationMap &backwardHitAssociationMap) const
Create secondary association if appropriate, hitI<->hitJ.
float m_minCaloHitSeparationSquared
Square of minimum calo hit separation.
float m_closeSeparationSquared
Length scale (squared) for close hit separation.
const pandora::CaloHit * TraceHitAssociation(const pandora::CaloHit *const pCaloHit, const HitAssociationMap &hitAssociationMapI, const HitAssociationMap &hitAssociationMapJ, unsigned int &nSteps) const
Get last hit obtained by tracing associations via map I, checking via map J.