Pandora
Pandora source code navigator
|
#include "ShowerStartFinderTool.h"
Public Member Functions | |
ShowerStartFinderTool () | |
Default constructor. | |
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) |
const std::string & | GetType () const |
Get the type. | |
const std::string & | GetInstanceName () const |
Get the instance name. | |
const Pandora & | GetPandora () const |
Get the associated pandora instance. | |
Protected Member Functions | |
virtual StatusCode | Initialize () |
Perform any operations that must occur after reading settings, but before running the process. | |
virtual StatusCode | Reset () |
Perform any operations when pandora is reset, typically at the end of each event. | |
StatusCode | RegisterDetails (const Pandora *const pPandora, const std::string &type, const std::string &instanceName) |
Register i) the pandora instance that will run the process and ii) the process type. | |
Protected Attributes | |
const Pandora * | m_pPandora |
The pandora object that will run the process. | |
std::string | m_type |
The process type. | |
std::string | m_instanceName |
The process instance name. | |
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) |
Read the algorithm settings. | |
void | ObtainLongitudinalDecomposition (const TwoDSlidingFitResult &spineTwoDSlidingFit, const pandora::CaloHitList &showerSpineHitList, LongitudinalPositionMap &longitudinalPositionMap) const |
Create the [shower spine hit -> shower spine fit longitudinal projection] map. | |
void | GetEnergyDistribution (const pandora::CaloHitList &showerSpineHitList, const LongitudinalPositionMap &longitudinalPositionMap, EnergySpectrumMap &energySpectrumMap) const |
Create the longituidnal energy distribution. | |
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. | |
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. | |
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. | |
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. | |
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 | 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. | |
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. | |
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. | |
Private Attributes | |
unsigned int | m_spineSlidingFitWindow |
The sliding window used to fit the shower spine. | |
float | m_longitudinalCoordinateBinSize |
The longitudinal coordinate bin size. | |
unsigned int | m_nInitialEnergyBins |
The number of longitudinal bins that define the initial region. | |
float | m_minSigmaDeviation |
The min. average energy deviation of a candidate shower start. | |
float | m_maxEdgeGap |
The max. allowed layer gap in a shower boundary. | |
float | m_longitudinalShowerFraction |
The shower region fraction considered. | |
float | m_minShowerOpeningAngle |
The min. opening angle of a sensible shower. | |
float | m_molliereRadius |
The max. distance from the shower core of a collected shower region hit. | |
unsigned int | m_showerSlidingFitWindow |
The sliding window used to fit the shower region. | |
int | m_maxLayerSeparation |
The max. allowed separation between the shower start and boundary start layers. | |
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.
|
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.
|
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.
|
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.
|
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.
|
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 |
Definition at line 210 of file ShowerStartFinderTool.cc.
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectedvirtualinherited |
Perform any operations that must occur after reading settings, but before running the process.
Reimplemented in lar_content::BdtBeamParticleIdTool, lar_content::BeamParticleIdTool, lar_content::CosmicRayTaggingTool, lar_content::EventReadingAlgorithm, lar_content::EventWritingAlgorithm, lar_content::LArPseudoLayerPlugin, lar_content::LArRotationalTransformationPlugin, EventReadingAlgorithm, and EventWritingAlgorithm.
Definition at line 126 of file Process.h.
|
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.
|
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.
|
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.
|
privatevirtual |
Read the algorithm settings.
xmlHandle | the relevant xml handle |
Implements pandora::Process.
Definition at line 653 of file ShowerStartFinderTool.cc.
|
inlineprotectedinherited |
Register i) the pandora instance that will run the process and ii) the process type.
pPandora | address of the pandora object that will run the process |
type | the process type |
instanceName | the process instance name |
Definition at line 146 of file Process.h.
|
inlineprotectedvirtualinherited |
Perform any operations when pandora is reset, typically at the end of each event.
Reimplemented in lar_content::MasterAlgorithm, lar_content::PostProcessingAlgorithm, and lar_content::PreProcessingAlgorithm.
Definition at line 133 of file Process.h.
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.
|
protectedinherited |
|
private |
The longitudinal coordinate bin size.
Definition at line 195 of file ShowerStartFinderTool.h.
|
private |
The shower region fraction considered.
Definition at line 199 of file ShowerStartFinderTool.h.
|
private |
The max. allowed layer gap in a shower boundary.
Definition at line 198 of file ShowerStartFinderTool.h.
|
private |
The max. allowed separation between the shower start and boundary start layers.
Definition at line 203 of file ShowerStartFinderTool.h.
|
private |
The min. opening angle of a sensible shower.
Definition at line 200 of file ShowerStartFinderTool.h.
|
private |
The min. average energy deviation of a candidate shower start.
Definition at line 197 of file ShowerStartFinderTool.h.
|
private |
The max. distance from the shower core of a collected shower region hit.
Definition at line 201 of file ShowerStartFinderTool.h.
|
private |
The number of longitudinal bins that define the initial region.
Definition at line 196 of file ShowerStartFinderTool.h.
|
protectedinherited |
|
private |
The sliding window used to fit the shower region.
Definition at line 202 of file ShowerStartFinderTool.h.
|
private |
The sliding window used to fit the shower spine.
Definition at line 194 of file ShowerStartFinderTool.h.
|
protectedinherited |