LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Slice features class. More...
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 SVM. More... | |
float | GetNeutrinoProbability (const SupportVectorMachine &supportVectorMachine) 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 SVM feature vector. More... | |
const NeutrinoIdTool *const | m_pTool |
The tool that owns this. More... | |
Slice features class.
Definition at line 44 of file NeutrinoIdTool.h.
lar_content::NeutrinoIdTool::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 289 of file NeutrinoIdTool.cc.
References dir, f, GetDirectionFromVertex(), GetLowerDirection(), GetNeutrino(), GetPointsInSphere(), GetSpacePoints(), GetUpperDirection(), lar_content::LArPfoHelper::GetVertex(), m_featureVector, m_isAvailable, max, 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 481 of file NeutrinoIdTool.cc.
Referenced by GetDirectionFromVertex(), GetLowerDirection(), and 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 451 of file NeutrinoIdTool.cc.
References GetDirection().
Referenced by SliceFeatures().
void lar_content::NeutrinoIdTool::SliceFeatures::GetFeatureVector | ( | LArMvaHelper::MvaFeatureVector & | featureVector | ) | const |
Get the feature vector for the SVM.
featuresVector | empty feature vector to populate |
Definition at line 399 of file NeutrinoIdTool.cc.
References m_featureVector, and m_isAvailable.
Referenced by GetNeutrinoProbability(), and lar_content::NeutrinoIdTool::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 471 of file NeutrinoIdTool.cc.
References GetDirection().
Referenced by SliceFeatures().
|
private |
Get the recontructed neutrino the input list of neutrino Pfos.
nuPfos | input list of neutrino pfos |
Definition at line 421 of file NeutrinoIdTool.cc.
Referenced by SliceFeatures().
float lar_content::NeutrinoIdTool::SliceFeatures::GetNeutrinoProbability | ( | const SupportVectorMachine & | supportVectorMachine | ) | const |
Get the probability that this slice contains a neutrino interaction.
supportVectorMachine | the SVM used to calculate the probability |
Definition at line 409 of file NeutrinoIdTool.cc.
References lar_content::LArMvaHelper::CalculateProbability(), GetFeatureVector(), and 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 504 of file NeutrinoIdTool.cc.
Referenced by 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 432 of file NeutrinoIdTool.cc.
References lar_content::LArPfoHelper::GetThreeDClusterList().
Referenced by 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 461 of file NeutrinoIdTool.cc.
References GetDirection().
Referenced by SliceFeatures().
bool lar_content::NeutrinoIdTool::SliceFeatures::IsFeatureVectorAvailable | ( | ) | const |
Check if all features were calculable.
Definition at line 392 of file NeutrinoIdTool.cc.
References m_isAvailable.
Referenced by GetNeutrinoProbability().
|
private |
The SVM feature vector.
Definition at line 144 of file NeutrinoIdTool.h.
Referenced by GetFeatureVector(), and SliceFeatures().
|
private |
Is the feature vector available.
Definition at line 143 of file NeutrinoIdTool.h.
Referenced by GetFeatureVector(), IsFeatureVectorAvailable(), and SliceFeatures().
|
private |
The tool that owns this.
Definition at line 145 of file NeutrinoIdTool.h.
Referenced by GetDirection().