![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
DeepLearningSignalIdAlgorithm class. More...
#include "DlSNSignalAlgorithm.h"
Public Types | |
typedef std::map< std::pair< int, int >, std::vector< const pandora::CaloHit * > > | PixelToCaloHitsMap |
Public Member Functions | |
DlSNSignalAlgorithm () | |
Default constructor. More... | |
virtual | ~DlSNSignalAlgorithm () |
Private Types | |
typedef std::pair< int, int > | Pixel |
typedef std::map< const pandora::CaloHit *, Pixel > | PixelMap |
Private Member Functions | |
pandora::StatusCode | Run () |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
pandora::StatusCode | PrepareTrainingSample () |
pandora::StatusCode | Infer () |
pandora::StatusCode | CheatedSeparation () |
pandora::StatusCode | MakeNetworkInputFromHits (const pandora::CaloHitList &caloHits, const pandora::HitType view, const float xMin, const float xMax, const float zMin, const float zMax, LArDLHelper::TorchInput &networkInput, PixelMap &pixelMap) const |
pandora::StatusCode | GetMCToHitsMap (LArMCParticleHelper::MCContributionMap &mcToHitsMap) const |
pandora::StatusCode | CompleteMCHierarchy (const LArMCParticleHelper::MCContributionMap &mcToHitsMap, pandora::MCParticleList &mcHierarchy) const |
void | GetHitRegion (const pandora::CaloHitList &caloHitList, float &xMin, float &xMax, float &zMin, float &zMax) const |
Private Attributes | |
bool | m_trainingMode |
Training mode. More... | |
std::string | m_trainingOutputFile |
Output file name for training examples. More... | |
std::string | m_inputSignalListName |
Input vertex list name if 2nd pass. More... | |
pandora::StringVector | m_caloHitListNames |
Names of input calo hit lists. More... | |
LArDLHelper::TorchModel | m_modelU |
The model for the U view. More... | |
LArDLHelper::TorchModel | m_modelV |
The model for the V view. More... | |
LArDLHelper::TorchModel | m_modelW |
The model for the W view. More... | |
int | m_event |
The current event number. More... | |
int | m_pass |
The pass of the train/infer step. More... | |
int | m_height |
The height of the images. More... | |
int | m_width |
The width of the images. More... | |
float | m_driftStep |
The size of a pixel in the drift direction in cm (most relevant in pass 2) More... | |
bool | m_visualise |
Whether or not to visualise the candidate vertices. More... | |
bool | m_writeTree |
Whether or not to write validation details to a ROOT tree. More... | |
std::string | m_rootTreeName |
The ROOT tree name. More... | |
std::string | m_rootFileName |
The ROOT file name. More... | |
std::mt19937 | m_rng |
The random number generator. More... | |
bool | m_printOut |
Whether or not to print out network outputs of CaloHitList names and sizes. More... | |
std::string | m_signalListNameU |
Output signal CaloHitListU name. More... | |
std::string | m_signalListNameV |
Output signal CaloHitListV name. More... | |
std::string | m_signalListNameW |
Output signal CaloHitListW name. More... | |
std::string | m_signalListName2D |
Output signal CaloHitList2D name. More... | |
std::string | m_caloHitListName2D |
Input CaloHitList2D name. More... | |
pandora::StringVector | m_inputCaloHitListNames |
Names of input calo hit lists, passed from Pass 1 of DLSignalAlg. More... | |
std::string | m_backgroundListName |
Input Background CaloHitList name. More... | |
bool | m_applyCheatedSeparation |
Whether cheating to separate background and signal hits. More... | |
bool | m_simpleZoom |
Decide whethere to run a simple loop to find highest adc hit or run network. More... | |
long unsigned int | m_passOneTrustThreshold |
Number of pixels in pass one required to trust the wire finding ability, below this threshold, the algorithm will use highest ADC within Drift Min/Max to set wire limits. More... | |
const int | PHOTON_CLASS {2} |
Constant for network classification for photons. More... | |
const int | ELECTRON_CLASS {3} |
Constant for network classification for electrons. More... | |
const int | SIGNAL_CLASS {2} |
Constant for network classification for signal. More... | |
DeepLearningSignalIdAlgorithm class.
Definition at line 27 of file DlSNSignalAlgorithm.h.
|
private |
Definition at line 40 of file DlSNSignalAlgorithm.h.
|
private |
Definition at line 41 of file DlSNSignalAlgorithm.h.
typedef std::map<std::pair<int, int>, std::vector<const pandora::CaloHit *> > lar_dl_content::DlSNSignalAlgorithm::PixelToCaloHitsMap |
Definition at line 30 of file DlSNSignalAlgorithm.h.
lar_dl_content::DlSNSignalAlgorithm::DlSNSignalAlgorithm | ( | ) |
Default constructor.
Definition at line 31 of file DlSNSignalAlgorithm.cc.
References m_applyCheatedSeparation, m_backgroundListName, m_caloHitListName2D, m_driftStep, m_event, m_height, m_pass, m_passOneTrustThreshold, m_printOut, m_signalListName2D, m_signalListNameU, m_signalListNameV, m_signalListNameW, m_simpleZoom, m_trainingOutputFile, m_visualise, m_width, and m_writeTree.
|
virtual |
Definition at line 54 of file DlSNSignalAlgorithm.cc.
References e, m_rootFileName, m_rootTreeName, and m_writeTree.
|
private |
Definition at line 618 of file DlSNSignalAlgorithm.cc.
References util::abs(), f, m_backgroundListName, m_caloHitListNames, m_signalListName2D, m_signalListNameU, m_signalListNameV, m_signalListNameW, and m_visualise.
Referenced by Run().
|
private |
Definition at line 819 of file DlSNSignalAlgorithm.cc.
|
private |
Definition at line 848 of file DlSNSignalAlgorithm.cc.
References util::begin(), m_driftStep, m_height, m_pass, m_simpleZoom, m_width, x, and z.
Referenced by Infer(), and PrepareTrainingSample().
|
private |
Definition at line 797 of file DlSNSignalAlgorithm.cc.
References m_caloHitListName2D, lar_content::LArMCParticleHelper::PrimaryParameters::m_maxPhotonPropagation, lar_content::LArMCParticleHelper::PrimaryParameters::m_minHitsForGoodView, lar_content::LArMCParticleHelper::PrimaryParameters::m_minPrimaryGoodHits, and lar_content::LArMCParticleHelper::PrimaryParameters::m_minPrimaryGoodViews.
Referenced by PrepareTrainingSample().
|
private |
Definition at line 285 of file DlSNSignalAlgorithm.cc.
References util::begin(), e, ELECTRON_CLASS, f, lar_dl_content::LArDLHelper::Forward(), GetHitRegion(), m_backgroundListName, m_caloHitListNames, m_event, m_height, m_inputCaloHitListNames, m_modelU, m_modelV, m_modelW, m_pass, m_passOneTrustThreshold, m_printOut, m_signalListName2D, m_signalListNameU, m_signalListNameV, m_signalListNameW, m_simpleZoom, m_visualise, MakeNetworkInputFromHits(), PHOTON_CLASS, SIGNAL_CLASS, util::to_string(), x, and z.
Referenced by Run().
|
private |
Definition at line 754 of file DlSNSignalAlgorithm.cc.
References util::begin(), lar_dl_content::LArDLHelper::InitialiseInput(), m_driftStep, m_height, m_pass, m_width, x, and z.
Referenced by Infer().
|
private |
Definition at line 91 of file DlSNSignalAlgorithm.cc.
References util::begin(), e, f, GetHitRegion(), GetMCToHitsMap(), m_caloHitListNames, m_height, m_inputCaloHitListNames, m_pass, m_simpleZoom, m_trainingOutputFile, x, and z.
Referenced by Run().
|
private |
Definition at line 987 of file DlSNSignalAlgorithm.cc.
References lar_dl_content::LArDLHelper::LoadModel(), m_applyCheatedSeparation, m_backgroundListName, m_caloHitListName2D, m_caloHitListNames, m_driftStep, m_height, m_inputCaloHitListNames, m_modelU, m_modelV, m_modelW, m_pass, m_passOneTrustThreshold, m_printOut, m_rootFileName, m_rootTreeName, m_signalListName2D, m_signalListNameU, m_signalListNameV, m_signalListNameW, m_trainingMode, m_trainingOutputFile, m_visualise, m_width, and m_writeTree.
|
private |
Definition at line 71 of file DlSNSignalAlgorithm.cc.
References CheatedSeparation(), f, Infer(), m_applyCheatedSeparation, m_trainingMode, m_visualise, and PrepareTrainingSample().
|
private |
Constant for network classification for electrons.
Definition at line 128 of file DlSNSignalAlgorithm.h.
Referenced by Infer().
|
private |
Whether cheating to separate background and signal hits.
Definition at line 124 of file DlSNSignalAlgorithm.h.
Referenced by DlSNSignalAlgorithm(), ReadSettings(), and Run().
|
private |
Input Background CaloHitList name.
Definition at line 123 of file DlSNSignalAlgorithm.h.
Referenced by CheatedSeparation(), DlSNSignalAlgorithm(), Infer(), and ReadSettings().
|
private |
Input CaloHitList2D name.
Definition at line 121 of file DlSNSignalAlgorithm.h.
Referenced by DlSNSignalAlgorithm(), GetMCToHitsMap(), and ReadSettings().
|
private |
Names of input calo hit lists.
Definition at line 102 of file DlSNSignalAlgorithm.h.
Referenced by CheatedSeparation(), Infer(), PrepareTrainingSample(), and ReadSettings().
|
private |
The size of a pixel in the drift direction in cm (most relevant in pass 2)
Definition at line 110 of file DlSNSignalAlgorithm.h.
Referenced by DlSNSignalAlgorithm(), GetHitRegion(), MakeNetworkInputFromHits(), and ReadSettings().
|
private |
The current event number.
Definition at line 106 of file DlSNSignalAlgorithm.h.
Referenced by DlSNSignalAlgorithm(), and Infer().
|
private |
The height of the images.
Definition at line 108 of file DlSNSignalAlgorithm.h.
Referenced by DlSNSignalAlgorithm(), GetHitRegion(), Infer(), MakeNetworkInputFromHits(), PrepareTrainingSample(), and ReadSettings().
|
private |
Names of input calo hit lists, passed from Pass 1 of DLSignalAlg.
Definition at line 122 of file DlSNSignalAlgorithm.h.
Referenced by Infer(), PrepareTrainingSample(), and ReadSettings().
|
private |
Input vertex list name if 2nd pass.
Definition at line 101 of file DlSNSignalAlgorithm.h.
|
private |
The model for the U view.
Definition at line 103 of file DlSNSignalAlgorithm.h.
Referenced by Infer(), and ReadSettings().
|
private |
The model for the V view.
Definition at line 104 of file DlSNSignalAlgorithm.h.
Referenced by Infer(), and ReadSettings().
|
private |
The model for the W view.
Definition at line 105 of file DlSNSignalAlgorithm.h.
Referenced by Infer(), and ReadSettings().
|
private |
The pass of the train/infer step.
Definition at line 107 of file DlSNSignalAlgorithm.h.
Referenced by DlSNSignalAlgorithm(), GetHitRegion(), Infer(), MakeNetworkInputFromHits(), PrepareTrainingSample(), and ReadSettings().
|
private |
Number of pixels in pass one required to trust the wire finding ability, below this threshold, the algorithm will use highest ADC within Drift Min/Max to set wire limits.
Definition at line 126 of file DlSNSignalAlgorithm.h.
Referenced by DlSNSignalAlgorithm(), Infer(), and ReadSettings().
|
private |
Whether or not to print out network outputs of CaloHitList names and sizes.
Definition at line 116 of file DlSNSignalAlgorithm.h.
Referenced by DlSNSignalAlgorithm(), Infer(), and ReadSettings().
|
private |
The random number generator.
Definition at line 115 of file DlSNSignalAlgorithm.h.
|
private |
The ROOT file name.
Definition at line 114 of file DlSNSignalAlgorithm.h.
Referenced by ReadSettings(), and ~DlSNSignalAlgorithm().
|
private |
The ROOT tree name.
Definition at line 113 of file DlSNSignalAlgorithm.h.
Referenced by ReadSettings(), and ~DlSNSignalAlgorithm().
|
private |
Output signal CaloHitList2D name.
Definition at line 120 of file DlSNSignalAlgorithm.h.
Referenced by CheatedSeparation(), DlSNSignalAlgorithm(), Infer(), and ReadSettings().
|
private |
Output signal CaloHitListU name.
Definition at line 117 of file DlSNSignalAlgorithm.h.
Referenced by CheatedSeparation(), DlSNSignalAlgorithm(), Infer(), and ReadSettings().
|
private |
Output signal CaloHitListV name.
Definition at line 118 of file DlSNSignalAlgorithm.h.
Referenced by CheatedSeparation(), DlSNSignalAlgorithm(), Infer(), and ReadSettings().
|
private |
Output signal CaloHitListW name.
Definition at line 119 of file DlSNSignalAlgorithm.h.
Referenced by CheatedSeparation(), DlSNSignalAlgorithm(), Infer(), and ReadSettings().
|
private |
Decide whethere to run a simple loop to find highest adc hit or run network.
Definition at line 125 of file DlSNSignalAlgorithm.h.
Referenced by DlSNSignalAlgorithm(), GetHitRegion(), Infer(), and PrepareTrainingSample().
|
private |
Training mode.
Definition at line 99 of file DlSNSignalAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Output file name for training examples.
Definition at line 100 of file DlSNSignalAlgorithm.h.
Referenced by DlSNSignalAlgorithm(), PrepareTrainingSample(), and ReadSettings().
|
private |
Whether or not to visualise the candidate vertices.
Definition at line 111 of file DlSNSignalAlgorithm.h.
Referenced by CheatedSeparation(), DlSNSignalAlgorithm(), Infer(), ReadSettings(), and Run().
|
private |
The width of the images.
Definition at line 109 of file DlSNSignalAlgorithm.h.
Referenced by DlSNSignalAlgorithm(), GetHitRegion(), MakeNetworkInputFromHits(), and ReadSettings().
|
private |
Whether or not to write validation details to a ROOT tree.
Definition at line 112 of file DlSNSignalAlgorithm.h.
Referenced by DlSNSignalAlgorithm(), ReadSettings(), and ~DlSNSignalAlgorithm().
|
private |
Constant for network classification for photons.
Definition at line 127 of file DlSNSignalAlgorithm.h.
Referenced by Infer().
|
private |
Constant for network classification for signal.
Definition at line 129 of file DlSNSignalAlgorithm.h.
Referenced by Infer().