LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
DlVertexingAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_DL_VERTEXING_ALGORITHM_H
9 #define LAR_DL_VERTEXING_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 #include "Pandora/AlgorithmHeaders.h"
13 
15 
19 
20 #include <random>
21 
22 using namespace lar_content;
23 
24 namespace lar_dl_content
25 {
30 {
31 public:
36 
38 
39 private:
40  pandora::StatusCode Run();
41  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
42  pandora::StatusCode PrepareTrainingSample();
43  pandora::StatusCode Infer();
44 
45  /*
46  * @brief Create input for the network from a calo hit list
47  *
48  * @param caloHits The CaloHitList from which the input should be made
49  * @param view The wire plane view
50  * @param xMin The minimum x coordinate for the hits
51  * @param xMax The maximum x coordinate for the hits
52  * @param zMin The minimum x coordinate for the hits
53  * @param zMax The maximum x coordinate for the hits
54  * @param networkInput The TorchInput object to populate
55  * @param pixelVector The output vector of populated pixels
56  *
57  * @return The StatusCode resulting from the function
58  **/
59  pandora::StatusCode MakeNetworkInputFromHits(const pandora::CaloHitList &caloHits, const pandora::HitType view, const float xMin,
60  const float xMax, const float zMin, const float zMax, LArDLHelper::TorchInput &networkInput, PixelVector &pixelVector) const;
61 
62  /*
63  * @brief Create a list of wire plane-space coordinates from a canvas
64  *
65  * @param canvas The input canvas
66  * @param canvasWidth The width of the canvas
67  * @param canvasHeight The height of the canvas
68  * @param columnOffset The column offset used when populating the canvas
69  * @param rowOffset The row offset used when populating the canvas
70  * @param xMin The minimum x coordinate for the hits
71  * @param xMax The maximum x coordinate for the hits
72  * @param zMin The minimum x coordinate for the hits
73  * @param zMax The maximum x coordinate for the hits
74  * @param positionVector The output vector of wire plane positions
75  *
76  * @return The StatusCode resulting from the function
77  **/
78  pandora::StatusCode MakeWirePlaneCoordinatesFromCanvas(float **canvas, const int canvasWidth, const int canvasHeight,
79  const int columnOffset, const int rowOffset, const pandora::HitType view, const float xMin, const float xMax, const float zMin,
80  const float zMax, pandora::CartesianPointVector &positionVector) const;
81 
89  pandora::StatusCode MakeCandidateVertexList(const pandora::CartesianPointVector &positions);
90 
91 #ifdef MONITORING
92 
95  void PopulateRootTree(const std::vector<VertexTuple> &vertexTuples, const pandora::CartesianPointVector &vertexCandidatesU,
96  const pandora::CartesianPointVector &vertexCandidatesV, const pandora::CartesianPointVector &vertexCandidatesW) const;
97 #endif
98 
99  int m_event;
100  bool m_visualise;
101  bool m_writeTree;
102  std::string m_rootTreeName;
103  std::string m_rootFileName;
104  std::mt19937 m_rng;
105 };
106 
107 } // namespace lar_dl_content
108 
109 #endif // LAR_DL_VERTEXING_ALGORITHM_H
Header file for the vertex tuple object.
bool m_visualise
Whether or not to visualise the candidate vertices.
int m_event
The current event number.
DeepLearningTrackShowerIdAlgorithm class.
std::mt19937 m_rng
The random number generator.
std::string m_rootTreeName
The ROOT tree name.
Header file for the lar monte carlo particle helper helper class.
DeepLearningTrackShowerIdAlgorithm class.
bool m_writeTree
Whether or not to write validation details to a ROOT tree.
Header file for the lar deep learning helper helper class.
std::string m_rootFileName
The ROOT file name.
HitType
Definition: HitType.h:12