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" 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,
49 const pandora::CartesianVector &GetPosition()
const;
50 float GetChi2()
const;
51 std::string ToString()
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();
80 pandora::StatusCode MakeNetworkInputFromHits(
const pandora::CaloHitList &caloHits,
const pandora::HitType view,
const float xMin,
81 const float xMax,
const float zMin,
const float zMax,
LArDLHelper::TorchInput &networkInput, PixelVector &pixelVector)
const;
99 pandora::StatusCode MakeWirePlaneCoordinatesFromCanvas(
float **canvas,
const int canvasWidth,
const int canvasHeight,
100 const int columnOffset,
const int rowOffset,
const pandora::HitType view,
const float xMin,
const float xMax,
const float zMin,
101 const float zMax, pandora::CartesianPointVector &positionVector)
const;
116 void GetCanvasParameters(
const LArDLHelper::TorchOutput &networkOutput,
const PixelVector &pixelVector,
int &columnOffset,
117 int &rowOffset,
int &width,
int &height)
const;
139 void DrawRing(
float **canvas,
const int row,
const int col,
const int inner,
const int outer,
const float weight)
const;
185 void GetHitRegion(
const pandora::CaloHitList &caloHitList,
float &xMin,
float &xMax,
float &zMin,
float &zMax)
const;
194 pandora::StatusCode MakeCandidateVertexList(
const pandora::CartesianPointVector &positions);
199 void GetTrueVertexPosition(
float &
x,
float &
y,
float &
z)
const;
204 void GetTrueVertexPosition(
float &
x,
float &u,
float &v,
float &
w)
const;
209 const pandora::CartesianVector &GetTrueVertex()
const;
215 void PopulateRootTree(
const std::vector<VertexTuple> &vertexTuples,
const pandora::CartesianPointVector &vertexCandidatesU,
216 const pandora::CartesianPointVector &vertexCandidatesV,
const pandora::CartesianPointVector &vertexCandidatesW)
const;
244 #endif // LAR_DL_VERTEXING_ALGORITHM_H
pandora::CartesianVector m_pos
Calculated 3D position.
LArDLHelper::TorchModel m_modelU
The model for the U view.
std::vector< double > m_thresholds
Distance class thresholds.
std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > MCContributionMap
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.
bool Update(detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, PFPStruct &pfp)
std::string m_outputVertexListName
Output vertex list name.
std::mt19937 m_rng
The random number generator.
int m_nClasses
The number of distance classes.
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.
std::string m_trainingOutputFile
Output file name for training examples.
std::string m_rootFileName
The ROOT file name.
std::vector< Pixel > PixelVector
std::pair< int, int > Pixel
float m_driftStep
The size of a pixel in the drift direction in cm (most relevant in pass 2)
int m_width
The width of the images.
float m_chi2
Chi squared of calculated position.
std::string m_volumeType
The name of the fiducial volume type for the monitoring output.