32 : pfCandidatesPutToken_{produces<reco::PFCandidateCollection>()},
33 inputTagBlocks_(consumes<reco::PFBlockCollection>(
cfg.getParameter<
edm::InputTag>(
"src"))),
44 const long long int num_elements_total = all_elements.size();
52 tensorflow::Tensor
input(tensorflow::DT_FLOAT, shape);
53 input.flat<
float>().setZero();
56 unsigned int ielem = 0;
57 for (
const auto* pelem : all_elements) {
58 const auto& elem = *pelem;
72 const std::vector<std::string> output_names = {
"Identity:0"};
75 std::vector<tensorflow::Tensor>
outputs;
88 std::vector<reco::PFCandidate> pOutputCandidateCollection;
89 for (
unsigned int ielem = 0; ielem < all_elements.size(); ielem++) {
91 std::vector<float> pred_id_logits;
92 for (
unsigned int idx_id = 0; idx_id <=
NUM_CLASS; idx_id++) {
93 pred_id_logits.push_back(out_arr(0, ielem, idx_id));
100 float pred_eta = out_arr(0, ielem,
IDX_ETA);
101 float pred_phi = out_arr(0, ielem,
IDX_PHI);
102 float pred_charge = out_arr(0, ielem,
IDX_CHARGE);
109 pOutputCandidateCollection.push_back(
cand);
118 std::unique_ptr<MLPFCache>
cache = std::make_unique<MLPFCache>();
135 desc.add<
std::string>(
"model_path",
"RecoParticleFlow/PFProducer/data/mlpf/mlpf_2020_11_04.pb");