LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 
13 namespace lar_content
14 {
19 {
20 public:
21  typedef std::vector<pandora::HitType> HitTypeVector;
22 
27 
28 protected:
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 
111  pandora::StatusCode ProjectDeltaRayPositions(
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
float m_minSeparation
The minimum delta ray - parent muon cluster separation required to investigate a delta/cosmic ray clu...
RemovalBaseTool()
Default constructor.
virtual bool Run(ThreeViewDeltaRayMatchingAlgorithm *const pAlgorithm, TensorType &overlapTensor)=0
Run the algorithm tool.
float m_distanceToLine
The maximum perpendicular distance of a position to a line for it to be considered close...
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...
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.
virtual bool PassElementChecks(const TensorType::Element &element, const pandora::HitType hitType) const =0
Determine whether element satifies simple checks.
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.
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...
HitType
Definition: HitType.h:12
std::vector< pandora::HitType > HitTypeVector
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 class.
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)=0