LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
CosmicRayRemovalTool.h
Go to the documentation of this file.
1 
9 #ifndef COSMIC_RAY_REMOVAL_TOOL_H
10 #define COSMIC_RAY_REMOVAL_TOOL_H 1
11 
14 
15 namespace lar_content
16 {
21 {
22 public:
27 
28 private:
29  bool Run(ThreeViewDeltaRayMatchingAlgorithm *const pAlgorithm, TensorType &overlapTensor);
30  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
31 
39  bool RemoveCosmicRayHits(const TensorType::ElementList &elementList) const;
40 
49  virtual bool PassElementChecks(const TensorType::Element &element, const pandora::HitType hitType) const;
50 
59  bool IsContaminated(const TensorType::Element &element, const pandora::HitType hitType) const;
60 
68  void CreateSeed(const TensorType::Element &element, const pandora::HitType hitType, pandora::CaloHitList &collectedHits) const;
69 
80  pandora::StatusCode GrowSeed(const TensorType::Element &element, const pandora::HitType hitType, pandora::CaloHitList &collectedHits,
81  pandora::CaloHitList &deltaRayRemantHits) const;
82 
94  void CollectHitsFromDeltaRay(const pandora::CartesianVector &positionOnMuon, const pandora::CartesianVector &muonDirection,
95  const pandora::Cluster *const pDeltaRayCluster, const float &minDistanceFromMuon, const bool demandCloserToCollected,
96  const pandora::CaloHitList &protectedHits, pandora::CaloHitList &collectedHits) const;
97 
106  void SplitDeltaRayCluster(const TensorType::Element &element, const pandora::HitType hitType, pandora::CaloHitList &collectedHits,
107  pandora::CaloHitList &deltaRayRemnantHits) const;
108 
118  void ReclusterRemnant(const pandora::HitType hitType, const pandora::Cluster *const pMuonCluster,
119  const pandora::Cluster *const pDeltaRayRemnant, pandora::ClusterVector &clusterVector, pandora::PfoVector &pfoVector) const;
120 
121  unsigned int m_slidingFitWindow;
124  unsigned int m_minRemnantClusterSize;
126 };
127 
128 } // namespace lar_content
129 
130 #endif // #ifndef COSMIC_RAY_REMOVAL_TOOL_H
void CollectHitsFromDeltaRay(const pandora::CartesianVector &positionOnMuon, const pandora::CartesianVector &muonDirection, const pandora::Cluster *const pDeltaRayCluster, const float &minDistanceFromMuon, const bool demandCloserToCollected, const pandora::CaloHitList &protectedHits, pandora::CaloHitList &collectedHits) const
Collect hits from the delta ray cluster to either keep (demandCloserToCollected == true) or separate ...
unsigned int m_slidingFitWindow
The sliding fit window used in cosmic ray parameterisations.
Header file for the removal base tool class.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
bool RemoveCosmicRayHits(const TensorType::ElementList &elementList) const
Remove hits from delta ray clusters that belong to the parent muon.
float m_maxDistanceToHit
The maximum distance of a hit from the cosmic ray track for it to be added into the CR...
float m_maxDistanceToTrack
The minimum distance of an insignificant remnant cluster from the cosmic ray track for it to be merge...
bool IsContaminated(const TensorType::Element &element, const pandora::HitType hitType) const
Determine whether the cluster under investigation has muon contamination.
virtual bool PassElementChecks(const TensorType::Element &element, const pandora::HitType hitType) const
Determine whether element satifies simple checks.
CosmicRayRemovalTool()
Default constructor.
void SplitDeltaRayCluster(const TensorType::Element &element, const pandora::HitType hitType, pandora::CaloHitList &collectedHits, pandora::CaloHitList &deltaRayRemnantHits) const
Fragment the delta ray cluster adding hits to the muon track and perhaps creating significant remnant...
CosmicRayRemovalTool class.
pandora::StatusCode GrowSeed(const TensorType::Element &element, const pandora::HitType hitType, pandora::CaloHitList &collectedHits, pandora::CaloHitList &deltaRayRemantHits) const
Examine remaining hits in the delta ray cluster adding them to the delta ray seed or parent muon if a...
unsigned int m_minRemnantClusterSize
The minimum hit number of a remnant cluster for it to be considered significant.
HitType
Definition: HitType.h:12
bool Run(ThreeViewDeltaRayMatchingAlgorithm *const pAlgorithm, TensorType &overlapTensor)
Run the algorithm tool.
void ReclusterRemnant(const pandora::HitType hitType, const pandora::Cluster *const pMuonCluster, const pandora::Cluster *const pDeltaRayRemnant, pandora::ClusterVector &clusterVector, pandora::PfoVector &pfoVector) const
Reculster a given remnant cluster, merging insignificant created clusters into the parent muon (if pr...
float m_minContaminationLength
The minimum projected length of a delta ray cluster onto the muon track for it to be considered conta...
std::vector< art::Ptr< recob::Cluster > > ClusterVector
void CreateSeed(const TensorType::Element &element, const pandora::HitType hitType, pandora::CaloHitList &collectedHits) const
Collect hits in the delta ray cluster that lie close to calculated projected positions forming a seed...
RemovalBaseTool class.