35 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, this->
CalculateOverlapResult(pClusterU, pClusterV, pClusterW, overlapResult));
38 this->
GetMatchingControl().GetOverlapTensor().SetOverlapResult(pClusterU, pClusterV, pClusterW, overlapResult);
46 float chiSquaredSum(0.f);
47 unsigned int nSamplingPoints(0), nMatchedSamplingPoints(0);
48 XOverlap xOverlapObject(0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f);
51 this->
PerformThreeViewMatching(pClusterU, pClusterV, pClusterW, chiSquaredSum, nSamplingPoints, nMatchedSamplingPoints, xOverlapObject));
53 if (statusCode != STATUS_CODE_SUCCESS)
59 if (commonMuonPfoList.empty())
60 return STATUS_CODE_NOT_FOUND;
62 overlapResult =
DeltaRayOverlapResult(nMatchedSamplingPoints, nSamplingPoints, chiSquaredSum, xOverlapObject, commonMuonPfoList);
64 return STATUS_CODE_SUCCESS;
72 ClusterList consideredClustersU, consideredClustersV, consideredClustersW;
73 PfoList nearbyMuonPfosU, nearbyMuonPfosV, nearbyMuonPfosW;
77 if (nearbyMuonPfosU.empty())
82 if (nearbyMuonPfosV.empty())
87 if (nearbyMuonPfosW.empty())
94 if (pNearbyMuonV != pNearbyMuonU)
99 if (pNearbyMuonW == pNearbyMuonV)
100 commonMuonPfoList.emplace_back(pNearbyMuonU);
111 unsigned int repeatCounter(0);
116 const bool repeatTools(pTool->
Run(
this, this->GetMatchingControl().GetOverlapTensor()));
119 repeatCounter = repeatTools ? repeatCounter + 1 : repeatCounter;
135 for (
auto algorithmTool : algorithmToolVector)
139 if (!pDeltaRayTensorTool)
140 return STATUS_CODE_INVALID_PARAMETER;
#define PANDORA_THROW_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
#define PANDORA_RETURN_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
DeltaRayOverlapResult class.
DeltaRayTensorTool class.
virtual bool Run(ThreeViewDeltaRayMatchingAlgorithm *const pAlgorithm, TensorType &overlapTensor)=0
Run the algorithm tool.
std::string m_muonPfoListName
The list of reconstructed cosmic ray pfos.
void GetNearbyMuonPfos(const pandora::Cluster *const pCluster, pandora::ClusterList &consideredClusters, pandora::PfoList &nearbyMuonPfos) const
Use the cluster proximity map to travel along paths of nearby clusters finding the cosmic ray cluster...
pandora::StatusCode PerformThreeViewMatching(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pCluster3, float &reducedChiSquared) const
To determine how well three clusters (one in each view) map onto one another expressing this in terms...
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
MatchingType & GetMatchingControl()
Get the matching control.
unsigned int m_minClusterCaloHits
The threshold number of hits for a cluster to be considered.
unsigned int m_nMaxTensorToolRepeats
The maximum number of repeat loops over tensor tools.
std::string m_reclusteringAlgorithmName
The name of the clustering algorithm to be used to recluster created delta ray remnants.
TensorToolVector m_algorithmToolVector
The algorithm tool vector.
void CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW)
Calculate cluster overlap result and store in container.
ThreeViewDeltaRayMatchingAlgorithm()
Default constructor.
void FindCommonMuonParents(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW, pandora::PfoList &commonMuonPfoList) const
Find the cosmic ray pfos that, in each view, lie close to the clusters of the tensor element.
virtual bool DoesClusterPassTensorThreshold(const pandora::Cluster *const pCluster) const
To check whether a given cluster meets the requirements to be added into the matching container (tens...
void ExamineOverlapContainer()
Examine contents of overlap container, collect together best-matching 2D particles and modify cluster...
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
bool IsInitialized() const
Whether the track overlap result has been initialized.
unsigned int GetNCaloHits() const
Get the number of calo hits in the cluster.
ParticleFlowObject class.
static StatusCode ProcessAlgorithm(const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &description, std::string &algorithmName)
Process an algorithm described in an xml element with a matching "description = .....
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
static StatusCode ProcessAlgorithmToolList(const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &listName, AlgorithmToolVector &algorithmToolVector)
Process a list of algorithms tools in an xml file.
MANAGED_CONTAINER< const Cluster * > ClusterList
std::vector< AlgorithmTool * > AlgorithmToolVector
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList