28 if (
fPt_.get()[i0] == 0) {
29 for (
int i1 = 0; i1 < 5; i1++)
41 tensorflow::Tensor
input(tensorflow::DT_FLOAT,
46 std::vector<tensorflow::Tensor> outputs;
48 return outputs[0].matrix<
float>()(0, 0);
59 for (
unsigned int i0 = 0; i0 < iParts.size(); i0++) {
62 fPt_.get()[i0] = iParts[i0].pt();
63 fEta_.get()[i0] = iSeed.
eta() - iParts[i0].eta();
65 fId_.get()[i0] = iParts[i0].id();
Session * createSession(SessionOptions &sessionOptions)
unique_ptr< float[]> fPhi_
double pt() const final
transverse momentum
static constexpr unsigned int n_particles_max
std::vector< l1t::PFCandidate > PFCandidateCollection
unique_ptr< float[]> fId_
static std::string const input
std::vector< float > NNvectorVar_
void run(Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const thread::ThreadPoolOptions &threadPoolOptions)
bool closeSession(Session *&session)
unique_ptr< float[]> fPt_
tensorflow::Session * session_
std::atomic< tensorflow::GraphDef * > graphDef
TauNNId(const std::string &iInput, const TauNNTFCache *cache, const std::string &iWeightFile, int iNParticles)
double phi() const final
momentum azimuthal angle
float compute(const l1t::PFCandidate &iSeed, l1t::PFCandidateCollection &iParts)
unique_ptr< float[]> fEta_
double eta() const final
momentum pseudorapidity