8 #ifndef LAR_SHOWER_START_FINDER_TOOL_H 9 #define LAR_SHOWER_START_FINDER_TOOL_H 1 11 #include "Pandora/AlgorithmHeaders.h" 12 #include "Pandora/AlgorithmTool.h" 28 pandora::StatusCode
Run(
const pandora::ParticleFlowObject *
const pShowerPfo,
const pandora::CartesianVector &peakDirection,
29 const pandora::HitType hitType,
const pandora::CaloHitList &showerSpineHitList, pandora::CartesianVector &showerStartPosition,
30 pandora::CartesianVector &showerStartDirection);
37 pandora::StatusCode
ReadSettings(
const pandora::TiXmlHandle xmlHandle);
47 LongitudinalPositionMap &longitudinalPositionMap)
const;
56 void GetEnergyDistribution(
const pandora::CaloHitList &showerSpineHitList,
const LongitudinalPositionMap &longitudinalPositionMap,
57 EnergySpectrumMap &energySpectrumMap)
const;
72 const TwoDSlidingFitResult &spineTwoDSlidingFit,
const EnergySpectrumMap &energySpectrumMap,
const pandora::CaloHitList &showerSpineHitList,
73 const bool isEndDownstream, pandora::CartesianVector &showerStartPosition, pandora::CartesianVector &showerStartDirection)
const;
90 const pandora::CaloHitList &showerSpineHitList,
const bool isEndDownstream,
const T startIter,
const T endIter)
const;
100 void CharacteriseInitialEnergy(
const EnergySpectrumMap &energySpectrumMap,
const bool isEndDownstream,
float &meanEnergy,
float &energySigma)
const;
115 const float longitudinalDistance,
const pandora::CaloHitList &showerSpineHitList,
const bool isEndDownstream)
const;
126 pandora::CartesianVector &globalPosition, pandora::CartesianVector &globalDirection)
const;
142 const pandora::CaloHitList &showerSpineHitList,
const pandora::CartesianVector &showerStartPosition,
143 const pandora::CartesianVector &showerStartDirection,
const bool isEndDownstream,
144 pandora::CartesianPointVector &showerRegionPositionVector)
const;
163 const pandora::CartesianVector &showerStartPosition,
const pandora::HitType hitType,
const bool isEndDownstream,
164 const pandora::CartesianVector &showerStartDirection, pandora::CartesianVector &positiveEdgeStart, pandora::CartesianVector &positiveEdgeEnd,
165 pandora::CartesianVector &negativeEdgeStart, pandora::CartesianVector &negativeEdgeEnd,
bool &isBetween)
const;
175 bool IsClockwiseRotation(
const pandora::CartesianVector &showerStartDirection,
const pandora::CartesianVector &displacementVector)
const;
191 const LayerFitResultMap &layerFitResultMap,
const pandora::CartesianVector &showerStartPosition,
const int showerStartLayer,
192 const int showerEndLayer, pandora::CartesianVector &boundaryEdgeStart, pandora::CartesianVector &boundaryEdgeEnd)
const;
209 #endif // #ifndef LAR_SHOWER_START_FINDER_TOOL_H std::map< int, pandora::CaloHitList > LayerToHitMap
float m_longitudinalShowerFraction
The shower region fraction considered.
ShowerStartFinderTool()
Default constructor.
Header file for the lar two dimensional sliding shower fit result class.
void CharacteriseInitialEnergy(const EnergySpectrumMap &energySpectrumMap, const bool isEndDownstream, float &meanEnergy, float &energySigma) const
Find the mean and standard deviation of the energy depositions in the initial region.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
float m_minShowerOpeningAngle
The min. opening angle of a sensible shower.
void ObtainLongitudinalDecomposition(const TwoDSlidingFitResult &spineTwoDSlidingFit, const pandora::CaloHitList &showerSpineHitList, LongitudinalPositionMap &longitudinalPositionMap) const
Create the [shower spine hit -> shower spine fit longitudinal projection] map.
float m_longitudinalCoordinateBinSize
The longitudinal coordinate bin size.
int m_maxLayerSeparation
The max. allowed separation between the shower start and boundary start layers.
unsigned int m_showerSlidingFitWindow
The sliding window used to fit the shower region.
pandora::StatusCode BuildShowerRegion(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::HitType hitType, const pandora::CaloHitList &showerSpineHitList, const pandora::CartesianVector &showerStartPosition, const pandora::CartesianVector &showerStartDirection, const bool isEndDownstream, pandora::CartesianPointVector &showerRegionPositionVector) const
Build the downstream 'shower region' at a given longitudinal distance along the spine.
unsigned int m_nInitialEnergyBins
The number of longitudinal bins that define the initial region.
TwoDSlidingShowerFitResult class.
std::map< const pandora::CaloHit *, float > LongitudinalPositionMap
void GetEnergyDistribution(const pandora::CaloHitList &showerSpineHitList, const LongitudinalPositionMap &longitudinalPositionMap, EnergySpectrumMap &energySpectrumMap) const
Create the longituidnal energy distribution.
float m_maxEdgeGap
The max. allowed layer gap in a shower boundary.
Header file for the lar two dimensional sliding fit result class.
float m_molliereRadius
The max. distance from the shower core of a collected shower region hit.
std::map< int, LayerFitResult > LayerFitResultMap
pandora::StatusCode GetBoundaryExtremalPoints(const TwoDSlidingShowerFitResult &showerTwoDSlidingFit, const LayerFitResultMap &layerFitResultMap, const pandora::CartesianVector &showerStartPosition, const int showerStartLayer, const int showerEndLayer, pandora::CartesianVector &boundaryEdgeStart, pandora::CartesianVector &boundaryEdgeEnd) const
Determine the start and end positions of a shower boundary.
bool IsShowerTopology(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::HitType hitType, const TwoDSlidingFitResult &spineTwoDSlidingFit, const float longitudinalDistance, const pandora::CaloHitList &showerSpineHitList, const bool isEndDownstream) const
Whether a sensible shower cascade looks to originate at a given position.
pandora::StatusCode CharacteriseShowerTopology(const pandora::CartesianPointVector &showerRegionPositionVector, const pandora::CartesianVector &showerStartPosition, const pandora::HitType hitType, const bool isEndDownstream, const pandora::CartesianVector &showerStartDirection, pandora::CartesianVector &positiveEdgeStart, pandora::CartesianVector &positiveEdgeEnd, pandora::CartesianVector &negativeEdgeStart, pandora::CartesianVector &negativeEdgeEnd, bool &isBetween) const
Parameterise the topological structure of the shower region.
bool IsClockwiseRotation(const pandora::CartesianVector &showerStartDirection, const pandora::CartesianVector &displacementVector) const
Determine whether a point lies on the RHS or LHS (wrt +ve Z) of the shower core.
float m_minSigmaDeviation
The min. average energy deviation of a candidate shower start.
void ConvertLongitudinalProjectionToGlobal(const TwoDSlidingFitResult &spineTwoDSlidingFit, const float longitudinalDistance, pandora::CartesianVector &globalPosition, pandora::CartesianVector &globalDirection) const
Determine the (X,Y,Z) position and direction at a given longitudinal distance along the spine...
pandora::StatusCode Run(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &peakDirection, const pandora::HitType hitType, const pandora::CaloHitList &showerSpineHitList, pandora::CartesianVector &showerStartPosition, pandora::CartesianVector &showerStartDirection)
std::map< int, float > EnergySpectrumMap
TwoDSlidingFitResult class.
unsigned int m_spineSlidingFitWindow
The sliding window used to fit the shower spine.
int FindShowerStartLongitudinalCoordinate(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::HitType hitType, const TwoDSlidingFitResult &spineTwoDSlidingFit, const EnergySpectrumMap &energySpectrumMap, const pandora::CaloHitList &showerSpineHitList, const bool isEndDownstream, const T startIter, const T endIter) const
Find the longitudinal bin which corresponds to the start position of the shower cascade.
void FindShowerStartAndDirection(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::HitType hitType, const TwoDSlidingFitResult &spineTwoDSlidingFit, const EnergySpectrumMap &energySpectrumMap, const pandora::CaloHitList &showerSpineHitList, const bool isEndDownstream, pandora::CartesianVector &showerStartPosition, pandora::CartesianVector &showerStartDirection) const
Find the position at which the shower cascade looks to originate, and its initial direction...