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

ThreeDHitCreationAlgorithm::Algorithm class. More...

#include "ThreeDHitCreationAlgorithm.h"

Inheritance diagram for lar_content::ThreeDHitCreationAlgorithm:
Collaboration diagram for lar_content::ThreeDHitCreationAlgorithm:

Classes

class  ProtoHit
 Proto hits are temporary constructs to be used during iterative 3D hit procedure. More...
 
class  TrajectorySample
 Trajectory samples record the results of sampling a particles in a particular view. More...
 

Public Types

typedef std::vector< TrajectorySampleTrajectorySampleVector
 
typedef std::vector< ProtoHitProtoHitVector
 

Public Member Functions

 ThreeDHitCreationAlgorithm ()
 Default constructor.
 
void FilterCaloHitsByType (const pandora::CaloHitVector &inputCaloHitVector, const pandora::HitType hitType, pandora::CaloHitVector &outputCaloHitVector) const
 Get the subset of a provided calo hit vector corresponding to a specified hit type.
 
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::vector< HitCreationBaseTool * > HitCreationToolVector
 

Private Member Functions

pandora::StatusCode Run ()
 Run the algorithm.
 
void SeparateTwoDHits (const pandora::ParticleFlowObject *const pPfo, const ProtoHitVector &protoHitVector, pandora::CaloHitVector &remainingHitVector) const
 Get the list of 2D calo hits in a pfo for which 3D hits have and have not been created.
 
void IterativeTreatment (ProtoHitVector &protoHitVector) const
 Improve initial 3D hits by fitting proto hits and iteratively creating consisted 3D hit trajectory.
 
void ExtractResults (const ProtoHitVector &protoHitVector, double &chi2, pandora::CartesianPointVector &pointVector) const
 Extract key results from a provided proto hit vector.
 
double GetChi2WrtFit (const ThreeDSlidingFitResult &slidingFitResult, const ProtoHitVector &protoHitVector) const
 Receive a chi2 value indicating consistency of a list of proto hits with a provided 3D sliding fit trajectory.
 
double GetHitMovementChi2 (const ProtoHitVector &protoHitVector) const
 Receive a chi2 value indicating consistency of a list of proto hits with the original, input hit positions.
 
void RefineHitPositions (const ThreeDSlidingFitResult &slidingFitResult, ProtoHitVector &protoHitVector) const
 Refine the 3D hit positions (and chi2) for a list of proto hits, in accordance with a provided 3D sliding fit trajectory.
 
void CreateThreeDHits (const ProtoHitVector &protoHitVector, pandora::CaloHitList &newThreeDHits) const
 Create new three dimensional hits from two dimensional hits.
 
void CreateThreeDHit (const ProtoHit &protoHit, const pandora::CaloHit *&pCaloHit3D) const
 Create a new three dimensional hit from a two dimensional hit.
 
bool CheckThreeDHit (const ProtoHit &protoHit) const
 Check that a new three dimensional position is not unphysical.
 
void AddThreeDHitsToPfo (const pandora::ParticleFlowObject *const pPfo, const pandora::CaloHitList &caloHitList) const
 Add a specified list of three dimensional hits to a cluster in a pfo, creating the new cluster if required.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 

Private Attributes

HitCreationToolVector m_algorithmToolVector
 The algorithm tool vector.
 
std::string m_inputPfoListName
 The name of the input pfo list.
 
std::string m_outputCaloHitListName
 The name of the output calo hit list.
 
std::string m_outputClusterListName
 The name of the output cluster list.
 
bool m_iterateTrackHits
 Whether to enable iterative improvement of 3D hits for track trajectories.
 
bool m_iterateShowerHits
 Whether to enable iterative improvement of 3D hits for showers.
 
unsigned int m_slidingFitHalfWindow
 The sliding linear fit half window.
 
unsigned int m_nHitRefinementIterations
 The maximum number of hit refinement iterations.
 
double m_sigma3DFitMultiplier
 Multiplicative factor: sigmaUVW (same as sigmaHit and sigma2DFit) to sigma3DFit.
 
double m_iterationMaxChi2Ratio
 Max ratio between current and previous chi2 values to cease iterations.
 

Detailed Description

ThreeDHitCreationAlgorithm::Algorithm class.

Definition at line 27 of file ThreeDHitCreationAlgorithm.h.

Member Typedef Documentation

◆ HitCreationToolVector

◆ ProtoHitVector

◆ TrajectorySampleVector

Constructor & Destructor Documentation

◆ ThreeDHitCreationAlgorithm()

lar_content::ThreeDHitCreationAlgorithm::ThreeDHitCreationAlgorithm ( )

Default constructor.

Definition at line 27 of file ThreeDHitCreationAlgorithm.cc.

Member Function Documentation

◆ AddThreeDHitsToPfo()

void lar_content::ThreeDHitCreationAlgorithm::AddThreeDHitsToPfo ( const pandora::ParticleFlowObject *const  pPfo,
const pandora::CaloHitList caloHitList 
) const
private

Add a specified list of three dimensional hits to a cluster in a pfo, creating the new cluster if required.

Parameters
pPfothe address of the pfo
caloHitListthe list of three dimensional hits

Definition at line 391 of file ThreeDHitCreationAlgorithm.cc.

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

◆ CheckThreeDHit()

bool lar_content::ThreeDHitCreationAlgorithm::CheckThreeDHit ( const ProtoHit protoHit) const
private

Check that a new three dimensional position is not unphysical.

Parameters
protoHitthe proto hit
boolean

Definition at line 373 of file ThreeDHitCreationAlgorithm.cc.

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

◆ CreateThreeDHit()

void lar_content::ThreeDHitCreationAlgorithm::CreateThreeDHit ( const ProtoHit protoHit,
const pandora::CaloHit *&  pCaloHit3D 
) const
private

Create a new three dimensional hit from a two dimensional hit.

Parameters
protoHitthe proto hit containing all required information
pCaloHit3Dto receive the address of the new three dimensional calo hit

Definition at line 338 of file ThreeDHitCreationAlgorithm.cc.

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

◆ CreateThreeDHits()

void lar_content::ThreeDHitCreationAlgorithm::CreateThreeDHits ( const ProtoHitVector protoHitVector,
pandora::CaloHitList newThreeDHits 
) const
private

Create new three dimensional hits from two dimensional hits.

Parameters
protoHitVectorthe input proto hit vector
newThreeDHitsto receive the addresses of the new three dimensional calo hits

Definition at line 322 of file ThreeDHitCreationAlgorithm.cc.

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

◆ ExtractResults()

void lar_content::ThreeDHitCreationAlgorithm::ExtractResults ( const ProtoHitVector protoHitVector,
double &  chi2,
pandora::CartesianPointVector pointVector 
) const
private

Extract key results from a provided proto hit vector.

Parameters
protoHitVectorthe proto hit vector
chi2to receive the sum of the proto hit chi2 values
pointVectorto receive a vector of proto hit 3D positions

Definition at line 180 of file ThreeDHitCreationAlgorithm.cc.

Here is the caller graph for this function:

◆ FilterCaloHitsByType()

void lar_content::ThreeDHitCreationAlgorithm::FilterCaloHitsByType ( const pandora::CaloHitVector inputCaloHitVector,
const pandora::HitType  hitType,
pandora::CaloHitVector outputCaloHitVector 
) const

Get the subset of a provided calo hit vector corresponding to a specified hit type.

Parameters
inputCaloHitVectorthe input calo hit vector
hitTypethe hit type to filter upon
outputCaloHitVectorto receive the output calo hit vector

Definition at line 39 of file ThreeDHitCreationAlgorithm.cc.

Here is the caller graph for this function:

◆ GetChi2WrtFit()

double lar_content::ThreeDHitCreationAlgorithm::GetChi2WrtFit ( const ThreeDSlidingFitResult slidingFitResult,
const ProtoHitVector protoHitVector 
) const
private

Receive a chi2 value indicating consistency of a list of proto hits with a provided 3D sliding fit trajectory.

Parameters
slidingFitResultthe 3D sliding fit result
protoHitVectorthe proto hit vector
Returns
the chi2 value

Definition at line 194 of file ThreeDHitCreationAlgorithm.cc.

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

◆ GetHitMovementChi2()

double lar_content::ThreeDHitCreationAlgorithm::GetHitMovementChi2 ( const ProtoHitVector protoHitVector) const
private

Receive a chi2 value indicating consistency of a list of proto hits with the original, input hit positions.

Parameters
protoHitVectorthe proto hit vector
Returns
the chi2 value

Definition at line 230 of file ThreeDHitCreationAlgorithm.cc.

Here is the call 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:

◆ IterativeTreatment()

void lar_content::ThreeDHitCreationAlgorithm::IterativeTreatment ( ProtoHitVector protoHitVector) const
private

