File indexing completed on 2023-10-25 09:55:54
0001 #ifndef L1TRIGGER_PHASE2L1PARTICLEFLOWS_TAUNNID_H
0002 #define L1TRIGGER_PHASE2L1PARTICLEFLOWS_TAUNNID_H
0003
0004 #include <string>
0005 #include "PhysicsTools/TensorFlow/interface/TensorFlow.h"
0006 #include "DataFormats/L1TParticleFlow/interface/PFCandidate.h"
0007
0008 class TauNNId {
0009 public:
0010 TauNNId(const std::string &iInput,
0011 const tensorflow::Session *session,
0012 const std::string &iWeightFile,
0013 int iNParticles);
0014 ~TauNNId(){};
0015
0016 void setNNVectorVar();
0017 float EvaluateNN();
0018 float *NNVectorVar() { return NNvectorVar_.data(); }
0019 float compute(const l1t::PFCandidate &iSeed, l1t::PFCandidateCollection &iParts);
0020
0021 private:
0022 const tensorflow::Session *session_;
0023 std::vector<float> NNvectorVar_;
0024 std::string fInput_;
0025 int fNParticles_;
0026 unique_ptr<float[]> fPt_;
0027 unique_ptr<float[]> fEta_;
0028 unique_ptr<float[]> fPhi_;
0029 unique_ptr<float[]> fId_;
0030 };
0031 #endif