LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Public Member Functions | |
SliceFeatures (const pandora::PfoList &nuPfos, const pandora::PfoList &crPfos, const NeutrinoIdTool *const pTool) | |
Constructor. More... | |
bool | IsFeatureVectorAvailable () const |
Check if all features were calculable. More... | |
void | GetFeatureVector (LArMvaHelper::MvaFeatureVector &featureVector) const |
Get the feature vector for the MVA. More... | |
void | GetFeatureMap (LArMvaHelper::DoubleMap &featureMap) const |
Get the feature map for the MVA. More... | |
float | GetNeutrinoProbability (const T &t, const float defaultProbability) const |
Get the probability that this slice contains a neutrino interaction. More... | |
Private Member Functions | |
const pandora::ParticleFlowObject * | GetNeutrino (const pandora::PfoList &nuPfos) const |
Get the recontructed neutrino the input list of neutrino Pfos. More... | |
void | GetSpacePoints (const pandora::ParticleFlowObject *const pPfo, pandora::CartesianPointVector &spacePoints) const |
Get the 3D space points in a given pfo. More... | |
pandora::CartesianVector | GetDirection (const pandora::CartesianPointVector &spacePoints, std::function< bool(const pandora::CartesianVector &pointA, const pandora::CartesianVector &pointB)> fShouldChooseA) const |
Use a sliding fit to get the direction of a collection of spacepoints. More... | |
pandora::CartesianVector | GetDirectionFromVertex (const pandora::CartesianPointVector &spacePoints, const pandora::CartesianVector &vertex) const |
Use a sliding fit to get the direction of a collection of spacepoint near a vertex position. More... | |
pandora::CartesianVector | GetUpperDirection (const pandora::CartesianPointVector &spacePoints) const |
Use a sliding fit to get the upper direction of a collection of spacepoints. More... | |
pandora::CartesianVector | GetLowerDirection (const pandora::CartesianPointVector &spacePoints) const |
Use a sliding fit to get the lower direction of a collection of spacepoints. More... | |
void | GetPointsInSphere (const pandora::CartesianPointVector &spacePoints, const pandora::CartesianVector &vertex, const float radius, pandora::CartesianPointVector &spacePointsInSphere) const |
Get a vector of spacepoints within a given radius of a vertex point. More... | |
Private Attributes | |
bool | m_isAvailable |
Is the feature vector available. More... | |
LArMvaHelper::MvaFeatureVector | m_featureVector |
The MVA feature vector. More... | |
LArMvaHelper::DoubleMap | m_featureMap |
A map between MVA features and their names. More... | |
const NeutrinoIdTool *const | m_pTool |
The tool that owns this. More... | |
Slice features class.
Definition at line 48 of file NeutrinoIdTool.h.
lar_content::NeutrinoIdTool< T >::SliceFeatures::SliceFeatures | ( | const pandora::PfoList & | nuPfos, |
const pandora::PfoList & | crPfos, | ||
const NeutrinoIdTool *const | pTool | ||
) |
Constructor.
nuPfos | input list of Pfos reconstructed under the neutrino hypothesis |
crPfos | input list of Pfos reconstructed under the cosmic ray hypothesis |
pTool | address of the tool using this class |
Definition at line 331 of file NeutrinoIdTool.cc.
References dir, f, lar_content::NeutrinoIdTool< T >::SliceFeatures::GetDirectionFromVertex(), lar_content::NeutrinoIdTool< T >::SliceFeatures::GetLowerDirection(), lar_content::NeutrinoIdTool< T >::SliceFeatures::GetNeutrino(), lar_content::NeutrinoIdTool< T >::SliceFeatures::GetPointsInSphere(), lar_content::NeutrinoIdTool< T >::SliceFeatures::GetSpacePoints(), lar_content::NeutrinoIdTool< T >::SliceFeatures::GetUpperDirection(), lar_content::LArPfoHelper::GetVertex(), lar_content::NeutrinoIdTool< T >::SliceFeatures::m_featureMap, lar_content::NeutrinoIdTool< T >::SliceFeatures::m_featureVector, lar_content::NeutrinoIdTool< T >::SliceFeatures::m_isAvailable, and lar_content::LArPcaHelper::RunPca().
|
private |
Use a sliding fit to get the direction of a collection of spacepoints.
spacePoints | the input spacepoints to fit |
fShouldChooseA | a function that when given two fitted endpoints A and B, will return true if A is the endpoint at which to calculate the direction |
Definition at line 556 of file NeutrinoIdTool.cc.
References f, and lar_content::NeutrinoIdTool< T >::SliceFeatures::m_pTool.
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::GetDirectionFromVertex(), lar_content::NeutrinoIdTool< T >::SliceFeatures::GetLowerDirection(), and lar_content::NeutrinoIdTool< T >::SliceFeatures::GetUpperDirection().
|
private |
Use a sliding fit to get the direction of a collection of spacepoint near a vertex position.
spacePoints | the input spacepoints to fit |
vertex | the position from which the fitted direction should be calculated |
Definition at line 528 of file NeutrinoIdTool.cc.
References lar_content::NeutrinoIdTool< T >::SliceFeatures::GetDirection().
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::SliceFeatures().
void lar_content::NeutrinoIdTool< T >::SliceFeatures::GetFeatureMap | ( | LArMvaHelper::DoubleMap & | featureMap | ) | const |
Get the feature map for the MVA.
featuresMap | empty feature map to populate |
Definition at line 470 of file NeutrinoIdTool.cc.
References lar_content::NeutrinoIdTool< T >::SliceFeatures::m_featureMap, and lar_content::NeutrinoIdTool< T >::SliceFeatures::m_isAvailable.
void lar_content::NeutrinoIdTool< T >::SliceFeatures::GetFeatureVector | ( | LArMvaHelper::MvaFeatureVector & | featureVector | ) | const |
Get the feature vector for the MVA.
featuresVector | empty feature vector to populate |
Definition at line 459 of file NeutrinoIdTool.cc.
References lar_content::NeutrinoIdTool< T >::SliceFeatures::m_featureVector, and lar_content::NeutrinoIdTool< T >::SliceFeatures::m_isAvailable.
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::GetNeutrinoProbability(), and lar_content::NeutrinoIdTool< T >::SelectOutputPfos().
|
private |
Use a sliding fit to get the lower direction of a collection of spacepoints.
spacePoints | the input spacepoints to fit |
Definition at line 547 of file NeutrinoIdTool.cc.
References lar_content::NeutrinoIdTool< T >::SliceFeatures::GetDirection().
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::SliceFeatures().
|
private |
Get the recontructed neutrino the input list of neutrino Pfos.
nuPfos | input list of neutrino pfos |
Definition at line 495 of file NeutrinoIdTool.cc.
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::SliceFeatures().
float lar_content::NeutrinoIdTool< T >::SliceFeatures::GetNeutrinoProbability | ( | const T & | t, |
const float | defaultProbability | ||
) | const |
Get the probability that this slice contains a neutrino interaction.
t | the MVA used to calculate the probability |
Definition at line 481 of file NeutrinoIdTool.cc.
References lar_content::LArMvaHelper::CalculateProbability(), lar_content::NeutrinoIdTool< T >::SliceFeatures::GetFeatureVector(), and lar_content::NeutrinoIdTool< T >::SliceFeatures::IsFeatureVectorAvailable().
|
private |
Get a vector of spacepoints within a given radius of a vertex point.
spacePoints | the input spacepoints |
vertex | the center of the sphere |
radius | the radius of the sphere |
spacePointsInSphere | the vector to hold the spacepoint in the sphere |
Definition at line 581 of file NeutrinoIdTool.cc.
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::SliceFeatures().
|
private |
Get the 3D space points in a given pfo.
pPfo | input pfo |
spacePoints | vector to hold the 3D space points associated with the input pfo |
Definition at line 507 of file NeutrinoIdTool.cc.
References lar_content::LArPfoHelper::GetThreeDClusterList().
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::SliceFeatures().
|
private |
Use a sliding fit to get the upper direction of a collection of spacepoints.
spacePoints | the input spacepoints to fit |
Definition at line 538 of file NeutrinoIdTool.cc.
References lar_content::NeutrinoIdTool< T >::SliceFeatures::GetDirection().
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::SliceFeatures().
bool lar_content::NeutrinoIdTool< T >::SliceFeatures::IsFeatureVectorAvailable | ( | ) | const |
Check if all features were calculable.
Definition at line 451 of file NeutrinoIdTool.cc.
References lar_content::NeutrinoIdTool< T >::SliceFeatures::m_isAvailable.
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::GetNeutrinoProbability().
|
private |
A map between MVA features and their names.
Definition at line 158 of file NeutrinoIdTool.h.
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::GetFeatureMap(), and lar_content::NeutrinoIdTool< T >::SliceFeatures::SliceFeatures().
|
private |
The MVA feature vector.
Definition at line 157 of file NeutrinoIdTool.h.
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::GetFeatureVector(), and lar_content::NeutrinoIdTool< T >::SliceFeatures::SliceFeatures().
|
private |
Is the feature vector available.
Definition at line 156 of file NeutrinoIdTool.h.
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::GetFeatureMap(), lar_content::NeutrinoIdTool< T >::SliceFeatures::GetFeatureVector(), lar_content::NeutrinoIdTool< T >::SliceFeatures::IsFeatureVectorAvailable(), and lar_content::NeutrinoIdTool< T >::SliceFeatures::SliceFeatures().
|
private |
The tool that owns this.
Definition at line 159 of file NeutrinoIdTool.h.
Referenced by lar_content::NeutrinoIdTool< T >::SliceFeatures::GetDirection().