Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
lar_content::ShowerStartFinderTool Class Reference

#include "ShowerStartFinderTool.h"

Inheritance diagram for lar_content::ShowerStartFinderTool:
Collaboration diagram for lar_content::ShowerStartFinderTool:

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 PandoraGetPandora () 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 Pandoram_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::CaloHitListLayerToHitMap
 

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.
 

Detailed Description

Definition at line 20 of file ShowerStartFinderTool.h.

Member Typedef Documentation

◆ EnergySpectrumMap

typedef std::map<int, float> lar_content::ShowerStartFinderTool::EnergySpectrumMap
private

Definition at line 34 of file ShowerStartFinderTool.h.

◆ LayerToHitMap

Definition at line 35 of file ShowerStartFinderTool.h.

◆ LongitudinalPositionMap

Definition at line 33 of file ShowerStartFinderTool.h.

Constructor & Destructor Documentation

◆ ShowerStartFinderTool()

lar_content::ShowerStartFinderTool::ShowerStartFinderTool ( )

Default constructor.

Definition at line 26 of file ShowerStartFinderTool.cc.

Member Function Documentation

◆ BuildShowerRegion()

StatusCode lar_content::ShowerStartFinderTool::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
private

Build the downstream 'shower region' at a given longitudinal distance along the spine.

Parameters
pShowerPfothe shower pfo
hitTypethe 2D view
showerSpineHitListthe shower spine hit list
showerStartPositionthe candidate shower start position
showerStartDirectionthe candidate shower start direction
isEndDownstreamwhether the shower direction is downstream (in Z) of the neutrino vertex
showerRegionPositionVectorthe ouput vector of shower region hit positions
Returns
whether the 'shower region finder' mechanics could proceed

Definition at line 347 of file ShowerStartFinderTool.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CharacteriseInitialEnergy()

void lar_content::ShowerStartFinderTool::CharacteriseInitialEnergy ( const EnergySpectrumMap energySpectrumMap,
const bool  isEndDownstream,
float &  meanEnergy,
float &  energySigma 
) const
private

Find the mean and standard deviation of the energy depositions in the initial region.

Parameters
energySpectrumMapthe [longitudial projection bin -> contained energy] map
isEndDownstreamwhether the shower direction is downstream (in Z) of the neutrino vertex
meanEnergythe output mean energy
energySigmathe output standard deviation

Definition at line 243 of file ShowerStartFinderTool.cc.

Here is the caller graph for this function:

◆ CharacteriseShowerTopology()

StatusCode lar_content::ShowerStartFinderTool::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
private

Parameterise the topological structure of the shower region.

Parameters
showerRegionPositionVectorthe vector of shower region hit positions
showerStartPositionthe shower start position
hitTypethe 2D view
isEndDownstreamwhether the shower direction is downstream (in Z) of the neutrino vertex
showerStartDirectionthe shower start direction
positiveEdgeStartthe start position of one shower boundary
positiveEdgeEndthe end position of one shower boundary
negativeEdgeStartthe start position of the other shower boundary
negativeEdgeEndthe end position of the other shower boundary
isBetweenif the shower core is between either the start or end boundary positions
Returns
whether the 'shower characterisation' mechanics could proceed

Definition at line 492 of file ShowerStartFinderTool.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConvertLongitudinalProjectionToGlobal()

void lar_content::ShowerStartFinderTool::ConvertLongitudinalProjectionToGlobal ( const TwoDSlidingFitResult spineTwoDSlidingFit,
const float  longitudinalDistance,
pandora::CartesianVector globalPosition,
pandora::CartesianVector globalDirection 
) const
private

Determine the (X,Y,Z) position and direction at a given longitudinal distance along the spine.

Parameters
spineTwoDSlidingFitthe shower spine fit
longitudinalDistancethe input longitudinal distance
globalPositionthe output (X,Y,Z) position
globalDirectionthe output (X,Y,Z) direction

Definition at line 312 of file ShowerStartFinderTool.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindShowerStartAndDirection()

void lar_content::ShowerStartFinderTool::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
private

Find the position at which the shower cascade looks to originate, and its initial direction.

Parameters
pShowerPfothe shower pfo
hitTypethe 2D view
spineTwoDSlidingFitthe shower spine fit
energySpectrumMapthe [longitudial projection bin -> contained energy] map
showerSpineHitListthe shower spine hit list
isEndDownstreamwhether the shower direction is downstream (in Z) of the neutrino vertex
showerStartPositionthe position at which the shower cascade looks to originate
showerStartDirectionthe initial direction of the shower cascade

