From efe14cc2d9cfb15006d611806ea29d9b49972f3d Mon Sep 17 00:00:00 2001 From: William McCormack Date: Tue, 17 Aug 2021 15:50:01 -0500 Subject: [PATCH 1/5] adding pseudo-ragged batching to particlenet --- .../FeatureTools/interface/deep_helpers.h | 11 ++++++++ RecoBTag/FeatureTools/src/deep_helpers.cc | 24 ++++++++++++++++ .../ParticleNetSonicJetTagsProducer.cc | 28 +++++++++++++++++-- .../python/pfParticleNetAK4_cff.py | 2 +- .../ONNXRuntime/python/pfParticleNet_cff.py | 6 ++-- 5 files changed, 64 insertions(+), 7 deletions(-) diff --git a/RecoBTag/FeatureTools/interface/deep_helpers.h b/RecoBTag/FeatureTools/interface/deep_helpers.h index b5e82abef9177..6256664c28155 100644 --- a/RecoBTag/FeatureTools/interface/deep_helpers.h +++ b/RecoBTag/FeatureTools/interface/deep_helpers.h @@ -125,6 +125,17 @@ namespace btagbtvdeep { float min = 0, float max = -1); + int center_norm_pad_halfRagged(const std::vector &input, + float center, + float scale, + unsigned target_length, + std::vector &datavec, + int startval, + float pad_value = 0, + float replace_inf_value = 0, + float min = 0, + float max = -1); + void ParticleNetConstructor(const edm::ParameterSet &Config_, bool doExtra, std::vector &input_names_, diff --git a/RecoBTag/FeatureTools/src/deep_helpers.cc b/RecoBTag/FeatureTools/src/deep_helpers.cc index bb260939f9198..707c12ddcb6fd 100644 --- a/RecoBTag/FeatureTools/src/deep_helpers.cc +++ b/RecoBTag/FeatureTools/src/deep_helpers.cc @@ -148,6 +148,30 @@ namespace btagbtvdeep { return target_length; } + int center_norm_pad_halfRagged(const std::vector &input, + float center, + float norm_factor, + unsigned target_length, + std::vector &datavec, + int startval, + float pad_value, + float replace_inf_value, + float min, + float max) { + // do variable shifting/scaling/padding/clipping in one go + + assert(min <= pad_value && pad_value <= max); + + for (unsigned i = 0; i < target_length; ++i) { + if (i < input.size()) { + datavec[i + startval] = std::clamp((catch_infs(input[i], replace_inf_value) - center) * norm_factor, min, max); + } else { + datavec[i + startval] = pad_value; + } + } + return target_length; + } + void ParticleNetConstructor(const edm::ParameterSet &Config_, bool doExtra, std::vector &input_names_, diff --git a/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc b/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc index 9388aecedb5c2..17e8e955b4e8a 100644 --- a/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc +++ b/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc @@ -129,9 +129,32 @@ void ParticleNetSonicJetTagsProducer::acquire(edm::Event const &iEvent, edm::Eve iEvent.getByToken(src_, tag_infos); client_->setBatchSize(tag_infos->size()); if (!tag_infos->empty()) { + + unsigned int maxParticles = 0; + unsigned int maxVertices = 0; + for (unsigned jet_n = 0; jet_n < tag_infos->size(); ++jet_n) { + if( ((*tag_infos)[jet_n]).features().get("pfcand_etarel").size() > maxParticles) maxParticles = ((*tag_infos)[jet_n]).features().get("pfcand_etarel").size(); + if( ((*tag_infos)[jet_n]).features().get("sv_etarel").size() > maxVertices) maxVertices = ((*tag_infos)[jet_n]).features().get("sv_etarel").size(); + } + unsigned int minPartFromJSON = prep_info_map_.at(input_names_[0]).min_length; + unsigned int maxPartFromJSON = prep_info_map_.at(input_names_[0]).max_length; + unsigned int minVertFromJSON = prep_info_map_.at(input_names_[3]).min_length; + unsigned int maxVertFromJSON = prep_info_map_.at(input_names_[3]).max_length; + maxParticles = std::clamp(maxParticles, minPartFromJSON, maxPartFromJSON); + maxVertices = std::clamp(maxVertices, minVertFromJSON, maxVertFromJSON); + for (unsigned igroup = 0; igroup < input_names_.size(); ++igroup) { const auto &group_name = input_names_[igroup]; auto &input = iInput.at(group_name); + unsigned target; + if(igroup < 3){ + input.setShape(1, maxParticles); + target = maxParticles; + } + else{ + input.setShape(1, maxVertices); + target = maxVertices; + } auto tdata = input.allocate(true); for (unsigned jet_n = 0; jet_n < tag_infos->size(); ++jet_n) { const auto &taginfo = (*tag_infos)[jet_n]; @@ -143,11 +166,10 @@ void ParticleNetSonicJetTagsProducer::acquire(edm::Event const &iEvent, edm::Eve const auto &varname = prep_params.var_names[i]; const auto &raw_value = taginfo.features().get(varname); const auto &info = prep_params.info(varname); - int insize = center_norm_pad(raw_value, + int insize = center_norm_pad_halfRagged(raw_value, info.center, info.norm_factor, - prep_params.min_length, - prep_params.max_length, + target, vdata, curr_pos, info.pad, diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNetAK4_cff.py b/RecoBTag/ONNXRuntime/python/pfParticleNetAK4_cff.py index bac7d118f66b5..81f8772189443 100644 --- a/RecoBTag/ONNXRuntime/python/pfParticleNetAK4_cff.py +++ b/RecoBTag/ONNXRuntime/python/pfParticleNetAK4_cff.py @@ -22,7 +22,7 @@ particleNetSonicTriton.toReplaceWith(pfParticleNetAK4JetTags, _particleNetSonicJetTagsProducer.clone( src = 'pfParticleNetAK4TagInfos', - preprocess_json = 'RecoBTag/Combined/data/ParticleNetAK4/CHS/V00/preprocess_noragged.json', + preprocess_json = 'RecoBTag/Combined/data/ParticleNetAK4/CHS/V00/preprocess.json', Client = cms.PSet( timeout = cms.untracked.uint32(300), mode = cms.string("Async"), diff --git a/RecoBTag/ONNXRuntime/python/pfParticleNet_cff.py b/RecoBTag/ONNXRuntime/python/pfParticleNet_cff.py index 3e3b5046ce72c..57f4deda96c66 100644 --- a/RecoBTag/ONNXRuntime/python/pfParticleNet_cff.py +++ b/RecoBTag/ONNXRuntime/python/pfParticleNet_cff.py @@ -22,7 +22,7 @@ particleNetSonicTriton.toReplaceWith(pfParticleNetJetTags, _particleNetSonicJetTagsProducer.clone( src = 'pfParticleNetTagInfos', - preprocess_json = 'RecoBTag/Combined/data/ParticleNetAK8/General/V01/preprocess_noragged.json', + preprocess_json = 'RecoBTag/Combined/data/ParticleNetAK8/General/V01/preprocess.json', Client = cms.PSet( timeout = cms.untracked.uint32(300), mode = cms.string("Async"), @@ -47,7 +47,7 @@ particleNetSonicTriton.toReplaceWith(pfMassDecorrelatedParticleNetJetTags, _particleNetSonicJetTagsProducer.clone( src = 'pfParticleNetTagInfos', - preprocess_json = 'RecoBTag/Combined/data/ParticleNetAK8/MD-2prong/V01/preprocess_noragged.json', + preprocess_json = 'RecoBTag/Combined/data/ParticleNetAK8/MD-2prong/V01/preprocess.json', Client = cms.PSet( timeout = cms.untracked.uint32(300), modelName = cms.string("particlenet_AK8_MD-2prong"), @@ -69,7 +69,7 @@ particleNetSonicTriton.toReplaceWith(pfParticleNetMassRegressionJetTags, _particleNetSonicJetTagsProducer.clone( src = 'pfParticleNetTagInfos', - preprocess_json = 'RecoBTag/Combined/data/ParticleNetAK8/MassRegression/V01/preprocess_noragged.json', + preprocess_json = 'RecoBTag/Combined/data/ParticleNetAK8/MassRegression/V01/preprocess.json', Client = cms.PSet( timeout = cms.untracked.uint32(300), modelName = cms.string("particlenet_AK8_MassRegression"), From 2a7e0139e77a873134e41074111fdb52a50660b4 Mon Sep 17 00:00:00 2001 From: William McCormack Date: Wed, 18 Aug 2021 10:59:16 -0500 Subject: [PATCH 2/5] Skipping inference for events where all jets have 0 particles for ParticleNetSonic --- .../ParticleNetSonicJetTagsProducer.cc | 40 +++++++++++++------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc b/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc index 17e8e955b4e8a..168a1a651a6d5 100644 --- a/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc +++ b/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc @@ -48,6 +48,7 @@ class ParticleNetSonicJetTagsProducer : public TritonEDProducer<> { std::vector input_sizes_; // total length of each input vector std::unordered_map prep_info_map_; // preprocessing info for each input group bool debug_ = false; + bool skippedInference_ = false; }; ParticleNetSonicJetTagsProducer::ParticleNetSonicJetTagsProducer(const edm::ParameterSet &iConfig) @@ -128,6 +129,7 @@ void ParticleNetSonicJetTagsProducer::acquire(edm::Event const &iEvent, edm::Eve edm::Handle tag_infos; iEvent.getByToken(src_, tag_infos); client_->setBatchSize(tag_infos->size()); + skippedInference_ = false; if (!tag_infos->empty()) { unsigned int maxParticles = 0; @@ -136,6 +138,11 @@ void ParticleNetSonicJetTagsProducer::acquire(edm::Event const &iEvent, edm::Eve if( ((*tag_infos)[jet_n]).features().get("pfcand_etarel").size() > maxParticles) maxParticles = ((*tag_infos)[jet_n]).features().get("pfcand_etarel").size(); if( ((*tag_infos)[jet_n]).features().get("sv_etarel").size() > maxVertices) maxVertices = ((*tag_infos)[jet_n]).features().get("sv_etarel").size(); } + if(maxParticles == 0 && maxVertices == 0){ + client_->setBatchSize(0); + skippedInference_ = true; + return; + } unsigned int minPartFromJSON = prep_info_map_.at(input_names_[0]).min_length; unsigned int maxPartFromJSON = prep_info_map_.at(input_names_[0]).max_length; unsigned int minVertFromJSON = prep_info_map_.at(input_names_[3]).min_length; @@ -217,18 +224,27 @@ void ParticleNetSonicJetTagsProducer::produce(edm::Event &iEvent, } if (!tag_infos->empty()) { - const auto &output1 = iOutput.begin()->second; - const auto &outputs_from_server = output1.fromServer(); - - for (unsigned jet_n = 0; jet_n < tag_infos->size(); ++jet_n) { - const auto &taginfo = (*tag_infos)[jet_n]; - const auto &jet_ref = tag_infos->at(jet_n).jet(); - - if (!taginfo.features().empty()) { - for (std::size_t flav_n = 0; flav_n < flav_names_.size(); flav_n++) { - (*(output_tags[flav_n]))[jet_ref] = outputs_from_server[jet_n][flav_n]; - } - } else { + if(!skippedInference_){ + const auto &output1 = iOutput.begin()->second; + const auto &outputs_from_server = output1.fromServer(); + + for (unsigned jet_n = 0; jet_n < tag_infos->size(); ++jet_n) { + const auto &taginfo = (*tag_infos)[jet_n]; + const auto &jet_ref = tag_infos->at(jet_n).jet(); + + if (!taginfo.features().empty()) { + for (std::size_t flav_n = 0; flav_n < flav_names_.size(); flav_n++) { + (*(output_tags[flav_n]))[jet_ref] = outputs_from_server[jet_n][flav_n]; + } + } else { + for (std::size_t flav_n = 0; flav_n < flav_names_.size(); flav_n++) { + (*(output_tags[flav_n]))[jet_ref] = 0.; + } + } + } + } else{ + for (unsigned jet_n = 0; jet_n < tag_infos->size(); ++jet_n) { + const auto &jet_ref = tag_infos->at(jet_n).jet(); for (std::size_t flav_n = 0; flav_n < flav_names_.size(); flav_n++) { (*(output_tags[flav_n]))[jet_ref] = 0.; } From dfef956caed0fd5519cba84cdf575a88d55fd9e3 Mon Sep 17 00:00:00 2001 From: William McCormack Date: Wed, 1 Sep 2021 14:55:34 -0500 Subject: [PATCH 3/5] code checks and streamlining with suggestions from Kevin --- .../FeatureTools/interface/deep_helpers.h | 18 ++--- RecoBTag/FeatureTools/src/deep_helpers.cc | 30 ++++----- .../ParticleNetSonicJetTagsProducer.cc | 67 ++++++++++--------- 3 files changed, 58 insertions(+), 57 deletions(-) diff --git a/RecoBTag/FeatureTools/interface/deep_helpers.h b/RecoBTag/FeatureTools/interface/deep_helpers.h index 6256664c28155..0669715cc8af9 100644 --- a/RecoBTag/FeatureTools/interface/deep_helpers.h +++ b/RecoBTag/FeatureTools/interface/deep_helpers.h @@ -126,15 +126,15 @@ namespace btagbtvdeep { float max = -1); int center_norm_pad_halfRagged(const std::vector &input, - float center, - float scale, - unsigned target_length, - std::vector &datavec, - int startval, - float pad_value = 0, - float replace_inf_value = 0, - float min = 0, - float max = -1); + float center, + float scale, + unsigned target_length, + std::vector &datavec, + int startval, + float pad_value = 0, + float replace_inf_value = 0, + float min = 0, + float max = -1); void ParticleNetConstructor(const edm::ParameterSet &Config_, bool doExtra, diff --git a/RecoBTag/FeatureTools/src/deep_helpers.cc b/RecoBTag/FeatureTools/src/deep_helpers.cc index 707c12ddcb6fd..f5363299226ba 100644 --- a/RecoBTag/FeatureTools/src/deep_helpers.cc +++ b/RecoBTag/FeatureTools/src/deep_helpers.cc @@ -149,26 +149,26 @@ namespace btagbtvdeep { } int center_norm_pad_halfRagged(const std::vector &input, - float center, - float norm_factor, - unsigned target_length, - std::vector &datavec, - int startval, - float pad_value, - float replace_inf_value, - float min, - float max) { + float center, + float norm_factor, + unsigned target_length, + std::vector &datavec, + int startval, + float pad_value, + float replace_inf_value, + float min, + float max) { // do variable shifting/scaling/padding/clipping in one go assert(min <= pad_value && pad_value <= max); - for (unsigned i = 0; i < target_length; ++i) { - if (i < input.size()) { - datavec[i + startval] = std::clamp((catch_infs(input[i], replace_inf_value) - center) * norm_factor, min, max); - } else { - datavec[i + startval] = pad_value; - } + for (unsigned i = 0; i < input.size(); ++i) { + datavec[i + startval] = std::clamp((catch_infs(input[i], replace_inf_value) - center) * norm_factor, min, max); } + for (unsigned i = input.size(); i < target_length; ++i) { + datavec[i + startval] = pad_value; + } + return target_length; } diff --git a/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc b/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc index 168a1a651a6d5..3545e548ad233 100644 --- a/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc +++ b/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc @@ -49,6 +49,7 @@ class ParticleNetSonicJetTagsProducer : public TritonEDProducer<> { std::unordered_map prep_info_map_; // preprocessing info for each input group bool debug_ = false; bool skippedInference_ = false; + unsigned numParticleGroups_ = 3; }; ParticleNetSonicJetTagsProducer::ParticleNetSonicJetTagsProducer(const edm::ParameterSet &iConfig) @@ -131,14 +132,15 @@ void ParticleNetSonicJetTagsProducer::acquire(edm::Event const &iEvent, edm::Eve client_->setBatchSize(tag_infos->size()); skippedInference_ = false; if (!tag_infos->empty()) { - unsigned int maxParticles = 0; unsigned int maxVertices = 0; for (unsigned jet_n = 0; jet_n < tag_infos->size(); ++jet_n) { - if( ((*tag_infos)[jet_n]).features().get("pfcand_etarel").size() > maxParticles) maxParticles = ((*tag_infos)[jet_n]).features().get("pfcand_etarel").size(); - if( ((*tag_infos)[jet_n]).features().get("sv_etarel").size() > maxVertices) maxVertices = ((*tag_infos)[jet_n]).features().get("sv_etarel").size(); + maxParticles = std::max(maxParticles, + static_cast(((*tag_infos)[jet_n]).features().get("pfcand_etarel").size())); + maxVertices = + std::max(maxVertices, static_cast(((*tag_infos)[jet_n]).features().get("sv_etarel").size())); } - if(maxParticles == 0 && maxVertices == 0){ + if (maxParticles == 0 && maxVertices == 0) { client_->setBatchSize(0); skippedInference_ = true; return; @@ -154,13 +156,12 @@ void ParticleNetSonicJetTagsProducer::acquire(edm::Event const &iEvent, edm::Eve const auto &group_name = input_names_[igroup]; auto &input = iInput.at(group_name); unsigned target; - if(igroup < 3){ + if (igroup < numParticleGroups_) { input.setShape(1, maxParticles); - target = maxParticles; - } - else{ + target = maxParticles; + } else { input.setShape(1, maxVertices); - target = maxVertices; + target = maxVertices; } auto tdata = input.allocate(true); for (unsigned jet_n = 0; jet_n < tag_infos->size(); ++jet_n) { @@ -174,15 +175,15 @@ void ParticleNetSonicJetTagsProducer::acquire(edm::Event const &iEvent, edm::Eve const auto &raw_value = taginfo.features().get(varname); const auto &info = prep_params.info(varname); int insize = center_norm_pad_halfRagged(raw_value, - info.center, - info.norm_factor, - target, - vdata, - curr_pos, - info.pad, - info.replace_inf_value, - info.lower_bound, - info.upper_bound); + info.center, + info.norm_factor, + target, + vdata, + curr_pos, + info.pad, + info.replace_inf_value, + info.lower_bound, + info.upper_bound); curr_pos += insize; if (i == 0 && (!input_shapes_.empty())) { input_shapes_[igroup][2] = insize; @@ -224,25 +225,25 @@ void ParticleNetSonicJetTagsProducer::produce(edm::Event &iEvent, } if (!tag_infos->empty()) { - if(!skippedInference_){ + if (!skippedInference_) { const auto &output1 = iOutput.begin()->second; const auto &outputs_from_server = output1.fromServer(); - + for (unsigned jet_n = 0; jet_n < tag_infos->size(); ++jet_n) { - const auto &taginfo = (*tag_infos)[jet_n]; - const auto &jet_ref = tag_infos->at(jet_n).jet(); - - if (!taginfo.features().empty()) { - for (std::size_t flav_n = 0; flav_n < flav_names_.size(); flav_n++) { - (*(output_tags[flav_n]))[jet_ref] = outputs_from_server[jet_n][flav_n]; - } - } else { - for (std::size_t flav_n = 0; flav_n < flav_names_.size(); flav_n++) { - (*(output_tags[flav_n]))[jet_ref] = 0.; - } - } + const auto &taginfo = (*tag_infos)[jet_n]; + const auto &jet_ref = tag_infos->at(jet_n).jet(); + + if (!taginfo.features().empty()) { + for (std::size_t flav_n = 0; flav_n < flav_names_.size(); flav_n++) { + (*(output_tags[flav_n]))[jet_ref] = outputs_from_server[jet_n][flav_n]; + } + } else { + for (std::size_t flav_n = 0; flav_n < flav_names_.size(); flav_n++) { + (*(output_tags[flav_n]))[jet_ref] = 0.; + } + } } - } else{ + } else { for (unsigned jet_n = 0; jet_n < tag_infos->size(); ++jet_n) { const auto &jet_ref = tag_infos->at(jet_n).jet(); for (std::size_t flav_n = 0; flav_n < flav_names_.size(); flav_n++) { From 4b26c3166eb1fe90e38d4203711a93883d217445 Mon Sep 17 00:00:00 2001 From: William McCormack Date: Wed, 1 Sep 2021 18:07:15 -0500 Subject: [PATCH 4/5] fixing datavec and const for numParticleGroups --- RecoBTag/FeatureTools/src/deep_helpers.cc | 6 ++---- .../ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/RecoBTag/FeatureTools/src/deep_helpers.cc b/RecoBTag/FeatureTools/src/deep_helpers.cc index f5363299226ba..08e942ba1d9ec 100644 --- a/RecoBTag/FeatureTools/src/deep_helpers.cc +++ b/RecoBTag/FeatureTools/src/deep_helpers.cc @@ -163,11 +163,9 @@ namespace btagbtvdeep { assert(min <= pad_value && pad_value <= max); for (unsigned i = 0; i < input.size(); ++i) { - datavec[i + startval] = std::clamp((catch_infs(input[i], replace_inf_value) - center) * norm_factor, min, max); - } - for (unsigned i = input.size(); i < target_length; ++i) { - datavec[i + startval] = pad_value; + datavec.push_back( std::clamp((catch_infs(input[i], replace_inf_value) - center) * norm_factor, min, max) ); } + datavec.insert(datavec.end(), target_length-input.size(), pad_value); return target_length; } diff --git a/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc b/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc index 3545e548ad233..86aecd334898a 100644 --- a/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc +++ b/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc @@ -49,7 +49,7 @@ class ParticleNetSonicJetTagsProducer : public TritonEDProducer<> { std::unordered_map prep_info_map_; // preprocessing info for each input group bool debug_ = false; bool skippedInference_ = false; - unsigned numParticleGroups_ = 3; + const unsigned numParticleGroups_ = 3; }; ParticleNetSonicJetTagsProducer::ParticleNetSonicJetTagsProducer(const edm::ParameterSet &iConfig) From c1a914b421d8f7a3628c8fc0734107037e285aa9 Mon Sep 17 00:00:00 2001 From: William McCormack Date: Wed, 1 Sep 2021 18:36:37 -0500 Subject: [PATCH 5/5] constexpr static for numParticleGroups --- RecoBTag/FeatureTools/src/deep_helpers.cc | 4 ++-- .../ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RecoBTag/FeatureTools/src/deep_helpers.cc b/RecoBTag/FeatureTools/src/deep_helpers.cc index 08e942ba1d9ec..6b13e7699fe20 100644 --- a/RecoBTag/FeatureTools/src/deep_helpers.cc +++ b/RecoBTag/FeatureTools/src/deep_helpers.cc @@ -163,9 +163,9 @@ namespace btagbtvdeep { assert(min <= pad_value && pad_value <= max); for (unsigned i = 0; i < input.size(); ++i) { - datavec.push_back( std::clamp((catch_infs(input[i], replace_inf_value) - center) * norm_factor, min, max) ); + datavec.push_back(std::clamp((catch_infs(input[i], replace_inf_value) - center) * norm_factor, min, max)); } - datavec.insert(datavec.end(), target_length-input.size(), pad_value); + datavec.insert(datavec.end(), target_length - input.size(), pad_value); return target_length; } diff --git a/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc b/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc index 86aecd334898a..49481bc1f06be 100644 --- a/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc +++ b/RecoBTag/ONNXRuntime/plugins/ParticleNetSonicJetTagsProducer.cc @@ -49,7 +49,7 @@ class ParticleNetSonicJetTagsProducer : public TritonEDProducer<> { std::unordered_map prep_info_map_; // preprocessing info for each input group bool debug_ = false; bool skippedInference_ = false; - const unsigned numParticleGroups_ = 3; + constexpr static unsigned numParticleGroups_ = 3; }; ParticleNetSonicJetTagsProducer::ParticleNetSonicJetTagsProducer(const edm::ParameterSet &iConfig)