8 #ifndef LAR_ELECTRON_INITIAL_REGION_REFINEMENT_ALGORITHM_H 9 #define LAR_ELECTRON_INITIAL_REGION_REFINEMENT_ALGORITHM_H 1 11 #include "Pandora/Algorithm.h" 35 typedef std::map<const pandora::MCParticle *, pandora::CaloHitList>
HitOwnershipMap;
37 pandora::StatusCode
Run();
38 pandora::StatusCode
ReadSettings(
const pandora::TiXmlHandle xmlHandle);
52 void RefineShower(
const pandora::ParticleFlowObject *
const pShowerPfo)
const;
61 pandora::StatusCode
GetNeutrinoVertex(pandora::CartesianVector &nuVertex3D)
const;
71 void BuildViewProtoShowers(
const pandora::ParticleFlowObject *
const pShowerPfo,
const pandora::CartesianVector &nuVertex3D,
94 const pandora::CartesianVector &nuVertex3D)
const;
106 const pandora::CartesianVector &nuVertex3D,
const pandora::CartesianVector &peakDirection, pandora::CartesianVector &showerVertexPosition)
const;
117 bool IsShowerConnected(
const pandora::CartesianVector &showerVertexPosition,
const pandora::CartesianVector &nuVertex2D,
118 const pandora::CartesianVector &peakDirection)
const;
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;
143 void BuildViewPathways(
const pandora::ParticleFlowObject *
const pShowerPfo,
const pandora::CaloHitList &protectedHits,
164 void FindContinuousPath(
const pandora::CaloHitList &refinedHitList,
const pandora::CartesianVector &nuVertex2D,
165 pandora::CaloHitList &continuousHitList)
const;
188 bool IsElectron(
const pandora::ParticleFlowObject *
const pShowerPfo,
const HitOwnershipMap &electronHitMap)
const;
221 #endif // #ifndef LAR_ELECTRON_INITIAL_REGION_REFINEMENT
float m_unambiguousThreshold
The min. transverse distance of an unambiguous shower hit from another pathway direction.
float m_maxSeparationFromHit
The max. separation between the projected 3D shower start and the closest 2D shower hit...
Header file for the ProtoShower class.
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.
void SetMetadata(const pandora::ParticleFlowObject *const pShowerPfo, const LArMvaHelper::MvaFeatureMap &featureMap) const
Add the shower characterisation information to the pfo metadata.
pandora::StringVector m_algorithmToolNames
The algorithm tool names.
pandora::StatusCode GetNeutrinoVertex(pandora::CartesianVector &nuVertex3D) const
Obtain the reconstructed neutrino vertex.
float m_minSpinePurity
The min. purity of a coincident shower spine downstream of the shower vertex.
ShowerSpineFinderTool * m_pShowerSpineFinderTool
The shower spine finder tool for the shower.
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.
float m_maxConnectionDistance
The max. distance between connected hits.
PeakDirectionFinderTool * m_pShowerPeakDirectionFinderTool
The shower initial pathway direction finder tool.
float m_maxXSeparation
The max. drift-coordinate separation between a 3D shower start and a matched 2D shower hit...
void FillShowerPfoVector(pandora::PfoVector &showerPfoVector) const
Obtain a sorted vector of the reconstructed shower pfos.
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.
MvaTypes::MvaFeatureMap MvaFeatureMap
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
std::string m_trainingFileName
The name of the output training file name.
unsigned int m_minNConnectedHits
The number of connected hits needed for a conntected pathway.
float m_maxCoincidenceTransverseSeparation
The max. transverse distance from the pathway direction of a coincident shower vertex.
float m_minElectronCompleteness
The min. completeness of an electron-like pfo.
ShowerStartFinderTool * m_pShowerStartFinderTool
The shower start finder tool.
bool m_trainingMode
Whether to run the algorithm to train the BDT.
std::map< std::string, MvaFeatureTool< Ts... > * > FeatureToolMap
void RefineShower(const pandora::ParticleFlowObject *const pShowerPfo) const
Find and evaluate shower connection pathway, removing if necessary.
ElectronInitialRegionRefinementAlgorithm()
Default constructor.
void FillElectronHitMap(HitOwnershipMap &electronHitMap) const
Determine the one-to-one mapping of leading MCParticle electrons and the hits which contain their ene...
PeakDirectionFinderTool * m_pEventPeakDirectionFinderTool
The other (not incl. shower) initial pathway direction finder tool.
std::vector< ConnectionPathway > ConnectionPathwayVector
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.
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 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.
unsigned int m_minShowerHits3D
The min. number of hits of a significant 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.
float m_minElectronPurity
The min. purity of an electron-like pfo.
ProtoShowerMatchingTool * m_pProtoShowerMatchingTool
The 2D -> 3D ProtoShower matching tool.
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.
std::string m_neutrinoVertexListName
The neutrino vertex list name.
float m_maxProjectionSeparation
The max. separation between the projected 3D shower start and the shower start of that view...
ConnectionPathwayFeatureTool::FeatureToolMap m_featureToolMap
The feature tool map.
ElectronInitialRegionRefinementAlgorithm class.
std::string m_caloHitListNameW
The W calo hit list name.
std::string m_caloHitListNameU
The U calo hit list name.
std::vector< ProtoShower > ProtoShowerVector
std::string m_caloHitListNameV
The V calo hit list name.
pandora::StatusCode GetHitListOfType(const pandora::HitType hitType, const pandora::CaloHitList *&pCaloHitList) const
Obtain the event hit list of a given view.
ShowerSpineFinderTool * m_pEventPathwayFinderTool
The shower spine finder tool for all other event particles.
pandora::StatusCode Run()
std::map< const pandora::MCParticle *, pandora::CaloHitList > HitOwnershipMap
unsigned int m_showerSlidingFitWindow
The sliding fit window for shower fits.
std::string m_showerPfoListName
The shower pfo list name.
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.