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

DeltaRayRemovalTool class. More...

#include "DeltaRayRemovalTool.h"

Inheritance diagram for lar_content::DeltaRayRemovalTool:
Collaboration diagram for lar_content::DeltaRayRemovalTool:

Public Types

typedef std::vector< pandora::HitTypeHitTypeVector
 
typedef ThreeViewDeltaRayMatchingAlgorithm::MatchingType::TensorType TensorType
 
typedef std::vector< TensorType::ElementList::const_iterator > IteratorList
 

Public Member Functions

 DeltaRayRemovalTool ()
 Default constructor.
 
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.
 

Public Attributes

ThreeViewDeltaRayMatchingAlgorithmm_pParentAlgorithm
 Address of the parent matching algorithm.
 

Protected Member Functions

bool IsMuonEndpoint (const TensorType::Element &element, const bool ignoreHitType, const pandora::HitType hitTypeToIgnore=pandora::TPC_VIEW_U) const
 Determine whether the matched clusters suggest that the delta ray is at the endpoint of the cosmic ray (and is likely to be a michel)
 
bool IsBestElement (const TensorType::Element &element, const pandora::HitType hitType, const TensorType::ElementList &elementList, const pandora::ClusterSet &modifiedClusters) const
 Determine whether the input element is the best to use to modify the contaminated cluster (best is defined by the total hit count)
 
bool IsCloseToLine (const pandora::CartesianVector &hitPosition, const pandora::CartesianVector &lineStart, const pandora::CartesianVector &lineEnd, const float distanceToLine) const
 Whether a given position is close to a defined line.
 
bool IsInLineSegment (const pandora::CartesianVector &lowerBoundary, const pandora::CartesianVector &upperBoundary, const pandora::CartesianVector &point) const
 Whether the projection of a given position lies on a defined line.
 
void FindExtrapolatedHits (const pandora::Cluster *const pCluster, const pandora::CartesianVector &lowerBoundary, const pandora::CartesianVector &upperBoundary, pandora::CaloHitList &collectedHits) const
 Collect the hits that are closest to and can be projected onto a defined line.
 
pandora::StatusCode ProjectDeltaRayPositions (const TensorType::Element &element, const pandora::HitType hitType, pandora::CartesianPointVector &projectedPositions) const
 Use two views of a delta ray pfo to calculate projected positions in a given third view.
 
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

float m_minSeparation
 The minimum delta ray - parent muon cluster separation required to investigate a delta/cosmic ray cluster.
 
float m_distanceToLine
 The maximum perpendicular distance of a position to a line for it to be considered close.
 
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 Member Functions

bool Run (ThreeViewDeltaRayMatchingAlgorithm *const pAlgorithm, TensorType &overlapTensor)
 Run the algorithm tool.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 
bool RemoveDeltaRayHits (const TensorType::ElementList &elementList) const
 Remove hits from cosmic ray clusters that belong to a child delta ray.
 
virtual bool PassElementChecks (const TensorType::Element &element, const pandora::HitType hitType) const
 Determine whether element satifies simple checks.
 
bool IsContaminated (const TensorType::Element &element, const pandora::HitType hitType) const
 Determine whether the cosmic ray cluster under investigation has delta ray contamination.
 
void SplitMuonCluster (const TensorType::Element &element, const pandora::HitType hitType, const pandora::CaloHitList &deltaRayHits) const
 Remove collected delta ray hits from the cosmic ray pfo.
 

Private Attributes

unsigned int m_slidingFitWindow
 The sliding fit window used in cosmic ray parameterisations.
 
float m_minDeviationFromTransverse
 The minimum deviation from transverse required to avoid mistakes.
 
float m_contaminationWindow
 The distance in which to search for delta ray contamination in the cosmic ray track.
 
unsigned int m_significantHitThreshold
 The threshold number of hits which define significant contimination.
 
float m_minDistanceFromMuon
 The minimum distance of a hit from the cosmic ray track required for removal.
 
float m_maxDistanceToCollected
 The maximim distance of a hit from the projected delta ray hits required for removal.
 

Detailed Description

DeltaRayRemovalTool class.

Definition at line 19 of file DeltaRayRemovalTool.h.

Member Typedef Documentation

◆ HitTypeVector

Definition at line 21 of file RemovalBaseTool.h.

◆ IteratorList

typedef std::vector<TensorType::ElementList::const_iterator> lar_content::DeltaRayTensorTool::IteratorList
inherited

Definition at line 102 of file ThreeViewDeltaRayMatchingAlgorithm.h.

◆ TensorType

