LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
ShowerRegionFeatureTool to calculate variables related to the shower region. More...
#include "ConnectionPathwayFeatureTool.h"
Public Types | |
typedef std::vector< MvaFeatureTool< Ts... > * > | FeatureToolVector |
typedef std::map< std::string, MvaFeatureTool< Ts... > * > | FeatureToolMap |
Public Member Functions | |
ShowerRegionFeatureTool () | |
Default constructor. More... | |
void | Run (LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D) |
void | Run (LArMvaHelper::MvaFeatureMap &featureMap, pandora::StringVector &featureOrder, const std::string &featureToolName, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D) |
virtual void | Run (MvaTypes::MvaFeatureVector &featureVector, Ts...args)=0 |
Run the algorithm tool. More... | |
virtual void | Run (MvaTypes::MvaFeatureMap &featureMap, pandora::StringVector &featureOrder, const std::string &featureToolName, Ts...) |
Private Member Functions | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
void | GetViewShowerRegionVariables (const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, const ProtoShowerMatch &protoShowerMatch, const pandora::HitType hitType, const pandora::CartesianVector &showerStart3D, float &nHits, float &foundHitRatio, float &scatterAngle, float &openingAngle, float &nuVertexEnergyAsymmetry, float &nuVertexEnergyWeightedMeanRadialDistance, float &showerStartEnergyAsymmetry, float &showerStartMoliereRadius) |
Calculate the shower region variables for the input view. More... | |
void | BuildViewShower (const pandora::ParticleFlowObject *const pShowerPfo, const TwoDSlidingFitResult &spineFit, const pandora::HitType hitType, const pandora::CartesianVector &showerStart2D, const pandora::CartesianVector &nuVertex2D, pandora::CaloHitList &postShowerHitList, pandora::CartesianPointVector &postShowerPositions) |
Collect the shower region hits in a given view. More... | |
void | GetShowerHitVariables (const pandora::CaloHitList &spineHitList, const pandora::CaloHitList &postShowerHitList, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::HitType hitType, float &nHits, float &foundHitRatio) |
Evaluate the variables associated with the shower region hit multiplicity. More... | |
void | CalculateViewScatterAngle (const pandora::CartesianVector &nuVertex2D, const TwoDSlidingFitResult &spineFitResult, const pandora::CartesianVector &showerStart2D, const TwoDSlidingFitResult &showerFitResult, float &scatterAngle) |
Calculate the connection pathway-shower region scatter angle. More... | |
void | CalculateViewOpeningAngle (const TwoDSlidingFitResult &showerFitResult, const pandora::CaloHitList &postShowerHitList, const pandora::CartesianVector &showerStart2D, float &openingAngle) |
Calculate the opening angle of the shower region. More... | |
void | CalculateViewNuVertexConsistencyVariables (const TwoDSlidingFitResult &spineFitResult, const pandora::CaloHitList &postShowerHitList, const bool isDownstream, const pandora::CartesianVector &nuVertex2D, float &nuVertexEnergyAsymmetry, float &nuVertexEnergyWeightedMeanRadialDistance) |
Evaluate the neutrino vertex consistency variables. More... | |
void | CalculateViewShowerStartConsistencyVariables (const TwoDSlidingFitResult &showerFitResult, const pandora::CaloHitList &postShowerHitList, const bool isShowerDownstream, float &showerStartEnergyAsymmetry, float &showerStartMoliereRadius) |
Evaluate the shower start consistency variables. More... | |
Private Attributes | |
float | m_defaultFloat |
Default float value. More... | |
float | m_defaultRatio |
Default float value for ratios. More... | |
unsigned int | m_spineFitWindow |
The spine fit window. More... | |
float | m_showerRadius |
The max. separation distance between a shower region hit and the shower core. More... | |
unsigned int | m_showerFitWindow |
The shower fit window. More... | |
float | m_edgeStep |
The binning of the shower boundaries. More... | |
float | m_moliereFraction |
The energy fraction which corresponds to minShowerStartMoliereRadius. More... | |
float | m_maxNHitsLimit |
maxNHits max. limit More... | |
float | m_maxFoundHitRatioLimit |
maxFoundHitRatio max. limit More... | |
float | m_maxScatterAngleLimit |
maxScatterAngle max. limit More... | |
float | m_maxOpeningAngleLimit |
maxOpeningAngle max. limit More... | |
float | m_maxNuVertexEnergyWeightedMeanRadialDistanceLimit |
maxNuVertexEnergyWeightedMeanRadialDistance max. limit More... | |
float | m_minShowerStartMoliereRadiusLimit |
minShowerStartMoliereRadius max. limit More... | |
ShowerRegionFeatureTool to calculate variables related to the shower region.
Definition at line 128 of file ConnectionPathwayFeatureTool.h.
|
inherited |
Definition at line 37 of file LArMvaHelper.h.
|
inherited |
Definition at line 36 of file LArMvaHelper.h.
lar_content::ShowerRegionFeatureTool::ShowerRegionFeatureTool | ( | ) |
Default constructor.
Definition at line 335 of file ConnectionPathwayFeatureTool.cc.
References lar_content::LArConnectionPathwayHelper::GetMinMiddleMax(), GetViewShowerRegionVariables(), m_defaultFloat, m_defaultRatio, m_maxFoundHitRatioLimit, m_maxNHitsLimit, m_maxNuVertexEnergyWeightedMeanRadialDistanceLimit, m_maxOpeningAngleLimit, m_maxScatterAngleLimit, m_minShowerStartMoliereRadiusLimit, and Run().
|
private |
Collect the shower region hits in a given view.
pShowerPfo | the shower pfo |
spineFit | the shower spine fit |
hitType | the 2D view |
showerStart2D | the 2D shower start position |
nuVertex2D | the 2D neutrino vertex position |
postShowerHitList | the collected shower region hit list |
postShowerPositions | the collected shower region hit position vector |
Definition at line 579 of file ConnectionPathwayFeatureTool.cc.
References f, lar_content::LArPfoHelper::GetCaloHits(), lar_content::TwoDSlidingFitResult::GetGlobalDirection(), lar_content::TwoDSlidingFitResult::GetLayer(), lar_content::TwoDSlidingFitResult::GetLayerFitResultMap(), lar_content::TwoDSlidingFitResult::GetLocalPosition(), and m_showerRadius.
Referenced by GetViewShowerRegionVariables().
|
private |
Evaluate the neutrino vertex consistency variables.
spineHitList | the shower spine hit list |
postShowerHitList | the collected shower region hit list |
isDownstream | whether the shower direction is downstream (in Z) of the neutrino vertex |
nuVertex2D | the 2D neutrino vertex |
nuVertexEnergyAsymmetry | the output neutrino vertex energy asymmetry |
nuVertexEnergyWeightedMeanRadialDistance | the output neutrino vertex energy weighted mean radial distance |
Definition at line 725 of file ConnectionPathwayFeatureTool.cc.
References f, lar_content::TwoDSlidingFitResult::GetGlobalMaxLayerDirection(), lar_content::TwoDSlidingFitResult::GetGlobalMinLayerDirection(), m_defaultFloat, and m_defaultRatio.
Referenced by GetViewShowerRegionVariables().
|
private |
Calculate the opening angle of the shower region.
showerFitResult | the shower region fit |
postShowerHitList | the collected shower region hit list |
showerStart2D | the 2D shower start position |
openingAngle | the output opening angle |
Definition at line 661 of file ConnectionPathwayFeatureTool.cc.
References f, lar_content::TwoDSlidingFitResult::GetGlobalMinLayerDirection(), lar_content::TwoDSlidingFitResult::GetLayerPitch(), m_edgeStep, and m_showerFitWindow.
Referenced by GetViewShowerRegionVariables().
|
private |
Calculate the connection pathway-shower region scatter angle.
nuVertex2D | the 2D neutrino vertex |
spineFitResult | the shower spine fit |
showerStart2D | the 2D shower start position |
showerFitResult | the shower region fit |
scatterAngle | the output scatter angle |
Definition at line 644 of file ConnectionPathwayFeatureTool.cc.
References lar_content::TwoDSlidingFitResult::GetGlobalMaxLayerDirection(), lar_content::TwoDSlidingFitResult::GetGlobalMaxLayerPosition(), lar_content::TwoDSlidingFitResult::GetGlobalMinLayerDirection(), and lar_content::TwoDSlidingFitResult::GetGlobalMinLayerPosition().
Referenced by GetViewShowerRegionVariables().
|
private |
Evaluate the shower start consistency variables.
showerFitResult | the shower fit result |
postShowerHitList | the collected shower region hit list |
isShowerDownstream | whether the shower direction is downstream (in Z) of the neutrino vertex |
showerStartEnergyAsymmetry | the output shower start energy asymmetry |
showerStartMoliereRadius | the output shower start moliere radius |
Definition at line 768 of file ConnectionPathwayFeatureTool.cc.
References f, lar_content::TwoDSlidingFitResult::GetGlobalMaxLayerDirection(), lar_content::TwoDSlidingFitResult::GetGlobalMaxLayerPosition(), lar_content::TwoDSlidingFitResult::GetGlobalMinLayerDirection(), lar_content::TwoDSlidingFitResult::GetGlobalMinLayerPosition(), m_defaultFloat, m_defaultRatio, and m_moliereFraction.
Referenced by GetViewShowerRegionVariables().
|
private |
Evaluate the variables associated with the shower region hit multiplicity.
spineHitList | the shower spine hit list |
postShowerHitList | the collected shower region hit list |
pShowerPfo | the shower pfo |
hitType | the 2D view |
nHits | the output number of shower region hits |
foundHitRatio | the output found hit ratio |
Definition at line 624 of file ConnectionPathwayFeatureTool.cc.
References lar_content::LArPfoHelper::GetCaloHits().
Referenced by GetViewShowerRegionVariables().
|
private |
Calculate the shower region variables for the input view.
pAlgorithm | the algorithm |
pShowerPfo | the shower pfo |
nuVertex3D | the 3D neutrino vertex |
protoShowerMatch | the ProtoShower match |
hitType | the 2D view |
showerStart3D | the 3D shower start position |
nHits | the output number of shower region hits |
foundHitRatio | the output found hit ratio |
scatterAngle | the output scatter angle |
openingAngle | the output opening angle |
nuVertexEnergyAsymmetry | the output neutrino vertex energy asymmetry |
nuVertexEnergyWeightedMeanRadialDistance | the output neutrino vertex energy weighted mean radial distance |
showerStartEnergyAsymmetry | the output shower start energy asymmetry |
showerStartMoliereRadius | the output shower start moliere radius |
Definition at line 502 of file ConnectionPathwayFeatureTool.cc.
References BuildViewShower(), CalculateViewNuVertexConsistencyVariables(), CalculateViewOpeningAngle(), CalculateViewScatterAngle(), CalculateViewShowerStartConsistencyVariables(), f, lar_content::LArPfoHelper::GetCaloHits(), lar_content::TwoDSlidingFitResult::GetGlobalMaxLayerPosition(), lar_content::TwoDSlidingFitResult::GetGlobalMinLayerDirection(), lar_content::TwoDSlidingFitResult::GetGlobalMinLayerPosition(), lar_content::ProtoShowerMatch::GetProtoShowerU(), lar_content::ProtoShowerMatch::GetProtoShowerV(), lar_content::ProtoShowerMatch::GetProtoShowerW(), GetShowerHitVariables(), lar_content::ProtoShower::GetSpineHitList(), lar_content::LArGeometryHelper::GetWirePitch(), m_showerFitWindow, m_showerRadius, m_spineFitWindow, and lar_content::LArGeometryHelper::ProjectPosition().
Referenced by ShowerRegionFeatureTool().
|
private |
Definition at line 831 of file ConnectionPathwayFeatureTool.cc.
References m_defaultFloat, m_defaultRatio, m_edgeStep, m_maxFoundHitRatioLimit, m_maxNHitsLimit, m_maxNuVertexEnergyWeightedMeanRadialDistanceLimit, m_maxOpeningAngleLimit, m_maxScatterAngleLimit, m_minShowerStartMoliereRadiusLimit, m_moliereFraction, m_showerFitWindow, m_showerRadius, and m_spineFitWindow.
|
pure virtualinherited |
Run the algorithm tool.
featureVector | the vector of features to append |
args | arguments to pass to the tool |
|
inlinevirtualinherited |
Definition at line 51 of file LArMvaHelper.h.
void lar_content::ShowerRegionFeatureTool::Run | ( | LArMvaHelper::MvaFeatureVector & | featureVector, |
const pandora::Algorithm *const | pAlgorithm, | ||
const pandora::ParticleFlowObject *const | pShowerPfo, | ||
const pandora::CartesianVector & | nuVertex3D, | ||
const ProtoShowerMatch & | protoShowerMatch, | ||
const pandora::CartesianPointVector & | showerStarts3D | ||
) |
Referenced by ShowerRegionFeatureTool().
void lar_content::ShowerRegionFeatureTool::Run | ( | LArMvaHelper::MvaFeatureMap & | featureMap, |
pandora::StringVector & | featureOrder, | ||
const std::string & | featureToolName, | ||
const pandora::Algorithm *const | pAlgorithm, | ||
const pandora::ParticleFlowObject *const | pShowerPfo, | ||
const pandora::CartesianVector & | nuVertex3D, | ||
const ProtoShowerMatch & | protoShowerMatch, | ||
const pandora::CartesianPointVector & | showerStarts3D | ||
) |
|
private |
Default float value.
Definition at line 248 of file ConnectionPathwayFeatureTool.h.
Referenced by CalculateViewNuVertexConsistencyVariables(), CalculateViewShowerStartConsistencyVariables(), ReadSettings(), and ShowerRegionFeatureTool().
|
private |
Default float value for ratios.
Definition at line 249 of file ConnectionPathwayFeatureTool.h.
Referenced by CalculateViewNuVertexConsistencyVariables(), CalculateViewShowerStartConsistencyVariables(), ReadSettings(), and ShowerRegionFeatureTool().
|
private |
The binning of the shower boundaries.
Definition at line 253 of file ConnectionPathwayFeatureTool.h.
Referenced by CalculateViewOpeningAngle(), and ReadSettings().
|
private |
maxFoundHitRatio max. limit
Definition at line 256 of file ConnectionPathwayFeatureTool.h.
Referenced by ReadSettings(), and ShowerRegionFeatureTool().
|
private |
maxNHits max. limit
Definition at line 255 of file ConnectionPathwayFeatureTool.h.
Referenced by ReadSettings(), and ShowerRegionFeatureTool().
|
private |
maxNuVertexEnergyWeightedMeanRadialDistance max. limit
Definition at line 259 of file ConnectionPathwayFeatureTool.h.
Referenced by ReadSettings(), and ShowerRegionFeatureTool().
|
private |
maxOpeningAngle max. limit
Definition at line 258 of file ConnectionPathwayFeatureTool.h.
Referenced by ReadSettings(), and ShowerRegionFeatureTool().
|
private |
maxScatterAngle max. limit
Definition at line 257 of file ConnectionPathwayFeatureTool.h.
Referenced by ReadSettings(), and ShowerRegionFeatureTool().
|
private |
minShowerStartMoliereRadius max. limit
Definition at line 260 of file ConnectionPathwayFeatureTool.h.
Referenced by ReadSettings(), and ShowerRegionFeatureTool().
|
private |
The energy fraction which corresponds to minShowerStartMoliereRadius.
Definition at line 254 of file ConnectionPathwayFeatureTool.h.
Referenced by CalculateViewShowerStartConsistencyVariables(), and ReadSettings().
|
private |
The shower fit window.
Definition at line 252 of file ConnectionPathwayFeatureTool.h.
Referenced by CalculateViewOpeningAngle(), GetViewShowerRegionVariables(), and ReadSettings().
|
private |
The max. separation distance between a shower region hit and the shower core.
Definition at line 251 of file ConnectionPathwayFeatureTool.h.
Referenced by BuildViewShower(), GetViewShowerRegionVariables(), and ReadSettings().
|
private |
The spine fit window.
Definition at line 250 of file ConnectionPathwayFeatureTool.h.
Referenced by GetViewShowerRegionVariables(), and ReadSettings().