8 #ifndef LAR_DL_VERTEXING_ALGORITHM_H
9 #define LAR_DL_VERTEXING_ALGORITHM_H 1
11 #include "Pandora/Algorithm.h"
12 #include "Pandora/AlgorithmHeaders.h"
20 using namespace lar_content;
22 namespace lar_dl_content
43 VertexTuple(
const pandora::Pandora &
pandora,
const pandora::CartesianVector &vertexU,
const pandora::CartesianVector &vertexV,
44 const pandora::CartesianVector &vertexW);
46 VertexTuple(
const pandora::Pandora &pandora,
const pandora::CartesianVector &vertex1,
const pandora::CartesianVector &vertex2,
47 const pandora::HitType view1,
const pandora::HitType view2);
49 const pandora::CartesianVector &GetPosition()
const;
50 float GetChi2()
const;
58 typedef std::pair<int, int>
Pixel;
61 pandora::StatusCode Run();
62 pandora::StatusCode ReadSettings(
const pandora::TiXmlHandle xmlHandle);
63 pandora::StatusCode PrepareTrainingSample();
64 pandora::StatusCode Infer();
75 pandora::StatusCode MakeNetworkInputFromHits(
87 pandora::StatusCode MakeWirePlaneCoordinatesFromPixels(
88 const pandora::CaloHitList &caloHits,
const PixelVector &pixelVector, pandora::CartesianPointVector &positionVector)
const;
103 pandora::StatusCode MakeWirePlaneCoordinatesFromCanvas(
const pandora::CaloHitList &caloHits,
float **canvas,
const int canvasWidth,
104 const int canvasHeight,
const int columnOffset,
const int rowOffset, pandora::CartesianPointVector &positionVector)
const;
120 int &rowOffset,
int &width,
int &height)
const;
142 void DrawRing(
float **canvas,
const int row,
const int col,
const int inner,
const int outer,
const float weight)
const;
155 void Update(
const int radius,
int &col,
int &
row)
const;
188 void GetHitRegion(
const pandora::CaloHitList &caloHitList,
float &xMin,
float &xMax,
float &zMin,
float &zMax)
const;
197 pandora::StatusCode MakeCandidateVertexList(
const pandora::CartesianPointVector &positions);
202 void GetTrueVertexPosition(
float &
x,
float &
y,
float &
z)
const;
207 void GetTrueVertexPosition(
float &
x,
float &u,
float &v,
float &
w)
const;
212 const pandora::CartesianVector &GetTrueVertex()
const;
217 void PopulateRootTree(
const std::vector<VertexTuple> &vertexTuples,
const pandora::CartesianPointVector &vertexCandidatesU,
218 const pandora::CartesianPointVector &vertexCandidatesV,
const pandora::CartesianPointVector &vertexCandidatesW)
const;
241 const double PY_EPSILON{1.1920929e-7};
246 #endif // LAR_DL_VERTEXING_ALGORITHM_H
pandora::CartesianVector m_pos
Calculated 3D position.
LArDLHelper::TorchModel m_modelU
The model for the U view.
process_name opflash particleana ie ie ie z
std::vector< double > m_thresholds
Distance class thresholds.
std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > MCContributionMap
process_name opflash particleana ie x
bool m_visualise
Whether or not to visualise the candidate vertices.
int m_event
The current event number.
pandora::StringVector m_caloHitListNames
Names of input calo hit lists.
torch::jit::script::Module TorchModel
LArDLHelper::TorchModel m_modelV
The model for the V view.
float m_regionSize
The half width/height of the event region to consider in cm.
float m_maxHitAdc
Maximum ADC value to allow.
std::string m_outputVertexListName
Output vertex list name.
std::mt19937 m_rng
The random number generator.
int m_nClasses
The number of distance classes.
process_name opflash particleana ie ie y
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.
int m_height
The height of the images.
int m_pass
The pass of the train/infer step.
std::map< std::pair< int, int >, std::vector< const pandora::CaloHit * > > PixelToCaloHitsMap
std::string m_inputVertexListName
Input vertex list name if 2nd pass.
bool m_trainingMode
Training mode.
LArDLHelper::TorchModel m_modelW
The model for the W view.
required by fuzzyCluster table::sbnd_g4_services gaushitTruthMatch pandora
std::string m_trainingOutputFile
Output file name for training examples.
std::string m_rootFileName
The ROOT file name.
std::string ToString(const T &value)
Parse flashmatch::PSet configuration file content.
std::vector< Pixel > PixelVector
std::pair< int, int > Pixel
int m_width
The width of the images.
float m_chi2
Chi squared of calculated position.
bool Update(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp, bool prt)