LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
DlHitTrackShowerIdAlgorithm class. More...
#include "DlHitTrackShowerIdAlgorithm.h"
Public Member Functions | |
DlHitTrackShowerIdAlgorithm () | |
Default constructor. More... | |
virtual | ~DlHitTrackShowerIdAlgorithm () |
Private Types | |
typedef std::map< const pandora::CaloHit *, std::tuple< int, int, int, int > > | CaloHitToPixelMap |
typedef std::map< int, int > | PixelToTileMap |
Private Member Functions | |
pandora::StatusCode | Run () |
pandora::StatusCode | Train () |
Produce files that act as inputs to network training. More... | |
pandora::StatusCode | Infer () |
Run network inference. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
void | GetHitRegion (const pandora::CaloHitList &caloHitList, float &xMin, float &xMax, float &zMin, float &zMax) |
Identify the XZ range containing the hits for an event. More... | |
void | GetSparseTileMap (const pandora::CaloHitList &caloHitList, const float xMin, const float zMin, const int nTilesX, PixelToTileMap &sparseMap) |
Populate a map between pixels and tiles. More... | |
Private Attributes | |
pandora::StringVector | m_caloHitListNames |
Name of input calo hit list. More... | |
std::string | m_modelFileNameU |
Model file name for U view. More... | |
std::string | m_modelFileNameV |
Model file name for V view. More... | |
std::string | m_modelFileNameW |
Model file name for W view. More... | |
LArDLHelper::TorchModel | m_modelU |
Model for the U view. More... | |
LArDLHelper::TorchModel | m_modelV |
Model for the V view. More... | |
LArDLHelper::TorchModel | m_modelW |
Model for the W view. More... | |
int | m_imageHeight |
Height of images in pixels. More... | |
int | m_imageWidth |
Width of images in pixels. More... | |
float | m_tileSize |
Size of tile in cm. More... | |
bool | m_visualize |
Whether to visualize the track shower ID scores. More... | |
bool | m_useTrainingMode |
Training mode. More... | |
std::string | m_trainingOutputFile |
Output file name for training examples. More... | |
DlHitTrackShowerIdAlgorithm class.
Definition at line 21 of file DlHitTrackShowerIdAlgorithm.h.
|
private |
Definition at line 32 of file DlHitTrackShowerIdAlgorithm.h.
|
private |
Definition at line 33 of file DlHitTrackShowerIdAlgorithm.h.
lar_dl_content::DlHitTrackShowerIdAlgorithm::DlHitTrackShowerIdAlgorithm | ( | ) |
Default constructor.
Definition at line 32 of file DlHitTrackShowerIdAlgorithm.cc.
|
virtual |
Definition at line 44 of file DlHitTrackShowerIdAlgorithm.cc.
|
private |
Identify the XZ range containing the hits for an event.
caloHitList | The list of CaloHits for which the range is to be found |
xMin | The output minimum x-coordinate |
xMax | The output maximum x-coordinate |
zMin | The output minimum z-coordinate |
zMax | The output maximum z-coordinate |
Definition at line 313 of file DlHitTrackShowerIdAlgorithm.cc.
Referenced by Infer().
|
private |
Populate a map between pixels and tiles.
caloHitList | The list of CaloHits for which the map is to be populated |
xMin | The minimum x-coordinate |
zMin | The minimum z-coordinate |
nTilesX | The number of tiles in the x direction |
sparseMap | The output map between pixels and tiles |
Definition at line 336 of file DlHitTrackShowerIdAlgorithm.cc.
References m_tileSize, x, and z.
Referenced by Infer().
|
private |
Run network inference.
Definition at line 139 of file DlHitTrackShowerIdAlgorithm.cc.
References f, lar_dl_content::LArDLHelper::Forward(), GetHitRegion(), GetSparseTileMap(), lar_dl_content::LArDLHelper::InitialiseInput(), m_caloHitListNames, m_imageHeight, m_imageWidth, m_modelU, m_modelV, m_modelW, m_tileSize, m_visualize, r, lar_content::LArCaloHit::SetShowerProbability(), x, and z.
Referenced by Run().
|
private |
Definition at line 365 of file DlHitTrackShowerIdAlgorithm.cc.
References f, lar_dl_content::LArDLHelper::LoadModel(), m_caloHitListNames, m_imageHeight, m_imageWidth, m_modelFileNameU, m_modelFileNameV, m_modelFileNameW, m_modelU, m_modelV, m_modelW, m_tileSize, m_trainingOutputFile, m_useTrainingMode, and m_visualize.
|
private |
Definition at line 50 of file DlHitTrackShowerIdAlgorithm.cc.
References Infer(), m_useTrainingMode, and Train().
|
private |
Produce files that act as inputs to network training.
Definition at line 60 of file DlHitTrackShowerIdAlgorithm.cc.
References util::abs(), f, m_caloHitListNames, lar_content::LArMCParticleHelper::PrimaryParameters::m_maxPhotonPropagation, lar_content::LArMCParticleHelper::PrimaryParameters::m_minHitsForGoodView, and m_trainingOutputFile.
Referenced by Run().
|
private |
Name of input calo hit list.
Definition at line 70 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by Infer(), ReadSettings(), and Train().
|
private |
Height of images in pixels.
Definition at line 77 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by Infer(), and ReadSettings().
|
private |
Width of images in pixels.
Definition at line 78 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by Infer(), and ReadSettings().
|
private |
Model file name for U view.
Definition at line 71 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by ReadSettings().
|
private |
Model file name for V view.
Definition at line 72 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by ReadSettings().
|
private |
Model file name for W view.
Definition at line 73 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by ReadSettings().
|
private |
Model for the U view.
Definition at line 74 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by Infer(), and ReadSettings().
|
private |
Model for the V view.
Definition at line 75 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by Infer(), and ReadSettings().
|
private |
Model for the W view.
Definition at line 76 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by Infer(), and ReadSettings().
|
private |
Size of tile in cm.
Definition at line 79 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by GetSparseTileMap(), Infer(), and ReadSettings().
|
private |
Output file name for training examples.
Definition at line 82 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by ReadSettings(), and Train().
|
private |
Training mode.
Definition at line 81 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Whether to visualize the track shower ID scores.
Definition at line 80 of file DlHitTrackShowerIdAlgorithm.h.
Referenced by Infer(), and ReadSettings().