Improve initial 3D hits by fitting proto hits and iteratively creating consisted 3D hit trajectory.

Parameters
protoHitVectorthe vector of proto hits, describing current state of 3D hit construction

Definition at line 138 of file ThreeDHitCreationAlgorithm.cc.

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

◆ ReadSettings()

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

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Implements pandora::Process.

Definition at line 463 of file ThreeDHitCreationAlgorithm.cc.

Here is the call graph for this function:

◆ RefineHitPositions()

void lar_content::ThreeDHitCreationAlgorithm::RefineHitPositions ( const ThreeDSlidingFitResult slidingFitResult,
ProtoHitVector protoHitVector 
) const
private

Refine the 3D hit positions (and chi2) for a list of proto hits, in accordance with a provided 3D sliding fit trajectory.

Parameters
slidingFitResultthe 3D sliding fit result
protoHitVectorthe proto hit vector, non const as proto hit properties will be updated

Definition at line 251 of file ThreeDHitCreationAlgorithm.cc.

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

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 50 of file ThreeDHitCreationAlgorithm.cc.

Here is the call graph for this function:

◆ SeparateTwoDHits()

void lar_content::ThreeDHitCreationAlgorithm::SeparateTwoDHits ( const pandora::ParticleFlowObject *const  pPfo,
const ProtoHitVector protoHitVector,
pandora::CaloHitVector remainingHitVector 
) const
private

Get the list of 2D calo hits in a pfo for which 3D hits have and have not been created.

Parameters
pPfothe address of the pfo
protoHitVectorthe vector of proto hits, describing current state of 3D hit construction
remainingHitVectorto receive the vector of 2D calo hits for which 3D hits have not been created

Definition at line 105 of file ThreeDHitCreationAlgorithm.cc.

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

Member Data Documentation

◆ m_algorithmToolVector

HitCreationToolVector lar_content::ThreeDHitCreationAlgorithm::m_algorithmToolVector
private

The algorithm tool vector.

Definition at line 272 of file ThreeDHitCreationAlgorithm.h.

◆ m_inputPfoListName

std::string lar_content::ThreeDHitCreationAlgorithm::m_inputPfoListName
private

The name of the input pfo list.

Definition at line 274 of file ThreeDHitCreationAlgorithm.h.

◆ m_instanceName

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

The process instance name.

Definition at line 89 of file Process.h.

◆ m_iterateShowerHits

bool lar_content::ThreeDHitCreationAlgorithm::m_iterateShowerHits
private

Whether to enable iterative improvement of 3D hits for showers.

Definition at line 279 of file ThreeDHitCreationAlgorithm.h.

◆ m_iterateTrackHits

bool lar_content::ThreeDHitCreationAlgorithm::m_iterateTrackHits
private

Whether to enable iterative improvement of 3D hits for track trajectories.

Definition at line 278 of file ThreeDHitCreationAlgorithm.h.

◆ m_iterationMaxChi2Ratio

double lar_content::ThreeDHitCreationAlgorithm::m_iterationMaxChi2Ratio
private

Max ratio between current and previous chi2 values to cease iterations.

Definition at line 283 of file ThreeDHitCreationAlgorithm.h.

◆ m_nHitRefinementIterations

unsigned int lar_content::ThreeDHitCreationAlgorithm::m_nHitRefinementIterations
private

The maximum number of hit refinement iterations.

Definition at line 281 of file ThreeDHitCreationAlgorithm.h.

◆ m_outputCaloHitListName

std::string lar_content::ThreeDHitCreationAlgorithm::m_outputCaloHitListName
private

The name of the output calo hit list.

Definition at line 275 of file ThreeDHitCreationAlgorithm.h.

◆ m_outputClusterListName

std::string lar_content::ThreeDHitCreationAlgorithm::m_outputClusterListName
private

The name of the output cluster list.

Definition at line 276 of file ThreeDHitCreationAlgorithm.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_sigma3DFitMultiplier

double lar_content::ThreeDHitCreationAlgorithm::m_sigma3DFitMultiplier
private

Multiplicative factor: sigmaUVW (same as sigmaHit and sigma2DFit) to sigma3DFit.

Definition at line 282 of file ThreeDHitCreationAlgorithm.h.

◆ m_slidingFitHalfWindow

unsigned int lar_content::ThreeDHitCreationAlgorithm::m_slidingFitHalfWindow
private

The sliding linear fit half window.

Definition at line 280 of file ThreeDHitCreationAlgorithm.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: