Pandora
Pandora source code navigator
|
ElectronInitialRegionRefinementAlgorithm class. More...
#include "ElectronInitialRegionRefinementAlgorithm.h"
Public Member Functions | |
ElectronInitialRegionRefinementAlgorithm () | |
Default constructor. | |
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::MCParticle *, pandora::CaloHitList > | HitOwnershipMap |
Private Member Functions | |
pandora::StatusCode | Run () |
Run the algorithm. | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Read the algorithm settings. | |
void | FillShowerPfoVector (pandora::PfoVector &showerPfoVector) const |
Obtain a sorted vector of the reconstructed shower pfos. | |
void | RefineShower (const pandora::ParticleFlowObject *const pShowerPfo) const |
Find and evaluate shower connection pathway, removing if necessary. | |
pandora::StatusCode | GetNeutrinoVertex (pandora::CartesianVector &nuVertex3D) const |
Obtain the reconstructed neutrino vertex. | |
void | BuildViewProtoShowers (const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, pandora::HitType hitType, ProtoShowerVector &protoShowerVector) const |
Build the 2D ProtoShower objects for a given view. | |
pandora::StatusCode | GetHitListOfType (const pandora::HitType hitType, const pandora::CaloHitList *&pCaloHitList) const |
Obtain the event hit list of a given view. | |
pandora::CartesianVector | GetShowerVertex (const pandora::ParticleFlowObject *const pShowerPfo, const pandora::HitType hitType, const pandora::CartesianVector &nuVertex3D) const |
Fit the shower to obtain a 2D shower vertex. | |
void | RefineShowerVertex (const pandora::ParticleFlowObject *const pShowerPfo, const pandora::HitType hitType, const pandora::CartesianVector &nuVertex3D, const pandora::CartesianVector &peakDirection, pandora::CartesianVector &showerVertexPosition) const |
Move the shower vertex closer to the connection pathway. | |
bool | IsShowerConnected (const pandora::CartesianVector &showerVertexPosition, const pandora::CartesianVector &nuVertex2D, const pandora::CartesianVector &peakDirection) const |
To determine whether the shower vertex lies on the connection pathway. | |
bool | IsSpineCoincident (const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, const pandora::HitType hitType, const pandora::CartesianVector &showerVertex, const pandora::CaloHitList &showerSpineHitList) const |
To determine if the hits downstream of the shower vertex lie within the shower. | |
void | BuildViewPathways (const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CaloHitList &protectedHits, const pandora::CartesianVector &nuVertex3D, pandora::HitType hitType, ConnectionPathwayVector &viewPathways) const |
Build the connection pathways of all other particles in the event. | |
void | RefineHitsToAdd (const pandora::CartesianVector &nuVertex3D, const pandora::HitType hitType, const ConnectionPathwayVector &viewPathways, ProtoShower &protoShower) const |
Determine the continuous and unambiguous hits to add to an electron-like shower pfo. | |
void | FindContinuousPath (const pandora::CaloHitList &refinedHitList, const pandora::CartesianVector &nuVertex2D, pandora::CaloHitList &continuousHitList) const |
Find the continuous path of hits that lies closest to a given point. | |
void | SetMetadata (const pandora::ParticleFlowObject *const pShowerPfo, const LArMvaHelper::MvaFeatureMap &featureMap) const |
Add the shower characterisation information to the pfo metadata. | |
void | FillElectronHitMap (HitOwnershipMap &electronHitMap) const |
Determine the one-to-one mapping of leading MCParticle electrons and the hits which contain their energy depositions. | |
bool | IsElectron (const pandora::ParticleFlowObject *const pShowerPfo, const HitOwnershipMap &electronHitMap) const |
To determine whether a pfo is a true leading electron via its completeness and purity. | |
Private Attributes | |
PeakDirectionFinderTool * | m_pShowerPeakDirectionFinderTool |
The shower initial pathway direction finder tool. | |
PeakDirectionFinderTool * | m_pEventPeakDirectionFinderTool |
The other (not incl. shower) initial pathway direction finder tool. | |
ShowerSpineFinderTool * | m_pShowerSpineFinderTool |
The shower spine finder tool for the shower. | |
ShowerSpineFinderTool * | m_pEventPathwayFinderTool |
The shower spine finder tool for all other event particles. | |
ShowerStartFinderTool * | m_pShowerStartFinderTool |
The shower start finder tool. | |
ProtoShowerMatchingTool * | m_pProtoShowerMatchingTool |
The 2D -> 3D ProtoShower matching tool. | |
std::string | m_showerPfoListName |
The shower pfo list name. | |
std::string | m_neutrinoVertexListName |
The neutrino vertex list name. | |
std::string | m_caloHitListNameU |
The U calo hit list name. | |
std::string | m_caloHitListNameV |
The V calo hit list name. | |
std::string | m_caloHitListNameW |
The W calo hit list name. | |
unsigned int | m_minShowerHits3D |
The min. number of hits of a significant shower. | |
unsigned int | m_showerSlidingFitWindow |
The sliding fit window for shower fits. | |
float | m_maxCoincidenceTransverseSeparation |
The max. transverse distance from the pathway direction of a coincident shower vertex. | |
float | m_minSpinePurity |
The min. purity of a coincident shower spine downstream of the shower vertex. | |
bool | m_trainingMode |
Whether to run the algorithm to train the BDT. | |
std::string | m_trainingFileName |
The name of the output training file name. | |
float | m_unambiguousThreshold |
The min. transverse distance of an unambiguous shower hit from another pathway direction. | |
float | m_maxConnectionDistance |
The max. distance between connected hits. | |
unsigned int | m_minNConnectedHits |
The number of connected hits needed for a conntected pathway. | |
float | m_minElectronCompleteness |
The min. completeness of an electron-like pfo. | |
float | m_minElectronPurity |
The min. purity of an electron-like pfo. | |
float | m_maxSeparationFromHit |
The max. separation between the projected 3D shower start and the closest 2D shower hit. | |
float | m_maxProjectionSeparation |
The max. separation between the projected 3D shower start and the shower start of that view. | |
float | m_maxXSeparation |
The max. drift-coordinate separation between a 3D shower start and a matched 2D shower hit. | |
ConnectionPathwayFeatureTool::FeatureToolMap | m_featureToolMap |
The feature tool map. | |
pandora::StringVector | m_algorithmToolNames |
The algorithm tool names. | |
ElectronInitialRegionRefinementAlgorithm class.
Definition at line 26 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
Definition at line 35 of file ElectronInitialRegionRefinementAlgorithm.h.
lar_content::ElectronInitialRegionRefinementAlgorithm::ElectronInitialRegionRefinementAlgorithm | ( | ) |
Default constructor.
Definition at line 32 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
Build the connection pathways of all other particles in the event.
pShowerPfo | the input shower pfo |
protectedHits | the list of protected hits which will not be considered |
nuVertex3D | the 3D neutrino vertex |
hitType | the 2D view |
viewPathways | the output vector of found connection pathways |
Definition at line 402 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
Build the 2D ProtoShower objects for a given view.
pShowerPfo | the input shower pfo |
nuVertex3D | the 3D neutrino vertex |
hitType | the 2D view |
protoShowerVector | the output vector of ProtoShower objects |
Definition at line 191 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
Determine the one-to-one mapping of leading MCParticle electrons and the hits which contain their energy depositions.
electronHitMap | the output [MCParticle -> CaloHitList] map |
Definition at line 589 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
Obtain a sorted vector of the reconstructed shower pfos.
showerPfoVector | the sorted shower vector to be filled |
Definition at line 77 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
Find the continuous path of hits that lies closest to a given point.
refinedHitList | the input hit list |
nuVertex2D | the given point (the 2D neutrino vertex) |
continuousHitList | the input hit list to be filled |
Definition at line 481 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
Obtain the event hit list of a given view.
hitType | the 2D view |
pCaloHitList | the output 2D hit list |
Definition at line 268 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
inlineinherited |
|
private |
Obtain the reconstructed neutrino vertex.
nuVertex3D | the output neutrino vertex |
Definition at line 167 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
inlineinherited |
|
private |
Fit the shower to obtain a 2D shower vertex.
pShowerPfo | the input shower pfo |
hitType | the 2D view |
nuVertex3D | the 3D neutrino vertex |
Definition at line 287 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
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 |
To determine whether a pfo is a true leading electron via its completeness and purity.
pShowerPfo | the input shower pfo |
electronHitMap | the mapping of [MCParticle leading electrons -> their associated hits] |
Definition at line 638 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
To determine whether the shower vertex lies on the connection pathway.
showerVertexPosition | the input 2D shower vertex position |
nuVertex2D | the 2D neutrino vertex |
peakDirection | the initial direction of the connection pathway |
Definition at line 347 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
To determine if the hits downstream of the shower vertex lie within the shower.
pShowerPfo | the input shower pfo |
nuVertex3D | the 3D neutrino vertex |
hitType | the 2D view |
showerVertex | the 2D shower vertex |
showerSpineHitList | the hits of the found shower spine |
Definition at line 367 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
privatevirtual |
Read the algorithm settings.
xmlHandle | the relevant xml handle |
Implements pandora::Process.
Definition at line 672 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
Determine the continuous and unambiguous hits to add to an electron-like shower pfo.
nuVertex3D | the 3D neutrino vertex |
hitType | the 2D view |
viewPathways | the vector of other event connection pathways |
protoShower | the ProtoShower object associated with the input shower |
Definition at line 433 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
Find and evaluate shower connection pathway, removing if necessary.
pShowerPfo | the input shower pfo |
Definition at line 97 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
Move the shower vertex closer to the connection pathway.
pShowerPfo | the input shower pfo |
hitType | the 2D view |
nuVertex3D | the 3D neutrino vertex |
peakDirection | the initial direction of the connection pathway |
showerVertexPosition | the (perhaps) refined 2D shower vertex position |
Definition at line 314 of file ElectronInitialRegionRefinementAlgorithm.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.
|
privatevirtual |
Run the algorithm.
Implements pandora::Algorithm.
Definition at line 52 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
Add the shower characterisation information to the pfo metadata.
pShowerPfo | the input shower pfo |
featureMap | the map of [characterisation variable -> value] |
Definition at line 531 of file ElectronInitialRegionRefinementAlgorithm.cc.
|
private |
The algorithm tool names.
Definition at line 216 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The U calo hit list name.
Definition at line 198 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The V calo hit list name.
Definition at line 199 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The W calo hit list name.
Definition at line 200 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The feature tool map.
Definition at line 215 of file ElectronInitialRegionRefinementAlgorithm.h.
|
protectedinherited |
|
private |
The max. transverse distance from the pathway direction of a coincident shower vertex.
Definition at line 203 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The max. distance between connected hits.
Definition at line 208 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The max. separation between the projected 3D shower start and the shower start of that view.
Definition at line 213 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The max. separation between the projected 3D shower start and the closest 2D shower hit.
Definition at line 212 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The max. drift-coordinate separation between a 3D shower start and a matched 2D shower hit.
Definition at line 214 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The min. completeness of an electron-like pfo.
Definition at line 210 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The min. purity of an electron-like pfo.
Definition at line 211 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The number of connected hits needed for a conntected pathway.
Definition at line 209 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The min. number of hits of a significant shower.
Definition at line 201 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The min. purity of a coincident shower spine downstream of the shower vertex.
Definition at line 204 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The neutrino vertex list name.
Definition at line 197 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The shower spine finder tool for all other event particles.
Definition at line 193 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The other (not incl. shower) initial pathway direction finder tool.
Definition at line 191 of file ElectronInitialRegionRefinementAlgorithm.h.
|
protectedinherited |
|
private |
The 2D -> 3D ProtoShower matching tool.
Definition at line 195 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The shower initial pathway direction finder tool.
Definition at line 190 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The shower spine finder tool for the shower.
Definition at line 192 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The shower start finder tool.
Definition at line 194 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The shower pfo list name.
Definition at line 196 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The sliding fit window for shower fits.
Definition at line 202 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
The name of the output training file name.
Definition at line 206 of file ElectronInitialRegionRefinementAlgorithm.h.
|
private |
Whether to run the algorithm to train the BDT.
Definition at line 205 of file ElectronInitialRegionRefinementAlgorithm.h.
|
protectedinherited |
|
private |
The min. transverse distance of an unambiguous shower hit from another pathway direction.
Definition at line 207 of file ElectronInitialRegionRefinementAlgorithm.h.