CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TauNNId.h
Go to the documentation of this file.
1 #ifndef L1TRIGGER_PHASE2L1PARTICLEFLOWS_TAUNNID_H
2 #define L1TRIGGER_PHASE2L1PARTICLEFLOWS_TAUNNID_H
3 
4 #include <string>
7 
8 struct TauNNTFCache {
9  TauNNTFCache() : graphDef(nullptr) {}
10  std::atomic<tensorflow::GraphDef *> graphDef;
11 };
12 
13 class TauNNId {
14 public:
15  TauNNId(const std::string &iInput, const TauNNTFCache *cache, const std::string &iWeightFile, int iNParticles);
16  ~TauNNId();
17 
18  void setNNVectorVar();
19  float EvaluateNN();
20  float compute(const l1t::PFCandidate &iSeed, l1t::PFCandidateCollection &iParts);
21 
22 private:
23  tensorflow::Session *session_;
24  std::vector<float> NNvectorVar_;
27  unique_ptr<float[]> fPt_;
28  unique_ptr<float[]> fEta_;
29  unique_ptr<float[]> fPhi_;
30  unique_ptr<float[]> fId_;
31 };
32 #endif
~TauNNId()
Definition: TauNNId.cc:21
TauNNTFCache()
Definition: TauNNId.h:9
unique_ptr< float[]> fPhi_
Definition: TauNNId.h:29
std::vector< l1t::PFCandidate > PFCandidateCollection
Definition: PFCandidate.h:57
int fNParticles_
Definition: TauNNId.h:26
unique_ptr< float[]> fId_
Definition: TauNNId.h:30
std::vector< float > NNvectorVar_
Definition: TauNNId.h:24
void setNNVectorVar()
Definition: TauNNId.cc:22
unique_ptr< float[]> fPt_
Definition: TauNNId.h:27
tensorflow::Session * session_
Definition: TauNNId.h:23
std::string fInput_
Definition: TauNNId.h:25
float EvaluateNN()
Definition: TauNNId.cc:40
std::atomic< tensorflow::GraphDef * > graphDef
Definition: TauNNId.h:10
TauNNId(const std::string &iInput, const TauNNTFCache *cache, const std::string &iWeightFile, int iNParticles)
Definition: TauNNId.cc:8
float compute(const l1t::PFCandidate &iSeed, l1t::PFCandidateCollection &iParts)
Definition: TauNNId.cc:51
def cache
Definition: utilities.py:3
unique_ptr< float[]> fEta_
Definition: TauNNId.h:28