Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ElectronInitialRegionRefinementAlgorithm.h
Go to the documentation of this file.
1
8#ifndef LAR_ELECTRON_INITIAL_REGION_REFINEMENT_ALGORITHM_H
9#define LAR_ELECTRON_INITIAL_REGION_REFINEMENT_ALGORITHM_H 1
10
11#include "Pandora/Algorithm.h"
12
19
20namespace lar_content
21{
22
27{
28public:
33
34private:
35 typedef std::map<const pandora::MCParticle *, pandora::CaloHitList> HitOwnershipMap;
36
39
45 void FillShowerPfoVector(pandora::PfoVector &showerPfoVector) const;
46
52 void RefineShower(const pandora::ParticleFlowObject *const pShowerPfo) const;
53
62
71 void BuildViewProtoShowers(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D,
72 pandora::HitType hitType, ProtoShowerVector &protoShowerVector) const;
73
82 pandora::StatusCode GetHitListOfType(const pandora::HitType hitType, const pandora::CaloHitList *&pCaloHitList) const;
83
94 const pandora::CartesianVector &nuVertex3D) const;
95
105 void RefineShowerVertex(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::HitType hitType,
106 const pandora::CartesianVector &nuVertex3D, const pandora::CartesianVector &peakDirection, pandora::CartesianVector &showerVertexPosition) const;
107
117 bool IsShowerConnected(const pandora::CartesianVector &showerVertexPosition, const pandora::CartesianVector &nuVertex2D,
118 const pandora::CartesianVector &peakDirection) const;
119
131 bool IsSpineCoincident(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D,
132 const pandora::HitType hitType, const pandora::CartesianVector &showerVertex, const pandora::CaloHitList &showerSpineHitList) const;
133
143 void BuildViewPathways(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CaloHitList &protectedHits,
144 const pandora::CartesianVector &nuVertex3D, pandora::HitType hitType, ConnectionPathwayVector &viewPathways) const;
145
154 void RefineHitsToAdd(const pandora::CartesianVector &nuVertex3D, const pandora::HitType hitType,
155 const ConnectionPathwayVector &viewPathways, ProtoShower &protoShower) const;
156
164 void FindContinuousPath(const pandora::CaloHitList &refinedHitList, const pandora::CartesianVector &nuVertex2D,
165 pandora::CaloHitList &continuousHitList) const;
166
173 void SetMetadata(const pandora::ParticleFlowObject *const pShowerPfo, const LArMvaHelper::MvaFeatureMap &featureMap) const;
174
180 void FillElectronHitMap(HitOwnershipMap &electronHitMap) const;
181
188 bool IsElectron(const pandora::ParticleFlowObject *const pShowerPfo, const HitOwnershipMap &electronHitMap) const;
189
198 std::string m_caloHitListNameU;
199 std::string m_caloHitListNameV;
200 std::string m_caloHitListNameW;
201 unsigned int m_minShowerHits3D;
206 std::string m_trainingFileName;
209 unsigned int m_minNConnectedHits;
217};
218
219} // namespace lar_content
220
221#endif // #ifndef LAR_ELECTRON_INITIAL_REGION_REFINEMENT
Header file for the algorithm class.
Header file for the connection pathway feature tools.
Header file for the ProtoShower class.
Header file for the peak direction finder tool class.
Header file for the ProtoShower matching tool class.
Header file for the peak direction finder tool class.
Header file for the shower start finder tool class.
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 RefineShower(const pandora::ParticleFlowObject *const pShowerPfo) const
Find and evaluate shower connection pathway, removing if necessary.
void FillShowerPfoVector(pandora::PfoVector &showerPfoVector) const
Obtain a sorted vector of the reconstructed shower pfos.
unsigned int m_minNConnectedHits
The number of connected hits needed for a conntected pathway.
pandora::StatusCode GetNeutrinoVertex(pandora::CartesianVector &nuVertex3D) const
Obtain the reconstructed neutrino vertex.
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.
std::string m_trainingFileName
The name of the output training file name.
std::map< const pandora::MCParticle *, pandora::CaloHitList > HitOwnershipMap
unsigned int m_showerSlidingFitWindow
The sliding fit window for shower fits.
float m_maxXSeparation
The max. drift-coordinate separation between a 3D shower start and a matched 2D shower hit.
float m_maxSeparationFromHit
The max. separation between the projected 3D shower start and the closest 2D shower hit.
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.
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.
PeakDirectionFinderTool * m_pEventPeakDirectionFinderTool
The other (not incl. shower) initial pathway direction finder tool.
ConnectionPathwayFeatureTool::FeatureToolMap m_featureToolMap
The feature tool map.
pandora::StatusCode GetHitListOfType(const pandora::HitType hitType, const pandora::CaloHitList *&pCaloHitList) const
Obtain the event hit list of a given view.
float m_maxProjectionSeparation
The max. separation between the projected 3D shower start and the shower start of that view.
ProtoShowerMatchingTool * m_pProtoShowerMatchingTool
The 2D -> 3D ProtoShower matching tool.
PeakDirectionFinderTool * m_pShowerPeakDirectionFinderTool
The shower initial pathway direction finder tool.
void FillElectronHitMap(HitOwnershipMap &electronHitMap) const
Determine the one-to-one mapping of leading MCParticle electrons and the hits which contain their ene...
void SetMetadata(const pandora::ParticleFlowObject *const pShowerPfo, const LArMvaHelper::MvaFeatureMap &featureMap) const
Add the shower characterisation information to the pfo metadata.
ShowerStartFinderTool * m_pShowerStartFinderTool
The shower start finder tool.
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.
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 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.
float m_minSpinePurity
The min. purity of a coincident shower spine downstream of the shower vertex.
float m_minElectronCompleteness
The min. completeness of an electron-like pfo.
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.
ShowerSpineFinderTool * m_pShowerSpineFinderTool
The shower spine finder tool for the shower.
float m_maxCoincidenceTransverseSeparation
The max. transverse distance from the pathway direction of a coincident shower vertex.
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.
unsigned int m_minShowerHits3D
The min. number of hits of a significant shower.
ShowerSpineFinderTool * m_pEventPathwayFinderTool
The shower spine finder tool for all other event particles.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
float m_unambiguousThreshold
The min. transverse distance of an unambiguous shower hit from another pathway direction.
MvaTypes::MvaFeatureMap MvaFeatureMap
std::map< std::string, MvaFeatureTool< Ts... > * > FeatureToolMap
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
Definition Algorithm.h:21
CartesianVector class.
ParticleFlowObject class.
std::vector< ProtoShower > ProtoShowerVector
std::vector< ConnectionPathway > ConnectionPathwayVector
HitType
Calorimeter hit type enum.
std::vector< const ParticleFlowObject * > PfoVector
std::vector< std::string > StringVector
MANAGED_CONTAINER< const CaloHit * > CaloHitList
StatusCode
The StatusCode enum.