typedef ThreeViewDeltaRayMatchingAlgorithm::MatchingType::TensorType lar_content::DeltaRayTensorTool::TensorType
inherited

Definition at line 101 of file ThreeViewDeltaRayMatchingAlgorithm.h.

Constructor & Destructor Documentation

◆ DeltaRayRemovalTool()

lar_content::DeltaRayRemovalTool::DeltaRayRemovalTool ( )

Default constructor.

Definition at line 23 of file DeltaRayRemovalTool.cc.

Member Function Documentation

◆ FindExtrapolatedHits()

void lar_content::RemovalBaseTool::FindExtrapolatedHits ( const pandora::Cluster *const  pCluster,
const pandora::CartesianVector lowerBoundary,
const pandora::CartesianVector upperBoundary,
pandora::CaloHitList collectedHits 
) const
protectedinherited

Collect the hits that are closest to and can be projected onto a defined line.

Parameters
pClusterthe address of the input cluster containing the hits to be investigated
lowerBoundarythe start position of the line
upperBoundarythe end position of the line
collectedHitsthe collected hits

Definition at line 150 of file RemovalBaseTool.cc.

Here is the call graph for this function:
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:

◆ IsBestElement()

bool lar_content::RemovalBaseTool::IsBestElement ( const TensorType::Element &  element,
const pandora::HitType  hitType,
const TensorType::ElementList &  elementList,
const pandora::ClusterSet modifiedClusters 
) const
protectedinherited

Determine whether the input element is the best to use to modify the contaminated cluster (best is defined by the total hit count)

Parameters
elementthe tensor element
hitTypethe hit type of the cluster under investigation
elementListthe tensor element list
modifiedClustersthe set of modified clusters
Returns
whether the input element is the best element

Definition at line 76 of file RemovalBaseTool.cc.

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

◆ IsCloseToLine()

bool lar_content::RemovalBaseTool::IsCloseToLine ( const pandora::CartesianVector hitPosition,
const pandora::CartesianVector lineStart,
const pandora::CartesianVector lineEnd,
const float  distanceToLine 
) const
protectedinherited

Whether a given position is close to a defined line.

Parameters
hitPositionthe input position
lineStartthe start position of the line
lineEndthe end position of the line
distanceToLinethe definition of close
Returns
whether the position is close to the definied line

Definition at line 111 of file RemovalBaseTool.cc.

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

◆ IsContaminated()

bool lar_content::DeltaRayRemovalTool::IsContaminated ( const TensorType::Element &  element,
const pandora::HitType  hitType 
) const
private

Determine whether the cosmic ray cluster under investigation has delta ray contamination.

Parameters
elementthe tensor element
hitTypethe hit type of the view under investigation
Returns
whether the cosmic ray cluster is likely to contain delta ray hits that can be removed

Definition at line 126 of file DeltaRayRemovalTool.cc.

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

◆ IsInLineSegment()

bool lar_content::RemovalBaseTool::IsInLineSegment ( const pandora::CartesianVector lowerBoundary,
const pandora::CartesianVector upperBoundary,
const pandora::CartesianVector point 
) const
protectedinherited

Whether the projection of a given position lies on a defined line.

Parameters
lowerBoundarythe start position of the line
upperBoundarythe end position of the line
pointthe input position
Returns
whether the position lies between the two points

Definition at line 127 of file RemovalBaseTool.cc.

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

◆ IsMuonEndpoint()

bool lar_content::RemovalBaseTool::IsMuonEndpoint ( const TensorType::Element &  element,
const bool  ignoreHitType,
const pandora::HitType  hitTypeToIgnore = pandora::TPC_VIEW_U 
) const
protectedinherited

Determine whether the matched clusters suggest that the delta ray is at the endpoint of the cosmic ray (and is likely to be a michel)

Parameters
elementthe tensor element
ignoreHitTypewhether to ignore the cluster under investigation
hitTypeToIgnorethe hit type to ignore
Returns
whether the delta ray is at the endpoint of the cosmic ray

Definition at line 40 of file RemovalBaseTool.cc.

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

◆ PassElementChecks()

bool lar_content::DeltaRayRemovalTool::PassElementChecks ( const TensorType::Element &  element,
const pandora::HitType  hitType 
) const
privatevirtual

Determine whether element satifies simple checks.

Parameters
elementthe tensor element
hitTypethe hit type of the cluster under investigation
Returns
whether the checks pass

Implements lar_content::RemovalBaseTool.

Definition at line 115 of file DeltaRayRemovalTool.cc.

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

◆ ProjectDeltaRayPositions()

StatusCode lar_content::RemovalBaseTool::ProjectDeltaRayPositions ( const TensorType::Element &  element,
const pandora::HitType  hitType,
pandora::CartesianPointVector projectedPositions 
) const
protectedinherited

Use two views of a delta ray pfo to calculate projected positions in a given third view.

Parameters
elementthe tensor element
hitTypethe view to be projected into
projectedPositionsthe output list of projected positions
Returns
a status code reflecting whether the procedure ran smoothly and if the outcome is good

Definition at line 170 of file RemovalBaseTool.cc.

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

◆ ReadSettings()

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

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Implements lar_content::RemovalBaseTool.

Definition at line 201 of file DeltaRayRemovalTool.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:

◆ RemoveDeltaRayHits()

bool lar_content::DeltaRayRemovalTool::RemoveDeltaRayHits ( const TensorType::ElementList &  elementList) const
private

Remove hits from cosmic ray clusters that belong to a child delta ray.

Parameters
elementListthe tensor element list
Returns
changesMade whether clusters in element have been modified

Definition at line 69 of file DeltaRayRemovalTool.cc.

Here is the call graph for this function:
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()

bool lar_content::DeltaRayRemovalTool::Run ( ThreeViewDeltaRayMatchingAlgorithm *const  pAlgorithm,
TensorType overlapTensor 
)
privatevirtual

Run the algorithm tool.

Parameters
pAlgorithmaddress of the calling algorithm
overlapTensorthe overlap tensor
Returns
whether changes have been made by the tool

Implements lar_content::RemovalBaseTool.

Definition at line 35 of file DeltaRayRemovalTool.cc.

Here is the call graph for this function:

◆ SplitMuonCluster()

void lar_content::DeltaRayRemovalTool::SplitMuonCluster ( const TensorType::Element &  element,
const pandora::HitType  hitType,
const pandora::CaloHitList deltaRayHits 
) const
private

Remove collected delta ray hits from the cosmic ray pfo.

Parameters
elementthe tensor element
hitTypethe hit type of the cluster under investigation
deltaRayHitsthe list of delta ray hits to remove

Definition at line 178 of file DeltaRayRemovalTool.cc.

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

Member Data Documentation

◆ m_contaminationWindow

float lar_content::DeltaRayRemovalTool::m_contaminationWindow
private

The distance in which to search for delta ray contamination in the cosmic ray track.

Definition at line 71 of file DeltaRayRemovalTool.h.

◆ m_distanceToLine

float lar_content::RemovalBaseTool::m_distanceToLine
protectedinherited

The maximum perpendicular distance of a position to a line for it to be considered close.

Definition at line 115 of file RemovalBaseTool.h.

◆ m_instanceName

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

The process instance name.

Definition at line 89 of file Process.h.

◆ m_maxDistanceToCollected

float lar_content::DeltaRayRemovalTool::m_maxDistanceToCollected
private

The maximim distance of a hit from the projected delta ray hits required for removal.

Definition at line 74 of file DeltaRayRemovalTool.h.

◆ m_minDeviationFromTransverse

float lar_content::DeltaRayRemovalTool::m_minDeviationFromTransverse
private

The minimum deviation from transverse required to avoid mistakes.

Definition at line 70 of file DeltaRayRemovalTool.h.

◆ m_minDistanceFromMuon

float lar_content::DeltaRayRemovalTool::m_minDistanceFromMuon
private

The minimum distance of a hit from the cosmic ray track required for removal.

Definition at line 73 of file DeltaRayRemovalTool.h.

◆ m_minSeparation

float lar_content::RemovalBaseTool::m_minSeparation
protectedinherited

The minimum delta ray - parent muon cluster separation required to investigate a delta/cosmic ray cluster.

Definition at line 114 of file RemovalBaseTool.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_pParentAlgorithm

ThreeViewDeltaRayMatchingAlgorithm* lar_content::DeltaRayTensorTool::m_pParentAlgorithm
inherited

Address of the parent matching algorithm.

Definition at line 114 of file ThreeViewDeltaRayMatchingAlgorithm.h.

◆ m_significantHitThreshold

unsigned int lar_content::DeltaRayRemovalTool::m_significantHitThreshold
private

The threshold number of hits which define significant contimination.

Definition at line 72 of file DeltaRayRemovalTool.h.

◆ m_slidingFitWindow

unsigned int lar_content::DeltaRayRemovalTool::m_slidingFitWindow
private

The sliding fit window used in cosmic ray parameterisations.

Definition at line 69 of file DeltaRayRemovalTool.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: