LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
DlHitTrackShowerIdAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_DL_HIT_TRACK_SHOWER_ID_ALGORITHM_H
9 #define LAR_DL_HIT_TRACK_SHOWER_ID_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
14 
15 namespace lar_dl_content
16 {
17 
21 class DlHitTrackShowerIdAlgorithm : public pandora::Algorithm
22 {
23 public:
28 
30 
31 private:
32  typedef std::map<const pandora::CaloHit *, std::tuple<int, int, int, int>> CaloHitToPixelMap;
33  typedef std::map<int, int> PixelToTileMap;
34 
35  pandora::StatusCode Run();
36 
40  pandora::StatusCode Train();
41 
45  pandora::StatusCode Infer();
46  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
47 
57  void GetHitRegion(const pandora::CaloHitList &caloHitList, float &xMin, float &xMax, float &zMin, float &zMax);
58 
68  void GetSparseTileMap(const pandora::CaloHitList &caloHitList, const float xMin, const float zMin, const int nTilesX, PixelToTileMap &sparseMap);
69 
70  pandora::StringVector m_caloHitListNames;
71  std::string m_modelFileNameU;
72  std::string m_modelFileNameV;
73  std::string m_modelFileNameW;
79  float m_tileSize;
80  bool m_visualize;
82  std::string m_trainingOutputFile;
83 };
84 
85 } // namespace lar_dl_content
86 
87 #endif // LAR_DL_HIT_TRACK_SHOWER_ID_ALGORITHM_H
LArDLHelper::TorchModel m_modelW
Model for the W view.
bool m_visualize
Whether to visualize the track shower ID scores.
LArDLHelper::TorchModel m_modelU
Model for the U view.
torch::jit::script::Module TorchModel
Definition: LArDLHelper.h:25
std::string m_modelFileNameW
Model file name for W view.
std::string m_modelFileNameU
Model file name for U view.
pandora::StringVector m_caloHitListNames
Name of input calo hit list.
pandora::StatusCode Infer()
Run network inference.
std::string m_trainingOutputFile
Output file name for training examples.
Header file for the lar deep learning helper helper class.
LArDLHelper::TorchModel m_modelV
Model for the V view.
void GetHitRegion(const pandora::CaloHitList &caloHitList, float &xMin, float &xMax, float &zMin, float &zMax)
Identify the XZ range containing the hits for an event.
std::string m_modelFileNameV
Model file name for V view.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
pandora::StatusCode Train()
Produce files that act as inputs to network training.
void GetSparseTileMap(const pandora::CaloHitList &caloHitList, const float xMin, const float zMin, const int nTilesX, PixelToTileMap &sparseMap)
Populate a map between pixels and tiles.
std::map< const pandora::CaloHit *, std::tuple< int, int, int, int > > CaloHitToPixelMap