LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ShowerSpineFinderTool.h
Go to the documentation of this file.
1 
8 #ifndef LAR_SHOWER_SPINE_FINDER_TOOL_H
9 #define LAR_SHOWER_SPINE_FINDER_TOOL_H 1
10 
11 #include "Pandora/AlgorithmHeaders.h"
12 #include "Pandora/AlgorithmTool.h"
13 
15 
16 namespace lar_content
17 {
18 
19 class ShowerSpineFinderTool : public pandora::AlgorithmTool
20 {
21 public:
23 
24  pandora::StatusCode Run(const pandora::CartesianVector &nuVertex3D, const pandora::CaloHitList *const pViewHitList, const pandora::HitType hitType,
25  const pandora::CartesianVector &peakDirection, pandora::CaloHitList &unavailableHitList, pandora::CaloHitList &showerSpineHitList);
26 
27 private:
28  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
29 
39  void FindShowerSpine(const pandora::CaloHitList *const pViewHitList, const pandora::CartesianVector &nuVertex2D,
40  const pandora::CartesianVector &initialDirection, pandora::CaloHitList &unavailableHitList, pandora::CaloHitList &showerSpineHitList) const;
41 
57  bool CollectSubsectionHits(const TwoDSlidingFitResult &extrapolatedFit, const pandora::CartesianVector &extrapolatedStartPosition,
58  const pandora::CartesianVector &extrapolatedEndPosition, const pandora::CartesianVector &extrapolatedDirection,
59  const bool isEndDownstream, const pandora::CaloHitList *const pViewHitList, pandora::CartesianPointVector &runningFitPositionVector,
60  pandora::CaloHitList &unavailableHitList, pandora::CaloHitList &showerSpineHitList) const;
61 
72  bool IsCloseToLine(const pandora::CartesianVector &hitPosition, const pandora::CartesianVector &lineStart,
73  const pandora::CartesianVector &lineDirection, const float distanceToLine) const;
74 
84  void CollectConnectedHits(const pandora::CaloHitList &collectedHits, const pandora::CartesianVector &extrapolatedStartPosition,
85  const pandora::CartesianVector &extrapolatedDirection, pandora::CartesianPointVector &runningFitPositionVector,
86  pandora::CaloHitList &showerSpineHitList) const;
87 
96  float GetClosestDistance(const pandora::CartesianVector &position, const pandora::CartesianPointVector &testPositions) const;
97 
98  unsigned int m_hitThresholdForSpine;
101  unsigned int m_minInitialHitsFound;
102  unsigned int m_maxFittingHits;
103  unsigned int m_localSlidingFitWindow;
108 };
109 
110 //------------------------------------------------------------------------------------------------------------------------------------------
111 } // namespace lar_content
112 
113 #endif // #ifndef LAR_SHOWER_SPINE_FINDER_TOOL_H
pandora::StatusCode Run(const pandora::CartesianVector &nuVertex3D, const pandora::CaloHitList *const pViewHitList, const pandora::HitType hitType, const pandora::CartesianVector &peakDirection, pandora::CaloHitList &unavailableHitList, pandora::CaloHitList &showerSpineHitList)
unsigned int m_minInitialHitsFound
The min. number of hits collected in the first step for continuation.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
float m_initialFitDistanceToLine
The max. proximity to the spine projection for collection in the first step.
float m_hitConnectionDistance
The max. separation between connected hits.
void FindShowerSpine(const pandora::CaloHitList *const pViewHitList, const pandora::CartesianVector &nuVertex2D, const pandora::CartesianVector &initialDirection, pandora::CaloHitList &unavailableHitList, pandora::CaloHitList &showerSpineHitList) const
Perform a running fit to collect the hits of the shower spine.
float GetClosestDistance(const pandora::CartesianVector &position, const pandora::CartesianPointVector &testPositions) const
Find the smallest distance between a position and a list of other positions.
bool CollectSubsectionHits(const TwoDSlidingFitResult &extrapolatedFit, const pandora::CartesianVector &extrapolatedStartPosition, const pandora::CartesianVector &extrapolatedEndPosition, const pandora::CartesianVector &extrapolatedDirection, const bool isEndDownstream, const pandora::CaloHitList *const pViewHitList, pandora::CartesianPointVector &runningFitPositionVector, pandora::CaloHitList &unavailableHitList, pandora::CaloHitList &showerSpineHitList) const
Perform a running fit step: collect hits which lie close to the shower spine projection.
float m_distanceToLine
The max. proximity to the spine projection for collection.
unsigned int m_highResolutionSlidingFitWindow
The high resolution sliding fit window for spine fits.
bool IsCloseToLine(const pandora::CartesianVector &hitPosition, const pandora::CartesianVector &lineStart, const pandora::CartesianVector &lineDirection, const float distanceToLine) const
Determine whether a hit lies close to the shower spine projection.
unsigned int m_maxFittingHits
The number of hits to consider in the running fit.
Header file for the lar two dimensional sliding fit result class.
float m_growingFitInitialLength
The first step distance.
unsigned int m_hitThresholdForSpine
The hit threshold for a significant spine.
void CollectConnectedHits(const pandora::CaloHitList &collectedHits, const pandora::CartesianVector &extrapolatedStartPosition, const pandora::CartesianVector &extrapolatedDirection, pandora::CartesianPointVector &runningFitPositionVector, pandora::CaloHitList &showerSpineHitList) const
Add to the shower spine the connecting hits.
HitType
Definition: HitType.h:12
float m_growingFitSegmentLength
The standard step distance.
unsigned int m_localSlidingFitWindow
The standard sliding fit window for spine fits.