NeutrinoIdTool class. More...
#include <NeutrinoIdTool.h>
Classes | |
class | SliceFeatures |
Slice features class. More... | |
Public Member Functions | |
NeutrinoIdTool () | |
Default constructor. More... | |
void | SelectOutputPfos (const pandora::Algorithm *const pAlgorithm, const SliceHypotheses &nuSliceHypotheses, const SliceHypotheses &crSliceHypotheses, pandora::PfoList &selectedPfos) |
Select which reconstruction hypotheses to use; neutrino outcomes or cosmic-ray muon outcomes for each slice. More... | |
Private Types | |
typedef std::pair< unsigned int, float > | UintFloatPair |
typedef std::vector < SliceFeatures > | SliceFeaturesVector |
Private Member Functions | |
void | GetSliceFeatures (const NeutrinoIdTool *const pTool, const SliceHypotheses &nuSliceHypotheses, const SliceHypotheses &crSliceHypotheses, SliceFeaturesVector &sliceFeaturesVector) const |
Get the features of each slice. More... | |
bool | GetBestMCSliceIndex (const pandora::Algorithm *const pAlgorithm, const SliceHypotheses &nuSliceHypotheses, const SliceHypotheses &crSliceHypotheses, unsigned int &bestSliceIndex) const |
Get the slice with the most neutrino induced hits using Monte-Carlo information. More... | |
bool | PassesQualityCuts (const pandora::Algorithm *const pAlgorithm, const float purity, const float completeness) const |
Determine if the event passes the selection cuts for training and has the required NUANCE code. More... | |
void | Collect2DHits (const pandora::PfoList &pfos, pandora::CaloHitList &reconstructedCaloHitList, const pandora::CaloHitSet &reconstructableCaloHitSet) const |
Collect all 2D hits in a supplied list of Pfos and push them on to an existing hit list, check so not to double count. More... | |
unsigned int | CountNeutrinoInducedHits (const pandora::CaloHitList &caloHitList) const |
Count the number of neutrino induced hits in a given list using MC information. More... | |
int | GetNuanceCode (const pandora::Algorithm *const pAlgorithm) const |
Use the current MCParticle list to get the nuance code of the neutrino in the event. More... | |
void | SelectAllPfos (const pandora::Algorithm *const pAlgorithm, const SliceHypotheses &hypotheses, pandora::PfoList &selectedPfos) const |
Select all pfos under the same hypothesis. More... | |
void | SelectPfosByProbability (const pandora::Algorithm *const pAlgorithm, const SliceHypotheses &nuSliceHypotheses, const SliceHypotheses &crSliceHypotheses, const SliceFeaturesVector &sliceFeaturesVector, pandora::PfoList &selectedPfos) const |
Select pfos based on the probability that their slice contains a neutrino interaction. More... | |
void | SelectPfos (const pandora::PfoList &pfos, pandora::PfoList &selectedPfos) const |
Add the given pfos to the selected Pfo list. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Private Attributes | |
bool | m_useTrainingMode |
Should use training mode. If true, training examples will be written to the output file. More... | |
std::string | m_trainingOutputFile |
Output file name for training examples. More... | |
bool | m_selectNuanceCode |
Should select training events by nuance code. More... | |
int | m_nuance |
Nuance code to select for training. More... | |
float | m_minPurity |
Minimum purity of the best slice to use event for training. More... | |
float | m_minCompleteness |
Minimum completeness of the best slice to use event for training. More... | |
float | m_minProbability |
Minimum probability required to classify a slice as the neutrino. More... | |
unsigned int | m_maxNeutrinos |
The maximum number of neutrinos to select in any one event. More... | |
bool | m_persistFeatures |
If true, the mva features will be persisted in the metadata. More... | |
T | m_mva |
The mva. More... | |
std::string | m_filePathEnvironmentVariable |
The environment variable providing a list of paths to mva files. More... | |
NeutrinoIdTool class.
Compares the neutrino and cosmic hypotheses of all of the slices in the event. Uses an MVA to calculate the probability of each slice containing a neutrino interaction. The N slices with the highest probabilities are identified as a neutrino (if sufficiently probable) all other slices are deemed cosmogenic.
If training mode is switched on, then the tool will write MVA training exmples to the specified output file. The events selected for training must pass (user configurable) slicing quality cuts. Users may also select events based on their interaction type (nuance code).
Definition at line 32 of file NeutrinoIdTool.h.
|
private |
Definition at line 162 of file NeutrinoIdTool.h.
|
private |
Definition at line 161 of file NeutrinoIdTool.h.
lar_content::NeutrinoIdTool< T >::NeutrinoIdTool | ( | ) |
Default constructor.
Definition at line 29 of file NeutrinoIdTool.cc.
|
private |
Collect all 2D hits in a supplied list of Pfos and push them on to an existing hit list, check so not to double count.
pfos | input list of pfos |
reconstructedCaloHitList | output list of all 2d hits in the input pfos |
reconstructableCaloHitSet | set of reconstructable calo hits |
Definition at line 165 of file NeutrinoIdTool.cc.
|
private |
Count the number of neutrino induced hits in a given list using MC information.
caloHitSet | input list of calo hits |
Definition at line 187 of file NeutrinoIdTool.cc.
|
private |
Get the slice with the most neutrino induced hits using Monte-Carlo information.
pAlgorithm | address of the master algorithm |
nuSliceHypotheses | the input neutrino slice hypotheses |
crSliceHypotheses | the input cosmic slice hypotheses |
bestSliceIndex | the index of the slice with the most neutrino hits |
Definition at line 97 of file NeutrinoIdTool.cc.
|
private |
Use the current MCParticle list to get the nuance code of the neutrino in the event.
pAlgorithm | address of the master algorithm |
Definition at line 208 of file NeutrinoIdTool.cc.
|
private |
Get the features of each slice.
pTool | the address of the this NeutrinoId tool |
nuSliceHypotheses | the input neutrino slice hypotheses |
crSliceHypotheses | the input cosmic slice hypotheses |
sliceFeaturesVector | vector to hold the slice features |
Definition at line 87 of file NeutrinoIdTool.cc.
|
private |
Determine if the event passes the selection cuts for training and has the required NUANCE code.
pAlgorithm | address of the master algorithm |
purity | purity of best slice |
completeness | completeness of best slice |
Definition at line 152 of file NeutrinoIdTool.cc.
|
private |
Definition at line 593 of file NeutrinoIdTool.cc.
|
private |
Select all pfos under the same hypothesis.
pAlgorithm | address of the master algorithm |
hypotheses | the lists of slices under a certain hypothesis |
selectedPfos | the list of pfos to populate |
Definition at line 228 of file NeutrinoIdTool.cc.
|
virtual |
Select which reconstruction hypotheses to use; neutrino outcomes or cosmic-ray muon outcomes for each slice.
pAlgorithm | the address of the master instance, used to access MCParticles when in training mode |
nuSliceHypotheses | the parent pfos representing the neutrino outcome for each slice |
crSliceHypotheses | the parent pfos representing the cosmic-ray muon outcome for each slice |
sliceNuPfos | to receive the list of selected pfos |
Implements lar_content::SliceIdBaseTool.
Definition at line 45 of file NeutrinoIdTool.cc.
|
private |
Add the given pfos to the selected Pfo list.
pfos | the pfos to select |
selectedPfos | the list of pfos to populate |
Definition at line 320 of file NeutrinoIdTool.cc.
|
private |
Select pfos based on the probability that their slice contains a neutrino interaction.
pAlgorithm | address of the master algorithm |
nuSliceHypotheses | the input neutrino slice hypotheses |
crSliceHypotheses | the input cosmic slice hypotheses |
sliceFeaturesVector | vector holding the slice features |
selectedPfos | the list of pfos to populate |
Definition at line 246 of file NeutrinoIdTool.cc.
|
private |
The environment variable providing a list of paths to mva files.
Definition at line 273 of file NeutrinoIdTool.h.
|
private |
The maximum number of neutrinos to select in any one event.
Definition at line 268 of file NeutrinoIdTool.h.
|
private |
Minimum completeness of the best slice to use event for training.
Definition at line 264 of file NeutrinoIdTool.h.
|
private |
Minimum probability required to classify a slice as the neutrino.
Definition at line 267 of file NeutrinoIdTool.h.
|
private |
Minimum purity of the best slice to use event for training.
Definition at line 263 of file NeutrinoIdTool.h.
|
private |
The mva.
Definition at line 272 of file NeutrinoIdTool.h.
|
private |
Nuance code to select for training.
Definition at line 262 of file NeutrinoIdTool.h.
|
private |
If true, the mva features will be persisted in the metadata.
Definition at line 270 of file NeutrinoIdTool.h.
|
private |
Should select training events by nuance code.
Definition at line 261 of file NeutrinoIdTool.h.
|
private |
Output file name for training examples.
Definition at line 260 of file NeutrinoIdTool.h.
|
private |
Should use training mode. If true, training examples will be written to the output file.
Definition at line 259 of file NeutrinoIdTool.h.