Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
RemovalBaseTool.h
Go to the documentation of this file.
1
8#ifndef REMOVAL_BASE_TOOL_H
9#define REMOVAL_BASE_TOOL_H 1
10
12
13namespace lar_content
14{
19{
20public:
21 typedef std::vector<pandora::HitType> HitTypeVector;
22
27
28protected:
29 virtual bool Run(ThreeViewDeltaRayMatchingAlgorithm *const pAlgorithm, TensorType &overlapTensor) = 0;
30 virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle) = 0;
31
41 bool IsMuonEndpoint(const TensorType::Element &element, const bool ignoreHitType, const pandora::HitType hitTypeToIgnore = pandora::TPC_VIEW_U) const;
42
53 bool IsBestElement(const TensorType::Element &element, const pandora::HitType hitType, const TensorType::ElementList &elementList,
54 const pandora::ClusterSet &modifiedClusters) const;
55
64 virtual bool PassElementChecks(const TensorType::Element &element, const pandora::HitType hitType) const = 0;
65
76 bool IsCloseToLine(const pandora::CartesianVector &hitPosition, const pandora::CartesianVector &lineStart,
77 const pandora::CartesianVector &lineEnd, const float distanceToLine) const;
78
88 bool IsInLineSegment(const pandora::CartesianVector &lowerBoundary, const pandora::CartesianVector &upperBoundary,
89 const pandora::CartesianVector &point) const;
90
99 void FindExtrapolatedHits(const pandora::Cluster *const pCluster, const pandora::CartesianVector &lowerBoundary,
100 const pandora::CartesianVector &upperBoundary, pandora::CaloHitList &collectedHits) const;
101
112 const TensorType::Element &element, const pandora::HitType hitType, pandora::CartesianPointVector &projectedPositions) const;
113
116};
117
118} // namespace lar_content
119
120#endif // #ifndef REMOVAL_BASE_TOOL_H
ThreeViewDeltaRayMatchingAlgorithm::MatchingType::TensorType TensorType
RemovalBaseTool class.
float m_distanceToLine
The maximum perpendicular distance of a position to a line for it to be considered close.
virtual bool PassElementChecks(const TensorType::Element &element, const pandora::HitType hitType) const =0
Determine whether element satifies simple checks.
std::vector< pandora::HitType > HitTypeVector
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)=0
Read the algorithm settings.
void FindExtrapolatedHits(const pandora::Cluster *const pCluster, const pandora::CartesianVector &lowerBoundary, const pandora::CartesianVector &upperBoundary, pandora::CaloHitList &collectedHits) const
Collect the hits that are closest to and can be projected onto a defined line.
float m_minSeparation
The minimum delta ray - parent muon cluster separation required to investigate a delta/cosmic ray clu...
bool IsCloseToLine(const pandora::CartesianVector &hitPosition, const pandora::CartesianVector &lineStart, const pandora::CartesianVector &lineEnd, const float distanceToLine) const
Whether a given position is close to a defined line.
pandora::StatusCode ProjectDeltaRayPositions(const TensorType::Element &element, const pandora::HitType hitType, pandora::CartesianPointVector &projectedPositions) const
Use two views of a delta ray pfo to calculate projected positions in a given third view.
bool IsInLineSegment(const pandora::CartesianVector &lowerBoundary, const pandora::CartesianVector &upperBoundary, const pandora::CartesianVector &point) const
Whether the projection of a given position lies on a defined line.
bool IsMuonEndpoint(const TensorType::Element &element, const bool ignoreHitType, const pandora::HitType hitTypeToIgnore=pandora::TPC_VIEW_U) const
Determine whether the matched clusters suggest that the delta ray is at the endpoint of the cosmic ra...
RemovalBaseTool()
Default constructor.
bool IsBestElement(const TensorType::Element &element, const pandora::HitType hitType, const TensorType::ElementList &elementList, const pandora::ClusterSet &modifiedClusters) const
Determine whether the input element is the best to use to modify the contaminated cluster (best is de...
virtual bool Run(ThreeViewDeltaRayMatchingAlgorithm *const pAlgorithm, TensorType &overlapTensor)=0
Run the algorithm tool.
CartesianVector class.
Cluster class.
Definition Cluster.h:31
HitType
Calorimeter hit type enum.
std::vector< CartesianVector > CartesianPointVector
std::unordered_set< const Cluster * > ClusterSet
MANAGED_CONTAINER< const CaloHit * > CaloHitList
StatusCode
The StatusCode enum.