![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
DeepLearningTrackShowerIdAlgorithm class. More...
#include "DlVertexingAlgorithm.h"
Public Types | |
typedef std::map< std::pair< int, int >, std::vector< const pandora::CaloHit * > > | PixelToCaloHitsMap |
Public Member Functions | |
DlVertexingAlgorithm () | |
Default constructor. More... | |
~DlVertexingAlgorithm () | |
Protected Types | |
typedef std::pair< int, int > | Pixel |
typedef std::vector< Pixel > | PixelVector |
Protected Member Functions | |
void | GetHitRegion (const pandora::CaloHitList &caloHitList, float &xMin, float &xMax, float &zMin, float &zMax) const |
void | GetCanvasParameters (const LArDLHelper::TorchOutput &networkOutput, const PixelVector &pixelVector, int &columnOffset, int &rowOffset, int &width, int &height) const |
Determines the parameters of the canvas for extracting the vertex location. The network predicts the distance that each pixel associated with a hit is located from the vertex, but says nothing about the direction. As a result, the ring describing the potential vertices associated with that hit can extend beyond the original canvas size. This function returns the size of the required canvas and the offset for the bottom left corner. More... | |
Protected Attributes | |
bool | m_trainingMode |
Training mode. More... | |
std::string | m_trainingOutputFile |
Output file name for training examples. More... | |
std::string | m_inputVertexListName |
Input vertex list name if 2nd pass. More... | |
std::string | m_outputVertexListName |
Output vertex list name. 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_pass |
The pass of the train/infer step. More... | |
int | m_nClasses |
The number of distance classes. 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... | |
std::vector< double > | m_thresholds |
Distance class thresholds. More... | |
std::string | m_volumeType |
The name of the fiducial volume type for the monitoring output. More... | |
Private Member Functions | |
pandora::StatusCode | Run () |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
pandora::StatusCode | PrepareTrainingSample () |
pandora::StatusCode | Infer () |
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, PixelVector &pixelVector) const |
pandora::StatusCode | MakeWirePlaneCoordinatesFromCanvas (float **canvas, const int canvasWidth, const int canvasHeight, const int columnOffset, const int rowOffset, const pandora::HitType view, const float xMin, const float xMax, const float zMin, const float zMax, pandora::CartesianPointVector &positionVector) const |
pandora::StatusCode | MakeCandidateVertexList (const pandora::CartesianPointVector &positions) |
Create a vertex list from the candidate vertices. More... | |
Private Attributes | |
int | m_event |
The current event number. 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... | |
DeepLearningTrackShowerIdAlgorithm class.
Definition at line 29 of file DlVertexingAlgorithm.h.
|
protectedinherited |
Definition at line 41 of file DlVertexingBaseAlgorithm.h.
|
inherited |
Definition at line 31 of file DlVertexingBaseAlgorithm.h.
|
protectedinherited |
Definition at line 42 of file DlVertexingBaseAlgorithm.h.
lar_dl_content::DlVertexingAlgorithm::DlVertexingAlgorithm | ( | ) |
Default constructor.
Definition at line 30 of file DlVertexingAlgorithm.cc.
References m_rng, m_visualise, and m_writeTree.
lar_dl_content::DlVertexingAlgorithm::~DlVertexingAlgorithm | ( | ) |
Definition at line 38 of file DlVertexingAlgorithm.cc.
References e, m_rootFileName, m_rootTreeName, and m_writeTree.
|
protectedinherited |
Determines the parameters of the canvas for extracting the vertex location. The network predicts the distance that each pixel associated with a hit is located from the vertex, but says nothing about the direction. As a result, the ring describing the potential vertices associated with that hit can extend beyond the original canvas size. This function returns the size of the required canvas and the offset for the bottom left corner.
networkOutput | The TorchOutput object populated by the network inference step |
pixelVector | The vector of populated pixels |
columnOffset | The output column offset for the canvas |
rowOffset | The output row offset for the canvas |
width | The output width for the canvas |
height | The output height for the canvas |
Definition at line 165 of file DlVertexingBaseAlgorithm.cc.
References col, lar_dl_content::DlVertexingBaseAlgorithm::m_height, lar_dl_content::DlVertexingBaseAlgorithm::m_thresholds, and lar_dl_content::DlVertexingBaseAlgorithm::m_width.
Referenced by Infer(), and lar_dl_content::DlSecondaryVertexingAlgorithm::Infer().
|
protectedinherited |
Definition at line 50 of file DlVertexingBaseAlgorithm.cc.
References util::begin(), lar_dl_content::DlVertexingBaseAlgorithm::m_caloHitListNames, lar_dl_content::DlVertexingBaseAlgorithm::m_driftStep, lar_dl_content::DlVertexingBaseAlgorithm::m_height, lar_dl_content::DlVertexingBaseAlgorithm::m_inputVertexListName, lar_dl_content::DlVertexingBaseAlgorithm::m_pass, lar_dl_content::DlVertexingBaseAlgorithm::m_width, x, and z.
Referenced by Infer(), lar_dl_content::DlSecondaryVertexingAlgorithm::Infer(), PrepareTrainingSample(), and lar_dl_content::DlSecondaryVertexingAlgorithm::PrepareTrainingSample().
|
private |
Definition at line 169 of file DlVertexingAlgorithm.cc.
References col, lar_dl_content::LArCanvasHelper::DrawRing(), f, lar_dl_content::LArDLHelper::Forward(), lar_dl_content::DlVertexingBaseAlgorithm::GetCanvasParameters(), lar_dl_content::DlVertexingBaseAlgorithm::GetHitRegion(), lar_dl_content::DlVertexingBaseAlgorithm::m_caloHitListNames, m_event, lar_dl_content::DlVertexingBaseAlgorithm::m_height, lar_dl_content::DlVertexingBaseAlgorithm::m_inputVertexListName, lar_dl_content::DlVertexingBaseAlgorithm::m_modelU, lar_dl_content::DlVertexingBaseAlgorithm::m_modelV, lar_dl_content::DlVertexingBaseAlgorithm::m_modelW, lar_dl_content::DlVertexingBaseAlgorithm::m_nClasses, lar_dl_content::DlVertexingBaseAlgorithm::m_pass, lar_dl_content::DlVertexingBaseAlgorithm::m_thresholds, m_visualise, lar_dl_content::DlVertexingBaseAlgorithm::m_width, MakeCandidateVertexList(), MakeNetworkInputFromHits(), MakeWirePlaneCoordinatesFromCanvas(), w, and x.
Referenced by Run().
|
private |
Create a vertex list from the candidate vertices.
candidates | The candidate positions with which to create the list. |
Definition at line 452 of file DlVertexingAlgorithm.cc.
References m_event, lar_dl_content::DlVertexingBaseAlgorithm::m_outputVertexListName, lar_dl_content::DlVertexingBaseAlgorithm::m_pass, m_rootTreeName, lar_dl_content::DlVertexingBaseAlgorithm::m_volumeType, and m_writeTree.
Referenced by Infer().
|
private |
Definition at line 368 of file DlVertexingAlgorithm.cc.
References util::begin(), col, lar_dl_content::LArDLHelper::InitialiseInput(), lar_dl_content::DlVertexingBaseAlgorithm::m_driftStep, lar_dl_content::DlVertexingBaseAlgorithm::m_height, lar_dl_content::DlVertexingBaseAlgorithm::m_pass, lar_dl_content::DlVertexingBaseAlgorithm::m_width, value, x, and z.
Referenced by Infer().
|
private |
Definition at line 419 of file DlVertexingAlgorithm.cc.
References util::begin(), col, f, lar_dl_content::DlVertexingBaseAlgorithm::m_driftStep, lar_dl_content::DlVertexingBaseAlgorithm::m_height, lar_dl_content::DlVertexingBaseAlgorithm::m_width, pt, x, and z.
Referenced by Infer().
|
private |
Definition at line 65 of file DlVertexingAlgorithm.cc.
References f, lar_dl_content::DlVertexingBaseAlgorithm::GetHitRegion(), lar_dl_content::DlVertexingBaseAlgorithm::m_caloHitListNames, lar_dl_content::DlVertexingBaseAlgorithm::m_pass, lar_dl_content::DlVertexingBaseAlgorithm::m_trainingOutputFile, x, and z.
Referenced by Run().
|
private |
Definition at line 540 of file DlVertexingAlgorithm.cc.
References m_rootFileName, m_rootTreeName, lar_dl_content::DlVertexingBaseAlgorithm::m_trainingMode, m_visualise, m_writeTree, and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
private |
Definition at line 55 of file DlVertexingAlgorithm.cc.
References Infer(), lar_dl_content::DlVertexingBaseAlgorithm::m_trainingMode, and PrepareTrainingSample().
|
protectedinherited |
Names of input calo hit lists.
Definition at line 79 of file DlVertexingBaseAlgorithm.h.
Referenced by lar_dl_content::DlVertexingBaseAlgorithm::GetHitRegion(), Infer(), lar_dl_content::DlSecondaryVertexingAlgorithm::Infer(), PrepareTrainingSample(), lar_dl_content::DlSecondaryVertexingAlgorithm::PrepareTrainingSample(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
protectedinherited |
The size of a pixel in the drift direction in cm (most relevant in pass 2)
Definition at line 87 of file DlVertexingBaseAlgorithm.h.
Referenced by lar_dl_content::DlVertexingBaseAlgorithm::DlVertexingBaseAlgorithm(), lar_dl_content::DlVertexingBaseAlgorithm::GetHitRegion(), MakeNetworkInputFromHits(), MakeWirePlaneCoordinatesFromCanvas(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
private |
The current event number.
Definition at line 99 of file DlVertexingAlgorithm.h.
Referenced by Infer(), and MakeCandidateVertexList().
|
protectedinherited |
The height of the images.
Definition at line 85 of file DlVertexingBaseAlgorithm.h.
Referenced by lar_dl_content::DlVertexingBaseAlgorithm::DlVertexingBaseAlgorithm(), lar_dl_content::DlVertexingBaseAlgorithm::GetCanvasParameters(), lar_dl_content::DlVertexingBaseAlgorithm::GetHitRegion(), lar_dl_content::DlSecondaryVertexingAlgorithm::GetVerticesFromCanvas(), Infer(), lar_dl_content::DlSecondaryVertexingAlgorithm::Infer(), MakeNetworkInputFromHits(), lar_dl_content::DlSecondaryVertexingAlgorithm::MakeNetworkInputFromHits(), MakeWirePlaneCoordinatesFromCanvas(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
protectedinherited |
Input vertex list name if 2nd pass.
Definition at line 77 of file DlVertexingBaseAlgorithm.h.
Referenced by lar_dl_content::DlVertexingBaseAlgorithm::GetHitRegion(), Infer(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
protectedinherited |
The model for the U view.
Definition at line 80 of file DlVertexingBaseAlgorithm.h.
Referenced by Infer(), lar_dl_content::DlSecondaryVertexingAlgorithm::Infer(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
protectedinherited |
The model for the V view.
Definition at line 81 of file DlVertexingBaseAlgorithm.h.
Referenced by Infer(), lar_dl_content::DlSecondaryVertexingAlgorithm::Infer(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
protectedinherited |
The model for the W view.
Definition at line 82 of file DlVertexingBaseAlgorithm.h.
Referenced by Infer(), lar_dl_content::DlSecondaryVertexingAlgorithm::Infer(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
protectedinherited |
The number of distance classes.
Definition at line 84 of file DlVertexingBaseAlgorithm.h.
Referenced by lar_dl_content::DlVertexingBaseAlgorithm::DlVertexingBaseAlgorithm(), Infer(), lar_dl_content::DlSecondaryVertexingAlgorithm::Infer(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
protectedinherited |
Output vertex list name.
Definition at line 78 of file DlVertexingBaseAlgorithm.h.
Referenced by MakeCandidateVertexList(), lar_dl_content::DlSecondaryVertexingAlgorithm::MakeCandidateVertexList(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
protectedinherited |
The pass of the train/infer step.
Definition at line 83 of file DlVertexingBaseAlgorithm.h.
Referenced by lar_dl_content::DlVertexingBaseAlgorithm::DlVertexingBaseAlgorithm(), lar_dl_content::DlVertexingBaseAlgorithm::GetHitRegion(), Infer(), MakeCandidateVertexList(), MakeNetworkInputFromHits(), lar_dl_content::DlSecondaryVertexingAlgorithm::MakeNetworkInputFromHits(), PrepareTrainingSample(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
private |
The random number generator.
Definition at line 104 of file DlVertexingAlgorithm.h.
Referenced by DlVertexingAlgorithm().
|
private |
The ROOT file name.
Definition at line 103 of file DlVertexingAlgorithm.h.
Referenced by ReadSettings(), and ~DlVertexingAlgorithm().
|
private |
The ROOT tree name.
Definition at line 102 of file DlVertexingAlgorithm.h.
Referenced by MakeCandidateVertexList(), ReadSettings(), and ~DlVertexingAlgorithm().
|
protectedinherited |
Distance class thresholds.
Definition at line 88 of file DlVertexingBaseAlgorithm.h.
Referenced by lar_dl_content::DlVertexingBaseAlgorithm::GetCanvasParameters(), Infer(), lar_dl_content::DlSecondaryVertexingAlgorithm::Infer(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
protectedinherited |
Training mode.
Definition at line 75 of file DlVertexingBaseAlgorithm.h.
Referenced by ReadSettings(), lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings(), lar_dl_content::DlSecondaryVertexingAlgorithm::ReadSettings(), Run(), and lar_dl_content::DlSecondaryVertexingAlgorithm::Run().
|
protectedinherited |
Output file name for training examples.
Definition at line 76 of file DlVertexingBaseAlgorithm.h.
Referenced by lar_dl_content::DlVertexingBaseAlgorithm::DlVertexingBaseAlgorithm(), PrepareTrainingSample(), lar_dl_content::DlSecondaryVertexingAlgorithm::PrepareTrainingSample(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
private |
Whether or not to visualise the candidate vertices.
Definition at line 100 of file DlVertexingAlgorithm.h.
Referenced by DlVertexingAlgorithm(), Infer(), and ReadSettings().
|
protectedinherited |
The name of the fiducial volume type for the monitoring output.
Definition at line 89 of file DlVertexingBaseAlgorithm.h.
Referenced by lar_dl_content::DlVertexingBaseAlgorithm::DlVertexingBaseAlgorithm(), MakeCandidateVertexList(), lar_dl_content::DlSecondaryVertexingAlgorithm::PrepareTrainingSample(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
protectedinherited |
The width of the images.
Definition at line 86 of file DlVertexingBaseAlgorithm.h.
Referenced by lar_dl_content::DlVertexingBaseAlgorithm::DlVertexingBaseAlgorithm(), lar_dl_content::DlVertexingBaseAlgorithm::GetCanvasParameters(), lar_dl_content::DlVertexingBaseAlgorithm::GetHitRegion(), lar_dl_content::DlSecondaryVertexingAlgorithm::GetVerticesFromCanvas(), Infer(), lar_dl_content::DlSecondaryVertexingAlgorithm::Infer(), MakeNetworkInputFromHits(), lar_dl_content::DlSecondaryVertexingAlgorithm::MakeNetworkInputFromHits(), MakeWirePlaneCoordinatesFromCanvas(), and lar_dl_content::DlVertexingBaseAlgorithm::ReadSettings().
|
private |
Whether or not to write validation details to a ROOT tree.
Definition at line 101 of file DlVertexingAlgorithm.h.
Referenced by DlVertexingAlgorithm(), MakeCandidateVertexList(), ReadSettings(), and ~DlVertexingAlgorithm().