5#ifndef ACTSTRACKRECONSTRUCTION_NNCLUSTERCALIBRATORTOOLIMPL_H
6#define ACTSTRACKRECONSTRUCTION_NNCLUSTERCALIBRATORTOOLIMPL_H
22template <
typename calib_data_t,
typename traj_t>
27template <
typename calib_data_t,
typename traj_t>
33 std::unique_ptr<AnalogueClusteringCalibrator<calib_data_t, traj_t>>
39template <
typename calib_data_t,
typename traj_t>
42 NNClusterCalibrator<calib_data_t, traj_t>, traj_t> {
56 std::tuple<typename NNClusterCalibrator<calib_data_t, traj_t>::BASE::Pos,
59 calibrate(
const EventContext& ctx,
const Acts::GeometryContext& gctx,
60 const Acts::CalibrationContext& cctx,
63 const std::pair<float, float>& angles)
const;
105template <
typename calib_data_t,
typename traj_t>
114 virtual std::unique_ptr<PixelOnBoundStateCalibratorBase>
create(
115 const EventContext& ctx)
const override {
125 virtual std::unique_ptr<PixelOnTrackCalibratorBase<traj_t>>
127 return std::make_unique<NNClusterCalibrator<calib_data_t, traj_t>>(
139 const EventContext& ctx)
const;
142 this,
"minClusterSizeForNN", 0,
143 "Use Analogue calibrator if size is smaller that this value"};
146 this,
"minClusterChargeForNN", 0,
147 "Minimum total charge to enable NN clustering"};
150 this,
"NnCollectionONNXReadKey",
"PixelClusterNNONNX",
151 "The conditions key for ONNX-based pixel cluster NNs"};
This is an Identifier helper class for the Pixel subdetector.
the NN clustering calibrator
std::array< float, 3 > predictNumberOfClusters(NNinput &nn) const
obtain probabilities of number of particles using numbers NN
Ort::Session & selectPositionNetwork(int number) const
returns network appropriate for the number of sub-clusters
NNClusterCalibratorOptions< calib_data_t, traj_t > Options
InDetDD::SiCellId weightedClusterCenter(const xAOD::PixelCluster &cluster, const InDetDD::PixelModuleDesign *design) const
Calculated charge weighted cluster position.
std::tuple< int, int, int, int > clusterIndexRanges(const xAOD::PixelCluster &cluster) const
returns spans of the cluster
void fillClusterData(NNinput &nn, const xAOD::PixelCluster &cluster, const InDetDD::SiDetectorElement &detElement) const
Fills payload for NN from cluster.
NNClusterCalibrator(PixelClusterCalibratorOptionsBase &&base_options, Options &&options)
NNClusterCalibratorOptions< calib_data_t, traj_t > m_options
std::tuple< typename NNClusterCalibrator< calib_data_t, traj_t >::BASE::Pos, typename NNClusterCalibrator< calib_data_t, traj_t >::BASE::Cov, unsigned int > calibrate(const EventContext &ctx, const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const xAOD::PixelCluster &cluster, const InDetDD::SiDetectorElement &detElement, const std::pair< float, float > &angles) const
PixelClusterCalibratorBase< NNClusterCalibrator< calib_data_t, traj_t >, traj_t > BASE
PositionNNoutput predictPositions(NNinput &nn, int number) const
run position inference
Class used to describe the design of a module (diode segmentation and readout scheme).
Identifier for the strip or pixel cell.
Class to hold geometrical description of a silicon detector element.
Hash functions to pack the source link into unordered_maps / unordered_sets.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.
Options for the NN clustering calibrator that is kind of Analogue calibrator.
double m_minClusterChargeForNN
! minimum number of hits to run NN
const OnnxNNCollection * m_models
std::size_t m_minClusterSizeForNN
std::unique_ptr< AnalogueClusteringCalibrator< calib_data_t, traj_t > > m_fallback
! set of models for inference (non owning pointer)
the base options the options of the options of every PixelClusterCalibrator must be based on
std::string number(const double &d, const std::string &s)