Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::NeuralCalibrator Class Reference

#include <acts/blob/sPHENIX/Examples/Framework/ML/include/ActsExamples/EventData/NeuralCalibrator.hpp>

+ Inheritance diagram for ActsExamples::NeuralCalibrator:
+ Collaboration diagram for ActsExamples::NeuralCalibrator:

Public Member Functions

 NeuralCalibrator (const std::filesystem::path &modelPath, size_t nComponents=1, std::vector< size_t > volumeIds={7, 8, 9})
 
void calibrate (const MeasurementContainer &measurements, const ClusterContainer *clusters, const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &sourceLink, Acts::MultiTrajectory< Acts::VectorMultiTrajectory >::TrackStateProxy &trackState) const override
 The MeasurementCalibrator interface methods.
 
bool needsClusters () const override
 
- Public Member Functions inherited from ActsExamples::MeasurementCalibrator
virtual void calibrate (const MeasurementContainer &measurements, const ClusterContainer *clusters, const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &sourceLink, Acts::VectorMultiTrajectory::TrackStateProxy &trackState) const =0
 
virtual ~MeasurementCalibrator ()=default
 

Private Attributes

Ort::Env m_env
 
Acts::OnnxRuntimeBase m_model
 
size_t m_nComponents
 
size_t m_nInputs
 
std::vector< size_t > m_volumeIds
 
PassThroughCalibrator m_fallback
 

Detailed Description

Definition at line 20 of file NeuralCalibrator.hpp.

View newest version in sPHENIX GitHub at line 20 of file NeuralCalibrator.hpp

Constructor & Destructor Documentation

ActsExamples::NeuralCalibrator::NeuralCalibrator ( const std::filesystem::path modelPath,
size_t  nComponents = 1,
std::vector< size_t >  volumeIds = {7, 8, 9} 
)

Measurement position calibration based on mixture density network (MDN) model. The model takes as input:

  • A 7x7 charge matrix centered on the center pixel of the cluster;
  • The volume and layer identifiers from the GeometryIdentifier of the containing surface;
  • The bound phi and theta angles of the predicted track state;
  • The initial estimated position
  • The initial estimated variance

Given these inputs, a mixture density network estimates the parameters of a gaussian mixture model:

P(Y|X) = P(Prior_i) N(Y|Mean_i(X), Variance_i(X))

These are translated to single position + variance estimate by taking the most probable value based on the estimated priors. The measurements are assumed to be 2-dimensional.

This class implements the MeasurementCalibrator interface, and therefore internally computes the network input and runs the inference engine itself.

Parameters
[in]modelPathThe path to the .onnx model file
[in]nComponentThe number of components in the gaussian mixture
[in]volumesThe volume ids for which to apply the calibration

Definition at line 63 of file NeuralCalibrator.cpp.

View newest version in sPHENIX GitHub at line 63 of file NeuralCalibrator.cpp

Member Function Documentation

void ActsExamples::NeuralCalibrator::calibrate ( const MeasurementContainer measurements,
const ClusterContainer clusters,
const Acts::GeometryContext gctx,
const Acts::CalibrationContext cctx,
const Acts::SourceLink sourceLink,
Acts::MultiTrajectory< Acts::VectorMultiTrajectory >::TrackStateProxy &  trackState 
) const
override

The MeasurementCalibrator interface methods.

bool ActsExamples::NeuralCalibrator::needsClusters ( ) const
inlineoverridevirtual

Reimplemented from ActsExamples::MeasurementCalibrator.

Definition at line 60 of file NeuralCalibrator.hpp.

View newest version in sPHENIX GitHub at line 60 of file NeuralCalibrator.hpp

Member Data Documentation

Ort::Env ActsExamples::NeuralCalibrator::m_env
private

Definition at line 63 of file NeuralCalibrator.hpp.

View newest version in sPHENIX GitHub at line 63 of file NeuralCalibrator.hpp

PassThroughCalibrator ActsExamples::NeuralCalibrator::m_fallback
private

Definition at line 72 of file NeuralCalibrator.hpp.

View newest version in sPHENIX GitHub at line 72 of file NeuralCalibrator.hpp

Acts::OnnxRuntimeBase ActsExamples::NeuralCalibrator::m_model
private

Definition at line 64 of file NeuralCalibrator.hpp.

View newest version in sPHENIX GitHub at line 64 of file NeuralCalibrator.hpp

size_t ActsExamples::NeuralCalibrator::m_nComponents
private

Definition at line 65 of file NeuralCalibrator.hpp.

View newest version in sPHENIX GitHub at line 65 of file NeuralCalibrator.hpp

size_t ActsExamples::NeuralCalibrator::m_nInputs
private
Initial value:
=
57

Definition at line 66 of file NeuralCalibrator.hpp.

View newest version in sPHENIX GitHub at line 66 of file NeuralCalibrator.hpp

std::vector<size_t> ActsExamples::NeuralCalibrator::m_volumeIds
private

Definition at line 71 of file NeuralCalibrator.hpp.

View newest version in sPHENIX GitHub at line 71 of file NeuralCalibrator.hpp


The documentation for this class was generated from the following files: