![]() |
LArSoft
v09_93_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "ShowerStartFinderTool.h"
Public Member Functions | |
| ShowerStartFinderTool () | |
| Default constructor. More... | |
| 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) |
| template<typename T > | |
| int | FindShowerStartLongitudinalCoordinate (const ParticleFlowObject *const pShowerPfo, const HitType hitType, const TwoDSlidingFitResult &spineTwoDSlidingFit, const EnergySpectrumMap &energySpectrumMap, const CaloHitList &showerSpineHitList, const bool isEndDownstream, const T startIter, const T endIter) const |
Private Types | |
| typedef std::map< const pandora::CaloHit *, float > | LongitudinalPositionMap |
| typedef std::map< int, float > | EnergySpectrumMap |
| typedef std::map< int, pandora::CaloHitList > | LayerToHitMap |
Private Member Functions | |
| pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
| void | ObtainLongitudinalDecomposition (const TwoDSlidingFitResult &spineTwoDSlidingFit, const pandora::CaloHitList &showerSpineHitList, LongitudinalPositionMap &longitudinalPositionMap) const |
| Create the [shower spine hit -> shower spine fit longitudinal projection] map. More... | |
| void | GetEnergyDistribution (const pandora::CaloHitList &showerSpineHitList, const LongitudinalPositionMap &longitudinalPositionMap, EnergySpectrumMap &energySpectrumMap) const |
| Create the longituidnal energy distribution. More... | |
| 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. More... | |
| template<typename T > | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
Private Attributes | |
| unsigned int | m_spineSlidingFitWindow |
| The sliding window used to fit the shower spine. More... | |
| float | m_longitudinalCoordinateBinSize |
| The longitudinal coordinate bin size. More... | |
| unsigned int | m_nInitialEnergyBins |
| The number of longitudinal bins that define the initial region. More... | |
| float | m_minSigmaDeviation |
| The min. average energy deviation of a candidate shower start. More... | |
| float | m_maxEdgeGap |
| The max. allowed layer gap in a shower boundary. More... | |
| float | m_longitudinalShowerFraction |
| The shower region fraction considered. More... | |
| float | m_minShowerOpeningAngle |
| The min. opening angle of a sensible shower. More... | |
| float | m_molliereRadius |
| The max. distance from the shower core of a collected shower region hit. More... | |
| unsigned int | m_showerSlidingFitWindow |
| The sliding window used to fit the shower region. More... | |
| int | m_maxLayerSeparation |
| The max. allowed separation between the shower start and boundary start layers. More... | |
Definition at line 20 of file ShowerStartFinderTool.h.
|
private |
Definition at line 34 of file ShowerStartFinderTool.h.
|
private |
Definition at line 35 of file ShowerStartFinderTool.h.
|
private |
Definition at line 33 of file ShowerStartFinderTool.h.
| lar_content::ShowerStartFinderTool::ShowerStartFinderTool | ( | ) |
Default constructor.
Definition at line 26 of file ShowerStartFinderTool.cc.
|
private |
Build the downstream 'shower region' at a given longitudinal distance along the spine.
| pShowerPfo | the shower pfo |
| hitType | the 2D view |
| showerSpineHitList | the shower spine hit list |
| showerStartPosition | the candidate shower start position |
| showerStartDirection | the candidate shower start direction |
| isEndDownstream | whether the shower direction is downstream (in Z) of the neutrino vertex |
| showerRegionPositionVector | the ouput vector of shower region hit positions |
Definition at line 347 of file ShowerStartFinderTool.cc.
References f, lar_content::LArPfoHelper::GetCaloHits(), lar_content::TwoDSlidingFitResult::GetGlobalPosition(), lar_content::TwoDSlidingFitResult::GetLayer(), lar_content::TwoDSlidingFitResult::GetLayerFitResultMap(), lar_content::TwoDSlidingFitResult::GetLocalPosition(), lar_content::TwoDSlidingShowerFitResult::GetNegativeEdgeFitResult(), lar_content::TwoDSlidingShowerFitResult::GetPositiveEdgeFitResult(), lar_content::TwoDSlidingShowerFitResult::GetShowerFitResult(), lar_content::LArGeometryHelper::GetWirePitch(), m_longitudinalShowerFraction, m_maxEdgeGap, m_molliereRadius, and m_showerSlidingFitWindow.
Referenced by IsShowerTopology().
|
private |
Find the mean and standard deviation of the energy depositions in the initial region.
| energySpectrumMap | the [longitudial projection bin -> contained energy] map |
| isEndDownstream | whether the shower direction is downstream (in Z) of the neutrino vertex |
| meanEnergy | the output mean energy |
| energySigma | the output standard deviation |
Definition at line 243 of file ShowerStartFinderTool.cc.
References m_nInitialEnergyBins.
Referenced by FindShowerStartLongitudinalCoordinate().
|
private |
Parameterise the topological structure of the shower region.
| showerRegionPositionVector | the vector of shower region hit positions |
| showerStartPosition | the shower start position |
| hitType | the 2D view |
| isEndDownstream | whether the shower direction is downstream (in Z) of the neutrino vertex |
| showerStartDirection | the shower start direction |
| positiveEdgeStart | the start position of one shower boundary |
| positiveEdgeEnd | the end position of one shower boundary |
| negativeEdgeStart | the start position of the other shower boundary |
| negativeEdgeEnd | the end position of the other shower boundary |
| isBetween | if the shower core is between either the start or end boundary positions |
Definition at line 492 of file ShowerStartFinderTool.cc.
References f, GetBoundaryExtremalPoints(), lar_content::TwoDSlidingFitResult::GetGlobalPosition(), lar_content::TwoDSlidingFitResult::GetLayer(), lar_content::TwoDSlidingFitResult::GetLayerFitResultMap(), lar_content::TwoDSlidingFitResult::GetLocalPosition(), lar_content::TwoDSlidingFitResult::GetMaxLayer(), lar_content::TwoDSlidingShowerFitResult::GetNegativeEdgeFitResult(), lar_content::TwoDSlidingShowerFitResult::GetPositiveEdgeFitResult(), lar_content::TwoDSlidingShowerFitResult::GetShowerFitResult(), lar_content::LArGeometryHelper::GetWirePitch(), IsClockwiseRotation(), and m_showerSlidingFitWindow.
Referenced by IsShowerTopology().
|
private |
Determine the (X,Y,Z) position and direction at a given longitudinal distance along the spine.
| spineTwoDSlidingFit | the shower spine fit |
| longitudinalDistance | the input longitudinal distance |
| globalPosition | the output (X,Y,Z) position |
| globalDirection | the output (X,Y,Z) direction |
Definition at line 312 of file ShowerStartFinderTool.cc.
References f, lar_content::TwoDSlidingFitResult::GetGlobalDirection(), lar_content::TwoDSlidingFitResult::GetGlobalPosition(), and lar_content::TwoDSlidingFitResult::GetLayerFitResultMap().
Referenced by FindShowerStartAndDirection(), and IsShowerTopology().
|
private |
Find the position at which the shower cascade looks to originate, and its initial direction.
| pShowerPfo | the shower pfo |
| hitType | the 2D view |
| spineTwoDSlidingFit | the shower spine fit |
| energySpectrumMap | the [longitudial projection bin -> contained energy] map |
| showerSpineHitList | the shower spine hit list |
| isEndDownstream | whether the shower direction is downstream (in Z) of the neutrino vertex |
| showerStartPosition | the position at which the shower cascade looks to originate |
| showerStartDirection | the initial direction of the shower cascade |
Definition at line 182 of file ShowerStartFinderTool.cc.
References ConvertLongitudinalProjectionToGlobal(), FindShowerStartLongitudinalCoordinate(), and m_longitudinalCoordinateBinSize.
Referenced by Run().
|
private |
Find the longitudinal bin which corresponds to the start position of the shower cascade.
| pShowerPfo | the shower pfo |
| hitType | the 2D view |
| spineTwoDSlidingFit | the shower spine fit |
| energySpectrumMap | the [longitudial projection bin -> contained energy] map |
| showerSpineHitList | the shower spine hit list |
| isEndDownstream | whether the shower direction is downstream (in Z) of the neutrino vertex |
| startIter | the start iterator of energySpectrumMap |
| endIter | the end iterator of energySpectrumMap |
Referenced by FindShowerStartAndDirection().
| int lar_content::ShowerStartFinderTool::FindShowerStartLongitudinalCoordinate | ( | const ParticleFlowObject *const | pShowerPfo, |
| const HitType | hitType, | ||
| const TwoDSlidingFitResult & | spineTwoDSlidingFit, | ||
| const EnergySpectrumMap & | energySpectrumMap, | ||
| const CaloHitList & | showerSpineHitList, | ||
| const bool | isEndDownstream, | ||
| const T | startIter, | ||
| const T | endIter | ||
| ) | const |
Definition at line 210 of file ShowerStartFinderTool.cc.
References CharacteriseInitialEnergy(), f, IsShowerTopology(), m_longitudinalCoordinateBinSize, m_minSigmaDeviation, and m_nInitialEnergyBins.
|
private |
Determine the start and end positions of a shower boundary.
| showerTwoDSlidingFit | the shower fit |
| layerFitResultMap | the layer fit result map of the shower boundary fit |
| showerStartPosition | the shower start position |
| showerStartLayer | the shower start layer wrt the shower region fit |
| showerEndLayer | the shower end layer wrt the shower region fit |
| boundaryEdgeStart | the output boundary start position |
| boundaryEdgeEnd | the output boundary end position |
Definition at line 606 of file ShowerStartFinderTool.cc.
References util::abs(), lar_content::TwoDSlidingFitResult::GetGlobalPosition(), lar_content::TwoDSlidingShowerFitResult::GetShowerFitResult(), and m_maxLayerSeparation.
Referenced by CharacteriseShowerTopology().
|
private |
Create the longituidnal energy distribution.
| showerSpineHitList | the shower spine hit list |
| longitudinalPositionMap | the shower spine longitudinal projection map |
| energySpectrumMap | the output [longitudial projection bin -> contained energy] map |
Definition at line 159 of file ShowerStartFinderTool.cc.
References f, and m_longitudinalCoordinateBinSize.
Referenced by Run().
|
private |
Determine whether a point lies on the RHS or LHS (wrt +ve Z) of the shower core.
| showerStartDirection | the shower start direction |
| displacementVector | the input position wrt the shower start position |
Definition at line 584 of file ShowerStartFinderTool.cc.
References f.
Referenced by CharacteriseShowerTopology().
|
private |
Whether a sensible shower cascade looks to originate at a given position.
| pShowerPfo | the shower pfo |
| hitType | the 2D view |
| spineTwoDSlidingFit | the shower spine fit |
| longitudinalDistance | the longitudinal projection of the candidate shower start position |
| showerSpineHitList | the shower spine hit list |
| isEndDownstream | whether the shower direction is downstream (in Z) of the neutrino vertex |
Definition at line 269 of file ShowerStartFinderTool.cc.
References BuildShowerRegion(), CharacteriseShowerTopology(), ConvertLongitudinalProjectionToGlobal(), f, and m_minShowerOpeningAngle.
Referenced by FindShowerStartLongitudinalCoordinate().
|
private |
Create the [shower spine hit -> shower spine fit longitudinal projection] map.
| spineTwoDSlidingFit | the shower spine fit |
| showerSpineHitList | the shower spine hit list |
| longitudinalPositionMap | the output shower spine longitudinal projection map |
Definition at line 79 of file ShowerStartFinderTool.cc.
References f, lar_content::TwoDSlidingFitResult::GetGlobalPosition(), lar_content::TwoDSlidingFitResult::GetLayer(), lar_content::TwoDSlidingFitResult::GetLayerFitResultMap(), and lar_content::TwoDSlidingFitResult::GetLocalPosition().
Referenced by Run().
|
private |
Definition at line 653 of file ShowerStartFinderTool.cc.
References m_longitudinalCoordinateBinSize, m_longitudinalShowerFraction, m_maxEdgeGap, m_maxLayerSeparation, m_minShowerOpeningAngle, m_minSigmaDeviation, m_molliereRadius, m_nInitialEnergyBins, m_showerSlidingFitWindow, and m_spineSlidingFitWindow.
| StatusCode lar_content::ShowerStartFinderTool::Run | ( | const pandora::ParticleFlowObject *const | pShowerPfo, |
| const pandora::CartesianVector & | peakDirection, | ||
| const pandora::HitType | hitType, | ||
| const pandora::CaloHitList & | showerSpineHitList, | ||
| pandora::CartesianVector & | showerStartPosition, | ||
| pandora::CartesianVector & | showerStartDirection | ||
| ) |
Definition at line 42 of file ShowerStartFinderTool.cc.
References FindShowerStartAndDirection(), GetEnergyDistribution(), lar_content::LArGeometryHelper::GetWirePitch(), m_spineSlidingFitWindow, and ObtainLongitudinalDecomposition().
Referenced by lar_content::ElectronInitialRegionRefinementAlgorithm::BuildViewProtoShowers().
|
private |
The longitudinal coordinate bin size.
Definition at line 195 of file ShowerStartFinderTool.h.
Referenced by FindShowerStartAndDirection(), FindShowerStartLongitudinalCoordinate(), GetEnergyDistribution(), and ReadSettings().
|
private |
The shower region fraction considered.
Definition at line 199 of file ShowerStartFinderTool.h.
Referenced by BuildShowerRegion(), and ReadSettings().
|
private |
The max. allowed layer gap in a shower boundary.
Definition at line 198 of file ShowerStartFinderTool.h.
Referenced by BuildShowerRegion(), and ReadSettings().
|
private |
The max. allowed separation between the shower start and boundary start layers.
Definition at line 203 of file ShowerStartFinderTool.h.
Referenced by GetBoundaryExtremalPoints(), and ReadSettings().
|
private |
The min. opening angle of a sensible shower.
Definition at line 200 of file ShowerStartFinderTool.h.
Referenced by IsShowerTopology(), and ReadSettings().
|
private |
The min. average energy deviation of a candidate shower start.
Definition at line 197 of file ShowerStartFinderTool.h.
Referenced by FindShowerStartLongitudinalCoordinate(), and ReadSettings().
|
private |
The max. distance from the shower core of a collected shower region hit.
Definition at line 201 of file ShowerStartFinderTool.h.
Referenced by BuildShowerRegion(), and ReadSettings().
|
private |
The number of longitudinal bins that define the initial region.
Definition at line 196 of file ShowerStartFinderTool.h.
Referenced by CharacteriseInitialEnergy(), FindShowerStartLongitudinalCoordinate(), and ReadSettings().
|
private |
The sliding window used to fit the shower region.
Definition at line 202 of file ShowerStartFinderTool.h.
Referenced by BuildShowerRegion(), CharacteriseShowerTopology(), and ReadSettings().
|
private |
The sliding window used to fit the shower spine.
Definition at line 194 of file ShowerStartFinderTool.h.
Referenced by ReadSettings(), and Run().