Definition at line 182 of file ShowerStartFinderTool.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindShowerStartLongitudinalCoordinate()

template<typename T >
int lar_content::ShowerStartFinderTool::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
private

Find the longitudinal bin which corresponds to the start position of the shower cascade.

Parameters
pShowerPfothe shower pfo
hitTypethe 2D view
spineTwoDSlidingFitthe shower spine fit
energySpectrumMapthe [longitudial projection bin -> contained energy] map
showerSpineHitListthe shower spine hit list
isEndDownstreamwhether the shower direction is downstream (in Z) of the neutrino vertex
startIterthe start iterator of energySpectrumMap
endIterthe end iterator of energySpectrumMap

Definition at line 210 of file ShowerStartFinderTool.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBoundaryExtremalPoints()

StatusCode lar_content::ShowerStartFinderTool::GetBoundaryExtremalPoints ( const TwoDSlidingShowerFitResult showerTwoDSlidingFit,
const LayerFitResultMap layerFitResultMap,
const pandora::CartesianVector showerStartPosition,
const int  showerStartLayer,
const int  showerEndLayer,
pandora::CartesianVector boundaryEdgeStart,
pandora::CartesianVector boundaryEdgeEnd 
) const
private

Determine the start and end positions of a shower boundary.

Parameters
showerTwoDSlidingFitthe shower fit
layerFitResultMapthe layer fit result map of the shower boundary fit
showerStartPositionthe shower start position
showerStartLayerthe shower start layer wrt the shower region fit
showerEndLayerthe shower end layer wrt the shower region fit
boundaryEdgeStartthe output boundary start position
boundaryEdgeEndthe output boundary end position
Returns
whether suitable positions could be found

Definition at line 606 of file ShowerStartFinderTool.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEnergyDistribution()

void lar_content::ShowerStartFinderTool::GetEnergyDistribution ( const pandora::CaloHitList showerSpineHitList,
const LongitudinalPositionMap longitudinalPositionMap,
EnergySpectrumMap energySpectrumMap 
) const
private

Create the longituidnal energy distribution.

Parameters
showerSpineHitListthe shower spine hit list
longitudinalPositionMapthe shower spine longitudinal projection map
energySpectrumMapthe output [longitudial projection bin -> contained energy] map

Definition at line 159 of file ShowerStartFinderTool.cc.

Here is the caller graph for this function:

◆ GetInstanceName()

const std::string & pandora::Process::GetInstanceName ( ) const
inlineinherited

Get the instance name.

Returns
The instance name

Definition at line 109 of file Process.h.

◆ GetPandora()

const Pandora & pandora::Process::GetPandora ( ) const
inlineinherited

Get the associated pandora instance.

Returns
the associated pandora instance

Definition at line 116 of file Process.h.

◆ GetType()

const std::string & pandora::Process::GetType ( ) const
inlineinherited

Get the type.

Returns
The type

Definition at line 102 of file Process.h.

◆ Initialize()

StatusCode pandora::Process::Initialize ( )
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.

Here is the caller graph for this function:

◆ IsClockwiseRotation()

bool lar_content::ShowerStartFinderTool::IsClockwiseRotation ( const pandora::CartesianVector showerStartDirection,
const pandora::CartesianVector displacementVector 
) const
private

Determine whether a point lies on the RHS or LHS (wrt +ve Z) of the shower core.

Parameters
showerStartDirectionthe shower start direction
displacementVectorthe input position wrt the shower start position
Returns
whether a point lies on the RHS or LHS (wrt +ve Z) of the shower core

Definition at line 584 of file ShowerStartFinderTool.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsShowerTopology()

bool lar_content::ShowerStartFinderTool::IsShowerTopology ( const pandora::ParticleFlowObject *const  pShowerPfo,
const pandora::HitType  hitType,
const TwoDSlidingFitResult spineTwoDSlidingFit,
const float  longitudinalDistance,
const pandora::CaloHitList showerSpineHitList,
const bool  isEndDownstream 
) const
private

Whether a sensible shower cascade looks to originate at a given position.

Parameters
pShowerPfothe shower pfo
hitTypethe 2D view
spineTwoDSlidingFitthe shower spine fit
longitudinalDistancethe longitudinal projection of the candidate shower start position
showerSpineHitListthe shower spine hit list
isEndDownstreamwhether the shower direction is downstream (in Z) of the neutrino vertex
Returns
whether a sensible shower cascade looks to originate at the given position

