Pandora
Pandora source code navigator
|
NeutrinoIdTool class. More...
#include "NeutrinoIdTool.h"
Classes | |
class | SliceFeatures |
Slice features class. More... | |
Public Member Functions | |
NeutrinoIdTool () | |
Default constructor. | |
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. | |
const std::string & | GetType () const |
Get the type. | |
const std::string & | GetInstanceName () const |
Get the instance name. | |
const Pandora & | GetPandora () const |
Get the associated pandora instance. | |
Protected Member Functions | |
virtual StatusCode | Initialize () |
Perform any operations that must occur after reading settings, but before running the process. | |
virtual StatusCode | Reset () |
Perform any operations when pandora is reset, typically at the end of each event. | |
StatusCode | RegisterDetails (const Pandora *const pPandora, const std::string &type, const std::string &instanceName) |
Register i) the pandora instance that will run the process and ii) the process type. | |
Protected Attributes | |
const Pandora * | m_pPandora |
The pandora object that will run the process. | |
std::string | m_type |
The process type. | |
std::string | m_instanceName |
The process instance name. | |
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. | |
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. | |
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. | |
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. | |
unsigned int | CountNeutrinoInducedHits (const pandora::CaloHitList &caloHitList) const |
Count the number of neutrino induced hits in a given list using MC information. | |
int | GetNuanceCode (const pandora::Algorithm *const pAlgorithm) const |
Use the current MCParticle list to get the nuance code of the neutrino in the event. | |
void | SelectAllPfos (const pandora::Algorithm *const pAlgorithm, const SliceHypotheses &hypotheses, pandora::PfoList &selectedPfos) const |
Select all pfos under the same hypothesis. | |
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. | |
void | SelectPfos (const pandora::PfoList &pfos, pandora::PfoList &selectedPfos) const |
Add the given pfos to the selected Pfo list. | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Read the algorithm settings. | |
Private Attributes | |
bool | m_useTrainingMode |
Should use training mode. If true, training examples will be written to the output file. | |
std::string | m_trainingOutputFile |
Output file name for training examples. | |
bool | m_selectNuanceCode |
Should select training events by nuance code. | |
int | m_nuance |
Nuance code to select for training. | |
float | m_minPurity |
Minimum purity of the best slice to use event for training. | |
float | m_minCompleteness |
Minimum completeness of the best slice to use event for training. | |
float | m_minProbability |
Minimum probability required to classify a slice as the neutrino. | |
float | m_defaultProbability |
Default probability set if score could not be calculated. | |
unsigned int | m_maxNeutrinos |
The maximum number of neutrinos to select in any one event. | |
bool | m_persistFeatures |
If true, the mva features will be persisted in the metadata. | |
T | m_mva |
The mva. | |
std::string | m_filePathEnvironmentVariable |
The environment variable providing a list of paths to mva files. | |
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 166 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 188 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 98 of file NeutrinoIdTool.cc.
|
inlineinherited |
|
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 209 of file NeutrinoIdTool.cc.
|
inlineinherited |
|
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 88 of file NeutrinoIdTool.cc.
|
inlineinherited |
|
inlineprotectedvirtualinherited |
Perform any operations that must occur after reading settings, but before running the process.
Reimplemented in lar_content::BdtBeamParticleIdTool, lar_content::BeamParticleIdTool, lar_content::CosmicRayTaggingTool, lar_content::EventReadingAlgorithm, lar_content::EventWritingAlgorithm, lar_content::LArPseudoLayerPlugin, lar_content::LArRotationalTransformationPlugin, EventReadingAlgorithm, and EventWritingAlgorithm.
Definition at line 126 of file Process.h.
|
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 153 of file NeutrinoIdTool.cc.
|
privatevirtual |
Read the algorithm settings.
xmlHandle | the relevant xml handle |
Implements pandora::Process.
Definition at line 594 of file NeutrinoIdTool.cc.
|
inlineprotectedinherited |
Register i) the pandora instance that will run the process and ii) the process type.
pPandora | address of the pandora object that will run the process |
type | the process type |
instanceName | the process instance name |
Definition at line 146 of file Process.h.
|
inlineprotectedvirtualinherited |
Perform any operations when pandora is reset, typically at the end of each event.
Reimplemented in lar_content::MasterAlgorithm, lar_content::PostProcessingAlgorithm, and lar_content::PreProcessingAlgorithm.
Definition at line 133 of file Process.h.
|
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 229 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 46 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 321 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 247 of file NeutrinoIdTool.cc.
|
private |
Default probability set if score could not be calculated.
Definition at line 268 of file NeutrinoIdTool.h.
|
private |
The environment variable providing a list of paths to mva files.
Definition at line 274 of file NeutrinoIdTool.h.
|
protectedinherited |
|
private |
The maximum number of neutrinos to select in any one event.
Definition at line 269 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 273 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 271 of file NeutrinoIdTool.h.
|
protectedinherited |
|
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.
|
protectedinherited |
|
private |
Should use training mode. If true, training examples will be written to the output file.
Definition at line 259 of file NeutrinoIdTool.h.