Definition at line 269 of file ShowerStartFinderTool.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ObtainLongitudinalDecomposition()

void lar_content::ShowerStartFinderTool::ObtainLongitudinalDecomposition ( const TwoDSlidingFitResult spineTwoDSlidingFit,
const pandora::CaloHitList showerSpineHitList,
LongitudinalPositionMap longitudinalPositionMap 
) const
private

Create the [shower spine hit -> shower spine fit longitudinal projection] map.

Parameters
spineTwoDSlidingFitthe shower spine fit
showerSpineHitListthe shower spine hit list
longitudinalPositionMapthe output shower spine longitudinal projection map

Definition at line 79 of file ShowerStartFinderTool.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadSettings()

StatusCode lar_content::ShowerStartFinderTool::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
privatevirtual

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Implements pandora::Process.

Definition at line 653 of file ShowerStartFinderTool.cc.

Here is the call graph for this function:

◆ RegisterDetails()

StatusCode pandora::Process::RegisterDetails ( const Pandora *const  pPandora,
const std::string &  type,
const std::string &  instanceName 
)
inlineprotectedinherited

Register i) the pandora instance that will run the process and ii) the process type.

Parameters
pPandoraaddress of the pandora object that will run the process
typethe process type
instanceNamethe process instance name

Definition at line 146 of file Process.h.

Here is the caller graph for this function:

◆ Reset()

StatusCode pandora::Process::Reset ( )
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.

Here is the caller graph for this function:

◆ Run()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_instanceName

std::string pandora::Process::m_instanceName
protectedinherited

The process instance name.

Definition at line 89 of file Process.h.

◆ m_longitudinalCoordinateBinSize

float lar_content::ShowerStartFinderTool::m_longitudinalCoordinateBinSize
private

The longitudinal coordinate bin size.

Definition at line 195 of file ShowerStartFinderTool.h.

◆ m_longitudinalShowerFraction

float lar_content::ShowerStartFinderTool::m_longitudinalShowerFraction
private

The shower region fraction considered.

Definition at line 199 of file ShowerStartFinderTool.h.

◆ m_maxEdgeGap

float lar_content::ShowerStartFinderTool::m_maxEdgeGap
private

The max. allowed layer gap in a shower boundary.

Definition at line 198 of file ShowerStartFinderTool.h.

◆ m_maxLayerSeparation

int lar_content::ShowerStartFinderTool::m_maxLayerSeparation
private

The max. allowed separation between the shower start and boundary start layers.

Definition at line 203 of file ShowerStartFinderTool.h.

◆ m_minShowerOpeningAngle

float lar_content::ShowerStartFinderTool::m_minShowerOpeningAngle
private

The min. opening angle of a sensible shower.

Definition at line 200 of file ShowerStartFinderTool.h.

◆ m_minSigmaDeviation

float lar_content::ShowerStartFinderTool::m_minSigmaDeviation
private

The min. average energy deviation of a candidate shower start.

Definition at line 197 of file ShowerStartFinderTool.h.

◆ m_molliereRadius

float lar_content::ShowerStartFinderTool::m_molliereRadius
private

The max. distance from the shower core of a collected shower region hit.

Definition at line 201 of file ShowerStartFinderTool.h.

◆ m_nInitialEnergyBins

unsigned int lar_content::ShowerStartFinderTool::m_nInitialEnergyBins
private

The number of longitudinal bins that define the initial region.

Definition at line 196 of file ShowerStartFinderTool.h.

◆ m_pPandora

const Pandora* pandora::Process::m_pPandora
protectedinherited

The pandora object that will run the process.

Definition at line 87 of file Process.h.

◆ m_showerSlidingFitWindow

unsigned int lar_content::ShowerStartFinderTool::m_showerSlidingFitWindow
private

The sliding window used to fit the shower region.

Definition at line 202 of file ShowerStartFinderTool.h.

◆ m_spineSlidingFitWindow

unsigned int lar_content::ShowerStartFinderTool::m_spineSlidingFitWindow
private

The sliding window used to fit the shower spine.

Definition at line 194 of file ShowerStartFinderTool.h.

◆ m_type

std::string pandora::Process::m_type
protectedinherited

The process type.

Definition at line 88 of file Process.h.


The documentation for this class was generated from the following files: